changeset 20349:bcf0a288aa6c stable

maint: Merge default to stable in preparation for 4.0.0 release.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Apr 2015 12:12:16 -0400
parents 77f65eabac20 (current diff) 4ff975c58584 (diff)
children 64a2d4c87ecb 42bb3a776c9f
files etc/icons/octave-logo.ico etc/icons/octave-logo.png etc/octave.appdata.xml examples/@FIRfilter/FIRfilter.m examples/@FIRfilter/FIRfilter_aggregation.m examples/@FIRfilter/display.m examples/@FIRfilter/module.mk examples/@FIRfilter/subsasgn.m examples/@FIRfilter/subsref.m examples/@polynomial/display.m examples/@polynomial/double.m examples/@polynomial/end.m examples/@polynomial/get.m examples/@polynomial/module.mk examples/@polynomial/mtimes.m examples/@polynomial/numel.m examples/@polynomial/plot.m examples/@polynomial/polynomial.m examples/@polynomial/polynomial_superiorto.m examples/@polynomial/polyval.m examples/@polynomial/roots.m examples/@polynomial/set.m examples/@polynomial/subsasgn.m examples/@polynomial/subsref.m examples/COPYING examples/addtwomatrices.cc examples/celldemo.cc examples/embedded.cc examples/fortrandemo.cc examples/fortransub.f examples/funcdemo.cc examples/globaldemo.cc examples/helloworld.cc examples/make_int.cc examples/mex_demo.c examples/mycell.c examples/myfeval.c examples/myfevalf.f examples/myfunc.c examples/myhello.c examples/mypow2.c examples/myprop.c examples/myset.c examples/mysparse.c examples/mystring.c examples/mystruct.c examples/oct_demo.cc examples/oregonator.cc examples/oregonator.m examples/paramdemo.cc examples/standalone.cc examples/standalonebuiltin.cc examples/stringdemo.cc examples/structdemo.cc examples/unwinddemo.cc libgui/src/icons/arrow_down.png libgui/src/icons/arrow_left.png libgui/src/icons/arrow_right.png libgui/src/icons/arrow_up.png libgui/src/icons/artsbuilderexecute.png libgui/src/icons/bookmark.png libgui/src/icons/bp_next.png libgui/src/icons/bp_prev.png libgui/src/icons/bp_rm_all.png libgui/src/icons/bp_toggle.png libgui/src/icons/configure.png libgui/src/icons/db_cont.png libgui/src/icons/db_step.png libgui/src/icons/db_step_in.png libgui/src/icons/db_step_out.png libgui/src/icons/db_stop.png libgui/src/icons/editcopy.png libgui/src/icons/editcut.png libgui/src/icons/editdelete.png libgui/src/icons/editpaste.png libgui/src/icons/fileclose.png libgui/src/icons/filenew.png libgui/src/icons/fileopen.png libgui/src/icons/fileprint.png libgui/src/icons/filesave.png libgui/src/icons/filesaveas.png libgui/src/icons/find.png libgui/src/icons/findf.png libgui/src/icons/folder_documents.png libgui/src/icons/folder_new.png libgui/src/icons/gear.png libgui/src/icons/home.png libgui/src/icons/ok.png libgui/src/icons/redled.png libgui/src/icons/redo.png libgui/src/icons/reload.png libgui/src/icons/search.png libgui/src/icons/undo.png libgui/src/icons/up.png libgui/src/icons/widget-close.png libgui/src/icons/widget-undock.png libinterp/corefcn/oct-tex-parser.yy libinterp/corefcn/syl.cc libinterp/dldfcn/__dsearchn__.cc libinterp/dldfcn/tsearch.cc liboctave/array/Array2.h liboctave/array/Array3.h liboctave/array/ArrayN.h liboctave/array/MArray2.h liboctave/array/MArrayN.h liboctave/cruft/Makefile.am liboctave/operators/sparse-mx-ops liboctave/system/tempnam.c liboctave/system/tempname.c liboctave/util/lo-cieee.c liboctave/util/oct-alloc.cc liboctave/util/oct-mem.h scripts/audio/loadaudio.m scripts/audio/playaudio.m scripts/audio/saveaudio.m scripts/audio/setaudio.m scripts/deprecated/__error_text__.m scripts/deprecated/cor.m scripts/deprecated/corrcoef.m scripts/deprecated/cut.m scripts/deprecated/default_save_options.m scripts/deprecated/error_text.m scripts/deprecated/interp1q.m scripts/deprecated/isequalwithequalnans.m scripts/deprecated/java_convert_matrix.m scripts/deprecated/java_debug.m scripts/deprecated/java_invoke.m scripts/deprecated/java_new.m scripts/deprecated/java_unsigned_conversion.m scripts/deprecated/javafields.m scripts/deprecated/javamethods.m scripts/deprecated/polyderiv.m scripts/deprecated/saving_history.m scripts/deprecated/shell_cmd.m scripts/deprecated/studentize.m scripts/deprecated/sylvester_matrix.m scripts/general/bicubic.m scripts/general/flipdim.m scripts/general/isa.m scripts/general/iscolumn.m scripts/general/isrow.m scripts/general/isscalar.m scripts/general/issquare.m scripts/general/isvector.m scripts/geometry/delaunay3.m scripts/miscellaneous/colon.m scripts/miscellaneous/dump_prefs.m scripts/miscellaneous/tempname.m scripts/mkdoc scripts/plot/module.mk scripts/plot/util/private/__fltk_ginput__.m scripts/plot/util/private/__fltk_print__.m scripts/set/private/validargs.m scripts/strings/strmatch.m test/fcn-handle-derived-resolution/@derived/derived.m test/fcn-handle-derived-resolution/@other/getsize_arrayfun.m test/fcn-handle-derived-resolution/@other/getsize_cellfun.m test/fcn-handle-derived-resolution/@other/getsize_loop.m test/fcn-handle-derived-resolution/@other/other.m test/fcn-handle-derived-resolution/@parent/numel.m test/fcn-handle-derived-resolution/@parent/parent.m
diffstat 2609 files changed, 137929 insertions(+), 39604 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate
+++ b/.hgsubstate
@@ -1,1 +1,1 @@
-8728cf80b7d84b0ac401debac5b37217aac0d2e2 gnulib-hg
+7f19e7f2afa2b1476983003f9cd6df2f5b2a4b08 gnulib-hg
--- a/.hgtags
+++ b/.hgtags
@@ -90,3 +90,6 @@
 492c5614953571a0b07f4c1621cc7bc5c85c0251 rc-3-8-2-1
 46df2c7b8f4dec400ce353370f2e47a02926026d rc-3-8-2-2
 a66548dc07b0fc9b7d37a4be065aa15e8243c96a release-3-8-2
+52d2bbf49c922440621b42b1c1679f0e55462485 rc-4-0-0-1
+eba80000fa0dad32ba0f1cd767dd826d1ce1aba6 rc-4-0-0-2
+065f933ef08318e40b81f7fe75236e6175088117 rc-4-0-0-3
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -63,7 +63,6 @@
   etc/README.gnuplot \
   etc/README.kpathsea \
   etc/gdbinit \
-  etc/octave.appdata.xml \
   run-octave.in
 
 include m4/module.mk
@@ -129,12 +128,17 @@
 check: all
 	$(MAKE) -C test check
 
+if AMCOND_HAVE_LLVM
+check-jit: all
+	$(MAKE) -C test check-jit
+endif
+
 run-octave: run-octave.in Makefile
-	@$(do_subst_script_vals)
+	$(AM_V_GEN)$(do_subst_script_vals) && \
 	chmod a+rx "$@"
 
 bits/stl_algo.h: build-aux/stl_algo.h-fixed
-	$(MKDIR_P) bits
+	$(AM_V_GEN)$(MKDIR_P) bits && \
 	$(INSTALL_HEADER) $< $@
 
 ## If we aren't trying to fix stl_algo.h, then try to ensure that
@@ -149,19 +153,31 @@
 
 if AMCOND_BUILD_DOCS
 AUTHORS BUGS INSTALL.OCTAVE:
-	$(MAKE) -C doc/interpreter ../../$@
+	$(AM_V_GEN)$(MAKE) -C doc/interpreter ../../$@
 endif
 .PHONY: AUTHORS BUGS INSTALL.OCTAVE
 
+define changelog-from-hg-log
+  rm -f $@-t $@ && \
+  ( cd $(srcdir); \
+    hg log --style=build-aux/changelog.tmpl --prune=b0e60ad4ae26 --only-branch=`hg branch`; \
+    echo ""; \
+    echo "See the files in the directory etc/OLD-ChangeLogs for changes before 2011-04-19"; \
+  ) > $@-t && \
+  mv $@-t $@
+endef
+
 ChangeLog:
-	(cd $(srcdir); hg log --style=build-aux/changelog.tmpl --prune=b0e60ad4ae26 --only-branch=`hg branch`; echo ""; echo "See the files in the directory etc/OLD-ChangeLogs for changes before 2011-04-19") > $@.t
-	mv $@.t $@
+	$(AM_V_GEN)$(changelog-from-hg-log)
 .PHONY: ChangeLog
 
 octetc_DATA = \
   CITATION \
-  NEWS \
-  config.log
+  NEWS
+
+if AMCOND_INSTALL_BUILD_LOGS
+octetc_DATA += config.log
+endif
 
 doxyhtml:
 	$(MAKE) -C doc/doxyhtml doxyhtml
--- a/NEWS
+++ b/NEWS
@@ -1,1520 +1,341 @@
-Summary of important user-visible changes for version 3.8:
+Summary of important user-visible changes for version 4.0:
 ---------------------------------------------------------
 
-  ** One of the biggest new features for Octave 3.8 is a graphical user
-     interface.  It is the one thing that users have requested most
-     often over the last few years and now it is almost ready.  But
-     because it is not quite as polished as we would like, we have
-     decided to wait until the 4.0.x release series before making the
-     GUI the default interface (until then, you can use the --force-gui
-     option to start the GUI).
-
-     Given the length of time and the number of bug fixes and
-     improvements since the last major release Octave, we also decided
-     against delaying the release of all these new improvements any
-     longer just to perfect the GUI.  So please enjoy the 3.8 release of
-     Octave and the preview of the new GUI.  We believe it is working
-     reasonably well, but we also know that there are some obvious rough
-     spots and many things that could be improved.
-
-     WE NEED YOUR HELP.  There are many ways that you can help us fix
-     the remaining problems, complete the GUI, and improve the overall
-     user experience for both novices and experts alike:
+ ** A graphical user interface is now the default when running Octave
+    interactively.  The start-up option --no-gui will run the familiar
+    command line interface, and still allows use of the GUI dialogs and
+    qt plotting toolkit.  The option --no-gui-libs runs a minimalist
+    command line interface that does not link with the Qt libraries and
+    uses the fltk toolkit for plotting.
 
-       * If you are a skilled software developer, you can help by
-         contributing your time to help with Octave's development.  See
-         http://octave.org/get-involved.html for more information.
-
-       * If Octave does not work properly, you are encouraged
-         report the problems you find.  See http://octave.org/bugs.html
-         for more information about how to report problems.
+ ** Octave now uses OpenGL graphics with Qt widgets by default.  If OpenGL
+    libraries are not available when Octave is built, gnuplot is used.
+    You may choose to use the fltk or gnuplot toolkit for graphics by
+    executing the command
 
-       * Whether you are a user or developer, you can help to fund the
-         project.  Octave development takes a lot of time and expertise.
-         Your contributions help to ensure that Octave will continue to
-         improve.  See http://octave.org/donate.html for more details.
-
-    We hope you find Octave to be useful.  Please help us make it even
-    better for the future!
-
- ** Octave now uses OpenGL graphics by default with FLTK widgets.  If
-    OpenGL libraries or FLTK widgets are not available when Octave is
-    built, gnuplot is used.  You may also choose to use gnuplot for
-    graphics by executing the command
-
+      graphics_toolkit ("fltk")
+        OR
       graphics_toolkit ("gnuplot")
 
-    Adding this command to your ~/.octaverc file will set the default
+    Adding such a command to your ~/.octaverc file will set the default
     for each session.
 
- ** Printing or saving figures with OpenGL graphics requires the
-    gl2ps library which is no longer distributed with Octave.  The
-    software is widely available in most package managers.  If a
-    pre-compiled package does not exist for your system, you can find
-    the current sources at http://www.geuz.org/gl2ps/.
+ ** A new syntax for object oriented programming termed classdef has been
+    introduced.  See the manual for more extensive documentation of the
+    classdef interface.
+
+    New keywords:
 
- ** Octave now supports nested functions with scoping rules that are
-    compatible with Matlab.  A nested function is one declared and defined
-    within the body of another function.  The nested function is only
-    accessible from within the enclosing function which makes it one
-    method for making private functions whose names do not conflict with those
-    in the global namespace (See also subfunctions and private functions).
-    In addition, variables in the enclosing function are visible within the
-    nested function.  This makes it possible to have a pseudo-global variable
-    which can be seen by a group of functions, but which is not visible in
-    the global namespace.
+      classdef      endclassdef
+      enumeration   endenumeration
+      events        endevents
+      methods       endmethods
+      properties    endproperties
 
-    Example:
-    function outerfunc (...)
-      ...
-      function nested1 (...)
-        ...
-        function nested2 (...)
-           ...
-        endfunction
-      endfunction
+ ** New audio functions and classes:
+
+      audiodevinfo  audioread      sound
+      audioinfo     audiorecorder  soundsc
+      audioplayer   audiowrite
 
-      function nested3 (...)
-        ...
-      endfunction
-    endfunction
+ ** Other new classes in Octave 4.0:
 
- ** Line continuations inside character strings have changed.
+      audioplayer    inputParser
+      audiorecorder
+
+ ** Optional stricter Matlab compatibility for ranges, diagonal matrices,
+    and permutation matrices.
 
-    The sequence '...' is no longer recognized as a line continuation
-    inside a character string.  A backslash '\' followed by a newline
-    character is no longer recognized as a line continuation inside
-    single-quoted character strings.  Inside double-quoted character
-    strings, a backslash followed by a newline character is still
-    recognized as a line continuation, but the backslash character must
-    be followed *immediately* by the newline character.  No whitespace or
-    end-of-line comment may appear between them.
+    Octave has internal optimizations which use space-efficient storage
+    for the three data types above.  Three new functions have been added
+    which control whether the optimizations are used (default), or whether
+    the data types are stored as full matrices.
 
- ** Backslash as a continuation marker outside of double-quoted strings
-    is now deprecated.
+    disable_range   disable_diagonal_matrix   disable_permutation_matrix
 
-    Using '\' as a continuation marker outside of double quoted strings
-    is now deprecated and will be removed from a future version of
-    Octave.  When that is done, the behavior of
+    All three optimizations are disabled if Octave is started with the
+    --braindead command line option.
 
-      (a \
-       b)
+ ** The preference
 
-    will be consistent with other binary operators.
+      do_braindead_shortcircuit_evaluation
 
- ** Redundant terminal comma accepted by parser
+    is now enabled by default.
 
-    A redundant terminal comma is now accepted in matrix
-    definitions which allows writing code such as
+ ** The preference
 
-    [a,...
-     b,...
-     c,...
-    ] = deal (1,2,3)
+      allow_noninteger_range_as_index
 
- ** Octave now has limited support for named exceptions
+    is now enabled by default and the warning ID
 
-    The following syntax is now accepted:
+      Octave:noninteger-range-as-index
 
-      try
-        statements
-      catch exception-id
-        statements
-      end
+    is now set to "on" by default instead of "error" by default and "on"
+    for --traditional.
 
-    The exception-id is a structure with the fields "message" and
-    "identifier".  For example
+ ** The "backtrace" warning option is now enabled by default.  This change
+    was made for Matlab compatibility.
 
-      try
-        error ("Octave:error-id", "error message");
-      catch myerr
-        printf ("identifier: %s\n", myerr.identifier);
-        printf ("message:    %s\n", myerr.message);
-      end_try_catch
+ ** For compatibility with Matlab, the "ismatrix (x)" function now only checks
+    the dimension of "x".  The old behaviour of "ismatrix" is obtained by
+    "isnumeric (x) || islogical (x) || ischar (x)".
 
-    When classdef-style classes are added to Octave, the exception-id
-    will become an MException object.
-
- ** Warning states may now be set temporarily, until the end of the
-    current function, using the syntax
-
-      warning STATE ID "local"
+ ** The nextpow2 function behaviour has been changed for vector inputs.
+    Instead of computing `nextpow2 (length (x))', it will now compute
+    nextpow2 for each element of the input.  This change is Matlab compatible,
+    and also prevents bugs for "vectors" of length 1.
 
-    in which STATE may be "on", "off", or "error".  Changes to warning
-    states that are set locally affect the current function and all
-    functions called from the current scope.  The previous warning state
-    is restored on return from the current function.  The "local"
-    option is ignored if used in the top-level workspace.
+ ** polyeig now returns a row vector of eigenvalues rather than a matrix
+    with the eigenvalues on the diagonal.  This change was made for Matlab
+    compatibility.
 
- ** Warning IDs renamed:
+ ** Interpolation function changes for Matlab compatibility
 
-    Octave:array-as-scalar => Octave:array-to-scalar
-    Octave:array-as-vector => Octave:array-to-vector
-
- ** 'emptymatch', 'noemptymatch' options added to regular expressions.
-
-    With this addition Octave now accepts the entire set of Matlab options
-    for regular expressions.  'noemptymatch' is the default, but 'emptymatch'
-    has certain uses where you need to match an assertion rather than actual
-    characters.  For example,
+    The interpolation method 'cubic' is now equivalent to 'pchip'
+    for interp1, interp2, and interp3.  Previously, 'cubic' was equivalent
+    to 'spline' for interp2.  This may produce different results as 'spline'
+    has continuous 1st and 2nd derivatives while 'pchip' only has a continuous
+    1st derivative.  The methods 'next' and 'previous' have been added to
+    interp1 for compatibility.
 
-    regexprep ('World', '^', 'Hello ', 'emptymatch')
-      => Hello World
-
-    where the pattern is actually the assertion '^' or start-of-line.
+ ** The delaunay function has been extended to accept 3-D inputs for
+    Matlab compatibility.  The delaunay function no longer plots the
+    triangulation if no output argument is requested, instead, the
+    triangulation is always returned.  The delaunay3 function which
+    handles 3-D inputs has been deprecated in favor of delaunay.
 
- ** For compatibility with Matlab, the regexp, regexpi, and regexprep
-    functions now process backslash escape sequences in single-quoted pattern
-    strings.  In addition, the regexprep function now processes backslash
-    escapes in single-quoted replacement strings.  For example,
-
-    regexprep (str, '\t', '\n')
-
-    would search the variable str for a TAB character (escape sequence \t)
-    and replace it with a NEWLINE (escape sequence \n).  Previously the
-    expression would have searched for a literal '\' followed by 't' and
-    replaced the two characters with the sequence '\', 'n'.
+ ** The trigonometric functions asin and acos return different phase values
+    from previous versions of Octave when the input is outside the principal
+    branch ([-1, 1]).  If the real portion of the input is greater than 1 then
+    the limit from below is taken.  If the real portion is less than 1 then the
+    limit from above is taken.  This criteria is consistent with several other
+    numerical analysis software packages.
 
- ** A TeX parser has been implemented for the FLTK toolkit and is the default
-    for any text object including titles and axis labels.  The TeX parser is
-    supported only for display on a monitor, not for printing.
+ ** The hyperbolic function acosh now returns values with a phase in the range
+    [-pi/2, +pi/2].  Previously Octave returned values in the range [0, pi].
+    This is consistent with several other numerical analysis software packages.
 
-    A quick summary of features:
+ ** strfind changes when using empty pattern ("") for Matlab compatibility
+
+    strfind now returns an empty array when the pattern itself is empty.
+    In previous versions of Octave, strfind matched at every character
+    location when the pattern was empty.
 
-    Code         Feature     Example             Comment
-    -----------------------------------------------------------------
-    _            subscript   H_2O                formula for water
-    ^            exponent    y=x^2               formula for parabola
-    \char        symbol      \beta               Greek symbol beta
-    \fontname    font        \fontname{Arial}    set Arial font
-    \fontsize    fontsize    \fontsize{16}       set fontsize 16
-    \color[rgb]  fontcolor   \color[rgb]{1 0 1}  set magenta color
-    \bf          bold        \bfBold Text        bold font
-    \it          italic      \itItalic Text      italic font
-    \sl          slanted     \slOblique Text     slanted font
-    \rm          normal      \bfBold\rmNormal    normal font
-    {}           group       {\bf Bold}Normal    group objects
-                             e^{i*\pi} = -1      group objects
+      NEW
+      strfind ("abc", "") => []
+      OLD
+      strfind ("abc", "") => [1, 2, 3, 4]
 
- ** The m-files in the plot directory have been overhauled.
+ ** Integer formats used in the printf family of functions now work for
+    64-bit integers and are more compatible with Matlab when printing
+    non-integer values.  Now instead of truncating, Octave will switch
+    the effective format to '%g' in the following circumstances:
 
-    The plot functions now produce output that is nearly visually compatible
-    with Matlab.  Plot performance has also increased, dramatically for some
-    functions such as comet and waitbar.  Finally, the documentation for most
-    functions has been updated so it should be clearer both how to use a
-    function and when a function is appropriate.
-
- ** The m-files in the image directory have been overhauled.
+      * the value of an integer type (int8, uint32, etc.) value exceeds
+        the maximum for the format specifier.  For '%d', the limit is
+        intmax ('int64') and for '%u' it is intmax ('uint64').
 
-    The principal benefit is that Octave will now no longer automatically
-    convert images stored with integers to doubles.  Storing images as uint8
-    or uint16 requires only 1/8 or 1/4 the memory of an image stored using
-    doubles.  For certain operations, such as fft2, the image must still be
-    converted to double in order to work.
+      * round(x) != x or the value is outside the range allowed by the
+        integer format specifier.
 
-    Other changes include fixes to the way indexed images are read from a
-    colormap depending on the image class (integer images have a -1 offset to
-    the colormap row number).
+    There is still one difference:  Matlab switches to '%e' and Octave
+    switches to '%g'.
 
- ** The imread and imwrite functions have been completely rewritten.
+ ** The functions intersect, setdiff, setxor, and union now return a
+    column vector as output unless the input was a row vector.  This change
+    was made for Matlab compatibility.
 
-    The main changes relate to the alpha channel, support for reading and
-    writing of floating point images, implemented writing of indexed images,
-    and appending images to multipage image files.
-
-    The issues that may arise due to backwards incompatibility are:
+ ** The inpolygon function now returns true for points that are within
+    the polygon OR on it's edge.  This change was made for Matlab
+    compatibility. 
 
-      * imwrite no longer interprets a length of 2 or 4 in the third dimension
-        as grayscale or RGB with alpha channel (a length of 4 will be saved
-        as a CMYK image).  Alpha channel must be passed as separate argument.
+ ** The archive family of functions (bzip2, gzip, zip, tar) and their
+    unpacking routines (bunzip2, gunzip, unzip, untar, unpack) have
+    been recoded.  Excepting unpack, the default is now to place files
+    in the same directory as the archive (on unpack) or as the original
+    files (on archiving).
 
-      * imread will always return the colormap indexes when reading an indexed
-        image, even if the colormap is not requested as output.
-
-      * transparency values are now inverted from previous Octave versions
-        (0 is for completely transparent instead of completely opaque).
+ ** Qt and FLTK graphics toolkits now support offscreen rendering on Linux.
+    In other words, print will work even when the figure visibility is "off".
 
-    In addition, the function imformats has been implemented to expand
-    reading and writing of images of different formats through imread
-    and imwrite.
+ ** Z-order stacking issues with patches, grid lines, and line object
+    plot markers for on screen display and printing have all been resolved.
+    For 2-D plots the axis grid lines can be placed on top of the plot
+    with set (gca, "layer", "top").
 
- ** The colormap function now provides new options--"list", "register",
-    and "unregister"--to list all available colormap functions, and to
-    add or remove a function name from the list of known colormap
-    functions.  Packages that implement extra colormaps should use these
-    commands with PKG_ADD and PKG_DEL statements.
+ ** The patch graphic object has been overhauled.  It now produces visual
+    results equivalent to Matlab even for esoteric combinations of
+    faces/vertices/cdata.
 
- ** strsplit has been modified to be compatible with Matlab.  There
-    are two instances where backward compatibility is broken.
-
-    (1) Delimiters are now string vectors, not scalars.
-
-    Octave's legacy behavior
+ ** The polar() plot function now draws a circular theta axis and
+    radial rho axis rather than using a rectangular x/y axis.
 
-      strsplit ("1 2, 3", ", ")
-      ans =
-      {
-       [1,1] = 1
-       [1,2] = 2
-       [1,3] =
-       [1,4] = 3
-      }
-
-    Matlab compatible behavior
+ ** linkprop has been completely re-coded for performance and Matlab
+    compatibility.  It now returns a linkprop object which must be stored
+    in a variable for as long as the graphic objects should remain linked.
+    To unlink properties use 'clear hlink' where hlink is the variable
+    containing the linkprop object.
 
-      strsplit ("1 2, 3", ", ")
-      ans =
-      {
-       [1,1] = 1 2
-       [1,2] = 3
-      }
+ ** isprime has been extended to operate on negative and complex inputs.
 
-    (2) By default, Matlab treats consecutive delimiters as a single
-    delimiter.  By default, Octave's legacy behavior was to return an
-    empty string for the part between the delmiters.
+ ** xor has been extended to accept more than two arguments in which case
+    it performs cumulative XOR reduction.
+
+ ** The following functions now support N-dimensional arrays:
+
+      fliplr   flipud   rot90   rectint
 
-    Where legacy behavior is desired, the call to strsplit() may be
-    replaced by ostrsplit(), which is Octave's original implementation of
-    strsplit().
+ ** The new warning ID "Octave:data-file-in-path" replaces the three
+    previous separate warning IDs "Octave:fopen-file-in-path",
+    "Octave:load-file-in-path", and "Octave:md5sum-file-in-path".
 
- ** The datevec function has been extended for better Matlab compatibility.
-    It now accepts string inputs in the following numerical formats: 12, 21,
-    22, 26, 29, 31.  This is undocumented, but verifiable, Matlab behavior.
-    In addition, the default for formats which do not specify a date is
-    January 1st of the current year.  The previous default was the current day,
-    month, and year.  This may produce changes in existing scripts.
-
- ** The error function and its derivatives has been extended to accept complex
-    arguments.  The following functions now accept complex inputs:
-
-    erf  erfc  erfcx
-
-    In addition two new error functions erfi (imaginary error function) and
-    dawson (scaled imaginary error function) have been added.
+ ** The warning ID Octave:singular-matrix-div has been replaced by
+    Octave:nearly-singular-matrix and Octave:singular-matrix.
 
- ** The glpk function has been modified to reflect changes in the GLPK
-    library.  The "round" and "itcnt" options have been removed.  The
-    "relax" option has been replaced by the "rtest" option.  The numeric
-    values of error codes and of some options have also changed.
-
- ** The kurtosis function has changed definition to be compatible with
-    Matlab.  It now returns the base kurtosis instead of the "excess kurtosis".
-    The old behavior can be had by changing scripts to normalize with -3.
+ ** The warning ID Octave:matlab-incompatible has been replaced by
+    Octave:language-extension to better reflect its meaning.
 
-               "excess kurtosis" = kurtosis (x) - 3
+ ** The warning ID Octave:broadcast has been removed.  Instead automatic
+    broadcasting will throw an Octave:language-extension warning.  This
+    warning ID is used for broadcasting as well as other features not
+    available in Matlab.
 
- ** The moment function has changed definition to be compatible with
-    Matlab.  It now returns the central moment instead of the raw moment.
-    The old behavior can be had by passing the type argument "r" for raw.
-
- ** The default name of the Octave crash dump file is now
-    "octave-workspace" instead of "octave-core".  The exact name can
-    always be customized with the octave_core_file_name function.
+ ** Other new functions added in 4.0:
 
- ** A citation command has been added to display information on how to
-    cite Octave and packages in publications.  The package system will
-    look for and install CITATION files from packages.
-
- ** The java package from Octave Forge is now part of core Octave.  The
-    following new functions are available for interacting with Java
-    directly from Octave:
-
-      debug_java     java_matrix_autoconversion
-      isjava         java_set
-      java2mat       java_unsigned_autoconversion
-      javaArray      javaaddpath
-      javaMethod     javaclasspath
-      javaObject     javamem
-      java_get       javarmpath
-                     usejava
-
-    In addition, the following functions that use the Java interface
-    are now available (provided that Octave is compiled with support for
-    Java enabled):
+      annotation
+      bandwidth
+      cubehelix
+      dir_in_loadpath
+      flip
+      frame2im
+      get_home_directory
+      hgload
+      hgsave
+      ichol
+      ilu
+      im2frame
+      isbanded
+      isdiag
+      isstudent
+      istril
+      istriu
+      javachk
+      jit_failcnt
+      linkaxes
+      lscov
+      metaclass
+      numfields
+      open
+      ordschur
+      pan
+      qmr
+      rotate
+      rotate3d
+      sylvester
+      unsetenv
+      validateattributes
+      zoom
 
-      helpdlg    listdlg   questdlg
-      inputdlg   msgbox    warndlg
-
- ** Other new functions added in 3.8.0:
+ ** inline() scheduled for eventual deprecation by Matlab
 
-      atan2d                     erfi             lines
-      base64_decode              expint           linsolve
-      base64_encode              findfigs         missing_component_hook
-      betaincinv                 flintmax         polyeig
-      built_in_docstrings_file   fminsearch       prefdir
-      cmpermute                  gallery          preferences
-      cmunique                   gco              readline_re_read_init_file
-      colorcube                  hdl2struct       readline_read_init_file
-      copyobj                    history_save     rgbplot
-      dawson                     imformats        save_default_options
-      dblist                     importdata       shrinkfaces
-      desktop                    isaxes           splinefit
-      doc_cache_create           iscolormap       stemleaf
-      ellipj                     isequaln         strjoin
-      ellipke                    jit_debug        struct2hdl
-      erfcinv                    jit_enable       tetramesh
-                                 jit_startcnt     waterfall
+    Functions created through the use of inline are scheduled for deprecation
+    by Matlab.  When this occurs Octave will continue to support inline
+    functions for an indeterminate amount of time before also removing support.
+    All new code should use anonymous functions in place of inline functions.
 
  ** Deprecated functions.
 
-    The following functions were deprecated in Octave 3.4 and have been
-    removed from Octave 3.8.
+    The following functions have been deprecated in Octave 4.0 and will
+    be removed from Octave 4.4 (or whatever version is the second major
+    release after 4.0):
 
-      autocor    dispatch              is_global    setstr
-      autocov    fstat                 krylovb      strerror
-      betai      gammai                perror       values
-      cellidx    glpkmex               replot
-      cquad      is_duplicate_entry    saveimage
+      Function             | Replacement
+      ---------------------|------------------
+      bicubic              | interp2
+      delaunay3            | delaunay
+      dump_prefs           | individual preference get/set routines
+      find_dir_in_path     | dir_in_loadpath
+      finite               | isfinite
+      fmod                 | rem
+      fnmatch              | glob or regexp
+      loadaudio            | audioread
+      luinc                | ilu or ichol
+      mouse_wheel_zoom     | mousewheelzoom axes property
+      nfields              | numfields
+      octave_tmp_file_name | tempname
+      playaudio            | audioplayer
+      saveaudio            | audiowrite
+      syl                  | sylvester
+      usage                | print_usage
 
-    The following functions have been deprecated in Octave 3.8 and will
-    be removed from Octave 3.12 (or whatever version is the second major
+      allow_noninteger_range_as_index
+      do_braindead_shortcircuit_evaluation
+      setaudio
+
+ ** The following functions were deprecated in Octave 3.8 and will be
+    removed from Octave 4.2 (or whatever version is the second major
     release after 3.8):
 
-      default_save_options     java_new
-      gen_doc_cache            java_unsigned_conversion
-      interp1q                 javafields
-      isequalwithequalnans     javamethods
-      java_convert_matrix      re_read_readline_init_file
-      java_debug               read_readline_init_file
-      java_invoke              saving_history
+      default_save_options    java_new
+      gen_doc_cache           java_unsigned_conversion
+      interp1q                javafields
+      isequalwithequalnans    javamethods
+      java_convert_matrix     re_read_readline_init_file
+      java_debug              read_readline_init_file
+      java_invoke             saving_history
 
-    The following keywords have been deprecated in Octave 3.8 and will
-    be removed from Octave 3.12 (or whatever version is the second major
-    release after 3.8):
+ ** The following functions were deprecated in Octave 3.6 and have been
+    removed from Octave 4.0.
+
+      cut                polyderiv
+      cor                shell_cmd
+      corrcoef           studentize
+      __error_text__     sylvester_matrix
+      error_text
+
+ ** The following keywords were deprecated in Octave 3.8 and have been
+    removed from Octave 4.0
 
       static
 
-    The following configuration variables have been deprecated in Octave
-    3.8 and will be removed from Octave 3.12 (or whatever version is the
-    second major release after 3.8):
+ ** The following configuration variables were deprecated in Octave 3.8
+    and have been removed from Octave 4.0
 
       CC_VERSION  (now GCC_VERSION)
       CXX_VERSION (now GXX_VERSION)
 
-    The internal class <Octave_map> has been deprecated in Octave 3.8 and will
-    be removed from Octave 3.12 (or whatever version is the second major
-    release after 3.8).  Replacement classes are <octave_map> (struct array)
-    or <octave_scalar_map> for a single structure.
-
-Summary of important user-visible changes for version 3.6:
----------------------------------------------------------
-
- ** The PCRE library is now required to build Octave.  If a pre-compiled
-    package does not exist for your system, you can find PCRE sources
-    at http://www.pcre.org
-
- ** The ARPACK library is no longer distributed with Octave.
-    If you need the eigs or svds functions you must provide an
-    external ARPACK through a package manager or by compiling it
-    yourself.  If a pre-compiled package does not exist for your system,
-    you can find the current ARPACK sources at
-    http://forge.scilab.org/index.php/p/arpack-ng
-
- ** Many of Octave's binary operators (.*, .^, +, -, ...) now perform
-    automatic broadcasting for array operations which allows you to use
-    operator notation instead of calling bsxfun or expanding arrays (and
-    unnecessarily wasting memory) with repmat or similar idioms.  For
-    example, to scale the columns of a matrix by the elements of a row
-    vector, you may now write
-
-      rv .* M
-
-    In this expression, the number of elements of rv must match the
-    number of columns of M.  The following operators are affected:
-
-      plus      +  .+
-      minus     -  .-
-      times     .*
-      rdivide   ./
-      ldivide   .\
-      power     .^  .**
-      lt        <
-      le        <=
-      eq        ==
-      gt        >
-      ge        >=
-      ne        !=  ~=
-      and       &
-      or        |
-      atan2
-      hypot
-      max
-      min
-      mod
-      rem
-      xor
-
-    additionally, since the A op= B assignment operators are equivalent
-    to A = A op B, the following operators are also affected:
-
-      +=  -=  .+=  .-=  .*=  ./=  .\=  .^=  .**=  &=  |=
-
-    See the "Broadcasting" section in the new "Vectorization and Faster
-    Code Execution" chapter of the manual for more details.
-
- ** Octave now features a profiler, thanks to the work of Daniel Kraft
-    under the Google Summer of Code mentorship program.  The manual has
-    been updated to reflect this addition.  The new user-visible
-    functions are profile, profshow, and profexplore.
-
- ** Overhaul of statistical distribution functions
-
-    Functions now return "single" outputs for inputs of class "single".
+ ** The internal function atan2 of the sparse matrix class has been deprecated
+    in Octave 4.0 and will be removed from Octave 4.4 (or whatever version is
+    the second major release after 4.0).  Use the Fatan2 function with sparse
+    inputs as a replacement.
 
-    75% reduction in memory usage through use of logical indexing.
-
-    Random sample functions now use the same syntax as rand and accept
-    a comma separated list of dimensions or a dimension vector.
-
-    Functions have been made Matlab-compatible with regard to special
-    cases (probability on boundaries, probabilities for values outside
-    distribution, etc.).  This may cause subtle changes to existing
-    scripts.
-
-    negative binomial function has been extended to real, non-integer
-    inputs.  The discrete_inv function now returns v(1) for 0 instead of
-    NaN.  The nbincdf function has been recoded to use a closed form
-    solution with betainc.
-
- ** strread, textscan, and textread have been completely revamped.
-
-    They now support nearly all Matlab functionality including:
-
-      * Matlab-compatible whitespace and delimiter defaults
-
-      * Matlab-compatible options: 'whitespace', treatasempty', format
-        string repeat count, user-specified comment style, uneven-length
-        output arrays, %n and %u conversion specifiers (provisionally)
-
- ** All .m string functions have been modified for better performance or
-    greater Matlab compatibility.  Performance gains of 15X-30X have
-    been demonstrated.  Operations on cell array of strings no longer pay
-    quite as high a penalty as those on 2-D character arrays.
-
-      deblank:  Now requires character or cellstr input.
+ ** The internal class <Octave_map> was deprecated in Octave 3.8 and has
+    been removed from Octave 4.0.  Replacement classes are
+    <octave_map> (struct array) or <octave_scalar_map> for a single structure.
 
-      strtrim:  Now requires character or cellstr input.
-                No longer trims nulls ("\0") from string for Matlab
-                compatibility.
-
-      strmatch: Follows documentation precisely and ignores trailing spaces
-                in pattern and in string.  Note that this is documented
-                Matlab behavior but the implementation apparently does
-                not always follow it.
-
-      substr:   Now possible to specify a negative LEN option which
-                extracts to within LEN of the end of the string.
-
-      strtok:   Now accepts cellstr input.
-
-      base2dec, bin2dec, hex2dec:
-                Now accept cellstr inputs.
-
-      dec2base, dec2bin, dec2hex:
-                Now accept cellstr inputs.
-
-      index, rindex:
-                Now accept 2-D character array input.
-
-      strsplit: Now accepts 2-D character array input.
-
- ** Geometry functions derived from Qhull (convhull, delaunay, voronoi)
-    have been revamped.  The options passed to the underlying qhull
-    command have been changed for better results or for Matlab
-    compatibility.
-
-      convhull: Default options are "Qt" for 2D, 3D, 4D inputs
-                Default options are "Qt Qx" for 5D and higher
-
-      delaunay: Default options are "Qt Qbb Qc Qz" for 2D and 3D inputs
-                Default options are "Qt Qbb Qc Qx" for 4D and higher
-
-      voronoi:  No default arguments
+ ** The configure option --enable-octave-allocator has been removed.
+    The internal class <octave_allocator> declared in oct-alloc.h has
+    been removed.  The header remains, but is deprecated.  The macros to
+    access the class (DECLARE_OCTAVE_ALLOCATOR, DEFINE_OCTAVE_ALLOCATOR,
+    and DEFINE_OCTAVE_ALLOCATOR2) are now unconditionally defined to be
+    empty.
 
- ** Date/Time functions updated.  Millisecond support with FFF format
-    string now supported.
-
-    datestr: Numerical formats 21, 22, 29 changed to match Matlab.
-             Now accepts cellstr input.
-
- ** The following warning IDs have been removed:
-
-      Octave:associativity-change
-      Octave:complex-cmp-ops
-      Octave:empty-list-elements
-      Octave:fortran-indexing
-      Octave:precedence-change
-
- ** The warning ID Octave:string-concat has been renamed to
-    Octave:mixed-string-concat.
-
- ** Octave now includes the following Matlab-compatible preference
-    functions:
-
-      addpref  getpref  ispref  rmpref  setpref
-
- ** The following Matlab-compatible handle graphics functions have been
-    added:
-
-      guidata         uipanel        uitoolbar
-      guihandles      uipushtool     uiwait
-      uicontextmenu   uiresume       waitfor
-      uicontrol       uitoggletool
-
-    The uiXXX functions above are experimental.
-
-    Except for uiwait and uiresume, the uiXXX functions are not
-    supported with the FLTK+OpenGL graphics toolkit.
-
-    The gnuplot graphics toolkit does not support any of the uiXXX
-    functions nor the waitfor function.
-
- ** New keyword parfor (parallel for loop) is now recognized as a valid
-    keyword.  Implementation, however, is still mapped to an ordinary
-    for loop.
-
- ** Other new functions added in 3.6.0:
-
-      bicg                       nthargout                   usejava
-      is_dq_string               narginchk                   waitbar
-      is_sq_string               python                      zscore
-      is_function_handle         register_graphics_toolkit
-      loaded_graphics_toolkits   recycle
-
- ** Deprecated functions.
-
-    The following functions were deprecated in Octave 3.2 and have been
-    removed from Octave 3.6.
-
-      create_set          spcholinv    splu
-      dmult               spcumprod    spmax
-      iscommand           spcumsum     spmin
-      israwcommand        spdet        spprod
-      lchol               spdiag       spqr
-      loadimage           spfind       spsum
-      mark_as_command     sphcat       spsumsq
-      mark_as_rawcommand  spinv        spvcat
-      spatan2             spkron       str2mat
-      spchol              splchol      unmark_command
-      spchol2inv          split        unmark_rawcommand
-
-    The following functions have been deprecated in Octave 3.6 and will
-    be removed from Octave 3.10 (or whatever version is the second major
-    release after 3.6):
+ ** Octave now has OpenMP enabled by default if the system provides a
+    working OpenMP implementation.  This allows oct-file modules to take
+    advantage of OpenMP if desired.  This can be disabled when building
+    Octave with the configure option --disable-openmp.
 
-      cut                is_duplicate_entry
-      cor                polyderiv
-      corrcoef           shell_cmd
-      __error_text__     studentize
-      error_text         sylvester_matrix
-
- ** The following functions have been modified for Matlab compatibility:
-
-      randperm
-
-Summary of important user-visible changes for version 3.4.3:
------------------------------------------------------------
-
- ** Octave 3.4.3 is a bug fixing release.
-
-Summary of important user-visible changes for version 3.4.2:
------------------------------------------------------------
-
- ** Octave 3.4.2 fixes some minor installation problems that affected
-    version 3.4.1.
-
-Summary of important user-visible changes for version 3.4.1:
------------------------------------------------------------
-
- ** Octave 3.4.1 is primarily a bug fixing release.
-
- ** IMPORTANT note about binary incompatibility in this release:
-
-    Binary compatibility for all 3.4.x releases was originally planned,
-    but this is impossible for the 3.4.1 release due to a bug in the way
-    shared libraries were built in Octave 3.4.0.  Because of this bug,
-    .oct files built for Octave 3.4.0 must be recompiled before they
-    will work with Octave 3.4.1.
+ ** Octave now automatically truncates intermediate calculations done with
+    floating point values to 64 bits.  Some hardware math co-processors, such
+    as the x87, maintain extra precision, but this leads to disagreements in
+    calculations when compared to reference implementations in software using
+    the IEEE standard for double precision.  There was no measurable
+    performance impact to this change, but it may be disabled with the
+    configure option --disable-float-truncate.  MinGW and Cygwin platforms,
+    as well as GCC compilers >= 5.0 require this feature.  Non-x87 hardware,
+    or hardware using SSE options exclusively, can disable float truncation
+    if desired.
 
-    Given that there would be binary incompatibilities with shared
-    libraries going from Octave 3.4.0 to 3.4.1, the following
-    incompatible changes were also made in this release:
-
-      * The Perl Compatible Regular Expression (PCRE) library is now
-        required to build Octave.
-
-      * Octave's libraries and .oct files are now installed in
-        subdirectories of $libdir instead of $libexecdir.
-
-    Any future Octave 3.4.x release versions should remain binary
-    compatible with Octave 3.4.1 as proper library versioning is now
-    being used as recommended by the libtool manual.
-
- ** The following functions have been deprecated in Octave 3.4.1 and will
-    be removed from Octave 3.8 (or whatever version is the second major
-    release after 3.4):
-
-      cquad  is_duplicate_entry  perror  strerror
-
- ** The following functions are new in 3.4.1:
-
-      colstyle  gmres  iscolumn  isrow  mgorth  nproc  rectangle
-
- ** The get_forge_pkg function is now private.
-
- ** The rectangle_lw, rectangle_sw, triangle_lw, and triangle_sw
-    functions are now private.
-
- ** The logistic_regression_derivatives and logistic_regression_likelihood
-    functions are now private.
-
- ** ChangeLog files in the Octave sources are no longer maintained
-    by hand.  Instead, there is a single ChangeLog file generated from
-    the Mercurial version control commit messages.  Older ChangeLog
-    information can be found in the etc/OLD-ChangeLogs directory in the
-    source distribution.
-
-Summary of important user-visible changes for version 3.4:
 ---------------------------------------------------------
 
- ** BLAS and LAPACK libraries are now required to build Octave.  The
-    subset of the reference BLAS and LAPACK libraries has been removed
-    from the Octave sources.
-
- ** The ARPACK library is now distributed with Octave so it no longer
-    needs to be available as an external dependency when building
-    Octave.
-
- ** The `lookup' function was extended to be more useful for
-    general-purpose binary searching.  Using this improvement, the
-    ismember function was rewritten for significantly better
-    performance.
-
- ** Real, integer and logical matrices, when used in indexing, will now
-    cache the internal index_vector value (zero-based indices) when
-    successfully used as indices, eliminating the conversion penalty for
-    subsequent indexing by the same matrix.  In particular, this means it
-    is no longer needed to avoid repeated indexing by logical arrays
-    using find for performance reasons.
-
- ** Logical matrices are now treated more efficiently when used as
-    indices.  Octave will keep the index as a logical mask unless the
-    ratio of true elements is small enough, using a specialized
-    code.  Previously, all logical matrices were always first converted
-    to index vectors.  This results in savings in both memory and
-    computing time.
-
- ** The `sub2ind' and `ind2sub' functions were reimplemented as compiled
-    functions for better performance.  These functions are now faster,
-    can deliver more economized results for ranges, and can reuse the
-    index cache mechanism described in previous paragraph.
-
- ** The built-in function equivalents to associative operators (`plus',
-    `times', `mtimes', `and', and `or') have been extended to accept
-    multiple arguments.  This is especially useful for summing
-    (multiplying, etc.) lists of objects (of possibly distinct types):
-
-      matrix_sum = plus (matrix_list{:});
-
- ** An FTP object type based on libcurl has been implemented.  These
-    objects allow ftp connections, downloads and uploads to be
-    managed.  For example,
-
-      fp = ftp ("ftp.octave.org);
-      cd (fp, "gnu/octave");
-      mget (fp, "octave-3.2.3.tar.bz2");
-      close (fp);
-
- ** The default behavior of `assert (observed, expected)' has been
-    relaxed to employ less strict checking that does not require the
-    internals of the values to match.  This avoids previously valid
-    tests from breaking due to new internal classes introduced in future
-    Octave versions.
-
-    For instance, all of these assertions were true in Octave 3.0.x
-    but false in 3.2.x due to new optimizations and improvements:
-
-      assert (2*linspace (1, 5, 5), 2*(1:5))
-      assert (zeros (0, 0), [])
-      assert (2*ones (1, 5), (2) (ones (1,5)))
-
- ** The behavior of library functions `ismatrix', `issquare', and
-    `issymmetric' has been changed for better consistency.
-
-    * The `ismatrix' function now returns true for all numeric,
-      logical and character 2-D or N-D matrices.  Previously, `ismatrix'
-      returned false if the first or second dimension was zero.
-      Hence, `ismatrix ([])' was false,
-      while `ismatrix (zeros (1,2,0))' was true.
-
-    * The `issquare' function now returns a logical scalar, and is
-      equivalent to the expression
-
-        ismatrix (x) && ndims (x) == 2 && rows (x) == columns (x)
-
-      The dimension is no longer returned.  As a result, `issquare ([])'
-      now yields true.
-
-    * The `issymmetric' function now checks for symmetry instead of
-      Hermitianness.  For the latter, ishermitian was created.  Also,
-      logical scalar is returned rather than the dimension, so
-      `issymmetric ([])' is now true.
-
- ** Function handles are now aware of overloaded functions.  If a
-    function is overloaded, the handle determines at the time of its
-    reference which function to call.  A non-overloaded version does not
-    need to exist.
-
- ** Overloading functions for built-in classes (double, int8, cell,
-    etc.) is now compatible with Matlab.
-
- ** Function handles can now be compared with the == and != operators,
-    as well as the `isequal' function.
-
- ** Performance of concatenation (using []) and the functions `cat',
-    `horzcat', and `vertcat' has been improved for multidimensional
-    arrays.
-
- ** The operation-assignment operators +=, -=, *= and /= now behave more
-    efficiently in certain cases.  For instance, if M is a matrix and S a
-    scalar, then the statement
-
-      M += S;
-
-    will operate on M's data in-place if it is not shared by another
-    variable, usually increasing both time and memory efficiency.
-
-    Only selected common combinations are affected, namely:
-
-      matrix += matrix
-      matrix -= matrix
-      matrix .*= matrix
-      matrix ./= matrix
-
-      matrix += scalar
-      matrix -= scalar
-      matrix *= scalar
-      matrix /= scalar
-
-      logical matrix |= logical matrix
-      logical matrix &= logical matrix
-
-    where matrix and scalar belong to the same class.  The left-hand
-    side must be a simple variable reference.
-
-    Moreover, when unary operators occur in expressions, Octave will
-    also try to do the operation in-place if it's argument is a
-    temporary expression.
-
- ** The effect of comparison operators (<, >, <=, and >=) applied to
-    complex numbers has changed to be consistent with the strict
-    ordering defined by the `max', `min', and `sort' functions.  More
-    specifically, complex numbers are compared by lexicographical
-    comparison of the pairs `[abs(z), arg(z)]'.  Previously, only real
-    parts were compared; this can be trivially achieved by converting
-    the operands to real values with the `real' function.
-
- ** The automatic simplification of complex computation results has
-    changed.  Octave will now simplify any complex number with a zero
-    imaginary part or any complex matrix with all elements having zero
-    imaginary part to a real value.  Previously, this was done only for
-    positive zeros.  Note that the behavior of the complex function is
-    unchanged and it still produces a complex value even if the
-    imaginary part is zero.
-
- ** As a side effect of code refactoring in liboctave, the binary
-    logical operations are now more easily amenable to compiler
-    optimizations and are thus significantly faster.
-
- ** Octave now allows user-defined `subsasgn' methods to optimize out
-    redundant copies.  For more information, see the manual.
-
- ** More efficient matrix division handling.  Octave is now able to
-    handle the expressions
-
-      M' \ V
-      M.' \ V
-      V / M
-
-    (M is a matrix and V is a vector) more efficiently in certain cases.
-    In particular, if M is triangular, all three expressions will be
-    handled by a single call to xTRTRS (from LAPACK), with appropriate
-    flags.  Previously, all three expressions required a physical
-    transpose of M.
-
- ** More efficient handling of certain mixed real-complex matrix
-    operations.  For instance, if RM is a real matrix and CM a complex
-    matrix,
-
-      RM * CM
-
-    can now be evaluated either as
-
-      complex (RM * real (CM), RM * imag (CM))
-
-    or as
-
-      complex (RM) * CM,
-
-    depending on the dimensions.  The first form requires more
-    temporaries and copying, but halves the FLOP count, which normally
-    brings better performance if RM has enough rows.  Previously, the
-    second form was always used.
-
-    Matrix division is similarly affected.
-
- ** More efficient handling of triangular matrix factors returned from
-    factorizations.  The functions for computing QR, LU and Cholesky
-    factorizations will now automatically return the triangular matrix
-    factors with proper internal matrix_type set, so that it won't need
-    to be computed when the matrix is used for division.
-
- ** The built-in `sum' function now handles the non-native summation
-    (i.e., double precision sum of single or integer inputs) more
-    efficiently, avoiding a temporary conversion of the whole input
-    array to doubles.  Further, `sum' can now accept an extra option
-    argument, using a compensated summation algorithm rather than a
-    straightforward sum, which significantly improves precision if lots
-    of cancellation occurs in the summation.
-
- ** The built-in `bsxfun' function now uses optimized code for certain
-    cases where built-in operator handles are passed in.  Namely, the
-    optimizations concern the operators `plus', `minus', `times',
-    `ldivide', `rdivide', `power', `and', `or' (for logical arrays),
-    the relational operators `eq', `ne', `lt', `le', `gt', `ge', and the
-    functions `min' and `max'.  Optimizations only apply when both
-    operands are of the same built-in class.  Mixed real/complex and
-    single/double operations will first convert both operands to a
-    common type.
-
- ** The `strfind' and `strrep' functions now have compiled
-    implementations, facilitating significantly more efficient searching
-    and replacing in strings, especially with longer patterns.  The code
-    of `strcat' has been vectorized and is now much more efficient when
-    many strings are concatenated.  The `strcmpi' and `strncmpi'
-    functions are now built-in functions, providing better performance.
-
- ** 'str2double' now has a compiled implementation and the API conforms
-    to Matlab.  The additional Octave-specific features of returning a
-    boolean matrix indicating which elements were successfully converted
-    has been removed.
-
- ** Matlab-style ignoring input and output function arguments using
-    tilde (~) is now supported.  Ignored output arguments may be
-    detected from a function using the built-in function `isargout'.
-    For more details, consult the manual.
-
- ** The list datatype, deprecated since the introduction of cells, has
-    been removed.
-
- ** The accumarray function has been optimized and is now significantly
-    faster in certain important cases.
-
- ** The behavior of isreal and isnumeric functions was changed to be more
-    Matlab-compatible.
-
- ** The integer math & conversion warnings (Octave:int-convert-nan,
-    Octave:int-convert-non-int-val, Octave:int-convert-overflow,
-    Octave:int-math-overflow) have been removed.
-
- ** rem and mod are now built-in functions.  They also handle integer
-    types efficiently using integer arithmetic.
-
- ** Sparse indexing and indexed assignment has been mostly rewritten.
-    Since Octave uses compressed column storage for sparse matrices,
-    major attention is devoted to operations manipulating whole columns.
-    Such operations are now significantly faster, as well as some other
-    important cases.
-
-    Further, it is now possible to pre-allocate a sparse matrix and
-    subsequently fill it by assignments, provided they meet certain
-    conditions.  For more information, consult the `spalloc' function,
-    which is no longer a mere dummy.  Consequently, nzmax and nnz are no
-    longer always equal in Octave.  Octave may also produce a matrix
-    with nnz < nzmax as a result of other operations, so you should
-    consistently use nnz unless you really want to use nzmax (i.e., the
-    space allocated for nonzero elements).
-
-    Sparse concatenation is also affected, and concatenating sparse
-    matrices, especially larger collections, is now significantly more
-    efficient.  This applies to both the [] operator and the
-    cat/vertcat/horzcat functions.
-
- ** It is now possible to optionally employ the xGESDD LAPACK drivers
-    for computing the singular value decomposition using svd, instead
-    of the default xGESVD, using the configuration pseudo-variable
-    svd_driver.  The xGESDD driver can be up to 6x times faster when
-    singular vectors are requested, but is reported to be somewhat less
-    robust on highly ill-conditioned matrices.
-
- ** Configuration pseudo-variables, such as page_screen_output or
-    confirm_recursive_rmdir (or the above mentioned svd_driver), now
-    accept a "local" option as second argument, requesting the change
-    to be undone when the current function returns:
-
-    function [status, msg] = rm_rf (dir)
-      confirm_recursive_rmdir (false, "local");
-      [status, msg] = rmdir (dir, "s");
-      ...
-    endfunction
-
-    Upon return, confirm_recursive_rmdir will be restored to the value
-    it had on entry to the function, even if there were subsequent
-    changes to the variable in function rm_rf or any of the functions
-    it calls.
-
- ** pkg now accepts a -forge option for downloading and installing
-    packages from Octave Forge automatically.  For example,
-
-      pkg install -forge general
-
-    will automatically download the latest release of the general
-    package and attempt to install it.  No automatic resolving of
-    dependencies is provided.  Further,
-
-      pkg list -forge
-
-    can be used to list all available packages.
-
- ** The internal data representation of structs has been completely
-    rewritten to make certain optimizations feasible.  The field data
-    can now be shared between structs with equal keys but different
-    dimensions or values, making operations that preserve the fields
-    faster.  Economized storage is now used for scalar structs (just
-    like most other scalars), making their usage more
-    memory-efficient.  Certain array-like operations on structs
-    (concatenation, uniform cellfun, num2cell) have gained a
-    significant speed-up.  Additionally, the octave_scalar_map class
-    now provides a simpler interface to work with scalar structs within
-    a C++ DLD function.
-
- ** Two new formats are available for displaying numbers:
-
-      format short eng
-      format long eng
-
-    Both display numbers in engineering notation, i.e., mantissa +
-    exponent where the exponent is a multiple of 3.
-
- ** The following functions are new in Octave 3.4:
-      accumdim    erfcx        nfields      pqpnonneg  uigetdir
-      bitpack     fileread     nth_element  quadcc     uigetfile
-      bitunpack   fminbnd      onCleanup    randi      uiputfile
-      blkmm       fskipl       pbaspect     repelems   uimenu
-      cbrt        ifelse       pie3         reset      whitebg
-      curl        ishermitian  powerset     rsf2csf
-      chop        isindex      ppder        saveas
-      daspect     luupdate     ppint        strread
-      divergence  merge        ppjumps      textread
-
- ** Using the image function to view images with external programs such
-    as display, xv, and xloadimage is no longer supported.  The
-    image_viewer function has also been removed.
-
- ** The behavior of struct assignments to non-struct values has been
-    changed.  Previously, it was possible to overwrite an arbitrary
-    value:
-
-      a = 1;
-      a.x = 2;
-
-    This is no longer possible unless a is an empty matrix or cell
-    array.
-
- ** The dlmread function has been extended to allow specifying a custom
-    value for empty fields.
-
- ** The dlmread and dlmwrite functions have been modified to accept
-    file IDs (as returned by fopen) in addition to file names.
-
- ** Octave can now optimize away the interpreter overhead of an
-    anonymous function handle, if the function simply calls another
-    function or handle with some of its parameters bound to certain
-    values.  Example:
-
-      f = @(x) sum (x, 1);
-
-    When f is called, the call is forwarded to @sum with the constant 1
-    appended, and the anonymous function call does not occur on the
-    call stack.
-
- ** For compatibility with Matlab, mu2lin (x) is now equivalent to
-    mu2lin (x, 0).
-
- ** The new function `history_control' may be used to control the way
-    command lines are added to the history list when Octave is using
-    readline for command-line editing.  For example
-
-      history_control ("ignoredups")
-
-    tells Octave to avoid adding duplicate lines to the history list.
-
- ** Octave now uses the gnulib library for improved portability and to
-    avoid bugs in operating system functions.
-
- ** Deprecated functions.
-
-    The following functions were deprecated in Octave 3.0 and have been
-    removed from Octave 3.4.
-
-      beta_cdf         geometric_pdf        pascal_pdf
-      beta_inv         geometric_rnd        pascal_rnd
-      beta_pdf         hypergeometric_cdf   poisson_cdf
-      beta_rnd         hypergeometric_inv   poisson_inv
-      binomial_cdf     hypergeometric_pdf   poisson_pdf
-      binomial_inv     hypergeometric_rnd   poisson_rnd
-      binomial_pdf     intersection         polyinteg
-      binomial_rnd     is_bool              setstr
-      chisquare_cdf    is_complex           struct_contains
-      chisquare_inv    is_list              struct_elements
-      chisquare_pdf    is_matrix            t_cdf
-      chisquare_rnd    is_scalar            t_inv
-      clearplot        is_square            t_pdf
-      clg              is_stream            t_rnd
-      com2str          is_struct            uniform_cdf
-      exponential_cdf  is_symmetric         uniform_inv
-      exponential_inv  is_vector            uniform_pdf
-      exponential_pdf  isstr                uniform_rnd
-      exponential_rnd  lognormal_cdf        weibcdf
-      f_cdf            lognormal_inv        weibinv
-      f_inv            lognormal_pdf        weibpdf
-      f_pdf            lognormal_rnd        weibrnd
-      f_rnd            meshdom              weibull_cdf
-      gamma_cdf        normal_cdf           weibull_inv
-      gamma_inv        normal_inv           weibull_pdf
-      gamma_pdf        normal_pdf           weibull_rnd
-      gamma_rnd        normal_rnd           wiener_rnd
-      geometric_cdf    pascal_cdf
-      geometric_inv    pascal_inv
-
-    The following functions were deprecated in Octave 3.2 and will
-    be removed from Octave 3.6 (or whatever version is the second major
-    release after 3.2):
-
-      create_set          spcholinv    splu
-      dmult               spcumprod    spmax
-      iscommand           spcumsum     spmin
-      israwcommand        spdet        spprod
-      lchol               spdiag       spqr
-      loadimage           spfind       spsum
-      mark_as_command     sphcat       spsumsq
-      mark_as_rawcommand  spinv        spvcat
-      spatan2             spkron       str2mat
-      spchol              splchol      unmark_command
-      spchol2inv          split        unmark_rawcommand
-
-    The following functions have been deprecated in Octave 3.4 and will
-    be removed from Octave 3.8 (or whatever version is the second major
-    release after 3.4):
-
-      autocor  cellidx   gammai     is_global  replot     values
-      autocov  dispatch  glpkmex    krylovb    saveimage
-      betai    fstat     intwarning perror     strerror
-
-Summary of important user-visible changes for version 3.2:
----------------------------------------------------------
-
- ** Compatibility with Matlab graphics has been improved.
-
-    The hggroup object and associated listener callback functions have
-    been added allowing the inclusion of group objects.  Data sources
-    have been added to these group objects such that
-
-           x = 0:0.1:10;
-           y = sin (x);
-           plot (x, y, "ydatasource", "y");
-           for i = 1 : 100
-             pause(0.1)
-             y = sin (x + 0.1 * i);
-             refreshdata ();
-           endfor
-
-    works as expected.  This capability has be used to introduce
-    stem-series, bar-series, etc., objects for better Matlab
-    compatibility.
-
- ** New graphics functions:
-
-      addlistener                  ezcontour   gcbo         refresh
-      addproperty                  ezcontourf  ginput       refreshdata
-      allchild                     ezmesh      gtext        specular
-      available_graphics_toolkits  ezmeshc     intwarning   surfl
-      graphics_toolkit             ezplot      ishghandle   trisurf
-      cla                          ezplot3     isocolors    waitforbuttonpress
-      clabel                       ezpolar     isonormals
-      comet                        ezsurf      isosurface
-      dellistener                  findall     linkprop
-      diffuse                      gcbf        plotmatrix
-
- ** New experimental OpenGL/FLTK based plotting system.
-
-    An experimental plotting system based on OpenGL and the FLTK
-    toolkit is now part of Octave.  This graphics toolkit is disabled by
-    default.  You can switch to using it with the command
-
-        graphics_toolkit ("fltk")
-
-    for all future figures or for a particular figure with the command
-
-        graphics_toolkit (h, "fltk")
-
-    where "h" is a valid figure handle.
-
- ** Functions providing direct access to gnuplot have been removed.
-
-    The functions __gnuplot_plot__, __gnuplot_set__, __gnuplot_raw__,
-     __gnuplot_show__, __gnuplot_replot__, __gnuplot_splot__,
-     __gnuplot_save_data__ and __gnuplot_send_inline_data__ have been
-     removed from Octave.  These function were incompatible with the
-     high level graphics handle code.
-
- ** The Control, Finance and Quaternion functions have been removed.
-
-    These functions are now available as separate packages from
-
-      http://octave.sourceforge.net/packages.html
-
-    and can be reinstalled using the Octave package manager (see
-    the pkg function).
-
- ** Specific sparse matrix functions removed.
-
-    The following functions, which handled only sparse matrices have
-    been removed.  Instead of calling these functions directly, you
-    should use the corresponding function without the "sp" prefix.
-
-      spatan2     spcumsum  spkron   spprod
-      spchol      spdet     splchol  spqr
-      spchol2inv  spdiag    splu     spsum
-      spcholinv   spfind    spmax    spsumsqk
-      spcumprod   spinv     spmin
-
- ** Improvements to the debugger.
-
-    The interactive debugging features have been improved.  Stopping
-    on statements with dbstop should work correctly now.  Stepping
-    into and over functions, and stepping one statement at a time
-    (with dbstep) now works.  Moving up and down the call stack with
-    dbup and dbdown now works.  The dbstack function is now available
-    to print the current function call stack.  The new dbquit function
-    is available to exit the debugging mode.
-
- ** Improved traceback error messages.
-
-    Traceback error messages are much more concise and easier to
-    understand.  They now display information about the function call
-    stack instead of the stack of all statements that were active at
-    the point of the error.
-
- ** Object Oriented Programming.
-
-    Octave now includes OOP features and the user can create their own
-    class objects and overloaded functions and operators.  For
-    example, all methods of a class called "myclass" will be found in
-    a directory "@myclass" on the users path.  The class specific
-    versions of functions and operators take precedence over the
-    generic versions of these functions.
-
-    New functions related to OOP include
-
-      class  inferiorto  isobject  loadobj  methods  superiorto
-
-    See the Octave manual for more details.
-
- ** Parsing of Command-style Functions.
-
-    Octave now parses command-style functions without needing to first
-    declare them with "mark_as_command".  The rules for recognizing a
-    command-style function calls are
-
-      * A command must appear as the first word in a statement,
-        followed by a space.
-
-      * The first character after the space must not be '=' or '('
-
-      * The next token after the space must not look like a binary
-        operator.
-
-    These rules should be mostly compatible with the way Matlab parses
-    command-style function calls and allow users to define commands in
-    .m files without having to mark them as commands.
-
-    Note that previous versions of Octave allowed expressions like
-
-      x = load -text foo.dat
-
-    but an expression like this will now generate a parse error.  In
-    order to assign the value returned by a function to a variable,
-    you must use the normal function call syntax:
-
-      x = load ("-text", "foo.dat");
-
- ** Block comments.
-
-    Commented code can be between matching "#{" and "#}" or "%{" and
-    "%}" markers, even if the commented code spans several line.  This
-    allows blocks code to be commented, without needing to comment
-    each line.  For example,
-
-    function [s, t] = func (x, y)
-      s = 2 * x;
-    #{
-      s *= y;
-      t = y + x;
-    #}
-    endfunction
-
-    the lines "s *= y;" and "t = y + x" will not be executed.
-
- ** If any subfunction in a file ends with "end" or "endfunction", then
-    they all must end that way.  Previously, Octave accepted
-
-      function main ()
-        ...
-      # no endfunction here.
-      function sub ()
-        ...
-      endfunction
-
-    but this is no longer allowed.
-
- ** Special treatment in the parser of expressions like "a' * b".
-
-    In these cases the transpose is no longer explicitly formed and
-    BLAS libraries are called with the transpose flagged,
-    significantly improving performance for these kinds of
-    operations.
-
- ** Single Precision data type.
-
-    Octave now includes a single precision data type.  Single
-    precision variables can be created with the "single" command, or
-    from functions like ones, eye, etc.  For example,
-
-      single (1)
-      ones (2, 2, "single")
-      zeros (2, 2, "single")
-      eye (2, 2, "single")
-      Inf (2, 2, "single")
-      NaN (2, 2, "single")
-      NA (2, 2, "single")
-
-    all create single precision variables.  For compatibility with
-    Matlab, mixed double/single precision operators and functions
-    return single precision types.
-
-    As a consequence of this addition to Octave the internal
-    representation of the double precision NA value has changed, and
-    so users that make use of data generated by Octave with R or
-    visa-versa are warned that compatibility might not be assured.
-
- ** Improved array indexing.
-
-    The underlying code used for indexing of arrays has been
-    completely rewritten and indexing is now significantly faster.
-
- ** Improved memory management.
-
-    Octave will now attempt to share data in some cases where previously
-    a copy would be made, such as certain array slicing operations or
-    conversions between cells, structs and cs-lists.  This usually reduces
-    both time and memory consumption.
-    Also, Octave will now attempt to detect and optimize usage of a vector
-    as a stack, when elements are being repeatedly inserted at/removed from
-    the end of the vector.
-
- ** Improved performance for reduction operations.
-
-    The performance of the sum, prod, sumsq, cumsum, cumprod, any, all,
-    max and min functions has been significantly improved.
-
- ** Sorting and searching.
-
-    The performance of sort has been improved, especially when sorting
-    indices are requested.  An efficient built-in issorted
-    implementation was added.  The sortrows function now uses a more
-    efficient algorithm, especially in the homogeneous case.  The lookup
-    function is now a built-in function performing a binary search,
-    optimized for long runs of close elements.  Lookup also works with
-    cell arrays of strings.
-
- ** Range arithmetics
-
-    For some operations on ranges, Octave will attempt to keep the
-    result as a range.  These include negation, adding a scalar,
-    subtracting a scalar, and multiplying by a scalar.  Ranges with zero
-    increment are allowed and can be constructed using the built-in
-    function `ones'.
-
- ** Various performance improvements.
-
-    Performance of a number of other built-in operations and functions
-    was improved, including:
-
-    * logical operations
-    * comparison operators
-    * element-wise power
-    * accumarray
-    * cellfun
-    * isnan
-    * isinf
-    * isfinite
-    * nchoosek
-    * repmat
-    * strcmp
-
- ** 64-bit integer arithmetic.
-
-    Arithmetic with 64-bit integers (int64 and uint64 types) is fully
-    supported, with saturation semantics like the other integer types.
-    Performance of most integer arithmetic operations has been
-    improved by using integer arithmetic directly.  Previously, Octave
-    performed integer math with saturation semantics by converting the
-    operands to double precision, performing the operation, and then
-    converting the result back to an integer value, truncating if
-    necessary.
-
- ** Diagonal and permutation matrices.
-
-    The interpreter can now treat diagonal and permutation matrices as
-    special objects that store only the non-zero elements, rather than
-    general full matrices.  Therefore, it is now possible to construct
-    and use these matrices in linear algebra without suffering a
-    performance penalty due to storing large numbers of zero elements.
-
- ** Improvements to fsolve.
-
-    The fsolve function now accepts an option structure argument (see
-    also the optimset function).  The INFO values returned from fsolve
-    have changed to be compatible with Matlab's fsolve function.
-    Additionally, fsolve is now able to solve overdetermined systems,
-    complex-differentiable complex systems, systems with a sparse
-    jacobian and can work in single precision if given single precision
-    inputs.  It can also be called recursively.
-
- ** Improvements to the norm function.
-
-    The norm function is now able to compute row or column norms of a
-    matrix in a single call, as well as general matrix p-norms.
-
- ** New functions for computing some eigenvalues or singular values.
-
-    The eigs and svds functions have been included in Octave.  These
-    functions require the ARPACK library (now distributed under a
-    GPL-compatible license).
-
- ** New QR and Cholesky factorization updating functions.
-
-      choldelete  cholshift   qrdelete  qrshift
-      cholinsert  cholupdate  qrinsert  qrupdate
-
- ** New quadrature functions.
-
-      dblquad  quadgk  quadv  triplequad
-
- ** New functions for reading and writing images.
-
-    The imwrite and imread functions have been included in Octave.
-    These functions require the GraphicsMagick library.  The new
-    function imfinfo provides information about an image file (size,
-    type, colors, etc.)
-
- ** The input_event_hook function has been replaced by the pair of
-    functions add_input_event_hook and remove_input_event_hook so that
-    more than one hook function may be installed at a time.
-
- ** Other miscellaneous new functions.
-
-      addtodate          hypot                       reallog
-      bicgstab           idivide                     realpow
-      cellslices         info                        realsqrt
-      cgs                interp1q                    rectint
-      command_line_path  isdebugmode                 regexptranslate
-      contrast           isfloat                     restoredefaultpath
-      convn              isstrprop                   roundb
-      cummin             log1p                       rundemos
-      cummax             lsqnonneg                   runlength
-      datetick           matlabroot                  saveobj
-      display            namelengthmax               spaugment
-      expm1              nargoutchk                  strchr
-      filemarker         pathdef                     strvcat
-      fstat              perl                        subspace
-      full               prctile                     symvar
-      fzero              quantile                    treelayout
-      genvarname         re_read_readline_init_file  validatestring
-      histc
-
- ** Changes to strcat.
-
-    The strcat function is now compatible with Matlab's strcat
-    function, which removes trailing whitespace when concatenating
-    character strings.  For example
-
-      strcat ('foo ', 'bar')
-      ==> 'foobar'
-
-    The new function cstrcat provides the previous behavior of
-    Octave's strcat.
-
- ** Improvements to the help functions.
-
-    The help system has been mostly re-implemented in .m files to make
-    it easier to modify.  Performance of the lookfor function has been
-    greatly improved by caching the help text from all functions that
-    are distributed with Octave.  The pkg function has been modified
-    to generate cache files for external packages when they are
-    installed.
-
- ** Deprecated functions.
-
-    The following functions were deprecated in Octave 3.0 and will be
-    removed from Octave 3.4 (or whatever version is the second major
-    release after 3.0):
-
-      beta_cdf         geometric_pdf       pascal_pdf
-      beta_inv         geometric_rnd       pascal_rnd
-      beta_pdf         hypergeometric_cdf  poisson_cdf
-      beta_rnd         hypergeometric_inv  poisson_inv
-      binomial_cdf     hypergeometric_pdf  poisson_pdf
-      binomial_inv     hypergeometric_rnd  poisson_rnd
-      binomial_pdf     intersection        polyinteg
-      binomial_rnd     is_bool             setstr
-      chisquare_cdf    is_complex          struct_contains
-      chisquare_inv    is_list             struct_elements
-      chisquare_pdf    is_matrix           t_cdf
-      chisquare_rnd    is_scalar           t_inv
-      clearplot        is_square           t_pdf
-      clg              is_stream           t_rnd
-      com2str          is_struct           uniform_cdf
-      exponential_cdf  is_symmetric        uniform_inv
-      exponential_inv  is_vector           uniform_pdf
-      exponential_pdf  isstr               uniform_rnd
-      exponential_rnd  lognormal_cdf       weibcdf
-      f_cdf            lognormal_inv       weibinv
-      f_inv            lognormal_pdf       weibpdf
-      f_pdf            lognormal_rnd       weibrnd
-      f_rnd            meshdom             weibull_cdf
-      gamma_cdf        normal_cdf          weibull_inv
-      gamma_inv        normal_inv          weibull_pdf
-      gamma_pdf        normal_pdf          weibull_rnd
-      gamma_rnd        normal_rnd          wiener_rnd
-      geometric_cdf    pascal_cdf
-      geometric_inv    pascal_inv
-
-    The following functions are now deprecated in Octave 3.2 and will
-    be removed from Octave 3.6 (or whatever version is the second major
-    release after 3.2):
-
-      create_set          spcholinv  spmax
-      dmult               spcumprod  spmin
-      iscommand           spcumsum   spprod
-      israwcommand        spdet      spqr
-      lchol               spdiag     spsum
-      loadimage           spfind     spsumsq
-      mark_as_command     spinv      str2mat
-      mark_as_rawcommand  spkron     unmark_command
-      spatan2             splchol    unmark_rawcommand
-      spchol              split
-      spchol2inv          splu
-
 See NEWS.3 for old news.
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 GNU Octave -- a high-level language for numerical computations.
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 Overview
 --------
@@ -49,9 +49,9 @@
 features of GNU Make that are not present in other versions of make.
 GNU Make is very portable and easy to install.
 
-See the notes in the files INSTALL and the system-specific README files
-in the etc directory of the Octave source distribution for more specific
-installation instructions.
+See the notes in the files INSTALL.OCTAVE and the system-specific README
+files in the etc directory of the Octave source distribution for more
+specific installation instructions.
 
 Bugs and Patches
 ----------------
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2009-2013 John W. Eaton
+# Copyright (C) 2009-2015 John W. Eaton
 # Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -50,10 +50,12 @@
   isatty
   largefile
   link
+  log
   log2
   log2-ieee
   log2f
   log2f-ieee
+  logf
   lstat
   malloc-gnu
   mbrtowc
@@ -66,8 +68,8 @@
   open
   opendir
   pathmax
+  progname
   putenv
-  progname
   readdir
   readlink
   realloc-gnu
@@ -91,6 +93,7 @@
   sys_stat
   sys_time
   sys_times
+  tempname
   time
   times
   tmpfile
@@ -99,6 +102,7 @@
   uname
   unistd
   unlink
+  unsetenv
   vasprintf
 "
 
@@ -188,19 +192,3 @@
   (cd libinterp/dldfcn; ./config-module.sh)
 }
 
-bootstrap_epilogue ()
-{
-  ## G77 is obsolete, but it is still the first option in the autoconf
-  ## Fortran macros.  We should avoid it, because mixing old versions of
-  ## g77 with modern gcc and g++ causes trouble.  The following will
-  ## make it harder (but not impossible) for users to make this mistake.
-  ##
-  ## FIXME -- we should really work to fix autoconf so that it prefers
-  ## gfortran over g77 even when searching for a Fortran 77 compiler.
-
-  echo "replacing all occurrences of g77 with gfortran in configure script..."
-
-  sed 's/g77/gfortran/g' configure > configure.t
-  mv configure.t configure
-  chmod 755 configure
-}
--- a/build-aux/common.mk
+++ b/build-aux/common.mk
@@ -91,7 +91,6 @@
 
 # Fortran compiler flags.
 
-FC = @FC@
 F77 = @F77@
 AM_FFLAGS = @FFLAGS@
 FPICFLAG = @FPICFLAG@
@@ -108,14 +107,11 @@
 # C compiler flags.
 
 CC = @CC@
-## FIXME: CC_VERSION is deprecated and should be removed in version 3.12
-CC_VERSION = @CC_VERSION@
 GCC_VERSION = @GCC_VERSION@
 CPICFLAG = @CPICFLAG@
 XTRA_CFLAGS = @XTRA_CFLAGS@
 WARN_CFLAGS = @WARN_CFLAGS@
 AM_CFLAGS = $(XTRA_CFLAGS)
-ALL_CPPFLAGS = $(CPPFLAGS) $(HDF5_CPPFLAGS) $(Z_CPPFLAGS) $(LLVM_CPPFLAGS)
 
 BUILD_CC = @BUILD_CC@
 BUILD_CFLAGS = @BUILD_CFLAGS@
@@ -132,8 +128,6 @@
 # C++ compiler flags.
 
 CXX = @CXX@
-## FIXME: CXX_VERSION is deprecated and should be removed in version 3.12
-CXX_VERSION = @CXX_VERSION@
 GXX_VERSION = @GXX_VERSION@
 CXXCPP = @CXXCPP@
 CXXPICFLAG = @CXXPICFLAG@
@@ -231,6 +225,10 @@
 FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS)
 FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS)
 
+FLTK_CPPFLAGS = @FLTK_CPPFLAGS@
+FLTK_LDFLAGS = @FLTK_LDFLAGS@
+FLTK_LIBS = @FLTK_LIBS@
+
 ## Alias CPPFLAGS to CFLAGS.
 ## This is closer to the true meaning of `pkg-config --cflags` output.
 FONTCONFIG_CPPFLAGS = @FONTCONFIG_CFLAGS@
@@ -245,9 +243,6 @@
 GLPK_LDFLAGS = @GLPK_LDFLAGS@
 GLPK_LIBS = @GLPK_LIBS@
 
-GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@
-GRAPHICS_LIBS = @GRAPHICS_LIBS@
-
 GL2PS_LIBS = @GL2PS_LIBS@
 
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
@@ -269,6 +264,10 @@
 
 OPENGL_LIBS = @OPENGL_LIBS@
 
+OSMESA_CPPFLAGS = @OSMESA_CPPFLAGS@
+OSMESA_LDFLAGS = @OSMESA_LDFLAGS@
+OSMESA_LIBS = @OSMESA_LIBS@
+
 PCRE_CPPFLAGS = @PCRE_CPPFLAGS@
 PCRE_LIBS = @PCRE_LIBS@
 
@@ -319,11 +318,6 @@
 USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@
 OCTAVE_IDX_TYPE = @OCTAVE_IDX_TYPE@
 
-TEXINFO_COLAMD = @TEXINFO_COLAMD@
-TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@
-TEXINFO_UMFPACK = @TEXINFO_UMFPACK@
-TEXINFO_QHULL = @TEXINFO_QHULL@
-
 # The arguments passed to configure.
 config_opts = @config_opts@
 
@@ -449,6 +443,9 @@
 localapioctfiledir = @localapioctfiledir@
 localveroctfiledir = @localveroctfiledir@
 
+# Where Octave will search for example data files shipped with distribution.
+octdatadir = @octdatadir@
+
 # Where Octave will search to find image files.
 imagedir = @imagedir@
 
@@ -475,278 +472,486 @@
 # GNU make.  If you don't have it, get it!
 
 define simple_move_if_change_rule
-if [ -s $@-t ]; then \
-  $(top_srcdir)/build-aux/move-if-change $@-t $@; \
-else \
-  echo "$@-t is empty!" 1>&2; \
-  rm -f $@-t; \
-  exit 1; \
-fi
+  if [ -s $@-t ]; then \
+    $(top_srcdir)/build-aux/move-if-change $@-t $@; \
+  else \
+    echo "$@-t is empty!" 1>&2; \
+    rm -f $@-t; \
+    exit 1; \
+  fi
 endef
 
 define cp_update_rule
-if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/$@ ] && [ ! -f $@ ]; then \
-  cp $(srcdir)/$@ $@; \
-  touch -r $(srcdir)/$@ $@; \
-fi
+  if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/$@ ] && [ ! -f $@ ]; then \
+    cp $(srcdir)/$@ $@; \
+    touch -r $(srcdir)/$@ $@; \
+  fi
 endef
 
 ## To avoid shell command line limits, break the replacement patterns
 ## into two roughly equal sized parts.
 
 define do_subst_config_vals
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
-  -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \
-  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_CPPFLAGS%|\"${AMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_LDFLAGS%|\"${AMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \
-  -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_LIBS%|\"${CAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
-  -e "s|%OCTAVE_CONF_CARBON_LIBS%|\"${CARBON_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \
-  -e "s|%OCTAVE_CONF_CC_VERSION%|\"${CC_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_CPPFLAGS%|\"${CCOLAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_LDFLAGS%|\"${CCOLAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_LIBS%|\"${CCOLAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_CPPFLAGS%|\"${CHOLMOD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_LDFLAGS%|\"${CHOLMOD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_LIBS%|\"${CHOLMOD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_CPPFLAGS%|\"${COLAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_LDFLAGS%|\"${COLAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_LIBS%|\"${COLAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \
-  -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_CPPFLAGS%|\"${CURL_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_LDFLAGS%|\"${CURL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_CPPFLAGS%|\"${CXSPARSE_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_LDFLAGS%|\"${CXSPARSE_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_LIBS%|\"${CXSPARSE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \
-  -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \
-  -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \
-  -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
-  -e "s|%OCTAVE_CONF_DEFS%|\"${DEFS}\"|" \
-  -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \
-  -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
-  -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \
-  -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
-  -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
-  -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_F77_INTEGER_8_FLAG%|\"${F77_INTEGER_8_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_FC%|\"${FC}\"|" \
-  -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_CPPFLAGS%|\"${FFTW3_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_LDFLAGS%|\"${FFTW3_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_LIBS%|\"${FFTW3_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3F_CPPFLAGS%|\"${FFTW3F_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3F_LDFLAGS%|\"${FFTW3F_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3F_LIBS%|\"${FFTW3F_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \
-  -e "s|%OCTAVE_CONF_FONTCONFIG_CFLAGS%|\"${FONTCONFIG_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \
-  -e "s|%OCTAVE_CONF_FT2_CFLAGS%|\"${FT2_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FT2_LIBS%|\"${FT2_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_GLPK_CPPFLAGS%|\"${GLPK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_GLPK_LDFLAGS%|\"${GLPK_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_GNUPLOT%|\"${GNUPLOT}\"|" \
-  -e "s|%OCTAVE_CONF_GRAPHICS_CFLAGS%|\"${GRAPHICS_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_GRAPHICS_LIBS%|\"${GRAPHICS_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" | \
-  $(SED) -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_HDF5_LIBS%|\"${HDF5_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \
-  -e "s|%OCTAVE_CONF_LAPACK_LIBS%|\"${LAPACK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \
-  -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \
-  -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \
-  -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
-  -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
-  -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
-  -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
-  -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \
-  -e "s|%OCTAVE_CONF_MAGICK_CPPFLAGS%|\"${MAGICK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_MAGICK_LDFLAGS%|\"${MAGICK_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_MAGICK_LIBS%|\"${MAGICK_LIBS}\"|" \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_AR%|\"${MKOCTFILE_AR}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_CC%|\"${MKOCTFILE_CC}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_CXX%|\"${MKOCTFILE_CXX}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LD%|\"${MKOCTFILE_DL_LD}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"${MKOCTFILE_DL_LDFLAGS}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_F77%|\"${MKOCTFILE_F77}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_LD_CXX%|\"${MKOCTFILE_LD_CXX}\"|' \
-  -e 's|%OCTAVE_CONF_MKOCTFILE_RANLIB%|\"${MKOCTFILE_RANLIB}\"|' \
-  -e "s|%OCTAVE_CONF_OCTAVE_LINK_DEPS%|\"${OCTAVE_LINK_DEPS}\"|" \
-  -e "s|%OCTAVE_CONF_OCTAVE_LINK_OPTS%|\"${OCTAVE_LINK_OPTS}\"|" \
-  -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
-  -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \
-  -e "s|%OCTAVE_CONF_OCT_LINK_DEPS%|\"${OCT_LINK_DEPS}\"|" \
-  -e "s|%OCTAVE_CONF_OCT_LINK_OPTS%|\"${OCT_LINK_OPTS}\"|" \
-  -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_PCRE_CPPFLAGS%|\"${PCRE_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_PCRE_LIBS%|\"${PCRE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \
-  -e "s|%OCTAVE_CONF_PTHREAD_CFLAGS%|\"${PTHREAD_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_PTHREAD_LIBS%|\"${PTHREAD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_QT_CPPFLAGS%|\"${QT_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QT_LDFLAGS%|\"${QT_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QT_LIBS%|\"${QT_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \
-  -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \
-  -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \
-  -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \
-  -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \
-  -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \
-  -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_UMFPACK_CPPFLAGS%|\"${UMFPACK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_UMFPACK_LDFLAGS%|\"${UMFPACK_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \
-  -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \
-  -e "s|%OCTAVE_CONF_WARN_CFLAGS%|\"${WARN_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_WARN_CXXFLAGS%|\"${WARN_CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \
-  -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_CPPFLAGS%|\"${Z_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_LDFLAGS%|\"${Z_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_LIBS%|\"${Z_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" > $@-t
-$(simple_move_if_change_rule)
+  $(SED) < $< \
+    -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
+    -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \
+    -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_CPPFLAGS%|\"${AMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_LDFLAGS%|\"${AMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \
+    -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_LIBS%|\"${CAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
+    -e "s|%OCTAVE_CONF_CARBON_LIBS%|\"${CARBON_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_CPPFLAGS%|\"${CCOLAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_LDFLAGS%|\"${CCOLAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_LIBS%|\"${CCOLAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_CPPFLAGS%|\"${CHOLMOD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_LDFLAGS%|\"${CHOLMOD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_LIBS%|\"${CHOLMOD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_CPPFLAGS%|\"${COLAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_LDFLAGS%|\"${COLAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_LIBS%|\"${COLAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_CPPFLAGS%|\"${CURL_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_LDFLAGS%|\"${CURL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_CPPFLAGS%|\"${CXSPARSE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_LDFLAGS%|\"${CXSPARSE_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_LIBS%|\"${CXSPARSE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \
+    -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \
+    -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
+    -e "s|%OCTAVE_CONF_DEFS%|\"${DEFS}\"|" \
+    -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \
+    -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
+    -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
+    -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_F77_INTEGER_8_FLAG%|\"${F77_INTEGER_8_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_CPPFLAGS%|\"${FFTW3_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_LDFLAGS%|\"${FFTW3_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_LIBS%|\"${FFTW3_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_CPPFLAGS%|\"${FFTW3F_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_LDFLAGS%|\"${FFTW3F_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_LIBS%|\"${FFTW3F_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_CPPFLAGS%|\"${FLTK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_LDFLAGS%|\"${FLTK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_LIBS%|\"${FLTK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FONTCONFIG_CPPFLAGS%|\"${FONTCONFIG_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FONTCONFIG_LIBS%|\"${FONTCONFIG_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_FT2_CPPFLAGS%|\"${FT2_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FT2_LIBS%|\"${FT2_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_CPPFLAGS%|\"${GLPK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_LDFLAGS%|\"${GLPK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_GNUPLOT%|\"${GNUPLOT}\"|" \
+    -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" | \
+    $(SED) -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_HDF5_LIBS%|\"${HDF5_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \
+    -e "s|%OCTAVE_CONF_LAPACK_LIBS%|\"${LAPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \
+    -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \
+    -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \
+    -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
+    -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
+    -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
+    -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
+    -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_CPPFLAGS%|\"${MAGICK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_LDFLAGS%|\"${MAGICK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_LIBS%|\"${MAGICK_LIBS}\"|" \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_AR%|\"${MKOCTFILE_AR}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_CC%|\"${MKOCTFILE_CC}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_CXX%|\"${MKOCTFILE_CXX}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LD%|\"${MKOCTFILE_DL_LD}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"${MKOCTFILE_DL_LDFLAGS}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_F77%|\"${MKOCTFILE_F77}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_LD_CXX%|\"${MKOCTFILE_LD_CXX}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_RANLIB%|\"${MKOCTFILE_RANLIB}\"|' \
+    -e "s|%OCTAVE_CONF_OCTAVE_LINK_DEPS%|\"${OCTAVE_LINK_DEPS}\"|" \
+    -e "s|%OCTAVE_CONF_OCTAVE_LINK_OPTS%|\"${OCTAVE_LINK_OPTS}\"|" \
+    -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
+    -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \
+    -e "s|%OCTAVE_CONF_OCT_LINK_DEPS%|\"${OCT_LINK_DEPS}\"|" \
+    -e "s|%OCTAVE_CONF_OCT_LINK_OPTS%|\"${OCT_LINK_OPTS}\"|" \
+    -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_CPPFLAGS%|\"${OSMESA_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_LDFLAGS%|\"${OSMESA_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_LIBS%|\"${OSMESA_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_PCRE_CPPFLAGS%|\"${PCRE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_PCRE_LIBS%|\"${PCRE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \
+    -e "s|%OCTAVE_CONF_PTHREAD_CFLAGS%|\"${PTHREAD_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_PTHREAD_LIBS%|\"${PTHREAD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_CPPFLAGS%|\"${QT_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_LDFLAGS%|\"${QT_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_LIBS%|\"${QT_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \
+    -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \
+    -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \
+    -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \
+    -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \
+    -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \
+    -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_CPPFLAGS%|\"${UMFPACK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_LDFLAGS%|\"${UMFPACK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \
+    -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \
+    -e "s|%OCTAVE_CONF_WARN_CFLAGS%|\"${WARN_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_WARN_CXXFLAGS%|\"${WARN_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \
+    -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_CPPFLAGS%|\"${Z_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_LDFLAGS%|\"${Z_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_LIBS%|\"${Z_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" > $@-t && \
+  $(simple_move_if_change_rule)
 endef
 
+define do_subst_cross_config_vals
+  $(SED) < $< \
+    -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
+    -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \
+    -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_CPPFLAGS%|\"${AMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_LDFLAGS%|\"${AMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \
+    -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CAMD_LIBS%|\"${CAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
+    -e "s|%OCTAVE_CONF_CARBON_LIBS%|\"${CARBON_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_CPPFLAGS%|\"${CCOLAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_LDFLAGS%|\"${CCOLAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CCOLAMD_LIBS%|\"${CCOLAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_CPPFLAGS%|\"${CHOLMOD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_LDFLAGS%|\"${CHOLMOD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CHOLMOD_LIBS%|\"${CHOLMOD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_CPPFLAGS%|\"${COLAMD_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_LDFLAGS%|\"${COLAMD_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_COLAMD_LIBS%|\"${COLAMD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_CPPFLAGS%|\"${CURL_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_LDFLAGS%|\"${CURL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_CPPFLAGS%|\"${CXSPARSE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_LDFLAGS%|\"${CXSPARSE_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXSPARSE_LIBS%|\"${CXSPARSE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \
+    -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \
+    -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
+    -e "s|%OCTAVE_CONF_DEFS%|\"${DEFS}\"|" \
+    -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \
+    -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
+    -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \
+    -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
+    -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_F77_INTEGER_8_FLAG%|\"${F77_INTEGER_8_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_CPPFLAGS%|\"${FFTW3_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_LDFLAGS%|\"${FFTW3_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3_LIBS%|\"${FFTW3_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_CPPFLAGS%|\"${FFTW3F_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_LDFLAGS%|\"${FFTW3F_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FFTW3F_LIBS%|\"${FFTW3F_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_CPPFLAGS%|\"${FLTK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_LDFLAGS%|\"${FLTK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FLTK_LIBS%|\"${FLTK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FONTCONFIG_CPPFLAGS%|\"${FONTCONFIG_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FONTCONFIG_LIBS%|\"${FONTCONFIG_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \
+    -e "s|%OCTAVE_CONF_FT2_CPPFLAGS%|\"${FT2_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_FT2_LIBS%|\"${FT2_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_CPPFLAGS%|\"${GLPK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_LDFLAGS%|\"${GLPK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_GNUPLOT%|\"${GNUPLOT}\"|" \
+    -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" | \
+    $(SED) -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_HDF5_LIBS%|\"${HDF5_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \
+    -e "s|%OCTAVE_CONF_LAPACK_LIBS%|\"${LAPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \
+    -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \
+    -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \
+    -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
+    -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
+    -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
+    -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
+    -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_CPPFLAGS%|\"${MAGICK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_LDFLAGS%|\"${MAGICK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_MAGICK_LIBS%|\"${MAGICK_LIBS}\"|" \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_AR%|\"${AR}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_CC%|\"${CC}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_CXX%|\"${CXX}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LD%|\"${DL_LD}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_F77%|\"${F77}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_LD_CXX%|\"${LD_CXX}\"|' \
+    -e 's|%OCTAVE_CONF_MKOCTFILE_RANLIB%|\"${RANLIB}\"|' \
+    -e "s|%OCTAVE_CONF_OCTAVE_LINK_DEPS%|\"${OCTAVE_LINK_DEPS}\"|" \
+    -e "s|%OCTAVE_CONF_OCTAVE_LINK_OPTS%|\"${OCTAVE_LINK_OPTS}\"|" \
+    -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
+    -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \
+    -e "s|%OCTAVE_CONF_OCT_LINK_DEPS%|\"${OCT_LINK_DEPS}\"|" \
+    -e "s|%OCTAVE_CONF_OCT_LINK_OPTS%|\"${OCT_LINK_OPTS}\"|" \
+    -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_CPPFLAGS%|\"${OSMESA_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_LDFLAGS%|\"${OSMESA_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_OSMESA_LIBS%|\"${OSMESA_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_PCRE_CPPFLAGS%|\"${PCRE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_PCRE_LIBS%|\"${PCRE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \
+    -e "s|%OCTAVE_CONF_PTHREAD_CFLAGS%|\"${PTHREAD_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_PTHREAD_LIBS%|\"${PTHREAD_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \
+    -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_CPPFLAGS%|\"${QT_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_LDFLAGS%|\"${QT_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_QT_LIBS%|\"${QT_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \
+    -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
+    -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \
+    -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \
+    -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \
+    -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \
+    -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \
+    -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_CPPFLAGS%|\"${UMFPACK_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_LDFLAGS%|\"${UMFPACK_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \
+    -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \
+    -e "s|%OCTAVE_CONF_WARN_CFLAGS%|\"${WARN_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_WARN_CXXFLAGS%|\"${WARN_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \
+    -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_CPPFLAGS%|\"${Z_CPPFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_LDFLAGS%|\"${Z_LDFLAGS}\"|" \
+    -e "s|%OCTAVE_CONF_Z_LIBS%|\"${Z_LIBS}\"|" \
+    -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" > $@-t && \
+  $(simple_move_if_change_rule)
+endef
+
+
 define do_subst_default_vals
-echo "making $@ from $<"
-$(SED) < $< > $@-t \
-  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
-  -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \
-  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
-  -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
-  -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \
-  -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \
-  -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
-  -e "s|%OCTAVE_DOC_CACHE_FILE%|\"${doc_cache_file}\"|" \
-  -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \
-  -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \
-  -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \
-  -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \
-  -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \
-  -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \
-  -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \
-  -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \
-  -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \
-  -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \
-  -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \
-  -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \
-  -e "s|%OCTAVE_OCTETCDIR%|\"${octetcdir}\"|" \
-  -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
-  -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \
-  -e "s|%OCTAVE_OCTLOCALEDIR%|\"${octlocaledir}\"|" \
-  -e "s|%OCTAVE_OCTTESTSDIR%|\"${octtestsdir}\"|" \
-  -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \
-  -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \
-  -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \
-  -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \
-  -e "s|%OCTAVE_TEXI_MACROS_FILE%|\"${texi_macros_file}\"|" \
-  -e "s|%OCTAVE_VERSION%|\"${version}\"|"
-$(simple_move_if_change_rule)
+  $(SED) < $< > $@-t \
+    -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
+    -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \
+    -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
+    -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
+    -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \
+    -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \
+    -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
+    -e "s|%OCTAVE_DOC_CACHE_FILE%|\"${doc_cache_file}\"|" \
+    -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \
+    -e "s|%OCTAVE_EXEEXT%|\"${EXEEXT}\"|" \
+    -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \
+    -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \
+    -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \
+    -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \
+    -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \
+    -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \
+    -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \
+    -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \
+    -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \
+    -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \
+    -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \
+    -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \
+    -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \
+    -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \
+    -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \
+    -e "s|%OCTAVE_OCTDATADIR%|\"${octdatadir}\"|" \
+    -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \
+    -e "s|%OCTAVE_OCTETCDIR%|\"${octetcdir}\"|" \
+    -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
+    -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \
+    -e "s|%OCTAVE_OCTLOCALEDIR%|\"${octlocaledir}\"|" \
+    -e "s|%OCTAVE_OCTTESTSDIR%|\"${octtestsdir}\"|" \
+    -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \
+    -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \
+    -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \
+    -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \
+    -e "s|%OCTAVE_SHLEXT%|\"${SHLEXT}\"|" \
+    -e "s|%OCTAVE_TEXI_MACROS_FILE%|\"${texi_macros_file}\"|" \
+    -e "s|%OCTAVE_VERSION%|\"${version}\"|" && \
+  $(simple_move_if_change_rule)
 endef
 
 define do_subst_script_vals
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%AWK%|${AWK}|g" \
-  -e "s|%FIND%|${FIND}|g" \
-  -e "s|%SED%|${SED}|g" \
-  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
-  -e "s|%builddir%|$(shell pwd)|" > $@-t
-$(simple_move_if_change_rule)
+  $(SED) < $< \
+    -e "s|%AWK%|${AWK}|g" \
+    -e "s|%FIND%|${FIND}|g" \
+    -e "s|%SED%|${SED}|g" \
+    -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
+    -e "s|%builddir%|$(shell pwd)|" > $@-t && \
+  $(simple_move_if_change_rule)
 endef
 
 define do_subst_qt_settings
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%DEFAULT_TERMINAL_FONT%|${DEFAULT_TERMINAL_FONT}|" \
-  -e "s|%DEFAULT_TERMINAL_FONT_SIZE%|${DEFAULT_TERMINAL_FONT_SIZE}|" > $@-t
-$(simple_move_if_change_rule)
+  $(SED) < $< \
+    -e "s|%DEFAULT_TERMINAL_FONT%|${DEFAULT_TERMINAL_FONT}|" \
+    -e "s|%DEFAULT_TERMINAL_FONT_SIZE%|${DEFAULT_TERMINAL_FONT_SIZE}|" > $@-t && \
+  $(simple_move_if_change_rule)
+endef
+
+define subst-bison-api-decls
+  case "$(BISON_API_PREFIX_DECL_STYLE)" in \
+    *api*) \
+      case "$(BISON_API_PREFIX_DECL_STYLE)" in \
+       *brace*) \
+         api_prefix_decl='%define api.prefix {$(1)}'; ;; \
+       *) \
+         api_prefix_decl='%define api.prefix "$(1)"'; ;; \
+       esac; \
+      ;; \
+    *name*) \
+      case "$(BISON_API_PREFIX_DECL_STYLE)" in \
+        *brace*) \
+          api_prefix_decl='%name-prefix {$(1)}'; ;; \
+        *) \
+          api_prefix_decl='%name-prefix="$(1)"'; ;; \
+      esac; \
+    ;; \
+  esac; \
+  case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
+    *quote*) quote='"' ;; \
+    *) quote="" ;; \
+  esac; \
+  case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
+    *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \
+    *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \
+  esac; \
+  $(SED) -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \
+         -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t && \
+  mv $@-t $@
+endef
+
+define gdbinit_install_rule
+  if [ -f .gdbinit ]; then \
+    echo "refusing to overwrite .gdbinit with newer version from $<" 1>&2; \
+  else \
+    echo "Installing .gdbinit from version at $<" ; \
+    cp $< $@; \
+  fi
 endef
 
 define test-file-commands
-( echo "## DO NOT EDIT!  Generated automatically from $(<F) by Make."; $(GREP) '^%!' $< ) > $@-t
-mv $@-t $@
-endef
-
-define gdbinit_install_rule
-if [ -f .gdbinit ]; then \
-  echo "refusing to overwrite .gdbinit with newer version from $<" 1>&2; \
-else \
-  echo "Installing .gdbinit from version at $<" ; \
-  cp $< $@; \
-fi
+  rm -f $@-t $@ && \
+  ( echo "## DO NOT EDIT!  Generated automatically from $(<F) by Make."; \
+    $(GREP) '^%!' $< \
+  ) > $@-t && \
+  mv $@-t $@
 endef
 
 %.cc-tst : %.cc
-	$(test-file-commands)
+	$(AM_V_GEN)$(test-file-commands)
 
 %.yy-tst : %.yy
-	$(test-file-commands)
+	$(AM_V_GEN)$(test-file-commands)
 
 %.ll-tst : %.ll
-	$(test-file-commands)
+	$(AM_V_GEN)$(test-file-commands)
--- a/build-aux/mk-opts.pl
+++ b/build-aux/mk-opts.pl
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 #
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl Copyright (C) 1993-2014 John W. Eaton
+dnl Copyright (C) 1993-2015 John W. Eaton
 ###
 ### This file is part of Octave.
 ###
@@ -18,22 +18,22 @@
 ### along with Octave; see the file COPYING.  If not, see
 ### <http://www.gnu.org/licenses/>.
 
-AC_PREREQ([2.62])
-AC_INIT([GNU Octave], [3.8.2], [http://octave.org/bugs.html], [octave])
+AC_PREREQ([2.63])
+AC_INIT([GNU Octave], [4.0.0-rc3], [http://octave.org/bugs.html], [octave])
 
 dnl Note that the version number is duplicated here and in AC_INIT
 dnl because AC_INIT requires it to be static, not computed from
 dnl shell variables.
-OCTAVE_MAJOR_VERSION=3
-OCTAVE_MINOR_VERSION=8
-OCTAVE_PATCH_VERSION=2
+OCTAVE_MAJOR_VERSION=4
+OCTAVE_MINOR_VERSION=0
+OCTAVE_PATCH_VERSION=0-rc3
 
 dnl PACKAGE_VERSION is set by the AC_INIT VERSION arg
 OCTAVE_VERSION="$PACKAGE_VERSION"
 
-OCTAVE_COPYRIGHT="Copyright (C) 2014 John W. Eaton and others."
-
-OCTAVE_RELEASE_DATE="2014-08-06"
+OCTAVE_COPYRIGHT="Copyright (C) 2015 John W. Eaton and others."
+
+OCTAVE_RELEASE_DATE="2015-03-20"
 
 ## The "API version" is used as a way of checking that interfaces in the
 ## liboctave and libinterp libraries haven't changed in a backwardly
@@ -47,7 +47,7 @@
 ## libinterp, perhaps we should be computing the "api version" from
 ## those versions numbers in some way instead of setting it
 ## independently here.
-OCTAVE_API_VERSION="api-v49+"
+OCTAVE_API_VERSION="api-v50+"
 
 AC_SUBST(OCTAVE_MAJOR_VERSION)
 AC_SUBST(OCTAVE_MINOR_VERSION)
@@ -67,9 +67,10 @@
 
 AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability -Wno-override tar-ustar subdir-objects])
 
-## Add the option to enable silent rules, available since Automake 1.11
-## and included by default starting with Automake 1.13.
-AM_SILENT_RULES
+## Add the option to enable silent rules and make silent rules the
+## default behavior.  Available since Automake 1.11 and included by
+## default starting with Automake 1.13.
+AM_SILENT_RULES([yes])
 
 OCTAVE_CANONICAL_HOST
 
@@ -113,6 +114,7 @@
 OCTAVE_SET_DEFAULT([octtestsdir], '$(octetcdir)/tests')
 OCTAVE_SET_DEFAULT([texi_macros_file], '$(octetcdir)/macros.texi')
 OCTAVE_SET_DEFAULT([imagedir], '$(datadir)/octave/$(version)/imagelib')
+OCTAVE_SET_DEFAULT([octdatadir], '$(datadir)/octave/$(version)/data')
 OCTAVE_SET_DEFAULT([man1dir], '$(mandir)/man1')
 OCTAVE_SET_DEFAULT([man1ext], '.1')
 OCTAVE_SET_DEFAULT([infofile], '$(infodir)/octave.info')
@@ -158,6 +160,12 @@
 OCTAVE_PROG_PAGER
 OCTAVE_PROG_PYTHON
 
+## Programs used to generate icons file formats.
+OCTAVE_PROG_ICOTOOL
+OCTAVE_PROG_RSVG_CONVERT
+AM_CONDITIONAL([AMCOND_HAVE_ICON_TOOLS],
+  [test -n "$ICOTOOL" && test -n "$RSVG_CONVERT"])
+
 ### Default terminal font for the GUI
 case $host_os in
   mingw* | msdosmsvc)
@@ -231,28 +239,15 @@
   AC_DEFINE(BOUNDS_CHECKING, 1, [Define to 1 to use internal bounds checking.])
 fi
 
-### Use Octave's built-in memory allocator rather than straightforward malloc.
-### Disabled by default.
-
-USE_OCTAVE_ALLOCATOR=no
-AC_ARG_ENABLE([octave-allocator],
-  [AS_HELP_STRING([--enable-octave-allocator],
-    [use the obsolete octave_allocator class for many of Octave's objects (mostly octave_value types).  You probably do NOT want to enable this feature.])],
-  [if test "$enableval" = yes; then USE_OCTAVE_ALLOCATOR=yes; fi], [])
-if test $USE_OCTAVE_ALLOCATOR = yes; then
-  AC_DEFINE(USE_OCTAVE_ALLOCATOR, 1,
-    [Define to 1 to use octave_allocator class.])
-fi
-
 ### Use atomic operations for internal reference counting.  This is required
-### for thread-safe behavior but incurs a significant slowdown, and is thus
-### disabled by default.
-
-USE_ATOMIC_REFCOUNT=no
+### for thread-safe behavior (Qt Handles) but incurs a significant slowdown.
+### Enabled by default until a higher performing solution can be found.
+
+USE_ATOMIC_REFCOUNT=yes
 AC_ARG_ENABLE([atomic-refcount],
-  [AS_HELP_STRING([--enable-atomic-refcount],
-    [use atomic operations for internal reference counting.  This is required for thread-safe behavior but does not by itself make Octave internals thread safe.])],
-  [if test "$enableval" = yes; then USE_ATOMIC_REFCOUNT=yes; fi], [])
+  [AS_HELP_STRING([--disable-atomic-refcount],
+    [Do not use atomic operations for internal reference counting.  This option is required for thread-safe behavior as used in the GUI's Qt plotting toolkit.  Performance for CLI-only builds is improved by disabling this feature.])],
+  [if test "$enableval" = no; then USE_ATOMIC_REFCOUNT=no; fi], [])
 if test $USE_ATOMIC_REFCOUNT = yes; then
   AC_DEFINE(USE_ATOMIC_REFCOUNT, 1,
     [Define to 1 to use atomic operations for reference counting.])
@@ -315,30 +310,21 @@
 AC_PROG_CXX
 AC_PROG_CXXCPP
 
-### Check version number when using g++.
-
-GXX_VERSION=
-if test "$GXX" = yes; then
-  gxx_version=`$CXX -v 2>&1 | $GREP "^.*g.. version" | \
-    $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'`
-
-  AX_COMPARE_VERSION([$gxx_version], [lt], [3.5],
-    [AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave])])
-
-  GXX_VERSION=$gxx_version
-fi
-AC_SUBST(GXX_VERSION)
-
-## FIXME: CXX_VERSION is deprecated and should be removed in Octave version 3.12
-CXX_VERSION=$gxx_version
-AC_SUBST(CXX_VERSION)
-
 ### Determine which C compiler to use (we expect to find gcc).
 
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_GCC_TRADITIONAL
 
+## Save and restore CFLAGS and CXXFLAGS globally.  These variables
+## are for users, so we shouldn't be touching them.  Instead, we should
+## set the corresponding AM_ flags (currently by way of the XTRA_ variables).
+## However, for the duration of the configure script, we may set CFLAGS
+## and CXXFLAGS so that subsequent tests succeed.  Temporary settings
+## like this are currently done for pthreads and openmp, for example.
+original_octave_configure_CFLAGS="$CFLAGS"
+original_octave_configure_CXXFLAGS="$CXXFLAGS"
+
 ## Check for MSVC
 have_msvc=no
 case $host_os in
@@ -379,12 +365,8 @@
 fi
 AC_SUBST(GCC_VERSION)
 
-## FIXME: CC_VERSION is deprecated and should be removed in Octave version 3.12
-CC_VERSION=$GCC_VERSION
-AC_SUBST(CC_VERSION)
-
-### Also check g++ version number, it might be different from the
-## gcc version number.
+### Check version number when using g++ .
+### It might be different from the gcc version number.
 
 GXX_VERSION=
 if test "$GXX" = yes; then
@@ -392,7 +374,7 @@
   gxx_version=`$CXX -v 2>&1 | $GREP "^.*g.. version" | \
     $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'`
 
-  AX_COMPARE_VERSION([$gxx_version], [lt], [3],
+  AX_COMPARE_VERSION([$gxx_version], [lt], [4.1],
     [warn_gxx_version="g++ version $gxx_version is likely to cause problems"
      OCTAVE_CONFIGURE_WARNING([warn_gxx_version])])
 
@@ -444,43 +426,58 @@
 ## Include pthread libs and flags early in case other tests need them.
 ## They seem to be required for the OpenGL tests on Debian systems.
 LIBS="$PTHREAD_LIBS $LIBS"
+XTRA_CFLAGS="$XTRA_CFLAGS $PTHREAD_CFLAGS"
+XTRA_CXXFLAGS="$XTRA_CXXFLAGS $PTHREAD_CFLAGS"
+## Set these for any other tests that may require them.  They will be
+## reset before output files are generated.
 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
 
+### Test whether the compiler supports OpenMP.  This is enabled by default
+### now to allow the option of using OpenMP in loadable modules.
+
+USE_OPENMP=no
+check_for_openmp=yes
+AC_ARG_ENABLE([openmp],
+  [AS_HELP_STRING([--disable-openmp],
+    [disable OpenMP SMP multi-threading])],
+  [if test "$enableval" = no; then check_for_openmp=no; fi], [])
+if test $check_for_openmp = yes; then
+  AC_LANG_PUSH(C)
+  AX_OPENMP([XTRA_CFLAGS="$XTRA_CFLAGS $OPENMP_CFLAGS"; USE_OPENMP=yes], [])
+  AC_LANG_POP(C)
+  AC_LANG_PUSH(C++)
+  AX_OPENMP([XTRA_CXXFLAGS="$XTRA_CXXFLAGS $OPENMP_CXXFLAGS"; USE_OPENMP=yes], [])
+  AC_LANG_POP(C++)
+fi
+dnl Define here since it is skipped if the first argument to
+dnl AX_OPENMP is not empty.
+if test $USE_OPENMP = yes; then
+  AC_DEFINE(HAVE_OPENMP, 1, [Define if OpenMP is enabled])
+fi
+## Set these for any other tests that may require them.  They will be
+## reset before output files are generated.
+CFLAGS="$CFLAGS $OPENMP_CFLAGS"
+CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+
 ### When compiling math for x87, problems may arise in some code comparing
 ### floating-point intermediate results.  The root cause is the extra precision
 ### (~80 bits) of x87 co-processor registers versus the IEEE standard 64 bits.
 ### Generally, storing the result in a local volatile variable forces a
 ### truncation back to 64 bits, but it also degrades performance.
-### Thus, we provide a FLOAT_TRUNCATE macro that may be defined to "volatile"
-### when compiling for x87 target, or left empty for modern SSE math, that
-### doesn't suffer from this problem at all.
-### FIXME: If no option value is given, configure uses a default heuristic
-###        which assumes that truncation should occur for MinGW and Cygwin
-###        systems and not for any others.  It would be marginally nicer
-###        to replace this with a test that checks whether the problem arises
-###        and only sets the flag if necessary.  However, the principal
-###        scenario for those two systems is a cross-build where we can't
-###        run an executable so the test wouldn't be too useful most of the
-###        time (only native builds on MinGW and Cygwin *might* benefit).
-###        Maybe, one could generate assembly code with -S option and inspect
-###        it without having to run an executable, but this sounds pretty dicey.
+### However, this performance degradation is very minimal, if indeed measurable.
+### Therefore, it has been enabled for all platforms and compilers.
+### Reported bugs indicate that --enable-float-truncate is required for MinGW
+### and Cygwin platforms and for GCC compilers >= 5.0.  It should not be
+### necessary for non-x87 targets or when using modern SSE math.
+ac_float_truncate=volatile
 AC_ARG_ENABLE([float-truncate],
-  [AS_HELP_STRING([--enable-float-truncate],
+  [AS_HELP_STRING([--disable-float-truncate],
     [truncate intermediate FP results])],
-  [if test "$enableval" = yes; then
-     ac_float_truncate=volatile
-   else
+  [if test "$enableval" = no; then
      ac_float_truncate=
    fi],
-  [case $host_os in
-     mingw* | cygwin*)
-       ac_float_truncate=volatile
-     ;;
-     *)
-       ac_float_truncate=
-     ;;
-   esac])
+  [])
 
 AC_DEFINE_UNQUOTED(FLOAT_TRUNCATE, [$ac_float_truncate],
   [Define to volatile if you need to truncate intermediate FP results.])
@@ -544,27 +541,6 @@
 AC_SUBST(XTRA_CFLAGS)
 AC_SUBST(XTRA_CXXFLAGS)
 
-### Test whether the compiler supports OpenMP.  This is experimental so disable
-### it by default.  Enable it with the flag --enable-openmp.
-
-USE_OPENMP=no
-AC_ARG_ENABLE([openmp],
-  [AS_HELP_STRING([--enable-openmp],
-    [(EXPERIMENTAL) use OpenMP SMP multi-threading])],
-  [if test "$enableval" = yes; then USE_OPENMP=yes; fi], [])
-if test $USE_OPENMP = yes; then
-  case $host_os in
-    mingw* | cygwin* | *-gnu*)
-      OCTAVE_CHECK_OPENMP(-fopenmp)
-    ;;
-    msdosmsvc)
-      ## FIXME: is this the right flag for MSVC?
-      OCTAVE_CHECK_OPENMP(-openmp)
-    ;;
-    ## Add other compilers supporting OpenMP here
-  esac
-fi
-
 ### Defaults for cross compiling.  BUILD_CC and BUILD_CXX are
 ### the compilers that we use for building tools on the build system.
 ### For now, we assume that the only cross compiling we can do is
@@ -609,12 +585,29 @@
 ### Determine the Fortran compiler and how to invoke it
 
 ## Default FFLAGS is -O.
-if test x"$FFLAGS" = x""; then
+if test -z "$FFLAGS"; then
   FFLAGS="-O"
 fi
 
-## the F77 variable, if set, overrides AC_PROG_F77 automatically
-AC_PROG_F77
+## Prefer gfortran, but the user's F77 environment variable will override.
+AC_PROG_F77([gfortran])
+if test -z "$F77"; then
+  ## No gfortran found, search for any other installed compiler.
+  AC_PROG_F77
+fi
+if test "$F77" = g77; then
+  AC_MSG_ERROR([g77 is not a supported Fortran compiler.  Select another compiler by setting the environment variable F77 and re-running configure.])
+fi
+
+AC_MSG_CHECKING([whether a usable Fortran compiler was found])
+if test -n "$F77"; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+  AC_MSG_ERROR([A Fortran compiler is required])
+fi
+
+## Determine calling conventions for Fortran compiler
 AC_F77_LIBRARY_LDFLAGS
 AC_F77_DUMMY_MAIN
 AC_F77_WRAPPERS
@@ -710,10 +703,6 @@
 fi
 AC_SUBST(F77_INTEGER_8_FLAG)
 
-## FIXME: Is this really used?  Makefile seems to use $F77 for compiler
-FC=$F77
-AC_SUBST(FC)
-
 OCTAVE_F77_FLAG([-ffloat-store], [
   AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store])
   F77_FLOAT_STORE_FLAG=-ffloat-store
@@ -723,15 +712,14 @@
 ### Check for the Qhull library
 
 OCTAVE_CHECK_LIB(qhull, QHull,
-  [Qhull library not found -- this will result in loss of functionality of some geometry functions.],
+  [Qhull library not found.  This will result in loss of functionality of some geometry functions.],
   [libqhull/libqhull.h qhull/libqhull.h libqhull.h qhull/qhull.h qhull.h],
   [qh_qhull], [], [],
   [warn_qhull=
   OCTAVE_CHECK_QHULL_VERSION
   OCTAVE_CHECK_LIB_QHULL_OK(
-    [TEXINFO_QHULL="@set HAVE_QHULL"
-    AC_DEFINE(HAVE_QHULL, 1, [Define to 1 if Qhull is available.])],
-    [warn_qhull="Qhull library found, but does not seem to work properly -- this will result in loss of functionality of some geometry functions.  Please try recompiling the library with -fno-strict-aliasing."])])
+    [AC_DEFINE(HAVE_QHULL, 1, [Define to 1 if Qhull is available.])],
+    [warn_qhull="Qhull library found, but does not seem to work properly.  This will result in loss of functionality of some geometry functions.  Please try recompiling the library with -fno-strict-aliasing."])])
 
 ### Check for PCRE regex library.
 
@@ -865,9 +853,13 @@
       warn_llvm="Missing LLVM file TargetData.h.  JIT compiler is disabled."
     fi
 
+    AC_CHECK_HEADERS([llvm/IR/Verifier.h])
+
     OCTAVE_LLVM_FUNCTION_ADDATTRIBUTE_API
     OCTAVE_LLVM_FUNCTION_ADDFNATTR_API
     OCTAVE_LLVM_CALLINST_ADDATTRIBUTE_API
+    OCTAVE_LLVM_RAW_FD_OSTREAM_API
+    OCTAVE_LLVM_LEGACY_PASSMANAGER_API
     AC_LANG_POP(C++)
     CPPFLAGS="$save_CPPFLAGS"
     CXXFLAGS="$save_CXXFLAGS"
@@ -895,6 +887,7 @@
 AC_SUBST(LLVM_CXXFLAGS)
 AC_SUBST(LLVM_LDFLAGS)
 AC_SUBST(LLVM_LIBS)
+AM_CONDITIONAL([AMCOND_HAVE_LLVM], [test -z "$warn_llvm"])
 
 ### Check for HDF5 library.
 
@@ -907,7 +900,6 @@
   [hdf5.h], [H5Gget_num_objs], [], [],
   [warn_hdf5=
    OCTAVE_CHECK_HDF5_HAS_VER_16_API
-   TEXINFO_HDF5="@set HAVE_HDF5"
    AC_DEFINE(HAVE_HDF5, 1,
      [Define to 1 if HDF5 is available and newer than version 1.6.])
    if test $have_msvc = yes; then
@@ -974,8 +966,7 @@
   [glpk/glpk.h glpk.h], [glp_simplex], [], [],
   [warn_glpk=
    OCTAVE_CHECK_LIB_GLPK_OK(
-    [TEXINFO_GLPK="@set HAVE_GLPK"
-    AC_DEFINE(HAVE_GLPK, 1, [Define to 1 if GLPK is available.])],
+    [AC_DEFINE(HAVE_GLPK, 1, [Define to 1 if GLPK is available.])],
     [warn_glpk="GLPK library found, but does not seem to work properly -- disabling glpk function"])])
 LIBS="$save_LIBS"
 CPPFLAGS="$save_CPPFLAGS"
@@ -1009,6 +1000,76 @@
 LIBS="$save_LIBS"
 CPPFLAGS="$save_CPPFLAGS"
 
+### Check for sndfile
+
+warn_sndfile="sndfile library fails tests.  The audioinfo, audioread and audiowrite functions for reading and writing audio files will not be fully functional."
+
+check_sndfile=no
+AC_ARG_WITH([sndfile],
+  [AS_HELP_STRING([--without-sndfile],
+    [don't use sndfile library, disable audio file I/O])],
+  [if test x"$withval" = x"no"; then
+     warn_sndfile="--without-sndfile specified.  The audioinfo, audioread and audiowrite functions for reading and writing audio files will not be fully functional."
+   else
+     check_sndfile=yes
+   fi],
+  [check_sndfile=yes])
+
+if test $check_sndfile = yes; then
+  PKG_CHECK_EXISTS([sndfile], [
+    SNDFILE_CPPFLAGS=`$PKG_CONFIG --cflags-only-I sndfile`
+    SNDFILE_LDFLAGS=`$PKG_CONFIG --libs-only-L sndfile`
+    SNDFILE_LIBS=`$PKG_CONFIG --libs-only-l sndfile`
+    warn_sndfile=
+  ])
+fi
+
+if test -z "$warn_sndfile"; then
+  AC_DEFINE(HAVE_SNDFILE, 1, [Define to 1 if sndfile is available.])
+else
+  SNDFILE_CPPFLAGS=
+  SNDFILE_LDFLAGS=
+  SNDFILE_LIBS=
+fi
+AC_SUBST(SNDFILE_CPPFLAGS)
+AC_SUBST(SNDFILE_LDFLAGS)
+AC_SUBST(SNDFILE_LIBS)
+
+### Check for PortAudio
+
+warn_portaudio="PortAudio library fails tests.  The audioplayer, audiorecorder classes and audiodevinfo function for audio playback and recording will not be fully functional."
+
+check_portaudio=no
+AC_ARG_WITH([portaudio],
+  [AS_HELP_STRING([--without-portaudio],
+    [don't use PortAudio library, disable audio playback and recording])],
+  [if test x"$withval" = x"no"; then
+     warn_portaudio="--without-portaudio specified.  The audioplayer, audiorecorder classes and audiodevinfo function for audio playback and recording will not be fully functional."
+   else
+     check_portaudio=yes
+   fi],
+  [check_portaudio=yes])
+
+if test $check_portaudio = yes; then
+  PKG_CHECK_EXISTS([portaudio-2.0 >= 19], [
+    PORTAUDIO_CPPFLAGS=`$PKG_CONFIG --cflags-only-I portaudio-2.0`
+    PORTAUDIO_LDFLAGS=`$PKG_CONFIG --libs-only-L portaudio-2.0`
+    PORTAUDIO_LIBS=`$PKG_CONFIG --libs-only-l portaudio-2.0`
+    warn_portaudio=
+  ])
+fi
+
+if test -z "$warn_portaudio"; then
+  AC_DEFINE(HAVE_PORTAUDIO, 1, [Define to 1 if PortAudio is available.])
+else
+  PORTAUDIO_CPPFLAGS=
+  PORTAUDIO_LDFLAGS=
+  PORTAUDIO_LIBS=
+fi
+AC_SUBST(PORTAUDIO_CPPFLAGS)
+AC_SUBST(PORTAUDIO_LDFLAGS)
+AC_SUBST(PORTAUDIO_LIBS)
+
 ### Check for either of Graphics/ImageMagick++ libraries
 
 AC_ARG_WITH([magick],
@@ -1129,8 +1190,9 @@
   OCTAVE_CHECK_LIB_OPENGL
 fi
 
-GRAPHICS_LIBS=
-GRAPHICS_CFLAGS=
+FLTK_CPPFLAGS=
+FLTK_LDFLAGS=
+FLTK_LIBS=
 
 if test -z "$OPENGL_LIBS"; then
   if test $check_opengl = yes; then
@@ -1165,6 +1227,8 @@
   if test -n "$warn_freetype"; then
     native_graphics=no
     OCTAVE_CONFIGURE_WARNING([warn_freetype])
+  else
+    FT2_CPPFLAGS="$FT2_CFLAGS"
   fi
 
   ## Check for fontconfig library
@@ -1182,6 +1246,8 @@
   if test -n "$warn_fontconfig"; then
     native_graphics=no
     OCTAVE_CONFIGURE_WARNING([warn_fontconfig])
+  else
+    FONTCONFIG_CPPFLAGS="$FONTCONFIG_CFLAGS"
   fi
 
   ## Check for Xft library (when using X11)
@@ -1200,82 +1266,95 @@
 
   ## Check for FLTK (www.fltk.org) library
 
-  AC_ARG_WITH([fltk-prefix], [
-    AS_HELP_STRING([--with-fltk-prefix=PFX],
-      [prefix where FLTK is installed (optional)])],
-    [fltk_prefix="$withval"],
-    [fltk_prefix=""])
-
-  AC_ARG_WITH([fltk-exec-prefix], [
-    AS_HELP_STRING([--with-fltk-exec-prefix=PFX],
-      [exec prefix where FLTK is installed (optional)])],
-    [fltk_exec_prefix="$withval"],
-    [fltk_exec_prefix=""])
-
-  if test x"$fltk_exec_prefix" != x""; then
-    fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix"
-    if test "x${FLTK_CONFIG+set}" != xset ; then
-      FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config"
+  check_fltk=no
+  AC_ARG_WITH([fltk],
+    [AS_HELP_STRING([--without-fltk],
+      [don't use FLTK libraries, disable native graphics])],
+    [if test x"$withval" = x"no"; then
+       native_graphics=no
+       warn_fltk="--without-fltk specified.  Native graphics will be disabled."
+       OCTAVE_CONFIGURE_WARNING([warn_fltk])
+     else
+       check_fltk=yes
+     fi],
+    [check_fltk=yes])
+
+  if test $check_fltk = yes; then
+    AC_ARG_WITH([fltk-prefix],
+      [AS_HELP_STRING([--with-fltk-prefix=PFX],
+        [prefix where FLTK is installed (optional)])],
+      [fltk_prefix="$withval"],
+      [fltk_prefix=""])
+
+    AC_ARG_WITH([fltk-exec-prefix],
+      [AS_HELP_STRING([--with-fltk-exec-prefix=PFX],
+        [exec prefix where FLTK is installed (optional)])],
+      [fltk_exec_prefix="$withval"],
+      [fltk_exec_prefix=""])
+
+    if test x"$fltk_exec_prefix" != x""; then
+      fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix"
+      if test "x${FLTK_CONFIG+set}" != xset ; then
+        FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config"
+      fi
     fi
-  fi
-
-  if test x"$fltk_prefix" != x""; then
-    fltk_args="$fltk_args --prefix=$fltk_prefix"
-    if test x${FLTK_CONFIG+set} != xset ; then
-      FLTK_CONFIG="$fltk_prefix/bin/fltk-config"
+
+    if test x"$fltk_prefix" != x""; then
+      fltk_args="$fltk_args --prefix=$fltk_prefix"
+      if test x${FLTK_CONFIG+set} != xset ; then
+        FLTK_CONFIG="$fltk_prefix/bin/fltk-config"
+      fi
     fi
-  fi
-
-  AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no])
-
-  warn_fltk_config=""
-  warn_fltk_opengl=""
-
-  if test "$FLTK_CONFIG" = no; then
-    native_graphics=no
-    warn_fltk_config="FLTK config script not found.  Native graphics will be disabled."
-    OCTAVE_CONFIGURE_WARNING([warn_fltk_config])
-  else
-    FLTK_CFLAGS=`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`
-    FLTK_LDFLAGS=`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`
-
-    case $host_os in
-      mingw*)
-        FLTK_LDFLAGS=`echo $FLTK_LDFLAGS | $SED -e 's/-mwindows//g'`
-      ;;
-    esac
-
-    AC_CACHE_CHECK([for OpenGL support in FLTK],
-      [octave_cv_fltk_opengl_support],
-      [save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS $FLTK_CFLAGS"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-        #include <FL/gl.h>
-        ]], [[
-        int nothing = 0;
-        ]])],
-        octave_cv_fltk_opengl_support=no,
-        octave_cv_fltk_opengl_support=yes)
-      CFLAGS="$save_CFLAGS"
-      ])
-    if test $octave_cv_fltk_opengl_support = no; then
-      warn_fltk_opengl="FLTK does not have OpenGL support.  Native graphics will be disabled."
+
+    AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no])
+
+    warn_fltk_config=""
+    warn_fltk_opengl=""
+
+    if test "$FLTK_CONFIG" = no; then
+      native_graphics=no
+      warn_fltk_config="FLTK config script not found.  Native graphics will be disabled."
+      OCTAVE_CONFIGURE_WARNING([warn_fltk_config])
     else
-      AC_DEFINE(HAVE_FLTK, 1, [Define to 1 if FLTK is available.])
-    fi
-
-    if test -z "$warn_fltk_opengl"; then
-      GRAPHICS_CFLAGS="$FLTK_CFLAGS"
-      GRAPHICS_LIBS="$FLTK_LDFLAGS"
-    else
-      native_graphics=no
-      OCTAVE_CONFIGURE_WARNING([warn_fltk_opengl])
+      FLTK_CPPFLAGS=`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`
+      FLTK_LDFLAGS=`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`
+
+      case $host_os in
+        mingw*)
+          FLTK_LDFLAGS=`echo $FLTK_LDFLAGS | $SED -e 's/-mwindows//g'`
+        ;;
+      esac
+
+      AC_CACHE_CHECK([for OpenGL support in FLTK],
+        [octave_cv_fltk_opengl_support],
+        [save_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="$CFLAGS $FLTK_CPPFLAGS"
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+          #include <FL/gl.h>
+          ]], [[
+          int nothing = 0;
+          ]])],
+          octave_cv_fltk_opengl_support=no,
+          octave_cv_fltk_opengl_support=yes)
+        CPPFLAGS="$save_CPPFLAGS"
+        ])
+      if test $octave_cv_fltk_opengl_support = no; then
+        warn_fltk_opengl="FLTK does not have OpenGL support.  Native graphics will be disabled."
+      else
+        AC_DEFINE(HAVE_FLTK, 1, [Define to 1 if FLTK is available.])
+      fi
+
+      if test -n "$warn_fltk_opengl"; then
+        native_graphics=no
+        OCTAVE_CONFIGURE_WARNING([warn_fltk_opengl])
+      fi
     fi
   fi
 fi
 
-AC_SUBST(GRAPHICS_CFLAGS)
-AC_SUBST(GRAPHICS_LIBS)
+AC_SUBST(FLTK_CPPFLAGS)
+AC_SUBST(FLTK_LDFLAGS)
+AC_SUBST(FLTK_LIBS)
 
 ## Check for gl2ps which is required for printing with OpenGL graphics
 if test $native_graphics = yes; then
@@ -1287,6 +1366,14 @@
 
 AC_SUBST(GL2PS_LIBS)
 
+if test -n "$OPENGL_LIBS"; then
+  ## Check for OSMesa which is needed for offscreen rendering with OpenGL
+  ## FIXME: Check for version >= 9.0.0
+  OCTAVE_CHECK_LIB(OSMesa, OSMesa,
+    [OSMesa library not found.  Offscreen rendering with OpenGL will be disabled.],
+    [osmesa.h GL/osmesa.h], [OSMesaCreateContext])
+fi
+
 ### Start determination of shared vs. static libraries
 
 ## Use -static if compiling on Alpha OSF/1 1.3 systems.
@@ -1310,13 +1397,13 @@
 LT_PREREQ([2.2.2])
 LT_INIT([disable-static dlopen win32-dll])
 
-if test x"$enable_shared" = x"yes"; then
+if test $enable_shared = yes; then
   SHARED_LIBS=yes
 else
   SHARED_LIBS=no
 fi
 
-if test x"$enable_static" = x"yes"; then
+if test $enable_static = yes; then
   STATIC_LIBS=yes
 else
   STATIC_LIBS=no
@@ -2183,7 +2270,7 @@
 dnl These checks define/undefine HAVE_FUNCNAME in config.h.
 dnl Code tests HAVE_FUNCNAME and either uses function or provides workaround.
 dnl Use multiple AC_CHECKs to avoid line continuations '\' in list
-AC_CHECK_FUNCS([canonicalize_file_name ctermid dup2])
+AC_CHECK_FUNCS([ctermid dup2])
 AC_CHECK_FUNCS([endgrent endpwent execvp expm1 expm1f fork])
 AC_CHECK_FUNCS([getegid geteuid getgid getgrent getgrgid getgrnam])
 AC_CHECK_FUNCS([getpgrp getpid getppid getpwent getpwuid getuid])
@@ -2192,7 +2279,7 @@
 AC_CHECK_FUNCS([log1p log1pf pipe])
 AC_CHECK_FUNCS([realpath resolvepath roundl])
 AC_CHECK_FUNCS([select setgrent setpwent siglongjmp strsignal])
-AC_CHECK_FUNCS([tcgetattr tcsetattr tempnam tgammaf toascii])
+AC_CHECK_FUNCS([tcgetattr tcsetattr tgammaf toascii])
 AC_CHECK_FUNCS([umask waitpid])
 AC_CHECK_FUNCS([_kbhit])
 
@@ -2228,6 +2315,7 @@
 OCTAVE_CHECK_FUNC_CMATH(isnan)
 OCTAVE_CHECK_FUNC_CMATH(isinf)
 OCTAVE_CHECK_FUNC_CMATH(isfinite)
+OCTAVE_CHECK_FUNC_CMATH(signbit)
 
 ## Check for Inf and NaN functions
 
@@ -2714,27 +2802,38 @@
   [AS_HELP_STRING([--disable-gui], [don't build the GUI])],
   [if test "$enableval" = no; then build_gui=no; fi], [])
 
+if test -z "$OPENGL_LIBS"; then
+  build_gui=no
+  if test $check_opengl = yes; then
+    warn_gui="OpenGL libs (GL and GLU) not found -- disabling GUI"
+  else
+    warn_gui="--without-opengl was specified -- disabling GUI"
+  fi
+  OCTAVE_CONFIGURE_WARNING([warn_gui])
+fi
+
 if test $build_gui = yes; then
 
   warn_gui=""
   ## Check for Qt libraries
-  PKG_CHECK_MODULES(QT, [QtCore, QtGui, QtNetwork],
+  QT_MODULES="QtCore QtGui QtNetwork QtOpenGL"
+  PKG_CHECK_MODULES(QT, [$QT_MODULES],
     [],
     [warn_gui="Qt libraries not found -- disabling GUI"
      build_gui=no])
 
   if test $build_gui = yes; then
     ## Retrieve Qt compilation and linker flags
-    QT_CPPFLAGS="`$PKG_CONFIG --cflags-only-I QtCore QtGui QtNetwork`"
-    QT_LDFLAGS="`$PKG_CONFIG --libs-only-L QtCore QtGui QtNetwork`"
-    QT_LIBS="`$PKG_CONFIG --libs-only-l QtCore QtGui QtNetwork`"
+    QT_CPPFLAGS="`$PKG_CONFIG --cflags-only-I $QT_MODULES`"
+    QT_LDFLAGS="`$PKG_CONFIG --libs-only-L $QT_MODULES`"
+    QT_LIBS="`$PKG_CONFIG --libs-only-l $QT_MODULES`"
 
     case $host_os in
       *darwin*)
         ## Qt might be installed in framework
         if test -z "$QT_LIBS"; then
-          QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
-          QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
+          QT_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
+          QT_LIBS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
           ## Enabling link_all_deps works around libtool's imperfect handling
           ## of the -F flag
           AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS],
@@ -2751,10 +2850,10 @@
   fi
 
   if test $build_gui = yes; then
-    AC_CHECK_TOOLS(MOC, [moc-qt5 moc-qt4 moc])
-    AC_CHECK_TOOLS(UIC, [uic-qt5 uic-qt4 uic])
-    AC_CHECK_TOOLS(RCC, [rcc-qt5 rcc-qt4 rcc])
-    AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease])
+    AC_CHECK_TOOLS(MOC, [moc-qt4 moc])
+    AC_CHECK_TOOLS(UIC, [uic-qt4 uic])
+    AC_CHECK_TOOLS(RCC, [rcc-qt4 rcc])
+    AC_CHECK_TOOLS(LRELEASE, [lrelease-qt4 lrelease])
     if test -n "$MOC" && test -n "$UIC" && test -n "$RCC" && test -n "$LRELEASE"; then
       AC_DEFINE(HAVE_QT, 1,
         [Define to 1 if Qt is available (libraries, developer header files, utility programs (moc, uic, rcc, and lrelease))])
@@ -2776,6 +2875,8 @@
     OCTAVE_CHECK_QFONT_MONOSPACE
     OCTAVE_CHECK_QFONT_FORCE_INTEGER_METRICS
     OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT
+    OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE
+    OCTAVE_CHECK_FUNC_QSCI_FINDSELECTION
   fi
 
   if test $build_gui = yes; then
@@ -2849,17 +2950,40 @@
 fi
 
 AM_CONDITIONAL([AMCOND_BUILD_GUI], [test $build_gui = yes])
-AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA], [test "$octave_cv_lib_qscintilla" = yes])
+AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA],
+               [test "$octave_cv_lib_qscintilla" = yes])
 AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes])
 AC_SUBST(QT_CPPFLAGS)
 AC_SUBST(QT_LDFLAGS)
 AC_SUBST(QT_LIBS)
 
-### Run configure in subdirectories.
-
-export CC
-export CXX
-export F77
+# do we want to create cross-mkoctfile etc ?
+cross_tools=no
+AC_ARG_ENABLE([cross-tools],
+  [AS_HELP_STRING([--enable-cross-tools],
+    [build cross tools (mkoctfile, octave-config) if cross compiling])],
+  [if test "$enableval" = yes; then cross_tools=yes; fi])
+
+if test "$cross_tools" = yes; then
+  if test "$cross_compiling" = no; then
+    AC_MSG_WARN([ignoring --enable-cross-tools when not cross compiling])
+    cross_tools=no
+  fi
+fi
+AM_CONDITIONAL([AMCOND_CROSS_TOOLS], [test $cross_tools = yes])
+
+
+### Decide whether or not to install build logs with Octave.
+
+install_build_logs=no
+AC_ARG_ENABLE([install-build-logs],
+  [AS_HELP_STRING([--enable-install-build-logs],
+    [install build logs (e.g. config.log) with Octave])],
+  [if test "$enableval" = yes; then install_build_logs=yes; fi])
+AM_CONDITIONAL([AMCOND_INSTALL_BUILD_LOGS], [test $install_build_logs = yes])
+
+CFLAGS="$original_octave_configure_CFLAGS"
+CXXFLAGS="$original_octave_configure_CXXFLAGS"
 
 AH_BOTTOM([#include "oct-conf-post.h"])
 
@@ -2885,11 +3009,12 @@
   doc/refcard/Makefile
   etc/icons/Makefile
   examples/Makefile
+  examples/code/Makefile
+  examples/data/Makefile
   libgnu/Makefile
   libgui/Makefile
   libinterp/Makefile
   liboctave/Makefile
-  liboctave/cruft/Makefile
   liboctave/cruft/mkf77def
   scripts/Makefile
   src/Makefile
@@ -2945,15 +3070,16 @@
   FFTW3F CPPFLAGS:             $FFTW3F_CPPFLAGS
   FFTW3F LDFLAGS:              $FFTW3F_LDFLAGS
   FFTW3F libraries:            $FFTW3F_LIBS
-  fontconfig CFLAGS:           $FONTCONFIG_CFLAGS
+  FLTK CPPFLAGS:               $FLTK_CPPFLAGS
+  FLTK LDFLAGS:                $FLTK_LDFLAGS
+  FLTK libraries:              $FLTK_LIBS
+  fontconfig CPPFLAGS:         $FONTCONFIG_CPPFLAGS
   fontconfig libraries:        $FONTCONFIG_LIBS
-  FreeType2 CFLAGS:            $FT2_CFLAGS
+  FreeType2 CPPFLAGS:          $FT2_CPPFLAGS
   FreeType2 libraries:         $FT2_LIBS
   GLPK CPPFLAGS:               $GLPK_CPPFLAGS
   GLPK LDFLAGS:                $GLPK_LDFLAGS
   GLPK libraries:              $GLPK_LIBS
-  graphics CFLAGS:             $GRAPHICS_CFLAGS
-  graphics libraries:          $GRAPHICS_LIBS
   HDF5 CPPFLAGS:               $HDF5_CPPFLAGS
   HDF5 LDFLAGS:                $HDF5_LDFLAGS
   HDF5 libraries:              $HDF5_LIBS
@@ -2969,8 +3095,14 @@
   Magick++ LDFLAGS:            $MAGICK_LDFLAGS
   Magick++ libraries:          $MAGICK_LIBS
   OPENGL libraries:            $OPENGL_LIBS
+  OSMesa CPPFLAGS:             $OSMESA_CPPFLAGS
+  OSMesa LDFLAGS:              $OSMESA_LDFLAGS
+  OSMesa libraries:            $OSMESA_LIBS
   PCRE CPPFLAGS:               $PCRE_CPPFLAGS
   PCRE libraries:              $PCRE_LIBS
+  PortAudio CPPFLAGS:          $PORTAUDIO_CPPFLAGS
+  PortAudio LDFLAGS:           $PORTAUDIO_LDFLAGS
+  PortAudio libraries:         $PORTAUDIO_LIBS
   PTHREAD flags:               $PTHREAD_CFLAGS
   PTHREAD libraries:           $PTHREAD_LIBS
   QHULL CPPFLAGS:              $QHULL_CPPFLAGS
@@ -2983,6 +3115,9 @@
   Qt LDFLAGS:                  $QT_LDFLAGS
   Qt libraries:                $QT_LIBS
   READLINE libraries:          $READLINE_LIBS
+  Sndfile CPPFLAGS:            $SNDFILE_CPPFLAGS
+  Sndfile LDFLAGS:             $SNDFILE_LDFLAGS
+  Sndfile libraries:           $SNDFILE_LIBS
   TERM libraries:              $TERM_LIBS
   UMFPACK CPPFLAGS:            $UMFPACK_CPPFLAGS
   UMFPACK LDFLAGS:             $UMFPACK_LDFLAGS
@@ -3000,12 +3135,13 @@
   JIT compiler for loops:             $build_jit
   Build Java interface:               $build_java
   Do internal array bounds checking:  $BOUNDS_CHECKING
-  Use octave_allocator:               $USE_OCTAVE_ALLOCATOR
   Build static libraries:             $STATIC_LIBS
   Build shared libraries:             $SHARED_LIBS
   Dynamic Linking:                    $ENABLE_DYNAMIC_LINKING $DL_API_MSG
   Include support for GNU readline:   $USE_READLINE
   64-bit array dims and indexing:     $USE_64_BIT_IDX_T
+  OpenMP SMP multithreading:          $USE_OPENMP
+  Build cross tools:                  $cross_tools
 ])
 
 warn_msg_printed=false
@@ -3037,19 +3173,6 @@
   warn_msg_printed=true
 fi
 
-if test $USE_OPENMP = yes; then
-  AC_MSG_WARN([])
-  AC_MSG_WARN([You used the EXPERIMENTAL --enable-openmp option.])
-  AC_MSG_WARN([Are you sure that is what you want to do?])
-  AC_MSG_WARN([])
-  AC_MSG_WARN([This option enables experimental SMP multithreding])
-  AC_MSG_WARN([code that has had very little testing.  There is no])
-  AC_MSG_WARN([certainity that the results returned by Octave with])
-  AC_MSG_WARN([this option enabled will be correct.])
-  AC_MSG_WARN([])
-  warn_msg_printed=true
-fi
-
 if test $native_graphics != yes; then
   AC_MSG_WARN([])
   AC_MSG_WARN([I didn't find the necessary libraries to compile native])
@@ -3085,20 +3208,13 @@
   warn_msg_printed=true
 fi
 
-if test $USE_ATOMIC_REFCOUNT = yes; then
+if test $USE_ATOMIC_REFCOUNT = no; then
   AC_MSG_WARN([])
-  AC_MSG_WARN([Using atomic reference counting.])
+  AC_MSG_WARN([atomic reference counting disabled.])
   AC_MSG_WARN([This feature allows access to Octave data safely from])
-  AC_MSG_WARN([another thread, for instance from a GUI.  However this])
-  AC_MSG_WARN([results in a small performance penalty in the Octave])
-  AC_MSG_WARN([interpreter.])
+  AC_MSG_WARN([another thread, and is required when using the GUI's Qt toolkit])
+  AC_MSG_WARN([for plotting.])
   AC_MSG_WARN([])
-  if test $USE_OCTAVE_ALLOCATOR = yes; then
-    AC_MSG_WARN([Thread-safe behavior is not guaranteed unless you also])
-    AC_MSG_WARN([disable the use of the octave_allocator class.])
-    AC_MSG_WARN([])
-  fi
-  warn_msg_printed=true
 fi
 
 if $warn_msg_printed; then
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/doc/doxyhtml/Makefile.am
+++ b/doc/doxyhtml/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc/doxyhtml directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/doc/interpreter/Makefile.am
+++ b/doc/interpreter/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc/interpreter directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -40,43 +40,43 @@
 ## They are dependencies for the documentation.
 ## They must not be distributed from this directory.
 EXAMPLE_FILES = \
-  $(top_srcdir)/examples/@FIRfilter/FIRfilter.m \
-  $(top_srcdir)/examples/@FIRfilter/FIRfilter_aggregation.m \
-  $(top_srcdir)/examples/@FIRfilter/display.m \
-  $(top_srcdir)/examples/@FIRfilter/subsasgn.m \
-  $(top_srcdir)/examples/@FIRfilter/subsref.m \
-  $(top_srcdir)/examples/@polynomial/display.m \
-  $(top_srcdir)/examples/@polynomial/double.m \
-  $(top_srcdir)/examples/@polynomial/end.m \
-  $(top_srcdir)/examples/@polynomial/get.m \
-  $(top_srcdir)/examples/@polynomial/mtimes.m \
-  $(top_srcdir)/examples/@polynomial/plot.m \
-  $(top_srcdir)/examples/@polynomial/polynomial.m \
-  $(top_srcdir)/examples/@polynomial/polynomial_superiorto.m \
-  $(top_srcdir)/examples/@polynomial/polyval.m \
-  $(top_srcdir)/examples/@polynomial/set.m \
-  $(top_srcdir)/examples/@polynomial/subsref.m \
-  $(top_srcdir)/examples/addtwomatrices.cc \
-  $(top_srcdir)/examples/celldemo.cc \
-  $(top_srcdir)/examples/embedded.cc \
-  $(top_srcdir)/examples/fortrandemo.cc \
-  $(top_srcdir)/examples/fortransub.f \
-  $(top_srcdir)/examples/funcdemo.cc \
-  $(top_srcdir)/examples/globaldemo.cc \
-  $(top_srcdir)/examples/helloworld.cc \
-  $(top_srcdir)/examples/mycell.c \
-  $(top_srcdir)/examples/myfeval.c \
-  $(top_srcdir)/examples/myfunc.c \
-  $(top_srcdir)/examples/myhello.c \
-  $(top_srcdir)/examples/mypow2.c \
-  $(top_srcdir)/examples/mysparse.c \
-  $(top_srcdir)/examples/mystring.c \
-  $(top_srcdir)/examples/mystruct.c \
-  $(top_srcdir)/examples/paramdemo.cc \
-  $(top_srcdir)/examples/standalone.cc \
-  $(top_srcdir)/examples/stringdemo.cc \
-  $(top_srcdir)/examples/structdemo.cc \
-  $(top_srcdir)/examples/unwinddemo.cc
+  $(top_srcdir)/examples/code/@FIRfilter/FIRfilter.m \
+  $(top_srcdir)/examples/code/@FIRfilter/FIRfilter_aggregation.m \
+  $(top_srcdir)/examples/code/@FIRfilter/display.m \
+  $(top_srcdir)/examples/code/@FIRfilter/subsasgn.m \
+  $(top_srcdir)/examples/code/@FIRfilter/subsref.m \
+  $(top_srcdir)/examples/code/@polynomial/display.m \
+  $(top_srcdir)/examples/code/@polynomial/double.m \
+  $(top_srcdir)/examples/code/@polynomial/end.m \
+  $(top_srcdir)/examples/code/@polynomial/get.m \
+  $(top_srcdir)/examples/code/@polynomial/mtimes.m \
+  $(top_srcdir)/examples/code/@polynomial/plot.m \
+  $(top_srcdir)/examples/code/@polynomial/polynomial.m \
+  $(top_srcdir)/examples/code/@polynomial/polynomial_superiorto.m \
+  $(top_srcdir)/examples/code/@polynomial/polyval.m \
+  $(top_srcdir)/examples/code/@polynomial/set.m \
+  $(top_srcdir)/examples/code/@polynomial/subsref.m \
+  $(top_srcdir)/examples/code/addtwomatrices.cc \
+  $(top_srcdir)/examples/code/celldemo.cc \
+  $(top_srcdir)/examples/code/embedded.cc \
+  $(top_srcdir)/examples/code/fortrandemo.cc \
+  $(top_srcdir)/examples/code/fortransub.f \
+  $(top_srcdir)/examples/code/funcdemo.cc \
+  $(top_srcdir)/examples/code/globaldemo.cc \
+  $(top_srcdir)/examples/code/helloworld.cc \
+  $(top_srcdir)/examples/code/mycell.c \
+  $(top_srcdir)/examples/code/myfeval.c \
+  $(top_srcdir)/examples/code/myfunc.c \
+  $(top_srcdir)/examples/code/myhello.c \
+  $(top_srcdir)/examples/code/mypow2.c \
+  $(top_srcdir)/examples/code/mysparse.c \
+  $(top_srcdir)/examples/code/mystring.c \
+  $(top_srcdir)/examples/code/mystruct.c \
+  $(top_srcdir)/examples/code/paramdemo.cc \
+  $(top_srcdir)/examples/code/standalone.cc \
+  $(top_srcdir)/examples/code/stringdemo.cc \
+  $(top_srcdir)/examples/code/structdemo.cc \
+  $(top_srcdir)/examples/code/unwinddemo.cc
 
 
 include images.mk
@@ -170,8 +170,11 @@
 
 TXI_SRC = $(MUNGED_TEXI_SRC:.texi=.txi)
 
+include graphics_properties.mk
+
 BUILT_TEXINFOS = \
   contributors.texi \
+  $(GRAPH_PROP_TEXI_SRC) \
   $(MUNGED_TEXI_SRC)
 
 info_TEXINFOS = octave.texi
@@ -208,38 +211,42 @@
 DOCSTRING_FILES = $(shell $(srcdir)/find-docstring-files.sh "$(top_srcdir)")
 
 doc-cache: $(DOCSTRING_FILES) mk_doc_cache.m
-	$(top_builddir)/run-octave -f -q -H $(srcdir)/mk_doc_cache.m doc-cache $(srcdir)/macros.texi $(DOCSTRING_FILES) || { rm -f doc-cache; exit 1; }
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(top_builddir)/run-octave -f -q -H $(srcdir)/mk_doc_cache.m - $(srcdir)/macros.texi $(DOCSTRING_FILES) >$@-t && \
+	mv $@-t $@
 
 $(MUNGED_TEXI_SRC): $(DOCSTRING_FILES) $(munge_texi_SOURCES)
 
 %.texi: %.txi munge-texi.pl
-	$(PERL) $(srcdir)/munge-texi.pl $(top_srcdir) $(DOCSTRING_FILES) < $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(PERL) $(srcdir)/munge-texi.pl $(top_srcdir) $(DOCSTRING_FILES) < $< > $@-t && \
 	mv $@-t $@
 
 contributors.texi: contributors.in
-	$(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t && \
 	mv $@-t $@
 
 ../../AUTHORS: preface.texi contributors.texi
-	rm -f AUTHORS
+	$(AM_V_MAKEINFO)rm -f AUTHORS && \
 	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/contributors.texi ] && [ ! -f contributors.texi ]; then \
 		cp $(srcdir)/contributors.texi contributors.texi; \
 		touch -r $(srcdir)/contributors.texi contributors.texi; \
-	fi
-	-$(MAKEINFO) -D AUTHORSONLY -I $(srcdir) \
-	  --no-validate --no-headers --no-split --output AUTHORS $<
+	fi && \
+	$(MAKEINFO) -D AUTHORSONLY -I $(srcdir) \
+	  --no-validate --no-headers --no-split --output AUTHORS $< && \
 	mv AUTHORS ../../AUTHORS
 
 ../../BUGS: bugs.texi
-	rm -f BUGS
-	-$(MAKEINFO) -D BUGSONLY -I $(srcdir) \
-	  --no-validate --no-headers --no-split --output BUGS $<
+	$(AM_V_MAKEINFO)rm -f BUGS && \
+	$(MAKEINFO) -D BUGSONLY -I $(srcdir) \
+	  --no-validate --no-headers --no-split --output BUGS $< && \
 	mv BUGS ../../BUGS
 
 ../../INSTALL.OCTAVE: install.texi
-	rm -f INSTALL
-	-$(MAKEINFO) -D INSTALLONLY -I $(srcdir) \
-	  --no-validate --no-headers --no-split --output INSTALL $<
+	$(AM_V_MAKEINFO)rm -f INSTALL && \
+	$(MAKEINFO) -D INSTALLONLY -I $(srcdir) \
+	  --no-validate --no-headers --no-split --output INSTALL $< && \
 	mv INSTALL ../../INSTALL.OCTAVE
 
 
@@ -271,6 +278,8 @@
   contributors.in \
   doc-cache \
   find-docstring-files.sh \
+  genpropdoc.m \
+  graphics_properties.mk \
   images \
   images.awk \
   images.mk \
--- a/doc/interpreter/arith.txi
+++ b/doc/interpreter/arith.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/audio.txi
+++ b/doc/interpreter/audio.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 Kurt Hornik
+@c Copyright (C) 1996-2015 Kurt Hornik
 @c
 @c This file is part of Octave.
 @c
@@ -21,6 +21,135 @@
 @node Audio Processing
 @chapter Audio Processing
 
+@menu
+* Audio File Utilities::
+* Audio Device Information::
+* Audio Player::
+* Audio Recorder::
+* Audio Data Processing::
+@end menu
+
+@node Audio File Utilities
+@section Audio File Utilities
+
+The following functions allow you to read, write and retrieve
+information about audio files.  Various formats are supported including
+wav, flac and ogg vorbis.
+
+@DOCSTRING(audioinfo)
+
+@DOCSTRING(audioread)
+
+@DOCSTRING(audiowrite)
+
+@node Audio Device Information
+@section Audio Device Information
+
+@DOCSTRING(audiodevinfo)
+
+@node Audio Player
+@section Audio Player
+
+The following methods are used to create and use audioplayer
+objects.  These objects can be used to play back audio data stored in
+Octave matrices and arrays.  The audioplayer object supports playback
+from various devices available to the system, blocking and non-blocking
+playback, convenient pausing and resuming and much more.
+
+@DOCSTRING(@audioplayer/audioplayer)
+
+@menu
+* Playback::
+* Player Properties::
+@end menu
+
+@node Playback
+@subsection Playback
+
+The following methods are used to control player playback.
+
+@DOCSTRING(@audioplayer/play)
+
+@DOCSTRING(@audioplayer/playblocking)
+
+@DOCSTRING(@audioplayer/pause)
+
+@DOCSTRING(@audioplayer/resume)
+
+@DOCSTRING(@audioplayer/stop)
+
+@DOCSTRING(@audioplayer/isplaying)
+
+@node Player Properties
+@subsection Properties
+
+The remaining couple of methods are used to get and set various
+properties of the audioplayer object.
+
+@DOCSTRING(@audioplayer/get)
+
+@DOCSTRING(@audioplayer/set)
+
+@node Audio Recorder
+@section Audio Recorder
+
+The following methods are used to create and use audiorecorder
+objects.  These objects can be used to record audio data from various
+devices available to the system.  You can use convenient methods to
+retrieve that data or audioplayer objects created from that
+data.  Methods for blocking and non-blocking recording, pausing and
+resuming recording and much more is available.
+
+@DOCSTRING(@audiorecorder/audiorecorder)
+
+@menu
+* Recording::
+* Data Retrieval::
+* Recorder Properties::
+@end menu
+
+@node Recording
+@subsection Recording
+
+The following methods control the recording process.
+
+@DOCSTRING(@audiorecorder/record)
+
+@DOCSTRING(@audiorecorder/recordblocking)
+
+@DOCSTRING(@audiorecorder/pause)
+
+@DOCSTRING(@audiorecorder/resume)
+
+@DOCSTRING(@audiorecorder/stop)
+
+@DOCSTRING(@audiorecorder/isrecording)
+
+@node Data Retrieval
+@subsection Data Retrieval
+
+The following methods allow you to retrieve recorded audio data in
+various ways.
+
+@DOCSTRING(@audiorecorder/getaudiodata)
+
+@DOCSTRING(@audiorecorder/getplayer)
+
+@DOCSTRING(@audiorecorder/play)
+
+@node Recorder Properties
+@subsection Properties
+
+The remaining two methods allow you to read or alter the properties of
+audiorecorder objects.
+
+@DOCSTRING(@audiorecorder/get)
+
+@DOCSTRING(@audiorecorder/set)
+
+@node Audio Data Processing
+@section Audio Data Processing
+
 Octave provides a few functions for dealing with audio data.  An audio
 `sample' is a single output value from an A/D converter, i.e., a small
 integer number (usually 8 or 16 bits), and audio data is just a series
@@ -32,8 +161,8 @@
 There are many different formats for representing such data.  Currently,
 only the two most popular, @emph{linear encoding} and @emph{mu-law
 encoding}, are supported by Octave.  There is an excellent FAQ on audio
-formats by Guido van Rossum @email{guido@@cwi.nl} which can be found at any
-FAQ ftp site, in particular in the directory
+formats by @nospell{Guido van Rossum} @email{guido@@cwi.nl} which can be
+found at any FAQ ftp site, in particular in the directory
 @file{/pub/usenet/news.answers/audio-fmts} of the archive site
 @code{rtfm.mit.edu}.
 
@@ -47,23 +176,11 @@
 
 @DOCSTRING(mu2lin)
 
-@DOCSTRING(loadaudio)
-
-@DOCSTRING(saveaudio)
-
-The following functions for audio I/O require special A/D hardware and
-operating system support.  It is assumed that audio data in linear
-encoding can be played and recorded by reading from and writing to
-@file{/dev/dsp}, and that similarly @file{/dev/audio} is used for mu-law
-encoding.  These file names are system-dependent.  Improvements so that
-these functions will work without modification on a wide variety of
-hardware are welcome.
-
-@DOCSTRING(playaudio)
-
 @DOCSTRING(record)
 
-@DOCSTRING(setaudio)
+@DOCSTRING(sound)
+
+@DOCSTRING(soundsc)
 
 @DOCSTRING(wavread)
 
--- a/doc/interpreter/basics.txi
+++ b/doc/interpreter/basics.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -244,16 +244,18 @@
 @group
 PS1                             = ">> "
 PS2                             = ""
-allow_noninteger_range_as_index = true
 beep_on_error                   = true
 confirm_recursive_rmdir         = false
 crash_dumps_octave_core         = false
-save_default_options            = "-mat-binary"
-do_braindead_shortcircuit_evaluation = true
+disable_diagonal_matrix         = true
+disable_permutation_matrix      = true
+disable_range                   = true
 fixed_point_format              = true
 history_timestamp_format_string = "%%-- %D %I:%M %p --%%"
 page_screen_output              = false
 print_empty_dimensions          = false
+save_default_options            = "-mat-binary"
+struct_levels_to_print          = 0
 @end group
 @end example
 
@@ -266,11 +268,12 @@
 Octave:fopen-file-in-path
 Octave:function-name-clash
 Octave:load-file-in-path
+Octave:possible-matlab-short-circuit-operator
 @end group
 @end example
 
 @noindent
-Note that this does not enable the @code{Octave:matlab-incompatible}
+Note that this does not enable the @code{Octave:language-extension}
 warning, which you might want if you want to be told about writing code
 that works in Octave but not @sc{matlab} (@pxref{XREFwarning,,warning},
 @ref{XREFwarning_ids,,warning_ids}).
@@ -377,15 +380,19 @@
 invoke Octave with the @option{--verbose} option but without the
 @option{--silent} option.
 
-The @code{dump_prefs} function is useful for determining what customizations
-to Octave are possible and which are in effect.
-
-@DOCSTRING(dump_prefs)
-
 @node Quitting Octave
 @section Quitting Octave
 @cindex exiting octave
 @cindex quitting octave
+@cindex finish.m
+@cindex site exiting file
+
+Shutdown is initiated with the @code{exit} or @code{quit} commands (they are
+equivalent).  Similar to startup, Octave has a shutdown process that can be
+customized by user script files.  During shutdown Octave will search for the
+script file @file{finish.m} in the function load path.  Commands to save all
+workspace variables or cleanup temporary files may be placed there.  Additional
+functions to execute on shutdown may be registered with @code{atexit}.
 
 @DOCSTRING(quit)
 
--- a/doc/interpreter/bugs.txi
+++ b/doc/interpreter/bugs.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/container.txi
+++ b/doc/interpreter/container.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -409,7 +409,7 @@
 @end example
 
 @noindent
-The warning id @code{Octave:matlab-incompatible} can be enabled to warn
+The warning id @code{Octave:language-extension} can be enabled to warn
 about this usage.  @xref{XREFwarning_ids,,warning_ids}.
 
 More realistically, all of the functions that operate on strings can be used
@@ -507,7 +507,7 @@
 
 Other functions that can manipulate the fields of a structure are given below.
 
-@DOCSTRING(nfields)
+@DOCSTRING(numfields)
 
 @DOCSTRING(fieldnames)
 
@@ -891,7 +891,7 @@
 Strings}), @code{strcmp}, @code{strncmp}, @code{strcmpi},
 @code{strncmpi} (@pxref{Comparing Strings}), @code{str2double},
 @code{deblank}, @code{strtrim}, @code{strtrunc}, @code{strfind},
-@code{strmatch}, , @code{regexp}, @code{regexpi} (@pxref{Manipulating
+@code{strmatch}, , @code{regexp}, @code{regexpi} (@pxref{Manipulating 
 Strings}) and @code{str2double} (@pxref{String Conversions}).
 
 The function @code{iscellstr} can be used to test if an object is a
--- a/doc/interpreter/contrib.txi
+++ b/doc/interpreter/contrib.txi
@@ -1,5 +1,5 @@
 @c Copyright (C) 2012 John W. Eaton
-@c Copyright (C) 2008-2013 Jaroslav Hajek
+@c Copyright (C) 2008-2015 Jaroslav Hajek
 @c
 @c This file is part of Octave.
 @c
@@ -198,7 +198,8 @@
 comment header (use appropriate year, name and comment marks):
 
 @example
-## Copyright (C) 1996-2013 John W. Eaton <jwe@@octave.org>
+@group
+## Copyright (C) 1996-2015 John W. Eaton <jwe@@octave.org>
 ##
 ## This file is part of Octave.
 ##
@@ -215,6 +216,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with Octave; see the file COPYING.  If not,
 ## see <http://www.gnu.org/licenses/>.
+@end group
 @end example
 
 Always include commit messages in changesets.  After making your source
@@ -284,8 +286,10 @@
 An exception are matrix or cell constructors:
 
 @example
+@group
   [sin(x), cos(x)]
   @{sin(x), cos(x)@}
+@end group
 @end example
 
 @noindent
--- a/doc/interpreter/contributors.in
+++ b/doc/interpreter/contributors.in
@@ -1,11 +1,15 @@
 Ben Abbott
+Drew Abbot
 Andy Adler
 Adam H. Aitkenhead
 Giles Anderson
 Joel Andersson
+Lachlan Andrew
+Pedro Angelo
 Muthiah Annamalai
 Markus Appel
 Branden Archer
+Willem Atsma
 Marco Atzeri
 Shai Ayal
 Roger Banks
@@ -14,7 +18,9 @@
 David Bateman
 Heinz Bauschke
 Julien Bect
+Stefan Beller
 Roman Belov
+Markus Bergholz
 Karl Berry
 David Billinghurst
 Don Bindner
@@ -67,11 +73,14 @@
 Paul Eggert
 Stephen Eglen
 Peter Ekberg
+Edmund Grimley Evans
 Rolf Fabian
 Gunnar Farnebäck
+Massimiliano Fasi
 Stephen Fegan
 Ramon Garcia Fernandez
 Torsten Finke
+Colin Foster
 Jose Daniel Munoz Frias
 Brad Froehle
 Castor Fu
@@ -79,6 +88,7 @@
 Walter Gautschi
 Klaus Gebhardt
 Driss Ghaddab
+Eugenio Gianniti
 Nicolo Giorgetti
 Arun Giridhar
 Michael D. Godfrey
@@ -87,10 +97,12 @@
 Tomislav Goles
 Keith Goodman
 Brian Gough
+Michael C. Grant
 Steffen Groot
 Etienne Grossmann
 David Grundberg
 Kyle Guinn
+Vaibhav Gupta
 Peter Gustafson
 Kai Habel
 Patrick Häcker
@@ -118,7 +130,9 @@
 John Hunt
 Teemu Ikonen
 Alan W. Irwin
+Allan Jacobs
 Geoff Jacobsen
+Vytautas Jančauskas
 Mats Jansson
 Cai Jianming
 Steven G. Johnson
@@ -126,6 +140,7 @@
 Matthias Jüschke
 Atsushi Kajita
 Jarkko Kaleva
+Avinoam Kalma
 Mohamed Kamoun
 Lute Kamstra
 Fotios Kasolis
@@ -148,6 +163,7 @@
 Artem Krosheninnikov
 Piotr Krzyzanowski
 Volker Kuhlmann
+Ilya Kurdyukov
 Tetsuro Kurita
 Philipp Kutin
 Miroslaw Kwasniak
@@ -159,6 +175,7 @@
 Dirk Laurie
 Maurice LeBrun
 Friedrich Leisch
+Johannes Leuschner
 Thorsten Liebig
 Jyh-miin Lin
 Timo Lindfors
@@ -169,10 +186,12 @@
 Erik de Castro Lopo
 Massimo Lorenzin
 Emil Lucretiu
+Yi-Hong Lyu
 Hoxide Ma
 Colin Macdonald
 James Macnicol
 Jens-Uwe Mager
+Stefan Mahr
 Rob Mahurin
 Alexander Mamonov
 Ricardo Marranita
@@ -187,13 +206,17 @@
 Júlio Hoffimann Mendes
 Ed Meyer
 Thorsten Meyer
+Stefan Miereis
 Petr Mikulik
 Mike Miller
+Serviscope Minor
 Stefan Monnier
 Antoine Moreau
 Kai P. Mueller
+Armin Müller
 Hannes Müller
 Victor Munoz
+PrasannaKumar Muralidharan
 Iain Murray
 Carmen Navarrete
 Todd Neal
@@ -209,14 +232,18 @@
 Michael O'Brien
 Peter O'Gorman
 Thorsten Ohl
+Kai T. Ohlhus
 Arno Onken
 Valentin Ortega-Clavero
 Luis F. Ortiz
 Carl Osterwisch
 Janne Olavi Paanajärvi
 Scott Pakin
+José Luis García Pallero
+Jason Alan Palmer
 Gabriele Pannocchia
 Sylvain Pelissier
+Rolando Pereira
 Per Persson
 Primozz Peterlin
 Jim Peterson
@@ -225,13 +252,17 @@
 Elias Pipping
 Robert Platt
 Hans Ekkehard Plesser
+Sergey Plotnikov
 Tom Poage
+Nathan Podlich
 Orion Poplawski
 Ondrej Popp
 Jef Poskanzer
 Francesco Potortì
 Konstantinos Poulios
 Jarno Rajahalme
+Eduardo Ramos
+Pooja Rao
 James B. Rawlings
 Eric S. Raymond
 Balint Reczey
@@ -245,11 +276,13 @@
 Sander van Rijn
 Petter Risholm
 Matthew W. Roberts
+Dmitry Roshchin
 Peter Rosin
 Andrew Ross
 Fabio Rossi
 Mark van Rossum
 Joe Rothweiler
+David Rörich
 Kevin Ruland
 Kristian Rumberg
 Ryan Rusaw
@@ -257,18 +290,23 @@
 Toni Saarela
 Juhani Saastamoinen
 Radek Salac
+Mike Sander
 Ben Sapp
 Aleksej Saushev
 Alois Schlögl
 Michel D. Schmid
 Julian Schnidder
+Sebastian Schoeps
 Nicol N. Schraudolph
 Sebastian Schubert
+Lasse Schuirmann
 Ludwig Schwardt
 Thomas L. Scofield
 Daniel J. Sebald
 Dmitri A. Sergatskov
 Vanya Sergeev
+Marko Seric
+Ahsan Ali Shahid
 Baylis Shanks
 Andriy Shinkarchuck
 Robert T. Short
@@ -280,6 +318,7 @@
 Joerg Specht
 Quentin H. Spencer
 Christoph Spiel
+David Spies
 Richard Stallman
 Russell Standish
 Brett Stewart
@@ -312,6 +351,7 @@
 Mihas Varantsou
 Ivana Varekova
 Sébastien Villemot
+Marco Vitetta
 Daniel Wagenaar
 Thomas Walter
 Andreas Weber
@@ -323,8 +363,10 @@
 Martin Weiser
 Michael Weitzel
 David Wells
+Joachim Wiesemann
 Fook Fah Yap
 Sean Young
+Johannes Zarl
 Michael Zeising
 Federico Zenith
 Alex Zvoleff
--- a/doc/interpreter/cp-idx.txi
+++ b/doc/interpreter/cp-idx.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/data.txi
+++ b/doc/interpreter/data.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/debug.txi
+++ b/doc/interpreter/debug.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/diagperm.txi
+++ b/doc/interpreter/diagperm.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2009-2013 Jaroslav Hajek
+@c Copyright (C) 2009-2015 Jaroslav Hajek
 @c
 @c This file is part of Octave.
 @c
@@ -59,7 +59,26 @@
 Octave provides special treatment of real and complex rectangular diagonal
 matrices, as well as permutation matrices.  They are stored as special objects,
 using efficient storage and algorithms, facilitating writing both readable and
-efficient matrix algebra expressions in the Octave language.
+efficient matrix algebra expressions in the Octave language.  The special
+treatment may be disabled by using the functions @dfn{disable_diagonal_matrix}
+and @dfn{disable_permutation_matrix}.
+
+@DOCSTRING(disable_diagonal_matrix)
+
+@DOCSTRING(disable_permutation_matrix)
+
+The space savings are significant as demonstrated by the following code.
+
+@example
+@group
+x = diag (rand (10, 1));
+xf = full (x);
+sizeof (x)
+@result{} 80
+sizeof (xf)
+@result{} 800
+@end group
+@end example
 
 @menu
 * Creating Diagonal Matrices::
@@ -462,7 +481,8 @@
 
 @noindent
 Finally, here's how to solve a linear system @code{A*x = b}
-with Tikhonov regularization (ridge regression) using SVD (a skeleton only):
+with @nospell{Tikhonov} regularization (ridge regression) using SVD (a skeleton
+only):
 
 @example
 @group
@@ -489,21 +509,18 @@
 right and the consequent usage of smarter algorithms for certain operations
 implies, as a side effect, small differences in treating zeros.
 The contents of this section apply also to sparse matrices, discussed in
-the following chapter. (@pxref{Sparse Matrices})
+the following chapter.  (@pxref{Sparse Matrices})
 
-The IEEE floating point standard defines the result of the expressions @code{0*Inf} and
-@code{0*NaN} as @code{NaN}. This is widely agreed to be a good
-compromise.
-Numerical software dealing with structured and sparse matrices (including
-Octave) however, almost always makes a distinction between a "numerical zero"
-and an "assumed zero".
-A "numerical zero" is a zero value occurring in a place where any floating-point
-value could occur.  It is normally stored somewhere in memory as an explicit
-value.
-An "assumed zero", on the contrary, is a zero matrix element implied by the
-matrix structure (diagonal, triangular) or a sparsity pattern; its value is
-usually not stored explicitly anywhere, but is implied by the underlying
-data structure.
+The IEEE floating point standard defines the result of the expressions
+@code{0*Inf} and @code{0*NaN} as @code{NaN}.  This is widely agreed to be a
+good compromise.  Numerical software dealing with structured and sparse matrices
+(including Octave) however, almost always makes a distinction between a
+"numerical zero" and an "assumed zero".  A "numerical zero" is a zero value
+occurring in a place where any floating-point value could occur.  It is
+normally stored somewhere in memory as an explicit value.  An "assumed zero", on
+the contrary, is a zero matrix element implied by the matrix structure
+(diagonal, triangular) or a sparsity pattern; its value is usually not stored
+explicitly anywhere, but is implied by the underlying data structure.
 
 The primary distinction is that an assumed zero, when multiplied
 by any number, or divided by any nonzero number,
--- a/doc/interpreter/diffeq.txi
+++ b/doc/interpreter/diffeq.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -54,7 +54,7 @@
 @end ifnottex
 
 @noindent
-using Hindmarsh's ODE solver @sc{lsode}.
+using @nospell{Hindmarsh's} ODE solver @sc{lsode}.
 
 
 
@@ -106,9 +106,10 @@
 @end group
 @end example
 
-See Alan C. Hindmarsh, @cite{ODEPACK, A Systematized Collection of ODE
-Solvers}, in Scientific Computing, R. S. Stepleman, editor, (1983) for
-more information about the inner workings of @code{lsode}.
+See @nospell{Alan C. Hindmarsh},
+@cite{ODEPACK, A Systematized Collection of ODE Solvers},
+in Scientific Computing, @nospell{R. S. Stepleman}, editor, (1983)
+for more information about the inner workings of @code{lsode}.
 
 An m-file for the differential equation used above is included with the
 Octave distribution in the examples directory under the name
@@ -139,8 +140,8 @@
 @ifnottex
 @math{x-dot}
 @end ifnottex
-is the derivative of @math{x}.  The equation is solved using Petzold's
-DAE solver @sc{daspk}.
+is the derivative of @math{x}.  The equation is solved using
+@nospell{Petzold's} DAE solver @sc{daspk}.
 
 @DOCSTRING(daspk)
 
@@ -158,6 +159,6 @@
 
 @DOCSTRING(dasrt_options)
 
-See K. E. Brenan, et al., @cite{Numerical Solution of Initial-Value
+See @nospell{K. E. Brenan}, et al., @cite{Numerical Solution of Initial-Value
 Problems in Differential-Algebraic Equations}, North-Holland (1989) for
 more information about the implementation of @sc{dassl}.
--- a/doc/interpreter/doccheck/aspell-octave.en.pws
+++ b/doc/interpreter/doccheck/aspell-octave.en.pws
@@ -1,5 +1,4 @@
 personal_ws-1.1 en 1
-Abramowitz
 accumarray
 Acknowledgements
 acknowledgements
@@ -7,11 +6,9 @@
 adams
 Affero
 afterwards
-Ahalt
 aifm
 AIX
 al
-Alamos
 aleph
 alnum
 alphanum
@@ -28,11 +25,13 @@
 ARMA
 arpack
 ascii
-Ashok
 ast
 async
 atan
 Attr
+audiodevinfo
+audioplayer
+audiorecorder
 AutoCAD
 Autoconf
 autocorrelations
@@ -52,10 +51,11 @@
 backend
 Backends
 backends
+backgroundcolor
+backtrace
 bartlett
 BaseValue
 basevalue
-Bateman
 BDF
 bdf
 betacdf
@@ -64,8 +64,9 @@
 betapdf
 betarnd
 BFGS
+BICG
+BiConjugate
 bigtriangledown
-Bilbert
 bincoeff
 binocdf
 binoinv
@@ -90,9 +91,7 @@
 brackety
 braindead
 breakpoint
-Brenan
 broadcastable
-Brockwell
 BSX
 builtin
 builtins
@@ -120,7 +119,6 @@
 changelogs
 changeset
 changesets
-Chaves
 chdir
 Chebyshev
 chisq
@@ -136,7 +134,6 @@
 circum
 classpath
 classpaths
-Clenshaw
 CLI
 clim
 climmode
@@ -168,7 +165,6 @@
 conformant
 cong
 const
-constuctors
 contextless
 contourc
 convhull
@@ -181,10 +177,14 @@
 CPLEX
 CreateFcn
 CRLF
+Crout
+crout
 csymamd
 ctranspose
+Ctrl
 CTRL
 CTS
+cubehelix
 cummax
 cummin
 cumprod
@@ -194,7 +194,6 @@
 CurrentFigure
 CurrentObject
 currentpoint
-Cuthill
 cxsparse
 Cygwin
 DAE
@@ -222,10 +221,10 @@
 delim
 deltaX
 demi
-Demmel
 DeskJet
 det
 diag
+diagcomp
 diamondsuit
 dir
 disp
@@ -234,21 +233,20 @@
 displayrange
 dMatrix
 dmperm
-Dobkin
+docstring
 docstrings
 dOmega
 doNotSpecify
 dotall
 dotexceptnewline
+doublearrow
 Downarrow
 downarrow
 downdate
 dpi
-Driebeck
+droptol
 dt
 Dt
-Dulmage
-Durbin
 dx
 dy
 EastOutside
@@ -259,9 +257,7 @@
 eigenvector
 eigenvectors
 eigs
-Ekerdt
 elementwise
-Elfers
 elseif
 emacs
 emptyvalue
@@ -270,7 +266,6 @@
 Endian
 endif
 endofline
-Engle's
 eof
 EOF
 EOLs
@@ -290,7 +285,6 @@
 errordlg
 ErrorHandler
 ESC
-Esmond
 et
 etree
 etreeplot
@@ -314,16 +308,19 @@
 fftpack
 FFTs
 fftw
-Fiedler
 fieldname
 fieldnames
 filename
 filenames
+filepaths
 Filesystem
+filetype
 FinDiffType
 finv
 FIRfilter
+fitboxtotext
 FIXME
+flac
 FlashPix
 FLTK
 fltk
@@ -333,7 +330,6 @@
 forall
 foregroundcolor
 formfeed
-Forsythe
 Fortran
 fpdf
 fprintf
@@ -353,7 +349,6 @@
 gaminv
 gampdf
 gamrnd
-Gautschi
 gca
 gcbo
 GCC
@@ -378,15 +373,15 @@
 globbing
 glpk
 GLS
+GMRES
 gnulib
 gnuplot
 Gnuplot
 gnuplot's
-Golub
-Gonnet
 goto
 Goto
 gotos
+gperf
 GPL
 GPLK
 gplot
@@ -396,7 +391,6 @@
 GraphicsMagick
 Graymap
 grayscale
-Graz
 griddata
 gswin
 GUIs
@@ -404,19 +398,19 @@
 gz
 gzip
 gzipped
-Hackbusch
 Hadamard
-Haddad
 HandleVisibility
 Hankel
 hanning
 Hanning
 hardcode
 hardcoding
-Hauberg
 HDF
 hdf
 headerlines
+headlength
+headstyle
+headwidth
 heartsuit
 helpdlg
 Helvetica
@@ -427,12 +421,9 @@
 hggroups
 hh
 HH
-Higham
-Hindmarsh
-Hindmarsh's
 histc
-Hodel
 holomorphic
+horizontalalignment
 Horner's
 horzcat
 hostname
@@ -440,15 +431,14 @@
 Hotelling's
 HSV
 html
-Hudak
-Huhdanpaa
 hygecdf
 hygeinv
 hygepdf
 hygernd
-Hyndman
 Hypergeometric
 hypergeometric
+ichol
+ict
 IEC
 ieee
 IEEE
@@ -457,10 +447,11 @@
 ifftn
 ignorecase
 ij
+ilu
+ilutp
 Im
 imag
 ImageMagick
-Imenu
 Indices
 indices
 infty
@@ -478,6 +469,7 @@
 interpolant
 Interpolants
 interquartile
+inuse
 inv
 involutory
 ipermute
@@ -499,14 +491,13 @@
 javaaddpath
 javamem
 jbig
+JDK
 JIT
 jpeg
 JPEG
 jpg
 jvm
 JVM's
-Kac
-Kahan
 kendall
 keybindings
 keypress
@@ -514,10 +505,8 @@
 Kolmogorov
 kolmogorov
 Konrod
-Krishnamurthy
 kron
 kruskal
-Kruskal
 Krylov
 kurtosis
 LabelSpacing
@@ -525,9 +514,7 @@
 Lanzcos
 lapack
 laplace
-Larimore
 LaserJet
-Lauchli
 lceil
 ldiv
 ldivide
@@ -538,10 +525,7 @@
 leftarrow
 Leftrightarrow
 leftrightarrow
-Lehmer
-Lehoucq
 leq
-Levinson
 LF
 lfloor
 li
@@ -563,12 +547,12 @@
 ListSize
 ListString
 literalspacing
-Liu
 LLVM
 LM
 lm
 loadpath
 Lobatto
+logfile
 logit
 logncdf
 logninv
@@ -578,8 +562,6 @@
 lookup
 Lookup
 lookups
-Los
-Lotkin
 Lovato
 lpx
 lr
@@ -595,7 +577,6 @@
 lz
 lzma
 lzw
-Magnus
 Mahalanobis
 makefile
 makefiles
@@ -607,19 +588,15 @@
 markerfacecolor
 markersize
 markerstyle
-Marsaglia
-Maschhoff
 matchcase
 matlab
-Matsumoto
 MaxFunEvals
 maxima
 MaxIntervalCount
 MaxIter
 mcnemar
-McNemar's
+mdl
 meansq
-Mendelsohn
 menubars
 Mersenne
 meshgrid
@@ -630,7 +607,7 @@
 Metafont
 mex
 mget
-Michelsen
+michol
 Microsystems
 MinGW
 minima
@@ -639,7 +616,6 @@
 minval
 MIP
 miscompiled
-Misra
 mkdir
 mkoctfile
 mldivide
@@ -649,8 +625,6 @@
 mmmm
 mmmyy
 mmmyyyy
-Moler
-Montanet
 mpoles
 mpower
 mput
@@ -674,33 +648,37 @@
 NaN
 NaNs
 nargin
+nargout
 nbincdf
 nbininv
 nbinpdf
 nbinrnd
+ncols
 nd
 ndgrid
+ndims
 ne
-Nelder
 neq
-Neudecker
 Neumann
 NeXT
 NextPlot
 nfev
 nfft
-Ng
 ni
-Nishimura
 NLP
 nnls
 nnz
 nocompute
 nodither
+nofill
 nolabel
 noncommercially
 nonconformant
+nondecreasing
+nonincreasing
+nonnan
 nonsmooth
+nonsparse
 nonzeros
 NOP
 noperm
@@ -713,26 +691,31 @@
 noscal
 noshare
 notin
+nrows
 nthargout
 NTSC
 ntsc
+numel
 Numpy
 nzmax
 oct
 octaverc
 ODEPACK
+Ogg
+ogg
 OKString
 OLS
 onCleanup
 online
 OpenGL
+OpenJDK
 oplus
-Oppenheim
 Ord
 oregonator
 Orthogonalize
 oslash
 otimes
+outerposition
 OutputFcn
 outputfcn
 overridable
@@ -743,7 +726,6 @@
 paperunits
 PaperUnits
 parseparams
-Parter
 pbm
 PBM
 PBMplus
@@ -762,7 +744,6 @@
 pentadiagonal
 periodogram
 perp
-Petzold's
 PGF
 pgm
 PGMRES
@@ -787,10 +768,10 @@
 POSIX
 postorder
 PostScript
-Pothen
 powerset
 pre
 preconditioner
+preconditioners
 premultiplied
 Prepend
 prepended
@@ -799,6 +780,7 @@
 priori
 Profiler
 profiler
+programmatically
 prolate
 PromptString
 propto
@@ -832,20 +814,17 @@
 qz
 QZ
 radices
-Rajamanickam
 randn
 randperm
 rangle
 ranlib
 ras
-Rawlings
 rceil
 rdivide
 Readline
 readline
 RECT
 recursing
-Redheffer
 reentrant
 regex
 regressor
@@ -880,15 +859,11 @@
 rnd
 roffset
 Rosser
-Rossum
 rpath
 RPMs
 runtime
 sa
-Saad
-Sandia
 SAS
-Schafer
 schar
 Schur
 SCO
@@ -899,7 +874,6 @@
 SelectionMode
 semidefinite
 Sep
-Shampine
 shiftdim
 si
 signum
@@ -912,10 +886,10 @@
 simplematrix
 simplices
 sinetone
+slx
 sm
 smirnov
 Smirnov
-Sorensen
 SouthOutside
 sp
 spadesuit
@@ -943,16 +917,13 @@
 sqrtm
 sr
 ss
-Stadlober
 stairstep
-Stallman
 startup
 Startup
 statinfo
+stdin
 stdnormal
 stdout
-Stegun
-Stepleman
 stepsize
 STFT
 STL
@@ -967,6 +938,7 @@
 struct
 structs
 subarrays
+subdiagonals
 subdirectories
 subdirectory
 subexpressions
@@ -998,8 +970,10 @@
 SuiteSparse
 sumsq
 SunOS
+superdiagonal
+superdiagonals
 superiorto
-supradiagonal
+superscripting
 supset
 supseteq
 SV
@@ -1015,7 +989,7 @@
 symamd
 symbfact
 symrcm
-Szego
+Syntaxes
 tcdf
 Tcv
 terminal's
@@ -1023,18 +997,23 @@
 texinfo
 Texinfo
 TextAlphaBits
+textarrow
+textbackgroundcolor
+textbox
+textcolor
+textedgecolor
 textfield
+textlinewidth
+textmargin
 textread
+textrotation
 textscan
 th
 ths
 tif
-Tikhonov
 TikZ
 Timestamp
 tinv
-Tisseur
-Tisseur's
 tmp
 Toeplitz
 tokenExtents
@@ -1058,7 +1037,6 @@
 trnd
 truecolor
 TrueColor
-Tsang
 Tukey
 tuples
 Tx
@@ -1069,6 +1047,7 @@
 UB
 uchar
 UHESS
+UI
 UID
 uimenu
 uint
@@ -1118,6 +1097,7 @@
 varpi
 varsigma
 vartheta
+vback
 vec
 vech
 Vectorize
@@ -1126,15 +1106,17 @@
 vee
 versa
 vertcat
+verticalalignment
 vertices
-Villadsen
+Vorbis
+vorbis
 voronoi
 Voronoi
 waitbar
 waitbars
 wallis
 warndlg
-Wathen
+wav
 WAV
 WayPoints
 wblcdf
@@ -1155,17 +1137,16 @@
 wildcard
 Wildcards
 wildcards
-Wilks
 windowbuttondownfcn
 windowbuttonmotionfcn
 windowbuttonupfcn
 windowstyle
-WinRand
 WIPO
 wireframe
 wp
 wspace
 xb
+xboxes
 xc
 xcorr
 xdata
@@ -1180,17 +1161,21 @@
 xl
 xmax
 xmin
+xon
 xPBTRF
 xPOTRF
 xPTSV
 xtest
+xtests
 xTRTRS
 xu
 xwd
 xy
+xyboxes
 xyerrorbar
 xyerrorbars
 xyz
+yboxes
 yc
 ydata
 yerrorbar
@@ -1204,7 +1189,6 @@
 YYYY
 yyyymmdd
 yyyymmddTHHMMSS
-Zechner
 Ziggurat
 zlib
 zlim
--- a/doc/interpreter/emacs.txi
+++ b/doc/interpreter/emacs.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 Kurt Hornik
+@c Copyright (C) 1996-2015 Kurt Hornik
 @c
 @c This file is part of Octave.
 @c
@@ -351,8 +351,8 @@
 @code{font-lock-function-name-face}.
 @end itemize
 
-There is also rudimentary support for Imenu (currently, function names
-can be indexed).
+There is also rudimentary support for @nospell{Imenu} (currently, function
+names can be indexed).
 
 @cindex TAGS
 @cindex Emacs TAGS files
@@ -506,7 +506,7 @@
 You can use either `plain' Emacs Info or the function @code{octave-help}
 as your Octave info reader (for @samp{help -i}).  In the former case,
 use @code{info_program ("info-emacs-info")}.
-The latter is perhaps more attractive because it allows to look up keys
+The latter is perhaps more attractive because it allows one to look up keys
 in the indices of @emph{several} info files related to Octave (provided
 that the Emacs variable @code{octave-help-files} is set correctly).  In
 this case, use @code{info_program ("info-emacs-octave-help")}.
--- a/doc/interpreter/errors.txi
+++ b/doc/interpreter/errors.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -126,8 +126,6 @@
 
 @DOCSTRING(print_usage)
 
-@DOCSTRING(usage)
-
 @DOCSTRING(beep)
 
 @DOCSTRING(beep_on_error)
@@ -285,7 +283,7 @@
 @group
 function rand42
   old_state = rand ("state");
-  restore_state = onCleanup (@@() rand ("state", old_state);
+  restore_state = onCleanup (@@() rand ("state", old_state));
   rand ("state", 42);
   @dots{}
 endfunction  # rand generator state restored by onCleanup
--- a/doc/interpreter/eval.txi
+++ b/doc/interpreter/eval.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/expr.txi
+++ b/doc/interpreter/expr.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -1009,10 +1009,10 @@
 
 @sc{matlab} has special behavior that allows the operators @samp{&} and
 @samp{|} to short-circuit when used in the truth expression for @code{if} and
-@code{while} statements.  The Octave parser may be instructed to behave in the
-same manner, but its use is strongly discouraged.
-
-@DOCSTRING(do_braindead_shortcircuit_evaluation)
+@code{while} statements.  Octave also behaves the same way by default,
+though the use of the @samp{&} and @samp{|} operators in this way is
+strongly discouraged.  Instead, you should use the @samp{&&} and @samp{||}
+operators that always have short-circuit behavior.
 
 Finally, the ternary operator (?:) is not supported in Octave.  If
 short-circuiting is not important, it can be replaced by the @code{ifelse}
@@ -1243,8 +1243,10 @@
 is evaluated as
 
 @example
+@group
 @var{temp} = @var{expr2}
 @var{expr1} = (@var{expr1}) @var{op} @var{temp}
+@end group
 @end example
 
 @noindent
--- a/doc/interpreter/external.txi
+++ b/doc/interpreter/external.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2007-2013 John W. Eaton and David Bateman
+@c Copyright (C) 2007-2015 John W. Eaton and David Bateman
 @c Copyright (C) 2007 Paul Thomas and Christoph Spiel
 @c
 @c This file is part of Octave.
@@ -589,7 +589,7 @@
 @subsubsection Array and Sparse Class Differences
 
 The number of elements in a sparse matrix is considered to be the number
-of non-zero elements rather than the product of the dimensions.  Therefore
+of nonzero elements rather than the product of the dimensions.  Therefore
 
 @example
 @group
@@ -600,13 +600,13 @@
 @end example
 
 @noindent
-returns the number of non-zero elements.  If the user really requires the
-number of elements in the matrix, including the non-zero elements, they
+returns the number of nonzero elements.  If the user really requires the
+number of elements in the matrix, including the nonzero elements, they
 should use @code{numel} rather than @code{nelem}.  Note that for very
 large matrices, where the product of the two dimensions is larger than
 the representation of an unsigned int, then @code{numel} can overflow.
 An example is @code{speye (1e6)} which will create a matrix with a million
-rows and columns, but only a million non-zero elements.  Therefore the
+rows and columns, but only a million nonzero elements.  Therefore the
 number of rows by the number of columns in this case is more than two
 hundred times the maximum value that can be represented by an unsigned int.
 The use of @code{numel} should therefore be avoided useless it is known
@@ -707,7 +707,7 @@
 technique for creating a sparse matrix.
 
 The alternative is to first create a sparse matrix with the desired
-number of non-zero elements and then later fill those elements in.
+number of nonzero elements and then later fill those elements in.
 Sample code:
 
 @example
@@ -748,7 +748,7 @@
 @var{nz} greater than 4 is also valid.  The disadvantage is that the matrix
 occupies more memory than strictly needed.
 
-It is not always possible to know the number of non-zero elements prior
+It is not always possible to know the number of nonzero elements prior
 to filling a matrix.  For this reason the additional unused storage of
 a sparse matrix can be removed after its creation with the
 @code{maybe_compress} function.  In addition, @code{maybe_compress} can
@@ -850,7 +850,7 @@
 sm.maybe_mutate ();  // If don't know a priori the final # of nz.
 @end example
 
-Note that both increasing and decreasing the number of non-zero elements in
+Note that both increasing and decreasing the number of nonzero elements in
 a sparse matrix is expensive as it involves memory reallocation.  Also as
 parts of the matrix, though not its entirety, exist as old and new copies
 at the same time, additional memory is needed.  Therefore, if possible this
@@ -1093,7 +1093,7 @@
 of parameter checking to ensure that Octave behaves well.
 
 The minimum requirement, as previously discussed, is to check the number
-of input arguments before using them to avoid referencing a non-existent
+of input arguments before using them to avoid referencing a nonexistent
 argument.  However, in some cases this might not be sufficient as the
 underlying code imposes further constraints.  For example, an external
 function call might be undefined if the input arguments are not
@@ -1607,6 +1607,7 @@
 An example of the behavior of this function within Octave is then
 
 @example
+@group
 a(1).f1 = "f11"; a(1).f2 = "f12";
 a(2).f1 = "f21"; a(2).f2 = "f22";
 b = mystruct (a);
@@ -1625,6 +1626,7 @@
 
      this = this3
      that = that3
+@end group
 @end example
 
 @node Sparse Matrices with Mex-Files
@@ -1653,11 +1655,11 @@
 
 @noindent
 @code{mxGetNzmax} gets the maximum number of elements that can be stored
-in the sparse matrix.  This is not necessarily the number of non-zero
+in the sparse matrix.  This is not necessarily the number of nonzero
 elements in the sparse matrix.  @code{mxGetJc} returns an array with one
 additional value than the number of columns in the sparse matrix.  The
 difference between consecutive values of the array returned by
-@code{mxGetJc} define the number of non-zero elements in each column of
+@code{mxGetJc} define the number of nonzero elements in each column of
 the sparse matrix.  Therefore,
 
 @example
@@ -1673,10 +1675,10 @@
 @end example
 
 @noindent
-returns the actual number of non-zero elements stored in the matrix in
+returns the actual number of nonzero elements stored in the matrix in
 @code{nz}.  As the arrays returned by @code{mxGetPr} and @code{mxGetPi}
-only contain the non-zero values of the matrix, we also need a pointer
-to the rows of the non-zero elements, and this is given by
+only contain the nonzero values of the matrix, we also need a pointer
+to the rows of the nonzero elements, and this is given by
 @code{mxGetIr}.  A complete example of the use of sparse matrices in
 mex-files is given by the file @file{mysparse.c} shown below.
 
@@ -1692,7 +1694,7 @@
 mysparse (sm)
 @result{}
 Matrix is 2-by-2 real sparse matrix with 2 elements
-last non-zero element (2, 2) = 3.14159
+last nonzero element (2, 2) = 3.14159
 @end group
 @end example
 
@@ -1790,8 +1792,8 @@
 This feature should be used with care as the list of built-in functions can
 change.  No guarantees can be made that a function that is currently built in
 won't be implemented as a .m file or as a dynamically linked function in the
-future.  An example of how to call built-in functions from C++ can be seen in the
-code
+future.  An example of how to call built-in functions from C++ can be seen in
+the code
 
 @example
 @EXAMPLEFILE(standalonebuiltin.cc)
--- a/doc/interpreter/fn-idx.txi
+++ b/doc/interpreter/fn-idx.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/func.txi
+++ b/doc/interpreter/func.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -114,8 +114,8 @@
 @end example
 
 The @code{printf} statement (@pxref{Input and Output}) simply tells
-Octave to print the string @qcode{"\a"}.  The special character @samp{\a}
-stands for the alert character (ASCII 7).  @xref{Strings}.
+Octave to print the string @qcode{"@xbackslashchar{}a"}.  The special character
+@samp{\a} stands for the alert character (ASCII 7).  @xref{Strings}.
 
 Once this function is defined, you can ask Octave to evaluate it by
 typing the name of the function.
@@ -393,15 +393,27 @@
 which stops the function execution and prints a message about the correct
 way to call the function whenever the number of inputs is wrong.
 
-For compatibility with @sc{matlab}, @code{nargchk}, @code{narginchk} and
-@code{nargoutchk} are available which provide similar error checking.
-
-@DOCSTRING(nargchk)
+For compatibility with @sc{matlab}, @code{narginchk} and @code{nargoutchk} are
+available which provide similar error checking.
 
 @DOCSTRING(narginchk)
 
 @DOCSTRING(nargoutchk)
 
+Besides the number of arguments, inputs can be checked for various properties.
+@code{validatestring} is used for string arguments and
+@code{validateattributes} for numeric arguments.
+
+@DOCSTRING(validatestring)
+
+@DOCSTRING(validateattributes)
+
+If none of the preceding functions is sufficient there is also the class
+@code{inputParser} which can perform extremely complex input checking for
+functions.
+
+@DOCSTRING(inputParser)
+
 @anchor{XREFvarargin} @anchor{XREFvarargout}
 @node Variable-length Argument Lists
 @section Variable-length Argument Lists
@@ -800,7 +812,7 @@
 
 @DOCSTRING(command_line_path)
 
-@DOCSTRING(find_dir_in_path)
+@DOCSTRING(dir_in_loadpath)
 
 @node Subfunctions
 @subsection Subfunctions
@@ -1124,7 +1136,7 @@
 which contains the current function.
 
 @item Class constructor
-A function that constuctors a user class as defined in chapter
+A function that constructs a user class as defined in chapter
 @ref{Object Oriented Programming}.
 
 @item Class method
@@ -1377,6 +1389,34 @@
 are passed to @code{betainc} are inherited from the current
 environment.
 
+Note that for performance reasons it is better to use handles to existing
+Octave functions, rather than to define anonymous functions which wrap an
+existing function.  The integration of @code{sin (x)} is 5X faster if the code
+is written as
+
+@example
+quad (@@sin, 0, pi)
+@end example
+
+@noindent
+rather than using the anonymous function @code{@@(x) sin (x)}.  There are many
+operators which have functional equivalents that may be better choices than an
+anonymous function.  Instead of writing
+
+@example
+f = @@(x, y) x + y
+@end example
+
+@noindent
+this should be coded as
+
+@example
+f = @@plus
+@end example
+
+@xref{Operator Overloading}, for a list of operators which also have a
+functional form.
+
 @node Inline Functions
 @subsection Inline Functions
 
@@ -1392,6 +1432,11 @@
 After this it is possible to evaluate @math{f} at any @math{x} by
 writing @code{f(x)}.
 
+@strong{Caution}: @sc{matlab} has begun the process of deprecating inline
+functions.  At some point in the future support will be dropped and eventually
+Octave will follow @sc{matlab} and also remove inline functions.  Use anonymous
+functions in all new code.
+
 @DOCSTRING(inline)
 
 @DOCSTRING(argnames)
@@ -1486,7 +1531,7 @@
 @item general
 Miscellaneous matrix manipulations, like @code{flipud}, @code{rot90},
 and @code{triu}, as well as other basic functions, like
-@code{ismatrix}, @code{nargchk}, etc.
+@code{ismatrix}, @code{narginchk}, etc.
 
 @item geometry
 Functions related to Delaunay triangulation.
new file mode 100644
--- /dev/null
+++ b/doc/interpreter/genpropdoc.m
@@ -0,0 +1,1338 @@
+## Copyright (C) 2014-2015 Pantxo Diribarne
+##
+## This program is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{retval} =} genpropdoc (@var{OBJNAME}, @var{FILENAME})
+##
+## Print FILENAME texinfo source file associated to OBJNAME objects.  This
+## function is meant to be run for generating octave documentation
+## (see doc/interpreter/graphics_properties.mk).
+##
+## All the hard coded documentation is written in getdoc function.  See the
+## comments in getdoc bellow for instruction on how to document a graphics
+## property.
+##
+## @seealso{}
+## @end deftypefn
+
+function genpropdoc (objname, fname)
+  objnames = {"root", "figure", "axes", "line", ...
+              "text", "image", "patch", "surface"};
+
+  ## Base properties
+  base = getstructure ("base");
+
+  ## Object properties
+  if (any (strcmp (objname, objnames)))
+    obj = getstructure (objname, base);
+  else
+    error ("genpropdoc: unknown object %s", objname);
+  endif
+
+  ## Docstring
+  str = printdoc (objname, obj);
+
+  if (nargin == 2)
+    fid = fopen (fname,  "w+");
+    if (fid < 0)
+      error ("genpropdoc: couldn't open %s.", fname);
+    endif
+  else
+    fid = stdout;
+  endif
+
+  fprintf (fid, str);
+
+  if (nargin == 2)
+    fclose (fid);
+  endif
+
+endfunction
+
+function s = getdoc (objname, field, base)
+  ## Properties are represented by a struct with fields :
+  ##
+  ## -"doc": string to be printed verbatim after being expanded
+  ##   through expand_doc function.  Special keywords are:
+  ##   "__objname__" : replaced by the current object name;
+  ##   "__prop__"    : replaced by the current property name;
+  ##   "__modemsg__" : replaced by a message explaining that
+  ##                   the propmode will be toggled to "manual".
+  ##   You may also cross reference properties using the label format
+  ##   OBJNAMEPROPERTY, e.g, "@xref{XREFaxescolor, , axes color property}."
+  ##
+  ## -"valid": string that describes valid values for the current property.
+  ##   Use "packopt" function to join options with " | " separator
+  ##   and "markdef" to mark default among valid values between curly braces.
+  ##   If not provided, valid values for radio properties are automatically
+  ##   retrieved using set function.
+  ##
+  ## -"default": string.  If not provided the default value is automatically
+  ##   retrieved using get function.
+  ##
+  ## -"printdefault": a boolean (def. true) that specifies whether the
+  ##   default value should be printed.  It is useful for properties
+  ##   like root "screendepth" that default to screen dependant values.
+
+  packopt = @(c) strjoin (c, " | ");
+  markdef = @(s) ["@{" s "@}"];
+
+  ## Some generic templates:
+  valid_color = "colorspec";
+  valid_handle = "graphics handle";
+  valid_string = "string";
+  valid_fcn = packopt ({"string", "function handle"});
+  valid_cellstring = packopt ({"string", "cell array of strings"});
+  valid_2elvec = "two-element vector";
+  valid_3elvec = "three-element vector";
+  valid_4elvec = "four-element vector";
+  valid_vecmat = packopt ({"vector", "matrix"});
+  valid_scalmat = packopt ({"scalar", "matrix"});
+
+  doc_notimpl = "%s is not yet implemented for __objname__ objects.  \
+__prop__ is unused.";
+  doc_unused =  "__prop__ is unused.";
+
+  ## Initialize structure
+  if (isfield (base, field))
+    s = base.(field);
+  else
+    s = struct ("valid", "", "default", "", "doc", "", "printdefault", true);
+  endif
+
+  ## Base properties: Write generic documentation because it will be included
+  ## in the list of each graphics object.  If a given graphics object
+  ## interprets the property differently than others, then the doc will have
+  ## to be rewritten for this object.
+  if (strcmp (objname, "base"))
+    switch (field)
+      case "beingdeleted"
+      case "busyaction"
+      case "buttondownfcn"
+        s.valid = valid_fcn;
+      case "children"
+        s.doc = "Graphics handles of the __objname__'s children.";
+        s.valid = "vector of graphics handles";
+
+      case "clipping"
+        s.doc = "If __prop__ is @qcode{\"on\"}, the __objname__ is \
+clipped in its parent axes limits.";
+
+      case "createfcn"
+        s.doc = "Callback function executed immediately after __objname__ \
+has been created.  Function is set by using default property on root object, \
+e.g., @code{set (0, \"default__objname__createfcn\", \
+'disp (\"__objname__ created!\")')}.";
+        s.valid = valid_fcn;
+
+      case "deletefcn"
+        s.doc = "Callback function executed immediately before __objname__ \
+is deleted.";
+        s.valid = valid_fcn;
+
+      case "handlevisibility"
+        s.doc = "If __prop__ is @qcode{\"off\"}, the __objname__'s \
+handle is not visible in its parent's \"children\" property.";
+
+      case "hittest"
+      case "interruptible"
+      case "parent"
+        s.doc = "Handle of the parent graphics object.";
+        s.valid = valid_handle;
+
+      case "selected"
+      case "selectionhighlight"
+      case "tag"
+        s.doc = "A user-defined string to label the graphics object.";
+        s.valid = valid_string;
+
+      case "type"
+        s.doc = "Class name of the graphics object.  __prop__ is \
+always @qcode{\"__objname__\"}";
+        s.valid = valid_string;
+        s.printdefault = false;
+
+      case "uicontextmenu"
+        s.doc = "Graphics handle of the uicontextmenu object that is \
+currently associated to this __objname__ object.";
+        s.valid = valid_handle;
+        
+      case "userdata"
+        s.doc = "User-defined data to associate with the graphics object.";
+        s.valid = "Any Octave data";
+
+      case "visible"
+        s.doc = "If __prop__ is @qcode{\"off\"}, the __objname__ is \
+not rendered on screen.";
+    endswitch
+
+  ## Root properties:
+  elseif (strcmp (objname, "root"))
+    switch (field)
+      ## Overridden shared properties
+      case {"beingdeleted", "busyaction", "buttondownfcn", ...
+            "clipping", "createfcn", "deletefcn", "handlevisibility", ...
+            "hittest", "interruptible", "selected", ...
+            "selectionhighlight", "uicontextmenu", "visible"}
+        s.doc = doc_unused;
+
+      case "parent"
+        s.doc = "Root figure has no parent graphics object.  __prop__ \
+is always empty.";
+
+      ## Specific properties
+      case "callbackobject"
+        s.valid = valid_handle;
+
+      case "commandwindowsize"
+      case "currentfigure"
+        s.doc = "Graphics handle of the current figure.";
+        s.valid = valid_handle;
+
+      case "diary"
+        s.doc = "If __prop__ is @qcode{\"on\"}, the Octave command window \
+session is saved to file.  @xref{XREFrootdiaryfile, , @w{diaryfile property}}.";
+
+      case "diaryfile"
+        s.doc = "The name of the diary file.  \
+@xref{XREFdiary, , @w{diary function}}.";
+        s.valid = valid_string;
+
+      case "echo"
+        s.doc = "Control whether Octave displays commands executed from \
+scripts.  @xref{XREFecho, , @w{echo function}}.";
+
+      case "errormessage"
+        s.doc = "The last error message raised.  \
+@xref{XREFlasterr, , @w{lasterr function}}.";
+        s.valid = valid_string;
+
+      case "fixedwidthfontname"
+        s.valid = valid_string;
+
+      case "format"
+        s.doc = "This property is a wrapper around the @code{format} function.\
+  @xref{XREFformat, , @w{format function}}.";
+
+      case "formatspacing"
+        s.doc = "This property is a wrapper around the @code{format} function.\
+  @xref{XREFformat, , @w{format function}}.";
+
+      case "language"
+        s.valid = valid_string;
+
+      case "monitorpositions"
+        s.doc = doc_unused;
+        s.printdefault = false;
+
+      case "pointerlocation"
+        s.doc = doc_unused;
+        s.valid = valid_2elvec;
+
+      case "pointerwindow"
+        s.doc = doc_unused;
+        s.valid = valid_handle;
+
+      case "recursionlimit"
+        s.doc = "The maximum number of times a function can be called \
+recursively.  \
+@xref{XREFmax_recursion_depth, , @w{max_recursion_depth function}}.";
+        s.valid = "double";
+
+      case "screendepth"
+        s.valid = "double";
+        s.printdefault = false;
+
+      case "screenpixelsperinch"
+        s.valid = "double";
+        s.printdefault = false;
+
+      case "screensize"
+        s.valid = valid_4elvec;
+        s.printdefault = false;
+
+      case "showhiddenhandles"
+        s.doc = "If __prop__ is @qcode{\"on\"}, all graphics objects handles \
+are visible in their parents' children list, regardless of the value of their \
+@code{handlevisibility} property.";
+
+      case "units"
+    endswitch
+
+  ## Figure properties
+  elseif (strcmp (objname, "figure"))
+    switch (field)
+      ## Overridden shared properties
+      case "clipping"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "alphamap"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+      case "closerequestfcn"
+        s.valid = valid_fcn;
+
+      case "color"
+        s.doc = "Color of the figure background.  \
+@xref{Colors, , colorspec}.";
+        s.valid = valid_color;
+
+      case "colormap"
+        s.doc = "A matrix containing the RGB color map for the current axes.";
+        s.valid = "N-by-3 matrix";
+
+      case "currentaxes"
+        s.doc = "Handle to the graphics object of the current axes.";
+        s.valid = valid_handle;
+
+      case "currentcharacter"
+        s.doc = doc_unused;
+
+      case "currentobject"
+        s.valid = valid_handle;
+
+      case "currentpoint"
+        s.doc = "A 1-by-2 matrix which holds the coordinates of the point \
+over which the mouse pointer was when a mouse event occurred.  The X and Y \
+coordinates are in units defined by the figure's @code{units} property \
+and their origin is the lower left corner of the plotting area.\n\
+\n\
+Events which set @code{currentpoint} are\n\
+@table @asis\n\
+@item A mouse button was pressed\n\
+always\n\
+@item A mouse button was released\n\
+only if the figure's callback @code{windowbuttonupfcn} is defined\n\
+@item The pointer was moved while pressing the mouse button (drag)\n\
+only if the figure's callback @code{windowbuttonmotionfcn} is defined\n\
+@end table";
+        s.valid = valid_2elvec;
+
+      case "dockcontrols"
+        s.doc = doc_unused;
+
+      case "doublebuffer"
+      case "filename"
+        s.doc = "The filename used when saving the plot figure";
+        s.valid = valid_string;
+
+      case "integerhandle"
+        s.doc = "Assign the next lowest unused integer as the Figure number.";
+
+      case "inverthardcopy"
+      case "keypressfcn"
+        s.valid = valid_fcn;
+
+      case "keyreleasefcn"
+        s.doc = "With @code{keypressfcn}, the keyboard callback functions.  \
+These callback functions are called when a key is pressed/released \
+respectively.  The functions are called with two input arguments.  The first \
+argument holds the handle of the calling figure.  The second argument holds \
+an event structure which has the following members:\n\
+@table @code\n\
+@item Character:\n\
+The ASCII value of the key\n\
+@item Key:\n\
+Lowercase value of the key\n\
+@item Modifier:\n\
+A cell array containing strings representing the modifiers pressed with the \
+key.\n\
+@end table";
+        s.valid = valid_fcn;
+
+      case "menubar"
+        s.doc = "Control the display of the figure menu bar in the upper \
+left of the figure.";  
+
+      case "name"
+        s.doc = "Name to be displayed in the figure title bar.  The name is \
+displayed to the right of any title determined by the @code{numbertitle} \
+property.";
+        s.valid = valid_string;
+
+      case "nextplot"
+
+      case "numbertitle"
+        s.doc = "Display \"Figure\" followed by the numerical figure handle \
+value in the figure title bar.";
+
+      case "outerposition"
+        s.valid = valid_4elvec;
+
+      case "paperorientation"
+      case "paperposition"
+        s.doc = "Vector @code{[x0 y0 width height]} defining the position of \
+the figure (in @code{paperunits} units) on the printed page.\
+  __modemsg__.";
+        s.valid = valid_4elvec;
+
+      case "paperpositionmode"
+        s.doc = "If __prop__ is set to @qcode{\"auto\"}, the \
+@code{paperposition} property is automatically computed: the printed \
+figure will have the same size as the on-screen figure and will be centered \
+on the output page.";
+
+      case "papersize"
+        s.doc = "Vector @code{[width height]} defining the size of the \
+paper for printing.  Setting this property forces the @code{papertype} \
+property to be set to @qcode{\"<custom>\"}.";
+        s.valid = valid_2elvec;
+
+      case "papertype"
+        s.doc = "Name of the paper used for printed output.  \
+Setting __prop__ also changes @code{papersize} accordingly.";
+
+      case "paperunits"
+        s.doc = "The unit used to compute the @code{paperposition} property.";
+
+      case "pointer"
+        s.doc = doc_unused;
+      case "pointershapecdata"
+        s.doc = doc_unused;
+      case "pointershapehotspot"
+        s.doc = doc_unused;
+
+      case "position"
+        s.valid = valid_4elvec;
+
+      case "renderer"
+      case "renderermode"
+      case "resize"
+      case "resizefcn"
+        s.valid = valid_fcn;
+
+      case "selectiontype"
+        s.doc = doc_unused;
+
+      case "toolbar"
+        s.doc = doc_unused;
+
+      case "units"
+        s.doc = "The unit used to compute the @code{position} and \
+@code{outerposition} properties.";
+
+      case "windowbuttondownfcn"
+        s.doc = "@xref{XREFfigurewindowbuttonupfcn, , \
+@w{windowbuttonupfcn property}}.";
+        s.valid = valid_fcn;
+
+      case "windowbuttonmotionfcn"
+        s.doc = "@xref{XREFfigurewindowbuttonupfcn, , \
+@w{windowbuttonupfcn property}}.";
+        s.valid = valid_fcn;
+
+      case "windowbuttonupfcn"
+        s.doc = "With @code{windowbuttondownfcn} and \
+@code{windowbuttonmotionfcn}, the mouse callback functions.  These \
+callback functions are called when a mouse button is pressed, dragged, or \
+released respectively.  When these callback functions are executed, the \
+@code{currentpoint} property holds the current coordinates of the cursor.";
+        s.valid = valid_fcn;
+
+      case "windowkeypressfcn"
+        s.valid = valid_fcn;
+
+      case "windowkeyreleasefcn"
+        s.valid = valid_fcn;
+
+      case "windowscrollwheelfcn"
+        s.valid = valid_fcn;
+
+      case "windowstyle"
+      case "wvisual"
+      case "wvisualmode"
+      case "xdisplay"
+      case "xvisual"
+      case "xvisualmode"
+
+    endswitch
+
+  ## Axes properties
+  elseif (strcmp (objname, "axes"))
+    switch (field)
+      ## Overridden shared properties
+      case "clipping"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "activepositionproperty"
+      case "alim"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+      case "alimmode"
+      case "ambientlightcolor"
+        s.doc = sprintf (doc_notimpl, "Light");
+      case "box"
+        s.doc = "Control whether the axes has a surrounding box.";
+
+      case "cameraposition"
+        s.valid = valid_3elvec;
+
+      case "camerapositionmode"
+      case "cameratarget"
+        s.valid = valid_3elvec;
+
+      case "cameratargetmode"
+      case "cameraupvector"
+        s.valid = valid_3elvec;
+
+      case "cameraupvectormode"
+      case "cameraviewangle"
+        s.valid = "scalar";
+
+      case "cameraviewanglemode"
+      case "clim"
+        s.doc = "Define the limits for the color axis of image children.  \
+__modemsg__.  @xref{XREFpcolor, , @w{pcolor function}}.";
+        s.valid = valid_2elvec;
+
+      case "climmode"
+
+      case "color"
+        s.doc = "Color of the axes background.  @xref{Colors, , colorspec}.";
+        s.valid = valid_color;
+
+      case "colororder"
+        s.doc = "RGB values used by plot function for automatic line \
+coloring.";
+        s.valid = "N-by-3 RGB matrix";
+
+      case "currentpoint"
+        s.doc = "Matrix @code{[xf, yf, zf; xb, yb, zb]} which holds the \
+coordinates (in axes data units) of the point over which the mouse pointer \
+was when the mouse button was pressed.  If a mouse callback function is \
+defined, @code{currentpoint} holds the pointer coordinates at the time \
+the mouse button was pressed.  For 3-D plots, the first row of the returned \
+matrix specifies the point nearest to the current camera position and the \
+second row the furthest point.  The two points forms a line which is \
+perpendicular to the screen.";
+        s.valid = "2-by-3 matrix";
+
+      case "dataaspectratio"
+        s.doc = "Specify the relative height and width of the data \
+displayed in the axes.  Setting @code{dataaspectratio} to \
+@w{@code{[1, 2]}} causes the length of one unit as displayed on the x-axis \
+to be the same as the length of 2 units on the y-axis.  __modemsg__.";
+        s.valid = valid_3elvec;
+
+      case "dataaspectratiomode"
+      case "drawmode"
+      case "fontangle"
+      case "fontname"
+        s.doc = "Name of the font used for axes annotations.";
+        s.valid = valid_string;
+
+      case "fontsize"
+        s.doc = "Size of the font used for axes annotations.  \
+@xref{XREFaxesfontunits, , @w{fontunits property}}.";
+        s.valid = "scalar";
+
+      case "fontunits"
+        s.doc = "Unit used to interpret @code{fontsize} property.";
+
+      case "fontweight"
+
+      case "gridlinestyle"
+      case "interpreter"
+
+      case "layer"
+        s.doc = "Control whether the axes is drawn below child graphics \
+objects (ticks, labels, etc. covered by plotted objects) or above.";
+
+      case "linestyleorder"
+
+      case "linewidth"
+      case "minorgridlinestyle"
+      case "mousewheelzoom"
+        s.doc = "Fraction of axes limits to zoom for each wheel movement."; 
+        s.valid = "scalar in the range (0, 1)";
+
+      case "nextplot"
+      case "outerposition"
+        s.doc = "Specify the position of the plot including titles, \
+axes, and legend.  The four elements of the vector are the \
+coordinates of the lower left corner and width and height of the \
+plot, in units normalized to the width and height of the plot \
+window.  For example, @code{[0.2, 0.3, 0.4, 0.5]} sets the lower \
+left corner of the axes at @math{(0.2, 0.3)} and the width and \
+height to be 0.4 and 0.5 respectively.  \
+@xref{XREFaxesposition, , @w{position property}}.";
+        s.valid = valid_4elvec;
+
+      case "plotboxaspectratio"
+      case "plotboxaspectratiomode"
+      case "position"
+        s.doc = "Specify the position of the plot excluding titles, \
+axes, and legend.  The four elements of the vector are the \
+coordinates of the lower left corner and width and height of the \
+plot, in units normalized to the width and height of the plot \
+window.  For example, @code{[0.2, 0.3, 0.4, 0.5]} sets the lower \
+left corner of the axes at @math{(0.2, 0.3)} and the width and \
+height to be 0.4 and 0.5 respectively.  \
+@xref{XREFaxesouterposition, , @w{outerposition property}}.";
+        s.valid = valid_4elvec;
+
+      case "projection"
+
+      case "tickdir"
+        s.doc = "Control whether axes tick marks project \"in\" to the plot \
+box or \"out\".";
+
+      case "tickdirmode"
+
+      case "ticklength"
+        s.doc = "Two-element vector @code{[2Dlen 3Dlen]} specifying the \
+length of the tickmarks relative to the longest visible axis.";
+        s.valid = valid_2elvec;
+
+      case "tightinset"
+      case "title"
+        s.doc = "Graphics handle of the title text object.";
+        s.valid = valid_handle;
+
+      case "units"
+      case "view"
+        s.doc = "Two-element vector @code{[azimuth elevation]} specifying \
+the viewpoint for three-dimensional plots";
+        s.valid = valid_2elvec;
+
+      case "xaxislocation"
+      case "xcolor"
+        s.doc = "Color of the x-axis.  @xref{Colors, , colorspec}.";
+        s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"});
+
+      case "xdir"
+      case "xgrid"
+        s.doc = "Control whether major x grid lines are displayed.";
+
+      case "xlabel"
+        s.doc = "Graphics handle of the x label text object.";
+        s.valid = valid_handle;
+
+      case "xlim"
+        s.doc = "Two-element vector @code{[xmin xmax]} specifying the limits \
+for the x-axis.  __modemsg__.  @xref{XREFxlim, , @w{xlim function}}.";
+        s.valid = valid_2elvec;
+
+      case "xlimmode"
+      case "xminorgrid"
+        s.doc = "Control whether minor x grid lines are displayed.";
+
+      case "xminortick"
+      case "xscale"
+      case "xtick"
+        s.doc = "Position of x tick marks.  __modemsg__.";
+        s.valid = "vector";
+
+      case "xticklabel"
+        s.doc = "Labels of x tick marks.  __modemsg__.";
+        s.valid = valid_cellstring;
+
+      case "xticklabelmode"
+      case "xtickmode"
+      case "yaxislocation"
+      case "ycolor"
+        s.doc = "Color of the y-axis.  @xref{Colors, , colorspec}.";
+        s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"});
+
+      case "ydir"
+      case "ygrid"
+        s.doc = "Control whether major y grid lines are displayed.";
+
+      case "ylabel"
+        s.doc = "Graphics handle of the y label text object.";
+        s.valid = valid_handle;
+
+      case "ylim"
+        s.doc = "Two-element vector @code{[ymin ymax]} specifying the limits \
+for the y-axis.  __modemsg__.  @xref{XREFylim, , @w{ylim function}}.";
+        s.valid = valid_2elvec;
+
+      case "ylimmode"
+      case "yminorgrid"
+        s.doc = "Control whether minor y grid lines are displayed.";
+
+      case "yminortick"
+      case "yscale"
+      case "ytick"
+        s.doc = "Position of y tick marks.  __modemsg__.";
+        s.valid = "vector";
+
+      case "yticklabel"
+        s.doc = "Labels of y tick marks.  __modemsg__.";
+        s.valid = valid_cellstring;
+
+      case "yticklabelmode"
+      case "ytickmode"
+      case "zcolor"
+        s.doc = "Color of the z-axis.  @xref{Colors, , colorspec}.";
+        s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"});
+
+      case "zdir"
+      case "zgrid"
+        s.doc = "Control whether major z grid lines are displayed.";
+
+      case "zlabel"
+        s.doc = "Graphics handle of the z label text object.";
+        s.valid = valid_handle;
+
+      case "zlim"
+        s.doc = "Two-element vector @code{[zmin zmaz]} specifying the limits \
+for the z-axis.  __modemsg__.  @xref{XREFzlim, , @w{zlim function}}.";
+        s.valid = valid_2elvec;
+
+      case "zlimmode"
+      case "zminorgrid"
+        s.doc = "Control whether minor z grid lines are displayed.";
+
+      case "zminortick"
+      case "zscale"
+      case "ztick"
+        s.doc = "Position of z tick marks.  __modemsg__.";
+        s.valid = "vector";
+
+      case "zticklabel"
+        s.doc = "Labels of z tick marks.  __modemsg__.";
+        s.valid = valid_cellstring;
+
+      case "zticklabelmode"
+      case "ztickmode"
+    endswitch
+
+  ## Line properties
+  elseif (strcmp (objname, "line"))
+    switch (field)
+      ## Overridden shared properties
+      case "children"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "color"
+        s.doc = "Color of the line object.  @xref{Colors, , colorspec}.";
+        s.valid = valid_color;
+
+      case "displayname"
+        s.doc = "Text for the legend entry corresponding to this line.";
+        s.valid = valid_cellstring;
+
+      case "erasemode"
+        s.doc = doc_unused;
+
+      case "interpreter"
+      case "linestyle"
+        s.doc = "@xref{Line Styles}.";
+
+      case "linewidth"
+        s.doc = "Width of the line object measured in points.";
+
+      case "marker"
+        s.doc = "Shape of the marker for each data point.  \
+@xref{Marker Styles}.";
+
+      case "markeredgecolor"
+        s.doc = "Color of the edge of the markers.  When set to \
+@qcode{\"auto\"}, the marker edges have the same color as the line.  If set \
+to @qcode{\"none\"}, no marker edges are displayed.  This property can also \
+be set to any color.  @xref{Colors, , colorspec}.";
+
+      case "markerfacecolor"
+        s.doc = "Color of the face of the markers.  When set to \
+@qcode{\"auto\"}, the marker faces have the same color as the line.  If set \
+to @qcode{\"none\"}, the marker faces are not displayed.  This property \
+can also be set to any color.  @xref{Colors, , colorspec}.";
+
+      case "markersize"
+        s.doc = "Size of the markers measured in points.";
+        s.valid = "scalar";
+
+      case "xdata"
+        s.doc = "Vector of x data to be plotted.";
+        s.valid = "vector";
+
+      case "xdatasource"
+        s.doc = "Name of a vector in the current base workspace to use as \
+x data.";
+        s.valid = valid_string;
+
+      case "ydata"
+        s.doc = "Vector of y data to be plotted.";
+        s.valid = "vector";
+
+      case "ydatasource"
+        s.doc = "Name of a vector in the current base workspace to use as \
+y data.";
+        s.valid = valid_string;
+
+      case "zdata"
+        s.doc = "Vector of z data to be plotted.";
+        s.valid = "vector";
+
+      case "zdatasource"
+        s.doc = "Name of a vector in the current base workspace to use as \
+z data.";
+        s.valid = valid_string;
+
+    endswitch
+
+  ## Text properties
+  elseif (strcmp (objname, "text"))
+    switch (field)
+      ## Overridden shared properties
+      case "children"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "backgroundcolor"
+        s.doc = sprintf (doc_notimpl, "Background area");
+        s.valid = valid_color;
+
+      case "color"
+        s.doc = "Color of the text.  @xref{Colors, ,colorspec}.";
+        s.valid = valid_color;
+
+      case "displayname"
+      case "edgecolor"
+        s.doc = sprintf (doc_notimpl, "Background area");
+        s.valid = valid_color;
+
+      case "editing"
+      case "erasemode"
+        s.doc = doc_unused;
+
+      case "extent"
+      case "fontangle"
+        s.doc = "Flag whether the font is italic or normal.  \
+@code{fontangle} is currently unused.";
+
+      case "fontname"
+        s.doc = "The font used for the text.";
+        s.valid = valid_string;
+
+      case "fontsize"
+        s.doc = "The font size of the text as measured in \
+@code{fontunits}.";
+        s.valid = "scalar";
+
+      case "fontunits"
+        s.doc = "The units used to interpret @code{fontsize} property.";
+
+      case "fontweight"
+        s.doc = "Control variant of base font used: bold, light, normal, etc.";
+
+      case "horizontalalignment"
+      case "interpreter"
+      case "linestyle"
+        s.doc = sprintf (doc_notimpl, "Background area");
+
+      case "linewidth"
+        s.doc = sprintf (doc_notimpl, "Background area");
+        s.valid = "scalar";
+
+      case "margin"
+        s.doc = sprintf (doc_notimpl, "Background area");
+        s.valid = "scalar";
+
+      case "position"
+        s.doc = "Vector @code{[X0 Y0 Z0]} where X0, Y0 and Z0 indicate the \
+position of the text anchor as defined by @code{verticalalignment} and \
+@code{horizontalalignment}.";
+        s.valid = valid_4elvec;
+
+      case "rotation"
+        s.doc = "The angle of rotation for the displayed text, \
+measured in degrees.";
+        s.valid = "scalar";
+
+      case "string"
+        s.doc = "The text object string content.";
+        s.valid = valid_string;
+
+      case "units"
+      case "verticalalignment"
+    endswitch
+
+  ## Image properties
+  elseif (strcmp (objname, "image"))
+    switch (field)
+      ## Overridden shared properties
+      case "children"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "alphadata"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "alphadatamapping"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+
+      case "cdata"
+        s.valid = "matrix";
+
+      case "cdatamapping"
+      case "displayname"
+        s.doc = "Text for the legend entry corresponding to this image.";
+        s.valid = valid_cellstring;
+
+      case "erasemode"
+        s.doc = doc_unused;
+
+      case "xdata"
+        s.doc = "Two-element vector @code{[xmin xmax]} specifying the x \
+coordinates of the first and last columns of the image.\n\
+\n\
+Setting @code{xdata} to the empty matrix ([]) will restore the default value \
+of @code{[1 columns(image)]}.";
+        s.valid = valid_2elvec;
+
+      case "ydata"
+        s.doc = "Two-element vector @code{[ymin ymax]} specifying the y \
+coordinates of the first and last rows of the image.\n\
+\n\
+Setting @code{ydata} to the empty matrix ([]) will restore the default value \
+of @code{[1 rows(image)]}.";
+        s.valid = valid_2elvec;
+
+    endswitch
+
+  ## Surface properties
+  elseif (strcmp (objname, "surface"))
+    switch (field)
+      ## Overridden shared properties
+      case "children"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "alphadata"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "alphadatamapping"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+
+      case "ambientstrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "backfacelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "cdata"
+        s.valid = "matrix";
+
+      case "cdatamapping"
+      case "cdatasource"
+      case "diffusestrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "displayname"
+        s.doc = "Text for the legend entry corresponding to this surface.";
+
+      case "edgealpha"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = "scalar";
+
+      case "edgecolor"
+      case "edgelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "erasemode"
+        s.doc = doc_unused;
+      case "facealpha"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "facecolor"
+      case "facelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "interpreter"
+      case "linestyle"
+        s.doc = "@xref{Line Styles}.";
+
+      case "linewidth"
+        s.doc = "@xref{XREFlinelinewidth, , @w{line linewidth property}}.";
+
+      case "marker"
+        s.doc = "@xref{Marker Styles}.";
+
+      case "markeredgecolor"
+        s.doc = "@xref{XREFlinemarkeredgecolor, , \
+@w{line markeredgecolor property}}.";
+
+      case "markerfacecolor"
+        s.doc = "@xref{XREFlinemarkerfacecolor, , \
+@w{line markerfacecolor property}}.";
+
+      case "markersize"
+        s.doc = "@xref{XREFlinemarkersize, , \
+@w{line markersize property}}.";
+        s.valid = "scalar";
+
+      case "meshstyle"
+      case "normalmode"
+      case "specularcolorreflectance"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "specularexponent"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "specularstrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "vertexnormals"
+      case "xdata"
+        s.valid = "matrix";
+
+      case "xdatasource"
+      case "ydata"
+        s.valid = "matrix";
+
+      case "ydatasource"
+      case "zdata"
+        s.valid = "matrix";
+
+      case "zdatasource"
+    endswitch
+
+  ## Patch properties
+  elseif (strcmp (objname, "patch"))
+    switch (field)
+      ## Overridden shared properties
+      case "children"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "alphadatamapping"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+
+      case "ambientstrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+        s.valid = "scalar";
+
+      case "backfacelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "cdata"
+        s.doc = "Data defining the patch object color.\n\
+Patch color can be defined for faces or for vertices.\n\
+\n\
+If @code{cdata} is a scalar index into the current colormap or a RGB triplet, \
+it defines the color of all faces.\n\
+\n\
+If @code{cdata} is an N-by-1 vector of indices or an N-by-3 (RGB) matrix, \
+it defines the color of each one of the N faces.\n\
+\n\
+If @code{cdata} is an N-by-M or an N-by-M-by-3 (RGB) matrix, \
+it defines the color at each vertex.";
+        s.valid = valid_scalmat;
+
+      case "diffusestrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+        s.valid = "scalar";
+
+      case "displayname"
+        s.doc = "Text of the legend entry corresponding to this patch.";
+
+      case "edgealpha"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "edgecolor"
+      case "edgelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "erasemode"
+        s.doc = doc_unused;
+
+      case "facealpha"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "facecolor"
+        ## Don't provide a default value, and mark colorspec with
+        ## braces, this forces the default rgb triplet to be displayed
+        s.valid = packopt ({markdef(valid_color), ...
+                            "@qcode{\"none\"}", ...
+                            "@qcode{\"flat\"}", ...
+                            "@qcode{\"interp\"}"});
+
+      case "facelighting"
+        s.doc = sprintf (doc_notimpl, "Light");
+
+      case "faces"
+      case "xdata"
+        s.valid = valid_vecmat;
+
+      case "facevertexalphadata"
+        s.doc = sprintf (doc_notimpl, "Transparency");
+        s.valid = valid_scalmat;
+
+      case "facevertexcdata"
+      case "interpreter"
+        s.doc = doc_unused;
+
+      case "linestyle"
+      case "linewidth"
+      case "marker"
+        s.doc = "@xref{XREFlinemarker, , @w{line marker property}}.";
+
+      case "markeredgecolor"
+        s.doc = "@xref{XREFlinemarkeredgecolor, , \
+@w{line markeredgecolor property}}.";
+
+      case "markerfacecolor"
+        s.doc = "@xref{XREFlinemarkerfacecolor, , \
+@w{line markerfacecolor property}}.";
+
+      case "markersize"
+        s.doc = "@xref{XREFlinemarkersize, , @w{line markersize property}}.";
+        s.valid = "scalar";
+
+      case "normalmode"
+      case "specularcolorreflectance"
+        s.doc = sprintf (doc_notimpl, "Light");
+        s.valid = "scalar";
+
+      case "specularexponent"
+        s.doc = sprintf (doc_notimpl, "Light");
+        s.valid = "scalar";
+
+      case "specularstrength"
+        s.doc = sprintf (doc_notimpl, "Light");
+        s.valid = "scalar";
+
+      case "vertexnormals"
+      case "vertices"
+        s.valid = valid_vecmat;
+
+      case "xdata"
+        s.valid = valid_vecmat;
+
+      case "ydata"
+        s.valid = valid_vecmat;
+
+      case "zdata"
+        s.valid = valid_vecmat;
+
+    endswitch
+  endif
+
+  ## Replace keywords
+  if (! isempty (s.doc) && ! strcmp (objname, "base"))
+    s.doc = expand_doc (s.doc, field, objname);
+  endif
+
+endfunction
+
+function strout = expand_doc (strin, field, objname)
+  strout = strrep (strin, "__objname__", objname);
+  strout = strrep (strout, "__prop__", ["@code{" field "}"]);
+
+  modemsg = "Setting @code{%s} also forces the @code{%smode} \
+property to be set to @qcode{\"manual\"}";
+  modemsg = sprintf (modemsg, field, field);
+  strout = strrep (strout, "__modemsg__", modemsg);
+endfunction
+
+function s = getstructure (objname, base = [])
+  hf = [];
+  if (! strcmp (objname, "root"))
+    ## Use an improbable number to avoid ishandle to return true for 1
+    hf = figure (2265465, "visible", "off");
+  endif
+
+  ## Build a default object to extract its properties list and default values.
+  if (strcmp (objname, "base"))
+    ## Base properties are extracted from hggroup that only have 2 additional
+    ## regular (non-hidden) properties, "displayname" and "erasemode".
+    h = hggroup ();
+  elseif (strcmp (objname, "root"))
+    h = 0;
+  elseif (strcmp (objname, "figure"))
+    h = hf;
+  else
+    eval (["h = " objname " ();"]);
+  endif
+
+  gprop = get (h);
+  sprop = set (h);
+
+  fields = fieldnames (gprop);
+  nf = numel (fields);
+  args = cell (2*nf, 1);
+  for ii = 1:nf
+    field = fields{ii};
+
+    ## Get hard coded documentation
+    val = getdoc (objname, field, base);
+
+    ## Extract the default values that are not hard coded in getdoc
+    if (isempty (val.default) && val.printdefault)
+      val.default = getdefault (h, objname, field);
+    endif
+
+    val.isreadonly = ! isfield (sprop, field);
+
+    ## Extract the valid values that are not hard coded in getdoc
+    if (! val.isreadonly && isempty (val.valid))
+      val.valid = sprop.(field);
+      if (! isempty (val.valid) && iscellstr (val.valid))
+        ## Add double quotes around string radio properties
+        val.valid = cellfun (@(s) ["@qcode{\"" s "\"}"], val.valid,
+                             "uniformoutput", false);
+        val.valid = strjoin (val.valid, " | ");
+      endif
+    endif
+
+    args{2*(ii-1)+1} = field;
+    args{2*ii} = val;
+  endfor
+
+  ## Build struct and remove unused fields in base properties
+  s = struct (args{:});
+
+  if (strcmp (objname, "base"))
+    s = rmfield (s, {"displayname", "erasemode"});
+  endif
+
+  if (isfigure (hf))
+    close (hf)
+  endif
+
+endfunction
+
+function def = getdefault (h, objname, field)
+  ## This function is meant to be run without initialization file so
+  ## that the properties we get are the default.
+  def = get (h, field);
+
+  ## Don't print default values for graphics handles
+  if (isscalar (def) && def != 0 && ishandle (def))
+    def = "";
+  else
+    if (ischar (def))
+      def = ['@qcode{"' def '"}'];
+    else
+      if ((isvector (def) && numel (def) < 5) || isempty (def))
+        ## Use disp to print the default value for short vectors and
+        ## empty values
+        str = disp (def);
+        str(end) = [];          # remove linefeed
+        str = strtrim (str);    # remove leading space
+
+        ## Add [] around vector values
+        if (ismatrix (def) && numel (def) > 1)
+          str = ["[" str "]"];
+          ## Add ";" between columns vector values
+          if (rows (def) != 1)
+            str = strrep (str, "\n", "; ");
+          endif
+        endif
+
+        ## Replace texinfo reserved characters
+        def = strrep (str, "{", "@{");
+        def = strrep (def, "}", "@}");
+        def = strrep (def, "@", "@@");
+
+        def = ["@code{" def "}"];
+      else
+        args = arrayfun (@(x) num2str (x), size (def), "uniformoutput", false);
+        def = [strjoin(args, "-by-") " " class(def)];
+      endif
+    endif
+  endif
+
+endfunction
+
+function str = printdoc (objname, obj)
+  ## Sort fields so that they appear in alphabetic order in the manual
+  fields = sort (fieldnames (obj));
+  nf = numel (fields);
+
+  ## File header and begining of properties table
+  str = [warn_autogen() "\n\n@table @asis"];
+
+  for ii = 1:nf
+    field = fields{ii};
+    str = sprintf ("%s\n\n", str);
+
+    ## @anchor: cross reference using XREFobjnamefield label
+    ## Concept index: call info from octave with 'doc ("objname field")'
+    str = sprintf ("%s@anchor{XREF%s%s}\n@cindex %s %s\n",
+                   str, objname, field, objname, field);
+
+    ## Item
+    str = sprintf ("%s@item @code{%s}", str, field);
+
+    ## Mark item read-only if needed
+    if (obj.(field).isreadonly)
+      str = sprintf ("%s (read-only):", str);
+    else
+      str = sprintf ("%s:", str);
+    endif
+
+    ## Print valid and default values
+    tmp = print_options (obj.(field).valid,
+                         obj.(field).default);
+    if (! isempty (tmp))
+      str = sprintf ("%s %s\n", str, tmp);
+    else
+      str = sprintf ("%s\n", str);
+    endif
+
+    ## Print documentation
+    str = sprintf ("%s%s\n", str, obj.(field).doc);
+  endfor
+
+  ## End of properties table
+  str = sprintf ("%s\n@end table", str);
+
+endfunction
+
+function str = warn_autogen ()
+  str = "@c DO NOT EDIT!  Generated automatically by genpropdoc.m.\n\
+\n\
+@c Copyright (C) 2014-2015 Pantxo Diribarne\n\
+@c\n\
+@c This file is part of Octave.\n\
+@c\n\
+@c Octave is free software; you can redistribute it and/or modify it\n\
+@c under the terms of the GNU General Public License as published by the\n\
+@c Free Software Foundation; either version 3 of the License, or (at\n\
+@c your option) any later version.\n\
+@c\n\
+@c Octave is distributed in the hope that it will be useful, but WITHOUT\n\
+@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
+@c FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\n\
+@c for more details.\n\
+@c\n\
+@c You should have received a copy of the GNU General Public License\n\
+@c along with Octave; see the file COPYING.  If not, see\n\
+@c <http://www.gnu.org/licenses/>.";
+endfunction
+
+function str = print_options (val, default)
+  str = "";
+  if (! isempty (val))
+    tmp = strrep (val, default, ["@{" default "@}"]);
+    if (length (tmp) == length (val) && ! isempty (default))
+      str = [tmp ", def. " default];
+    else
+      str = tmp;
+    endif
+  elseif (! isempty (default))
+    str = ["def. " default];
+  endif
+endfunction
--- a/doc/interpreter/geometry.txi
+++ b/doc/interpreter/geometry.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2007-2013 John W. Eaton and David Bateman
+@c Copyright (C) 2007-2015 John W. Eaton and David Bateman
 @c
 @c This file is part of Octave.
 @c
@@ -20,7 +20,7 @@
 @chapter Geometry
 
 Much of the geometry code in Octave is based on the Qhull
-library@footnote{Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T.,
+library@footnote{@nospell{Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T.},
 @cite{The Quickhull Algorithm for Convex Hulls}, ACM Trans. on Mathematical
 Software, 22(4):469--483, Dec 1996, @url{http://www.qhull.org}}.
 Some of the documentation for Qhull, particularly for the options that
@@ -50,15 +50,11 @@
 
 @DOCSTRING(delaunay)
 
-The 3- and N-dimensional extension of the Delaunay triangulation are
-given by @code{delaunay3} and @code{delaunayn} respectively.
-@code{delaunay3} returns a set of tetrahedra that satisfy the
+For 3-D inputs @code{delaunay} returns a set of tetrahedra that satisfy the
 Delaunay circum-circle criteria.  Similarly, @code{delaunayn} returns the
 N-dimensional simplex satisfying the Delaunay circum-circle criteria.
 The N-dimensional extension of a triangulation is called a tessellation.
 
-@DOCSTRING(delaunay3)
-
 @DOCSTRING(delaunayn)
 
 An example of a Delaunay triangulation of a set of points is
@@ -417,12 +413,10 @@
 An important use of the Delaunay tessellation is that it can be used to
 interpolate from scattered data to an arbitrary set of points.  To do
 this the N-simplex of the known set of points is calculated with
-@code{delaunay}, @code{delaunay3} or @code{delaunayn}.  Then the
-simplices in to which the desired points are found are
-identified.  Finally the vertices of the simplices are used to
-interpolate to the desired points.  The functions that perform this
-interpolation are @code{griddata}, @code{griddata3} and
-@code{griddatan}.
+@code{delaunay} or @code{delaunayn}.  Then the simplices in to which the
+desired points are found are identified.  Finally the vertices of the simplices
+are used to interpolate to the desired points.  The functions that perform this
+interpolation are @code{griddata}, @code{griddata3} and @code{griddatan}.
 
 @DOCSTRING(griddata)
 
@@ -444,8 +438,7 @@
 @end example
 
 @noindent
-that interpolates from a random scattering of points, to a uniform
-grid.
+that interpolates from a random scattering of points, to a uniform grid.
 @ifnotinfo
 The output of the above can be seen in @ref{fig:griddata}.
 
--- a/doc/interpreter/geometryimages.m
+++ b/doc/interpreter/geometryimages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/doc/interpreter/grammar.txi
+++ b/doc/interpreter/grammar.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -49,9 +49,8 @@
 @item @code{function} @tab @code{global} @tab @code{if}
 @item @code{methods} @tab @code{otherwise} @tab @code{parfor}
 @item @code{persistent} @tab @code{properties} @tab @code{return}
-@item @code{static} @tab @code{switch} @tab @code{try}
-@item @code{until} @tab @code{unwind_protect} @tab @code{unwind_protect_cleanup}
-@item @code{while}
+@item @code{switch} @tab @code{try} @tab @code{until}
+@item @code{unwind_protect} @tab @code{unwind_protect_cleanup} @tab @code{while}
 @end multitable
 
 The function @code{iskeyword} can be used to quickly check whether an
new file mode 100644
--- /dev/null
+++ b/doc/interpreter/graphics_properties.mk
@@ -0,0 +1,39 @@
+GRAPH_PROP_TEXI_SRC= \
+  plot-axesproperties.texi \
+  plot-figureproperties.texi \
+  plot-imageproperties.texi \
+  plot-lineproperties.texi \
+  plot-patchproperties.texi \
+  plot-rootproperties.texi \
+  plot-surfaceproperties.texi \
+  plot-textproperties.texi
+
+define gen-propdoc-texi
+  rm -f $@-t $@ && \
+  $(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval "genpropdoc ('$(1)');" > $@-t && \
+  mv $@-t $@
+endef
+
+plot-axesproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,axes)
+
+plot-figureproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,figure)
+
+plot-imageproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,image)
+
+plot-lineproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,line)
+
+plot-patchproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,patch)
+
+plot-rootproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,root)
+
+plot-surfaceproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,surface)
+
+plot-textproperties.texi: genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,text)
--- a/doc/interpreter/gui.txi
+++ b/doc/interpreter/gui.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2012-2013 Rik Wehbring
+@c Copyright (C) 2012-2015 Rik Wehbring
 @c
 @c This file is part of Octave.
 @c
@@ -20,13 +20,15 @@
 @chapter GUI Development
 
 Octave is principally a batch or command-line language.  However, it does
-offer some limited features for constructing graphical interfaces for
-interacting with users.
+offer some features for constructing graphical interfaces that interact with
+users.
 
-The GUI elements available are I/O dialogs and a progress bar.  For example,
-rather than hardcoding a filename for output results a script can open a dialog
-box and allow the user to choose a file.  Similarly, if a calculation is
-expected to take a long time a script can display a progress bar.
+The GUI elements available are I/O dialogs, a progress bar, and UI elements
+for plot windows.  For example, rather than hardcoding a filename for output
+results a script can open a dialog box and allow the user to choose a file.
+Similarly, if a calculation is expected to take a long time a script can
+display a progress bar.  The various UI elements can be used to fully customize
+the plot window with menubars, context menus, 
 
 Several utility functions make it possible to store private data for use with
 a GUI which will not pollute the user's variable space.
@@ -38,6 +40,7 @@
 @menu
 * I/O Dialogs::
 * Progress Bar::
+* UI Elements::
 * GUI Utility Functions::
 * User-Defined Preferences::
 @end menu
@@ -61,12 +64,31 @@
 
 @DOCSTRING(waitbar)
 
+@node UI Elements
+@section UI Elements
+
+The @nospell{ui*} series of functions work best with the @code{qt} graphics
+toolkit, although some functionality is available with the @code{fltk} toolkit.
+There is no support for the @code{gnuplot} toolkit.
+
+@DOCSTRING(uicontextmenu)
+
+@DOCSTRING(uicontrol)
+
+@DOCSTRING(uipanel)
+
+@DOCSTRING(uipushtool)
+
+@DOCSTRING(uitoggletool)
+
+@DOCSTRING(uitoolbar)
+
 @node GUI Utility Functions
 @section GUI Utility Functions
 
 These functions do not implement a GUI element but are useful when developing
-programs that do.  @strong{Warning:} The functions @code{uiwait},
-@code{uiresume}, and @code{waitfor} are only available for the FLTK tooolkit.
+programs that do.  The functions @code{uiwait}, @code{uiresume}, and
+@code{waitfor} are only available with the @code{qt} or @code{fltk} toolkits.
 
 @DOCSTRING(desktop)
 
@@ -74,6 +96,8 @@
 
 @DOCSTRING(guihandles)
 
+@DOCSTRING(have_window_system)
+
 @DOCSTRING(isguirunning)
 
 @DOCSTRING(uiwait)
--- a/doc/interpreter/image.txi
+++ b/doc/interpreter/image.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -84,11 +84,11 @@
 capable of reading them all.  Because of this, the function
 @code{imformats} keeps a configurable list of available formats,
 their extensions, and what functions should the image IO functions
-use.  This allows to expand Octave's image IO capabilities by
+use.  This allows one to expand Octave's image IO capabilities by
 creating functions aimed at acting on specific file formats.
 
 While it would be possible to call the extra functions directly,
-properly configuring Octave with @code{imformats} allows to keep a
+properly configuring Octave with @code{imformats} allows one to keep a
 consistent code that is abstracted from file formats.
 
 It is important to note that a file format is not actually defined by its
@@ -164,6 +164,8 @@
 
 @DOCSTRING(copper)
 
+@DOCSTRING(cubehelix)
+
 @DOCSTRING(flag)
 
 @DOCSTRING(gray)
--- a/doc/interpreter/images.awk
+++ b/doc/interpreter/images.awk
@@ -1,4 +1,7 @@
 BEGIN {
+  print "## DO NOT EDIT -- generated from module-files by config-module.awk";
+  print "";
+
   exts[1] = "eps";
   exts[2] = "pdf";
   exts[3] = "png";
@@ -26,7 +29,7 @@
 
     for (j = 2; j <= NF; j++) {
       printf ("%s.%s: %s\n", $j, ext, script);
-      printf ("\t$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n",
+      printf ("\t$(AM_V_GEN)$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n",
               basename, $j, ext);
     }
   }
--- a/doc/interpreter/install.txi
+++ b/doc/interpreter/install.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -288,8 +288,7 @@
 @item Qhull
 Computational geometry library (@url{http://www.qhull.org}).  Qhull is
 required to provide the functions @code{convhull}, @code{convhulln},
-@code{delaunay}, @code{delaunay3}, @code{delaunayn}, @code{voronoi}, and
-@code{voronoin}.
+@code{delaunay}, @code{delaunayn}, @code{voronoi}, and @code{voronoin}.
 
 @item QRUPDATE
 QR factorization updating library
@@ -744,6 +743,7 @@
 Suggestions on how to compile ATLAS would be most welcome.
 
 @item @sc{glpk}
+
 @item Qhull (@url{http://www.qhull.org})
 
 Both @sc{glpk} and Qhull use @code{int} internally so maximum problem
@@ -856,7 +856,7 @@
 
 @noindent
 in the kernel configuration files (typically found in the directory
-@file{/sys/i386/conf}.  After making this change, you'll need to rebuild
+@file{/sys/i386/conf}).  After making this change, you'll need to rebuild
 the kernel, install it, and reboot.
 
 @item
@@ -1036,3 +1036,4 @@
 @env{FFLAGS} is set to @qcode{"-O"}.
 
 @end itemize
+
--- a/doc/interpreter/interp.txi
+++ b/doc/interpreter/interp.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2007-2013 John W. Eaton
+@c Copyright (C) 2007-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -176,7 +176,3 @@
 @end float
 @end ifnotinfo
 
-In additional the support function @code{bicubic} that underlies the
-cubic interpolation of @code{interp2} function can be called directly.
-
-@DOCSTRING(bicubic)
--- a/doc/interpreter/interpimages.m
+++ b/doc/interpreter/interpimages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/doc/interpreter/intro.txi
+++ b/doc/interpreter/intro.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -334,9 +334,10 @@
 
 @noindent
 The function @code{lsode} uses the Livermore Solver for Ordinary
-Differential Equations, described in A. C. Hindmarsh, @cite{ODEPACK, a
-Systematized Collection of ODE Solvers}, in: Scientific Computing, R. S.
-Stepleman et al. (Eds.), North-Holland, Amsterdam, 1983, pages 55--64.
+Differential Equations, described in @nospell{A. C. Hindmarsh},
+@cite{ODEPACK, a Systematized Collection of ODE Solvers}, in: Scientific
+Computing, @nospell{R. S. Stepleman} et al. (Eds.), North-Holland, Amsterdam,
+1983, pages 55--64.
 
 @subsection Producing Graphical Output
 
--- a/doc/interpreter/io.txi
+++ b/doc/interpreter/io.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -392,6 +392,10 @@
 interpret the format template differently in order to improve the
 performance of printing vector and matrix values.
 
+Implementation Note: For compatibility with @sc{matlab}, escape sequences in
+the template string (e.g., @qcode{"@xbackslashchar{}n"} => newline) are
+expanded even when the template string is defined with single quotes.
+
 @DOCSTRING(printf)
 
 @DOCSTRING(fprintf)
@@ -616,10 +620,26 @@
 @end table
 
 If the syntax of a conversion specification is invalid, unpredictable
-things will happen, so don't do this.  If there aren't enough function
-arguments provided to supply values for all the conversion
-specifications in the template string, or if the arguments are not of
-the correct types, the results are unpredictable.  If you supply more
+things will happen, so don't do this.  In particular, @sc{matlab} allows
+a bare percentage sign @samp{%} with no subsequent conversion character.
+Octave will emit an error and stop if it sees such code.  When the string
+variable to be processed cannot be guaranteed to be free of potential format
+codes it is better to use the two argument form of any of the @code{printf}
+functions and set the format string to @code{%s}.  Alternatively, for code
+which is not required to be backwards-compatible with @sc{matlab} the
+Octave function @code{puts} or @code{disp} can be used.
+
+@example
+@group
+printf (strvar);        # Unsafe if strvar contains format codes
+printf ("%s", strvar);  # Safe
+puts (strvar);          # Safe
+@end group
+@end example
+
+If there aren't enough function arguments provided to supply values for all
+the conversion specifications in the template string, or if the arguments are
+not of the correct types, the results are unpredictable.  If you supply more
 arguments than conversion specifications, the extra argument values are
 simply ignored; this is sometimes useful.
 
@@ -1006,7 +1026,11 @@
 
 @DOCSTRING(tmpfile)
 
-@DOCSTRING(tmpnam)
+@DOCSTRING(tempname)
+
+@DOCSTRING(tempdir)
+
+@DOCSTRING(P_tmpdir)
 
 @node EOF and Errors
 @subsection End of File and Errors
--- a/doc/interpreter/java.txi
+++ b/doc/interpreter/java.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2010-2013 Martin Hepperle
+@c Copyright (C) 2010-2015 Martin Hepperle
 @c
 @c This file is part of Octave.
 @c
@@ -163,9 +163,11 @@
 @cindex path, removing from classpath
 @DOCSTRING(javarmpath)
 
-The following four functions provide information and control over the interface
+The following functions provide information and control over the interface
 between Octave and the Java Virtual Machine.
 
+@DOCSTRING(javachk)
+
 @DOCSTRING(usejava)
 
 @cindex memory, displaying Java memory status
--- a/doc/interpreter/linalg.txi
+++ b/doc/interpreter/linalg.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -21,18 +21,18 @@
 @cindex linear algebra
 
 This chapter documents the linear algebra functions provided in Octave.
-Reference material for many of these functions may be found in Golub and
-Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins, 1989, and
-in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992. The
-@cite{@sc{lapack} Users' Guide} is available at:
+Reference material for many of these functions may be found in
+@nospell{Golub and Van Loan}, @cite{Matrix Computations, 2nd Ed.},
+Johns Hopkins, 1989, and in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992.
+The @cite{@sc{lapack} Users' Guide} is available at:
 @cite{http://www.netlib.org/lapack/lug/}
 
-A common text for engineering courses is G. Strang, @cite{Linear Algebra
-and Its Applications, 4th Edition}. It has become a widespread reference
-for linear algebra. An alternative is P. Lax @cite{Linear Algebra and
-Its Applications}, and also is a good choice. It claims to be suitable
-for high school students with substantial mathematical interests as well
-as first-year undergraduates.
+A common text for engineering courses is @nospell{G. Strang},
+@cite{Linear Algebra and Its Applications, 4th Edition}. It has become a
+widespread reference for linear algebra.  An alternative is P. Lax
+@cite{Linear Algebra and Its Applications}, and also is a good choice.  It
+claims to be suitable for high school students with substantial mathematical
+interests as well as first-year undergraduates.
 
 @menu
 * Techniques Used for Linear Algebra::
@@ -49,7 +49,7 @@
 Octave includes a polymorphic solver that selects an appropriate matrix
 factorization depending on the properties of the matrix itself.
 Generally, the cost of determining the matrix type is small relative to
-the cost of factorizing the matrix itself. In any case the matrix type
+the cost of factorizing the matrix itself.  In any case the matrix type
 is cached once it is calculated so that it is not re-determined each
 time it is used in a linear equation.
 
@@ -96,6 +96,8 @@
 
 @DOCSTRING(balance)
 
+@DOCSTRING(bandwidth)
+
 @DOCSTRING(cond)
 
 @DOCSTRING(det)
@@ -173,6 +175,8 @@
 
 @DOCSTRING(rsf2csf)
 
+@DOCSTRING(ordschur)
+
 @DOCSTRING(subspace)
 
 @DOCSTRING(svd)
@@ -199,7 +203,7 @@
 
 @DOCSTRING(blkmm)
 
-@DOCSTRING(syl)
+@DOCSTRING(sylvester)
 
 @node Specialized Solvers
 @section Specialized Solvers
@@ -212,3 +216,6 @@
 @DOCSTRING(cgs)
 
 @DOCSTRING(gmres)
+
+@DOCSTRING(qmr)
+
--- a/doc/interpreter/macros.texi
+++ b/doc/interpreter/macros.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2012-2013 John W. Eaton
+@c Copyright (C) 2012-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/matrix.txi
+++ b/doc/interpreter/matrix.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -90,7 +90,7 @@
 
 @DOCSTRING(flipud)
 
-@DOCSTRING(flipdim)
+@DOCSTRING(flip)
 
 @DOCSTRING(rot90)
 
--- a/doc/interpreter/mk_doc_cache.m
+++ b/doc/interpreter/mk_doc_cache.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 John W. Eaton
+## Copyright (C) 2009-2015 John W. Eaton
 ##
 ## This program is free software; you can redistribute it and/or modify it
 ## under the terms of the GNU General Public License as published by
@@ -133,5 +133,5 @@
 
 cache(:,k:end) = [];    # delete unused pre-allocated entries
 
-save_header_format_string (["# doc-cache created by Octave " OCTAVE_VERSION ", %a %b %d %H:%M:%S %Y %Z"]);
+save_header_format_string (["# doc-cache created by Octave " OCTAVE_VERSION]);
 save ("-text", output_file, "cache");
--- a/doc/interpreter/mkoctfile.1
+++ b/doc/interpreter/mkoctfile.1
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2000-2013 Dirk Eddelbuettel
+.\" Copyright (C) 2000-2015 Dirk Eddelbuettel
 .\"
 .\" This file is part of Octave.
 .\"
--- a/doc/interpreter/munge-texi.pl
+++ b/doc/interpreter/munge-texi.pl
@@ -68,7 +68,7 @@
   }
   if (/^\s*\@EXAMPLEFILE\((\S+)\)/)
   {
-    $fname = "$top_srcdir/examples/$1";
+    $fname = "$top_srcdir/examples/code/$1";
     print '@verbatim',"\n";
     open (EXAMPFH, $fname) or die "unable to open example file $fname\n";
     while (<EXAMPFH>)
--- a/doc/interpreter/nonlin.txi
+++ b/doc/interpreter/nonlin.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/numbers.txi
+++ b/doc/interpreter/numbers.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -311,11 +311,11 @@
 @subsection Empty Matrices
 
 A matrix may have one or both dimensions zero, and operations on empty
-matrices are handled as described by Carl @nospell{de} Boor in @cite{An Empty
-Exercise}, SIGNUM, Volume 25, pages 2-6, 1990 and C. N. Nett and W. M.
-Haddad, in @cite{A System-Theoretic Appropriate Realization of the Empty
-Matrix Concept}, IEEE Transactions on Automatic Control, Volume 38,
-Number 5, May 1993.
+matrices are handled as described by @nospell{Carl de Boor} in
+@cite{An Empty Exercise}, SIGNUM, Volume 25, pages 2-6, 1990 and
+@nospell{C. N. Nett and W. M. Haddad}, in
+@cite{A System-Theoretic Appropriate Realization of the Empty Matrix Concept},
+IEEE Transactions on Automatic Control, Volume 38, Number 5, May 1993.
 @tex
 Briefly, given a scalar $s$, an $m\times n$ matrix $M_{m\times n}$,
 and an $m\times n$ empty matrix $[\,]_{m\times n}$ (with either one or
@@ -396,7 +396,7 @@
 defines the set of values @samp{[ 1, 4 ]}.
 
 Although a range constant specifies a row vector, Octave does @emph{not}
-convert range constants to vectors unless it is necessary to do so.
+normally convert range constants to vectors unless it is necessary to do so.
 This allows you to write a constant like @samp{1 : 10000} without using
 80,000 bytes of storage on a typical 32-bit workstation.
 
@@ -420,6 +420,11 @@
 defines @var{y} to be of type @code{matrix} and occupies 88 bytes of
 memory.
 
+This space saving optimization may be disabled using the function
+@dfn{disable_range}.
+
+@DOCSTRING(disable_range)
+
 Note that the upper (or lower, if the increment is negative) bound on
 the range is not always included in the set of values, and that ranges
 defined by floating point values can produce surprising results because
@@ -811,6 +816,8 @@
 
 @DOCSTRING(isnumeric)
 
+@DOCSTRING(islogical)
+
 @DOCSTRING(isfloat)
 
 @DOCSTRING(isreal)
@@ -835,7 +842,13 @@
 
 @DOCSTRING(isdefinite)
 
-@DOCSTRING(islogical)
+@DOCSTRING(isbanded)
+
+@DOCSTRING(isdiag)
+
+@DOCSTRING(istril)
+
+@DOCSTRING(istriu)
 
 @DOCSTRING(isprime)
 
--- a/doc/interpreter/obsolete.txi
+++ b/doc/interpreter/obsolete.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2010-2013 John W. Eaton
+@c Copyright (C) 2010-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -151,4 +151,31 @@
 @item @code{str2mat} @tab @code{char} @tab 3.6.0
 @item @code{unmark_command} @tab None @tab 3.6.0
 @item @code{unmark_rawcommand} @tab None @tab 3.6.0
+@item @code{autocor} @tab Octave-Forge signal pkg, @code{xcor} @tab 3.8.0
+@item @code{autocov} @tab Octave-Forge signal pkg, @code{xcov} @tab 3.8.0
+@item @code{betai} @tab @code{betainc} @tab 3.8.0
+@item @code{cellidx} @tab @code{ismember} @tab 3.8.0
+@item @code{cquad} @tab @code{quadcc} @tab 3.8.0
+@item @code{dispatch} @tab None @tab 3.8.0
+@item @code{fstat} @tab @code{stat} @tab 3.8.0
+@item @code{gammai} @tab @code{gammainc} @tab 3.8.0
+@item @code{glpkmex} @tab @code{glpk} @tab 3.8.0
+@item @code{is_duplicate_entry} @tab @code{unique} @tab 3.8.0
+@item @code{is_global} @tab @code{isglobal} @tab 3.8.0
+@item @code{krylovb} @tab @code{[Uret, ~, Ucols] = krylov (@dots{})} @tab 3.8.0
+@item @code{perror} @tab None @tab 3.8.0
+@item @code{replot} @tab @code{refresh} @tab 3.8.0
+@item @code{saveimage} @tab @code{imwrite} @tab 3.8.0
+@item @code{setstr} @tab @code{char} @tab 3.8.0
+@item @code{strerror} @tab None @tab 3.8.0
+@item @code{values} @tab @code{unique} @tab 3.8.0
+@item @code{cut} @tab @code{histc} @tab 4.0.0
+@item @code{cor} @tab @code{corr} @tab 4.0.0
+@item @code{corrcoef} @tab @code{corr} @tab 4.0.0
+@item @code{__error_text__} @tab @code{lasterr} @tab 4.0.0
+@item @code{error_text} @tab @code{lasterr} @tab 4.0.0
+@item @code{polyderiv} @tab @code{polyder} @tab 4.0.0
+@item @code{shell_cmd} @tab @code{system} @tab 4.0.0
+@item @code{studentize} @tab @code{zscore} @tab 4.0.0
+@item @code{sylvester_matrix} @tab @code{hadamard (2^k)} @tab 4.0.0
 @end multitable
--- a/doc/interpreter/octave-config.1
+++ b/doc/interpreter/octave-config.1
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2003-2013 Dirk Eddelbuettel
+.\" Copyright (C) 2003-2015 Dirk Eddelbuettel
 .\"
 .\" This file is part of Octave.
 .\"
--- a/doc/interpreter/octave.1
+++ b/doc/interpreter/octave.1
@@ -1,4 +1,4 @@
-.\" Copyright (C) 1996-2013 John W. Eaton
+.\" Copyright (C) 1996-2015 John W. Eaton
 .\"
 .\" This file is part of Octave.
 .\"
--- a/doc/interpreter/octave.texi
+++ b/doc/interpreter/octave.texi
@@ -1,4 +1,4 @@
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
@@ -89,8 +89,8 @@
 @titlepage
 @title GNU Octave
 @subtitle A high-level interactive language for numerical computations
-@subtitle Edition 3 for Octave version @value{VERSION}
-@subtitle December 2013
+@subtitle Edition 4 for Octave version @value{VERSION}
+@subtitle March 2015
 @sp 2
 @multitable @columnfractions 0.4 0.025 0.65
 @item
@@ -109,9 +109,9 @@
 @page
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1996, 1997, 1999, 2000, 2001, 2002, 2005, 2006,
-2007, 2011, 2013 John W. Eaton.
+2007, 2011, 2013, 2015 John W. Eaton.
 
-This is the third edition of the Octave documentation, and is consistent
+This is the fourth edition of the Octave documentation, and is consistent
 with version @value{VERSION} of Octave.
 
 Permission is granted to make and distribute verbatim copies of
@@ -505,6 +505,7 @@
 * Plot Annotations::
 * Multiple Plots on One Page::
 * Multiple Plot Windows::
+* Manipulation of Plot Objects::
 * Manipulation of Plot Windows::
 * Use of the @code{interpreter} Property::
 * Printing and Saving Plots::
@@ -722,6 +723,25 @@
 * Plotting on top of Images::
 * Color Conversion::
 
+Audio Processing
+
+* Audio File Utilities::
+* Audio Device Information::
+* Audio Player::
+* Audio Recorder::
+* Audio Data Processing::
+
+Audio Player
+
+* Playback::
+* Player Properties::
+
+Audio Recorder
+
+* Recording::
+* Data Retrieval::
+* Recorder Properties::
+
 Object Oriented Programming
 
 * Creating a Class::
@@ -745,6 +765,7 @@
 
 * I/O Dialogs::
 * Progress Bar::
+* UI Elements::
 * GUI Utility Functions::
 * User-Defined Preferences::
 
@@ -894,7 +915,6 @@
 
 * Keywords::
 * Parser::
-
 @end detailmenu
 @end menu
 
--- a/doc/interpreter/octave_logo.eps
+++ b/doc/interpreter/octave_logo.eps
@@ -69,9 +69,9 @@
 %%EndPageSetup
 q
 1 0.498039 0.164706 rg
-16.258 153.068 m 61.023 153.068 l 67.812 153.068 73.277 147.599 73.277 
-140.81 c 73.277 96.048 l 73.277 89.259 67.812 83.791 61.023 83.791 c 
-16.258 83.791 l 9.469 83.791 4.004 89.259 4.004 96.048 c 4.004 140.81 l 
+16.258 153.068 m 61.023 153.068 l 67.812 153.068 73.277 147.599 73.277
+140.81 c 73.277 96.048 l 73.277 89.259 67.812 83.791 61.023 83.791 c
+16.258 83.791 l 9.469 83.791 4.004 89.259 4.004 96.048 c 4.004 140.81 l
 4.004 147.599 9.469 153.068 16.258 153.068 c h
 16.258 153.068 m f
 0.831373 0.333333 0 rg
@@ -80,9 +80,9 @@
 0 j
 [] 0.0 d
 4 M q 1 0 0 -1 0 230.399994 cm
-16.258 77.332 m 61.023 77.332 l 67.812 77.332 73.277 82.801 73.277 
-89.59 c 73.277 134.352 l 73.277 141.141 67.812 146.609 61.023 146.609 c 
-16.258 146.609 l 9.469 146.609 4.004 141.141 4.004 134.352 c 4.004 
+16.258 77.332 m 61.023 77.332 l 67.812 77.332 73.277 82.801 73.277
+89.59 c 73.277 134.352 l 73.277 141.141 67.812 146.609 61.023 146.609 c
+16.258 146.609 l 9.469 146.609 4.004 141.141 4.004 134.352 c 4.004
 89.59 l 4.004 82.801 9.469 77.332 16.258 77.332 c h
 16.258 77.332 m S Q
 Q q
--- a/doc/interpreter/oop.txi
+++ b/doc/interpreter/oop.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2008-2013 David Bateman
+@c Copyright (C) 2008-2015 David Bateman
 @c Copyright (C) 2009 VZLU Prague
 @c
 @c This file is part of Octave.
--- a/doc/interpreter/op-idx.txi
+++ b/doc/interpreter/op-idx.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/optim.txi
+++ b/doc/interpreter/optim.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -139,6 +139,8 @@
 
 @DOCSTRING(lsqnonneg)
 
+@DOCSTRING(lscov)
+
 @DOCSTRING(optimset)
 
 @DOCSTRING(optimget)
--- a/doc/interpreter/package.txi
+++ b/doc/interpreter/package.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2007-2013 Søren Hauberg
+@c Copyright (C) 2007-2015 Søren Hauberg
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/plot.txi
+++ b/doc/interpreter/plot.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -63,6 +63,7 @@
 * Plot Annotations::
 * Multiple Plots on One Page::
 * Multiple Plot Windows::
+* Manipulation of Plot Objects::
 * Manipulation of Plot Windows::
 * Use of the @code{interpreter} Property::
 * Printing and Saving Plots::
@@ -232,10 +233,16 @@
 
 @DOCSTRING(area)
 
+@DOCSTRING(fill)
+
 @DOCSTRING(comet)
 
 @DOCSTRING(comet3)
 
+@DOCSTRING(frame2im)
+
+@DOCSTRING(im2frame)
+
 @node Axis Configuration
 @subsubsection Axis Configuration
 
@@ -461,6 +468,10 @@
 and border lines to the plot.  By default, the grid is off and the
 border lines are on.
 
+Finally, arrows, text and rectangular or elliptic boxes can be added to
+highlight parts of a plot using the @code{annotation} function.  Those objects
+are drawn in an invisible axes, on top of every other axes.
+
 @DOCSTRING(title)
 
 @DOCSTRING(legend)
@@ -481,6 +492,8 @@
 
 @DOCSTRING(colorbar)
 
+@DOCSTRING(annotation)
+
 @node Multiple Plots on One Page
 @subsection Multiple Plots on One Page
 @cindex plotting, multiple plots per figure
@@ -530,6 +543,18 @@
 
 @DOCSTRING(figure)
 
+@node Manipulation of Plot Objects
+@subsection Manipulation of Plot Objects
+@cindex plotting, object manipulation
+
+@DOCSTRING(pan)
+
+@DOCSTRING(rotate)
+
+@DOCSTRING(rotate3d)
+
+@DOCSTRING(zoom)
+
 @node Manipulation of Plot Windows
 @subsection Manipulation of Plot Windows
 @cindex plotting, window manipulation
@@ -541,7 +566,7 @@
 @DOCSTRING(drawnow)
 
 Only figures that are modified will be updated.  The @code{refresh}
-function can also be used to force an update of the current figure, even if
+function can also be used to cause an update of the current figure, even if
 it is not modified.
 
 @DOCSTRING(refresh)
@@ -950,6 +975,17 @@
 
 @DOCSTRING(orient)
 
+@code{print} and @code{saveas} are used when work on a plot has finished
+and the output must be in a publication-ready format.  During intermediate
+stages it is often better to save the graphics object and all of its
+associated information so that changes---to colors, axis limits, marker styles,
+etc.---can be made easily from within Octave.  The @code{hgsave}/@code{hgload}
+commands can be used to save and re-create a graphics object.
+
+@DOCSTRING(hgsave)
+
+@DOCSTRING(hgload)
+
 @node Interacting with Plots
 @subsection Interacting with Plots
 
@@ -994,45 +1030,46 @@
 @anchor{XREFgraphics structures}
 
 The graphics functions use pointers, which are of class graphics_handle, in
-order to address the data structures which control graphical displays.  A
-graphics handle may point any one of a number of different object types.  The
-objects are the graphics data structures.  The types of objects are:
-@code{figure}, @code{axes}, @code{line}, @code{text}, @code{patch},
-@code{surface}, @code{text} and @code{image}.
-
-Each of these objects has a function by the same name. and, each of these
-functions returns a graphics handle pointing to an object of corresponding
+order to address the data structures which control visual display.  A
+graphics handle may point to any one of a number of different base object
+types and these objects are the graphics data structures themselves.  The
+primitive graphic object types are: @code{figure}, @code{axes}, @code{line},
+@code{text}, @code{patch}, @code{surface}, @code{text}, and @code{image}.
+
+Each of these objects has a function by the same name, and, each of these
+functions returns a graphics handle pointing to an object of the corresponding
 type.  In addition there are several functions which operate on properties of
-the graphics objects and which return handles: the functions @code{ plot} and
-@code{plot3} return a handle pointing to an object of type line, the function
-@code{subplot} returns a handle pointing to an object of type axes, the
-function @code{fill} returns a handle pointing to an object of type patch, the
-functions @code{area}, @code{bar}, @code{barh}, @code{contour},
+the graphics objects and which also return handles: the functions @code{plot}
+and @code{plot3} return a handle pointing to an object of type line, the
+function @code{subplot} returns a handle pointing to an object of type axes,
+the function @code{fill} returns a handle pointing to an object of type patch,
+the functions @code{area}, @code{bar}, @code{barh}, @code{contour},
 @code{contourf}, @code{contour3}, @code{surf}, @code{mesh}, @code{surfc},
 @code{meshc}, @code{errorbar}, @code{quiver}, @code{quiver3}, @code{scatter},
 @code{scatter3}, @code{stair}, @code{stem}, @code{stem3} each return a handle
-as documented in @ref{XREFdatasources,,Data Sources}.
-
+to a complex data structure as documented in
+@ref{XREFdatasources,,Data Sources}.
 
 The graphics objects are arranged in a hierarchy:
 
-1. The root is at 0.  i.e., @code{get (0)} returns the properties of the root
-   object.
+1. The root is at 0.  In other words, @code{get (0)} returns the properties of
+the root object.
 
 2. Below the root are @code{figure} objects.
 
-3. Below the @code{figure} objects are @code{axes}.
-
-4. Below the @code{axes} objects are
-@code{line}, @code{text}, @code{patch},
+3. Below the @code{figure} objects are @code{axes} objects.
+
+4. Below the @code{axes} objects are @code{line}, @code{text}, @code{patch},
 @code{surface}, and @code{image} objects.
 
 Graphics handles may be distinguished from function handles
 (@pxref{Function Handles}) by means of the function @code{ishandle}.
 @code{ishandle} returns true if its argument is a handle of a graphics object.
-In addition, the figure object may be tested using @code{isfigure}.
-@code{isfigure} returns true only if its argument is a handle of a figure.  The
-@code{whos} function can be used to show the object type of each currently
+In addition, a figure or axes object may be tested using @code{isfigure} or
+@code{isaxes} respectively.  The test functions return true only if the
+argument is both a handle and of the correct type (figure or axes).
+
+The @code{whos} function can be used to show the object type of each currently
 defined graphics handle.  (Note: this is not true today, but it is, I hope,
 considered an error in whos.  It may be better to have whos just show
 graphics_handle as the class, and provide a new function which, given a
@@ -1159,9 +1196,20 @@
 @subsubsection Creating Graphics Objects
 @cindex creating graphics objects
 
-You can create axes, line, patch, and surface objects directly using the
-@code{axes}, @code{line}, @code{patch}, @code{fill}, and @code{surface}
-functions.  These objects become children of the current axes object.
+You can create any graphics object primitive by calling the function of the
+same name as the object; In other words, @code{figure}, @code{axes},
+@code{line}, @code{text}, @code{image}, @code{patch}, and @code{surface}
+functions.  These fundamental graphic objects automatically become children
+of the current axes object as if @code{hold on} was in place.  Seperately, axes
+will automatically become children of the current figure object and figures
+will become children of the root object 0.
+
+If this auto-joining feature is not desired then it is important to call
+@code{newplot} first to prepare a new figure and axes for plotting.
+Alternatively, the easier way is to call a high-level graphics routine which
+will both create the plot and then populate it with low-level graphics objects.
+Instead of calling @code{line}, use @code{plot}.  Or use @code{surf} instead of
+@code{surface}.  Or use @code{fill} instead of @code{patch}.
 
 @DOCSTRING(axes)
 
@@ -1169,8 +1217,6 @@
 
 @DOCSTRING(patch)
 
-@DOCSTRING(fill)
-
 @DOCSTRING(surface)
 
 @subsubsection Handle Functions
@@ -1246,18 +1292,21 @@
 
 @noindent
 sets the range of the x-axis for the current axes object in the current
-figure to @samp{[-10, 10]}.  Additionally, calling set with a graphics
-object index as the only argument returns a structure containing the
-default values for all the properties for the given object type.  For
-example,
+figure to @samp{[-10, 10]}.
+
+Default property values can also be queried if the @code{set} function is
+called without a value argument.  When only one argument is given (a graphic
+handle) then a structure with defaults for all properties of the given object
+type is returned.  For example,
 
 @example
 set (gca ())
 @end example
 
 @noindent
-returns a structure containing the default property values for axes
-objects.
+returns a structure containing the default property values for axes objects.
+If @code{set} is called with two arguments (a graphic handle and a property
+name) then only the defaults for the requested property are returned.
 
 @DOCSTRING(get)
 
@@ -1310,9 +1359,17 @@
 * Surface Properties::
 @end menu
 
-In this Section the object properties are discussed in detail, starting
-with the root figure properties and continuing through the graphics object
-hierarchy.
+In this Section the graphics object properties are discussed in detail, starting
+with the root figure properties and continuing through the objects
+hierarchy.  The documentation about a specific graphics object can be displayed
+using @code{doc} function, e.g., @code{doc ("axes properties")} will show
+@ref{Axes Properties}.
+
+The allowed values for radio (string) properties can be retrieved
+programmatically or displayed using the one or
+two arguments call to @code{set} function.  @xref{XREFset, , set}.
+
+In the following documentation, default values are enclosed in @{ @}.
 
 @node Root Figure Properties
 @subsubsection Root Figure Properties
@@ -1320,72 +1377,8 @@
 
 The @code{root figure} properties are:
 
-@table @code
-@item __modified__
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item __myhandle__
-
-@item beingdeleted
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item busyaction
-
-@item buttondownfcn
-
-@item callbackobject
-
-@item children
-
-@item clipping
- --- Values: @qcode{"on"}, @qcode{"off"}
-
-@item createfcn
-
-@item currentfigure
-
-@item deletefcn
-
-@item handlevisibility
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item hittest
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item interruptible
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item parent
-
-@item screendepth
-
-@item screenpixelsperinch
-
-@item screensize
-
-@item selected
-
-@item selectionhighlight
-
-@item screendepth
-
-@item screenpixelsperinch
-
-@item showhiddenhandles
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item tag
-
-@item type
-
-@item uicontextmenu
-
-@item units
-
-@item userdata
-
-@item visible
-@end table
+@include plot-rootproperties.texi
+
 
 @node Figure Properties
 @subsubsection Figure Properties
@@ -1393,201 +1386,8 @@
 
 The @code{figure} properties are:
 
-@table @code
-@item __graphics_toolkit__
---- The graphics toolkit currently in use.
-
-@item __enhanced__
-
-@item __modified__
-
-@item __myhandle__
-
-@item __plot_stream__
-
-@item alphamap
-
-@item beingdeleted
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item busyaction
-
-@item buttondownfcn
-
-@item children
-Handle to children.
-
-@item clipping
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item closerequestfcn
---- Handle of function to call on close.
-
-@item color
-
-@item colormap
-An N-by-3 matrix containing the color map for the current axes.
-
-@item paperorientation
-
-@item createfcn
-
-@item currentaxes
-Handle to graphics object of current axes.
-
-@item currentcharacter
-
-@item currentobject
-
-@item currentpoint
-Holds the coordinates of the point over which the mouse pointer was when
-the mouse button was pressed.  If a mouse callback function is defined,
-@qcode{"currentpoint"} holds the coordinates of the point over which the
-mouse pointer is when the function gets called.
-
-@item deletefcn
-
-@item dockcontrols
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item doublebuffer
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item filename
-
-@item handlevisibility
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item hittest
-
-@item integerhandle
-
-@item interruptible
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item inverthardcopy
-
-@item keypressfcn
-see @qcode{"keypressfcn"}
-
-@item keyreleasefcn
-With @qcode{"keypressfcn"}, the keyboard callback functions.  These
-callback functions get called when a key is pressed/released
-respectively.  The functions are called with two input arguments.  The
-first argument holds the handle of the calling figure.  The second
-argument holds the event structure which has the following members:
-
-@table @code
-@item Character
-The ASCII value of the key
-
-@item Key
-lowercase value of the key
-
-@item Modifier
-A cell array containing strings representing the modifiers pressed with
-the key.  Possible values are @qcode{"shift"}, @qcode{"alt"}, and
-@qcode{"control"}.
-@end table
-
-@item menubar
-
-@item mincolormap
-
-@item name
-
-@item nextplot
-May be one of
-
-@table @asis
-@item @qcode{"new"}
-
-@item @qcode{"add"}
-
-@item @qcode{"replace"}
-
-@item @qcode{"replacechildren"}
-@end table
-
-@item numbertitle
-
-@item paperorientation
-Indicates the orientation for printing.  Either @qcode{"landscape"} or
-@qcode{"portrait"}.
-
-@item paperposition
-
-@item paperpositionmode
-
-@item papersize
-
-@item papertype
-
-@item paperunits
-
-@item pointer
-
-@item pointershapecdata
-
-@item pointershapehotspot
-
-@item position
-
-@item renderer
-
-@item renderermode
-
-@item resize
-
-@item resizefcn
-
-@item selected
-
-@item selectionhighlight
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item selectiontype
-
-@item tag
-
-@item toolbar
-
-@item type
-
-@item units
-
-@item userdata
-
-@item visible
-Either @qcode{"on"} or @qcode{"off"} to toggle display of the figure.
-
-@item windowbuttondownfcn
-See @qcode{"windowbuttonupfcn"}
-
-@item windowbuttonmotionfcn
-See @qcode{"windowbuttonupfcn"}
-
-@item windowbuttonupfcn
-With @qcode{"windowbuttondownfcn"} and @qcode{"windowbuttonmotionfcn"},
-the mouse callback functions.  These callback functions get called when
-the mouse button is pressed, dragged, and released respectively.  When
-these callback functions are called, the @qcode{"currentpoint"} property
-holds the current coordinates of the cursor.
-
-@item windowscrollwheelfcn
-
-@item windowstyle
-
-@item wvisual
-
-@item wvisualmode
-
-@item xdisplay
-
-@item xvisual
-
-@item xvisualmode
-@end table
+@include plot-figureproperties.texi
+
 
 @node Axes Properties
 @subsubsection Axes Properties
@@ -1595,324 +1395,8 @@
 
 The @code{axes} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item activepositionproperty
-
-@item alim
-
-@item alimmode
-
-@item ambientlightcolor
-
-@item beingdeleted
-
-@item box
-Box surrounding axes.
---- Values: @qcode{"on"}, @qcode{"off"}
-
-@item busyaction
-
-@item buttondownfcn
-
-@item cameraposition
-
-@item camerapositionmode
-
-@item cameratarget
-
-@item cameratargetmode
-
-@item cameraupvector
-
-@item cameraupvectormode
-
-@item cameraviewangle
-
-@item cameraviewanglemode
-
-@item children
-
-@item clim
-Two-element vector defining the limits for the c axis of
-an image.  See @code{pcolor} property.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item climmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item clipping
-
-@item color
-
-@item colororder
-
-@item createfcn
-
-@item currentpoint
-Holds the coordinates of the point over which the mouse pointer was when
-the mouse button was pressed.  If a mouse callback function is defined,
-@qcode{"currentpoint"} holds the coordinates of the point over which the
-mouse pointer is when the function gets called.
-
-@item dataaspectratio
-A two-element vector specifying the relative height and width of the
-data displayed in the axes.  Setting @code{dataaspectratio} to @samp{1,
-2]} causes the length of one unit as displayed on the y-axis to be the
-same as the length of 2 units on the x-axis.  Setting
-@code{dataaspectratio} also forces the @code{dataaspectratiomode}
-property to be set to @qcode{"manual"}.
-
-@item dataaspectratiomode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item deletefcn
-
-@item drawmode
-
-@item fontangle
-
-@item fontname
-
-@item fontsize
-
-@item fontunits
-
-@item fontweight
-
-@item gridlinestyle
-
-@item handlevisibility
-
-@item hittest
-
-@item interpreter
-
-@item interruptible
-
-@item layer
-
-@item linestyleorder
-
-@item linewidth
-
-@item minorgridlinestyle
-
-@item nextplot
-May be one of
-
-@table @asis
-@item @qcode{"add"}
-
-@item @qcode{"replace"}
-
-@item @qcode{"replacechildren"}
-@end table
-
-@item outerposition
-A vector specifying the position of the plot, including titles, axes and
-legend.  The four elements of the vector are the coordinates of the
-lower left corner and width and height of the plot, in units normalized
-to the width and height of the plot window.  For example, @code{[0.2,
-0.3, 0.4, 0.5]} sets the lower left corner of the axes at @math{(0.2,
-0.3)} and the width and height to be 0.4 and 0.5 respectively.  See also
-the @code{position} property.
-
-@item parent
-
-@item plotboxaspectratio
-
-@item plotboxaspectratiomode
-
-@item position
-A vector specifying the position of the plot, excluding titles, axes and
-legend.  The four elements of the vector are the coordinates of the
-lower left corner and width and height of the plot, in units normalized
-to the width and height of the plot window.  For example, @code{[0.2,
-0.3, 0.4, 0.5]} sets the lower left corner of the axes at @math{(0.2,
-0.3)} and the width and height to be 0.4 and 0.5 respectively.  See also
-the @code{outerposition} property.
-
-@item projection
-
-@item selected
-
-@item selectionhighlight
-
-@item tag
-
-@item tickdir
-
-@item tickdirmode
-
-@item ticklength
-
-@item tightinset
-
-@item title
-Index of text object for the axes title.
-
-@item type
-
-@item uicontextmenu
-
-@item units
-
-@item userdata
-
-@item view
-A three element vector specifying the view point for three-dimensional plots.
-
-@item visible
-Either @qcode{"on"} or @qcode{"off"} to toggle display of the axes.
-
-@item x_normrendertransform
-
-@item x_projectiontransform
-
-@item x_rendertransform
-
-@item x_viewporttransform
-
-@item x_viewtransform
-
-@item xaxislocation
-Either @qcode{"top"} or @qcode{"bottom"}.
-
-@item xcolor
-
-@item xdir
-Either @qcode{"forward"} or @qcode{"reverse"}.
-
-@item xgrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of grid lines.
-
-@item xlabel
-Indices to text objects for the axes labels.
-
-@item xlim
-Two-element vector defining the limits for the x-axis.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item xlimmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item xminorgrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of minor grid lines.
-
-@item xminortick
-
-@item xscale
-Either @qcode{"linear"} or @qcode{"log"}.
-
-@item xtick
-Set position of tick marks.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item xticklabel
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item xticklabelmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item xtickmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item yaxislocation
-Either @qcode{"left"} or @qcode{"right"}
-
-@item ycolor
-
-@item ydir
-Either @qcode{"forward"} or @qcode{"reverse"}.
-
-@item ygrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of grid lines.
-
-@item ylabel
-Indices to text objects for the axes labels.
-
-@item ylim
-Two-element vectors defining the limits for the x, y, and z axes and the
-Setting one of these properties also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item ylimmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item yminorgrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of minor grid lines.
-
-@item yminortick
-
-@item yscale
-Either @qcode{"linear"} or @qcode{"log"}.
-
-@item ytick
-Set position of tick marks.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item yticklabel
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item yticklabelmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item ytickmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item zcolor
-
-@item zdir
-Either @qcode{"forward"} or @qcode{"reverse"}.
-
-@item zgrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of grid lines.
-
-@item zlabel
-Indices to text objects for the axes labels.
-
-@item zlim
-Two-element vector defining the limits for z-axis.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item zlimmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item zminorgrid
-Either @qcode{"on"} or @qcode{"off"} to toggle display of minor grid lines.
-
-@item zminortick
-
-@item zscale
-Either @qcode{"linear"} or @qcode{"log"}.
-
-@item ztick
-Set position of tick marks.
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item zticklabel
-Setting this property also forces the corresponding mode
-property to be set to @qcode{"manual"}.
-
-@item zticklabelmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@item ztickmode
-Either @qcode{"manual"} or @qcode{"auto"}.
-
-@end table
+@include plot-axesproperties.texi
+
 
 @node Line Properties
 @subsubsection Line Properties
@@ -1920,111 +1404,8 @@
 
 The @code{line} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item beingdeleted
-
-@item busyaction
-
-@item buttondownfcn
-
-@item children
-
-@item clipping
-
-@item color
-The RGB color of the line, or a color name.  @xref{Colors}.
-
-@item createfcn
-
-@item deletefcn
-
-@item displayname
-The text of the legend entry corresponding to this line.
-
-@item erasemode
-
-@item handlevisibility
-
-@item hittest
-
-@item interpreter
-
-@item interruptible
-
-@item ldata
-The lower errorbar in the y direction to be plotted.
-
-@item  linestyle
-@itemx linewidth
-@xref{Line Styles}.
-
-@item linewidth
-
-@item marker
-
-@item markeredgecolor
-
-@item markerfacecolor
-
-@item markersize
-@xref{Marker Styles}.
-
-@item parent
-
-@item selected
-
-@item selectionhighlight
-
-@item tag
-
-@item type
-
-@item udata
-The upper errorbar in the y direction to be plotted.
-
-@item uicontextmenu
-
-@item userdata
-
-@item visible
-
-@item xdata
-The data to be plotted.
-
-@item xdatasource
-
-@item xldata
-The lower errorbar to be plotted.
-
-@item xlim
-
-@item xliminclude
-
-@item xudata
-The upper errorbar to be plotted.
-
-@item ydata
-The data to be plotted.
-
-@item ydatasource
-
-@item ylim
-
-@item yliminclude
-
-@item zdata
-The data to be plotted.
-
-@item zdatasource
-
-@item zlim
-
-@item zliminclude
-@end table
+@include plot-lineproperties.texi
+
 
 @node Text Properties
 @subsubsection Text Properties
@@ -2032,117 +1413,8 @@
 
 The @code{text} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item backgroundcolor
-
-@item beingdeleted
-
-@item busyaction
-
-@item buttondownfcn
-
-@item children
-
-@item clipping
-
-@item color
-The color of the text.  @xref{Colors}.
-
-@item createfcn
-
-@item deletefcn
-
-@item displayname
-The text of the legend entry corresponding to this line.
-
-@item edgecolor
-
-@item editing
-
-@item erasemode
-
-@item fontangle
-Flag whether the font is italic or normal.  Valid values are @qcode{"normal"},
-@qcode{"italic"}, and @qcode{"oblique"}.
-
-@item fontname
-The font used for the text.
-
-@item fontsize
-The size of the font, in points to use.
-
-@item fontunits
-
-@item fontweight
-Flag whether the font is bold, etc.  Valid values are @qcode{"normal"},
-@qcode{"bold"}, @qcode{"demi"}, or @qcode{"light"}.
-
-@item handlevisibility
-
-@item hittest
-
-@item horizontalalignment
-May be @qcode{"left"}, @qcode{"center"}, or @qcode{"right"}.
-
-@item interpreter
-Determines how the text is rendered.  Valid values are @qcode{"none"},
-@qcode{"tex"}, or @qcode{"latex"}.
-
-@item interruptible
-
-@item linestyle
-
-@item linewidth
-
-@item margin
-
-@item parent
-
-@item position
-The coordinates of the text object.
-
-@item rotation
-The angle of rotation for the displayed text, measured in degrees.
-
-@item selected
-
-@item selectionhighlight
-
-@item string
-The character string contained by the text object.
-
-@item tag
-
-@item type
-
-@item uicontextmenu
-
-@item units
-May be @qcode{"normalized"} or @qcode{"graph"}.
-
-@item userdata
-
-@item verticalalignment
-
-@item visible
-
-@item xlim
-
-@item xliminclude
-
-@item ylim
-
-@item yliminclude
-
-@item zlim
-
-@item zliminclude
-
-@end table
+@include plot-textproperties.texi
+
 
 @node Image Properties
 @subsubsection Image Properties
@@ -2150,76 +1422,8 @@
 
 The @code{image} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item beingdeleted
-
-@item busyaction
-
-@item buttondownfcn
-
-@item cdata
-The data for the image.  Each pixel of the image corresponds to an
-element of @code{cdata}.  The value of an element of @code{cdata}
-specifies the row-index into the colormap of the axes object containing
-the image.  The color value found in the color map for the given index
-determines the color of the pixel.
-
-@item cdatamapping
-
-@item children
-
-@item clim
-
-@item climinclude
-
-@item clipping
-
-@item createfcn
-
-@item deletefcn
-
-@item handlevisibility
-
-@item hittest
-
-@item interruptible
-
-@item parent
-
-@item selected
-
-@item selectionhighlight
-
-@item tag
-
-@item type
-
-@item uicontextmenu
-
-@item userdata
-
-@item visible
-
-@item xdata
-Two-element vector specifying the range of the x-coordinates for
-the image.
-
-@item xlim
-
-@item xliminclude
-
-@item ydata
-Two-element vector specifying the range of the y-coordinates for
-the image.
-
-@item ylim
-
-@item yliminclude
-@end table
+@include plot-imageproperties.texi
+
 
 @node Patch Properties
 @subsubsection Patch Properties
@@ -2227,148 +1431,8 @@
 
 The @code{patch} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item alim
-
-@item aliminclude
-
-@item alphadatamapping
-
-@item ambientstrength
-
-@item backfacelighting
-
-@item beingdeleted
-
-@item busyaction
-
-@item buttondownfcn
-
-@item cdata
-Data defining the patch object.
-
-@item cdatamapping
-
-@item children
-
-@item clim
-
-@item climinclude
-
-@item clipping
-
-@item createfcn
-
-@item deletefcn
-
-@item diffusestrength
-
-@item displayname
-The text of the legend entry corresponding to this line.
-
-@item edgealpha
-
-@item edgecolor
-The color of the line defining the patch.  @xref{Colors}.
-
-@item edgelighting
-
-@item erasemode
-
-@item facealpha
-A number in the range [0, 1] indicating the transparency of the patch.
-
-@item facecolor
-The fill color of the patch.  @xref{Colors}.
-
-@item facelighting
-
-@item faces
-
-@item facevertexalphadata
-
-@item facevertexcdata
-
-@item handlevisibility
-
-@item hittest
-
-@item interpreter
-
-@item interruptible
-
-@item linestyle
-@xref{Line Styles}.
-
-@item linewidth
-@xref{Line Styles}.
-
-@item marker
-@xref{Marker Styles}.
-
-@item markeredgecolor
-@xref{Marker Styles}.
-
-@item markerfacecolor
-@xref{Marker Styles}.
-
-@item markersize
-@xref{Marker Styles}.
-
-@item normalmode
-
-@item parent
-
-@item selected
-
-@item selectionhighlight
-
-@item specularcolorreflectance
-
-@item specularexponent
-
-@item specularstrength
-
-@item tag
-
-@item type
-
-@item uicontextmenu
-
-@item userdata
-
-@item vertexnormals
-
-@item vertices
-
-@item visible
-
-@item xdata
-Data defining the patch object.
-
-@item xlim
-
-@item xliminclude
-
-@item ydata
-Data defining the patch object.
-
-@item ylim
-
-@item yliminclude
-
-@item zdata
-Data defining the patch object.
-
-@item zlim
-
-@item zliminclude
-
-@end table
+@include plot-patchproperties.texi
+
 
 @node Surface Properties
 @subsubsection Surface Properties
@@ -2376,144 +1440,8 @@
 
 The @code{surface} properties are:
 
-@table @code
-@item __modified__
-
-@item __myhandle__
-
-@item alim
-
-@item aliminclude
-
-@item alphadata
-
-@item alphadatamapping
-
-@item ambientstrength
-
-@item backfacelighting
-
-@item beingdeleted
-
-@item busyaction
-
-@item buttondownfcn
-
-@item cdata
-
-@item cdatamapping
-
-@item cdatasource
-
-@item children
-
-@item clim
-
-@item climinclude
-
-@item clipping
-
-@item createfcn
-
-@item deletefcn
-
-@item diffusestrength
-
-@item displayname
-The text of the legend entry corresponding to this surface.
-
-@item edgealpha
-
-@item edgecolor
-
-@item edgelighting
-
-@item erasemode
-
-@item facealpha
-
-@item facecolor
-
-@item facelighting
-
-@item handlevisibility
-
-@item hittest
-
-@item interpreter
-
-@item interruptible
-
-@item linestyle
-
-@item linewidth
-
-@item marker
-
-@item markeredgecolor
-
-@item markerfacecolor
-
-@item markersize
-
-@item meshstyle
-
-@item normalmode
-
-@item parent
-
-@item selected
-
-@item selectionhighlight
-
-@item specularcolorreflectance
-
-@item specularexponent
-
-@item specularstrength
-
-@item tag
-
-@item type
-
-@item uicontextmenu
-
-@item userdata
-
-@item vertexnormals
-
-@item visible
-
-@item xdata
-The data determining the surface.  The @code{xdata} and @code{ydata}
-elements are vectors and @code{zdata} must be a matrix.
-
-@item xdatasource
-
-@item xlim
-
-@item xliminclude
-
-@item ydata
-The data determining the surface.  The @code{xdata} and @code{ydata}
-elements are vectors and @code{zdata} must be a matrix.
-
-@item ydatasource
-
-@item ylim
-
-@item yliminclude
-
-@item zdata
-The data determining the surface.  The @code{xdata} and @code{ydata}
-elements are vectors and @code{zdata} must be a matrix.
-
-@item zdatasource
-
-@item zlim
-
-@item zliminclude
-@end table
+@include plot-surfaceproperties.texi
+
 
 @node Searching Properties
 @subsection Searching Properties
@@ -2652,17 +1580,25 @@
 @item linestyle
 May be one of
 
-@table @code
-@item "-"
+@table @asis
+@item @qcode{"-"}
 Solid line.  [default]
 
-@item "--"
+@c Special handling required to avoid '--' becoming single en-dash in Info
+@ifnottex
+
+@item @verb{|"--"|}
+@end ifnottex
+@iftex
+
+@item @code{"--"}
+@end iftex
 Dashed line.
 
-@item ":"
+@item @qcode{":"}
 Dotted line.
 
-@item "-."
+@item @qcode{"-."}
 A dash-dot line.
 
 @item @qcode{"none"}
@@ -2875,6 +1811,8 @@
 
 @DOCSTRING(linkprop)
 
+@DOCSTRING(linkaxes)
+
 These capabilities are used in a number of basic graphics objects.
 The @code{hggroup} objects created by the functions of Octave contain
 one or more graphics object and are used to:
@@ -3441,7 +2379,3 @@
 graphics toolkit.
 
 @DOCSTRING(gnuplot_binary)
-
-@DOCSTRING(gui_mode)
-
-@DOCSTRING(mouse_wheel_zoom)
--- a/doc/interpreter/plotimages.m
+++ b/doc/interpreter/plotimages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton and David Bateman
+## Copyright (C) 2007-2015 John W. Eaton and David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -39,7 +39,7 @@
     title ("Simple 2-D Plot");
     print ([nm "." typ], d_typ);
   elseif (strcmp (nm, "hist"))
-    rand ("state", 2);
+    randn ("state", 1);
     hist (randn (10000, 1), 30);
     xlabel ("Value");
     ylabel ("Count");
--- a/doc/interpreter/poly.txi
+++ b/doc/interpreter/poly.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/preface.txi
+++ b/doc/interpreter/preface.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -24,8 +24,8 @@
 
 Octave was originally intended to be companion software for an
 undergraduate-level textbook on chemical reactor design being written by
-James B. Rawlings of the University of Wisconsin-Madison and John
-G. Ekerdt of the University of Texas.
+@nospell{James B. Rawlings} of the University of Wisconsin-Madison and
+@nospell{John G. Ekerdt} of the University of Texas.
 
 Clearly, Octave is now much more than just another `courseware' package
 with limited utility beyond the classroom.  Although our initial goals
@@ -90,8 +90,8 @@
 @nospell{DE-FG02-04ER25635}.
 
 @item
-Ashok Krishnamurthy, David Hudak, Juan Carlos Chaves, and Stanley
-C. Ahalt of the Ohio Supercomputer Center.
+@nospell{Ashok Krishnamurthy, David Hudak, Juan Carlos Chaves}, and
+@nospell{Stanley C. Ahalt} of the Ohio Supercomputer Center.
 
 @item
 The National Science Foundation, through grant numbers CTS-0105360,
@@ -102,7 +102,7 @@
 Consortium (@url{http://www.che.utexas.edu/twmcc, TWMCC}).
 
 @item
-The Paul A. Elfers Endowed Chair in Chemical Engineering at the
+The @nospell{Paul A. Elfers} Endowed Chair in Chemical Engineering at the
 University of Wisconsin-Madison.
 
 @item
@@ -133,15 +133,16 @@
 Noel Bell, Senior Engineer, Texaco Chemical Company, Austin Texas.
 
 @item
-John A. Turner, Group Leader, Continuum Dynamics @nospell{(CCS-2)}, Los Alamos
-National Laboratory, for registering the @url{octave.org} domain name.
+John A. Turner, Group Leader, Continuum Dynamics @nospell{(CCS-2)},
+@nospell{Los Alamos} National Laboratory, for registering the
+@url{octave.org} domain name.
 
 @item
-James B. Rawlings, Professor, University of Wisconsin-Madison,
+@nospell{James B. Rawlings}, Professor, University of Wisconsin-Madison,
 Department of Chemical and Biological Engineering.
 
 @item
-Richard Stallman, for writing GNU.
+@nospell{Richard Stallman}, for writing GNU.
 @end itemize
 
 This project would not have been possible without the GNU software used
--- a/doc/interpreter/quad.txi
+++ b/doc/interpreter/quad.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -55,7 +55,7 @@
 Numerical integration using an adaptive Gauss-Konrod rule.
 
 @item quadcc
-Numerical integration using adaptive Clenshaw-Curtis rules.
+Numerical integration using adaptive @nospell{Clenshaw-Curtis} rules.
 
 @item trapz, cumtrapz
 Numerical integration of data using the trapezoidal method.
--- a/doc/interpreter/set.txi
+++ b/doc/interpreter/set.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -19,9 +19,12 @@
 @node Sets
 @chapter Sets
 
-Octave has a limited number of functions for managing sets of data, where a
-set is defined as a collection of unique elements.  In Octave a set is
-represented as a vector of numbers.
+Octave has a number of functions for managing sets of data.  A set is defined
+as a collection of unique elements and is typically represented by a vector of
+numbers sorted in ascending order.  Any vector or matrix can be converted to a
+set by removing duplicates through the use of the @code{unique} function.
+However, it isn't necessary to explicitly create a set as all of the functions
+which operate on sets will convert their input to a set before proceeding.
 
 @DOCSTRING(unique)
 
@@ -32,28 +35,34 @@
 @node Set Operations
 @section Set Operations
 
-Octave supports the basic set operations.  That is, Octave can compute
-the union, intersection, and difference of two sets.
-Octave also supports the @emph{Exclusive Or} set operation, and
-membership determination.  The functions for set operations all work in
-pretty much the same way.  As an example, assume that @code{x} and
-@code{y} contains two sets, then
+Octave supports several basic set operations.  Octave can compute the union,
+intersection, and difference of two sets.  Octave also supports the
+@emph{Exclusive Or} set operation.
+
+The functions for set operations all work in the same way by accepting two
+input sets and returning a third set.  As an example, assume that @code{a} and
+@code{b} contains two sets, then
 
 @example
-union (x, y)
+union (a, b)
 @end example
 
 @noindent
 computes the union of the two sets.
 
-@DOCSTRING(ismember)
+Finally, determining whether elements belong to a set can be done with the
+@code{ismember} function.  Because sets are ordered this operation is very
+efficient and is of order O(log2(n)) which is preferable to the @code{find}
+function which is of order O(n).
+
+@DOCSTRING(intersect)
 
 @DOCSTRING(union)
 
-@DOCSTRING(intersect)
-
 @DOCSTRING(setdiff)
 
 @DOCSTRING(setxor)
 
+@DOCSTRING(ismember)
+
 @DOCSTRING(powerset)
--- a/doc/interpreter/signal.txi
+++ b/doc/interpreter/signal.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/sparse.txi
+++ b/doc/interpreter/sparse.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2004-2013 David Bateman
+@c Copyright (C) 2004-2015 David Bateman
 @c
 @c This file is part of Octave.
 @c
@@ -44,13 +44,13 @@
 There are many classes of mathematical problems which give rise to
 matrices, where a large number of the elements are zero.  In this case
 it makes sense to have a special matrix type to handle this class of
-problems where only the non-zero elements of the matrix are
+problems where only the nonzero elements of the matrix are
 stored.  Not only does this reduce the amount of memory to store the
 matrix, but it also means that operations on this type of matrix can
 take advantage of the a priori knowledge of the positions of the
-non-zero elements to accelerate their calculations.
+nonzero elements to accelerate their calculations.
 
-A matrix type that stores only the non-zero elements is generally called
+A matrix type that stores only the nonzero elements is generally called
 sparse.  It is the purpose of this document to discuss the basics of the
 storage and creation of sparse matrices and the fundamental operations
 on them.
@@ -75,13 +75,13 @@
 of the methods have in common is that they attempt to reduce the complexity
 and storage given a priori knowledge of the particular class of problems
 that will be solved.  A good summary of the available techniques for storing
-sparse matrix is given by Saad @footnote{Y. Saad "SPARSKIT: A basic toolkit
-for sparse matrix computation", 1994,
+sparse matrix is given by @nospell{Saad} @footnote{Y. Saad "SPARSKIT: A basic
+toolkit for sparse matrix computation", 1994,
 @url{http://www-users.cs.umn.edu/~saad/software/SPARSKIT/paper.ps}}.
 With full matrices, knowledge of the point of an element of the matrix
 within the matrix is implied by its position in the computers memory.
 However, this is not the case for sparse matrices, and so the positions
-of the non-zero elements of the matrix must equally be stored.
+of the nonzero elements of the matrix must equally be stored.
 
 An obvious way to do this is by storing the elements of the matrix as
 triplets, with two elements being their position in the array
@@ -94,9 +94,9 @@
 In this format the position of each element in a row and the data are
 stored as previously.  However, if we assume that all elements in the
 same column are stored adjacent in the computers memory, then we only
-need to store information on the number of non-zero elements in each
+need to store information on the number of nonzero elements in each
 column, rather than their positions.  Thus assuming that the matrix has
-more non-zero elements than there are columns in the matrix, we win in
+more nonzero elements than there are columns in the matrix, we win in
 terms of the amount of memory used.
 
 In fact, the column index contains one more element than the number of
@@ -109,7 +109,7 @@
 @group
   for (j = 0; j < nc; j++)
     for (i = cidx(j); i < cidx(j+1); i++)
-       printf ("non-zero element (%i,%i) is %d\n",
+       printf ("nonzero element (%i,%i) is %d\n",
            ridx(i), j, data(i));
 @end group
 @end example
@@ -125,7 +125,7 @@
 @end group
 @end example
 
-The non-zero elements of this matrix are
+The nonzero elements of this matrix are
 
 @example
 @group
@@ -319,7 +319,7 @@
 in fact a sparse matrix.
 
 Another very basic function is @dfn{nnz} that returns the number of
-non-zero entries there are in a sparse matrix, while the function
+nonzero entries there are in a sparse matrix, while the function
 @dfn{nzmax} returns the amount of storage allocated to the sparse
 matrix.  Note that Octave tends to crop unused memory at the first
 opportunity for sparse objects.  There are some cases of user created
@@ -376,7 +376,7 @@
 
 There are several graphical means of finding out information about
 sparse matrices.  The first is the @dfn{spy} command, which displays
-the structure of the non-zero elements of the
+the structure of the nonzero elements of the
 matrix.  @xref{fig:spmatrix}, for an example of the use of
 @dfn{spy}.  More advanced graphical information can be obtained with the
 @dfn{treeplot}, @dfn{etreeplot} and @dfn{gplot} commands.
@@ -390,7 +390,7 @@
 interconnections between nodes are represented as an adjacency
 matrix.  That is, if the i-th node in a graph is connected to the j-th
 node.  Then the ij-th node (and in the case of undirected graphs the
-@nospell{ji-th} node) of the sparse adjacency matrix is non-zero.  If each node
+@nospell{ji-th} node) of the sparse adjacency matrix is nonzero.  If each node
 is then associated with a set of coordinates, then the @dfn{gplot}
 command can be used to graphically display the interconnections
 between nodes.
@@ -485,11 +485,11 @@
   @dfn{dmperm}, @dfn{symamd}, @dfn{randperm}, @dfn{symrcm}
 
 @item Linear algebra:
-  @dfn{condest}, @dfn{eigs}, @dfn{matrix_type}, @dfn{normest}, @dfn{sprank},
-  @dfn{spaugment}, @dfn{svds}
+  @dfn{condest}, @dfn{eigs}, @dfn{matrix_type},
+  @dfn{normest}, @dfn{sprank}, @dfn{spaugment}, @dfn{svds}
 
 @item Iterative techniques:
-  @dfn{luinc}, @dfn{pcg}, @dfn{pcr}
+  @dfn{ichol}, @dfn{ilu}, @dfn{pcg}, @dfn{pcr}
 @c @dfn{bicg}, @dfn{bicgstab}, @dfn{cholinc}, @dfn{cgs}, @dfn{gmres},
 @c @dfn{lsqr}, @dfn{minres}, @dfn{qmr}, @dfn{symmlq}
 
@@ -509,9 +509,9 @@
 The two basic reasons to use sparse matrices are to reduce the memory
 usage and to not have to do calculations on zero elements.  The two are
 closely related in that the computation time on a sparse matrix operator
-or function is roughly linear with the number of non-zero elements.
+or function is roughly linear with the number of nonzero elements.
 
-Therefore, there is a certain density of non-zero elements of a matrix
+Therefore, there is a certain density of nonzero elements of a matrix
 where it no longer makes sense to store it as a sparse matrix, but rather
 as a full matrix.  For this reason operators and functions that have a
 high probability of returning a full matrix will always return one.  For
@@ -630,7 +630,7 @@
 of zero is important must not be done using sparse matrices.
 
 In general any function or operator used on a sparse matrix will
-result in a sparse matrix with the same or a larger number of non-zero
+result in a sparse matrix with the same or a larger number of nonzero
 elements than the original matrix.  This is particularly true for the
 important case of sparse matrix factorizations.  The usual way to
 address this is to reorder the matrix, such that its factorization is
@@ -667,7 +667,7 @@
 @ifset htmltex
 598
 @end ifset
-non-zero terms, while this Cholesky@tie{}factorization has
+nonzero terms, while this Cholesky@tie{}factorization has
 @ifinfo
 @ifnothtml
 71,
@@ -693,7 +693,7 @@
 @ifset htmltex
 399
 @end ifset
-non-zero terms which is a significant improvement.
+nonzero terms which is a significant improvement.
 
 The Cholesky@tie{}factorization itself can be used to determine the
 appropriate sparsity preserving reordering of the matrix during the
@@ -793,17 +793,17 @@
 
 @item If the matrix is not square, or any of the previous solvers flags
 a singular or near singular matrix, find a minimum norm solution using
-@sc{cxsparse}@footnote{The @sc{cholmod}, @sc{umfpack} and @sc{cxsparse} packages were
-written by Tim Davis and are available at
+@sc{cxsparse}@footnote{The @sc{cholmod}, @sc{umfpack} and @sc{cxsparse}
+packages were written by Tim Davis and are available at
 @url{http://www.cise.ufl.edu/research/sparse/}}.
 @end enumerate
 
-The band density is defined as the number of non-zero values in the band
+The band density is defined as the number of nonzero values in the band
 divided by the total number of values in the full band.  The banded
 matrix solvers can be entirely disabled by using @dfn{spparms} to set
 @code{bandden} to 1 (i.e., @code{spparms ("bandden", 1)}).
 
-The QR@tie{}solver factorizes the problem with a Dulmage-Mendelsohn
+The QR@tie{}solver factorizes the problem with a @nospell{Dulmage-Mendelsohn}
 decomposition, to separate the problem into blocks that can be treated
 as over-determined, multiple well determined blocks, and a final
 over-determined block.  For matrices with blocks of strongly connected
@@ -860,7 +860,7 @@
 The left division @code{\} and right division @code{/} operators,
 discussed in the previous section, use direct solvers to resolve a
 linear equation of the form @code{@var{x} = @var{A} \ @var{b}} or
-@code{@var{x} = @var{b} / @var{A}}.  Octave equally includes a number of
+@code{@var{x} = @var{b} / @var{A}}.  Octave also includes a number of
 functions to solve sparse linear equations using iterative techniques.
 
 @DOCSTRING(pcg)
@@ -873,7 +873,9 @@
 @var{A} \ @var{b}} is solved instead.  Typical pre-conditioning matrices
 are partial factorizations of the original matrix.
 
-@DOCSTRING(luinc)
+@DOCSTRING(ichol)
+
+@DOCSTRING(ilu)
 
 @node Real Life Example
 @section Real Life Example using Sparse Matrices
@@ -997,7 +999,7 @@
 as constant on each simplex (represented by the vector @code{conductivity}).
 Based on the finite element geometry, we first calculate a system (or
 stiffness) matrix for each simplex (represented as 3-by-3 elements on the
-diagonal of the element-wise system matrix @code{SE}.  Based on @code{SE}
+diagonal of the element-wise system matrix @code{SE}).  Based on @code{SE}
 and a N-by-DE connectivity matrix @code{C}, representing the connections
 between simplices and vertices, the global connectivity matrix @code{S} is
 calculated.
--- a/doc/interpreter/sparseimages.m
+++ b/doc/interpreter/sparseimages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/doc/interpreter/splineimages.m
+++ b/doc/interpreter/splineimages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Ben Abbott, Jonas Lundgren
+## Copyright (C) 2012-2015 Ben Abbott, Jonas Lundgren
 ##
 ## This file is part of Octave.
 ##
--- a/doc/interpreter/stats.txi
+++ b/doc/interpreter/stats.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/interpreter/stmt.txi
+++ b/doc/interpreter/stmt.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -83,10 +83,10 @@
 @var{condition} is true.
 
 The condition in an @code{if} statement is considered true if its value
-is non-zero, and false if its value is zero.  If the value of the
+is nonzero, and false if its value is zero.  If the value of the
 conditional expression in an @code{if} statement is a vector or a
 matrix, it is considered true only if it is non-empty and @emph{all}
-of the elements are non-zero.
+of the elements are nonzero.
 
 The second form of an if statement looks like this:
 
@@ -398,10 +398,10 @@
 The @code{while} statement is the simplest looping statement in Octave.
 It repeatedly executes a statement as long as a condition is true.  As
 with the condition in an @code{if} statement, the condition in a
-@code{while} statement is considered true if its value is non-zero, and
+@code{while} statement is considered true if its value is nonzero, and
 false if its value is zero.  If the value of the conditional expression
 in a @code{while} statement is a vector or a matrix, it is considered
-true only if it is non-empty and @emph{all} of the elements are non-zero.
+true only if it is non-empty and @emph{all} of the elements are nonzero.
 
 Octave's @code{while} statement looks like this:
 
@@ -463,10 +463,10 @@
 true, and the test of the condition is at the end of the loop, so the
 body of the loop is always executed at least once.  As with the
 condition in an @code{if} statement, the condition in a @code{do-until}
-statement is considered true if its value is non-zero, and false if its
+statement is considered true if its value is nonzero, and false if its
 value is zero.  If the value of the conditional expression in a
 @code{do-until} statement is a vector or a matrix, it is considered
-true only if it is non-empty and @emph{all} of the elements are non-zero.
+true only if it is non-empty and @emph{all} of the elements are nonzero.
 
 Octave's @code{do-until} statement looks like this:
 
--- a/doc/interpreter/strings.txi
+++ b/doc/interpreter/strings.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -401,8 +401,6 @@
 
 @DOCSTRING(strncmpi)
 
-@DOCSTRING(validatestring)
-
 @node Manipulating Strings
 @section Manipulating Strings
 
--- a/doc/interpreter/system.txi
+++ b/doc/interpreter/system.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -202,8 +202,6 @@
 
 @DOCSTRING(glob)
 
-@DOCSTRING(fnmatch)
-
 @DOCSTRING(file_in_path)
 
 @DOCSTRING(filesep)
@@ -224,12 +222,6 @@
 
 @DOCSTRING(is_rooted_relative_filename)
 
-@DOCSTRING(P_tmpdir)
-
-@DOCSTRING(tempdir)
-
-@DOCSTRING(tempname)
-
 @DOCSTRING(recycle)
 
 @node File Archiving Utilities
@@ -332,6 +324,8 @@
 
 @DOCSTRING(dos)
 
+@DOCSTRING(open)
+
 @DOCSTRING(perl)
 
 @DOCSTRING(python)
@@ -408,7 +402,11 @@
 
 @DOCSTRING(getenv)
 
-@DOCSTRING(putenv)
+@DOCSTRING(setenv)
+
+@DOCSTRING(unsetenv)
+
+@DOCSTRING(get_home_directory)
 
 @node Current Working Directory
 @section Current Working Directory
@@ -517,6 +515,8 @@
 
 @DOCSTRING(isdeployed)
 
+@DOCSTRING(isstudent)
+
 @DOCSTRING(OCTAVE_HOME)
 
 @DOCSTRING(matlabroot)
--- a/doc/interpreter/testfun.txi
+++ b/doc/interpreter/testfun.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2005-2013 David Bateman
+@c Copyright (C) 2005-2015 David Bateman
 @c Copyright (C) 2002-2005 Paul Kienzle
 @c
 @c This file is part of Octave.
@@ -297,14 +297,14 @@
 @group
 function output = must_be_zero (@var{input})
   if (@var{input} != 0)
-    error ("Non-zero input!")
+    error ("Nonzero input!")
   endif
   output = input;
 endfunction
 
 %!fail ("must_be_zero (1)");
 %!assert (must_be_zero (0), 0);
-%!error <Non-zero> must_be_zero (1);
+%!error <Nonzero> must_be_zero (1);
 %!xtest error ("This code generates an error");
 @end group
 @end example
@@ -320,7 +320,7 @@
 >>>>> /path/to/must_be_zero.m
   ***** fail ("must_be_zero (1)");
   ***** assert (must_be_zero (0), 0);
-  ***** error <Non-zero> must_be_zero (1);
+  ***** error <Nonzero> must_be_zero (1);
   ***** xtest error ("This code generates an error");
 !!!!! known failure
 This code generates an error
--- a/doc/interpreter/tips.txi
+++ b/doc/interpreter/tips.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -500,7 +500,8 @@
 @@deftypefn  @{Function File@} @{@@var@{c@} =@} nchoosek (@@var@{n@}, @@var@{k@})
 @@deftypefnx @{Function File@} @{@@var@{c@} =@} nchoosek (@@var@{set@}, @@var@{k@})
 
-Compute the binomial coefficient or all combinations of a set of items.
+Compute the binomial coefficient of @@var@{n@} or list all possible
+combinations of a @@var@{set@} of items.
 
 If @@var@{n@} is a scalar then calculate the binomial coefficient
 of @@var@{n@} and @@var@{k@} which is defined as
@@ -554,10 +555,10 @@
 @@end group
 @@end example
 
-@@code@{nchoosek@} works only for non-negative, integer arguments.  Use
-@@code@{bincoeff@} for non-integer and negative scalar arguments, or for
-computing many binomial coefficients at once with vector inputs
-for @@var@{n@} or @@var@{k@}.
+Programming Note: When calculating the binomial coefficient @@code@{nchoosek@}
+works only for non-negative, integer arguments.  Use @@code@{bincoeff@} for
+non-integer and negative scalar arguments, or for computing many binomial
+coefficients at once with vector inputs for @@var@{n@} or @@var@{k@}.
 
 @@seealso@{bincoeff, perms@}
 @@end deftypefn
@@ -566,7 +567,7 @@
 @noindent
 which demonstrates most of the concepts discussed above.
 @iftex
-This documentation string renders as
+This documentation string renders in Info format as
 @c Note: use the actual output of info below, rather than try and
 @c reproduce it here to prevent it looking different from how it would
 @c appear with info.
@@ -574,8 +575,8 @@
 @example
  -- Function File: C = nchoosek (N, K)
  -- Function File: C = nchoosek (SET, K)
-     Compute the binomial coefficient or all combinations of a set of
-     items.
+     Compute the binomial coefficient of N or list all possible
+     combinations of a SET of items.
 
      If N is a scalar then calculate the binomial coefficient of N and
      K which is defined as
@@ -608,32 +609,31 @@
                  1   3
                  2   3
 
+     Programming Note: When calculating the binomial coefficient
      `nchoosek' works only for non-negative, integer arguments.  Use
      `bincoeff' for non-integer and negative scalar arguments, or for
      computing many binomial coefficients at once with vector inputs
      for N or K.
 
-     See also: bincoeff, perms
+     See also: bincoeff, perms.
 @end example
 @noindent
-using info, whereas in a printed documentation using @TeX{} it will
-appear as
+whereas in printed documentation using @TeX{} it will appear as
 
 @deftypefn  {Function File} {@var{c} =} nchoosek (@var{n}, @var{k})
 @deftypefnx {Function File} {@var{c} =} nchoosek (@var{set}, @var{k})
 
-Compute the binomial coefficient or all combinations of a set of items.
+Compute the binomial coefficient of @var{n} or list all possible
+combinations of a @var{set} of items.
 
 If @var{n} is a scalar then calculate the binomial coefficient
 of @var{n} and @var{k} which is defined as
-
 @tex
 $$
  {n \choose k} = {n (n-1) (n-2) \cdots (n-k+1) \over k!}
                = {n! \over k! (n-k)!}
 $$
 @end tex
-
 @noindent
 This is the number of combinations of @var{n} items taken in groups of
 size @var{k}.
@@ -665,10 +665,10 @@
 @end group
 @end example
 
-@code{nchoosek} works only for non-negative, integer arguments.  Use
-@code{bincoeff} for non-integer and negative scalar arguments, or for
-computing many binomial coefficients at once with vector inputs for @var{n}
-or @var{k}.
+Programming Note: When calculating the binomial coefficient @code{nchoosek}
+works only for non-negative, integer arguments.  Use @code{bincoeff} for
+non-integer and negative scalar arguments, or for computing many binomial
+coefficients at once with vector inputs for @var{n} or @var{k}.
 
 @seealso{bincoeff, perms}
 @end deftypefn
--- a/doc/interpreter/var.txi
+++ b/doc/interpreter/var.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
@@ -221,8 +221,7 @@
 @end example
 
 The behavior of persistent variables is equivalent to the behavior of
-static variables in C@.  The command @code{static} in Octave is also
-recognized and is equivalent to @code{persistent}.
+static variables in C@.
 
 Like global variables, a persistent variable may only be initialized once.
 For example, after executing the following code
--- a/doc/interpreter/vectorize.txi
+++ b/doc/interpreter/vectorize.txi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2012-2013 Jordi Gutiérrez Hermoso
+@c Copyright (C) 2012-2015 Jordi Gutiérrez Hermoso
 @c
 @c This file is part of Octave.
 @c
@@ -496,6 +496,15 @@
 
 @DOCSTRING(structfun)
 
+Consistent with earlier advice, seek to use Octave built-in functions whenever
+possible for the best performance.  This advice applies especially to the four
+functions above.  For example, when adding two arrays together
+element-by-element one could use a handle to the built-in addition function
+@code{@@plus} or define an anonymous function @code{@@(x,y) x + y}.  But, the
+anonymous function is 60% slower than the first method.
+@xref{Operator Overloading}, for a list of basic functions which might be used
+in place of anonymous ones.
+
 @node Accumulation
 @section Accumulation
 
@@ -531,13 +540,15 @@
 function @code{jit_enable} is used to turn compilation on or off.  The
 function @code{jit_startcnt} sets the threshold for acceleration.  Loops
 with iteration counts above @code{jit_startcnt} will be accelerated.  The
-function @code{debug_jit} is not likely to be of use to anyone not working
-directly on the implementation of the JIT compiler.
+functions @code{jit_failcnt} and @code{debug_jit} are not likely to be of use
+to anyone not working directly on the implementation of the JIT compiler.
 
 @DOCSTRING(jit_enable)
 
 @DOCSTRING(jit_startcnt)
 
+@DOCSTRING(jit_failcnt)
+
 @DOCSTRING(debug_jit)
 
 @node Miscellaneous Techniques
@@ -697,7 +708,7 @@
 for i = 1:length (A)
   ## this will be two columns, the first is the difference and
   ## the second the mean of the two elements used for the diff.
-  B(i,:) = [A(i+1)-A(i), (A(i+1) + A(i))/2)];
+  B(i,:) = [A(i+1)-A(i), (A(i+1) + A(i))/2];
 endfor
 @end group
 @end example
@@ -713,3 +724,4 @@
 a column vector.  This is a common vectorization trick.
 
 @end itemize
+
--- a/doc/liboctave/Makefile.am
+++ b/doc/liboctave/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc/liboctave directory
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1996-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/doc/liboctave/array.texi
+++ b/doc/liboctave/array.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/bugs.texi
+++ b/doc/liboctave/bugs.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/cp-idx.texi
+++ b/doc/liboctave/cp-idx.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/dae.texi
+++ b/doc/liboctave/dae.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/diffeq.texi
+++ b/doc/liboctave/diffeq.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/error.texi
+++ b/doc/liboctave/error.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/factor.texi
+++ b/doc/liboctave/factor.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/fn-idx.texi
+++ b/doc/liboctave/fn-idx.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/gpl.texi
+++ b/doc/liboctave/gpl.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/install.texi
+++ b/doc/liboctave/install.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/intro.texi
+++ b/doc/liboctave/intro.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/liboctave.texi
+++ b/doc/liboctave/liboctave.texi
@@ -1,4 +1,4 @@
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
@@ -56,7 +56,7 @@
 
 @ifnottex
 
-Copyright (C) 1996-2013 John W. Eaton.
+Copyright (C) 1996-2015 John W. Eaton.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
--- a/doc/liboctave/matvec.texi
+++ b/doc/liboctave/matvec.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/nleqn.texi
+++ b/doc/liboctave/nleqn.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/nlfunc.texi
+++ b/doc/liboctave/nlfunc.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1997-2013 John W. Eaton
+@c Copyright (C) 1997-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/ode.texi
+++ b/doc/liboctave/ode.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/optim.texi
+++ b/doc/liboctave/optim.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/preface.texi
+++ b/doc/liboctave/preface.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/quad.texi
+++ b/doc/liboctave/quad.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/liboctave/range.texi
+++ b/doc/liboctave/range.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1996-2013 John W. Eaton
+@c Copyright (C) 1996-2015 John W. Eaton
 @c
 @c This file is part of Octave.
 @c
--- a/doc/refcard/Makefile.am
+++ b/doc/refcard/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc/refcard directory
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1996-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -20,7 +20,47 @@
 
 include $(top_srcdir)/build-aux/common.mk
 
-TEX = \
+DVIPS = dvips
+TEX = tex
+PDFTEX = pdftex
+
+AM_V_TEX = $(am__v_TEX_$(V))
+am__v_TEX_ = $(am__v_TEX_$(AM_DEFAULT_VERBOSITY))
+am__v_TEX_0 = @echo "  TEX     " $@;
+am__v_TEX_1 = 
+
+AM_V_PDFTEX = $(am__v_PDFTEX_$(V))
+am__v_PDFTEX_ = $(am__v_PDFTEX_$(AM_DEFAULT_VERBOSITY))
+am__v_PDFTEX_0 = @echo "  PDFTEX  " $@;
+am__v_PDFTEX_1 = 
+
+## The following three blocks of variable definitions can be eliminated
+## if we merge the makefiles in teh doc directory.
+
+AM_V_texidevnull = $(am__v_texidevnull_$(V))
+am__v_texidevnull_ = $(am__v_texidevnull_$(AM_DEFAULT_VERBOSITY))
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 = 
+
+AM_V_DVIPS = $(am__v_DVIPS_$(V))
+am__v_DVIPS_ = $(am__v_DVIPS_$(AM_DEFAULT_VERBOSITY))
+am__v_DVIPS_0 = @echo "  DVIPS   " $@;
+am__v_DVIPS_1 =
+
+AM_V_texinfo = $(am__v_texinfo_$(V))
+am__v_texinfo_ = $(am__v_texinfo_$(AM_DEFAULT_VERBOSITY))
+am__v_texinfo_0 = -q
+am__v_texinfo_1 = 
+
+%.dvi : %.tex
+	-$(AM_V_TEX)TEXINPUTS="$(srcdir):$(TEXINPUTS):" \
+	$(TEX) $< $(AM_V_texidevnull)
+
+%.pdf : %.tex
+	-$(AM_V_PDFTEX)TEXINPUTS="$(srcdir):$(TEXINPUTS):" \
+	$(PDFTEX) $< $(AM_V_texidevnull)
+
+TEX_SRC = \
   refcard.tex \
   refcard-a4.tex \
   refcard-legal.tex \
@@ -39,38 +79,27 @@
 
 all-local: $(FORMATTED)
 
+refcard-a4.pdf: refcard-a4.tex refcard.tex
 refcard-a4.dvi: refcard-a4.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
 refcard-a4.ps: refcard-a4.dvi
-	-dvips -T 297mm,210mm -o $@ $<
-
-refcard-a4.pdf: refcard-a4.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
-
-refcard-legal.dvi: refcard-legal.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
-refcard-legal.ps: refcard-legal.dvi
-	-dvips -T 14in,8.5in -o $@ $<
+	-$(AM_V_DVIPS)$(DVIPS) $(AM_V_texinfo) -T 297mm,210mm -o $@ $<
 
 refcard-legal.pdf: refcard-legal.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
-
-refcard-letter.dvi: refcard-letter.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
-refcard-letter.ps: refcard-letter.dvi
-	-dvips -T 11in,8.5in -o $@ $<
+refcard-legal.dvi: refcard-legal.tex refcard.tex
+refcard-legal.ps: refcard-legal.dvi
+	-$(AM_V_DVIPS)$(DVIPS) $(AM_V_texinfo) -T 14in,8.5in -o $@ $<
 
 refcard-letter.pdf: refcard-letter.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
+refcard-letter.dvi: refcard-letter.tex refcard.tex
+refcard-letter.ps: refcard-letter.dvi
+	-$(AM_V_DVIPS)$(DVIPS) $(AM_V_texinfo) -T 11in,8.5in -o $@ $<
 
 EXTRA_DIST = \
-  $(TEX) \
+  $(TEX_SRC) \
   $(FORMATTED)
 
 CLEANFILES = refcard-a4.log refcard-legal.log refcard-letter.log
 
+
 MAINTAINERCLEANFILES = $(FORMATTED)
 
--- a/doc/refcard/refcard-a4.tex
+++ b/doc/refcard/refcard-a4.tex
@@ -2,7 +2,7 @@
 %
 % Make a reference card that will fit on A4 paper.
 %
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
--- a/doc/refcard/refcard-legal.tex
+++ b/doc/refcard/refcard-legal.tex
@@ -2,7 +2,7 @@
 %
 % Make a reference card that will fit on US legal paper.
 %
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
--- a/doc/refcard/refcard-letter.tex
+++ b/doc/refcard/refcard-letter.tex
@@ -3,7 +3,7 @@
 % Make a reference card that will fit on US letter paper
 % (8-1/2 by 11 inches).
 %
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
--- a/doc/refcard/refcard.tex
+++ b/doc/refcard/refcard.tex
@@ -2,7 +2,7 @@
 %
 % This file is TeX source for a reference card describing Octave.
 %
-% Copyright (C) 1996-2013 John W. Eaton
+% Copyright (C) 1996-2015 John W. Eaton
 %
 % This file is part of Octave.
 %
@@ -536,7 +536,7 @@
 speye ({\it n)}&create sparse identity matrix.\cr
 sprand ({\it n}, {\it m}, {\it d})&sparse rand matrix of density {\it d}.\cr
 spdiags (...)&sparse generalization of {\it diag}.\cr
-nnz ({\it s})&No. non-zero elements in sparse matrix.\cr
+nnz ({\it s})&No. nonzero elements in sparse matrix.\cr
 \endsec
 
 \sec Ranges;
--- a/etc/HACKING
+++ b/etc/HACKING
@@ -343,7 +343,7 @@
 
 ################################################################################
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/etc/NEWS.3
+++ b/etc/NEWS.3
@@ -1,3 +1,1523 @@
+Summary of important user-visible changes for version 3.8:
+---------------------------------------------------------
+
+  ** One of the biggest new features for Octave 3.8 is a graphical user
+     interface.  It is the one thing that users have requested most
+     often over the last few years and now it is almost ready.  But
+     because it is not quite as polished as we would like, we have
+     decided to wait until the 4.0.x release series before making the
+     GUI the default interface (until then, you can use the --force-gui
+     option to start the GUI).
+
+     Given the length of time and the number of bug fixes and
+     improvements since the last major release Octave, we also decided
+     against delaying the release of all these new improvements any
+     longer just to perfect the GUI.  So please enjoy the 3.8 release of
+     Octave and the preview of the new GUI.  We believe it is working
+     reasonably well, but we also know that there are some obvious rough
+     spots and many things that could be improved.
+
+     WE NEED YOUR HELP.  There are many ways that you can help us fix
+     the remaining problems, complete the GUI, and improve the overall
+     user experience for both novices and experts alike:
+
+       * If you are a skilled software developer, you can help by
+         contributing your time to help with Octave's development.  See
+         http://octave.org/get-involved.html for more information.
+
+       * If Octave does not work properly, you are encouraged
+         report the problems you find.  See http://octave.org/bugs.html
+         for more information about how to report problems.
+
+       * Whether you are a user or developer, you can help to fund the
+         project.  Octave development takes a lot of time and expertise.
+         Your contributions help to ensure that Octave will continue to
+         improve.  See http://octave.org/donate.html for more details.
+
+    We hope you find Octave to be useful.  Please help us make it even
+    better for the future!
+
+ ** Octave now uses OpenGL graphics by default with FLTK widgets.  If
+    OpenGL libraries or FLTK widgets are not available when Octave is
+    built, gnuplot is used.  You may also choose to use gnuplot for
+    graphics by executing the command
+
+      graphics_toolkit ("gnuplot")
+
+    Adding this command to your ~/.octaverc file will set the default
+    for each session.
+
+ ** Printing or saving figures with OpenGL graphics requires the
+    gl2ps library which is no longer distributed with Octave.  The
+    software is widely available in most package managers.  If a
+    pre-compiled package does not exist for your system, you can find
+    the current sources at http://www.geuz.org/gl2ps/.
+
+ ** Octave now supports nested functions with scoping rules that are
+    compatible with Matlab.  A nested function is one declared and defined
+    within the body of another function.  The nested function is only
+    accessible from within the enclosing function which makes it one
+    method for making private functions whose names do not conflict with those
+    in the global namespace (See also subfunctions and private functions).
+    In addition, variables in the enclosing function are visible within the
+    nested function.  This makes it possible to have a pseudo-global variable
+    which can be seen by a group of functions, but which is not visible in
+    the global namespace.
+
+    Example:
+    function outerfunc (...)
+      ...
+      function nested1 (...)
+        ...
+        function nested2 (...)
+           ...
+        endfunction
+      endfunction
+
+      function nested3 (...)
+        ...
+      endfunction
+    endfunction
+
+ ** Line continuations inside character strings have changed.
+
+    The sequence '...' is no longer recognized as a line continuation
+    inside a character string.  A backslash '\' followed by a newline
+    character is no longer recognized as a line continuation inside
+    single-quoted character strings.  Inside double-quoted character
+    strings, a backslash followed by a newline character is still
+    recognized as a line continuation, but the backslash character must
+    be followed *immediately* by the newline character.  No whitespace or
+    end-of-line comment may appear between them.
+
+ ** Backslash as a continuation marker outside of double-quoted strings
+    is now deprecated.
+
+    Using '\' as a continuation marker outside of double quoted strings
+    is now deprecated and will be removed from a future version of
+    Octave.  When that is done, the behavior of
+
+      (a \
+       b)
+
+    will be consistent with other binary operators.
+
+ ** Redundant terminal comma accepted by parser
+
+    A redundant terminal comma is now accepted in matrix
+    definitions which allows writing code such as
+
+    [a,...
+     b,...
+     c,...
+    ] = deal (1,2,3)
+
+ ** Octave now has limited support for named exceptions
+
+    The following syntax is now accepted:
+
+      try
+        statements
+      catch exception-id
+        statements
+      end
+
+    The exception-id is a structure with the fields "message" and
+    "identifier".  For example
+
+      try
+        error ("Octave:error-id", "error message");
+      catch myerr
+        printf ("identifier: %s\n", myerr.identifier);
+        printf ("message:    %s\n", myerr.message);
+      end_try_catch
+
+    When classdef-style classes are added to Octave, the exception-id
+    will become an MException object.
+
+ ** Warning states may now be set temporarily, until the end of the
+    current function, using the syntax
+
+      warning STATE ID "local"
+
+    in which STATE may be "on", "off", or "error".  Changes to warning
+    states that are set locally affect the current function and all
+    functions called from the current scope.  The previous warning state
+    is restored on return from the current function.  The "local"
+    option is ignored if used in the top-level workspace.
+
+ ** Warning IDs renamed:
+
+    Octave:array-as-scalar => Octave:array-to-scalar
+    Octave:array-as-vector => Octave:array-to-vector
+
+ ** 'emptymatch', 'noemptymatch' options added to regular expressions.
+
+    With this addition Octave now accepts the entire set of Matlab options
+    for regular expressions.  'noemptymatch' is the default, but 'emptymatch'
+    has certain uses where you need to match an assertion rather than actual
+    characters.  For example,
+
+    regexprep ('World', '^', 'Hello ', 'emptymatch')
+      => Hello World
+
+    where the pattern is actually the assertion '^' or start-of-line.
+
+ ** For compatibility with Matlab, the regexp, regexpi, and regexprep
+    functions now process backslash escape sequences in single-quoted pattern
+    strings.  In addition, the regexprep function now processes backslash
+    escapes in single-quoted replacement strings.  For example,
+
+    regexprep (str, '\t', '\n')
+
+    would search the variable str for a TAB character (escape sequence \t)
+    and replace it with a NEWLINE (escape sequence \n).  Previously the
+    expression would have searched for a literal '\' followed by 't' and
+    replaced the two characters with the sequence '\', 'n'.
+
+ ** A TeX parser has been implemented for the FLTK toolkit and is the default
+    for any text object including titles and axis labels.  The TeX parser is
+    supported only for display on a monitor, not for printing.
+
+    A quick summary of features:
+
+    Code         Feature     Example             Comment
+    -----------------------------------------------------------------
+    _            subscript   H_2O                formula for water
+    ^            exponent    y=x^2               formula for parabola
+    \char        symbol      \beta               Greek symbol beta
+    \fontname    font        \fontname{Arial}    set Arial font
+    \fontsize    fontsize    \fontsize{16}       set fontsize 16
+    \color[rgb]  fontcolor   \color[rgb]{1 0 1}  set magenta color
+    \bf          bold        \bfBold Text        bold font
+    \it          italic      \itItalic Text      italic font
+    \sl          slanted     \slOblique Text     slanted font
+    \rm          normal      \bfBold\rmNormal    normal font
+    {}           group       {\bf Bold}Normal    group objects
+                             e^{i*\pi} = -1      group objects
+
+ ** The m-files in the plot directory have been overhauled.
+
+    The plot functions now produce output that is nearly visually compatible
+    with Matlab.  Plot performance has also increased, dramatically for some
+    functions such as comet and waitbar.  Finally, the documentation for most
+    functions has been updated so it should be clearer both how to use a
+    function and when a function is appropriate.
+
+ ** The m-files in the image directory have been overhauled.
+
+    The principal benefit is that Octave will now no longer automatically
+    convert images stored with integers to doubles.  Storing images as uint8
+    or uint16 requires only 1/8 or 1/4 the memory of an image stored using
+    doubles.  For certain operations, such as fft2, the image must still be
+    converted to double in order to work.
+
+    Other changes include fixes to the way indexed images are read from a
+    colormap depending on the image class (integer images have a -1 offset to
+    the colormap row number).
+
+ ** The imread and imwrite functions have been completely rewritten.
+
+    The main changes relate to the alpha channel, support for reading and
+    writing of floating point images, implemented writing of indexed images,
+    and appending images to multipage image files.
+
+    The issues that may arise due to backwards incompatibility are:
+
+      * imwrite no longer interprets a length of 2 or 4 in the third dimension
+        as grayscale or RGB with alpha channel (a length of 4 will be saved
+        as a CMYK image).  Alpha channel must be passed as separate argument.
+
+      * imread will always return the colormap indexes when reading an indexed
+        image, even if the colormap is not requested as output.
+
+      * transparency values are now inverted from previous Octave versions
+        (0 is for completely transparent instead of completely opaque).
+
+    In addition, the function imformats has been implemented to expand
+    reading and writing of images of different formats through imread
+    and imwrite.
+
+ ** The colormap function now provides new options--"list", "register",
+    and "unregister"--to list all available colormap functions, and to
+    add or remove a function name from the list of known colormap
+    functions.  Packages that implement extra colormaps should use these
+    commands with PKG_ADD and PKG_DEL statements.
+
+ ** strsplit has been modified to be compatible with Matlab.  There
+    are two instances where backward compatibility is broken.
+
+    (1) Delimiters are now string vectors, not scalars.
+
+    Octave's legacy behavior
+
+      strsplit ("1 2, 3", ", ")
+      ans =
+      {
+       [1,1] = 1
+       [1,2] = 2
+       [1,3] =
+       [1,4] = 3
+      }
+
+    Matlab compatible behavior
+
+      strsplit ("1 2, 3", ", ")
+      ans =
+      {
+       [1,1] = 1 2
+       [1,2] = 3
+      }
+
+    (2) By default, Matlab treats consecutive delimiters as a single
+    delimiter.  By default, Octave's legacy behavior was to return an
+    empty string for the part between the delmiters.
+
+    Where legacy behavior is desired, the call to strsplit() may be
+    replaced by ostrsplit(), which is Octave's original implementation of
+    strsplit().
+
+ ** The datevec function has been extended for better Matlab compatibility.
+    It now accepts string inputs in the following numerical formats: 12, 21,
+    22, 26, 29, 31.  This is undocumented, but verifiable, Matlab behavior.
+    In addition, the default for formats which do not specify a date is
+    January 1st of the current year.  The previous default was the current day,
+    month, and year.  This may produce changes in existing scripts.
+
+ ** The error function and its derivatives has been extended to accept complex
+    arguments.  The following functions now accept complex inputs:
+
+    erf  erfc  erfcx
+
+    In addition two new error functions erfi (imaginary error function) and
+    dawson (scaled imaginary error function) have been added.
+
+ ** The glpk function has been modified to reflect changes in the GLPK
+    library.  The "round" and "itcnt" options have been removed.  The
+    "relax" option has been replaced by the "rtest" option.  The numeric
+    values of error codes and of some options have also changed.
+
+ ** The kurtosis function has changed definition to be compatible with
+    Matlab.  It now returns the base kurtosis instead of the "excess kurtosis".
+    The old behavior can be had by changing scripts to normalize with -3.
+
+               "excess kurtosis" = kurtosis (x) - 3
+
+ ** The moment function has changed definition to be compatible with
+    Matlab.  It now returns the central moment instead of the raw moment.
+    The old behavior can be had by passing the type argument "r" for raw.
+
+ ** The default name of the Octave crash dump file is now
+    "octave-workspace" instead of "octave-core".  The exact name can
+    always be customized with the octave_core_file_name function.
+
+ ** A citation command has been added to display information on how to
+    cite Octave and packages in publications.  The package system will
+    look for and install CITATION files from packages.
+
+ ** The java package from Octave Forge is now part of core Octave.  The
+    following new functions are available for interacting with Java
+    directly from Octave:
+
+      debug_java     java_matrix_autoconversion
+      isjava         java_unsigned_autoconversion
+      java2mat       javaaddpath
+      javaArray      javaclasspath
+      javaMethod     javamem
+      javaObject     javarmpath
+                     usejava
+
+    In addition, the following functions that use the Java interface
+    are now available (provided that Octave is compiled with support for
+    Java enabled):
+
+      helpdlg    listdlg   questdlg
+      inputdlg   msgbox    warndlg
+
+ ** Other new functions added in 3.8.0:
+
+      atan2d                     erfi             lines
+      base64_decode              expint           linsolve
+      base64_encode              findfigs         missing_component_hook
+      betaincinv                 flintmax         polyeig
+      built_in_docstrings_file   fminsearch       prefdir
+      cmpermute                  gallery          preferences
+      cmunique                   gco              readline_re_read_init_file
+      colorcube                  hdl2struct       readline_read_init_file
+      copyobj                    history_save     rgbplot
+      dawson                     imformats        save_default_options
+      dblist                     importdata       shrinkfaces
+      desktop                    isaxes           splinefit
+      doc_cache_create           iscolormap       stemleaf
+      ellipj                     isequaln         strjoin
+      ellipke                    jit_debug        struct2hdl
+      erfcinv                    jit_enable       tetramesh
+                                 jit_startcnt     waterfall
+
+ ** Deprecated functions.
+
+    The following functions were deprecated in Octave 3.4 and have been
+    removed from Octave 3.8.
+
+      autocor    dispatch              is_global    setstr
+      autocov    fstat                 krylovb      strerror
+      betai      gammai                perror       values
+      cellidx    glpkmex               replot
+      cquad      is_duplicate_entry    saveimage
+
+    The following functions have been deprecated in Octave 3.8 and will
+    be removed from Octave 3.12 (or whatever version is the second major
+    release after 3.8):
+
+      default_save_options    java_new
+      gen_doc_cache           java_set
+      interp1q                java_unsigned_conversion
+      isequalwithequalnans    javafields
+      java_convert_matrix     javamethods
+      java_debug              re_read_readline_init_file
+      java_get                read_readline_init_file
+      java_invoke             saving_history
+
+
+    The following keywords have been deprecated in Octave 3.8 and will
+    be removed from Octave 3.12 (or whatever version is the second major
+    release after 3.8):
+
+      static
+
+    The following configuration variables have been deprecated in Octave
+    3.8 and will be removed from Octave 3.12 (or whatever version is the
+    second major release after 3.8):
+
+      CC_VERSION  (now GCC_VERSION)
+      CXX_VERSION (now GXX_VERSION)
+
+    The internal class <Octave_map> has been deprecated in Octave 3.8 and will
+    be removed from Octave 3.12 (or whatever version is the second major
+    release after 3.8).  Replacement classes are <octave_map> (struct array)
+    or <octave_scalar_map> for a single structure.
+
+Summary of important user-visible changes for version 3.6:
+---------------------------------------------------------
+
+ ** The PCRE library is now required to build Octave.  If a pre-compiled
+    package does not exist for your system, you can find PCRE sources
+    at http://www.pcre.org
+
+ ** The ARPACK library is no longer distributed with Octave.
+    If you need the eigs or svds functions you must provide an
+    external ARPACK through a package manager or by compiling it
+    yourself.  If a pre-compiled package does not exist for your system,
+    you can find the current ARPACK sources at
+    http://forge.scilab.org/index.php/p/arpack-ng
+
+ ** Many of Octave's binary operators (.*, .^, +, -, ...) now perform
+    automatic broadcasting for array operations which allows you to use
+    operator notation instead of calling bsxfun or expanding arrays (and
+    unnecessarily wasting memory) with repmat or similar idioms.  For
+    example, to scale the columns of a matrix by the elements of a row
+    vector, you may now write
+
+      rv .* M
+
+    In this expression, the number of elements of rv must match the
+    number of columns of M.  The following operators are affected:
+
+      plus      +  .+
+      minus     -  .-
+      times     .*
+      rdivide   ./
+      ldivide   .\
+      power     .^  .**
+      lt        <
+      le        <=
+      eq        ==
+      gt        >
+      ge        >=
+      ne        !=  ~=
+      and       &
+      or        |
+      atan2
+      hypot
+      max
+      min
+      mod
+      rem
+      xor
+
+    additionally, since the A op= B assignment operators are equivalent
+    to A = A op B, the following operators are also affected:
+
+      +=  -=  .+=  .-=  .*=  ./=  .\=  .^=  .**=  &=  |=
+
+    See the "Broadcasting" section in the new "Vectorization and Faster
+    Code Execution" chapter of the manual for more details.
+
+ ** Octave now features a profiler, thanks to the work of Daniel Kraft
+    under the Google Summer of Code mentorship program.  The manual has
+    been updated to reflect this addition.  The new user-visible
+    functions are profile, profshow, and profexplore.
+
+ ** Overhaul of statistical distribution functions
+
+    Functions now return "single" outputs for inputs of class "single".
+
+    75% reduction in memory usage through use of logical indexing.
+
+    Random sample functions now use the same syntax as rand and accept
+    a comma separated list of dimensions or a dimension vector.
+
+    Functions have been made Matlab-compatible with regard to special
+    cases (probability on boundaries, probabilities for values outside
+    distribution, etc.).  This may cause subtle changes to existing
+    scripts.
+
+    negative binomial function has been extended to real, non-integer
+    inputs.  The discrete_inv function now returns v(1) for 0 instead of
+    NaN.  The nbincdf function has been recoded to use a closed form
+    solution with betainc.
+
+ ** strread, textscan, and textread have been completely revamped.
+
+    They now support nearly all Matlab functionality including:
+
+      * Matlab-compatible whitespace and delimiter defaults
+
+      * Matlab-compatible options: 'whitespace', treatasempty', format
+        string repeat count, user-specified comment style, uneven-length
+        output arrays, %n and %u conversion specifiers (provisionally)
+
+ ** All .m string functions have been modified for better performance or
+    greater Matlab compatibility.  Performance gains of 15X-30X have
+    been demonstrated.  Operations on cell array of strings no longer pay
+    quite as high a penalty as those on 2-D character arrays.
+
+      deblank:  Now requires character or cellstr input.
+
+      strtrim:  Now requires character or cellstr input.
+                No longer trims nulls ("\0") from string for Matlab
+                compatibility.
+
+      strmatch: Follows documentation precisely and ignores trailing spaces
+                in pattern and in string.  Note that this is documented
+                Matlab behavior but the implementation apparently does
+                not always follow it.
+
+      substr:   Now possible to specify a negative LEN option which
+                extracts to within LEN of the end of the string.
+
+      strtok:   Now accepts cellstr input.
+
+      base2dec, bin2dec, hex2dec:
+                Now accept cellstr inputs.
+
+      dec2base, dec2bin, dec2hex:
+                Now accept cellstr inputs.
+
+      index, rindex:
+                Now accept 2-D character array input.
+
+      strsplit: Now accepts 2-D character array input.
+
+ ** Geometry functions derived from Qhull (convhull, delaunay, voronoi)
+    have been revamped.  The options passed to the underlying qhull
+    command have been changed for better results or for Matlab
+    compatibility.
+
+      convhull: Default options are "Qt" for 2D, 3D, 4D inputs
+                Default options are "Qt Qx" for 5D and higher
+
+      delaunay: Default options are "Qt Qbb Qc Qz" for 2D and 3D inputs
+                Default options are "Qt Qbb Qc Qx" for 4D and higher
+
+      voronoi:  No default arguments
+
+ ** Date/Time functions updated.  Millisecond support with FFF format
+    string now supported.
+
+    datestr: Numerical formats 21, 22, 29 changed to match Matlab.
+             Now accepts cellstr input.
+
+ ** The following warning IDs have been removed:
+
+      Octave:associativity-change
+      Octave:complex-cmp-ops
+      Octave:empty-list-elements
+      Octave:fortran-indexing
+      Octave:precedence-change
+
+ ** The warning ID Octave:string-concat has been renamed to
+    Octave:mixed-string-concat.
+
+ ** Octave now includes the following Matlab-compatible preference
+    functions:
+
+      addpref  getpref  ispref  rmpref  setpref
+
+ ** The following Matlab-compatible handle graphics functions have been
+    added:
+
+      guidata         uipanel        uitoolbar
+      guihandles      uipushtool     uiwait
+      uicontextmenu   uiresume       waitfor
+      uicontrol       uitoggletool
+
+    The uiXXX functions above are experimental.
+
+    Except for uiwait and uiresume, the uiXXX functions are not
+    supported with the FLTK+OpenGL graphics toolkit.
+
+    The gnuplot graphics toolkit does not support any of the uiXXX
+    functions nor the waitfor function.
+
+ ** New keyword parfor (parallel for loop) is now recognized as a valid
+    keyword.  Implementation, however, is still mapped to an ordinary
+    for loop.
+
+ ** Other new functions added in 3.6.0:
+
+      bicg                       nthargout                   usejava
+      is_dq_string               narginchk                   waitbar
+      is_sq_string               python                      zscore
+      is_function_handle         register_graphics_toolkit
+      loaded_graphics_toolkits   recycle
+
+ ** Deprecated functions.
+
+    The following functions were deprecated in Octave 3.2 and have been
+    removed from Octave 3.6.
+
+      create_set          spcholinv    splu
+      dmult               spcumprod    spmax
+      iscommand           spcumsum     spmin
+      israwcommand        spdet        spprod
+      lchol               spdiag       spqr
+      loadimage           spfind       spsum
+      mark_as_command     sphcat       spsumsq
+      mark_as_rawcommand  spinv        spvcat
+      spatan2             spkron       str2mat
+      spchol              splchol      unmark_command
+      spchol2inv          split        unmark_rawcommand
+
+    The following functions have been deprecated in Octave 3.6 and will
+    be removed from Octave 3.10 (or whatever version is the second major
+    release after 3.6):
+
+      cut                polyderiv
+      cor                shell_cmd
+      corrcoef           studentize
+      __error_text__     sylvester_matrix
+      error_text
+
+ ** The following functions have been modified for Matlab compatibility:
+
+      randperm
+
+Summary of important user-visible changes for version 3.4.3:
+-----------------------------------------------------------
+
+ ** Octave 3.4.3 is a bug fixing release.
+
+Summary of important user-visible changes for version 3.4.2:
+-----------------------------------------------------------
+
+ ** Octave 3.4.2 fixes some minor installation problems that affected
+    version 3.4.1.
+
+Summary of important user-visible changes for version 3.4.1:
+-----------------------------------------------------------
+
+ ** Octave 3.4.1 is primarily a bug fixing release.
+
+ ** IMPORTANT note about binary incompatibility in this release:
+
+    Binary compatibility for all 3.4.x releases was originally planned,
+    but this is impossible for the 3.4.1 release due to a bug in the way
+    shared libraries were built in Octave 3.4.0.  Because of this bug,
+    .oct files built for Octave 3.4.0 must be recompiled before they
+    will work with Octave 3.4.1.
+
+    Given that there would be binary incompatibilities with shared
+    libraries going from Octave 3.4.0 to 3.4.1, the following
+    incompatible changes were also made in this release:
+
+      * The Perl Compatible Regular Expression (PCRE) library is now
+        required to build Octave.
+
+      * Octave's libraries and .oct files are now installed in
+        subdirectories of $libdir instead of $libexecdir.
+
+    Any future Octave 3.4.x release versions should remain binary
+    compatible with Octave 3.4.1 as proper library versioning is now
+    being used as recommended by the libtool manual.
+
+ ** The following functions have been deprecated in Octave 3.4.1 and will
+    be removed from Octave 3.8 (or whatever version is the second major
+    release after 3.4):
+
+      cquad  is_duplicate_entry  perror  strerror
+
+ ** The following functions are new in 3.4.1:
+
+      colstyle  gmres  iscolumn  isrow  mgorth  nproc  rectangle
+
+ ** The get_forge_pkg function is now private.
+
+ ** The rectangle_lw, rectangle_sw, triangle_lw, and triangle_sw
+    functions are now private.
+
+ ** The logistic_regression_derivatives and logistic_regression_likelihood
+    functions are now private.
+
+ ** ChangeLog files in the Octave sources are no longer maintained
+    by hand.  Instead, there is a single ChangeLog file generated from
+    the Mercurial version control commit messages.  Older ChangeLog
+    information can be found in the etc/OLD-ChangeLogs directory in the
+    source distribution.
+
+Summary of important user-visible changes for version 3.4:
+---------------------------------------------------------
+
+ ** BLAS and LAPACK libraries are now required to build Octave.  The
+    subset of the reference BLAS and LAPACK libraries has been removed
+    from the Octave sources.
+
+ ** The ARPACK library is now distributed with Octave so it no longer
+    needs to be available as an external dependency when building
+    Octave.
+
+ ** The `lookup' function was extended to be more useful for
+    general-purpose binary searching.  Using this improvement, the
+    ismember function was rewritten for significantly better
+    performance.
+
+ ** Real, integer and logical matrices, when used in indexing, will now
+    cache the internal index_vector value (zero-based indices) when
+    successfully used as indices, eliminating the conversion penalty for
+    subsequent indexing by the same matrix.  In particular, this means it
+    is no longer needed to avoid repeated indexing by logical arrays
+    using find for performance reasons.
+
+ ** Logical matrices are now treated more efficiently when used as
+    indices.  Octave will keep the index as a logical mask unless the
+    ratio of true elements is small enough, using a specialized
+    code.  Previously, all logical matrices were always first converted
+    to index vectors.  This results in savings in both memory and
+    computing time.
+
+ ** The `sub2ind' and `ind2sub' functions were reimplemented as compiled
+    functions for better performance.  These functions are now faster,
+    can deliver more economized results for ranges, and can reuse the
+    index cache mechanism described in previous paragraph.
+
+ ** The built-in function equivalents to associative operators (`plus',
+    `times', `mtimes', `and', and `or') have been extended to accept
+    multiple arguments.  This is especially useful for summing
+    (multiplying, etc.) lists of objects (of possibly distinct types):
+
+      matrix_sum = plus (matrix_list{:});
+
+ ** An FTP object type based on libcurl has been implemented.  These
+    objects allow ftp connections, downloads and uploads to be
+    managed.  For example,
+
+      fp = ftp ("ftp.octave.org);
+      cd (fp, "gnu/octave");
+      mget (fp, "octave-3.2.3.tar.bz2");
+      close (fp);
+
+ ** The default behavior of `assert (observed, expected)' has been
+    relaxed to employ less strict checking that does not require the
+    internals of the values to match.  This avoids previously valid
+    tests from breaking due to new internal classes introduced in future
+    Octave versions.
+
+    For instance, all of these assertions were true in Octave 3.0.x
+    but false in 3.2.x due to new optimizations and improvements:
+
+      assert (2*linspace (1, 5, 5), 2*(1:5))
+      assert (zeros (0, 0), [])
+      assert (2*ones (1, 5), (2) (ones (1,5)))
+
+ ** The behavior of library functions `ismatrix', `issquare', and
+    `issymmetric' has been changed for better consistency.
+
+    * The `ismatrix' function now returns true for all numeric,
+      logical and character 2-D or N-D matrices.  Previously, `ismatrix'
+      returned false if the first or second dimension was zero.
+      Hence, `ismatrix ([])' was false,
+      while `ismatrix (zeros (1,2,0))' was true.
+
+    * The `issquare' function now returns a logical scalar, and is
+      equivalent to the expression
+
+        ismatrix (x) && ndims (x) == 2 && rows (x) == columns (x)
+
+      The dimension is no longer returned.  As a result, `issquare ([])'
+      now yields true.
+
+    * The `issymmetric' function now checks for symmetry instead of
+      Hermitianness.  For the latter, ishermitian was created.  Also,
+      logical scalar is returned rather than the dimension, so
+      `issymmetric ([])' is now true.
+
+ ** Function handles are now aware of overloaded functions.  If a
+    function is overloaded, the handle determines at the time of its
+    reference which function to call.  A non-overloaded version does not
+    need to exist.
+
+ ** Overloading functions for built-in classes (double, int8, cell,
+    etc.) is now compatible with Matlab.
+
+ ** Function handles can now be compared with the == and != operators,
+    as well as the `isequal' function.
+
+ ** Performance of concatenation (using []) and the functions `cat',
+    `horzcat', and `vertcat' has been improved for multidimensional
+    arrays.
+
+ ** The operation-assignment operators +=, -=, *= and /= now behave more
+    efficiently in certain cases.  For instance, if M is a matrix and S a
+    scalar, then the statement
+
+      M += S;
+
+    will operate on M's data in-place if it is not shared by another
+    variable, usually increasing both time and memory efficiency.
+
+    Only selected common combinations are affected, namely:
+
+      matrix += matrix
+      matrix -= matrix
+      matrix .*= matrix
+      matrix ./= matrix
+
+      matrix += scalar
+      matrix -= scalar
+      matrix *= scalar
+      matrix /= scalar
+
+      logical matrix |= logical matrix
+      logical matrix &= logical matrix
+
+    where matrix and scalar belong to the same class.  The left-hand
+    side must be a simple variable reference.
+
+    Moreover, when unary operators occur in expressions, Octave will
+    also try to do the operation in-place if it's argument is a
+    temporary expression.
+
+ ** The effect of comparison operators (<, >, <=, and >=) applied to
+    complex numbers has changed to be consistent with the strict
+    ordering defined by the `max', `min', and `sort' functions.  More
+    specifically, complex numbers are compared by lexicographical
+    comparison of the pairs `[abs(z), arg(z)]'.  Previously, only real
+    parts were compared; this can be trivially achieved by converting
+    the operands to real values with the `real' function.
+
+ ** The automatic simplification of complex computation results has
+    changed.  Octave will now simplify any complex number with a zero
+    imaginary part or any complex matrix with all elements having zero
+    imaginary part to a real value.  Previously, this was done only for
+    positive zeros.  Note that the behavior of the complex function is
+    unchanged and it still produces a complex value even if the
+    imaginary part is zero.
+
+ ** As a side effect of code refactoring in liboctave, the binary
+    logical operations are now more easily amenable to compiler
+    optimizations and are thus significantly faster.
+
+ ** Octave now allows user-defined `subsasgn' methods to optimize out
+    redundant copies.  For more information, see the manual.
+
+ ** More efficient matrix division handling.  Octave is now able to
+    handle the expressions
+
+      M' \ V
+      M.' \ V
+      V / M
+
+    (M is a matrix and V is a vector) more efficiently in certain cases.
+    In particular, if M is triangular, all three expressions will be
+    handled by a single call to xTRTRS (from LAPACK), with appropriate
+    flags.  Previously, all three expressions required a physical
+    transpose of M.
+
+ ** More efficient handling of certain mixed real-complex matrix
+    operations.  For instance, if RM is a real matrix and CM a complex
+    matrix,
+
+      RM * CM
+
+    can now be evaluated either as
+
+      complex (RM * real (CM), RM * imag (CM))
+
+    or as
+
+      complex (RM) * CM,
+
+    depending on the dimensions.  The first form requires more
+    temporaries and copying, but halves the FLOP count, which normally
+    brings better performance if RM has enough rows.  Previously, the
+    second form was always used.
+
+    Matrix division is similarly affected.
+
+ ** More efficient handling of triangular matrix factors returned from
+    factorizations.  The functions for computing QR, LU and Cholesky
+    factorizations will now automatically return the triangular matrix
+    factors with proper internal matrix_type set, so that it won't need
+    to be computed when the matrix is used for division.
+
+ ** The built-in `sum' function now handles the non-native summation
+    (i.e., double precision sum of single or integer inputs) more
+    efficiently, avoiding a temporary conversion of the whole input
+    array to doubles.  Further, `sum' can now accept an extra option
+    argument, using a compensated summation algorithm rather than a
+    straightforward sum, which significantly improves precision if lots
+    of cancellation occurs in the summation.
+
+ ** The built-in `bsxfun' function now uses optimized code for certain
+    cases where built-in operator handles are passed in.  Namely, the
+    optimizations concern the operators `plus', `minus', `times',
+    `ldivide', `rdivide', `power', `and', `or' (for logical arrays),
+    the relational operators `eq', `ne', `lt', `le', `gt', `ge', and the
+    functions `min' and `max'.  Optimizations only apply when both
+    operands are of the same built-in class.  Mixed real/complex and
+    single/double operations will first convert both operands to a
+    common type.
+
+ ** The `strfind' and `strrep' functions now have compiled
+    implementations, facilitating significantly more efficient searching
+    and replacing in strings, especially with longer patterns.  The code
+    of `strcat' has been vectorized and is now much more efficient when
+    many strings are concatenated.  The `strcmpi' and `strncmpi'
+    functions are now built-in functions, providing better performance.
+
+ ** 'str2double' now has a compiled implementation and the API conforms
+    to Matlab.  The additional Octave-specific features of returning a
+    boolean matrix indicating which elements were successfully converted
+    has been removed.
+
+ ** Matlab-style ignoring input and output function arguments using
+    tilde (~) is now supported.  Ignored output arguments may be
+    detected from a function using the built-in function `isargout'.
+    For more details, consult the manual.
+
+ ** The list datatype, deprecated since the introduction of cells, has
+    been removed.
+
+ ** The accumarray function has been optimized and is now significantly
+    faster in certain important cases.
+
+ ** The behavior of isreal and isnumeric functions was changed to be more
+    Matlab-compatible.
+
+ ** The integer math & conversion warnings (Octave:int-convert-nan,
+    Octave:int-convert-non-int-val, Octave:int-convert-overflow,
+    Octave:int-math-overflow) have been removed.
+
+ ** rem and mod are now built-in functions.  They also handle integer
+    types efficiently using integer arithmetic.
+
+ ** Sparse indexing and indexed assignment has been mostly rewritten.
+    Since Octave uses compressed column storage for sparse matrices,
+    major attention is devoted to operations manipulating whole columns.
+    Such operations are now significantly faster, as well as some other
+    important cases.
+
+    Further, it is now possible to pre-allocate a sparse matrix and
+    subsequently fill it by assignments, provided they meet certain
+    conditions.  For more information, consult the `spalloc' function,
+    which is no longer a mere dummy.  Consequently, nzmax and nnz are no
+    longer always equal in Octave.  Octave may also produce a matrix
+    with nnz < nzmax as a result of other operations, so you should
+    consistently use nnz unless you really want to use nzmax (i.e., the
+    space allocated for nonzero elements).
+
+    Sparse concatenation is also affected, and concatenating sparse
+    matrices, especially larger collections, is now significantly more
+    efficient.  This applies to both the [] operator and the
+    cat/vertcat/horzcat functions.
+
+ ** It is now possible to optionally employ the xGESDD LAPACK drivers
+    for computing the singular value decomposition using svd, instead
+    of the default xGESVD, using the configuration pseudo-variable
+    svd_driver.  The xGESDD driver can be up to 6x times faster when
+    singular vectors are requested, but is reported to be somewhat less
+    robust on highly ill-conditioned matrices.
+
+ ** Configuration pseudo-variables, such as page_screen_output or
+    confirm_recursive_rmdir (or the above mentioned svd_driver), now
+    accept a "local" option as second argument, requesting the change
+    to be undone when the current function returns:
+
+    function [status, msg] = rm_rf (dir)
+      confirm_recursive_rmdir (false, "local");
+      [status, msg] = rmdir (dir, "s");
+      ...
+    endfunction
+
+    Upon return, confirm_recursive_rmdir will be restored to the value
+    it had on entry to the function, even if there were subsequent
+    changes to the variable in function rm_rf or any of the functions
+    it calls.
+
+ ** pkg now accepts a -forge option for downloading and installing
+    packages from Octave Forge automatically.  For example,
+
+      pkg install -forge general
+
+    will automatically download the latest release of the general
+    package and attempt to install it.  No automatic resolving of
+    dependencies is provided.  Further,
+
+      pkg list -forge
+
+    can be used to list all available packages.
+
+ ** The internal data representation of structs has been completely
+    rewritten to make certain optimizations feasible.  The field data
+    can now be shared between structs with equal keys but different
+    dimensions or values, making operations that preserve the fields
+    faster.  Economized storage is now used for scalar structs (just
+    like most other scalars), making their usage more
+    memory-efficient.  Certain array-like operations on structs
+    (concatenation, uniform cellfun, num2cell) have gained a
+    significant speed-up.  Additionally, the octave_scalar_map class
+    now provides a simpler interface to work with scalar structs within
+    a C++ DLD function.
+
+ ** Two new formats are available for displaying numbers:
+
+      format short eng
+      format long eng
+
+    Both display numbers in engineering notation, i.e., mantissa +
+    exponent where the exponent is a multiple of 3.
+
+ ** The following functions are new in Octave 3.4:
+      accumdim    erfcx        nfields      pqpnonneg  uigetdir
+      bitpack     fileread     nth_element  quadcc     uigetfile
+      bitunpack   fminbnd      onCleanup    randi      uiputfile
+      blkmm       fskipl       pbaspect     repelems   uimenu
+      cbrt        ifelse       pie3         reset      whitebg
+      curl        ishermitian  powerset     rsf2csf
+      chop        isindex      ppder        saveas
+      daspect     luupdate     ppint        strread
+      divergence  merge        ppjumps      textread
+
+ ** Using the image function to view images with external programs such
+    as display, xv, and xloadimage is no longer supported.  The
+    image_viewer function has also been removed.
+
+ ** The behavior of struct assignments to non-struct values has been
+    changed.  Previously, it was possible to overwrite an arbitrary
+    value:
+
+      a = 1;
+      a.x = 2;
+
+    This is no longer possible unless a is an empty matrix or cell
+    array.
+
+ ** The dlmread function has been extended to allow specifying a custom
+    value for empty fields.
+
+ ** The dlmread and dlmwrite functions have been modified to accept
+    file IDs (as returned by fopen) in addition to file names.
+
+ ** Octave can now optimize away the interpreter overhead of an
+    anonymous function handle, if the function simply calls another
+    function or handle with some of its parameters bound to certain
+    values.  Example:
+
+      f = @(x) sum (x, 1);
+
+    When f is called, the call is forwarded to @sum with the constant 1
+    appended, and the anonymous function call does not occur on the
+    call stack.
+
+ ** For compatibility with Matlab, mu2lin (x) is now equivalent to
+    mu2lin (x, 0).
+
+ ** The new function `history_control' may be used to control the way
+    command lines are added to the history list when Octave is using
+    readline for command-line editing.  For example
+
+      history_control ("ignoredups")
+
+    tells Octave to avoid adding duplicate lines to the history list.
+
+ ** Octave now uses the gnulib library for improved portability and to
+    avoid bugs in operating system functions.
+
+ ** Deprecated functions.
+
+    The following functions were deprecated in Octave 3.0 and have been
+    removed from Octave 3.4.
+
+      beta_cdf         geometric_pdf        pascal_pdf
+      beta_inv         geometric_rnd        pascal_rnd
+      beta_pdf         hypergeometric_cdf   poisson_cdf
+      beta_rnd         hypergeometric_inv   poisson_inv
+      binomial_cdf     hypergeometric_pdf   poisson_pdf
+      binomial_inv     hypergeometric_rnd   poisson_rnd
+      binomial_pdf     intersection         polyinteg
+      binomial_rnd     is_bool              setstr
+      chisquare_cdf    is_complex           struct_contains
+      chisquare_inv    is_list              struct_elements
+      chisquare_pdf    is_matrix            t_cdf
+      chisquare_rnd    is_scalar            t_inv
+      clearplot        is_square            t_pdf
+      clg              is_stream            t_rnd
+      com2str          is_struct            uniform_cdf
+      exponential_cdf  is_symmetric         uniform_inv
+      exponential_inv  is_vector            uniform_pdf
+      exponential_pdf  isstr                uniform_rnd
+      exponential_rnd  lognormal_cdf        weibcdf
+      f_cdf            lognormal_inv        weibinv
+      f_inv            lognormal_pdf        weibpdf
+      f_pdf            lognormal_rnd        weibrnd
+      f_rnd            meshdom              weibull_cdf
+      gamma_cdf        normal_cdf           weibull_inv
+      gamma_inv        normal_inv           weibull_pdf
+      gamma_pdf        normal_pdf           weibull_rnd
+      gamma_rnd        normal_rnd           wiener_rnd
+      geometric_cdf    pascal_cdf
+      geometric_inv    pascal_inv
+
+    The following functions were deprecated in Octave 3.2 and will
+    be removed from Octave 3.6 (or whatever version is the second major
+    release after 3.2):
+
+      create_set          spcholinv    splu
+      dmult               spcumprod    spmax
+      iscommand           spcumsum     spmin
+      israwcommand        spdet        spprod
+      lchol               spdiag       spqr
+      loadimage           spfind       spsum
+      mark_as_command     sphcat       spsumsq
+      mark_as_rawcommand  spinv        spvcat
+      spatan2             spkron       str2mat
+      spchol              splchol      unmark_command
+      spchol2inv          split        unmark_rawcommand
+
+    The following functions have been deprecated in Octave 3.4 and will
+    be removed from Octave 3.8 (or whatever version is the second major
+    release after 3.4):
+
+      autocor  cellidx   gammai     is_global  replot     values
+      autocov  dispatch  glpkmex    krylovb    saveimage
+      betai    fstat     intwarning perror     strerror
+
+Summary of important user-visible changes for version 3.2:
+---------------------------------------------------------
+
+ ** Compatibility with Matlab graphics has been improved.
+
+    The hggroup object and associated listener callback functions have
+    been added allowing the inclusion of group objects.  Data sources
+    have been added to these group objects such that
+
+           x = 0:0.1:10;
+           y = sin (x);
+           plot (x, y, "ydatasource", "y");
+           for i = 1 : 100
+             pause(0.1)
+             y = sin (x + 0.1 * i);
+             refreshdata ();
+           endfor
+
+    works as expected.  This capability has be used to introduce
+    stem-series, bar-series, etc., objects for better Matlab
+    compatibility.
+
+ ** New graphics functions:
+
+      addlistener                  ezcontour   gcbo         refresh
+      addproperty                  ezcontourf  ginput       refreshdata
+      allchild                     ezmesh      gtext        specular
+      available_graphics_toolkits  ezmeshc     intwarning   surfl
+      graphics_toolkit             ezplot      ishghandle   trisurf
+      cla                          ezplot3     isocolors    waitforbuttonpress
+      clabel                       ezpolar     isonormals
+      comet                        ezsurf      isosurface
+      dellistener                  findall     linkprop
+      diffuse                      gcbf        plotmatrix
+
+ ** New experimental OpenGL/FLTK based plotting system.
+
+    An experimental plotting system based on OpenGL and the FLTK
+    toolkit is now part of Octave.  This graphics toolkit is disabled by
+    default.  You can switch to using it with the command
+
+        graphics_toolkit ("fltk")
+
+    for all future figures or for a particular figure with the command
+
+        graphics_toolkit (h, "fltk")
+
+    where "h" is a valid figure handle.
+
+ ** Functions providing direct access to gnuplot have been removed.
+
+    The functions __gnuplot_plot__, __gnuplot_set__, __gnuplot_raw__,
+     __gnuplot_show__, __gnuplot_replot__, __gnuplot_splot__,
+     __gnuplot_save_data__ and __gnuplot_send_inline_data__ have been
+     removed from Octave.  These function were incompatible with the
+     high level graphics handle code.
+
+ ** The Control, Finance and Quaternion functions have been removed.
+
+    These functions are now available as separate packages from
+
+      http://octave.sourceforge.net/packages.html
+
+    and can be reinstalled using the Octave package manager (see
+    the pkg function).
+
+ ** Specific sparse matrix functions removed.
+
+    The following functions, which handled only sparse matrices have
+    been removed.  Instead of calling these functions directly, you
+    should use the corresponding function without the "sp" prefix.
+
+      spatan2     spcumsum  spkron   spprod
+      spchol      spdet     splchol  spqr
+      spchol2inv  spdiag    splu     spsum
+      spcholinv   spfind    spmax    spsumsqk
+      spcumprod   spinv     spmin
+
+ ** Improvements to the debugger.
+
+    The interactive debugging features have been improved.  Stopping
+    on statements with dbstop should work correctly now.  Stepping
+    into and over functions, and stepping one statement at a time
+    (with dbstep) now works.  Moving up and down the call stack with
+    dbup and dbdown now works.  The dbstack function is now available
+    to print the current function call stack.  The new dbquit function
+    is available to exit the debugging mode.
+
+ ** Improved traceback error messages.
+
+    Traceback error messages are much more concise and easier to
+    understand.  They now display information about the function call
+    stack instead of the stack of all statements that were active at
+    the point of the error.
+
+ ** Object Oriented Programming.
+
+    Octave now includes OOP features and the user can create their own
+    class objects and overloaded functions and operators.  For
+    example, all methods of a class called "myclass" will be found in
+    a directory "@myclass" on the users path.  The class specific
+    versions of functions and operators take precedence over the
+    generic versions of these functions.
+
+    New functions related to OOP include
+
+      class  inferiorto  isobject  loadobj  methods  superiorto
+
+    See the Octave manual for more details.
+
+ ** Parsing of Command-style Functions.
+
+    Octave now parses command-style functions without needing to first
+    declare them with "mark_as_command".  The rules for recognizing a
+    command-style function calls are
+
+      * A command must appear as the first word in a statement,
+        followed by a space.
+
+      * The first character after the space must not be '=' or '('
+
+      * The next token after the space must not look like a binary
+        operator.
+
+    These rules should be mostly compatible with the way Matlab parses
+    command-style function calls and allow users to define commands in
+    .m files without having to mark them as commands.
+
+    Note that previous versions of Octave allowed expressions like
+
+      x = load -text foo.dat
+
+    but an expression like this will now generate a parse error.  In
+    order to assign the value returned by a function to a variable,
+    you must use the normal function call syntax:
+
+      x = load ("-text", "foo.dat");
+
+ ** Block comments.
+
+    Commented code can be between matching "#{" and "#}" or "%{" and
+    "%}" markers, even if the commented code spans several line.  This
+    allows blocks code to be commented, without needing to comment
+    each line.  For example,
+
+    function [s, t] = func (x, y)
+      s = 2 * x;
+    #{
+      s *= y;
+      t = y + x;
+    #}
+    endfunction
+
+    the lines "s *= y;" and "t = y + x" will not be executed.
+
+ ** If any subfunction in a file ends with "end" or "endfunction", then
+    they all must end that way.  Previously, Octave accepted
+
+      function main ()
+        ...
+      # no endfunction here.
+      function sub ()
+        ...
+      endfunction
+
+    but this is no longer allowed.
+
+ ** Special treatment in the parser of expressions like "a' * b".
+
+    In these cases the transpose is no longer explicitly formed and
+    BLAS libraries are called with the transpose flagged,
+    significantly improving performance for these kinds of
+    operations.
+
+ ** Single Precision data type.
+
+    Octave now includes a single precision data type.  Single
+    precision variables can be created with the "single" command, or
+    from functions like ones, eye, etc.  For example,
+
+      single (1)
+      ones (2, 2, "single")
+      zeros (2, 2, "single")
+      eye (2, 2, "single")
+      Inf (2, 2, "single")
+      NaN (2, 2, "single")
+      NA (2, 2, "single")
+
+    all create single precision variables.  For compatibility with
+    Matlab, mixed double/single precision operators and functions
+    return single precision types.
+
+    As a consequence of this addition to Octave the internal
+    representation of the double precision NA value has changed, and
+    so users that make use of data generated by Octave with R or
+    visa-versa are warned that compatibility might not be assured.
+
+ ** Improved array indexing.
+
+    The underlying code used for indexing of arrays has been
+    completely rewritten and indexing is now significantly faster.
+
+ ** Improved memory management.
+
+    Octave will now attempt to share data in some cases where previously
+    a copy would be made, such as certain array slicing operations or
+    conversions between cells, structs and cs-lists.  This usually reduces
+    both time and memory consumption.
+    Also, Octave will now attempt to detect and optimize usage of a vector
+    as a stack, when elements are being repeatedly inserted at/removed from
+    the end of the vector.
+
+ ** Improved performance for reduction operations.
+
+    The performance of the sum, prod, sumsq, cumsum, cumprod, any, all,
+    max and min functions has been significantly improved.
+
+ ** Sorting and searching.
+
+    The performance of sort has been improved, especially when sorting
+    indices are requested.  An efficient built-in issorted
+    implementation was added.  The sortrows function now uses a more
+    efficient algorithm, especially in the homogeneous case.  The lookup
+    function is now a built-in function performing a binary search,
+    optimized for long runs of close elements.  Lookup also works with
+    cell arrays of strings.
+
+ ** Range arithmetics
+
+    For some operations on ranges, Octave will attempt to keep the
+    result as a range.  These include negation, adding a scalar,
+    subtracting a scalar, and multiplying by a scalar.  Ranges with zero
+    increment are allowed and can be constructed using the built-in
+    function `ones'.
+
+ ** Various performance improvements.
+
+    Performance of a number of other built-in operations and functions
+    was improved, including:
+
+    * logical operations
+    * comparison operators
+    * element-wise power
+    * accumarray
+    * cellfun
+    * isnan
+    * isinf
+    * isfinite
+    * nchoosek
+    * repmat
+    * strcmp
+
+ ** 64-bit integer arithmetic.
+
+    Arithmetic with 64-bit integers (int64 and uint64 types) is fully
+    supported, with saturation semantics like the other integer types.
+    Performance of most integer arithmetic operations has been
+    improved by using integer arithmetic directly.  Previously, Octave
+    performed integer math with saturation semantics by converting the
+    operands to double precision, performing the operation, and then
+    converting the result back to an integer value, truncating if
+    necessary.
+
+ ** Diagonal and permutation matrices.
+
+    The interpreter can now treat diagonal and permutation matrices as
+    special objects that store only the non-zero elements, rather than
+    general full matrices.  Therefore, it is now possible to construct
+    and use these matrices in linear algebra without suffering a
+    performance penalty due to storing large numbers of zero elements.
+
+ ** Improvements to fsolve.
+
+    The fsolve function now accepts an option structure argument (see
+    also the optimset function).  The INFO values returned from fsolve
+    have changed to be compatible with Matlab's fsolve function.
+    Additionally, fsolve is now able to solve overdetermined systems,
+    complex-differentiable complex systems, systems with a sparse
+    jacobian and can work in single precision if given single precision
+    inputs.  It can also be called recursively.
+
+ ** Improvements to the norm function.
+
+    The norm function is now able to compute row or column norms of a
+    matrix in a single call, as well as general matrix p-norms.
+
+ ** New functions for computing some eigenvalues or singular values.
+
+    The eigs and svds functions have been included in Octave.  These
+    functions require the ARPACK library (now distributed under a
+    GPL-compatible license).
+
+ ** New QR and Cholesky factorization updating functions.
+
+      choldelete  cholshift   qrdelete  qrshift
+      cholinsert  cholupdate  qrinsert  qrupdate
+
+ ** New quadrature functions.
+
+      dblquad  quadgk  quadv  triplequad
+
+ ** New functions for reading and writing images.
+
+    The imwrite and imread functions have been included in Octave.
+    These functions require the GraphicsMagick library.  The new
+    function imfinfo provides information about an image file (size,
+    type, colors, etc.)
+
+ ** The input_event_hook function has been replaced by the pair of
+    functions add_input_event_hook and remove_input_event_hook so that
+    more than one hook function may be installed at a time.
+
+ ** Other miscellaneous new functions.
+
+      addtodate          hypot                       reallog
+      bicgstab           idivide                     realpow
+      cellslices         info                        realsqrt
+      cgs                interp1q                    rectint
+      command_line_path  isdebugmode                 regexptranslate
+      contrast           isfloat                     restoredefaultpath
+      convn              isstrprop                   roundb
+      cummin             log1p                       rundemos
+      cummax             lsqnonneg                   runlength
+      datetick           matlabroot                  saveobj
+      display            namelengthmax               spaugment
+      expm1              nargoutchk                  strchr
+      filemarker         pathdef                     strvcat
+      fstat              perl                        subspace
+      full               prctile                     symvar
+      fzero              quantile                    treelayout
+      genvarname         re_read_readline_init_file  validatestring
+      histc
+
+ ** Changes to strcat.
+
+    The strcat function is now compatible with Matlab's strcat
+    function, which removes trailing whitespace when concatenating
+    character strings.  For example
+
+      strcat ('foo ', 'bar')
+      ==> 'foobar'
+
+    The new function cstrcat provides the previous behavior of
+    Octave's strcat.
+
+ ** Improvements to the help functions.
+
+    The help system has been mostly re-implemented in .m files to make
+    it easier to modify.  Performance of the lookfor function has been
+    greatly improved by caching the help text from all functions that
+    are distributed with Octave.  The pkg function has been modified
+    to generate cache files for external packages when they are
+    installed.
+
+ ** Deprecated functions.
+
+    The following functions were deprecated in Octave 3.0 and will be
+    removed from Octave 3.4 (or whatever version is the second major
+    release after 3.0):
+
+      beta_cdf         geometric_pdf       pascal_pdf
+      beta_inv         geometric_rnd       pascal_rnd
+      beta_pdf         hypergeometric_cdf  poisson_cdf
+      beta_rnd         hypergeometric_inv  poisson_inv
+      binomial_cdf     hypergeometric_pdf  poisson_pdf
+      binomial_inv     hypergeometric_rnd  poisson_rnd
+      binomial_pdf     intersection        polyinteg
+      binomial_rnd     is_bool             setstr
+      chisquare_cdf    is_complex          struct_contains
+      chisquare_inv    is_list             struct_elements
+      chisquare_pdf    is_matrix           t_cdf
+      chisquare_rnd    is_scalar           t_inv
+      clearplot        is_square           t_pdf
+      clg              is_stream           t_rnd
+      com2str          is_struct           uniform_cdf
+      exponential_cdf  is_symmetric        uniform_inv
+      exponential_inv  is_vector           uniform_pdf
+      exponential_pdf  isstr               uniform_rnd
+      exponential_rnd  lognormal_cdf       weibcdf
+      f_cdf            lognormal_inv       weibinv
+      f_inv            lognormal_pdf       weibpdf
+      f_pdf            lognormal_rnd       weibrnd
+      f_rnd            meshdom             weibull_cdf
+      gamma_cdf        normal_cdf          weibull_inv
+      gamma_inv        normal_inv          weibull_pdf
+      gamma_pdf        normal_pdf          weibull_rnd
+      gamma_rnd        normal_rnd          wiener_rnd
+      geometric_cdf    pascal_cdf
+      geometric_inv    pascal_inv
+
+    The following functions are now deprecated in Octave 3.2 and will
+    be removed from Octave 3.6 (or whatever version is the second major
+    release after 3.2):
+
+      create_set          spcholinv  spmax
+      dmult               spcumprod  spmin
+      iscommand           spcumsum   spprod
+      israwcommand        spdet      spqr
+      lchol               spdiag     spsum
+      loadimage           spfind     spsumsq
+      mark_as_command     spinv      str2mat
+      mark_as_rawcommand  spkron     unmark_command
+      spatan2             splchol    unmark_rawcommand
+      spchol              split
+      spchol2inv          splu
+
 Summary of important user-visible changes for version 3.0:
 ---------------------------------------------------------
 
@@ -196,5 +1716,6 @@
     the distributions using the standard scale factor rather than
     one over the scale factor.
 
+---------------------------------------------------------
 
 See NEWS.2 for old news.
new file mode 100644
--- /dev/null
+++ b/etc/RELEASE.PROCESS
@@ -0,0 +1,90 @@
+<!----------------------------------------------------------------------------->
+<! This file contains a list of steps to accomplish before producing a release.
+   The format of the file is wiki markup and can be directly used as a page
+   on wiki.octave.org.
+<!----------------------------------------------------------------------------->
+==4.0.0 Release Tasks==
+
+This page shows the tasks to be completed before the GUI release is finalized.
+
+<!----------------------------------------------------------------------------->
+# File bug reports for all outstanding bugs known, but not reported
+#* Put out a general call for reports on Octave-Maintainers and Octave-Help list
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Review patch tracker/bug list for any patches submitted that may be included before release
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Identify Bugs which *must* be fixed prior to release
+#* Review bugs on tracker for possible inclusion in list
+#* Review bugs and update to correct category, such as Patch submitted
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Clear all bugs identified as must-fix
+#* See [[Bug Fix List - 4.0 Release]]
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# GPL License activities
+#* Update Copyright statements for all source controlled files
+#* Add any new contributors to contributors.in
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Style-check code base
+#* This will produce lots of whitespace changes, but no behavior changes
+#* Must occur after patches have been added since whitespace changes will often prevent patches from applying
+#* m-file style check. Completion Date:
+#* C++ style check.  Completion Date:
+<!----------------------------------------------------------------------------->
+# Run lint checker on code base
+#* cppcheck, Clang sanitize, etc.
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Verify 'make check' is passing
+#* Start discussion on octave-maintainers list about which failing tests must be fixed
+#* Identify and fix any tests determined critical in step above
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Run Octave test suite under [http://valgrind.org Valgrind] to check for memory leaks
+#* Results posted to bug report: 
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Review documentation
+#* Grammar check documentation so that it conforms to Octave standards
+#* Spell check documentation
+#* Verify no functions missing from manual
+#* Verify deprecated functions removed from "see also" links
+#* Verify all formats (Info, HTML, pdf) build correctly
+#* Review NEWS for any features which should be announced
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Localization and Internationalization
+#* Update language translation files (*.ts)
+#* Submit call for translations for GUI strings.
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Verify build process and create release candidates
+#* Update version information in configure.ac/Makefile.am
+#* Verify 'make distcheck' passes
+#* Create release candidate
+#** 'make dist'
+#** hg tag repository with release candidate ID
+#** For Windows, create installer [[Windows Installer]]
+#** Upload release candidate
+#** Announce release candidate to Octave-Maintainers, Octave-Help, on web page
+#** Repeat release candidate cycle until clean
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Final Release
+#* hg tag repository with release
+#* merge default onto stable to become the current stable release
+#* add new release version to Savannah bug tracker
+#* Announce final release on Octave mailing lists and web site
+#: Completion Date:
+<!----------------------------------------------------------------------------->
+# Post-Release
+#* Update configure.ac/Makefile.am versioning to next release cycle
+#* Remove all deprecated functions scheduled for deletion in default branch
+#: Completion Date:
+
+[[Category:Releases]]
+[[Category:Development]]
--- a/etc/icons/Makefile.am
+++ b/etc/icons/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's doc/icons directory
 #
-# Copyright (C) 2012-2013 John W. Eaton
+# Copyright (C) 2012-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -21,36 +21,101 @@
 include $(top_srcdir)/build-aux/common.mk
 
 IMAGE_FILES = \
-  octave-logo.ico \
-  octave-logo.png \
   octave-logo.svg \
   octave-sombrero.png
 
-image_DATA = $(IMAGE_FILES)
+PNG_SIZES = \
+  512 \
+  256 \
+  128 \
+  64 \
+  48 \
+  32 \
+  24 \
+  22 \
+  16
+
+BUILT_PNG_ICONS = $(patsubst %,octave-logo-%.png,$(PNG_SIZES))
+
+WINDOWS_PNG_ICONS = $(filter %-16.png %-32.png %-48.png %-256.png,$(BUILT_PNG_ICONS))
 
-all-local: octave.desktop
+BUILT_ICONS = \
+  $(BUILT_PNG_ICONS) \
+  octave-logo.ico
+
+image_DATA = \
+  $(IMAGE_FILES) \
+  octave-logo.ico
+
+VENDOR = www.octave.org
+
+DESKTOP_FILE = $(VENDOR)-octave.desktop
+
+all-local: octave.appdata.xml octave.desktop $(BUILT_ICONS)
+
+octave.appdata.xml: octave.appdata.xml.in Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(SED) < $< > $@-t \
+	  -e "s|%OCTAVE_DESKTOP_FILE%|${DESKTOP_FILE}|" && \
+	mv $@-t $@
 
 octave.desktop: octave.desktop.in Makefile
-	@echo "making $@ from $<"
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(SED) < $< > $@-t \
 	  -e "s|%OCTAVE_IMAGEDIR%|${imagedir}|" \
-	  -e "s|%OCTAVE_PREFIX%|${prefix}|"
+	  -e "s|%OCTAVE_PREFIX%|${prefix}|" && \
+	mv $@-t $@
+
+$(BUILT_PNG_ICONS): octave-logo.svg
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(RSVG_CONVERT) -w $(lastword $(subst -, ,$(patsubst %.png,%,$@))) $< > $@-t && \
+	mv $@-t $@
+
+octave-logo.ico: $(WINDOWS_PNG_ICONS)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(ICOTOOL) --create --raw $^ > $@-t && \
 	mv $@-t $@
 
 install-data-local:
 	-if test -n "$(DESKTOP_FILE_INSTALL)"; then \
 	  $(DESKTOP_FILE_INSTALL) --dir=$(DESTDIR)$(datadir)/applications \
-	    --vendor www.octave.org octave.desktop; \
+	    --vendor $(VENDOR) octave.desktop; \
 	fi
+	for f in $(BUILT_PNG_ICONS); do \
+	  size=`echo $$f | $(SED) -n -e "s/.*-\([0-9]\+\)\.png/\1/p"`; \
+	  if test -f $$f; then d=; else d="$(srcdir)/"; fi; \
+	  $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps; \
+	  $(INSTALL_DATA) "$$d$$f" $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/octave.png; \
+	done
+	$(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
+	$(INSTALL_DATA) $(srcdir)/octave-logo.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/octave.svg
+	$(MKDIR_P) $(DESTDIR)$(datadir)/appdata
+	$(INSTALL_DATA) octave.appdata.xml $(DESTDIR)$(datadir)/appdata/$(VENDOR)-octave.appdata.xml
 
 uninstall-local:
 	if test -n "$(DESKTOP_FILE_INSTALL)"; then \
-	  rm -f $(DESTDIR)$(datadir)/applications/www.octave.org-octave.desktop; \
+	  rm -f $(DESTDIR)$(datadir)/applications/$(DESKTOP_FILE); \
 	fi
+	for f in $(BUILT_PNG_ICONS); do \
+	  size=`echo $$f | $(SED) -n -e "s/.*-\([0-9]\+\)\.png/\1/p"`; \
+	  rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/octave.png; \
+	done
+	rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/octave.svg
+	rm -f $(DESTDIR)$(datadir)/appdata/$(VENDOR)-octave.appdata.xml
+
+if AMCOND_HAVE_ICON_TOOLS
+else
+dist-hook:
+	@echo "Packaging distribution requires icotool and rsvg-convert." ; exit 1;
+endif
 
 EXTRA_DIST = \
+  $(BUILT_ICONS) \
   $(IMAGE_FILES) \
+  octave.appdata.xml.in \
   octave.desktop.in
 
-CLEANFILES = octave.desktop
+CLEANFILES = octave.appdata.xml octave.desktop
 
+MAINTAINERCLEANFILES = $(BUILT_ICONS)
+
deleted file mode 100644
index 563469b0a29f69e0baa986849f43fb538d552488..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 87f61c8d410b57a8cc43d374ed45f495e7fa6058..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
rename from etc/octave.appdata.xml
rename to etc/icons/octave.appdata.xml.in
--- a/etc/octave.appdata.xml
+++ b/etc/icons/octave.appdata.xml.in
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (C) 2013 Carnë Draug
+  Copyright (C) 2013-2015 Carnë Draug
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <application>
-  <id type="desktop">octave.desktop</id>
+  <id type="desktop">%OCTAVE_DESKTOP_FILE%</id>
   <licence>GPLv3+</licence>
   <name>GNU Octave</name>
   <summary>Interactive programming environment for numerical computations</summary>
--- a/etc/icons/octave.desktop.in
+++ b/etc/icons/octave.desktop.in
@@ -2,9 +2,10 @@
 Name=GNU Octave
 Comment=Scientific Computing using GNU Octave
 TryExec=%OCTAVE_PREFIX%/bin/octave
-Exec=%OCTAVE_PREFIX%/bin/octave
+Exec=%OCTAVE_PREFIX%/bin/octave --force-gui
 Icon=%OCTAVE_IMAGEDIR%/octave-logo.svg
-Terminal=true
+Terminal=false
 Type=Application
 Categories=Education;Science;Math;
 StartupNotify=false
+MimeType=text/x-octave;text/x-matlab;
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,6 +1,6 @@
-# Makefile for Octave's examples directory
+# Makefile for Octave's example directory
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -18,47 +18,12 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
+## Pass-through layer.  Simply pass make commands down to SUBDIRS.
+
 include $(top_srcdir)/build-aux/common.mk
 
-EXTRA_DIST =
-
-FCN_FILE_DIRS =
-
-FCN_FILES =
-
-include @polynomial/module.mk
-include @FIRfilter/module.mk
+EXTRA_DIST = \
+  Makefile.am
 
-EXTRA_DIST += \
-  $(FCN_FILES) \
-  addtwomatrices.cc \
-  celldemo.cc \
-  embedded.cc \
-  fortrandemo.cc \
-  fortransub.f \
-  funcdemo.cc \
-  globaldemo.cc \
-  helloworld.cc \
-  make_int.cc \
-  mex_demo.c \
-  mycell.c \
-  myfeval.c \
-  myfevalf.f \
-  myfunc.c \
-  myhello.c \
-  mypow2.c \
-  myprop.c \
-  myset.c \
-  mysparse.c \
-  mystring.c \
-  mystruct.c \
-  oct_demo.cc \
-  oregonator.cc \
-  oregonator.m \
-  paramdemo.cc \
-  standalone.cc \
-  standalonebuiltin.cc \
-  stringdemo.cc \
-  structdemo.cc \
-  unwinddemo.cc
+SUBDIRS = code data
 
rename from examples/@FIRfilter/FIRfilter.m
rename to examples/code/@FIRfilter/FIRfilter.m
rename from examples/@FIRfilter/FIRfilter_aggregation.m
rename to examples/code/@FIRfilter/FIRfilter_aggregation.m
rename from examples/@FIRfilter/display.m
rename to examples/code/@FIRfilter/display.m
rename from examples/@FIRfilter/module.mk
rename to examples/code/@FIRfilter/module.mk
rename from examples/@FIRfilter/subsasgn.m
rename to examples/code/@FIRfilter/subsasgn.m
rename from examples/@FIRfilter/subsref.m
rename to examples/code/@FIRfilter/subsref.m
rename from examples/@polynomial/display.m
rename to examples/code/@polynomial/display.m
rename from examples/@polynomial/double.m
rename to examples/code/@polynomial/double.m
rename from examples/@polynomial/end.m
rename to examples/code/@polynomial/end.m
rename from examples/@polynomial/get.m
rename to examples/code/@polynomial/get.m
rename from examples/@polynomial/module.mk
rename to examples/code/@polynomial/module.mk
rename from examples/@polynomial/mtimes.m
rename to examples/code/@polynomial/mtimes.m
rename from examples/@polynomial/numel.m
rename to examples/code/@polynomial/numel.m
rename from examples/@polynomial/plot.m
rename to examples/code/@polynomial/plot.m
rename from examples/@polynomial/polynomial.m
rename to examples/code/@polynomial/polynomial.m
rename from examples/@polynomial/polynomial_superiorto.m
rename to examples/code/@polynomial/polynomial_superiorto.m
rename from examples/@polynomial/polyval.m
rename to examples/code/@polynomial/polyval.m
rename from examples/@polynomial/roots.m
rename to examples/code/@polynomial/roots.m
rename from examples/@polynomial/set.m
rename to examples/code/@polynomial/set.m
rename from examples/@polynomial/subsasgn.m
rename to examples/code/@polynomial/subsasgn.m
rename from examples/@polynomial/subsref.m
rename to examples/code/@polynomial/subsref.m
rename from examples/COPYING
rename to examples/code/COPYING
copy from examples/Makefile.am
copy to examples/code/Makefile.am
--- a/examples/Makefile.am
+++ b/examples/code/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's examples directory
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1996-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
rename from examples/addtwomatrices.cc
rename to examples/code/addtwomatrices.cc
rename from examples/celldemo.cc
rename to examples/code/celldemo.cc
rename from examples/embedded.cc
rename to examples/code/embedded.cc
rename from examples/fortrandemo.cc
rename to examples/code/fortrandemo.cc
rename from examples/fortransub.f
rename to examples/code/fortransub.f
rename from examples/funcdemo.cc
rename to examples/code/funcdemo.cc
rename from examples/globaldemo.cc
rename to examples/code/globaldemo.cc
rename from examples/helloworld.cc
rename to examples/code/helloworld.cc
rename from examples/make_int.cc
rename to examples/code/make_int.cc
--- a/examples/make_int.cc
+++ b/examples/code/make_int.cc
@@ -108,7 +108,6 @@
 
   int scalar;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
@@ -311,6 +310,5 @@
   return retval;
 }
 
-DEFINE_OCTAVE_ALLOCATOR (octave_integer);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_integer, "integer", "integer");
rename from examples/mex_demo.c
rename to examples/code/mex_demo.c
rename from examples/mycell.c
rename to examples/code/mycell.c
rename from examples/myfeval.c
rename to examples/code/myfeval.c
rename from examples/myfevalf.f
rename to examples/code/myfevalf.f
rename from examples/myfunc.c
rename to examples/code/myfunc.c
rename from examples/myhello.c
rename to examples/code/myhello.c
rename from examples/mypow2.c
rename to examples/code/mypow2.c
rename from examples/myprop.c
rename to examples/code/myprop.c
rename from examples/myset.c
rename to examples/code/myset.c
rename from examples/mysparse.c
rename to examples/code/mysparse.c
--- a/examples/mysparse.c
+++ b/examples/code/mysparse.c
@@ -32,7 +32,7 @@
       i = n;
       while (jc[i] == jc[i-1] && i != 0) i--;
 
-      mexPrintf ("last non-zero element (%d, %d) = (%g, %g)\n",
+      mexPrintf ("last nonzero element (%d, %d) = (%g, %g)\n",
                  ir[nz-1]+ 1, i, pr[nz-1], pi[nz-1]);
 
       v = mxCreateSparse (m, n, nz, mxCOMPLEX);
@@ -65,7 +65,7 @@
 
       i = n;
       while (jc[i] == jc[i-1] && i != 0) i--;
-      mexPrintf ("last non-zero element (%d, %d) = %d\n",
+      mexPrintf ("last nonzero element (%d, %d) = %d\n",
                  ir[nz-1]+ 1, i, pbr[nz-1]);
 
       v = mxCreateSparseLogicalMatrix (m, n, nz);
@@ -95,7 +95,7 @@
 
       i = n;
       while (jc[i] == jc[i-1] && i != 0) i--;
-      mexPrintf ("last non-zero element (%d, %d) = %g\n",
+      mexPrintf ("last nonzero element (%d, %d) = %g\n",
                  ir[nz-1]+ 1, i, pr[nz-1]);
 
       v = mxCreateSparse (m, n, nz, mxREAL);
rename from examples/mystring.c
rename to examples/code/mystring.c
rename from examples/mystruct.c
rename to examples/code/mystruct.c
rename from examples/oct_demo.cc
rename to examples/code/oct_demo.cc
rename from examples/oregonator.cc
rename to examples/code/oregonator.cc
rename from examples/oregonator.m
rename to examples/code/oregonator.m
rename from examples/paramdemo.cc
rename to examples/code/paramdemo.cc
rename from examples/standalone.cc
rename to examples/code/standalone.cc
rename from examples/standalonebuiltin.cc
rename to examples/code/standalonebuiltin.cc
rename from examples/stringdemo.cc
rename to examples/code/stringdemo.cc
rename from examples/structdemo.cc
rename to examples/code/structdemo.cc
rename from examples/unwinddemo.cc
rename to examples/code/unwinddemo.cc
--- a/examples/unwinddemo.cc
+++ b/examples/code/unwinddemo.cc
@@ -7,6 +7,12 @@
   // Do nothing!!
 }
 
+void
+my_err_with_id_handler (const char *id, const char *fmt, ...)
+{
+  // Do nothing!!
+}
+
 DEFUN_DLD (unwinddemo, args, nargout, "Unwind Demo")
 {
   octave_value retval;
@@ -24,11 +30,18 @@
           // Declare unwind_protect frame which lasts as long as
           // the variable frame has scope.
           unwind_protect frame;
-          frame.protect_var (current_liboctave_warning_handler);
+          frame.add_fcn (set_liboctave_warning_handler,
+                         current_liboctave_warning_handler);
+
+          frame.add_fcn (set_liboctave_warning_with_id_handler,
+                         current_liboctave_warning_with_id_handler);
 
           set_liboctave_warning_handler (my_err_handler);
+          set_liboctave_warning_with_id_handler (my_err_with_id_handler);
+
           retval = octave_value (quotient (a, b));
         }
     }
+
   return retval;
 }
new file mode 100644
--- /dev/null
+++ b/examples/data/Makefile.am
@@ -0,0 +1,29 @@
+# Makefile for Octave's examples/data directory
+#
+# Copyright (C) 2012-2015 John W. Eaton
+#
+# This file is part of Octave.
+#
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+include $(top_srcdir)/build-aux/common.mk
+
+DATA_FILES = \
+   penny.mat
+
+octdata_DATA = $(DATA_FILES)
+
+EXTRA_DIST = $(DATA_FILES)
+
new file mode 100644
--- /dev/null
+++ b/examples/data/penny.mat
@@ -0,0 +1,135 @@
+# Created by Octave 3.8.1, Sun Jun 01 16:28:53 2014 CEST <weber@t61>
+# name: P
+# type: matrix
+# rows: 128
+# columns: 128
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 18 43 68 89 107 120 135 149 162 172 180 192 196 203 207 211 210 212 213 214 212 210 209 204 201 194 183 177 163 148 130 116 98 81 60 35 6 4 3 3 3 3 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 6 33 63 90 111 132 152 172 190 199 209 215 219 222 224 225 226 228 228 229 228 229 230 228 229 230 229 228 227 226 225 221 216 216 207 197 189 171 151 128 107 81 52 21 4 3 3 3 2 3 3 3 2 2 2 2 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 9 44 78 104 130 159 183 200 214 222 225 227 230 230 233 235 235 235 235 235 235 235 235 234 233 233 234 234 233 233 232 232 232 231 232 231 230 228 227 226 223 220 213 203 183 157 130 100 70 34 5 3 3 3 3 2 3 2 3 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 27 64 99 129 160 186 206 218 226 229 231 234 235 236 236 235 235 232 229 226 221 219 218 216 216 214 214 215 216 218 220 221 223 226 228 229 230 231 231 231 230 230 229 228 227 226 222 218 209 188 159 128 96 58 15 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 35 75 110 140 174 202 217 227 232 234 235 236 236 234 228 221 214 208 203 199 196 195 193 192 190 190 189 188 188 189 190 191 191 193 192 193 194 197 201 206 213 218 223 227 229 230 230 229 227 226 226 223 220 213 196 164 127 91 49 5 4 3 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 10 52 92 129 164 196 217 226 232 235 236 237 234 224 214 205 198 193 191 187 186 187 183 183 182 181 179 178 178 181 179 179 179 179 180 180 180 179 178 179 180 182 184 186 190 195 200 209 217 223 227 228 229 228 227 225 224 222 217 204 173 135 96 52 5 3 3 3 3 3 2 3 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 8 52 93 131 165 200 221 229 234 236 237 234 225 212 201 193 188 185 183 180 178 176 175 174 173 173 182 174 171 177 180 170 175 184 170 169 176 180 179 177 172 169 169 171 174 176 178 179 182 185 188 194 203 212 221 226 228 227 227 226 224 223 219 208 184 144 103 54 5 3 3 3 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2
+ 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 13 49 90 131 167 203 222 230 232 235 236 225 214 202 194 189 186 181 178 175 172 170 168 167 167 164 163 164 188 177 163 185 188 163 176 175 159 159 172 182 175 170 161 159 159 161 163 166 168 170 171 173 176 178 182 185 193 202 213 221 225 227 226 225 224 223 220 211 188 145 101 48 5 3 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 45 88 128 166 201 222 231 234 234 232 219 204 193 189 186 183 179 175 171 167 164 163 160 158 156 155 155 154 154 171 178 158 184 185 160 175 159 148 148 165 170 153 150 147 148 150 151 153 156 157 159 161 163 165 169 173 175 177 180 185 192 204 216 223 225 226 224 224 223 221 212 188 141 91 34 4 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 1 2 3 41 82 125 163 199 220 228 229 235 229 216 201 191 185 181 180 180 184 186 174 163 158 155 152 150 148 145 145 144 144 145 154 173 159 174 174 169 168 142 136 137 159 166 161 141 138 138 141 142 144 146 148 149 151 154 157 160 170 170 169 172 174 176 179 186 198 210 222 226 225 224 224 222 220 212 181 130 80 15 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 20 71 114 154 194 220 230 230 235 231 215 200 193 187 180 177 173 181 198 188 183 188 162 150 146 143 141 139 136 135 135 135 135 138 162 167 159 156 166 155 129 126 127 151 143 137 129 129 130 132 133 136 137 140 141 144 145 148 151 165 177 183 174 167 168 170 173 176 182 195 211 222 225 225 223 222 221 219 206 166 114 53 4 3 2 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 33 85 132 172 211 231 236 233 233 220 206 196 191 184 179 174 169 165 164 188 174 156 162 176 146 139 135 132 130 128 126 125 125 125 125 139 156 146 130 154 147 119 116 117 139 139 122 122 120 121 122 126 127 128 130 132 135 137 139 141 146 150 173 177 176 173 162 163 167 171 175 181 193 208 220 224 223 223 222 220 217 197 159 102 36 4 3 2 3 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 14 72 124 166 210 235 244 239 235 221 203 195 191 187 187 181 169 162 158 156 154 174 166 143 145 166 136 129 126 122 120 118 116 115 114 114 115 127 139 118 114 133 118 106 106 110 134 136 135 128 114 114 115 117 118 120 122 124 127 128 131 134 138 145 165 147 150 153 153 155 159 163 169 173 176 183 198 214 222 224 223 222 220 219 209 177 118 53 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 38 96 144 187 227 246 247 240 228 207 198 191 186 186 200 195 194 180 156 151 147 144 158 166 137 136 155 129 120 116 113 111 109 106 105 104 104 104 106 109 101 100 102 99 97 97 99 105 109 112 110 105 105 107 108 110 112 114 116 119 120 124 126 131 148 151 138 140 142 146 148 151 166 175 168 169 172 175 185 202 217 223 223 222 220 219 218 201 142 79 4 3 3 3 3 2 2 2 2 2 2 3 2 2 2 2 2 2 2
+ 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 56 114 161 204 242 249 245 236 216 203 195 188 182 178 192 187 168 170 182 157 143 138 136 140 160 137 134 143 117 111 108 105 102 98 98 96 95 93 93 92 92 90 89 89 88 88 87 89 89 91 91 94 95 98 98 100 102 105 106 108 111 113 115 118 123 146 133 130 132 135 138 141 147 174 179 183 172 164 167 171 176 193 210 221 223 223 221 220 220 212 164 102 27 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 67 126 172 217 248 248 245 228 210 201 193 186 181 174 171 193 173 156 150 163 164 135 130 126 126 149 148 141 120 107 102 99 96 94 91 89 87 87 85 83 82 82 82 82 82 82 80 81 81 82 82 82 84 87 89 91 93 94 97 99 101 103 105 107 112 122 137 121 122 125 128 131 135 147 168 154 161 179 160 159 163 166 172 180 201 216 222 222 222 218 219 216 182 121 52 4 3 3 2 2 2 3 2 2 2 2 2 2 2 2 2
+ 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 7 83 137 185 230 249 247 238 217 204 198 193 187 179 172 166 162 182 173 148 142 146 163 128 122 117 116 126 126 111 100 96 93 91 88 86 83 81 79 78 76 75 76 78 80 85 89 89 81 78 76 76 76 77 78 80 81 83 85 87 89 91 92 95 97 100 104 116 118 113 115 118 121 125 131 156 163 143 147 170 153 153 156 159 164 168 175 192 211 221 223 222 220 219 219 189 133 65 4 3 2 2 3 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 20 91 147 197 240 248 248 232 209 200 196 193 198 196 175 165 158 154 163 172 142 135 139 155 121 113 110 106 103 99 93 90 86 84 82 80 78 75 73 72 73 72 72 86 90 93 97 100 100 93 95 93 93 91 83 78 81 85 82 80 81 82 84 86 88 90 93 95 99 102 104 107 110 114 120 130 150 154 162 162 152 143 144 149 153 158 162 165 172 184 205 219 223 222 220 219 220 205 151 80 4 3 3 3 3 3 3 2 3 3 2 2 2 2
+ 2 1 2 2 2 2 1 2 2 2 2 2 2 3 80 141 192 233 249 250 232 210 200 194 190 198 197 183 170 159 153 148 143 153 160 140 143 145 115 106 102 97 93 89 85 81 78 75 74 72 71 68 69 72 83 90 91 95 97 94 101 106 111 108 103 98 97 104 107 108 104 99 98 89 75 76 77 78 80 82 85 88 91 94 96 99 102 106 112 128 138 127 141 153 134 134 138 142 146 151 170 162 163 168 175 193 213 222 222 221 219 219 220 180 111 30 3 3 2 3 2 2 2 1 2 2 2 2
+ 2 1 2 1 2 2 2 1 2 2 2 2 35 97 156 207 245 251 246 220 205 196 190 184 190 196 170 163 158 157 145 139 133 132 142 143 133 112 101 96 91 88 84 78 77 72 69 68 65 66 66 68 83 89 93 101 106 111 114 115 114 116 122 119 111 107 115 121 122 114 107 102 101 98 82 71 72 72 74 76 79 81 84 87 90 93 96 101 107 119 116 118 138 141 126 129 133 137 142 162 167 155 158 163 167 175 193 214 222 222 221 219 219 219 169 97 9 3 2 3 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 1 2 1 2 2 1 31 102 158 210 247 253 243 217 205 196 188 181 176 188 189 161 155 168 176 142 132 125 120 117 113 106 99 93 88 83 80 76 72 69 65 62 60 61 70 85 88 88 90 101 114 121 126 131 133 131 131 137 132 131 136 135 135 130 125 121 118 114 105 96 90 76 69 70 72 73 76 77 82 84 87 90 93 99 103 106 111 131 134 120 125 127 132 143 161 148 148 153 158 163 166 172 189 212 221 221 220 219 221 219 171 96 8 3 3 2 2 2 2 2 2 2 2
+ 1 1 2 2 1 2 2 2 2 2 6 81 143 197 241 253 247 222 206 197 190 182 175 169 168 187 162 150 154 166 163 130 120 114 109 105 98 92 87 82 78 72 69 65 62 59 57 57 65 88 96 100 101 103 110 122 134 140 144 147 146 148 150 146 145 144 142 139 134 131 133 133 131 120 108 107 102 92 80 78 74 72 74 75 78 81 83 87 91 95 98 102 110 119 115 116 120 126 148 150 137 141 146 166 168 159 164 169 181 205 219 222 221 220 218 221 187 112 16 3 3 2 2 2 2 2 2 2
+ 1 2 2 2 2 2 2 2 2 2 80 140 194 241 254 244 220 205 197 190 183 175 168 163 158 169 173 148 142 152 148 123 112 106 102 96 92 86 81 76 70 67 63 60 56 53 55 68 86 91 97 106 111 114 118 128 146 153 154 153 157 156 153 149 147 146 141 135 129 130 142 144 145 138 125 118 117 124 124 117 108 94 79 71 73 75 78 82 85 89 92 97 100 103 108 111 115 126 148 134 131 135 148 166 151 152 157 162 168 179 204 220 222 221 220 218 222 182 105 11 3 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 1 1 66 135 189 237 253 248 220 205 198 190 183 175 168 162 157 151 150 158 160 156 147 126 113 106 101 96 90 85 80 75 71 64 60 57 54 51 51 71 79 90 94 110 118 124 131 138 143 155 162 161 156 161 161 155 146 143 139 135 129 127 136 150 151 149 140 129 127 131 139 136 131 118 98 85 74 70 70 73 76 79 82 86 90 94 98 102 106 109 125 141 124 126 134 157 146 142 148 152 157 163 169 182 204 220 222 220 219 217 223 175 93 4 3 2 2 3 3 2 2
+ 2 1 2 1 1 2 2 1 54 125 182 235 252 249 224 206 198 191 185 176 169 161 155 150 145 140 137 134 131 120 110 104 99 95 89 84 79 75 70 64 59 54 52 49 56 76 89 97 101 114 124 133 147 154 152 152 165 168 168 163 165 165 157 140 130 130 129 129 135 149 153 153 151 137 127 133 139 148 151 142 122 108 94 87 69 66 69 71 74 77 81 85 88 92 95 100 104 115 136 124 128 148 140 133 137 141 146 152 158 165 171 182 205 220 222 220 219 219 223 170 88 4 3 3 2 2 2 2
+ 2 2 1 1 2 2 1 58 128 186 235 252 244 219 205 197 195 187 176 168 161 154 148 143 137 132 126 121 113 108 103 98 93 86 81 76 73 67 61 57 53 51 53 70 95 108 114 120 127 138 148 160 167 164 162 169 175 176 173 173 169 168 156 139 131 132 136 142 146 149 151 155 147 134 138 146 150 158 157 145 131 115 99 89 84 70 65 68 70 74 76 80 84 87 91 94 99 105 122 133 135 126 123 128 133 137 144 157 172 168 169 174 188 211 221 221 220 218 226 214 142 45 3 3 2 2 3 3
+ 1 2 2 2 2 2 43 114 173 225 248 245 220 207 198 192 200 202 172 164 155 148 142 136 131 125 120 113 107 101 97 91 86 79 74 69 66 60 57 53 55 73 95 112 126 132 135 142 149 160 169 177 179 178 179 181 181 181 180 178 176 170 163 144 136 134 137 141 145 144 151 156 149 148 150 153 159 160 159 154 146 131 114 101 89 83 64 62 65 68 71 74 78 81 85 88 92 96 101 107 111 114 117 121 127 132 140 171 170 181 169 168 174 187 212 221 221 219 219 228 208 129 30 3 3 2 2 2
+ 2 2 2 1 2 23 96 161 217 245 245 225 209 202 194 189 182 193 190 161 150 143 137 131 125 119 113 106 101 96 91 85 79 74 68 64 60 56 53 53 68 86 111 131 141 145 148 155 165 176 181 185 187 186 185 186 185 185 184 183 178 169 165 148 136 133 134 141 147 148 152 155 146 143 143 149 159 158 156 158 152 143 121 107 96 83 63 59 60 63 67 69 72 76 79 82 86 90 94 98 103 107 113 118 122 128 137 166 149 162 170 162 167 173 191 214 221 221 219 218 227 197 109 4 3 3 2 3
+ 2 2 2 1 2 64 130 189 235 248 236 214 205 198 195 187 179 173 186 184 151 141 133 126 121 116 109 103 98 93 87 81 75 69 64 60 56 53 50 59 73 90 113 139 146 150 151 153 171 180 183 188 188 187 188 189 189 187 185 184 177 168 165 156 143 142 142 142 151 149 145 150 138 133 136 146 151 151 154 154 151 146 139 111 91 85 69 55 56 58 61 63 66 69 73 76 79 84 88 91 96 100 106 111 125 132 128 156 153 144 150 154 159 164 171 190 213 222 221 220 218 229 198 113 4 2 3 3
+ 2 2 2 2 60 128 188 235 249 234 213 204 198 211 216 208 195 184 182 181 160 135 125 120 115 108 102 97 91 86 80 74 69 63 58 55 52 51 58 77 92 109 134 146 152 156 153 172 179 181 186 191 186 184 189 191 191 190 190 185 179 178 171 155 150 150 150 153 154 147 151 148 141 140 141 144 143 142 142 139 131 128 122 98 83 75 61 51 52 54 56 61 62 66 69 72 76 79 82 87 91 96 102 108 131 132 125 156 147 138 143 149 154 160 168 175 200 220 222 220 218 225 227 159 62 4 2 3
+ 1 2 2 35 108 172 224 248 240 216 208 199 192 191 205 200 184 174 168 163 148 127 120 114 108 103 97 92 87 80 75 70 64 60 55 51 50 63 81 92 107 125 143 152 160 163 169 182 180 180 187 192 188 186 188 191 194 194 193 192 190 187 176 162 157 157 159 160 158 154 156 155 152 147 148 146 142 136 130 126 118 110 106 90 75 68 53 45 48 50 52 55 58 61 64 67 71 74 77 82 86 91 96 102 117 137 137 151 138 133 139 144 150 156 163 170 180 207 220 222 220 218 231 216 134 24 3 3
+ 2 2 2 67 138 197 236 249 226 214 205 197 188 181 177 189 186 157 146 138 130 121 116 110 104 99 93 88 82 77 72 66 61 57 53 48 49 73 90 103 119 133 151 159 166 175 180 187 183 177 182 190 192 189 186 191 194 195 195 194 192 189 184 173 165 163 164 167 165 161 162 162 154 156 157 157 153 145 134 122 114 105 91 76 66 60 45 41 43 45 48 51 53 56 58 62 65 68 72 76 80 85 90 94 101 113 128 132 125 127 132 138 144 153 169 163 170 180 207 222 222 220 219 231 211 129 15 3
+ 2 2 43 116 179 232 251 233 216 207 205 203 183 175 169 164 175 168 139 130 122 114 108 104 98 92 88 82 77 72 67 62 57 52 48 45 53 85 103 114 127 141 158 172 178 186 190 192 188 179 178 184 192 193 190 190 191 193 194 193 193 189 185 179 174 174 173 173 173 170 166 164 167 167 166 166 164 159 148 133 118 100 72 58 54 41 35 36 38 41 43 47 49 52 55 57 60 64 68 71 75 78 84 89 94 100 106 112 116 121 127 133 140 153 181 172 166 172 186 214 222 221 219 217 233 190 97 3
+ 2 12 89 159 217 251 243 220 209 201 202 210 192 171 163 155 150 152 135 122 115 108 102 98 92 87 82 77 72 67 63 57 53 47 44 43 67 94 108 119 134 142 161 177 185 190 194 195 192 185 180 182 193 194 190 187 187 191 191 194 195 193 188 184 183 182 181 180 179 173 175 176 175 174 173 172 172 170 163 149 130 106 73 50 34 31 30 32 35 37 40 42 44 48 51 54 56 60 63 66 70 74 80 84 89 94 100 106 110 116 122 128 135 144 169 187 166 168 176 195 218 222 221 219 224 230 157 49
+ 2 81 152 210 249 246 222 210 201 193 187 191 195 173 154 146 138 131 122 114 106 101 95 90 85 79 75 71 65 61 56 51 47 43 40 56 82 103 114 133 139 150 166 180 186 189 194 195 192 184 181 193 196 194 190 188 189 191 193 195 191 186 188 189 187 187 185 183 183 183 183 181 181 181 180 178 179 178 172 160 140 114 81 36 26 26 26 29 31 33 36 39 41 44 47 50 52 55 60 63 67 71 75 80 85 90 96 102 108 114 121 126 134 153 174 182 181 166 172 182 211 222 221 220 218 233 190 91
+ 53 126 188 244 247 228 215 205 195 188 180 174 178 181 159 140 131 123 115 108 100 95 89 84 79 74 70 65 60 56 51 47 42 37 37 63 86 109 122 138 146 157 167 179 187 191 192 188 186 189 191 197 197 194 192 189 189 194 195 191 183 185 189 188 189 188 188 186 186 185 186 186 185 186 184 183 183 181 178 172 156 134 102 51 23 24 24 26 28 30 33 34 37 40 43 46 49 51 55 59 62 66 71 75 80 86 91 97 103 109 117 124 147 160 155 161 178 171 167 174 193 217 223 221 220 224 229 150
+ 98 167 227 247 239 221 209 199 189 181 173 167 160 162 160 137 125 117 109 102 95 89 83 78 73 69 65 59 54 51 47 42 37 33 36 67 88 116 131 141 156 164 169 180 187 191 190 180 174 186 196 198 197 196 195 193 190 192 192 185 180 185 191 192 191 190 189 189 188 189 189 189 190 190 188 186 186 184 182 176 165 147 122 79 24 20 21 23 25 26 28 29 34 35 38 41 44 47 51 55 57 62 66 70 76 81 87 93 99 106 117 141 148 138 136 142 152 156 162 168 177 201 221 222 221 220 232 205
+ 141 204 247 249 226 214 203 194 184 175 167 160 153 146 139 127 118 110 103 96 89 84 78 72 68 64 59 55 50 45 41 38 33 30 34 69 91 122 136 147 161 167 170 179 183 188 189 180 173 180 196 196 193 190 188 189 186 186 185 180 180 185 188 190 191 192 191 191 190 190 190 191 192 192 190 190 188 186 183 179 169 154 134 102 43 18 18 19 22 23 24 27 28 32 35 37 41 44 47 49 54 57 62 66 71 77 83 88 94 102 115 128 124 125 130 136 143 149 157 164 172 185 213 221 222 220 218 231
+ 163 224 250 242 222 211 200 191 181 172 163 156 149 141 132 123 114 107 99 92 85 79 74 68 64 59 55 51 46 41 38 33 30 28 34 67 92 118 137 148 159 165 169 178 183 185 188 186 183 183 192 190 184 181 182 179 175 177 180 178 180 182 182 187 191 191 190 191 190 190 191 191 192 192 192 192 191 189 186 180 173 161 145 122 82 23 16 18 18 20 20 22 24 27 30 33 35 38 43 45 49 52 56 61 66 71 77 81 88 95 102 110 114 119 124 131 136 143 150 157 166 175 190 216 223 221 220 224
+ 211 252 245 224 213 202 192 182 174 165 156 149 140 132 123 115 107 99 92 85 78 73 68 63 58 54 50 44 40 36 32 29 25 25 50 76 103 123 139 151 158 165 175 179 180 186 187 187 188 187 183 180 178 176 173 171 172 175 173 174 180 180 183 187 190 189 189 189 190 189 190 191 192 192 192 193 192 189 185 178 168 158 142 119 83 23 14 14 15 17 17 19 22 24 27 30 33 36 39 41 45 49 54 59 62 68 73 79 85 91 99 105 111 117 122 128 134 141 147 155 164 172 182 208 222 222 221 218
+ 242 255 231 218 207 196 187 177 169 160 152 143 135 126 117 109 101 94 87 81 74 69 63 58 54 47 44 39 36 31 28 26 22 22 51 76 100 121 133 148 157 165 175 177 179 185 187 188 189 184 176 174 174 172 171 175 176 173 168 171 179 184 185 187 189 189 189 189 188 187 188 190 190 191 191 192 192 188 184 178 168 157 143 122 91 31 13 12 13 14 15 16 18 21 24 27 30 32 36 39 42 47 51 55 60 64 69 75 81 87 94 101 106 112 118 125 130 137 144 151 159 167 176 192 218 223 221 220
+ 250 251 227 214 204 194 183 175 165 156 148 140 131 122 113 105 97 90 83 77 71 65 59 54 48 45 40 36 31 29 26 22 20 20 33 70 91 112 128 143 156 163 172 177 179 183 185 181 183 183 181 173 171 173 179 183 180 173 172 175 178 182 188 187 189 189 189 188 185 184 185 186 187 189 190 191 190 188 185 179 169 159 147 132 107 57 13 10 10 11 12 14 15 17 20 22 25 28 32 35 38 42 45 50 54 59 64 70 76 82 88 94 102 107 113 119 125 131 138 145 153 161 169 178 198 220 223 221
+ 255 231 218 205 196 185 177 167 158 150 140 132 123 114 106 98 90 84 77 71 64 59 53 49 43 38 34 31 27 25 21 18 16 16 32 73 97 114 132 149 158 164 170 176 178 180 180 176 176 181 182 180 177 184 187 187 179 176 177 181 184 182 187 187 186 187 187 184 181 180 182 183 185 187 188 189 188 187 183 177 168 157 148 133 104 48 10 9 8 9 10 11 12 15 17 20 23 26 29 33 36 40 44 47 52 57 61 67 73 79 85 92 99 106 111 117 123 129 136 143 151 158 166 176 190 218 224 222
+ 245 224 211 201 191 181 172 162 153 144 136 126 117 108 100 93 85 78 73 66 59 54 49 45 39 34 30 27 24 21 18 16 14 13 28 65 94 116 134 149 157 160 167 176 178 177 175 174 173 174 174 178 183 188 186 183 177 173 172 180 185 184 183 183 181 184 184 182 179 176 177 180 181 182 184 186 187 186 182 177 170 162 152 138 112 62 10 8 7 7 8 8 10 12 15 17 20 23 27 30 33 37 41 45 49 53 58 63 69 76 81 87 94 101 107 113 119 125 132 139 147 154 163 171 181 206 223 223
+ 231 218 207 196 185 176 167 157 149 139 131 121 112 103 96 88 80 74 68 62 55 50 45 40 35 30 27 23 21 18 15 13 11 11 29 60 82 111 133 148 157 162 164 176 179 175 169 170 169 171 174 178 184 185 177 171 168 166 170 177 181 181 177 179 178 179 180 179 174 170 171 174 175 177 181 183 183 183 181 179 175 166 158 145 121 75 14 6 5 5 5 6 7 9 13 14 18 20 24 27 31 34 38 41 46 50 55 61 66 72 77 84 90 97 103 109 116 122 129 135 143 150 158 167 176 191 219 224
+ 224 212 201 191 181 172 162 153 143 134 125 115 107 99 91 83 77 70 64 57 51 46 41 36 32 27 24 20 19 15 13 11 10 10 28 65 83 108 130 145 155 163 164 173 179 173 164 168 169 172 180 184 183 177 169 160 158 164 168 168 172 171 169 174 175 175 176 174 168 166 166 168 169 171 174 177 178 179 181 181 178 171 162 149 130 91 31 6 4 4 3 4 5 7 9 11 14 18 20 25 28 31 35 39 44 48 52 57 62 68 74 80 87 93 100 106 112 118 125 132 139 147 155 163 172 180 208 224
+ 219 207 196 187 177 167 158 148 138 130 120 111 103 94 85 79 72 66 59 54 48 42 37 32 28 24 22 18 15 13 11 10 8 7 25 66 88 109 129 140 151 159 163 168 177 173 162 166 173 182 184 182 174 165 161 152 154 163 161 158 161 160 163 165 166 170 174 170 165 162 161 160 162 164 166 169 172 175 180 181 178 171 161 152 133 98 42 6 4 3 2 3 3 5 7 9 12 15 18 22 25 29 32 36 40 44 49 53 58 64 70 76 83 89 96 103 109 116 121 129 135 143 150 159 167 176 194 220
+ 213 203 193 182 172 163 154 144 135 125 116 106 98 89 82 74 67 61 56 49 44 38 34 30 26 22 18 16 13 11 9 7 5 6 20 62 85 107 125 133 145 154 158 163 171 173 162 162 173 182 179 172 157 148 152 146 150 154 149 149 150 152 155 156 159 166 170 166 160 157 155 154 155 158 160 163 168 176 180 178 170 156 146 139 126 96 48 6 4 3 3 2 2 2 4 7 9 12 16 19 23 26 30 33 38 41 45 51 55 61 68 73 80 86 92 99 106 112 118 126 133 140 147 155 163 172 181 212
+ 212 201 192 181 171 161 152 143 132 123 113 104 96 87 80 72 65 59 53 47 42 36 32 28 24 21 17 15 11 10 8 6 4 4 10 53 71 97 118 127 133 147 155 156 165 170 165 161 170 176 168 163 145 132 136 147 143 140 140 139 142 148 150 152 156 163 163 160 156 151 150 150 151 152 155 158 164 174 178 173 160 137 118 114 110 92 57 10 4 3 2 2 2 2 2 4 6 10 13 16 20 23 27 30 34 37 41 46 51 57 63 69 75 81 88 94 101 108 114 120 127 135 142 151 158 166 174 190
+ 205 195 184 174 164 155 146 136 125 116 106 98 90 81 73 67 60 54 48 41 37 32 28 23 20 17 14 11 8 7 6 5 3 3 29 58 77 98 117 127 130 142 153 153 158 167 163 161 172 162 156 147 126 120 138 141 129 123 129 131 140 147 148 152 156 163 159 156 149 146 146 145 147 150 155 160 168 174 171 158 136 101 84 84 86 69 36 4 3 2 2 2 2 2 2 2 5 7 11 15 18 22 25 28 31 35 40 44 49 55 60 66 73 79 87 93 100 107 113 120 126 134 141 148 156 164 172 185
+ 203 194 182 173 163 153 143 134 124 114 104 96 87 80 72 64 58 52 46 40 34 30 26 22 18 15 13 10 8 6 4 3 3 3 20 53 75 89 108 120 130 136 147 154 158 165 168 164 170 159 156 145 127 121 127 135 122 112 115 126 137 147 146 149 155 161 160 158 151 148 147 146 144 147 153 159 165 166 160 145 135 116 76 68 71 64 35 4 3 3 2 3 2 2 2 2 3 5 9 11 15 19 22 24 28 31 35 40 45 51 56 62 69 75 82 89 95 102 109 115 122 129 135 143 151 159 167 176
+ 197 188 177 167 157 147 137 124 117 107 98 90 82 74 67 60 53 47 41 36 31 27 22 19 16 12 9 7 5 3 3 2 2 3 31 60 74 90 106 119 131 139 144 147 155 164 172 175 173 158 156 138 121 113 124 123 111 104 109 125 141 149 149 150 159 162 160 158 155 154 152 148 146 147 153 155 155 149 135 131 121 92 60 59 64 57 20 4 3 2 3 2 2 2 2 2 2 3 7 10 13 17 19 23 25 29 34 39 44 49 55 61 68 74 81 87 95 102 108 115 121 127 135 142 150 158 167 175
+ 194 184 173 163 153 143 133 123 113 104 95 87 79 71 64 57 51 45 39 33 28 25 20 17 13 11 9 6 3 2 2 2 2 2 33 58 71 85 101 114 126 137 142 141 147 158 166 172 172 161 156 136 112 107 116 113 109 111 117 127 141 147 154 153 158 163 164 161 159 158 156 153 149 149 150 149 141 130 123 119 112 78 51 49 58 58 30 4 3 2 2 2 2 2 2 3 3 2 5 8 11 13 16 20 23 27 32 36 42 47 53 58 65 72 78 85 92 99 106 112 119 125 132 139 147 155 163 173
+ 191 181 170 160 149 139 130 119 110 101 92 83 75 67 61 54 48 42 36 31 26 22 18 14 12 9 7 4 3 3 2 2 2 2 31 54 69 84 97 109 122 132 138 141 144 148 154 162 167 162 155 134 107 109 108 109 113 119 125 132 142 149 153 158 160 162 162 164 162 161 160 158 154 151 149 145 133 127 124 123 112 76 49 45 51 55 45 7 3 3 2 2 2 2 2 2 2 2 3 6 9 12 13 18 21 25 29 34 39 44 50 56 63 70 76 83 91 97 104 110 117 123 129 137 144 153 161 169
+ 190 179 169 158 149 139 129 118 108 99 90 82 75 67 60 53 47 41 35 30 25 22 18 15 11 8 6 4 3 3 2 3 3 2 16 42 60 79 93 105 116 126 133 141 145 144 143 143 156 163 157 141 110 107 107 119 122 124 128 132 139 147 155 159 161 162 163 163 163 163 164 163 160 157 153 150 138 131 129 128 118 92 53 49 49 53 52 36 5 2 3 2 2 3 2 2 2 2 2 3 6 9 12 15 19 22 26 31 35 40 47 53 59 66 73 79 87 93 100 106 113 119 126 132 140 148 156 164
+ 184 173 163 152 143 132 122 112 103 94 86 78 71 63 56 50 43 37 32 28 23 20 16 12 10 6 4 3 3 3 3 3 2 2 13 37 59 76 91 106 116 123 131 139 145 140 136 140 147 158 153 136 110 100 110 132 131 128 129 130 135 144 151 156 158 160 162 162 163 163 164 163 161 158 156 151 141 136 133 128 116 81 55 54 54 55 53 41 6 3 3 3 2 2 2 2 2 2 2 2 5 8 11 14 18 21 25 30 35 40 46 52 59 65 72 78 86 92 99 105 112 119 125 131 139 148 156 165
+ 180 170 160 150 139 129 119 109 99 93 83 75 67 60 54 47 41 36 30 26 22 18 14 11 8 5 4 3 3 2 3 2 3 2 2 28 53 67 81 101 111 116 127 130 137 137 128 136 139 155 151 140 112 100 107 131 131 127 125 124 126 133 141 146 149 153 158 159 158 158 160 159 160 158 157 155 150 144 139 131 116 84 62 57 56 56 54 48 27 4 3 2 3 2 2 2 2 2 2 2 3 7 9 13 16 21 24 28 33 38 44 50 57 64 70 77 84 90 97 104 110 117 123 130 137 145 153 162
+ 178 167 157 147 136 126 116 106 97 88 80 73 65 58 51 45 39 34 29 25 21 17 13 10 8 5 3 3 3 2 2 2 2 2 2 19 46 62 67 89 103 108 122 124 127 131 126 129 136 148 151 143 121 104 106 121 126 121 118 117 119 123 130 135 139 146 152 152 151 150 151 154 156 156 156 156 155 152 145 133 114 84 69 60 57 57 55 52 41 6 3 3 3 2 2 2 2 2 2 2 2 4 8 11 14 19 23 27 32 37 42 49 55 61 68 75 82 89 95 102 108 115 121 128 136 143 151 159
+ 175 164 154 144 133 123 113 104 94 86 78 71 64 57 50 43 38 33 28 24 20 16 13 10 7 4 3 2 3 2 2 2 2 2 2 12 38 55 59 71 88 103 120 124 125 130 131 132 132 138 148 141 131 116 109 108 116 112 110 112 115 120 124 128 133 139 144 142 140 138 142 147 151 153 153 154 153 152 147 135 116 87 73 62 58 58 56 54 49 28 3 3 2 2 2 2 2 2 2 2 2 3 7 10 13 17 21 26 30 35 41 47 53 60 66 73 80 88 94 100 106 113 120 126 134 141 149 158
+ 172 162 152 141 131 121 110 101 92 84 77 69 62 55 48 42 36 31 27 23 20 15 12 10 6 4 3 3 3 3 2 2 2 2 3 2 27 45 59 67 79 101 117 124 126 128 127 130 129 129 142 139 131 132 128 113 112 107 105 107 111 117 120 125 129 133 135 133 130 127 131 139 146 150 151 151 151 149 144 133 115 94 77 66 60 58 57 56 53 43 5 3 3 3 2 3 2 2 2 2 2 2 5 9 12 16 19 24 28 34 40 45 52 58 65 72 78 85 91 99 105 112 118 125 132 140 147 155
+ 170 160 149 139 128 118 108 100 91 82 75 67 60 54 47 41 35 31 26 22 18 15 12 9 6 4 3 3 3 3 3 3 2 2 2 1 12 39 57 68 82 101 113 120 121 123 119 116 119 122 132 140 132 133 134 122 111 106 103 104 110 115 119 121 126 128 127 127 122 120 121 128 138 146 147 148 149 148 140 129 113 96 84 70 60 58 56 55 55 50 27 4 3 2 3 3 2 2 2 2 2 2 4 7 11 15 19 23 27 32 37 44 51 56 63 70 77 83 91 97 103 110 117 123 131 139 146 154
+ 168 158 147 136 126 116 106 97 88 80 73 65 59 52 46 40 35 30 26 22 19 15 12 9 6 4 3 3 3 2 2 2 2 2 2 2 2 34 57 63 78 96 104 112 118 117 119 111 115 120 122 131 135 139 137 126 115 105 104 105 110 116 117 117 123 126 124 124 123 118 116 120 128 138 142 144 145 143 135 124 111 101 87 68 64 62 57 53 53 52 38 5 3 3 2 3 2 2 2 2 2 2 4 6 10 14 17 21 26 31 36 43 48 56 62 69 75 82 89 96 102 109 115 122 129 137 144 152
+ 166 156 145 134 124 114 105 95 87 79 71 64 57 50 45 39 34 30 26 22 19 15 12 9 6 4 3 3 2 2 3 2 3 3 2 2 2 27 53 60 71 89 96 101 113 116 116 118 117 115 114 112 124 138 141 132 119 102 105 106 112 114 115 115 118 124 124 120 122 120 118 115 119 128 132 135 137 135 128 120 111 103 82 70 75 76 68 60 56 51 38 5 3 3 3 2 2 2 2 2 2 3 2 6 10 13 17 20 24 30 35 41 47 53 60 68 75 81 88 94 101 107 114 121 128 136 142 151
+ 165 154 143 133 122 112 103 94 85 78 70 62 56 50 44 39 33 28 25 21 18 15 12 9 7 4 3 3 3 2 2 2 2 2 2 2 2 15 47 59 65 83 92 98 108 115 116 117 113 108 107 104 102 122 136 134 115 96 106 109 112 115 115 116 117 122 124 122 122 121 117 113 113 118 123 125 126 124 121 116 111 100 72 67 74 73 67 58 49 39 21 4 3 3 2 3 2 2 2 2 2 2 2 4 8 12 15 19 24 28 33 39 46 53 59 66 73 80 87 94 100 106 114 119 127 134 141 149
+ 163 153 141 131 121 111 101 92 84 76 69 61 56 49 43 38 33 30 25 21 18 15 12 10 7 4 3 2 2 2 2 2 2 2 2 2 2 3 33 55 68 79 90 100 107 110 110 113 109 102 95 97 89 92 112 113 100 95 104 112 114 116 117 118 119 121 123 122 120 119 117 113 109 110 113 116 114 113 111 110 106 92 64 60 59 55 44 29 18 6 4 3 2 2 2 3 2 2 2 2 2 2 2 4 7 11 14 18 22 28 32 38 45 51 58 65 71 78 86 92 99 105 112 118 125 132 140 148
+ 161 151 140 130 119 109 100 91 83 75 68 61 55 49 43 37 33 29 25 21 19 15 12 9 7 4 3 3 2 2 2 1 2 2 2 2 2 2 14 40 57 72 85 97 105 106 101 103 106 97 95 91 84 79 79 90 95 98 105 112 116 118 121 123 121 121 122 122 121 119 116 111 104 101 105 101 99 98 99 100 93 78 65 58 54 47 12 3 3 2 2 2 2 3 2 2 2 2 2 2 2 3 2 3 6 10 13 17 21 26 31 37 43 50 57 63 70 77 84 91 97 104 111 117 124 131 139 146
+ 160 149 138 129 117 108 98 89 82 74 67 60 55 48 42 37 32 28 25 21 18 15 12 10 8 5 4 3 2 3 2 2 2 2 2 2 2 2 7 33 47 65 76 90 99 103 101 97 104 102 95 92 86 83 77 85 96 102 108 113 118 120 121 124 125 123 124 123 121 119 115 109 101 99 99 94 90 91 94 94 86 77 70 63 57 44 6 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 6 9 12 16 20 25 31 36 42 49 55 63 70 76 83 90 97 103 110 116 123 130 137 145
+ 158 147 137 127 116 107 97 89 81 73 67 60 53 47 42 37 32 28 25 21 19 16 13 11 8 6 4 3 3 2 2 2 2 2 2 2 2 2 6 33 40 63 71 80 87 92 100 99 100 102 97 92 89 86 83 84 95 104 110 114 119 121 122 126 126 127 125 123 121 118 114 107 99 97 95 85 84 88 92 89 81 78 74 66 57 42 5 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 8 11 16 20 24 30 35 42 48 54 62 68 75 83 90 96 103 109 115 122 129 136 144
+ 157 147 137 126 116 107 97 88 80 73 66 59 53 46 41 37 33 29 25 22 20 16 14 11 9 7 5 3 3 3 3 3 3 2 2 2 2 2 3 29 38 60 66 76 79 83 93 94 90 98 96 93 91 90 88 87 92 101 109 115 118 122 123 127 127 127 126 121 117 117 112 105 100 98 93 81 85 89 85 84 81 75 70 63 53 38 5 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 8 11 15 19 24 28 35 40 47 54 61 68 75 82 89 96 103 108 115 122 128 136 143
+ 159 148 138 128 117 108 99 90 82 74 67 61 54 48 43 37 33 29 26 23 20 17 14 13 10 8 6 5 4 3 2 3 2 2 2 2 2 2 2 8 34 51 59 72 80 79 85 93 94 93 93 94 93 93 94 92 91 94 103 111 117 121 122 126 127 127 125 120 114 112 111 106 101 99 94 84 90 91 89 86 72 61 58 53 45 29 5 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 6 10 14 17 22 27 33 39 45 51 58 66 73 80 87 93 100 106 113 120 126 133 141
+ 156 145 135 124 114 105 96 88 80 72 66 58 53 47 42 37 33 29 25 23 20 18 15 13 11 8 7 5 4 3 3 2 2 3 2 2 2 1 2 6 32 47 57 73 82 81 84 86 90 90 92 93 94 94 95 94 91 92 102 110 116 121 122 126 127 126 123 118 115 112 109 104 100 100 91 89 94 93 91 77 58 53 51 43 29 7 3 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 7 11 15 19 24 29 34 40 46 52 60 67 74 81 88 95 102 108 114 121 128 136 142
+ 157 147 137 127 117 107 98 89 82 74 67 61 54 48 43 38 34 31 27 25 21 19 16 14 12 10 8 7 5 4 3 3 2 2 2 2 2 2 2 2 13 34 40 59 74 77 77 82 82 86 90 93 95 97 97 97 95 91 93 103 111 115 119 124 125 124 123 122 118 114 110 108 104 102 94 91 96 96 91 74 63 63 61 53 39 6 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 7 10 14 18 22 27 32 38 44 51 58 64 72 80 86 93 100 106 112 119 126 132 140
+ 155 145 134 124 114 105 96 88 80 73 66 60 53 47 42 38 34 30 27 24 22 19 16 14 13 11 9 7 5 4 4 3 2 3 2 2 2 2 2 2 4 23 33 44 56 68 77 78 80 86 90 93 98 100 100 98 96 93 90 98 108 113 115 121 123 121 123 123 119 115 114 111 107 103 93 93 94 94 84 67 64 61 55 44 23 4 3 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 5 8 11 15 19 24 28 34 39 45 52 59 66 73 81 88 94 101 108 114 121 127 135 142
+ 154 144 134 124 114 105 95 88 80 73 67 60 54 48 43 39 35 31 28 26 22 20 17 15 13 11 9 7 6 5 4 4 3 3 2 2 2 2 2 2 2 3 15 29 47 61 72 76 80 86 90 95 98 101 102 101 98 95 90 93 104 110 113 118 120 120 122 122 121 119 117 114 110 104 94 91 91 90 84 70 66 60 48 23 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 8 11 15 19 24 29 34 40 46 53 60 66 73 80 87 94 101 108 114 121 128 135 142
+ 157 146 136 126 116 107 98 90 82 76 69 62 57 51 45 41 37 33 30 27 24 21 19 17 15 13 11 8 7 7 6 4 3 4 3 2 2 2 2 2 2 2 2 6 37 55 66 74 80 85 90 95 99 101 103 103 101 97 95 91 96 104 110 114 118 118 120 121 122 123 121 116 114 108 98 94 90 91 90 80 69 61 48 21 4 3 3 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 8 10 14 18 22 28 33 39 45 52 58 65 72 79 86 92 99 106 113 119 127 133 141
+ 154 144 134 124 114 105 96 89 80 75 68 62 56 50 45 41 38 34 30 28 25 22 19 18 16 13 11 10 8 7 6 5 5 4 3 2 2 2 2 2 2 2 2 18 46 59 69 77 83 88 93 97 100 102 104 105 103 98 95 92 93 100 105 111 115 115 115 120 122 123 121 119 114 107 97 96 96 94 93 86 75 63 50 33 5 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 5 8 11 16 19 24 29 35 41 47 53 60 67 74 81 88 94 101 108 115 121 128 135 143
+ 155 145 134 124 114 106 97 88 82 75 69 63 57 52 47 43 39 36 32 29 26 23 21 19 17 15 13 11 9 8 7 6 5 4 3 3 2 2 2 2 2 2 4 36 55 68 74 79 85 90 94 97 100 103 105 106 106 102 96 93 92 94 98 104 110 114 114 118 120 121 123 120 115 110 102 99 103 102 100 96 86 75 62 51 30 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 9 13 16 20 25 30 35 41 48 55 60 68 74 82 89 95 102 109 115 122 129 136 143
+ 155 144 134 123 114 105 97 89 82 76 69 64 59 53 49 45 41 37 34 31 27 25 23 20 19 16 14 12 11 10 7 7 6 5 3 3 3 2 2 2 2 2 20 41 57 70 81 86 88 91 94 98 101 103 105 107 106 104 98 94 91 90 90 97 101 109 114 117 118 118 121 121 117 113 106 103 106 106 106 102 93 86 78 65 50 31 6 3 3 2 2 2 2 2 1 2 2 2 2 2 2 2 2 3 6 9 13 17 21 26 31 36 42 49 55 61 68 75 82 89 95 102 109 116 123 130 137 144
+ 154 144 134 124 114 106 98 90 83 77 71 65 60 55 50 45 42 39 36 33 30 27 24 22 19 17 15 15 13 11 9 8 7 6 5 4 3 2 2 2 2 11 38 49 59 70 81 90 95 97 97 98 100 103 104 106 107 105 101 96 92 88 88 91 95 103 107 109 113 114 118 121 118 117 111 106 109 110 109 104 96 92 87 78 66 49 26 4 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 4 6 10 14 18 22 27 32 38 43 49 55 62 69 76 83 90 97 103 110 117 124 130 137 145
+ 154 145 135 124 115 107 98 90 84 77 72 67 61 56 51 48 44 41 38 34 31 29 26 24 22 20 17 16 15 12 12 10 9 7 5 5 3 3 2 2 2 23 48 63 72 75 82 88 94 100 102 102 101 102 103 105 105 104 102 98 93 90 87 88 91 95 101 104 105 109 113 118 119 117 114 106 110 110 106 102 96 92 88 80 68 51 28 4 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 7 11 15 19 23 28 34 38 45 50 57 63 70 77 84 91 98 105 111 118 125 131 138 146
+ 158 149 142 128 119 113 104 96 87 80 75 70 66 60 55 51 47 44 41 38 34 31 29 26 25 23 21 18 16 15 14 13 11 10 8 6 5 3 2 2 3 29 51 67 77 86 90 90 92 96 100 104 106 104 103 103 103 103 102 99 95 90 87 86 88 91 95 100 99 100 103 108 114 113 114 109 107 107 101 98 94 89 84 77 67 51 30 5 3 3 2 1 2 2 2 2 2 2 2 2 2 2 2 5 8 11 14 18 24 28 33 39 45 50 57 63 70 77 84 90 97 104 111 118 124 130 137 145
+ 156 157 164 130 127 142 132 123 95 81 77 96 92 84 62 53 70 70 65 52 36 33 44 45 42 39 35 24 27 20 17 16 16 15 9 6 4 3 2 3 18 46 64 76 84 91 98 99 96 96 99 103 107 109 107 104 102 101 100 97 93 87 85 84 86 88 91 93 92 91 93 99 105 106 102 99 98 97 93 91 88 81 73 69 57 40 16 4 3 3 2 2 2 2 2 2 2 2 2 2 1 2 4 7 9 13 17 22 26 31 36 42 47 54 60 67 74 80 87 93 100 107 114 121 127 133 140 147
+ 158 158 170 132 128 145 119 123 114 83 80 105 90 79 63 55 79 70 64 73 47 35 52 62 53 57 48 26 33 44 20 22 42 22 9 6 4 3 2 3 32 55 70 80 88 94 100 104 105 100 99 101 105 108 109 108 106 101 99 96 92 87 83 79 81 84 86 87 87 85 84 88 91 93 85 81 81 82 82 82 81 77 66 58 49 31 6 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 5 8 10 14 18 23 28 32 37 43 49 56 61 68 74 81 88 94 102 108 115 121 128 135 141 149
+ 159 159 171 133 130 150 120 126 114 85 83 108 83 71 60 57 82 67 51 74 54 36 36 42 56 44 27 23 23 46 43 46 37 14 9 6 4 3 3 13 45 64 76 85 92 97 102 105 108 109 105 102 102 105 107 109 109 107 102 98 93 88 83 79 79 80 81 82 82 82 83 80 76 77 73 66 64 65 65 65 66 64 56 44 34 17 4 3 2 2 2 2 2 2 2 2 2 2 2 2 2 3 6 9 12 15 20 24 29 34 39 44 51 58 63 69 76 83 89 96 104 110 117 123 129 136 142 150
+ 160 160 173 136 132 152 142 138 111 87 85 111 104 87 62 58 85 82 78 76 47 38 35 36 63 40 26 22 23 31 53 45 18 13 9 7 4 3 3 33 57 72 82 90 96 101 104 108 109 111 112 111 105 103 104 106 108 109 107 102 97 91 84 78 76 79 79 79 78 79 82 78 68 62 58 53 49 47 46 47 47 45 39 26 15 5 3 3 2 2 2 2 2 2 2 2 2 1 2 2 2 4 7 10 14 18 22 26 31 36 42 47 52 59 65 72 78 84 91 98 104 111 118 124 130 138 144 151
+ 166 158 178 144 130 154 126 120 130 95 87 107 92 77 64 61 78 83 73 78 49 39 36 36 59 51 27 23 22 24 39 43 17 13 10 7 5 4 10 43 64 78 88 93 100 103 106 108 109 111 112 114 114 111 105 104 105 107 108 107 105 99 91 82 76 76 76 76 77 77 78 76 69 58 49 39 34 29 26 26 25 24 21 10 4 3 3 2 2 2 2 2 2 2 2 1 2 2 2 2 3 5 8 11 14 18 23 27 32 36 42 47 53 60 66 72 79 85 92 98 105 112 118 124 130 137 143 150
+ 172 161 177 145 133 156 135 123 127 96 90 109 90 76 69 63 79 75 54 71 61 41 37 37 59 52 28 23 21 23 39 41 17 12 11 7 5 7 35 58 76 87 94 99 103 107 109 109 111 111 111 113 115 116 114 107 104 106 107 107 107 105 101 91 79 74 75 76 76 74 73 71 65 57 46 30 14 7 5 4 3 3 3 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 4 7 10 13 16 20 25 30 34 39 44 50 56 62 68 74 81 88 94 101 107 113 120 126 132 139 145 152
+ 167 162 159 140 138 144 138 126 104 94 93 107 104 96 74 64 81 64 52 64 63 42 37 38 61 42 26 23 21 24 45 31 16 11 8 7 8 34 59 76 88 96 102 106 108 110 111 110 110 110 112 112 114 116 117 115 109 106 106 107 107 106 104 99 86 76 74 77 75 73 68 64 59 53 38 14 4 3 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 4 6 9 12 16 20 23 28 33 38 44 48 53 60 66 72 79 85 91 98 105 111 117 123 130 135 142 149 156
+ 171 161 153 144 135 128 122 114 106 99 93 90 83 77 72 66 63 60 55 52 48 45 41 37 40 35 27 24 21 21 28 27 15 10 9 8 16 49 72 87 97 104 108 112 113 113 113 112 110 110 109 111 113 114 115 117 118 115 109 107 106 107 106 105 101 94 84 79 77 74 72 64 57 49 39 9 5 4 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 6 8 10 14 17 21 25 30 34 39 44 50 55 61 67 73 80 87 93 100 106 112 119 125 130 136 142 149 156
+ 170 161 152 143 135 128 122 114 107 100 94 88 82 77 71 66 63 60 55 52 48 43 40 36 35 30 26 23 21 20 19 17 14 11 10 19 46 65 85 97 106 111 114 117 117 117 115 113 111 110 109 111 112 114 115 116 117 118 116 110 107 107 107 106 104 101 96 89 80 77 73 64 53 38 21 8 7 7 5 5 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 6 8 10 14 16 20 24 29 33 38 43 48 53 59 65 72 78 84 91 97 104 110 116 122 128 134 140 147 153 160
+ 172 163 154 146 138 131 124 116 109 103 96 90 84 78 73 68 64 60 56 52 48 44 40 37 33 31 27 24 21 19 17 14 13 11 15 41 61 76 89 100 109 114 119 120 121 119 117 115 113 111 110 110 111 113 114 115 116 118 119 117 112 108 107 106 106 105 103 100 92 82 75 63 40 20 11 10 9 9 8 7 6 5 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 5 7 10 13 15 19 22 26 31 35 40 46 50 55 62 67 74 80 86 93 100 106 112 119 124 130 136 142 148 155 162
+ 175 166 157 149 141 133 127 119 111 105 99 92 86 80 75 70 66 62 58 53 49 45 41 38 34 32 27 24 21 19 16 14 11 14 34 57 72 85 95 103 110 115 120 122 124 123 121 120 116 114 112 110 110 111 113 113 115 116 119 120 118 112 109 107 107 106 107 105 103 94 77 63 34 15 12 11 13 12 10 9 8 6 4 3 3 3 3 3 2 3 2 2 2 2 2 2 4 6 9 12 15 18 22 25 29 33 37 42 48 53 58 64 69 77 83 90 96 102 108 114 121 126 132 138 144 151 157 163
+ 177 168 160 151 143 136 128 121 114 107 101 94 89 82 77 73 68 64 59 55 50 47 44 39 35 32 29 26 22 19 16 15 14 24 48 66 79 90 98 105 109 113 117 122 125 125 124 123 120 117 114 112 111 110 111 111 113 115 118 120 120 120 113 109 109 108 108 108 107 105 95 72 51 22 15 14 14 13 13 12 10 7 4 4 3 3 2 3 2 2 2 2 2 2 2 3 5 8 11 14 18 20 23 27 32 36 41 45 49 56 61 67 73 79 86 91 98 105 111 117 123 129 135 140 146 153 159 166
+ 182 173 164 156 147 140 132 125 118 111 104 98 92 87 81 76 71 67 62 57 53 50 45 41 39 34 31 28 24 21 18 16 16 31 54 70 82 91 99 105 109 112 114 117 122 125 127 127 126 122 119 116 114 111 112 111 110 113 116 118 121 123 122 116 110 109 110 111 111 108 106 96 69 44 20 16 16 16 15 13 12 9 7 5 3 3 2 3 2 2 2 2 2 2 4 5 7 10 12 16 18 22 26 29 34 38 42 46 51 57 61 67 73 79 86 92 99 106 112 118 124 130 135 142 148 155 160 166
+ 184 175 166 158 151 142 135 127 120 113 107 101 94 89 84 78 73 68 64 60 55 51 47 43 39 35 32 29 25 22 19 18 21 45 63 76 86 94 100 105 109 112 114 116 119 123 126 129 129 127 123 120 117 114 112 111 110 111 114 117 119 122 123 124 118 111 111 114 115 113 109 97 79 56 36 19 18 18 16 14 12 10 8 6 3 3 3 3 3 3 3 2 3 3 5 6 9 12 14 17 20 25 28 32 35 40 44 48 53 59 64 70 76 82 88 95 101 108 114 121 126 132 137 143 149 156 162 169
+ 186 176 170 160 153 145 137 130 123 116 110 104 97 91 87 81 75 70 65 61 56 54 48 45 40 38 33 30 27 22 20 18 31 55 70 81 90 97 102 106 111 113 115 116 118 121 122 126 130 131 129 124 121 118 114 112 110 111 112 115 118 122 125 126 125 120 116 116 120 122 121 104 89 82 69 42 31 29 18 15 13 11 9 7 4 4 2 2 2 2 2 3 4 5 7 9 11 14 17 20 23 27 30 33 39 41 47 50 56 61 67 72 79 85 91 98 103 111 117 123 129 135 140 145 152 158 165 171
+ 187 178 169 161 153 145 138 131 123 117 110 104 98 93 87 81 76 72 66 61 57 52 48 44 41 37 33 30 26 22 20 26 51 70 80 91 97 102 108 111 115 117 118 119 120 122 121 123 127 133 132 128 125 121 117 113 112 111 112 114 118 122 125 127 128 127 122 120 123 137 135 118 97 90 82 56 31 30 19 16 14 12 9 7 6 5 4 4 4 4 4 5 7 7 9 12 14 17 19 23 26 29 34 37 41 45 50 54 60 65 71 77 83 90 96 102 108 115 121 127 133 138 144 150 156 161 169 176
+ 193 183 174 166 157 150 143 135 128 121 114 108 102 96 91 85 79 75 69 65 60 56 52 47 44 39 35 31 27 23 21 32 58 74 86 95 102 108 112 115 119 121 122 124 124 123 122 122 121 126 133 133 130 127 123 119 115 112 112 113 116 120 124 127 129 129 130 130 134 137 141 127 104 96 91 73 43 30 29 19 16 13 12 9 8 7 6 5 5 5 6 7 9 10 12 13 15 19 21 25 28 32 35 38 42 47 51 55 61 66 72 78 85 91 97 104 110 116 122 128 134 139 145 150 157 163 170 178
+ 193 184 175 166 159 150 142 136 129 122 115 109 103 97 92 86 80 75 71 65 61 56 52 48 44 40 35 32 28 25 29 57 75 87 97 106 112 116 119 123 125 127 128 128 128 127 126 124 122 122 128 134 134 131 127 122 117 114 114 114 116 121 125 128 131 131 131 138 140 137 143 127 109 97 88 67 39 31 35 20 16 15 13 11 10 8 7 8 8 8 9 10 11 12 14 17 19 22 24 27 31 35 39 42 45 50 54 59 64 70 76 83 90 96 102 108 114 120 127 132 138 143 148 154 160 167 174 182
+ 196 187 178 170 161 154 146 138 131 125 118 111 106 101 95 89 84 77 72 67 63 59 54 50 45 41 36 32 29 28 50 72 87 98 107 114 120 123 127 130 132 134 133 132 132 131 128 125 123 121 121 126 132 134 131 126 120 116 115 116 117 121 125 128 133 132 132 142 143 135 143 135 111 93 86 62 31 28 27 19 18 17 15 13 11 11 9 10 10 10 12 13 13 15 17 19 22 25 27 30 34 38 41 45 48 52 57 62 67 73 80 86 92 98 105 111 118 124 130 135 141 146 151 157 163 170 177 185
+ 199 190 181 172 164 156 148 140 134 127 120 115 108 103 97 92 86 80 74 70 65 60 55 51 47 43 37 34 31 41 70 87 99 110 118 124 130 132 135 136 139 139 139 138 136 134 132 128 125 122 121 121 125 134 134 129 123 120 118 118 119 120 127 131 135 135 136 145 147 147 143 132 98 82 70 43 31 36 25 21 20 18 16 14 13 13 12 12 13 14 14 15 16 18 19 22 24 27 30 34 37 40 43 47 51 58 59 65 71 77 83 89 96 101 108 115 121 128 134 138 143 148 153 159 166 173 181 187
+ 203 194 184 175 167 159 151 144 137 130 123 118 112 106 100 94 89 83 77 72 67 62 57 53 48 44 39 36 40 67 87 101 112 121 127 132 136 140 141 142 144 144 143 142 141 139 136 133 129 125 123 122 122 128 136 134 129 123 120 119 119 120 125 132 136 137 138 146 149 149 143 130 100 84 67 48 44 37 27 22 22 20 19 17 16 15 15 15 15 16 18 19 20 26 23 26 28 31 35 38 41 44 47 51 54 58 64 70 78 82 87 93 99 105 112 118 124 132 138 142 146 151 157 162 168 176 183 190
+ 206 198 190 181 172 164 156 149 142 135 128 123 116 110 104 99 92 86 81 75 71 65 61 55 51 46 43 42 59 81 98 112 122 130 135 140 142 144 146 147 147 147 147 146 144 143 142 139 136 132 128 127 125 125 129 137 135 129 123 121 119 119 123 129 136 140 138 142 144 142 142 132 113 98 82 63 52 50 31 27 24 23 21 20 18 17 16 17 18 19 20 22 24 45 47 29 30 35 56 68 72 65 51 53 57 61 72 99 110 112 94 94 100 107 113 119 128 154 169 154 149 152 157 164 170 177 185 192
+ 207 200 190 182 173 165 158 150 143 136 130 123 118 111 106 100 94 88 82 76 71 66 61 56 51 48 47 64 86 103 117 127 134 139 144 147 148 150 150 149 148 148 147 146 144 144 143 143 141 137 133 131 128 127 127 135 135 130 124 121 119 119 122 130 138 143 145 147 148 147 140 130 119 104 88 72 58 53 47 30 27 25 23 21 22 20 19 20 21 21 24 26 30 58 42 32 35 66 68 58 66 85 69 59 62 69 105 104 101 125 109 100 105 112 118 126 154 173 176 150 152 156 162 168 175 184 189 196
+ 211 202 194 186 177 169 161 154 147 140 134 127 121 115 108 102 96 91 85 79 74 68 63 59 55 52 65 86 105 119 130 137 143 145 150 152 153 153 152 150 149 148 146 142 139 138 139 141 142 140 138 136 133 130 127 129 136 134 127 121 118 118 121 128 138 145 148 151 151 152 147 136 126 114 99 83 67 56 53 46 30 28 26 24 24 22 22 23 24 25 27 29 32 62 45 35 43 74 50 47 52 78 90 64 66 75 111 96 94 125 117 104 109 115 122 149 164 167 179 151 155 159 165 172 179 187 193 199
+ 214 205 198 188 180 172 165 158 151 145 137 130 124 118 112 106 100 94 88 82 77 71 66 61 57 65 86 105 121 131 140 145 149 151 154 155 156 155 153 152 150 149 147 143 139 134 130 130 134 139 140 140 136 132 128 127 132 136 130 122 118 117 119 125 137 145 151 155 156 155 152 144 132 123 111 95 78 64 55 53 45 32 29 27 26 25 26 26 26 28 30 31 37 65 47 38 44 75 55 50 53 71 98 68 70 77 107 121 120 135 110 108 113 121 146 161 145 163 181 154 157 162 168 175 182 190 195 203
+ 217 209 201 193 185 176 169 162 154 147 141 134 127 122 115 109 102 96 90 83 79 73 68 64 63 85 104 121 133 142 149 152 155 156 157 158 158 158 156 154 152 151 149 147 143 139 133 126 125 128 133 139 139 135 131 129 128 136 133 126 120 118 118 123 134 146 154 156 158 159 157 152 138 129 121 109 94 76 63 54 54 45 33 30 29 28 29 29 30 32 33 35 40 69 50 41 45 70 80 57 57 72 102 72 74 91 119 120 121 135 122 112 118 144 164 146 146 169 185 160 161 166 171 178 185 192 199 209
+ 222 213 204 196 189 180 173 165 158 151 144 137 131 125 118 112 106 99 93 87 82 76 70 67 80 104 121 135 145 152 157 159 160 161 161 160 159 159 157 156 154 152 149 149 148 144 140 132 124 121 122 127 135 137 134 130 128 132 136 130 125 121 121 123 132 145 155 159 161 162 160 157 148 132 127 121 110 92 77 63 54 54 45 35 32 32 31 33 33 34 36 39 44 72 52 45 47 52 66 58 62 83 104 75 78 108 117 96 100 120 145 117 128 160 171 172 176 185 192 191 190 170 174 181 188 195 203 219
+ 225 217 208 200 192 185 176 169 162 155 148 141 135 129 122 116 108 103 96 91 85 79 73 74 99 120 135 147 156 162 165 166 167 165 164 162 160 158 157 155 152 151 151 150 151 149 145 139 131 123 119 119 124 133 136 131 128 130 138 133 127 124 123 126 131 144 156 161 163 164 163 161 155 141 130 126 121 110 94 77 62 54 55 45 36 34 35 35 37 38 39 42 48 75 55 49 52 54 57 60 65 97 102 77 83 113 118 98 104 125 154 124 128 142 149 156 165 183 195 185 184 174 177 184 192 199 207 231
+ 232 223 215 206 199 191 183 176 167 161 154 147 141 134 127 121 114 108 102 96 89 84 77 81 111 129 145 157 166 172 175 175 173 173 170 167 163 158 156 153 151 148 149 150 151 151 150 147 141 132 124 118 118 122 132 135 133 129 136 139 132 128 126 126 132 140 154 162 164 165 166 164 160 154 139 131 127 123 114 98 81 63 54 56 47 39 38 39 39 40 43 45 49 74 70 53 55 58 60 64 70 103 96 80 84 96 127 125 122 142 155 129 127 131 136 142 149 168 193 169 171 175 180 187 194 201 212 234
+ 238 227 219 211 203 195 187 180 172 164 158 151 144 138 131 125 118 112 107 99 92 86 82 101 126 145 160 172 179 182 184 184 183 181 179 177 173 167 161 156 151 147 144 147 150 152 152 150 147 139 131 122 118 118 123 134 141 145 144 143 138 132 129 129 131 140 152 162 166 167 167 168 165 161 152 136 132 128 123 112 97 79 61 56 59 46 42 42 43 43 46 49 52 59 59 56 59 62 64 69 92 106 83 83 88 93 109 132 143 145 135 127 131 134 138 145 151 164 183 170 173 179 185 191 198 206 224 236
+ 245 229 220 212 205 198 190 182 175 167 160 153 147 140 134 127 121 114 107 102 94 88 99 130 150 164 175 182 187 188 189 189 188 186 184 181 179 175 170 165 157 151 145 143 146 149 151 150 149 143 135 125 119 117 121 130 143 154 153 149 142 137 133 133 135 142 154 165 168 169 170 170 168 165 159 142 135 132 127 119 104 89 71 60 60 59 47 46 46 48 49 52 55 57 58 62 64 67 71 96 105 85 84 87 93 99 105 112 120 124 127 132 136 139 143 150 156 163 168 171 177 184 191 197 204 217 236 236
+ 241 238 227 219 211 204 196 189 181 174 166 159 152 147 140 134 127 120 113 106 99 96 116 143 161 173 181 186 191 192 191 192 191 190 187 185 182 180 177 172 168 162 156 147 142 143 147 149 150 148 143 136 127 122 117 122 134 149 156 152 148 142 138 137 136 142 150 162 169 171 172 172 172 171 168 160 143 138 134 126 114 102 89 74 64 64 63 52 50 51 52 56 58 59 62 65 67 71 88 106 93 85 87 91 97 101 107 112 118 123 128 133 138 142 147 152 158 164 169 175 180 186 193 199 207 224 237 235
+ 219 247 232 224 217 208 201 193 185 177 171 164 158 151 145 138 132 125 118 111 104 110 138 159 173 181 186 190 191 194 193 193 192 192 190 187 185 182 178 175 172 168 164 158 149 139 140 145 147 149 146 143 136 127 121 119 128 142 157 155 150 146 142 141 140 143 150 160 169 171 173 173 175 175 174 169 155 143 139 133 120 110 100 87 74 66 68 64 55 54 55 58 61 64 66 68 72 76 86 89 86 88 92 96 100 106 112 116 121 126 131 137 142 146 152 157 162 168 173 179 185 191 197 204 214 234 236 234
+ 197 244 235 228 219 211 203 195 188 181 174 168 161 155 148 141 135 128 120 114 111 137 158 174 183 188 191 192 193 195 195 193 193 191 190 188 184 181 178 175 172 169 166 162 153 143 136 139 145 147 147 145 142 135 126 120 125 140 156 156 151 146 145 143 144 146 152 161 169 173 175 176 179 180 178 174 163 147 143 138 125 115 106 97 85 74 71 73 62 60 61 62 65 69 71 74 76 80 84 88 91 94 97 101 106 112 117 121 127 131 136 141 147 152 157 163 168 173 179 185 192 197 204 212 232 237 235 230
+ 165 227 246 231 224 216 207 201 193 186 179 172 166 159 153 146 139 132 126 120 127 153 168 181 188 193 196 196 196 194 195 195 193 193 190 187 184 181 178 175 172 170 167 164 157 149 138 133 140 145 146 146 146 141 133 125 124 133 154 158 153 149 148 147 148 148 152 159 168 174 176 178 181 183 182 180 172 155 149 145 136 124 116 108 98 86 78 77 77 66 65 67 68 71 75 79 81 84 88 92 95 98 101 106 111 116 120 125 129 135 140 145 150 156 161 167 172 178 184 190 196 202 209 221 236 235 233 231
+ 129 191 241 238 229 222 213 206 199 192 184 177 171 165 158 151 144 137 130 125 141 162 176 186 193 197 199 198 197 196 196 195 194 192 190 187 183 179 176 174 171 170 168 164 158 152 144 134 134 140 143 144 146 144 140 132 128 132 149 161 158 153 150 150 150 152 152 156 165 175 178 181 183 185 186 184 178 166 156 152 146 137 125 117 109 99 89 81 82 82 72 72 73 77 79 82 85 90 92 95 101 103 107 111 116 120 125 130 135 139 144 149 155 159 165 171 176 182 189 195 200 206 215 234 237 235 232 225
+ 85 155 212 246 234 226 219 211 203 197 190 182 175 169 162 156 149 141 136 132 152 169 181 191 198 201 202 201 199 197 196 195 194 192 190 186 183 178 175 172 171 168 167 164 160 153 146 139 132 134 139 141 143 144 142 136 134 134 144 162 162 158 153 148 149 150 150 153 160 170 179 182 185 188 189 187 182 176 164 159 154 147 138 128 118 109 101 91 83 88 87 77 78 81 83 87 90 92 97 101 104 107 111 115 120 125 129 133 139 143 148 153 159 164 169 175 181 187 194 199 204 211 226 237 236 233 230 186
+ 19 94 163 220 244 233 226 218 210 202 197 189 182 175 168 161 155 147 140 137 154 172 184 192 199 203 205 205 203 200 196 194 193 192 190 187 183 179 175 173 170 169 168 167 163 157 151 145 138 129 132 135 137 142 144 140 138 137 140 154 167 165 160 154 152 152 150 148 152 160 176 184 186 190 191 190 188 183 175 167 163 155 148 139 128 119 111 103 94 88 94 93 83 85 87 90 93 96 101 104 108 111 115 119 123 128 132 137 141 146 151 156 162 167 174 178 184 190 196 201 207 215 234 237 235 232 226 162
+ 1 68 139 197 244 238 229 222 214 206 200 193 185 178 172 165 157 150 145 142 166 182 190 197 202 205 207 207 205 201 197 193 192 191 190 185 182 177 174 172 171 169 167 169 167 159 152 148 142 132 127 130 131 139 144 141 139 140 142 153 170 170 166 163 163 162 160 156 159 165 178 187 191 194 194 193 191 187 181 173 166 158 152 143 132 123 114 109 101 92 96 102 93 89 92 95 98 102 106 109 113 117 120 125 129 133 137 142 147 152 156 162 166 173 178 185 191 196 202 207 214 232 238 236 232 228 169 84
+ 1 3 73 143 200 243 237 230 222 215 206 200 193 185 178 171 164 157 150 147 166 184 192 198 203 206 208 208 207 204 199 194 191 190 189 186 183 178 175 172 171 171 172 171 171 167 161 153 148 142 128 121 124 129 140 143 140 140 142 145 164 174 173 169 167 166 166 161 157 160 172 187 192 196 197 196 195 192 189 182 175 166 157 151 143 131 122 115 110 102 96 102 109 103 97 99 102 105 109 113 116 120 124 128 133 136 140 145 150 155 160 165 170 175 181 187 193 199 203 210 220 237 236 235 231 211 138 37
+ 2 2 27 97 162 221 243 234 228 220 212 205 198 191 183 176 168 162 154 152 171 187 195 200 205 207 208 209 209 205 201 195 191 190 188 185 183 180 176 173 171 170 171 170 173 171 167 161 153 148 136 117 117 120 133 142 140 140 144 144 158 176 178 175 172 171 169 165 160 160 169 186 196 200 200 199 197 196 194 189 181 175 166 156 149 139 129 121 117 112 102 104 112 116 105 104 106 109 112 117 120 124 128 132 136 141 145 149 154 159 164 169 174 180 186 193 197 202 208 215 234 238 234 233 224 160 74 4
+ 2 1 1 49 117 180 229 242 233 226 219 210 204 196 188 182 173 166 159 157 177 191 198 203 206 208 209 209 209 208 203 197 191 189 187 184 183 181 178 175 172 172 169 168 171 173 169 163 159 154 145 124 111 114 124 139 140 142 143 142 152 174 182 181 177 174 173 169 164 161 167 185 199 204 204 201 200 199 199 195 188 183 175 164 154 146 137 129 122 118 110 109 114 122 122 111 111 113 117 121 125 129 133 137 141 145 149 154 159 163 167 173 179 185 191 196 201 206 214 229 237 237 233 228 180 103 4 4
+ 1 1 1 17 84 149 207 243 238 230 222 214 207 200 192 185 177 168 162 168 186 196 202 205 208 210 210 210 210 208 205 198 190 186 184 183 182 181 180 178 175 173 166 166 168 172 170 163 158 156 150 131 110 111 119 137 140 141 142 142 152 174 187 186 182 178 175 172 165 162 167 185 203 207 207 203 203 203 202 197 192 187 183 172 158 147 141 133 127 123 117 116 119 127 131 123 118 120 123 127 130 134 137 142 146 151 154 159 164 169 173 179 185 191 196 201 206 213 228 237 236 233 229 189 111 12 3 3
+ 1 1 1 1 34 100 162 218 243 236 229 221 212 204 197 189 181 173 167 176 192 200 205 208 210 212 211 211 210 210 208 205 197 189 184 182 182 182 182 180 178 176 168 168 166 168 171 168 160 153 152 143 120 107 112 134 139 141 142 140 148 169 187 191 188 184 180 176 170 164 166 179 201 209 210 207 205 206 206 202 196 190 188 181 169 153 145 141 135 129 123 123 121 130 138 139 128 125 128 131 135 138 143 146 151 155 159 164 168 173 179 185 191 196 200 206 211 224 237 237 234 230 200 129 37 3 4 3
+ 1 1 1 1 1 37 101 162 215 241 238 229 221 212 203 196 188 180 173 177 194 203 207 211 212 213 213 213 212 211 211 209 206 199 192 185 185 182 182 182 180 179 175 173 169 168 168 171 167 157 149 149 138 113 107 123 138 141 142 140 143 162 182 195 196 192 186 181 177 170 166 171 191 210 212 210 207 208 208 207 201 196 191 190 183 171 154 145 142 138 130 125 127 127 139 146 147 133 132 135 138 141 145 149 153 157 162 167 172 177 182 188 195 199 203 209 217 234 238 235 231 224 166 89 6 4 4 3
+ 1 1 1 1 1 4 68 132 186 230 242 233 226 215 207 199 191 183 177 189 202 208 212 213 215 215 215 215 214 214 212 211 208 204 199 194 188 184 183 182 180 180 175 175 172 169 168 170 170 162 148 144 141 117 109 124 139 143 143 140 146 167 185 198 202 197 193 187 182 174 169 172 191 212 215 211 208 210 212 210 204 200 193 193 190 181 165 150 145 142 133 128 133 133 144 151 154 143 138 140 143 147 151 155 159 163 168 173 178 184 189 195 200 204 210 217 235 238 236 231 221 164 90 5 4 3 3 3
+ 1 2 1 1 1 1 14 79 140 193 235 240 232 222 213 204 196 187 181 193 205 211 215 217 218 219 219 218 217 216 215 213 210 206 203 200 196 191 188 184 183 180 180 178 176 173 170 169 171 169 156 144 141 128 112 120 140 143 143 143 146 165 186 198 206 205 199 194 187 179 172 173 187 213 217 215 211 212 214 215 211 205 198 195 193 190 181 163 149 145 139 133 139 137 146 156 160 159 145 145 147 151 155 159 163 168 173 178 184 189 196 200 204 210 216 233 238 237 232 225 176 106 10 3 3 3 3 3
+
+
--- a/libgui/Makefile.am
+++ b/libgui/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's libgui directory
 #
-# Copyright (C) 2012-2013 John W. Eaton
+# Copyright (C) 2012-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -23,8 +23,9 @@
 MOC_CPPFLAGS =
 
 ## Fix for bug #42839 where -mieee CFLAG option is added to CPPFLAGS by gnulib.
-## Eventually gnulib will be appropriately fixed and this hack removed.
-MOC_OCTAVE_CPPFLAGS = $(filter-out -mieee, $(AM_CPPFLAGS) $(CPPFLAGS))
+## Users may also pass other options in CPPFLAGS that moc does not understand.
+## Only keep moc-compatible options -Idir, -Dmacro, and -Umacro.
+MOC_OCTAVE_CPPFLAGS = $(filter -I% -D% -U%, $(AM_CPPFLAGS) $(CPPFLAGS))
 
 octlib_LTLIBRARIES = liboctgui.la
 
@@ -34,6 +35,8 @@
   languages/en_US.ts \
   languages/es_ES.ts \
   languages/fr_FR.ts \
+  languages/it_IT.ts \
+  languages/ja_JP.ts \
   languages/nl_NL.ts \
   languages/pt_BR.ts \
   languages/pt_PT.ts \
@@ -53,6 +56,7 @@
 noinst_LTLIBRARIES =
 
 include src/module.mk
+include graphics/module.mk
 include qterminal-module.mk
 
 ## liboctgui merely collects a bunch of compiled convenience libraries.
@@ -67,12 +71,13 @@
 liboctgui_la_LIBADD = \
   qterminal/libqterminal.la \
   src/libgui-src.la \
+  graphics/libgui-graphics.la \
   $(top_builddir)/libinterp/liboctinterp.la \
   $(top_builddir)/liboctave/liboctave.la \
   $(LIBOCTGUI_LINK_DEPS)
 
 # Increment these as needed and according to the rules in the libtool manual:
-liboctgui_current = 0
+liboctgui_current = 1
 liboctgui_revision = 0
 liboctgui_age = 0
 
@@ -89,36 +94,43 @@
 octlocale_DATA = $(LOCALES)
 
 default-qt-settings: default-qt-settings.in
-	$(do_subst_qt_settings)
+	$(AM_V_GEN)$(do_subst_qt_settings)
 
 define moc-command
-( echo '#ifdef HAVE_CONFIG_H'; \
-  echo '#include <config.h>'; \
-  echo '#endif'; \
-  $(MOC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MOC_OCTAVE_CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< ) > $@-t
-mv $@-t $@
+  rm -f $@-t $@ && \
+  ( echo "#ifdef HAVE_CONFIG_H"; \
+    echo "#include <config.h>"; \
+    echo "#endif"; \
+    $(MOC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MOC_OCTAVE_CPPFLAGS) $(MOC_CPPFLAGS) $(liboctgui_la_CPPFLAGS) $< ) > $@-t && \
+  mv $@-t $@
 endef
 
 define rcc-command
-( echo '#ifdef HAVE_CONFIG_H'; \
-  echo '#include <config.h>'; \
-  echo '#endif'; \
-  $(RCC) $< ) > $@-t
-mv $@-t $@
+  rm -f $@-t $@ && \
+  ( echo "#ifdef HAVE_CONFIG_H"; \
+    echo "#include <config.h>"; \
+    echo "#endif"; \
+    $(RCC) -name $(@D) $< ) > $@-t && \
+  mv $@-t $@
 endef
 
 moc-%.cc: %.h
-	$(moc-command)
+	$(AM_V_GEN)$(moc-command)
 
 ui-%.h: %.ui
-	$(UIC) -o $@ $<
+	$(AM_V_GEN)$(UIC) -o $@ $<
 
 qrc-%.cc: %.qrc
-	$(rcc-command)
+	$(AM_V_GEN)$(rcc-command)
+
+AM_V_lrelease = $(am__v_lrelease_$(V))
+am__v_lrelease_ = $(am__v_lrelease_$(AM_DEFAULT_VERBOSITY))
+am__v_lrelease_0 = -silent
+am__v_lrelease_1 = 
 
 %.qm: %.ts
-	$(MKDIR_P) languages
-	$(LRELEASE) -qm $@ $<
+	$(AM_V_GEN)$(MKDIR_P) languages && \
+	$(LRELEASE) $(AM_V_lrelease) -qm $@ $<
 
 DISTCLEANFILES = \
   default-qt-settings \
--- a/libgui/default-qt-settings.in
+++ b/libgui/default-qt-settings.in
@@ -2,9 +2,8 @@
 connectOnStartup=true
 showMessageOfTheDay=true
 showTopic=true
+customFileEditor=__default_custom_editor__
 autoIdentification=false
-useCustomFileEditor=false
-customFileEditor=emacs
 useProxyServer=false
 proxyType=
 proxyHostName=none
@@ -550,10 +549,10 @@
 Bash\style2\eolfill=false
 Bash\style2\font=__default_font__, __default_font_size__, 0, 0, 0
 Bash\style2\paper=16777215
-Bash\style3\color=11184640
+Bash\style3\color=43647
 Bash\style3\eolfill=false
 Bash\style3\font=__default_font__, __default_font_size__, 0, 0, 0
-Bash\style3\paper=16711680
+Bash\style0\paper=16777215
 Bash\style4\color=127
 Bash\style4\eolfill=false
 Bash\style4\font=__default_font__, __default_font_size__, 1, 0, 0
@@ -600,3 +599,11 @@
 Bash\defaultpaper=16777215
 Bash\defaultfont=__default_font__, __default_font_size__, 0, 0, 0
 Bash\autoindentstyle=-1
+Text\style0\color=0
+Text\style0\eolfill=false
+Text\style0\font=__default_font__, __default_font_size__, 0, 0, 0
+Text\style0\paper=16777215
+Text\defaultcolor=0
+Text\defaultpaper=16777215
+Text\defaultfont=__default_font__, __default_font_size__, 0, 0, 0
+Text\autoindentstyle=-1
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Backend.cc
@@ -0,0 +1,226 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QApplication>
+#include <QThread>
+
+#include <stdint.h>
+
+#include "Backend.h"
+#include "Logger.h"
+#include "Object.h"
+#include "ObjectFactory.h"
+#include "ObjectProxy.h"
+
+//#if INTPTR_MAX == INT32_MAX
+//# define OCTAVE_PTR_TYPE octave_uint32
+//# define OCTAVE_INTPTR_TYPE uint32_t
+//# define OCTAVE_PTR_SCALAR uint32_scalar_value
+//#else
+# define OCTAVE_PTR_TYPE octave_uint64
+# define OCTAVE_INTPTR_TYPE uint64_t
+# define OCTAVE_PTR_SCALAR uint64_scalar_value
+//#endif
+
+namespace QtHandles
+{
+
+static std::string
+toolkitObjectProperty (const graphics_object& go)
+{
+  if (go.isa ("figure"))
+    return std::string ("__plot_stream__");
+  else if (go.isa ("uicontrol")
+           || go.isa ("uipanel")
+           || go.isa ("uimenu")
+           || go.isa ("uicontextmenu")
+           || go.isa ("uitoolbar")
+           || go.isa ("uipushtool")
+           || go.isa ("uitoggletool"))
+    return std::string ("__object__");
+  else
+    qCritical ("QtHandles::Backend: no __object__ property known for object "
+               "of type %s", go.type ().c_str ());
+
+  return std::string ();
+}
+
+Backend::Backend (void)
+  : QObject (), base_graphics_toolkit ("qt")
+{
+  ObjectFactory* factory = ObjectFactory::instance ();
+
+  connect (this, SIGNAL (createObject (double)),
+           factory, SLOT (createObject (double)));
+}
+
+Backend::~Backend (void)
+{
+}
+
+bool
+Backend::initialize (const graphics_object& go)
+{
+  if (go.isa ("figure")
+      || go.isa ("uicontrol")
+      || go.isa ("uipanel")
+      || go.isa ("uimenu")
+      || go.isa ("uicontextmenu")
+      || go.isa ("uitoolbar")
+      || go.isa ("uipushtool")
+      || go.isa ("uitoggletool"))
+    {
+      Logger::debug ("Backend::initialize %s from thread %08x",
+                     go.type ().c_str (), QThread::currentThreadId ());
+
+      ObjectProxy* proxy = new ObjectProxy ();
+      graphics_object gObj (go);
+
+      OCTAVE_PTR_TYPE tmp (reinterpret_cast <OCTAVE_INTPTR_TYPE> (proxy));
+      gObj.get_properties ().set(toolkitObjectProperty (go), tmp);
+
+      emit createObject (go.get_handle ().value ());
+
+      return true;
+    }
+
+  return false;
+}
+
+void
+Backend::update (const graphics_object& go, int pId)
+{
+  // Rule out obvious properties we want to ignore.
+  if (pId == figure::properties::ID___PLOT_STREAM__
+      || pId == uicontrol::properties::ID___OBJECT__
+      || pId == uipanel::properties::ID___OBJECT__
+      || pId == uimenu::properties::ID___OBJECT__
+      || pId == uicontextmenu::properties::ID___OBJECT__
+      || pId == uitoolbar::properties::ID___OBJECT__
+      || pId == uipushtool::properties::ID___OBJECT__
+      || pId == uitoggletool::properties::ID___OBJECT__
+      || pId == base_properties::ID___MODIFIED__)
+    return;
+
+  Logger::debug ("Backend::update %s(%d) from thread %08x",
+                 go.type ().c_str (), pId, QThread::currentThreadId ());
+
+  ObjectProxy* proxy = toolkitObjectProxy (go);
+
+  if (proxy)
+    {
+      if (go.isa ("uicontrol")
+          && pId == uicontrol::properties::ID_STYLE)
+        {
+          // Special case: we need to recreate the control widget
+          // associated with the octave graphics_object
+
+          finalize (go);
+          initialize (go);
+        }
+      else
+        proxy->update (pId);
+    }
+}
+
+void
+Backend::finalize (const graphics_object& go)
+{
+  Logger::debug ("Backend::finalize %s from thread %08x",
+                 go.type ().c_str (), QThread::currentThreadId ());
+
+  ObjectProxy* proxy = toolkitObjectProxy (go);
+
+  if (proxy)
+    {
+      proxy->finalize ();
+      delete proxy;
+
+      graphics_object gObj (go);
+
+      gObj.get_properties ().set (toolkitObjectProperty (go), Matrix ());
+    }
+}
+
+void
+Backend::redraw_figure (const graphics_object& go) const
+{
+  if (go.get_properties ().is_visible ())
+    {
+      ObjectProxy* proxy = toolkitObjectProxy (go);
+
+      if (proxy)
+        proxy->redraw ();
+    }
+}
+
+void
+Backend::print_figure (const graphics_object& go,
+                            const std::string& term,
+                            const std::string& file_cmd, bool /*mono*/,
+                            const std::string& /*debug_file*/) const
+{
+  if (go.get_properties ().is_visible ())
+    {
+      ObjectProxy* proxy = toolkitObjectProxy (go);
+
+      if (proxy)
+        proxy->print (QString::fromStdString (file_cmd),
+                      QString::fromStdString (term));
+    }
+}
+
+Object*
+Backend::toolkitObject (const graphics_object& go)
+{
+  ObjectProxy* proxy = toolkitObjectProxy (go);
+
+  if (proxy)
+    return proxy->object ();
+
+  return 0;
+}
+
+ObjectProxy*
+Backend::toolkitObjectProxy (const graphics_object& go)
+{
+  if (go)
+    {
+      octave_value ov = go.get (toolkitObjectProperty (go));
+
+      if (ov.is_defined () && ! ov.is_empty ())
+        {
+          OCTAVE_INTPTR_TYPE ptr = ov.OCTAVE_PTR_SCALAR ().value ();
+
+          if (! error_state)
+            return reinterpret_cast<ObjectProxy*> (ptr);
+        }
+    }
+
+  return 0;
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Backend.h
@@ -0,0 +1,72 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Backend__
+#define __QtHandles_Backend__ 1
+
+#include <QObject>
+
+#include "graphics.h"
+
+namespace QtHandles
+{
+
+class Object;
+class ObjectProxy;
+
+class Backend :
+  public QObject,
+  public base_graphics_toolkit
+{
+  Q_OBJECT
+
+public:
+  Backend (void);
+
+  ~Backend (void);
+
+  bool is_valid (void) const { return true; }
+
+  void redraw_figure (const graphics_object& h) const;
+
+  void update (const graphics_object& obj, int pId);
+
+  bool initialize (const graphics_object& obj);
+
+  void finalize (const graphics_object& obj);
+
+  void print_figure (const graphics_object& go,
+                     const std::string& term,
+                     const std::string& file_cmd, bool /*mono*/,
+                     const std::string& /*debug_file*/) const;
+
+  static Object* toolkitObject (const graphics_object& go);
+
+  static ObjectProxy* toolkitObjectProxy (const graphics_object& go);
+
+signals:
+  void createObject (double handle);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/BaseControl.cc
@@ -0,0 +1,249 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMouseEvent>
+#include <QWidget>
+
+#include "BaseControl.h"
+#include "ContextMenu.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static void
+updatePalette (const uicontrol::properties& props, QWidget* w)
+{
+  QPalette p = w->palette ();
+
+  if (props.style_is ("edit")
+      || props.style_is ("listbox")
+      || props.style_is ("popupmenu"))
+    {
+      p.setColor (QPalette::Base,
+                  Utils::fromRgb (props.get_backgroundcolor_rgb ()));
+      p.setColor (QPalette::Text,
+                  Utils::fromRgb (props.get_foregroundcolor_rgb ()));
+    }
+  else if (props.style_is ("pushbutton")
+           || props.style_is ("togglebutton"))
+    {
+      p.setColor (QPalette::Button,
+                  Utils::fromRgb (props.get_backgroundcolor_rgb ()));
+      p.setColor (QPalette::ButtonText,
+                  Utils::fromRgb (props.get_foregroundcolor_rgb ()));
+    }
+  else
+    {
+      p.setColor (QPalette::Window,
+                  Utils::fromRgb (props.get_backgroundcolor_rgb ()));
+      p.setColor (QPalette::WindowText,
+                  Utils::fromRgb (props.get_foregroundcolor_rgb ()));
+    }
+
+  w->setPalette (p);
+}
+
+BaseControl::BaseControl (const graphics_object& go, QWidget* w)
+  : Object (go, w), m_normalizedFont (false), m_keyPressHandlerDefined (false)
+{
+  init (w);
+}
+
+void
+BaseControl::init (QWidget* w, bool callBase)
+{
+  if (callBase)
+    Object::init (w, callBase);
+
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  Matrix bb = up.get_boundingbox (false);
+  w->setGeometry (xround (bb(0)), xround (bb(1)),
+                  xround (bb(2)), xround (bb(3)));
+  w->setFont (Utils::computeFont<uicontrol> (up, bb(3)));
+  updatePalette (up, w);
+  w->setEnabled (up.enable_is ("on"));
+  w->setToolTip (Utils::fromStdString (up.get_tooltipstring ()));
+  w->setVisible (up.is_visible ());
+  m_keyPressHandlerDefined = ! up.get_keypressfcn ().is_empty ();
+
+  w->installEventFilter (this);
+
+  m_normalizedFont = up.fontunits_is ("normalized");
+}
+
+BaseControl::~BaseControl (void)
+{
+}
+
+void
+BaseControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QWidget* w = qWidget<QWidget> ();
+
+   switch (pId)
+    {
+    case uicontrol::properties::ID_POSITION:
+        {
+          Matrix bb = up.get_boundingbox (false);
+          w->setGeometry (xround (bb(0)), xround (bb(1)),
+                          xround (bb(2)), xround (bb(3)));
+        }
+      break;
+
+    case uicontrol::properties::ID_FONTNAME:
+    case uicontrol::properties::ID_FONTSIZE:
+    case uicontrol::properties::ID_FONTWEIGHT:
+    case uicontrol::properties::ID_FONTANGLE:
+      w->setFont (Utils::computeFont<uicontrol> (up));
+      break;
+
+    case uicontrol::properties::ID_FONTUNITS:
+      // FIXME: We shouldn't have to do anything, octave should update
+      //        the "fontsize" property automatically to the new units.
+      //        Hence the actual font used shouldn't change.
+      m_normalizedFont = up.fontunits_is ("normalized");
+      break;
+
+    case uicontrol::properties::ID_BACKGROUNDCOLOR:
+    case uicontrol::properties::ID_FOREGROUNDCOLOR:
+      updatePalette (up, w);
+      break;
+
+    case uicontrol::properties::ID_ENABLE:
+      w->setEnabled (up.enable_is ("on"));
+      break;
+
+    case uicontrol::properties::ID_TOOLTIPSTRING:
+      w->setToolTip (Utils::fromStdString (up.get_tooltipstring ()));
+      break;
+
+    case base_properties::ID_VISIBLE:
+      w->setVisible (up.is_visible ());
+      break;
+
+    case uicontrol::properties::ID_KEYPRESSFCN:
+      m_keyPressHandlerDefined = ! up.get_keypressfcn ().is_empty ();
+      break;
+
+    default:
+      break;
+    }
+}
+
+bool
+BaseControl::eventFilter (QObject* watched, QEvent* xevent)
+{
+  switch (xevent->type ())
+    {
+    case QEvent::Resize:
+      if (m_normalizedFont)
+        {
+          gh_manager::auto_lock lock;
+
+          qWidget<QWidget> ()->setFont (Utils::computeFont<uicontrol>
+                                        (properties<uicontrol> ()));
+        }
+      break;
+
+    case QEvent::MouseButtonPress:
+      {
+        gh_manager::auto_lock lock;
+
+        QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent);
+        graphics_object go = object ();
+        uicontrol::properties& up = Utils::properties<uicontrol> (go);
+        graphics_object fig = go.get_ancestor ("figure");
+
+        if (m->button () != Qt::LeftButton
+            || ! up.enable_is ("on"))
+          {
+            gh_manager::post_set (fig.get_handle (), "selectiontype",
+                                  Utils::figureSelectionType (m), false);
+            gh_manager::post_set (fig.get_handle (), "currentpoint",
+                                  Utils::figureCurrentPoint (fig, m),
+                                  false);
+            gh_manager::post_callback (fig.get_handle (),
+                                       "windowbuttondownfcn");
+            gh_manager::post_callback (m_handle, "buttondownfcn");
+
+            if (m->button () == Qt::RightButton)
+              ContextMenu::executeAt (up, m->globalPos ());
+          }
+        else
+          {
+            if (up.style_is ("listbox"))
+              gh_manager::post_set (fig.get_handle (), "selectiontype",
+                                    Utils::figureSelectionType (m), false);
+            else
+              gh_manager::post_set (fig.get_handle (), "selectiontype",
+                                    octave_value ("normal"), false);
+          }
+      }
+      break;
+
+    case QEvent::MouseMove:
+      if (qWidget<QWidget> ()->hasMouseTracking ())
+        {
+          gh_manager::auto_lock lock;
+
+          QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent);
+          graphics_object go = object ();
+          graphics_object fig = go.get_ancestor ("figure");
+
+          gh_manager::post_set (fig.get_handle (), "currentpoint",
+                                Utils::figureCurrentPoint (fig, m), false);
+          gh_manager::post_callback (fig.get_handle (), "windowbuttonmotionfcn");
+        }
+      break;
+
+    case QEvent::KeyPress:
+      if (m_keyPressHandlerDefined)
+        {
+          gh_manager::auto_lock lock;
+
+          octave_scalar_map keyData =
+            Utils::makeKeyEventStruct (dynamic_cast<QKeyEvent*> (xevent));
+          graphics_object fig = object ().get_ancestor ("figure");
+
+          gh_manager::post_set (fig.get_handle (), "currentcharacter",
+                                keyData.getfield ("Character"), false);
+          gh_manager::post_callback (m_handle, "keypressfcn", keyData);
+        }
+      break;
+
+    default:
+      break;
+    }
+
+  return Object::eventFilter (watched, xevent);
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/BaseControl.h
@@ -0,0 +1,55 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_BaseControl__
+#define __QtHandles_BaseControl__ 1
+
+#include "Object.h"
+
+class QEvent;
+class QObject;
+
+namespace QtHandles
+{
+
+class BaseControl : public Object
+{
+public:
+  BaseControl (const graphics_object& go, QWidget* w);
+  ~BaseControl (void);
+
+  Container* innerContainer (void) { return 0; }
+
+  bool eventFilter (QObject* watched, QEvent* e);
+
+protected:
+  void init (QWidget* w, bool callBase = false);
+  void update (int pId);
+
+private:
+  bool m_normalizedFont;
+  bool m_keyPressHandlerDefined;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ButtonControl.cc
@@ -0,0 +1,129 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAbstractButton>
+
+#include "ButtonControl.h"
+#include "Container.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+ButtonControl::ButtonControl (const graphics_object& go, QAbstractButton* btn)
+  : BaseControl (go, btn), m_blockCallback (false)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  btn->setText (Utils::fromStdString (up.get_string_string ()));
+  if (btn->isCheckable () || up.style_is ("togglebutton"))
+    {
+      btn->setCheckable (true);
+
+      Matrix value = up.get_value ().matrix_value ();
+
+      if (value.numel () > 0 && value(0) == up.get_max ())
+        btn->setChecked (true);
+    }
+
+  connect (btn, SIGNAL (clicked (void)), SLOT (clicked (void)));
+  connect (btn, SIGNAL (toggled (bool)), SLOT (toggled (bool)));
+}
+
+ButtonControl::~ButtonControl (void)
+{
+}
+
+void
+ButtonControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QAbstractButton* btn = qWidget<QAbstractButton> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      btn->setText (Utils::fromStdString (up.get_string_string ()));
+      break;
+
+    case uicontrol::properties::ID_VALUE:
+      m_blockCallback = true;
+      if (btn->isCheckable ())
+        {
+          Matrix value = up.get_value ().matrix_value ();
+
+          if (value.numel () > 0)
+            {
+              double dValue = value(0);
+
+              if (dValue != 0.0 && dValue != 1.0)
+                warning ("button value not within valid display range");
+              else if (dValue == up.get_min () && btn->isChecked ())
+                btn->setChecked (false);
+              else if (dValue == up.get_max () && ! btn->isChecked ())
+                btn->setChecked (true);
+            }
+        }
+      m_blockCallback = false;
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+void
+ButtonControl::toggled (bool checked)
+{
+  QAbstractButton* btn = qWidget<QAbstractButton> ();
+
+  if (! m_blockCallback && btn->isCheckable ())
+    {
+      gh_manager::auto_lock lock;
+
+      uicontrol::properties& up = properties<uicontrol> ();
+
+      Matrix oldValue = up.get_value ().matrix_value ();
+      double newValue = (checked ? up.get_max () : up.get_min ());
+
+      if (oldValue.numel() != 1
+          || (newValue != oldValue(0)))
+        gh_manager::post_set (m_handle, "value", newValue, false);
+      gh_manager::post_callback (m_handle, "callback");
+    }
+}
+
+void
+ButtonControl::clicked (void)
+{
+  QAbstractButton* btn = qWidget<QAbstractButton> ();
+
+  if (! btn->isCheckable ())
+    gh_manager::post_callback (m_handle, "callback");
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ButtonControl.h
@@ -0,0 +1,54 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ButtonControl__
+#define __QtHandles_ButtonControl__ 1
+
+#include "BaseControl.h"
+
+class QAbstractButton;
+
+namespace QtHandles
+{
+
+class ButtonControl : public BaseControl
+{
+  Q_OBJECT
+
+public:
+  ButtonControl (const graphics_object& go, QAbstractButton* btn);
+  ~ButtonControl (void);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void clicked (void);
+  void toggled (bool checked);
+
+private:
+  bool m_blockCallback;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Canvas.cc
@@ -0,0 +1,978 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QApplication>
+#include <QBitmap>
+#include <QCursor>
+#include <QInputDialog>
+#include <QList>
+#include <QMouseEvent>
+#include <QWheelEvent>
+#include <QRectF>
+
+#include "Backend.h"
+#include "Canvas.h"
+#include "ContextMenu.h"
+#include "GLCanvas.h"
+#include "QtHandlesUtils.h"
+
+#include "annotation-dialog.h"
+
+#include "gl2ps-renderer.h"
+#include "octave-qt-link.h"
+
+#include "builtin-defun-decls.h"
+
+namespace QtHandles
+{
+
+void
+Canvas::redraw (bool sync)
+{
+  QWidget *w = qWidget ();
+
+  if (w)
+    {
+      if (sync)
+        w->repaint ();
+      else
+        w->update ();
+    }
+}
+
+void
+Canvas::blockRedraw (bool block)
+{
+  m_redrawBlocked = block;
+}
+
+void
+Canvas::setCursor (MouseMode mode)
+{
+  QWidget *w = qWidget ();
+
+  if (w)
+    {
+      static QCursor origCursor = w->cursor ();
+
+      switch (mode)
+        {
+        case PanMode:
+        case RotateMode:
+          w->setCursor (Qt::OpenHandCursor);
+          break;
+
+        case ZoomInMode:
+          w->setCursor (QPixmap (":/images/zoom-in.png"));
+          break;
+
+        case ZoomOutMode:
+          w->setCursor (QPixmap (":/images/zoom-out.png"));
+          break;
+
+        default:
+          w->setCursor (origCursor);
+          break;
+        }
+    }
+}
+
+void
+Canvas::print (const QString& file_cmd, const QString& term)
+{
+  gh_manager::auto_lock lock;
+  graphics_object obj = gh_manager::get_object (m_handle);
+
+  if (obj.valid_object ())
+    {
+      graphics_object figObj (obj.get_ancestor ("figure"));
+
+      gl2ps_print (figObj, file_cmd.toStdString (), term.toStdString ());
+    }
+}
+
+/*
+   Two updateCurrentPoint() routines are required:
+   1) Used for QMouseEvents where cursor position data is in callback from Qt.
+   2) Used for QKeyEvents where cursor position must be determined.
+*/
+void
+Canvas::updateCurrentPoint(const graphics_object& fig,
+                           const graphics_object& obj, QMouseEvent* event)
+{
+  gh_manager::auto_lock lock;
+
+  gh_manager::post_set (fig.get_handle (), "currentpoint",
+                        Utils::figureCurrentPoint (fig, event), false);
+
+  Matrix children = obj.get_properties ().get_children ();
+  octave_idx_type num_children = children.numel ();
+
+  for (int i = 0; i < num_children; i++)
+    {
+      graphics_object childObj (gh_manager::get_object (children(i)));
+
+      if (childObj.isa ("axes"))
+        {
+          axes::properties& ap = Utils::properties<axes> (childObj);
+          Matrix x_zlim = ap.get_transform_zlim ();
+          graphics_xform x_form = ap.get_transform ();
+
+          ColumnVector p1 = x_form.untransform (event->x (), event->y (),
+                                                x_zlim(0));
+          ColumnVector p2 = x_form.untransform (event->x (), event->y (),
+                                                x_zlim(1));
+
+          Matrix cp (2, 3, 0.0);
+
+          cp(0,0) = p1(0); cp(0,1) = p1(1); cp(0,2) = p1(2);
+          cp(1,0) = p2(0); cp(1,1) = p2(1); cp(1,2) = p2(2);
+
+          gh_manager::post_set (childObj.get_handle (), "currentpoint", cp,
+                                false);
+        }
+    }
+}
+
+void
+Canvas::updateCurrentPoint(const graphics_object& fig,
+                           const graphics_object& obj)
+{
+  gh_manager::auto_lock lock;
+
+  gh_manager::post_set (fig.get_handle (), "currentpoint",
+                        Utils::figureCurrentPoint (fig), false);
+
+  Matrix children = obj.get_properties ().get_children ();
+  octave_idx_type num_children = children.numel ();
+
+  for (int i = 0; i < num_children; i++)
+    {
+      graphics_object childObj (gh_manager::get_object (children(i)));
+
+      if (childObj.isa ("axes"))
+        {
+          // FIXME: QCursor::pos() may give inaccurate results with asynchronous
+          //        window systems like X11 over ssh.
+          QWidget *w = qWidget ();
+          QPoint p = w->mapFromGlobal (QCursor::pos ());
+          axes::properties& ap = Utils::properties<axes> (childObj);
+          Matrix x_zlim = ap.get_transform_zlim ();
+          graphics_xform x_form = ap.get_transform ();
+
+          ColumnVector p1 = x_form.untransform (p.x (), p.y (), x_zlim(0));
+          ColumnVector p2 = x_form.untransform (p.x (), p.y (), x_zlim(1));
+
+          Matrix cp (2, 3, 0.0);
+
+          cp(0,0) = p1(0); cp(0,1) = p1(1); cp(0,2) = p1(2);
+          cp(1,0) = p2(0); cp(1,1) = p2(1); cp(1,2) = p2(2);
+
+          gh_manager::post_set (childObj.get_handle (), "currentpoint", cp,
+                                false);
+        }
+    }
+}
+
+void
+Canvas::annotation_callback (const octave_value_list& args)
+{
+  Ffeval (ovl ("annotation").append (args));
+
+  redraw ();
+}
+  
+void
+Canvas::canvasToggleAxes (const graphics_handle& handle)
+{
+  gh_manager::auto_lock lock;
+
+  graphics_object go = gh_manager::get_object (handle);
+
+  if (go.valid_object ())
+    {
+      figure::properties& fp = Utils::properties<figure> (go);
+
+      graphics_handle ah = fp.get_currentaxes ();
+
+      graphics_object ax = gh_manager::get_object (ah);
+
+      if (ax.valid_object ())
+        {
+          axes::properties& ap = Utils::properties<axes> (ax);
+
+          if (ap.handlevisibility_is ("on"))
+            {
+              ap.set_visible (! ap.is_visible ());
+
+              redraw (true);
+            }
+        }
+    }
+}
+
+void
+Canvas::canvasToggleGrid (const graphics_handle& handle)
+{
+  gh_manager::auto_lock lock;
+
+  graphics_object go = gh_manager::get_object (handle);
+
+  if (go.valid_object ())
+    {
+      figure::properties& fp = Utils::properties<figure> (go);
+
+      graphics_handle ah = fp.get_currentaxes ();
+
+      graphics_object ax = gh_manager::get_object (ah);
+
+      if (ax.valid_object ())
+        {
+          axes::properties& ap = Utils::properties<axes> (ax);
+
+          if (ap.handlevisibility_is ("on") && ap.is_visible ())
+            {
+              std::string tmp;
+
+              // If any grid is off, then turn them all on.  If they are all
+              // on, then turn them off.
+
+              std::string state = ((ap.get_xgrid () == "off"
+                                    || ap.get_ygrid () == "off"
+                                    || ap.get_zgrid () == "off")
+                                   ? "on" : "off");
+
+              ap.set_xgrid (state);
+              ap.set_ygrid (state);
+              ap.set_zgrid (state);
+
+              redraw (true);
+            }
+        }
+    }
+}
+
+static void
+autoscale_axes (axes::properties& ap)
+{
+  ap.clear_zoom_stack ();
+
+  ap.set_xlimmode ("auto");
+  ap.set_ylimmode ("auto");
+  ap.set_zlimmode ("auto");
+}
+
+void
+Canvas::canvasAutoAxes (const graphics_handle& handle)
+{
+  gh_manager::auto_lock lock;
+
+  graphics_object go = gh_manager::get_object (handle);
+
+  if (go.valid_object ())
+    {
+      figure::properties& fp = Utils::properties<figure> (go);
+
+      graphics_handle ah = fp.get_currentaxes ();
+
+      graphics_object ax = gh_manager::get_object (ah);
+
+      if (ax.valid_object ())
+        {
+          axes::properties& ap = Utils::properties<axes> (ax);
+
+          if (ap.handlevisibility_is ("on") && ap.is_visible ())
+            {
+              autoscale_axes (ap);
+
+              redraw (true);
+            }
+        }
+    }
+}
+
+void
+Canvas::canvasPaintEvent (void)
+{
+  if (! m_redrawBlocked)
+    {
+      gh_manager::auto_lock lock;
+
+      draw (m_handle);
+
+      if ((m_mouseMode == ZoomInMode && m_mouseAxes.ok ()) || m_rectMode)
+        drawZoomBox (m_mouseAnchor, m_mouseCurrent);
+    }
+}
+
+static bool
+pan_enabled (const graphics_object figObj)
+{
+  // Getting pan mode property:
+  octave_value ov_pm
+    = Utils::properties<figure> (figObj).get___pan_mode__ ();
+
+  octave_scalar_map pm = ov_pm.scalar_map_value ();
+
+  return pm.contents ("Enable").string_value () == "on";
+}
+
+static std::string
+pan_mode (const graphics_object figObj)
+{
+  // Getting pan mode property:
+  octave_value ov_pm
+    = Utils::properties<figure> (figObj).get___pan_mode__ ();
+
+  octave_scalar_map pm = ov_pm.scalar_map_value ();
+
+  return pm.contents ("Motion").string_value ();
+}
+
+static bool
+rotate_enabled (const graphics_object figObj)
+{
+  // Getting rotate mode property:
+  octave_value ov_rm
+    = Utils::properties<figure> (figObj).get___rotate_mode__ ();
+
+  octave_scalar_map rm = ov_rm.scalar_map_value ();
+
+  return rm.contents ("Enable").string_value () == "on";
+}
+
+static bool
+zoom_enabled (const graphics_object figObj)
+{
+  // Getting zoom mode property:
+  octave_value ov_zm
+    = Utils::properties<figure> (figObj).get___zoom_mode__ ();
+
+  octave_scalar_map zm = ov_zm.scalar_map_value ();
+
+  return zm.contents ("Enable").string_value () == "on";
+}
+
+static std::string
+zoom_mode (const graphics_object figObj)
+{
+  // Getting zoom mode property:
+  octave_value ov_zm
+    = Utils::properties<figure> (figObj).get___zoom_mode__ ();
+
+  octave_scalar_map zm = ov_zm.scalar_map_value ();
+
+  return zm.contents ("Motion").string_value ();
+}
+
+static std::string
+zoom_direction (const graphics_object figObj)
+{
+  // Getting zoom mode property:
+  octave_value ov_zm
+    = Utils::properties<figure> (figObj).get___zoom_mode__ ();
+
+  octave_scalar_map zm = ov_zm.scalar_map_value ();
+
+  return zm.contents ("Direction").string_value ();
+}
+
+void
+Canvas::canvasMouseMoveEvent (QMouseEvent* event)
+{
+  gh_manager::auto_lock lock;
+  graphics_object ax = gh_manager::get_object (m_mouseAxes);
+
+  if (m_mouseMode != NoMode && ax.valid_object ())
+    {
+      axes::properties& ap = Utils::properties<axes> (ax);
+
+      switch (m_mouseMode)
+        {
+        case RotateMode:
+          {
+            ap.rotate3d (m_mouseCurrent.x (), event->x (),
+                         m_mouseCurrent.y (), event->y ());
+
+            // Update current mouse position
+            m_mouseCurrent = event->pos ();
+
+            // Force immediate redraw
+            redraw (true);
+          }
+          break;
+        case TextMode:
+        case ZoomInMode:
+        case ZoomOutMode:
+          m_mouseCurrent = event->pos ();
+          redraw (true);
+          break;
+
+        case PanMode:
+          {
+            graphics_object figObj (ax.get_ancestor ("figure"));
+
+            std::string mode = pan_mode (figObj);
+
+            ColumnVector p0 = ap.pixel2coord (m_mouseCurrent.x (),
+                                              m_mouseCurrent.y ());
+            ColumnVector p1 = ap.pixel2coord (event->x (),
+                                              event->y ());
+
+            ap.translate_view (mode, p0(0), p1(0), p0(1), p1(1));
+
+            // Update current mouse position
+            m_mouseCurrent = event->pos ();
+
+            // Force immediate redraw
+            redraw (true);
+          }
+
+        default:
+          break;
+        }
+    }
+  else if (m_mouseMode == NoMode)
+    {
+      graphics_object obj = gh_manager::get_object (m_handle);
+
+      if (obj.valid_object ())
+        {
+          graphics_object figObj (obj.get_ancestor ("figure"));
+
+          updateCurrentPoint (figObj, obj, event);
+          gh_manager::post_callback (figObj.get_handle (),
+                                     "windowbuttonmotionfcn");
+        }
+    }
+}
+
+void
+Canvas::canvasMouseDoubleClickEvent (QMouseEvent* event)
+{
+  // same processing as normal click, but event type is MouseButtonDblClick
+  canvasMousePressEvent (event);
+}
+
+static double
+button_number (QMouseEvent *event)
+{
+  double retval = 0;
+
+  switch (event->button ())
+    {
+    case Qt::LeftButton:
+      retval = 1;
+      break;
+
+    case Qt::MidButton:
+      retval = 2;
+      break;
+
+    case Qt::RightButton:
+      retval = 3;
+      break;
+
+    default:
+      break;
+    }
+
+  return retval;
+}
+
+void
+Canvas::canvasMousePressEvent (QMouseEvent* event)
+{
+  gh_manager::auto_lock lock;
+  graphics_object obj = gh_manager::get_object (m_handle);
+
+  bool isdblclick = (event->type () == QEvent::MouseButtonDblClick);
+
+  if (obj.valid_object ())
+    {
+      graphics_object figObj (obj.get_ancestor ("figure"));
+      graphics_object currentObj, axesObj;
+      QList<graphics_object> axesList;
+
+      Matrix children = obj.get_properties ().get_all_children ();
+      octave_idx_type num_children = children.numel ();
+
+      for (int i = 0; i < num_children; i++)
+        {
+          graphics_object childObj (gh_manager::get_object (children(i)));
+
+          if (childObj.isa ("axes"))
+            axesList.append (childObj);
+          else if (childObj.isa ("uicontrol") || childObj.isa ("uipanel"))
+            {
+              Matrix bb = childObj.get_properties ().get_boundingbox (false);
+              QRectF r (bb(0), bb(1), bb(2), bb(3));
+
+              r.adjust (-5, -5, 5, 5);
+              if (r.contains (event->posF ()))
+                {
+                  currentObj = childObj;
+                  break;
+                }
+            }
+        }
+
+      if (! currentObj)
+        {
+          for (QList<graphics_object>::ConstIterator it = axesList.begin ();
+               it != axesList.end (); ++it)
+            {
+              graphics_object go = selectFromAxes (*it, event->pos ());
+
+              if (go)
+                {
+                  currentObj = go;
+                  axesObj = *it;
+                }
+              // FIXME: is this really necessary? the axes object should
+              //        have been selected through selectFromAxes anyway
+              else if (it->get_properties ().is_hittest ())
+                {
+                  Matrix bb = it->get_properties ().get_boundingbox (true);
+                  QRectF r (bb(0), bb(1), bb(2), bb(3));
+
+                  if (r.contains (event->posF ()))
+                    axesObj = *it;
+                }
+
+              if (axesObj && currentObj)
+                break;
+            }
+
+          if (axesObj)
+            {
+              if (axesObj.get_properties ().handlevisibility_is ("on"))
+                Utils::properties<figure> (figObj)
+                  .set_currentaxes (axesObj.get_handle ().as_octave_value ());
+              if (! currentObj)
+                currentObj = axesObj;
+            }
+        }
+
+      if (! currentObj)
+        currentObj = obj;
+
+      if (currentObj.get_properties ().handlevisibility_is ("on"))
+        Utils::properties<figure> (figObj)
+          .set_currentobject (currentObj.get_handle ().as_octave_value ());
+      else
+        Utils::properties<figure> (figObj).set_currentobject (octave_NaN);
+
+      Figure* fig = dynamic_cast<Figure*> (Backend::toolkitObject (figObj));
+
+      MouseMode newMouseMode = NoMode;
+
+      if (fig)
+        newMouseMode = fig->mouseMode ();
+
+      switch (newMouseMode)
+        {
+        case NoMode:
+          gh_manager::post_set (figObj.get_handle (), "selectiontype",
+                                Utils::figureSelectionType (event, isdblclick), false);
+
+          updateCurrentPoint (figObj, obj, event);
+
+          gh_manager::post_callback (figObj.get_handle (),
+                                     "windowbuttondownfcn",
+                                     button_number (event));
+
+          gh_manager::post_callback (currentObj.get_handle (),
+                                     "buttondownfcn",
+                                     button_number (event));
+
+          if (event->button () == Qt::RightButton)
+            ContextMenu::executeAt (currentObj.get_properties (),
+                                    event->globalPos ());
+          break;
+
+        case TextMode:
+          {
+            if (event->modifiers () == Qt::NoModifier)
+              {
+                switch (event->buttons ())
+                  {
+                  case Qt::LeftButton:
+                    m_mouseAnchor = m_mouseCurrent = event->pos ();
+                    m_mouseAxes = axesObj.get_handle ();
+                    m_mouseMode = newMouseMode;
+                    m_rectMode = true;
+                  }
+              }
+            redraw (false);
+          }
+          break;
+
+        case PanMode:
+        case RotateMode:
+        case ZoomInMode:
+        case ZoomOutMode:
+          if (axesObj && axesObj.get_properties ().handlevisibility_is ("on"))
+            {
+              bool redraw_figure = true;
+
+              if (isdblclick)
+                {
+                  if (event->button () == Qt::LeftButton)
+                    {
+                      axes::properties& ap = Utils::properties<axes> (axesObj);
+
+                      autoscale_axes (ap);
+                    }
+                  else
+                    {
+                      redraw_figure = false;
+                    }
+                }
+              else if (event->modifiers () == Qt::NoModifier)
+                {
+                  switch (event->buttons ())
+                    {
+                    case Qt::LeftButton:
+                      m_mouseAnchor = m_mouseCurrent = event->pos ();
+                      m_mouseAxes = axesObj.get_handle ();
+                      m_mouseMode = newMouseMode;
+                      m_clickMode = newMouseMode == ZoomInMode;
+                      break;
+
+                    case Qt::RightButton:
+                      if (newMouseMode == ZoomInMode)
+                        {
+                          m_mouseAnchor = m_mouseCurrent = event->pos ();
+                          m_mouseAxes = axesObj.get_handle ();
+                          m_mouseMode = newMouseMode;
+                          m_clickMode = false;
+                        }
+
+                      break;
+
+                    case Qt::MidButton:
+                        {
+                          axes::properties& ap =
+                            Utils::properties<axes> (axesObj);
+
+                          autoscale_axes (ap);
+                        }
+                      break;
+
+                    default:
+                      redraw_figure = false;
+                      break;
+                    }
+                }
+              else if (event->modifiers () == Qt::ShiftModifier)
+                {
+                  switch (event->buttons ())
+                    {
+                    case Qt::LeftButton:
+                      if (newMouseMode == ZoomInMode)
+                        {
+                          m_mouseAnchor = m_mouseCurrent = event->pos ();
+                          m_mouseAxes = axesObj.get_handle ();
+                          m_mouseMode = newMouseMode;
+                          m_clickMode = false;
+                        }
+                      break;
+
+                    default:
+                      redraw_figure = false;
+                      break;
+                    }
+                }
+
+              if (redraw_figure)
+                redraw (false);
+            }
+          break;
+
+        default:
+          break;
+        }
+    }
+
+}
+
+void
+Canvas::canvasMouseReleaseEvent (QMouseEvent* event)
+{
+  if ((m_mouseMode == ZoomInMode || m_mouseMode == ZoomOutMode)
+      && m_mouseAxes.ok ())
+    {
+      gh_manager::auto_lock lock;
+      graphics_object ax = gh_manager::get_object (m_mouseAxes);
+
+      if (ax.valid_object ())
+        {
+          axes::properties& ap = Utils::properties<axes> (ax);
+
+          graphics_object obj = gh_manager::get_object (m_handle);
+
+          graphics_object figObj (obj.get_ancestor ("figure"));
+
+          std::string zm = zoom_mode (figObj);
+
+          if (m_mouseAnchor == event->pos ())
+            {
+              double factor = m_clickMode ? 2.0 : 0.5;
+
+              ColumnVector p1 = ap.pixel2coord (event->x (), event->y ());
+
+              ap.zoom_about_point (zm, p1(0), p1(1), factor);
+            }
+          else if (m_mouseMode == ZoomInMode)
+            {
+              ColumnVector p0 = ap.pixel2coord (m_mouseAnchor.x (),
+                                                m_mouseAnchor.y ());
+              ColumnVector p1 = ap.pixel2coord (event->x (),
+                                                event->y ());
+
+              Matrix xl (1, 2, 0.0);
+              Matrix yl (1, 2, 0.0);
+
+              xl(0) = std::min (p0(0), p1(0));
+              xl(1) = std::max (p0(0), p1(0));
+              yl(0) = std::min (p0(1), p1(1));
+              yl(1) = std::max (p0(1), p1(1));
+
+              ap.zoom (zm, xl, yl);
+            }
+
+          redraw (false);
+        }
+    }
+  else if (m_mouseMode == NoMode)
+    {
+      gh_manager::auto_lock lock;
+      graphics_object obj = gh_manager::get_object (m_handle);
+
+      if (obj.valid_object ())
+        {
+          graphics_object figObj (obj.get_ancestor ("figure"));
+
+          updateCurrentPoint (figObj, obj, event);
+          gh_manager::post_callback (figObj.get_handle (),
+                                     "windowbuttonupfcn");
+        }
+    }
+  else if (m_mouseMode == TextMode)
+    {
+      gh_manager::auto_lock lock;
+      
+      graphics_object figObj = 
+        gh_manager::get_object (m_handle).get_ancestor ("figure");
+      if (figObj.valid_object ())
+        {          
+          QWidget *w = qWidget ();
+          if (w)
+            {
+              Matrix bb = figObj.get ("position").matrix_value ();
+              bb(0) = m_mouseAnchor.x () / bb(2);
+              bb(1) = 1.0 - (m_mouseAnchor.y () / bb(3));
+              bb(2) = (event->x () - m_mouseAnchor.x ()) / bb(2);
+              bb(3) = (m_mouseAnchor.y () - event->y ()) / bb(3);
+
+              octave_value_list props = ovl("textbox", bb);
+
+              annotation_dialog anno_dlg (w, props);
+            
+              if (anno_dlg.exec () == QDialog::Accepted)
+                {
+                  props = anno_dlg.get_properties ();
+
+                  octave_link::post_event (this, &Canvas::annotation_callback,
+                                           props);
+                }
+            }
+        }
+    }
+  m_rectMode = false;
+  m_mouseAxes = graphics_handle ();
+  m_mouseMode = NoMode;
+}
+
+void
+Canvas::canvasWheelEvent (QWheelEvent* event)
+{
+  gh_manager::auto_lock lock;
+  graphics_object obj = gh_manager::get_object (m_handle);
+
+  if (obj.valid_object ())
+    {
+      std::string mode;
+
+      graphics_object axesObj;
+
+      Matrix children = obj.get_properties ().get_children ();
+      octave_idx_type num_children = children.numel ();
+
+      for (int i = 0; i < num_children; i++)
+        {
+          graphics_object childObj (gh_manager::get_object (children(i)));
+
+          if (childObj.isa ("axes"))
+            {
+              graphics_object go = selectFromAxes (childObj, event->pos ());
+
+              if (go)
+                {
+                  axesObj = childObj;
+                  break;
+                }
+            }
+        }
+
+      if (axesObj)
+        {
+          MouseMode newMouseMode = NoMode;
+
+          graphics_object figObj (obj.get_ancestor ("figure"));
+
+          Figure* fig = dynamic_cast<Figure*> (Backend::toolkitObject (figObj));
+
+          if (fig)
+            newMouseMode = fig->mouseMode ();
+
+          if (axesObj.get_properties ().handlevisibility_is ("on"))
+            {
+              Utils::properties<figure> (figObj)
+                .set_currentaxes (axesObj.get_handle ().as_octave_value ());
+
+              if (zoom_enabled (figObj))
+                {
+                  if (event->delta () > 0)
+                    newMouseMode = ZoomInMode;
+                  else
+                    newMouseMode = ZoomOutMode;
+
+                  mode = zoom_mode (figObj);
+                }
+              else if (pan_enabled (figObj))
+                {
+                  newMouseMode = PanMode;
+
+                  mode = pan_mode (figObj);
+                }
+            }
+
+          bool redrawFigure = true;
+
+          switch (newMouseMode)
+            {
+            case ZoomInMode:
+            case ZoomOutMode:
+              {
+                axes::properties& ap = Utils::properties<axes> (axesObj);
+
+                // Control how fast to zoom when using scroll wheel.
+                double wheel_zoom_speed = ap.get_mousewheelzoom ();
+
+                // Determine if we're zooming in or out.
+                double factor = (newMouseMode == ZoomInMode
+                                 ? 1 / (1.0 - wheel_zoom_speed)
+                                 : 1.0 - wheel_zoom_speed);
+
+                // FIXME: should we zoom about point for 2D plots?
+
+                ap.zoom (mode, factor);
+              }
+              break;
+
+            case PanMode:
+              {
+                axes::properties& ap = Utils::properties<axes> (axesObj);
+
+                double factor = event->delta () > 0 ? 0.1 : -0.1;
+
+                ap.pan (mode, factor);
+              }
+              break;
+
+            default:
+              redrawFigure = false;
+              break;
+            }
+
+          if (redrawFigure)
+            redraw (false);
+        }
+    }
+}
+
+bool
+Canvas::canvasKeyPressEvent (QKeyEvent* event)
+{
+  if (m_eventMask & KeyPress)
+    {
+      gh_manager::auto_lock lock;
+      graphics_object obj = gh_manager::get_object (m_handle);
+
+      if (obj.valid_object ())
+        {
+          graphics_object figObj (obj.get_ancestor ("figure"));
+
+          updateCurrentPoint (figObj, obj);
+        }
+
+      octave_scalar_map eventData = Utils::makeKeyEventStruct (event);
+
+      gh_manager::post_set (m_handle, "currentcharacter",
+                            eventData.getfield ("Character"), false);
+      gh_manager::post_callback (m_handle, "keypressfcn", eventData);
+
+      return true;
+    }
+
+  return false;
+}
+
+bool
+Canvas::canvasKeyReleaseEvent (QKeyEvent* event)
+{
+  if (! event->isAutoRepeat () && (m_eventMask & KeyRelease))
+    {
+      gh_manager::post_callback (m_handle, "keyreleasefcn",
+                                 Utils::makeKeyEventStruct (event));
+
+      return true;
+    }
+
+  return false;
+}
+
+Canvas*
+Canvas::create (const std::string& /* name */, QWidget* parent,
+                const graphics_handle& handle)
+{
+  // Only OpenGL
+  return new GLCanvas (parent, handle);
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Canvas.h
@@ -0,0 +1,124 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Canvas__
+#define __QtHandles_Canvas__ 1
+
+#include <QPoint>
+
+#include "graphics.h"
+
+#include "Figure.h"
+
+class QKeyEvent;
+class QMouseEvent;
+class QWheelEvent;
+class QWidget;
+
+class octave_value_list;
+
+namespace QtHandles
+{
+
+class Canvas
+{
+public:
+  enum EventMask
+    {
+      KeyPress   = 0x01,
+      KeyRelease = 0x02
+    };
+
+public:
+  virtual ~Canvas (void) { }
+
+  void redraw (bool sync = false);
+  void blockRedraw (bool block = true);
+
+  void print (const QString& file_cmd, const QString& term);
+
+  void addEventMask (int m) { m_eventMask |= m; }
+  void clearEventMask (int m) { m_eventMask &= (~m); }
+  void setEventMask (int m) { m_eventMask = m; }
+
+  void setCursor (MouseMode mode);
+
+  virtual QWidget* qWidget (void) = 0;
+
+  static Canvas* create (const std::string& name, QWidget* parent,
+                         const graphics_handle& handle);
+
+  virtual void toggleAxes (const graphics_handle& handle) = 0;
+  virtual void toggleGrid (const graphics_handle& handle) = 0;
+  virtual void autoAxes (const graphics_handle& handle) = 0;
+
+protected:
+  virtual void draw (const graphics_handle& handle) = 0;
+  virtual void drawZoomBox (const QPoint& p1, const QPoint& p2) = 0;
+  virtual void resize (int x, int y, int width, int height) = 0;
+  virtual graphics_object selectFromAxes (const graphics_object& ax,
+                                          const QPoint& pt) = 0;
+
+protected:
+  Canvas (const graphics_handle& handle)
+    : m_handle (handle),
+      m_redrawBlocked (false),
+      m_mouseMode (NoMode),
+      m_clickMode (false),
+      m_eventMask (0),
+      m_rectMode (false)
+    { }
+
+  void canvasToggleAxes (const graphics_handle& handle);
+  void canvasToggleGrid (const graphics_handle& handle);
+  void canvasAutoAxes (const graphics_handle& handle);
+  void canvasPaintEvent (void);
+  void canvasMouseDoubleClickEvent (QMouseEvent* event);
+  void canvasMouseMoveEvent (QMouseEvent* event);
+  void canvasMousePressEvent (QMouseEvent* event);
+  void canvasMouseReleaseEvent (QMouseEvent* event);
+  void canvasWheelEvent (QWheelEvent* event);
+  bool canvasKeyPressEvent (QKeyEvent* event);
+  bool canvasKeyReleaseEvent (QKeyEvent* event);
+
+  void updateCurrentPoint (const graphics_object& fig,
+                           const graphics_object& obj, QMouseEvent *event);
+  void updateCurrentPoint (const graphics_object& fig,
+                           const graphics_object& obj);
+
+  void annotation_callback (const octave_value_list& args);
+
+private:
+  graphics_handle m_handle;
+  bool m_redrawBlocked;
+  MouseMode m_mouseMode;
+  bool m_clickMode;              // True: ZoomIn, False: ZoomOut
+  QPoint m_mouseAnchor;
+  QPoint m_mouseCurrent;
+  graphics_handle m_mouseAxes;
+  int m_eventMask;
+  bool m_rectMode;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/CheckBoxControl.cc
@@ -0,0 +1,61 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QCheckBox>
+
+#include "CheckBoxControl.h"
+#include "Container.h"
+
+namespace QtHandles
+{
+
+CheckBoxControl*
+CheckBoxControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new CheckBoxControl (go, new QCheckBox (container));
+    }
+
+  return 0;
+}
+
+CheckBoxControl::CheckBoxControl (const graphics_object& go, QCheckBox* box)
+    : ButtonControl (go, box)
+{
+  box->setAutoFillBackground (true);
+}
+
+CheckBoxControl::~CheckBoxControl (void)
+{
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/CheckBoxControl.h
@@ -0,0 +1,44 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_CheckBoxControl__
+#define __QtHandles_CheckBoxControl__ 1
+
+#include "ButtonControl.h"
+
+class QCheckBox;
+
+namespace QtHandles
+{
+
+class CheckBoxControl : public ButtonControl
+{
+public:
+  CheckBoxControl (const graphics_object& go, QCheckBox* box);
+  ~CheckBoxControl (void);
+
+  static CheckBoxControl* create (const graphics_object& go);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Container.cc
@@ -0,0 +1,109 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QChildEvent>
+#include <QVBoxLayout>
+
+#include "graphics.h"
+
+#include "Canvas.h"
+#include "Container.h"
+#include "Object.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+Container::Container (QWidget* xparent)
+  : ContainerBase (xparent), m_canvas (0)
+{
+  setFocusPolicy (Qt::ClickFocus);
+}
+
+Container::~Container (void)
+{
+}
+
+Canvas*
+Container::canvas (const graphics_handle& gh, bool xcreate)
+{
+  if (! m_canvas && xcreate)
+    {
+      gh_manager::auto_lock lock;
+      graphics_object go = gh_manager::get_object (gh);
+
+      if (go)
+        {
+          graphics_object fig = go.get_ancestor ("figure");
+
+          m_canvas = Canvas::create (fig.get("renderer").string_value (),
+                                     this, gh);
+
+          QWidget* canvasWidget = m_canvas->qWidget ();
+
+          canvasWidget->lower ();
+          canvasWidget->show ();
+          canvasWidget->setGeometry (0, 0, width (), height ());
+        }
+    }
+
+  return m_canvas;
+}
+
+void
+Container::resizeEvent (QResizeEvent* /* event */)
+{
+  if (m_canvas)
+    m_canvas->qWidget ()->setGeometry (0, 0, width (), height ());
+
+  gh_manager::auto_lock lock;
+
+  foreach (QObject* qObj, children ())
+    {
+      if (qObj->isWidgetType ())
+        {
+          Object* obj = Object::fromQObject (qObj);
+
+          if (obj)
+            {
+              Matrix bb = obj->properties ().get_boundingbox (false);
+
+              obj->qWidget<QWidget> ()
+                ->setGeometry (xround (bb(0)), xround (bb(1)),
+                               xround (bb(2)), xround (bb(3)));
+            }
+        }
+    }
+}
+
+void
+Container::childEvent (QChildEvent* xevent)
+{
+  if (xevent->child ()->isWidgetType ())
+    qobject_cast<QWidget*> (xevent->child ())->setMouseTracking (hasMouseTracking ());
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Container.h
@@ -0,0 +1,57 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Container__
+#define __QtHandles_Container__ 1
+
+#include <QWidget>
+
+#include "GenericEventNotify.h"
+
+#include "graphics.h"
+
+namespace QtHandles
+{
+
+DECLARE_GENERICEVENTNOTIFY_SENDER(ContainerBase, QWidget);
+
+class Canvas;
+
+class Container : public ContainerBase
+{
+public:
+  Container (QWidget* parent);
+  ~Container (void);
+
+  Canvas* canvas (const graphics_handle& handle, bool create = true);
+
+protected:
+  void childEvent (QChildEvent* event);
+  void resizeEvent (QResizeEvent* event);
+
+private:
+  Canvas* m_canvas;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ContextMenu.cc
@@ -0,0 +1,139 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QMenu>
+
+#include "Backend.h"
+#include "ContextMenu.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+ContextMenu*
+ContextMenu::create (const graphics_object& go)
+{
+  Object* xparent = Object::parentObject (go);
+
+  if (xparent)
+    {
+      QWidget* w = xparent->qWidget<QWidget> ();
+
+      return new ContextMenu (go, new QMenu (w));
+    }
+
+  return 0;
+}
+
+ContextMenu::ContextMenu (const graphics_object& go, QMenu* xmenu)
+    : Object (go, xmenu)
+{
+  xmenu->setAutoFillBackground (true);
+
+  connect (xmenu, SIGNAL (aboutToShow (void)), SLOT (aboutToShow (void)));
+  connect (xmenu, SIGNAL (aboutToHide (void)), SLOT (aboutToHide (void)));
+}
+
+ContextMenu::~ContextMenu (void)
+{
+}
+
+void
+ContextMenu::update (int pId)
+{
+  uicontextmenu::properties& up = properties<uicontextmenu> ();
+  QMenu* xmenu = qWidget<QMenu> ();
+
+  switch (pId)
+    {
+    case base_properties::ID_VISIBLE:
+      if (up.is_visible ())
+        {
+          Matrix pos = up.get_position ().matrix_value ();
+          QWidget* parentW = xmenu->parentWidget ();
+          QPoint pt;
+
+          pt.rx () = xround (pos(0));
+          pt.ry () = parentW->height () - xround (pos(1));
+          pt = parentW->mapToGlobal (pt);
+
+          xmenu->popup (pt);
+        }
+      else
+        xmenu->hide ();
+      break;
+    default:
+      Object::update (pId);
+      break;
+    }
+}
+
+void
+ContextMenu::aboutToShow (void)
+{
+  gh_manager::post_callback (m_handle, "callback");
+  gh_manager::post_set (m_handle, "visible", "on", false);
+}
+
+void
+ContextMenu::aboutToHide (void)
+{
+  gh_manager::post_set (m_handle, "visible", "off", false);
+}
+
+QWidget*
+ContextMenu::menu (void)
+{
+  return qWidget<QWidget> ();
+}
+
+void
+ContextMenu::executeAt (const base_properties& props, const QPoint& pt)
+{
+  graphics_handle h = props.get_uicontextmenu ();
+
+  if (h.ok ())
+    {
+      gh_manager::auto_lock lock;
+      graphics_object go = gh_manager::get_object (h);
+
+      if (go.valid_object ())
+        {
+          ContextMenu* cMenu =
+            dynamic_cast<ContextMenu*> (Backend::toolkitObject (go));
+
+          if (cMenu)
+            {
+              QMenu* menu = cMenu->qWidget<QMenu> ();
+
+              if (menu)
+                menu->popup (pt);
+            }
+        }
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ContextMenu.h
@@ -0,0 +1,61 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ContextMenu__
+#define __QtHandles_ContextMenu__ 1
+
+#include <QPoint>
+
+#include "MenuContainer.h"
+#include "Object.h"
+
+class QMenu;
+
+namespace QtHandles
+{
+
+class ContextMenu : public Object, public MenuContainer
+{
+  Q_OBJECT
+
+public:
+  ContextMenu (const graphics_object& go, QMenu* menu);
+  ~ContextMenu (void);
+
+  static ContextMenu* create (const graphics_object& go);
+  static void executeAt (const base_properties& props, const QPoint& pt);
+
+  Container* innerContainer (void) { return 0; }
+
+  QWidget* menu (void);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void aboutToShow (void);
+  void aboutToHide (void);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/EditControl.cc
@@ -0,0 +1,260 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QLineEdit>
+
+#include "Container.h"
+#include "EditControl.h"
+#include "TextEdit.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+EditControl*
+EditControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        {
+          uicontrol::properties& up = Utils::properties<uicontrol> (go);
+
+          if ((up.get_max () - up.get_min ()) > 1)
+            return new EditControl (go, new TextEdit (container));
+          else
+            return new EditControl (go, new QLineEdit (container));
+        }
+    }
+
+  return 0;
+}
+
+EditControl::EditControl (const graphics_object& go, QLineEdit* edit)
+     : BaseControl (go, edit), m_multiLine (false), m_textChanged (false)
+{
+  init (edit);
+}
+
+void
+EditControl::init (QLineEdit* edit, bool callBase)
+{
+  if (callBase)
+    BaseControl::init (edit, callBase);
+
+  m_multiLine = false;
+  initCommon (edit);
+
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  edit->setText (Utils::fromStdString (up.get_string_string ()));
+  edit->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                                          up.get_verticalalignment ()));
+
+  connect (edit, SIGNAL (textEdited (const QString&)),
+           SLOT (textChanged (void)));
+  connect (edit, SIGNAL (editingFinished (void)),
+           SLOT (editingFinished (void)));
+  connect (edit, SIGNAL (returnPressed (void)),
+           SLOT (returnPressed (void)));
+}
+
+EditControl::EditControl (const graphics_object& go, TextEdit* edit)
+  : BaseControl (go, edit), m_multiLine (true), m_textChanged (false)
+{
+  init (edit);
+}
+
+void
+EditControl::init (TextEdit* edit, bool callBase)
+{
+  if (callBase)
+    BaseControl::init (edit, callBase);
+
+  m_multiLine = true;
+  initCommon (edit);
+
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  edit->setAcceptRichText (false);
+  edit->setPlainText (Utils::fromStringVector (up.get_string_vector()).join("\n"));
+
+  connect (edit, SIGNAL (textChanged (void)),
+           SLOT (textChanged (void)));
+  connect (edit, SIGNAL (editingFinished (void)),
+           SLOT (editingFinished (void)));
+  connect (edit, SIGNAL (returnPressed (void)),
+           SLOT (returnPressed (void)));
+}
+
+EditControl::~EditControl (void)
+{
+}
+
+void
+EditControl::initCommon (QWidget*)
+{
+  m_textChanged = false;
+}
+
+void
+EditControl::update (int pId)
+{
+  bool handled = false;
+
+  if (m_multiLine)
+    handled = updateMultiLine (pId);
+  else
+    handled = updateSingleLine (pId);
+
+  if (! handled)
+    {
+      switch (pId)
+        {
+        default:
+          BaseControl::update (pId);
+          break;
+        }
+    }
+}
+
+bool
+EditControl::updateSingleLine (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QLineEdit* edit = qWidget<QLineEdit> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      edit->setText (Utils::fromStdString (up.get_string_string ()));
+      return true;
+
+    case uicontrol::properties::ID_HORIZONTALALIGNMENT:
+    case uicontrol::properties::ID_VERTICALALIGNMENT:
+      edit->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                                              up.get_verticalalignment ()));
+      return true;
+
+    case uicontrol::properties::ID_MIN:
+    case uicontrol::properties::ID_MAX:
+      if ((up.get_max () - up.get_min ()) > 1)
+        {
+          QWidget* container = edit->parentWidget ();
+
+          delete edit;
+          init (new TextEdit (container), true);
+        }
+      return true;
+
+    default:
+      break;
+    }
+
+  return false;
+}
+
+bool
+EditControl::updateMultiLine (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  TextEdit* edit = qWidget<TextEdit> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      edit->setPlainText (Utils::fromStringVector (up.get_string_vector()).join("\n"));
+      return true;
+
+    case uicontrol::properties::ID_MIN:
+    case uicontrol::properties::ID_MAX:
+      if ((up.get_max () - up.get_min ()) <= 1)
+        {
+          QWidget* container = edit->parentWidget ();
+
+          delete edit;
+          init (new QLineEdit (container), true);
+        }
+      return true;
+
+    default:
+      break;
+    }
+
+  return false;
+}
+
+void
+EditControl::textChanged (void)
+{
+  m_textChanged = true;
+}
+
+void 
+EditControl::returnPressed (void)
+{
+  QString txt = (m_multiLine
+                 ? qWidget<TextEdit> ()->toPlainText ()
+                 : qWidget<QLineEdit> ()->text ());
+
+  if (m_textChanged)
+    {
+      if (m_multiLine)
+        gh_manager::post_set (m_handle, "string", Utils::toCellString(txt.split("\n")), false);
+      else
+        gh_manager::post_set (m_handle, "string", Utils::toStdString (txt), false);
+
+      m_textChanged = false;
+    }
+
+  if (txt.length () > 0)
+    gh_manager::post_callback (m_handle, "callback");
+}
+
+void
+EditControl::editingFinished (void)
+{
+  if (m_textChanged)
+    {
+      QString txt = (m_multiLine
+                     ? qWidget<TextEdit> ()->toPlainText ()
+                     : qWidget<QLineEdit> ()->text ());
+      if (m_multiLine)
+        gh_manager::post_set (m_handle, "string", Utils::toCellString(txt.split("\n")), false);
+      else
+        gh_manager::post_set (m_handle, "string", Utils::toStdString (txt), false);
+      gh_manager::post_callback (m_handle, "callback");
+
+      m_textChanged = false;
+    }
+}
+
+}; // namespace QtHandles
+
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/EditControl.h
@@ -0,0 +1,69 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_EditControl__
+#define __QtHandles_EditControl__ 1
+
+#include "BaseControl.h"
+
+class QLineEdit;
+class QWidget;
+
+namespace QtHandles
+{
+
+class TextEdit;
+
+class EditControl : public BaseControl
+{
+  Q_OBJECT
+
+public:
+  EditControl (const graphics_object& go, QLineEdit* edit);
+  EditControl (const graphics_object& go, TextEdit* edit);
+  ~EditControl (void);
+
+  static EditControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private:
+  void init (QLineEdit* edit, bool callBase = false);
+  void init (TextEdit* edit, bool callBase = false);
+  void initCommon (QWidget* widget);
+  bool updateSingleLine (int pId);
+  bool updateMultiLine (int pId);
+
+private slots:
+  void textChanged (void);
+  void editingFinished (void);
+  void returnPressed (void);
+
+private:
+  bool m_multiLine;
+  bool m_textChanged;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Figure.cc
@@ -0,0 +1,958 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAction>
+#include <QActionEvent>
+#include <QActionGroup>
+#include <QApplication>
+#include <QClipboard>
+#include <QEvent>
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QFrame>
+#include <QImage>
+#include <QMainWindow>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QtDebug>
+#include <QTimer>
+#include <QToolBar>
+
+#include "Canvas.h"
+#include "Container.h"
+#include "Figure.h"
+#include "FigureWindow.h"
+#include "MouseModeActionGroup.h"
+#include "QtHandlesUtils.h"
+
+#include "file-ops.h"
+#include "unwind-prot.h"
+#include "utils.h"
+
+#include "octave-qt-link.h"
+
+#include "builtin-defun-decls.h"
+
+namespace QtHandles
+{
+
+#define ABOUT_TEXT "<b>QtHandles</b> - a Qt-based toolkit for <a href=\"http://www.octave.org\">Octave</a>.<br><br>Copyright (C) 2011-2015 Michael Goffioul"
+
+DECLARE_GENERICEVENTNOTIFY_SENDER(MenuBar, QMenuBar);
+
+static bool
+hasUiControlChildren (const figure::properties& fp)
+{
+  gh_manager::auto_lock lock;
+
+  Matrix kids = fp.get_all_children ();
+
+  for (int i = 0; i < kids.numel (); i++)
+    {
+      graphics_object go (gh_manager::get_object (kids(i)));
+
+      if (go && (go.isa ("uicontrol") || go.isa ("uipanel")
+                 || go.isa ("uibuttongroup")))
+        return true;
+    }
+
+  return false;
+}
+
+static bool
+hasUiMenuChildren (const figure::properties& fp)
+{
+  gh_manager::auto_lock lock;
+
+  Matrix kids = fp.get_all_children ();
+
+  for (int i = 0; i < kids.numel (); i++)
+    {
+      graphics_object go (gh_manager::get_object (kids(i)));
+
+      if (go && go.isa ("uimenu"))
+        return true;
+    }
+
+  return false;
+}
+
+static QRect
+boundingBoxToRect (const Matrix& bb)
+{
+  QRect r;
+
+  if (bb.numel () == 4)
+    {
+      r = QRect (xround (bb(0)), xround (bb(1)),
+                 xround (bb(2)), xround (bb(3)));
+      if (! r.isValid ())
+        r = QRect ();
+    }
+
+  return r;
+}
+
+Figure*
+Figure::create (const graphics_object& go)
+{
+  return new Figure (go, new FigureWindow ());
+}
+
+Figure::Figure (const graphics_object& go, FigureWindow* win)
+  : Object (go, win), m_blockUpdates (false), m_figureToolBar (0),
+    m_menuBar (0), m_innerRect (), m_outerRect (), m_mouseModeGroup (0)
+{
+  m_container = new Container (win);
+  win->setCentralWidget (m_container);
+
+  figure::properties& fp = properties<figure> ();
+
+  createFigureToolBarAndMenuBar ();
+
+  int offset = 0;
+  if (fp.toolbar_is ("figure") || 
+      (fp.toolbar_is ("auto") && fp.menubar_is ("figure") &&
+       ! hasUiControlChildren (fp)))
+    offset += m_figureToolBar->sizeHint ().height ();
+  else
+    m_figureToolBar->hide ();
+  if (fp.menubar_is ("figure") || hasUiMenuChildren (fp))
+    offset += m_menuBar->sizeHint ().height () + 1;
+  else
+    m_menuBar->hide ();
+
+  m_innerRect = boundingBoxToRect (fp.get_boundingbox (true));
+  m_outerRect = boundingBoxToRect (fp.get_boundingbox (false));
+
+  //qDebug () << "Figure::Figure:" << m_innerRect;
+  win->setGeometry (m_innerRect.adjusted (0, -offset, 0, 0));
+  //qDebug () << "Figure::Figure(adjusted)" << m_innerRect.adjusted (0, -offset, 0, 0);
+  win->setWindowTitle (Utils::fromStdString (fp.get_title ()));
+
+  int eventMask = 0;
+  if (! fp.get_keypressfcn ().is_empty ())
+    eventMask |= Canvas::KeyPress;
+  if (! fp.get_keyreleasefcn ().is_empty ())
+    eventMask |= Canvas::KeyRelease;
+  m_container->canvas (m_handle)->setEventMask (eventMask);
+
+  if (! fp.get_windowbuttonmotionfcn ().is_empty ())
+    {
+      m_container->setMouseTracking (true);
+      m_container->canvas (m_handle)->qWidget ()->setMouseTracking (true);
+    }
+
+  connect (this, SIGNAL (asyncUpdate (void)),
+           this, SLOT (updateContainer (void)));
+
+  if (fp.is_visible ())
+    QTimer::singleShot (0, win, SLOT (show ()));
+  else
+    win->hide ();
+
+  win->addReceiver (this);
+  m_container->addReceiver (this);
+}
+
+Figure::~Figure (void)
+{
+}
+
+static std::string
+mouse_mode_to_string (MouseMode mode)
+{
+  switch (mode)
+    {
+    case NoMode:
+      return "none";
+
+    case RotateMode:
+      return "rotate";
+
+    case ZoomInMode:
+      return "zoom in";
+
+    case ZoomOutMode:
+      return "zoom out";
+
+    case PanMode:
+      return "pan";
+
+    case TextMode:
+      return "text";
+
+    case SelectMode:
+      return "select";
+
+    default:
+      break;
+    }
+
+  return "none";
+}
+
+static MouseMode
+mouse_mode_from_string (const std::string& mode)
+{
+  if (mode == "none")
+    return NoMode;
+  else if (mode == "rotate")
+    return RotateMode;
+  else if (mode == "zoom in")
+    return ZoomInMode;
+  else if (mode == "zoom out")
+    return ZoomOutMode;
+  else if (mode == "pan")
+    return PanMode;
+  else if (mode == "text")
+    return TextMode;
+  else if (mode == "select")
+    return SelectMode;
+  else
+    return NoMode;
+}
+
+QString
+Figure::fileName (void)
+{
+  gh_manager::auto_lock lock;
+
+  const figure::properties& fp = properties<figure> ();
+
+  std::string name = fp.get_filename ();
+
+  return QString::fromStdString (name);
+}
+
+void
+Figure::setFileName (const QString& name)
+{
+  gh_manager::auto_lock lock;
+
+  figure::properties& fp = properties<figure> ();
+
+  fp.set_filename (name.toStdString ());
+}
+
+MouseMode
+Figure::mouseMode (void)
+{
+  gh_manager::auto_lock lock;
+
+  const figure::properties& fp = properties<figure> ();
+
+  std::string mode = fp.get___mouse_mode__ ();
+
+  if (mode == "zoom")
+    {
+      octave_scalar_map zm = fp.get___zoom_mode__ ().scalar_map_value ();
+
+      std::string direction = zm.getfield ("Direction").string_value ();
+
+      mode += " " + direction;
+    }    
+
+  return mouse_mode_from_string (mode);
+}
+
+void
+Figure::createFigureToolBarAndMenuBar (void)
+{
+  QMainWindow* win = qWidget<QMainWindow> ();
+
+  m_figureToolBar = win->addToolBar (tr ("Figure ToolBar"));
+  m_figureToolBar->setMovable (false);
+  m_figureToolBar->setFloatable (false);
+
+  m_mouseModeGroup = new MouseModeActionGroup (win);
+  connect (m_mouseModeGroup, SIGNAL (modeChanged (MouseMode)),
+           SLOT (setMouseMode (MouseMode)));
+  m_figureToolBar->addActions (m_mouseModeGroup->actions ());
+
+  QAction *toggle_axes = m_figureToolBar->addAction (tr ("Axes"));
+  connect (toggle_axes, SIGNAL (triggered (void)),
+           this, SLOT (toggleAxes (void)));
+
+  QAction *toggle_grid = m_figureToolBar->addAction (tr ("Grid"));
+  connect (toggle_grid, SIGNAL (triggered (void)),
+           this, SLOT (toggleGrid (void)));
+
+  QAction *auto_axes = m_figureToolBar->addAction (tr ("Autoscale"));
+  connect (auto_axes, SIGNAL (triggered (void)),
+           this, SLOT (autoAxes (void)));
+
+  m_menuBar = new MenuBar (win);
+  win->setMenuBar (m_menuBar);
+
+  QMenu* fileMenu = m_menuBar->addMenu (tr ("&File"));
+  fileMenu->menuAction ()->setObjectName ("builtinMenu");
+  fileMenu->addAction (tr ("&Save"), this, SLOT (fileSaveFigure (bool)));
+  fileMenu->addAction (tr ("Save &As"), this, SLOT (fileSaveFigureAs (void)));
+  fileMenu->addSeparator ();
+  fileMenu->addAction (tr ("&Close Figure"), this,
+                       SLOT (fileCloseFigure (void)), Qt::CTRL|Qt::Key_W);
+
+  QMenu* editMenu = m_menuBar->addMenu (tr ("&Edit"));
+  editMenu->menuAction ()->setObjectName ("builtinMenu");
+  editMenu->addAction (tr ("Cop&y"), this, SLOT (editCopy (bool)),
+                       Qt::CTRL|Qt::Key_C);
+  editMenu->addSeparator ();
+  editMenu->addActions (m_mouseModeGroup->actions ());
+
+  QMenu* helpMenu = m_menuBar->addMenu (tr ("&Help"));
+  helpMenu->menuAction ()->setObjectName ("builtinMenu");
+  helpMenu->addAction (tr ("&About QtHandles"), this,
+                       SLOT (helpAboutQtHandles (void)));
+  helpMenu->addAction (tr ("About &Qt"), qApp, SLOT (aboutQt (void)));
+
+  m_menuBar->addReceiver (this);
+}
+
+void
+Figure::updateFigureToolBarAndMenuBar (void)
+{
+  if (m_mouseModeGroup)
+    {
+      m_blockUpdates = true;
+      m_mouseModeGroup->setMode (mouseMode ());
+      m_blockUpdates = false;
+    }
+}
+
+Container*
+Figure::innerContainer (void)
+{
+  return m_container;
+}
+
+void
+Figure::redraw (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    {
+    canvas->redraw ();
+    //canvas->setMouseMode (RotateMode);
+    }
+
+  foreach (QFrame* frame,
+           qWidget<QWidget> ()->findChildren<QFrame*> ("UIPanel"))
+    {
+      Object* obj = Object::fromQObject (frame);
+
+      if (obj)
+        obj->slotRedraw ();
+    }
+
+  updateFigureToolBarAndMenuBar ();
+}
+
+void
+Figure::print (const QString& file_cmd, const QString& term)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->print (file_cmd, term);
+}
+
+void
+Figure::beingDeleted (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle.value (), false);
+
+  if (canvas)
+    canvas->blockRedraw (true);
+
+  m_menuBar->removeReceiver (this);
+  m_container->removeReceiver (this);
+  qWidget<FigureWindow> ()->removeReceiver (this);
+}
+
+void
+Figure::update (int pId)
+{
+  if (m_blockUpdates)
+    return;
+
+  figure::properties& fp = properties<figure> ();
+  QMainWindow* win = qWidget<QMainWindow> ();
+
+  m_blockUpdates = true;
+
+  switch (pId)
+    {
+    case figure::properties::ID_POSITION:
+        {
+          m_innerRect = boundingBoxToRect (fp.get_boundingbox (true));
+          //qDebug () << "Figure::update(position):" << m_innerRect;
+          int offset = 0;
+
+          foreach (QToolBar* tb, win->findChildren<QToolBar*> ())
+            if (! tb->isHidden ())
+              offset += tb->sizeHint ().height ();
+          if (! m_menuBar->isHidden ())
+            offset += m_menuBar->sizeHint ().height () + 1;
+          //qDebug () << "Figure::update(position)(adjusted):" << m_innerRect.adjusted (0, -offset, 0, 0);
+          win->setGeometry (m_innerRect.adjusted (0, -offset, 0, 0));
+          //qDebug () << "Figure::update(position): done";
+        }
+      break;
+
+    case figure::properties::ID_NAME:
+    case figure::properties::ID_NUMBERTITLE:
+      win->setWindowTitle (Utils::fromStdString (fp.get_title ()));
+      break;
+
+    case figure::properties::ID_VISIBLE:
+      if (fp.is_visible ())
+        QTimer::singleShot (0, win, SLOT (show ()));
+      else
+        win->hide ();
+      break;
+
+    case figure::properties::ID_TOOLBAR:
+      if (fp.toolbar_is ("none"))
+        showFigureToolBar (false);
+      else if (fp.toolbar_is ("figure"))
+        showFigureToolBar (true);
+      else // "auto"
+        showFigureToolBar (! hasUiControlChildren (fp) &&
+                           fp.menubar_is ("figure"));
+      break;
+
+    case figure::properties::ID_MENUBAR:
+      showMenuBar (fp.menubar_is ("figure"));
+      if (fp.toolbar_is ("auto"))
+        showFigureToolBar (fp.menubar_is ("figure"));
+      break;
+
+    case figure::properties::ID_KEYPRESSFCN:
+      if (fp.get_keypressfcn ().is_empty ())
+        m_container->canvas (m_handle)->clearEventMask (Canvas::KeyPress);
+      else
+        m_container->canvas (m_handle)->addEventMask (Canvas::KeyPress);
+      break;
+
+    case figure::properties::ID_KEYRELEASEFCN:
+      if (fp.get_keyreleasefcn ().is_empty ())
+        m_container->canvas (m_handle)->clearEventMask (Canvas::KeyRelease);
+      else
+        m_container->canvas (m_handle)->addEventMask (Canvas::KeyRelease);
+      break;
+
+    case figure::properties::ID_WINDOWBUTTONMOTIONFCN:
+        {
+          bool hasCallback = ! fp.get_windowbuttonmotionfcn ().is_empty ();
+
+          m_container->setMouseTracking (hasCallback);
+          foreach (QWidget* w, m_container->findChildren<QWidget*> ())
+            { w->setMouseTracking (hasCallback); }
+        }
+      break;
+
+    default:
+      break;
+    }
+
+  m_blockUpdates = false;
+}
+
+void
+Figure::showFigureToolBar (bool visible)
+{
+  if ((! m_figureToolBar->isHidden ()) != visible)
+    {
+      int dy = m_figureToolBar->sizeHint ().height ();
+      QRect r = qWidget<QWidget> ()->geometry ();
+
+      if (! visible)
+        r.adjust (0, dy, 0, 0);
+      else
+        r.adjust (0, -dy, 0, 0);
+
+      m_blockUpdates = true;
+      qWidget<QWidget> ()->setGeometry (r);
+      m_figureToolBar->setVisible (visible);
+      m_blockUpdates = false;
+
+      updateBoundingBox (false);
+    }
+}
+
+void
+Figure::showMenuBar (bool visible)
+{
+  int h1 = m_menuBar->sizeHint ().height ();
+
+  foreach (QAction* a, m_menuBar->actions ())
+    if (a->objectName () == "builtinMenu")
+      a->setVisible (visible);
+
+  int h2 = m_menuBar->sizeHint ().height ();
+
+  if (! visible)
+    visible = hasUiMenuChildren (properties<figure> ());
+
+  if ((! m_menuBar->isHidden ()) != visible)
+    {
+      int dy = qMax (h1, h2) + 1;
+      QRect r = qWidget<QWidget> ()->geometry ();
+
+      //qDebug () << "Figure::showMenuBar:" << r;
+      if (! visible)
+        r.adjust (0, dy, 0, 0);
+      else
+        r.adjust (0, -dy, 0, 0);
+      //qDebug () << "Figure::showMenuBar(adjusted):" << r;
+
+      m_blockUpdates = true;
+      qWidget<QWidget> ()->setGeometry (r);
+      m_menuBar->setVisible (visible);
+      m_blockUpdates = false;
+
+      updateBoundingBox (false);
+    }
+}
+
+void
+Figure::updateMenuBar (void)
+{
+  gh_manager::auto_lock lock;
+  graphics_object go = object ();
+
+  if (go.valid_object ())
+    showMenuBar (Utils::properties<figure> (go).menubar_is ("figure"));
+}
+
+QWidget*
+Figure::menu (void)
+{
+  return qWidget<QMainWindow> ()->menuBar ();
+}
+
+struct UpdateBoundingBoxData
+{
+  Matrix m_bbox;
+  bool m_internal;
+  graphics_handle m_handle;
+  Figure* m_figure;
+};
+
+void
+Figure::updateBoundingBoxHelper (void* data)
+{
+  gh_manager::auto_lock lock;
+
+  UpdateBoundingBoxData* d = reinterpret_cast<UpdateBoundingBoxData*> (data);
+  graphics_object go = gh_manager::get_object (d->m_handle);
+
+  if (go.valid_object ())
+    {
+      figure::properties& fp = Utils::properties<figure> (go);
+
+      fp.set_boundingbox (d->m_bbox, d->m_internal, false);
+    }
+
+  delete d;
+}
+
+void
+Figure::updateBoundingBox (bool internal, int flags)
+{
+  QWidget* win = qWidget<QWidget> ();
+  Matrix bb (1, 4);
+
+  if (internal)
+    {
+      QRect r = m_innerRect;
+
+      if (flags & UpdateBoundingBoxPosition)
+        r.moveTopLeft (win->mapToGlobal (m_container->pos ()));
+      if (flags & UpdateBoundingBoxSize)
+        r.setSize (m_container->size ());
+
+      if (r.isValid () && r != m_innerRect)
+        {
+          m_innerRect = r;
+
+          bb(0) = r.x ();
+          bb(1) = r.y ();
+          bb(2) = r.width ();
+          bb(3) = r.height ();
+        }
+      else
+        return;
+    }
+  else
+    {
+      QRect r = m_outerRect;
+
+      if (flags & UpdateBoundingBoxPosition)
+        r.moveTopLeft (win->pos ());
+      if (flags & UpdateBoundingBoxSize)
+        r.setSize (win->frameGeometry ().size ());
+
+      if (r.isValid () && r != m_outerRect)
+        {
+          m_outerRect = r;
+
+          bb(0) = r.x ();
+          bb(1) = r.y ();
+          bb(2) = r.width ();
+          bb(3) = r.height ();
+        }
+      else
+        return;
+    }
+
+  UpdateBoundingBoxData* d = new UpdateBoundingBoxData ();
+
+  d->m_bbox = bb;
+  d->m_internal = internal;
+  d->m_handle = m_handle;
+  d->m_figure = this;
+
+  gh_manager::post_function (Figure::updateBoundingBoxHelper, d);
+}
+
+bool
+Figure::eventNotifyBefore (QObject* obj, QEvent* xevent)
+{
+  if (! m_blockUpdates)
+    {
+      if (obj == m_container)
+        {
+          // Do nothing...
+        }
+      else if (obj == m_menuBar)
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::ActionRemoved:
+              {
+                QAction* a = dynamic_cast<QActionEvent*> (xevent)->action ();
+
+                if (! a->isSeparator ()
+                    && a->objectName () != "builtinMenu")
+                  updateMenuBar ();
+              }
+              break;
+
+            default:
+              break;
+            }
+        }
+      else
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::Close:
+              xevent->ignore ();
+              gh_manager::post_callback (m_handle, "closerequestfcn");
+              return true;
+
+            default:
+              break;
+            }
+        }
+    }
+
+  return false;
+}
+
+void
+Figure::eventNotifyAfter (QObject* watched, QEvent* xevent)
+{
+  if (! m_blockUpdates)
+    {
+      if (watched == m_container)
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::Resize:
+              updateBoundingBox (true, UpdateBoundingBoxSize);
+              break;
+
+            case QEvent::ChildAdded:
+              if (dynamic_cast<QChildEvent*> (xevent)->child
+                  ()->isWidgetType())
+                {
+                  gh_manager::auto_lock lock;
+                  const figure::properties& fp = properties<figure> ();
+
+                  showFigureToolBar (! hasUiControlChildren (fp));
+                }
+
+            default:
+              break;
+            }
+        }
+      else if (watched == m_menuBar)
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::ActionAdded:
+                {
+                  QAction* a = dynamic_cast<QActionEvent*> (xevent)->action ();
+
+                  if (! a->isSeparator ()
+                      && a->objectName () != "builtinMenu")
+                    updateMenuBar ();
+                }
+              break;
+
+            default:
+              break;
+            }
+        }
+      else
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::Move:
+              updateBoundingBox (false, UpdateBoundingBoxPosition);
+              updateBoundingBox (true, UpdateBoundingBoxPosition);
+              break;
+
+            case QEvent::Resize:
+              updateBoundingBox (false, UpdateBoundingBoxSize);
+              break;
+
+            default:
+              break;
+            }
+        }
+    }
+}
+
+void
+Figure::helpAboutQtHandles (void)
+{
+  QMessageBox::about (qWidget<QMainWindow> (), tr ("About QtHandles"),
+                      ABOUT_TEXT);
+}
+
+void
+Figure::setMouseMode (MouseMode mode)
+{
+  if (m_blockUpdates)
+    return;
+
+  gh_manager::auto_lock lock;
+
+  figure::properties& fp = properties<figure> ();
+
+  fp.set___mouse_mode__ (mouse_mode_to_string (mode));
+
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->setCursor (mode);
+}
+
+void
+Figure::fileSaveFigure (bool prompt)
+{
+  QString file = fileName ();
+
+  if (file.isEmpty ())
+    {
+      prompt = true;
+
+      file = "untitled.pdf";
+    }
+
+  if (prompt || file.isEmpty ())
+    {
+      QFileInfo finfo (file);
+
+      file = QFileDialog::getSaveFileName (qWidget<FigureWindow> (),
+                                           tr ("Save Figure As"),
+                                           finfo.absoluteFilePath (), 0, 0,
+                                           QFileDialog::DontUseNativeDialog);
+    }
+
+  if (! file.isEmpty ())
+    {
+      QFileInfo finfo (file);
+
+      setFileName (finfo.absoluteFilePath ());
+
+      octave_link::post_event (this, &Figure::save_figure_callback,
+                               file.toStdString ());
+    }
+}
+
+void
+Figure::save_figure_callback (const std::string& file)
+{
+  Ffeval (ovl ("print", file));
+}
+
+void
+Figure::copy_figure_callback (const std::string& format)
+{
+  std::string msg;
+
+  std::string file = octave_tempnam ("", "oct-", msg) + "." + format;
+
+  if (file.empty ())
+    {
+      // Report error?
+      return;
+    }
+
+  std::string device = "-d" + format;
+
+  Ffeval (ovl ("print", file, device));
+
+  octave_link::copy_image_to_clipboard (file);
+}
+  
+void
+Figure::fileSaveFigureAs (void)
+{
+  fileSaveFigure (true);
+}
+
+void
+Figure::fileCloseFigure (void)
+{
+  qWidget<QMainWindow> ()->close ();
+}
+
+void
+Figure::editCopy (bool /* choose_format */)
+{
+  QString format = "png";
+
+#if 0
+
+  // FIXME: allow choice of image formats.
+
+  if (choose_format)
+    {
+      QFileInfo finfo (file);
+
+      format = QFileDialog::getSaveFileName (qWidget<FigureWindow> (),
+                                           tr ("Save Figure As"),
+                                           finfo.absoluteFilePath (), 0, 0,
+                                           QFileDialog::DontUseNativeDialog);
+    }
+#endif
+
+  octave_link::post_event (this, &Figure::copy_figure_callback,
+                           format.toStdString ());
+}
+
+void
+Figure::addCustomToolBar (QToolBar* bar, bool visible)
+{
+  QMainWindow* win = qWidget<QMainWindow> ();
+
+  if (! visible)
+    win->addToolBar (bar);
+  else
+    {
+      QSize sz = bar->sizeHint ();
+      QRect r = win->geometry ();
+      //qDebug () << "Figure::addCustomToolBar:" << r;
+
+      r.adjust (0, -sz.height (), 0, 0);
+
+      m_blockUpdates = true;
+      win->setGeometry (r);
+      win->addToolBarBreak ();
+      win->addToolBar (bar);
+      m_blockUpdates = false;
+
+      //qDebug () << "Figure::addCustomToolBar:" << win->geometry ();
+      updateBoundingBox (false);
+    }
+}
+
+void
+Figure::showCustomToolBar (QToolBar* bar, bool visible)
+{
+  QMainWindow* win = qWidget<QMainWindow> ();
+
+  if ((! bar->isHidden ()) != visible)
+    {
+      QSize sz = bar->sizeHint ();
+      QRect r = win->geometry ();
+
+      if (visible)
+        r.adjust (0, -sz.height (), 0, 0);
+      else
+        r.adjust (0, sz.height (), 0, 0);
+
+      m_blockUpdates = true;
+      win->setGeometry (r);
+      bar->setVisible (visible);
+      m_blockUpdates = false;
+
+      updateBoundingBox (false);
+    }
+}
+
+void
+Figure::updateContainer (void)
+{
+  redraw ();
+}
+
+void
+Figure::toggleAxes (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->toggleAxes (m_handle);
+}
+  
+void
+Figure::toggleGrid (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->toggleGrid (m_handle);
+}
+  
+void
+Figure::autoAxes (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->autoAxes (m_handle);
+}
+  
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Figure.h
@@ -0,0 +1,142 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Figure__
+#define __QtHandles_Figure__ 1
+
+#include <QRect>
+
+#include "GenericEventNotify.h"
+#include "MenuContainer.h"
+#include "Object.h"
+
+class QMainWindow;
+class QToolBar;
+
+namespace QtHandles
+{
+
+enum MouseMode
+{
+  // NOTE: These values must match the order of the buttons in the
+  // MouseModeActionGroup object.
+
+  NoMode        = 0,
+  RotateMode    = 1,
+  ZoomInMode    = 2,
+  ZoomOutMode   = 3,
+  PanMode       = 4,
+  TextMode      = 5,
+  SelectMode    = 6
+};
+
+class Container;
+class FigureWindow;
+class MenuBar;
+class ToolBar;
+
+class MouseModeActionGroup;
+
+class Figure :
+  public Object,
+  public MenuContainer,
+  public GenericEventNotifyReceiver
+{
+  Q_OBJECT
+
+  friend class ToolBar;
+
+public:
+  Figure (const graphics_object& go, FigureWindow* win);
+  ~Figure (void);
+
+  static Figure* create (const graphics_object& go);
+
+  QString fileName (void);
+  void setFileName (const QString& name);
+
+  MouseMode mouseMode (void);
+
+  Container* innerContainer (void);
+  QWidget* menu (void);
+
+  bool eventNotifyBefore (QObject* watched, QEvent* event);
+  void eventNotifyAfter (QObject* watched, QEvent* event);
+
+protected:
+  enum UpdateBoundingBoxFlag
+    {
+      UpdateBoundingBoxPosition = 0x1,
+      UpdateBoundingBoxSize     = 0x2,
+      UpdateBoundingBoxAll      = 0x3
+    };
+
+protected:
+  void redraw (void);
+  void print (const QString& file_cmd, const QString& term);
+  void update (int pId);
+  void updateBoundingBox (bool internal = false, int flags = 0);
+  void beingDeleted (void);
+
+private:
+  void createFigureToolBarAndMenuBar (void);
+  void showFigureToolBar (bool visible);
+  void showMenuBar (bool visible);
+  void addCustomToolBar (QToolBar* bar, bool visible);
+  void showCustomToolBar (QToolBar* bar, bool visible);
+
+  void updateFigureToolBarAndMenuBar (void);
+
+  static void updateBoundingBoxHelper (void*);
+
+  void save_figure_callback (const std::string& file);
+  void copy_figure_callback (const std::string& format);
+
+private slots:
+  void setMouseMode (MouseMode mode);
+  void fileSaveFigure (bool prompt = false);
+  void fileSaveFigureAs (void);
+  void fileCloseFigure (void);
+  void editCopy (bool choose_format = false);
+  void helpAboutQtHandles (void);
+  void updateMenuBar (void);
+  void updateContainer (void);
+  void toggleAxes (void);
+  void toggleGrid (void);
+  void autoAxes (void);
+
+signals:
+  void asyncUpdate (void);
+
+private:
+  Container* m_container;
+  bool m_blockUpdates;
+  QToolBar* m_figureToolBar;
+  MenuBar* m_menuBar;
+  QRect m_innerRect;
+  QRect m_outerRect;
+  MouseModeActionGroup* m_mouseModeGroup;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/FigureWindow.cc
@@ -0,0 +1,52 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QMenu>
+
+#include "FigureWindow.h"
+
+namespace QtHandles
+{
+
+FigureWindow::FigureWindow (QWidget* xparent)
+  : FigureWindowBase (xparent)
+{
+  // set icon from application resources
+  setWindowIcon (QIcon (":/actions/icons/logo.png"));
+}
+
+FigureWindow::~FigureWindow (void)
+{
+}
+
+QMenu*
+FigureWindow::createPopupMenu (void)
+{
+  // For the time being, disable menubar/toolbar popup menu
+  return 0;
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/FigureWindow.h
@@ -0,0 +1,48 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_FigureWindow__
+#define __QtHandles_FigureWindow__ 1
+
+#include <QMainWindow>
+
+#include "GenericEventNotify.h"
+
+namespace QtHandles
+{
+
+DECLARE_GENERICEVENTNOTIFY_SENDER(FigureWindowBase, QMainWindow);
+
+class FigureWindow : public FigureWindowBase
+{
+  Q_OBJECT
+
+public:
+  FigureWindow (QWidget* parent = 0);
+  ~FigureWindow (void);
+
+  QMenu* createPopupMenu (void);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/GLCanvas.cc
@@ -0,0 +1,189 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "gl-render.h"
+#include "graphics.h"
+
+#include "GLCanvas.h"
+#include "gl-select.h"
+
+namespace QtHandles
+{
+
+GLCanvas::GLCanvas (QWidget* xparent, const graphics_handle& gh)
+  : QGLWidget (QGLFormat(QGL::SampleBuffers), xparent), Canvas (gh)
+{
+  setFocusPolicy (Qt::ClickFocus);
+}
+
+GLCanvas::~GLCanvas (void)
+{
+}
+
+void
+GLCanvas::draw (const graphics_handle& gh)
+{
+  gh_manager::auto_lock lock;
+  graphics_object go = gh_manager::get_object (gh);
+
+  if (go)
+    {
+      opengl_renderer r;
+
+      r.set_viewport (width (), height ());
+      r.draw(go);
+    }
+}
+
+void
+GLCanvas::toggleAxes (const graphics_handle& gh)
+{
+  canvasToggleAxes (gh);
+}
+
+void
+GLCanvas::toggleGrid (const graphics_handle& gh)
+{
+  canvasToggleGrid (gh);
+}
+
+void
+GLCanvas::autoAxes (const graphics_handle& gh)
+{
+  canvasAutoAxes (gh);
+}
+
+graphics_object
+GLCanvas::selectFromAxes (const graphics_object& ax, const QPoint& pt)
+{
+  makeCurrent ();
+
+  if (ax)
+    {
+      opengl_selector s;
+
+      s.set_viewport (width (), height ());
+      return s.select (ax, pt.x (), height () - pt.y ());
+    }
+
+  return graphics_object ();
+}
+
+inline void
+glDrawZoomBox (const QPoint& p1, const QPoint& p2)
+{
+  glVertex2d (p1.x (), p1.y ());
+  glVertex2d (p2.x (), p1.y ());
+  glVertex2d (p2.x (), p2.y ());
+  glVertex2d (p1.x (), p2.y ());
+  glVertex2d (p1.x (), p1.y ());
+}
+
+void
+GLCanvas::drawZoomBox (const QPoint& p1, const QPoint& p2)
+{
+  glPushMatrix ();
+
+  glMatrixMode (GL_MODELVIEW);
+  glLoadIdentity ();
+
+  glMatrixMode (GL_PROJECTION);
+  glLoadIdentity ();
+  glOrtho (0, width (), height (), 0, 1, -1);
+
+  glPushAttrib (GL_DEPTH_BUFFER_BIT | GL_CURRENT_BIT);
+  glDisable (GL_DEPTH_TEST);
+
+  glBegin (GL_POLYGON);
+  glColor4f (0.45, 0.62, 0.81, 0.1);
+  glDrawZoomBox (p1, p2);
+  glEnd ();
+
+  glBegin (GL_LINE_STRIP);
+  glLineWidth (1.5);
+  glColor4f (0.45, 0.62, 0.81, 0.9);
+  glDrawZoomBox (p1, p2);
+  glEnd ();
+
+  glPopAttrib ();
+  glPopMatrix ();
+}
+
+void
+GLCanvas::paintGL (void)
+{
+  canvasPaintEvent ();
+}
+
+void
+GLCanvas::mouseDoubleClickEvent (QMouseEvent* xevent)
+{
+  canvasMouseDoubleClickEvent (xevent);
+}
+
+void
+GLCanvas::mouseMoveEvent (QMouseEvent* xevent)
+{
+  canvasMouseMoveEvent (xevent);
+}
+
+void
+GLCanvas::mousePressEvent (QMouseEvent* xevent)
+{
+  canvasMousePressEvent (xevent);
+}
+
+void
+GLCanvas::mouseReleaseEvent (QMouseEvent* xevent)
+{
+  canvasMouseReleaseEvent (xevent);
+}
+
+void
+GLCanvas::wheelEvent (QWheelEvent* xevent)
+{
+  canvasWheelEvent (xevent);
+}
+
+void
+GLCanvas::keyPressEvent (QKeyEvent* xevent)
+{
+  if (! canvasKeyPressEvent (xevent))
+    QGLWidget::keyPressEvent (xevent);
+}
+
+void
+GLCanvas::keyReleaseEvent (QKeyEvent* xevent)
+{
+  if (! canvasKeyReleaseEvent (xevent))
+    QGLWidget::keyReleaseEvent (xevent);
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/GLCanvas.h
@@ -0,0 +1,63 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_GLCanvas__
+#define __QtHandles_GLCanvas__ 1
+
+#include <QGLWidget>
+
+#include "Canvas.h"
+
+namespace QtHandles
+{
+
+class GLCanvas : public QGLWidget, public Canvas
+{
+public:
+  GLCanvas (QWidget* parent, const graphics_handle& handle);
+  ~GLCanvas (void);
+
+  void draw (const graphics_handle& handle);
+  void toggleAxes (const graphics_handle& handle);
+  void toggleGrid (const graphics_handle& handle);
+  void autoAxes (const graphics_handle& handle);
+  void drawZoomBox (const QPoint& p1, const QPoint& p2);
+  void resize (int /* x */, int /* y */,
+               int /* width */, int /* height */) { }
+  graphics_object selectFromAxes (const graphics_object& ax,
+                                  const QPoint& pt);
+  QWidget* qWidget (void) { return this; }
+
+protected:
+  void paintGL (void);
+  void mouseDoubleClickEvent (QMouseEvent* event);
+  void mouseMoveEvent (QMouseEvent* event);
+  void mousePressEvent (QMouseEvent* event);
+  void mouseReleaseEvent (QMouseEvent* event);
+  void wheelEvent (QWheelEvent* event);
+  void keyPressEvent (QKeyEvent* event);
+  void keyReleaseEvent (QKeyEvent* event);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/GenericEventNotify.h
@@ -0,0 +1,104 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __GenericEventNotify_h__
+#define __GenericEventNotify_h__ 1
+
+#include <QSet>
+
+class QEvent;
+class QObject;
+class QWidget;
+
+namespace QtHandles
+{
+
+class GenericEventNotifyReceiver;
+
+class GenericEventNotifySender
+{
+public:
+  GenericEventNotifySender (void) : m_receivers () { }
+  virtual ~GenericEventNotifySender (void) { }
+
+  void addReceiver (GenericEventNotifyReceiver* r)
+    { m_receivers.insert (r); }
+
+  void removeReceiver (GenericEventNotifyReceiver* r)
+    { m_receivers.remove (r); }
+
+protected:
+  bool notifyReceiversBefore (QObject* obj, QEvent* evt);
+  void notifyReceiversAfter (QObject* obj, QEvent* evt);
+
+private:
+  QSet<GenericEventNotifyReceiver*> m_receivers;
+};
+
+class GenericEventNotifyReceiver
+{
+public:
+  GenericEventNotifyReceiver (void) { }
+  virtual ~GenericEventNotifyReceiver (void) { }
+
+  virtual bool eventNotifyBefore (QObject* obj, QEvent* evt) = 0;
+  virtual void eventNotifyAfter (QObject* obj, QEvent* evt) = 0;
+};
+
+inline
+bool GenericEventNotifySender::notifyReceiversBefore (QObject* obj,
+                                                      QEvent* evt)
+{
+  foreach (GenericEventNotifyReceiver* r, m_receivers)
+    if (r->eventNotifyBefore (obj, evt))
+      return true;
+  return false;
+}
+
+inline
+void GenericEventNotifySender::notifyReceiversAfter (QObject* obj,
+                                                     QEvent* evt)
+{
+  foreach (GenericEventNotifyReceiver* r, m_receivers)
+    r->eventNotifyAfter (obj, evt);
+}
+
+#define DECLARE_GENERICEVENTNOTIFY_SENDER(T,B) \
+class T : public B, public GenericEventNotifySender \
+{ \
+public: \
+  T (QWidget* xparent) : B (xparent), GenericEventNotifySender () { } \
+  ~ T (void) { } \
+\
+  bool event (QEvent* evt) \
+    { \
+      bool result = true; \
+      if (! notifyReceiversBefore (this, evt)) \
+        result = B::event (evt); \
+      notifyReceiversAfter (this, evt); \
+      return result; \
+    } \
+}
+
+};
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/KeyMap.cc
@@ -0,0 +1,259 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QMap>
+#include <Qt>
+
+#include "KeyMap.h"
+
+namespace QtHandles
+{
+
+namespace KeyMap
+{
+
+std::string
+qKeyToKeyString (int key)
+{
+  static QMap<int, std::string> keyMapper;
+
+  if (keyMapper.isEmpty ())
+    {
+      keyMapper[Qt::Key_Escape] = "escape";
+      keyMapper[Qt::Key_Tab] = "tab";
+      keyMapper[Qt::Key_Backtab] = "backtab";
+      keyMapper[Qt::Key_Backspace] = "backspace";
+      keyMapper[Qt::Key_Return] = "return";
+      keyMapper[Qt::Key_Enter] = "enter";
+      keyMapper[Qt::Key_Insert] = "insert";
+      keyMapper[Qt::Key_Delete] = "delete";
+      keyMapper[Qt::Key_Pause] = "pause";
+      keyMapper[Qt::Key_Print] = "print";
+      keyMapper[Qt::Key_SysReq] = "sysreq";
+      keyMapper[Qt::Key_Clear] = "clear";
+      keyMapper[Qt::Key_Home] = "home";
+      keyMapper[Qt::Key_End] = "end";
+      keyMapper[Qt::Key_Left] = "left";
+      keyMapper[Qt::Key_Up] = "up";
+      keyMapper[Qt::Key_Right] = "right";
+      keyMapper[Qt::Key_Down] = "down";
+      keyMapper[Qt::Key_PageUp] = "pageup";
+      keyMapper[Qt::Key_PageDown] = "pagedown";
+      keyMapper[Qt::Key_Shift] = "shift";
+      keyMapper[Qt::Key_Control] = "control";
+      keyMapper[Qt::Key_Meta] = "meta";
+      keyMapper[Qt::Key_Alt] = "alt";
+      keyMapper[Qt::Key_CapsLock] = "capslock";
+      keyMapper[Qt::Key_NumLock] = "numlock";
+      keyMapper[Qt::Key_ScrollLock] = "scrolllock";
+      keyMapper[Qt::Key_F1] = "f1";
+      keyMapper[Qt::Key_F2] = "f2";
+      keyMapper[Qt::Key_F3] = "f3";
+      keyMapper[Qt::Key_F4] = "f4";
+      keyMapper[Qt::Key_F5] = "f5";
+      keyMapper[Qt::Key_F6] = "f6";
+      keyMapper[Qt::Key_F7] = "f7";
+      keyMapper[Qt::Key_F8] = "f8";
+      keyMapper[Qt::Key_F9] = "f9";
+      keyMapper[Qt::Key_F10] = "f10";
+      keyMapper[Qt::Key_F11] = "f11";
+      keyMapper[Qt::Key_F12] = "f12";
+      keyMapper[Qt::Key_F13] = "f13";
+      keyMapper[Qt::Key_F14] = "f14";
+      keyMapper[Qt::Key_F15] = "f15";
+      keyMapper[Qt::Key_F16] = "f16";
+      keyMapper[Qt::Key_F17] = "f17";
+      keyMapper[Qt::Key_F18] = "f18";
+      keyMapper[Qt::Key_F19] = "f19";
+      keyMapper[Qt::Key_F20] = "f20";
+      keyMapper[Qt::Key_F21] = "f21";
+      keyMapper[Qt::Key_F22] = "f22";
+      keyMapper[Qt::Key_F23] = "f23";
+      keyMapper[Qt::Key_F24] = "f24";
+      keyMapper[Qt::Key_F25] = "f25";
+      keyMapper[Qt::Key_F26] = "f26";
+      keyMapper[Qt::Key_F27] = "f27";
+      keyMapper[Qt::Key_F28] = "f28";
+      keyMapper[Qt::Key_F29] = "f29";
+      keyMapper[Qt::Key_F30] = "f30";
+      keyMapper[Qt::Key_F31] = "f31";
+      keyMapper[Qt::Key_F32] = "f32";
+      keyMapper[Qt::Key_F33] = "f33";
+      keyMapper[Qt::Key_F34] = "f34";
+      keyMapper[Qt::Key_F35] = "f35";
+      keyMapper[Qt::Key_Super_L] = "super_l";
+      keyMapper[Qt::Key_Super_R] = "super_r";
+      keyMapper[Qt::Key_Menu] = "menu";
+      keyMapper[Qt::Key_Hyper_L] = "hyper_l";
+      keyMapper[Qt::Key_Hyper_R] = "hyper_r";
+      keyMapper[Qt::Key_Help] = "help";
+      keyMapper[Qt::Key_Direction_L] = "direction_l";
+      keyMapper[Qt::Key_Direction_R] = "direction_r";
+      keyMapper[Qt::Key_Space] = "space";
+      keyMapper[Qt::Key_Any] = "any";
+      keyMapper[Qt::Key_Exclam] = "exclam";
+      keyMapper[Qt::Key_QuoteDbl] = "quotedbl";
+      keyMapper[Qt::Key_NumberSign] = "numbersign";
+      keyMapper[Qt::Key_Dollar] = "dollar";
+      keyMapper[Qt::Key_Percent] = "percent";
+      keyMapper[Qt::Key_Ampersand] = "ampersand";
+      keyMapper[Qt::Key_Apostrophe] = "apostrophe";
+      keyMapper[Qt::Key_ParenLeft] = "parenleft";
+      keyMapper[Qt::Key_ParenRight] = "parenright";
+      keyMapper[Qt::Key_Asterisk] = "asterisk";
+      keyMapper[Qt::Key_Plus] = "plus";
+      keyMapper[Qt::Key_Comma] = "comma";
+      keyMapper[Qt::Key_Minus] = "minus";
+      keyMapper[Qt::Key_Period] = "period";
+      keyMapper[Qt::Key_Slash] = "slash";
+      keyMapper[Qt::Key_0] = "0";
+      keyMapper[Qt::Key_1] = "1";
+      keyMapper[Qt::Key_2] = "2";
+      keyMapper[Qt::Key_3] = "3";
+      keyMapper[Qt::Key_4] = "4";
+      keyMapper[Qt::Key_5] = "5";
+      keyMapper[Qt::Key_6] = "6";
+      keyMapper[Qt::Key_7] = "7";
+      keyMapper[Qt::Key_8] = "8";
+      keyMapper[Qt::Key_9] = "9";
+      keyMapper[Qt::Key_Colon] = "colon";
+      keyMapper[Qt::Key_Semicolon] = "semicolon";
+      keyMapper[Qt::Key_Less] = "less";
+      keyMapper[Qt::Key_Equal] = "equal";
+      keyMapper[Qt::Key_Greater] = "greater";
+      keyMapper[Qt::Key_Question] = "question";
+      keyMapper[Qt::Key_At] = "at";
+      keyMapper[Qt::Key_A] = "a";
+      keyMapper[Qt::Key_B] = "b";
+      keyMapper[Qt::Key_C] = "c";
+      keyMapper[Qt::Key_D] = "d";
+      keyMapper[Qt::Key_E] = "e";
+      keyMapper[Qt::Key_F] = "f";
+      keyMapper[Qt::Key_G] = "g";
+      keyMapper[Qt::Key_H] = "h";
+      keyMapper[Qt::Key_I] = "i";
+      keyMapper[Qt::Key_J] = "j";
+      keyMapper[Qt::Key_K] = "k";
+      keyMapper[Qt::Key_L] = "l";
+      keyMapper[Qt::Key_M] = "m";
+      keyMapper[Qt::Key_N] = "n";
+      keyMapper[Qt::Key_O] = "o";
+      keyMapper[Qt::Key_P] = "p";
+      keyMapper[Qt::Key_Q] = "q";
+      keyMapper[Qt::Key_R] = "r";
+      keyMapper[Qt::Key_S] = "s";
+      keyMapper[Qt::Key_T] = "t";
+      keyMapper[Qt::Key_U] = "u";
+      keyMapper[Qt::Key_V] = "v";
+      keyMapper[Qt::Key_W] = "w";
+      keyMapper[Qt::Key_X] = "x";
+      keyMapper[Qt::Key_Y] = "y";
+      keyMapper[Qt::Key_Z] = "z";
+      keyMapper[Qt::Key_BracketLeft] = "bracketleft";
+      keyMapper[Qt::Key_Backslash] = "backslash";
+      keyMapper[Qt::Key_BracketRight] = "bracketright";
+      keyMapper[Qt::Key_AsciiCircum] = "asciicircum";
+      keyMapper[Qt::Key_Underscore] = "underscore";
+      keyMapper[Qt::Key_QuoteLeft] = "quoteleft";
+      keyMapper[Qt::Key_BraceLeft] = "braceleft";
+      keyMapper[Qt::Key_Bar] = "bar";
+      keyMapper[Qt::Key_BraceRight] = "braceright";
+      keyMapper[Qt::Key_AsciiTilde] = "asciitilde";
+
+      keyMapper[Qt::Key_nobreakspace] = "nobreakspace";
+      keyMapper[Qt::Key_exclamdown] = "exclamdown";
+      keyMapper[Qt::Key_cent] = "cent";
+      keyMapper[Qt::Key_sterling] = "sterling";
+      keyMapper[Qt::Key_currency] = "currency";
+      keyMapper[Qt::Key_yen] = "yen";
+      keyMapper[Qt::Key_brokenbar] = "brokenbar";
+      keyMapper[Qt::Key_section] = "section";
+      keyMapper[Qt::Key_diaeresis] = "diaeresis";
+      keyMapper[Qt::Key_copyright] = "copyright";
+      keyMapper[Qt::Key_ordfeminine] = "ordfeminine";
+      keyMapper[Qt::Key_guillemotleft] = "guillemotleft";
+      keyMapper[Qt::Key_notsign] = "notsign";
+      keyMapper[Qt::Key_hyphen] = "hyphen";
+      keyMapper[Qt::Key_registered] = "registered";
+      keyMapper[Qt::Key_macron] = "macron";
+      keyMapper[Qt::Key_degree] = "degree";
+      keyMapper[Qt::Key_plusminus] = "plusminus";
+      keyMapper[Qt::Key_twosuperior] = "twosuperior";
+      keyMapper[Qt::Key_threesuperior] = "threesuperior";
+      keyMapper[Qt::Key_acute] = "acute";
+      keyMapper[Qt::Key_mu] = "mu";
+      keyMapper[Qt::Key_paragraph] = "paragraph";
+      keyMapper[Qt::Key_periodcentered] = "periodcentered";
+      keyMapper[Qt::Key_cedilla] = "cedilla";
+      keyMapper[Qt::Key_onesuperior] = "onesuperior";
+      keyMapper[Qt::Key_masculine] = "masculine";
+      keyMapper[Qt::Key_guillemotright] = "guillemotright";
+      keyMapper[Qt::Key_onequarter] = "onequarter";
+      keyMapper[Qt::Key_onehalf] = "onehalf";
+      keyMapper[Qt::Key_threequarters] = "threequarters";
+      keyMapper[Qt::Key_questiondown] = "questiondown";
+      keyMapper[Qt::Key_Agrave] = "agrave";
+      keyMapper[Qt::Key_Aacute] = "aacute";
+      keyMapper[Qt::Key_Acircumflex] = "acircumflex";
+      keyMapper[Qt::Key_Atilde] = "atilde";
+      keyMapper[Qt::Key_Adiaeresis] = "adiaeresis";
+      keyMapper[Qt::Key_Aring] = "aring";
+      keyMapper[Qt::Key_AE] = "ae";
+      keyMapper[Qt::Key_Ccedilla] = "ccedilla";
+      keyMapper[Qt::Key_Egrave] = "egrave";
+      keyMapper[Qt::Key_Eacute] = "eacute";
+      keyMapper[Qt::Key_Ecircumflex] = "ecircumflex";
+      keyMapper[Qt::Key_Ediaeresis] = "ediaeresis";
+      keyMapper[Qt::Key_Igrave] = "igrave";
+      keyMapper[Qt::Key_Iacute] = "iacute";
+      keyMapper[Qt::Key_Icircumflex] = "icircumflex";
+      keyMapper[Qt::Key_Idiaeresis] = "idiaeresis";
+      keyMapper[Qt::Key_ETH] = "eth";
+      keyMapper[Qt::Key_Ntilde] = "ntilde";
+      keyMapper[Qt::Key_Ograve] = "ograve";
+      keyMapper[Qt::Key_Oacute] = "oacute";
+      keyMapper[Qt::Key_Ocircumflex] = "ocircumflex";
+      keyMapper[Qt::Key_Otilde] = "otilde";
+      keyMapper[Qt::Key_Odiaeresis] = "odiaeresis";
+      keyMapper[Qt::Key_multiply] = "multiply";
+      keyMapper[Qt::Key_Ooblique] = "ooblique";
+      keyMapper[Qt::Key_Ugrave] = "ugrave";
+      keyMapper[Qt::Key_Uacute] = "uacute";
+      keyMapper[Qt::Key_Ucircumflex] = "ucircumflex";
+      keyMapper[Qt::Key_Udiaeresis] = "udiaeresis";
+      keyMapper[Qt::Key_Yacute] = "yacute";
+      keyMapper[Qt::Key_THORN] = "thorn";
+      keyMapper[Qt::Key_ssharp] = "ssharp";
+      keyMapper[Qt::Key_division] = "division";
+      keyMapper[Qt::Key_ydiaeresis] = "ydiaeresis";
+    }
+
+  return keyMapper.value (key, std::string ("<unknown key>"));
+}
+
+}; //namespace KeyMap
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/KeyMap.h
@@ -0,0 +1,40 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles__KeyMap__
+#define __QtHandles__KeyMap__ 1
+
+#include <string>
+
+namespace QtHandles
+{
+
+namespace KeyMap
+{
+
+std::string qKeyToKeyString (int key);
+
+}; // namespace KeyMap
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ListBoxControl.cc
@@ -0,0 +1,177 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QListWidget>
+
+#include "Container.h"
+#include "ListBoxControl.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static void
+updateSelection (QListWidget* list, const Matrix& value)
+{
+  octave_idx_type n = value.numel ();
+  int lc = list->count ();
+
+  list->clearSelection ();
+
+  for (octave_idx_type i = 0; i < n; i++)
+    {
+      int idx = xround (value(i));
+
+      if (1 <= idx && idx <= lc)
+        {
+          list->item (idx-1)->setSelected (true);
+          if (i == 0
+              && list->selectionMode () == QAbstractItemView::SingleSelection)
+            break;
+        }
+      else
+        {
+          // Invalid selection.
+          list->clearSelection ();
+          break;
+        }
+    }
+}
+
+ListBoxControl*
+ListBoxControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new ListBoxControl (go, new QListWidget (container));
+    }
+
+  return 0;
+}
+
+ListBoxControl::ListBoxControl (const graphics_object& go, QListWidget* list)
+  : BaseControl (go, list), m_blockCallback (false)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  list->addItems (Utils::fromStringVector (up.get_string_vector ()));
+  if ((up.get_max () - up.get_min ()) > 1)
+    list->setSelectionMode (QAbstractItemView::ExtendedSelection);
+  else
+    list->setSelectionMode (QAbstractItemView::SingleSelection);
+  Matrix value = up.get_value ().matrix_value ();
+  if (value.numel () > 0)
+    {
+      octave_idx_type n = value.numel ();
+      int lc = list->count ();
+
+      for (octave_idx_type i = 0; i < n; i++)
+        {
+          int idx = xround (value(i));
+
+          if (1 <= idx && idx <= lc)
+            {
+              list->item (idx-1)->setSelected (true);
+              if (i == 0 && (list->selectionMode ()
+                             == QAbstractItemView::SingleSelection))
+                break;
+            }
+        }
+    }
+
+  list->removeEventFilter (this);
+  list->viewport ()->installEventFilter (this);
+
+  connect (list, SIGNAL (itemSelectionChanged (void)),
+           SLOT (itemSelectionChanged (void)));
+}
+
+ListBoxControl::~ListBoxControl (void)
+{
+}
+
+void
+ListBoxControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QListWidget* list = qWidget<QListWidget> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      m_blockCallback = true;
+      list->clear ();
+      list->addItems (Utils::fromStringVector (up.get_string_vector ()));
+      updateSelection (list, up.get_value ().matrix_value ());
+      m_blockCallback = false;
+      break;
+
+    case uicontrol::properties::ID_MIN:
+
+    case uicontrol::properties::ID_MAX:
+      if ((up.get_max () - up.get_min ()) > 1)
+        list->setSelectionMode (QAbstractItemView::ExtendedSelection);
+      else
+        list->setSelectionMode (QAbstractItemView::SingleSelection);
+      break;
+
+    case uicontrol::properties::ID_VALUE:
+      m_blockCallback = true;
+      updateSelection (list, up.get_value ().matrix_value ());
+      m_blockCallback = false;
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+void
+ListBoxControl::itemSelectionChanged (void)
+{
+  if (! m_blockCallback)
+    {
+      QListWidget* list = qWidget<QListWidget> ();
+
+      QModelIndexList l = list->selectionModel ()->selectedIndexes ();
+      Matrix value (dim_vector (1, l.size ()));
+      int i = 0;
+
+      foreach (const QModelIndex& idx, l)
+       value(i++) = (idx.row () + 1);
+
+      gh_manager::post_set (m_handle, "value", octave_value (value), false);
+      gh_manager::post_callback (m_handle, "callback");
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ListBoxControl.h
@@ -0,0 +1,55 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ListBoxControl__
+#define __QtHandles_ListBoxControl__ 1
+
+#include "BaseControl.h"
+
+class QListWidget;
+
+namespace QtHandles
+{
+
+class ListBoxControl : public BaseControl
+{
+  Q_OBJECT
+
+public:
+  ListBoxControl (const graphics_object& go, QListWidget* list);
+  ~ListBoxControl (void);
+
+  static ListBoxControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void itemSelectionChanged (void);
+
+private:
+  bool m_blockCallback;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Logger.cc
@@ -0,0 +1,88 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QMutex>
+#include <QMutexLocker>
+#include <QProcessEnvironment>
+
+#include <cstdio>
+
+#include "Logger.h"
+
+namespace QtHandles
+{
+
+Logger* Logger::s_instance = 0;
+QMutex* Logger::s_mutex = 0;
+
+Logger::Logger (void)
+  : m_debugEnabled (false)
+{
+  QProcessEnvironment pe (QProcessEnvironment::systemEnvironment ());
+
+  if (pe.value ("QTHANDLES_DEBUG", "0") != "0")
+    m_debugEnabled = true;
+}
+
+Logger::~Logger (void)
+{
+}
+
+Logger*
+Logger::instance (void)
+{
+  if (! s_instance)
+    {
+      s_instance = new Logger ();
+      s_mutex = new QMutex ();
+    }
+
+  return s_instance;
+}
+
+#define STATIC_LOGGER(fun) \
+  void Logger::fun (const char* fmt, ...) \
+  { \
+    QMutexLocker lock (s_mutex); \
+    va_list vl; \
+    va_start (vl, fmt); \
+    instance ()->fun ## V (fmt, vl); \
+    va_end (vl); \
+  }
+
+STATIC_LOGGER (debug)
+
+void
+Logger::debugV (const char* fmt, va_list arg)
+{
+  if (m_debugEnabled)
+    {
+      vfprintf (stderr, fmt, arg);
+      fprintf (stderr, "\n");
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Logger.h
@@ -0,0 +1,55 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Logger__
+#define __QtHandles_Logger__ 1
+
+#include <cstdarg>
+
+class QMutex;
+
+namespace QtHandles
+{
+
+class Logger
+{
+public:
+  static void debug (const char* fmt, ...);
+
+private:
+  bool m_debugEnabled;
+
+  static Logger* s_instance;
+  static QMutex* s_mutex;
+
+private:
+  Logger (void);
+  ~Logger (void);
+
+  static Logger* instance (void);
+
+  void debugV (const char* fmt, va_list arg);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Menu.cc
@@ -0,0 +1,328 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAction>
+#include <QMainWindow>
+#include <QMenu>
+#include <QMenuBar>
+
+#include "Figure.h"
+#include "Menu.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static QKeySequence
+accelSequence (const uimenu::properties& up)
+{
+  std::string s (up.get_accelerator ());
+
+  if (! s.empty ())
+    {
+      char c = s[0];
+      int keyMod = Qt::CTRL;
+
+      if (c >= 'A' && c <= 'Z')
+        keyMod |= Qt::SHIFT;
+      if (c >= 'a' && c <= 'z')
+        c -= ('a' - 'A');
+      if (c >= 'A' && c <= 'Z')
+        return QKeySequence (keyMod | static_cast<int> (c));
+    }
+
+  return QKeySequence ();
+}
+
+Menu*
+Menu::create (const graphics_object& go)
+{
+  Object* parent_obj = Object::parentObject (go);
+
+  if (parent_obj)
+    {
+      QObject* qObj = parent_obj->qObject ();
+
+      if (qObj)
+        return new Menu (go, new QAction (qObj), parent_obj);
+    }
+
+  return 0;
+}
+
+Menu::Menu (const graphics_object& go, QAction* action, Object* xparent)
+  : Object (go, action), m_parent (0), m_separator (0)
+{
+  uimenu::properties& up = properties<uimenu> ();
+
+  action->setText (Utils::fromStdString (up.get_label ()));
+
+  if (up.is_checked ())
+    {
+      action->setCheckable (true);
+      action->setChecked (up.is_checked ());
+    }
+
+  action->setEnabled (up.is_enable ());
+  action->setShortcut (accelSequence (up));
+  action->setVisible (up.is_visible ());
+
+  if (up.is_separator ())
+    {
+      m_separator = new QAction (action);
+      m_separator->setSeparator (true);
+      m_separator->setVisible (up.is_visible ());
+    }
+
+  MenuContainer* menuContainer = dynamic_cast<MenuContainer*> (xparent);
+
+  if (menuContainer)
+    m_parent = menuContainer->menu ();
+
+  if (m_parent)
+    {
+      int pos = static_cast<int> (up.get_position ());
+
+      if (pos <= 0)
+        {
+          if (m_separator)
+            m_parent->insertAction (0, m_separator);
+          m_parent->insertAction (0, action);
+
+          int count = 0;
+
+          foreach (QAction* a, m_parent->actions ())
+            if (! a->isSeparator () && a->objectName () != "builtinMenu")
+              count++;
+          up.get_property ("position").set
+            (octave_value (static_cast<double> (count)), true, false);
+        }
+      else
+        {
+
+          int count = 0;
+          QAction* before = 0;
+
+          foreach (QAction* a, m_parent->actions ())
+            if (! a->isSeparator () && a->objectName () != "builtinMenu")
+              {
+                count++;
+                if (pos <= count)
+                  {
+                    before = a;
+                    break;
+                  }
+              }
+
+          if (m_separator)
+            m_parent->insertAction (before, m_separator);
+          m_parent->insertAction (before, action);
+
+          if (before)
+            updateSiblingPositions ();
+          else
+            up.get_property ("position").set
+              (octave_value (static_cast<double> (count+1)), true, false);
+        }
+    }
+
+  connect (action, SIGNAL (triggered (bool)), SLOT (actionTriggered (void)));
+}
+
+Menu::~Menu (void)
+{
+}
+
+void
+Menu::update (int pId)
+{
+  uimenu::properties& up = properties<uimenu> ();
+  QAction* action = qWidget<QAction> ();
+
+  switch (pId)
+    {
+    case uimenu::properties::ID_LABEL:
+      action->setText (Utils::fromStdString (up.get_label ()));
+      break;
+
+    case uimenu::properties::ID_CHECKED:
+      if (up.is_checked ())
+        {
+          action->setCheckable (true);
+          action->setChecked (up.is_checked ());
+        }
+      else
+        {
+          action->setChecked (false);
+          action->setCheckable (false);
+        }
+      break;
+
+    case uimenu::properties::ID_ENABLE:
+      action->setEnabled (up.is_enable ());
+      break;
+
+    case uimenu::properties::ID_ACCELERATOR:
+      if (! action->menu ())
+        action->setShortcut (accelSequence (up));
+      break;
+
+    case uimenu::properties::ID_SEPARATOR:
+      if (up.is_separator ())
+        {
+          if (! m_separator)
+            {
+              m_separator = new QAction (action);
+              m_separator->setSeparator (true);
+              m_separator->setVisible (up.is_visible ());
+              if (m_parent)
+                m_parent->insertAction (action, m_separator);
+            }
+        }
+      else
+        {
+          if (m_separator)
+            delete m_separator;
+          m_separator = 0;
+        }
+      break;
+
+    case uimenu::properties::ID_VISIBLE:
+      action->setVisible (up.is_visible ());
+      if (m_separator)
+        m_separator->setVisible (up.is_visible ());
+      break;
+
+    case uimenu::properties::ID_POSITION:
+      {
+        if (m_separator)
+          m_parent->removeAction (m_separator);
+
+        m_parent->removeAction (action);
+
+        int pos = static_cast<int> (up.get_position ());
+        QAction* before = 0;
+
+        if (pos > 0)
+          {
+            int count = 0;
+
+            foreach (QAction* a, m_parent->actions ())
+              if (! a->isSeparator () && a->objectName () != "builtinMenu")
+                {
+                  count++;
+                  if (pos <= count)
+                    {
+                      before = a;
+                      break;
+                    }
+                }
+          }
+
+        if (m_separator)
+          m_parent->insertAction (before, m_separator);
+
+        m_parent->insertAction (before, action);
+
+        updateSiblingPositions ();
+      }
+      break;
+
+    default:
+      Object::update (pId);
+      break;
+    }
+}
+
+QWidget*
+Menu::menu (void)
+{
+  QAction* action = qWidget<QAction> ();
+  QMenu* _menu = action->menu ();
+
+  if (! _menu)
+    {
+      _menu = new QMenu (action->parentWidget ());
+      action->setMenu (_menu);
+      action->setShortcut (QKeySequence ());
+      connect (_menu, SIGNAL (aboutToShow (void)),
+               this, SLOT (actionHovered (void)));
+    }
+
+  return _menu;
+}
+
+void
+Menu::actionTriggered (void)
+{
+  QAction* action = qWidget<QAction> ();
+
+  if (action->isCheckable ())
+    action->setChecked (! action->isChecked ());
+  gh_manager::post_callback (m_handle, "callback");
+}
+
+void
+Menu::actionHovered (void)
+{
+  gh_manager::post_callback (m_handle, "callback");
+}
+
+void
+Menu::updateSiblingPositions (void)
+{
+  if (m_parent)
+    {
+      double count = 1.0;
+
+      foreach (QAction* a, m_parent->actions ())
+        {
+          if (! a->isSeparator () && a->objectName () != "builtinMenu")
+            {
+              Object* aObj = Object::fromQObject (a);
+
+              if (aObj)
+                {
+                  graphics_object go = aObj->object ();
+
+                  // Probably overkill as a uimenu child can only be another
+                  // uimenu object.
+                  if (go.isa ("uimenu"))
+                    {
+                      uimenu::properties& up = Utils::properties<uimenu> (go);
+
+                      up.get_property ("position").set
+                        (octave_value (count), true, false);
+                    }
+                }
+
+              count++;
+            }
+        }
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Menu.h
@@ -0,0 +1,67 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Menu__
+#define __QtHandles_Menu__ 1
+
+#include "MenuContainer.h"
+#include "Object.h"
+
+class QAction;
+class QMenu;
+class QWidget;
+
+namespace QtHandles
+{
+
+class Menu : public Object, public MenuContainer
+{
+  Q_OBJECT
+
+public:
+  Menu (const graphics_object& go, QAction* action, Object* parent);
+  ~Menu (void);
+
+  static Menu* create (const graphics_object& go);
+
+  Container* innerContainer (void) { return 0; }
+
+  QWidget* menu (void);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void actionTriggered (void);
+  void actionHovered (void);
+
+private:
+  void updateSiblingPositions (void);
+
+private:
+  QWidget* m_parent;
+  QAction* m_separator;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/MenuContainer.h
@@ -0,0 +1,39 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_MenuContainer__
+#define __QtHandles_MenuContainer__ 1
+
+class QWidget;
+
+namespace QtHandles
+{
+
+class MenuContainer
+{
+public:
+  virtual QWidget* menu (void) = 0;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/MouseModeActionGroup.cc
@@ -0,0 +1,112 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAction>
+#include <QIcon>
+
+#include "Figure.h"
+#include "MouseModeActionGroup.h"
+
+namespace QtHandles
+{
+
+MouseModeActionGroup::MouseModeActionGroup (QObject* xparent)
+  : QObject (xparent), m_current (0)
+{
+  m_actions.append (new QAction (QIcon (":/images/rotate.png"),
+                                 tr ("Rotate"), this));
+  QAction *zoom_in = new QAction ("Z+", this);
+  zoom_in->setToolTip (tr ("Zoom In")); 
+  m_actions.append (zoom_in);
+
+  QAction *zoom_out = new QAction ("Z-", this);
+  zoom_out->setToolTip (tr ("Zoom Out")); 
+  m_actions.append (zoom_out);
+
+  m_actions.append (new QAction (QIcon (":/images/pan.png"),
+                                 tr ("Pan"), this));
+  m_actions.append (new QAction (QIcon::fromTheme ("insert-text"),
+                                 tr ("Insert Text"), this));
+  m_actions.append (new QAction (QIcon (":/images/select.png"),
+                                 tr ("Select"), this));
+
+  foreach (QAction* a, m_actions)
+    {
+      a->setCheckable (true);
+      connect (a, SIGNAL (toggled (bool)), this, SLOT (actionToggled (bool)));
+    }
+}
+
+MouseModeActionGroup::~MouseModeActionGroup (void)
+{
+}
+
+void
+MouseModeActionGroup::actionToggled (bool checked)
+{
+  if (! checked)
+    {
+      if (sender () == m_current)
+        {
+          m_current = 0;
+          emit modeChanged (NoMode);
+        }
+    }
+  else
+    {
+      int i = m_actions.indexOf (qobject_cast<QAction*> (sender ()));
+
+      if (i >= 0)
+        {
+          m_current = m_actions[i];
+          for (int j = 0; j < m_actions.size (); j++)
+            {
+              // SelectMode cancels all the others but the button
+              // doesn't remain highlighed.
+
+              if (j != i || i+1 == SelectMode)
+                m_actions[j]->setChecked (false);
+            }
+
+          emit modeChanged (static_cast<MouseMode> (i+1));
+        }
+    }
+}
+
+void
+MouseModeActionGroup::setMode (MouseMode mode)
+{
+  for (int i = 0; i < m_actions.size (); i++)
+    m_actions[i]->setChecked (i+1 == mode);
+
+  // SelectMode cancels all the others but the button doesn't remain
+  // highlighed.
+
+  if (mode == SelectMode)
+    m_actions[SelectMode-1]->setChecked (false);
+}
+  
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/MouseModeActionGroup.h
@@ -0,0 +1,61 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_MouseModeActionGroup__
+#define __QtHandles_MouseModeActionGroup__ 1
+
+#include <QList>
+#include <QObject>
+
+#include "Figure.h"
+
+class QAction;
+
+namespace QtHandles
+{
+
+class MouseModeActionGroup : public QObject
+{
+  Q_OBJECT
+
+public:
+  MouseModeActionGroup (QObject* parent = 0);
+  ~MouseModeActionGroup (void);
+
+  QList<QAction*> actions (void) const { return m_actions; }
+
+  void setMode (MouseMode mode);
+
+signals:
+  void modeChanged (MouseMode mode);
+
+private slots:
+  void actionToggled (bool checked);
+
+private:
+  QList<QAction*> m_actions;
+  QAction* m_current;
+};
+
+};
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Object.cc
@@ -0,0 +1,191 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QString>
+#include <QVariant>
+
+#include "Backend.h"
+#include "Object.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+Object::Object (const graphics_object& go, QObject* obj)
+  : QObject (), m_handle (go.get_handle ()), m_qobject (0)
+{
+  gh_manager::auto_lock lock (false);
+
+  if (! lock)
+    qCritical ("QtHandles::Object::Object: "
+               "creating Object (h=%g) without a valid lock!!!",
+               m_handle.value ());
+
+  init (obj);
+}
+
+void
+Object::init (QObject* obj, bool)
+{
+  if (m_qobject)
+    qCritical ("QtHandles::Object::init: "
+               "resetting QObject while in invalid state");
+
+  m_qobject = obj;
+
+  if (m_qobject)
+    {
+      m_qobject->setProperty ("QtHandles::Object",
+                              qVariantFromValue<void*> (this));
+      connect (m_qobject, SIGNAL (destroyed (QObject*)),
+               SLOT (objectDestroyed (QObject*)));
+    }
+}
+
+Object::~Object (void)
+{
+}
+
+graphics_object
+Object::object (void) const
+{
+  gh_manager::auto_lock lock (false);
+
+  if (! lock)
+    qCritical ("QtHandles::Object::object: "
+               "accessing graphics object (h=%g) without a valid lock!!!",
+               m_handle.value ());
+
+  return gh_manager::get_object (m_handle);
+}
+
+void
+Object::slotUpdate (int pId)
+{
+  gh_manager::auto_lock lock;
+
+  switch (pId)
+    {
+    // Special case for objects being deleted, as it's very likely
+    // that the graphics_object already has been destroyed when this
+    // is executed (because of the async behavior).
+    case base_properties::ID_BEINGDELETED:
+      beingDeleted ();
+      break;
+
+    default:
+      if (object ().valid_object ())
+        update (pId);
+      break;
+    }
+}
+
+void
+Object::slotFinalize (void)
+{
+  gh_manager::auto_lock lock;
+
+  finalize ();
+}
+
+void
+Object::slotRedraw (void)
+{
+  gh_manager::auto_lock lock;
+
+  if (object ().valid_object ())
+    redraw ();
+}
+
+void
+Object::slotPrint (const QString& file_cmd, const QString& term)
+{
+  gh_manager::auto_lock lock;
+
+  if (object ().valid_object ())
+    print (file_cmd, term);
+}
+
+void
+Object::update (int /* pId */)
+{
+}
+
+void
+Object::finalize (void)
+{
+  if (m_qobject)
+    {
+      delete m_qobject;
+      m_qobject = 0;
+    }
+  deleteLater ();
+}
+
+void
+Object::redraw (void)
+{
+}
+
+void
+Object::print (const QString& /* file_cmd */, const QString& /* term */)
+{
+}
+
+void
+Object::beingDeleted (void)
+{
+}
+
+void Object::objectDestroyed (QObject* obj)
+{
+  if (obj && obj == m_qobject)
+    m_qobject = 0;
+}
+
+Object*
+Object::parentObject (const graphics_object& go)
+{
+  gh_manager::auto_lock lock;
+
+  Object* parent = Backend::toolkitObject
+    (gh_manager::get_object (go.get_parent ()));
+
+  return parent;
+}
+
+Object*
+Object::fromQObject (QObject* obj)
+{
+  QVariant v = obj->property ("QtHandles::Object");
+
+  if (v.isValid ())
+    return reinterpret_cast<Object*> (qVariantValue<void*> (v));
+
+  return 0;
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Object.h
@@ -0,0 +1,106 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Object__
+#define __QtHandles_Object__ 1
+
+#include <QObject>
+
+#include "graphics.h"
+
+class QObject;
+class QString;
+class QWidget;
+
+namespace QtHandles
+{
+
+class Container;
+class ObjectProxy;
+
+class Object : public QObject
+{
+  Q_OBJECT
+
+public:
+  Object (const graphics_object& go, QObject* obj = 0);
+
+  virtual ~Object (void);
+
+  base_properties& properties (void)
+    { return object ().get_properties (); }
+
+  const base_properties& properties (void) const
+    { return object ().get_properties (); }
+
+  template <class T>
+  typename T::properties& properties (void)
+    {
+      return dynamic_cast<typename T::properties&>
+        (object ().get_properties ());
+    }
+
+  template <class T>
+  const typename T::properties& properties (void) const
+    {
+      return dynamic_cast<const typename T::properties&>
+        (object ().get_properties ());
+    }
+
+  graphics_object object (void) const;
+
+  virtual QObject* qObject (void) { return m_qobject; }
+
+  template <class T>
+  T* qWidget (void) { return qobject_cast<T*>(qObject ()); }
+
+  virtual Container* innerContainer (void) = 0;
+
+  static Object* fromQObject (QObject* obj);
+
+public slots:
+  void slotUpdate (int pId);
+  void slotFinalize (void);
+  void slotRedraw (void);
+  void slotPrint (const QString& file_cmd, const QString& term);
+
+  void objectDestroyed (QObject *obj = 0);
+
+protected:
+  static Object* parentObject (const graphics_object& go);
+  void init (QObject* obj, bool callBase = false);
+
+  virtual void update (int pId);
+  virtual void finalize (void);
+  virtual void redraw (void);
+  virtual void print (const QString& file_cmd, const QString& term);
+
+  virtual void beingDeleted (void);
+
+protected:
+  graphics_handle m_handle;
+  QObject* m_qobject;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ObjectFactory.cc
@@ -0,0 +1,151 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QApplication>
+#include <QThread>
+
+#include "graphics.h"
+
+#include "Backend.h"
+#include "CheckBoxControl.h"
+#include "ContextMenu.h"
+#include "EditControl.h"
+#include "Figure.h"
+#include "ListBoxControl.h"
+#include "Logger.h"
+#include "Menu.h"
+#include "ObjectFactory.h"
+#include "ObjectProxy.h"
+#include "Panel.h"
+#include "PopupMenuControl.h"
+#include "PushButtonControl.h"
+#include "PushTool.h"
+#include "RadioButtonControl.h"
+#include "SliderControl.h"
+#include "TextControl.h"
+#include "ToggleButtonControl.h"
+#include "ToggleTool.h"
+#include "ToolBar.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+ObjectFactory*
+ObjectFactory::instance (void)
+{
+  static ObjectFactory s_instance;
+  static bool s_instanceCreated = false;
+
+  if (! s_instanceCreated)
+    {
+      if (QThread::currentThread () != QApplication::instance ()->thread ())
+        s_instance.moveToThread (QApplication::instance ()->thread ());
+      s_instanceCreated = true;
+    }
+
+  return &s_instance;
+}
+
+void
+ObjectFactory::createObject (double handle)
+{
+  gh_manager::auto_lock lock;
+
+  graphics_object go (gh_manager::get_object (graphics_handle (handle)));
+
+  if (go.valid_object ())
+    {
+      if (go.get_properties ().is_beingdeleted ())
+        qWarning ("ObjectFactory::createObject: object is being deleted");
+      else
+        {
+          ObjectProxy* proxy = Backend::toolkitObjectProxy (go);
+
+          if (proxy)
+            {
+              Logger::debug ("ObjectFactory::createObject: "
+                             "create %s from thread %08x",
+                             go.type ().c_str (), QThread::currentThreadId ());
+
+              Object* obj = 0;
+
+              if (go.isa ("figure"))
+                obj = Figure::create (go);
+              else if (go.isa ("uicontrol"))
+                {
+                  uicontrol::properties& up =
+                   Utils::properties<uicontrol> (go);
+
+                  if (up.style_is ("pushbutton"))
+                    obj = PushButtonControl::create (go);
+                  else if (up.style_is ("edit"))
+                    obj = EditControl::create (go);
+                  else if (up.style_is ("checkbox"))
+                    obj = CheckBoxControl::create (go);
+                  else if (up.style_is ("radiobutton"))
+                    obj = RadioButtonControl::create (go);
+                  else if (up.style_is ("togglebutton"))
+                    obj = ToggleButtonControl::create (go);
+                  else if (up.style_is ("text"))
+                    obj = TextControl::create (go);
+                  else if (up.style_is ("popupmenu"))
+                    obj = PopupMenuControl::create (go);
+                  else if (up.style_is ("slider"))
+                    obj = SliderControl::create (go);
+                  else if (up.style_is ("listbox"))
+                    obj = ListBoxControl::create (go);
+                }
+              else if (go.isa ("uipanel"))
+                obj = Panel::create (go);
+              else if (go.isa ("uimenu"))
+                obj = Menu::create (go);
+              else if (go.isa ("uicontextmenu"))
+                obj = ContextMenu::create (go);
+              else if (go.isa ("uitoolbar"))
+                obj = ToolBar::create (go);
+              else if (go.isa ("uipushtool"))
+                obj = PushTool::create (go);
+              else if (go.isa ("uitoggletool"))
+                obj = ToggleTool::create (go);
+              else
+                qWarning ("ObjectFactory::createObject: unsupported type `%s'",
+                          go.type ().c_str ());
+
+              if (obj)
+                proxy->setObject (obj);
+            }
+          else
+            qWarning ("ObjectFactory::createObject: no proxy for handle %g",
+                      handle);
+        }
+    }
+  else
+    qWarning ("ObjectFactory::createObject: invalid object for handle %g",
+              handle);
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ObjectFactory.h
@@ -0,0 +1,53 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ObjectFactory__
+#define __QtHandles_ObjectFactory__ 1
+
+#include <QObject>
+
+class graphics_object;
+
+namespace QtHandles
+{
+
+class Object;
+
+class ObjectFactory : public QObject
+{
+  Q_OBJECT
+
+public:
+  static ObjectFactory* instance (void);
+
+public slots:
+  void createObject (double handle);
+
+private:
+  ObjectFactory (void)
+    : QObject ()
+    { }
+};
+
+};
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ObjectProxy.cc
@@ -0,0 +1,111 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QString>
+
+#include "oct-mutex.h"
+
+#include "Object.h"
+#include "ObjectProxy.h"
+
+namespace QtHandles
+{
+
+ObjectProxy::ObjectProxy (Object* obj)
+  : QObject (), m_object (0)
+{
+  init (obj);
+}
+
+void
+ObjectProxy::init (Object* obj)
+{
+  if (obj != m_object)
+    {
+      if (m_object)
+        {
+          disconnect (this, SIGNAL (sendUpdate (int)),
+                      m_object, SLOT (slotUpdate (int)));
+          disconnect (this, SIGNAL (sendFinalize (void)),
+                      m_object, SLOT (slotFinalize (void)));
+          disconnect (this, SIGNAL (sendRedraw (void)),
+                      m_object, SLOT (slotRedraw (void)));
+          disconnect (this, SIGNAL (sendPrint (const QString&, const QString&)),
+                      m_object, SLOT (slotPrint (const QString&, const QString&)));
+        }
+
+      m_object = obj;
+
+      if (m_object)
+        {
+          connect (this, SIGNAL (sendUpdate (int)),
+                   m_object, SLOT (slotUpdate (int)));
+          connect (this, SIGNAL (sendFinalize (void)),
+                   m_object, SLOT (slotFinalize (void)));
+          connect (this, SIGNAL (sendRedraw (void)),
+                   m_object, SLOT (slotRedraw (void)));
+          connect (this, SIGNAL (sendPrint (const QString&, const QString&)),
+                   m_object, SLOT (slotPrint (const QString&, const QString&)));
+        }
+    }
+}
+
+void
+ObjectProxy::setObject (Object* obj)
+{
+  emit sendFinalize ();
+  init (obj);
+}
+
+void
+ObjectProxy::update (int pId)
+{
+  if (octave_thread::is_octave_thread ())
+    emit sendUpdate (pId);
+  else
+    m_object->slotUpdate (pId);
+}
+
+void
+ObjectProxy::finalize (void)
+{
+  emit sendFinalize ();
+  init (0);
+}
+
+void
+ObjectProxy::redraw (void)
+{
+  emit sendRedraw ();
+}
+
+void
+ObjectProxy::print (const QString& file_cmd, const QString& term)
+{
+  emit sendPrint (file_cmd, term);
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ObjectProxy.h
@@ -0,0 +1,65 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ObjectProxy__
+#define __QtHandles_ObjectProxy__ 1
+
+#include <QObject>
+
+class QString;
+
+namespace QtHandles
+{
+
+class Object;
+
+class ObjectProxy : public QObject
+{
+  Q_OBJECT
+
+public:
+   ObjectProxy (Object* obj = 0);
+
+   void update (int pId);
+   void finalize (void);
+   void redraw (void);
+   void print (const QString& file_cmd, const QString& term);
+
+   Object* object (void) { return m_object; }
+   void setObject (Object* obj);
+
+signals:
+   void sendUpdate (int pId);
+   void sendFinalize (void);
+   void sendRedraw (void);
+   void sendPrint (const QString& file_cmd, const QString& term);
+
+private:
+   void init (Object* obj);
+
+private:
+   Object* m_object;
+};
+
+};
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Panel.cc
@@ -0,0 +1,378 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QEvent>
+#include <QFrame>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QTimer>
+
+#include "Canvas.h"
+#include "Container.h"
+#include "ContextMenu.h"
+#include "Panel.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static int
+frameStyleFromProperties (const uipanel::properties& pp)
+{
+  if (pp.bordertype_is ("none"))
+    return QFrame::NoFrame;
+  else if (pp.bordertype_is ("etchedin"))
+    return (QFrame::Box | QFrame::Sunken);
+  else if (pp.bordertype_is ("etchedout"))
+    return (QFrame::Box | QFrame::Raised);
+  else if (pp.bordertype_is ("beveledin"))
+    return (QFrame::Panel | QFrame::Sunken);
+  else if (pp.bordertype_is ("beveledout"))
+    return (QFrame::Panel | QFrame::Raised);
+  else
+    return (QFrame::Panel | QFrame::Plain);
+}
+
+static void
+setupPalette (const uipanel::properties& pp, QPalette& p)
+{
+  p.setColor (QPalette::Window,
+              Utils::fromRgb (pp.get_backgroundcolor_rgb ()));
+  p.setColor (QPalette::WindowText,
+              Utils::fromRgb (pp.get_foregroundcolor_rgb ()));
+  p.setColor (QPalette::Light,
+              Utils::fromRgb (pp.get_highlightcolor_rgb ()));
+  p.setColor (QPalette::Dark,
+              Utils::fromRgb (pp.get_shadowcolor_rgb ()));
+}
+
+static int
+borderWidthFromProperties (const uipanel::properties& pp)
+{
+  int bw = 0;
+
+  if (! pp.bordertype_is ("none"))
+    {
+      bw = xround (pp.get_borderwidth ());
+      if (pp.bordertype_is ("etchedin") || pp.bordertype_is ("etchedout"))
+        bw *= 2;
+    }
+
+  return bw;
+}
+
+Panel*
+Panel::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new Panel (go, new QFrame (container));
+    }
+
+  return 0;
+}
+
+Panel::Panel (const graphics_object& go, QFrame* frame)
+  : Object (go, frame), m_container (0), m_title (0), m_blockUpdates (false)
+{
+  uipanel::properties& pp = properties<uipanel> ();
+
+  frame->setObjectName ("UIPanel");
+  frame->setAutoFillBackground (true);
+  Matrix bb = pp.get_boundingbox (false);
+  frame->setGeometry (xround (bb(0)), xround (bb(1)),
+                      xround (bb(2)), xround (bb(3)));
+  frame->setFrameStyle (frameStyleFromProperties (pp));
+  frame->setLineWidth (xround (pp.get_borderwidth ()));
+  QPalette pal = frame->palette ();
+  setupPalette (pp, pal);
+  frame->setPalette (pal);
+
+  m_container = new Container (frame);
+  m_container->canvas (m_handle);
+
+  if (frame->hasMouseTracking ())
+    {
+      foreach (QWidget* w, frame->findChildren<QWidget*> ())
+        { w->setMouseTracking (true); }
+    }
+
+  QString title = Utils::fromStdString (pp.get_title ());
+  if (! title.isEmpty ())
+    {
+      m_title = new QLabel (title, frame);
+      m_title->setAutoFillBackground (true);
+      m_title->setContentsMargins (4, 0, 4, 0);
+      m_title->setPalette (pal);
+      m_title->setFont (Utils::computeFont<uipanel> (pp, bb(3)));
+    }
+
+  frame->installEventFilter (this);
+  m_container->installEventFilter (this);
+
+  if (pp.is_visible ())
+    QTimer::singleShot (0, frame, SLOT (show (void)));
+  else
+    frame->hide ();
+}
+
+Panel::~Panel (void)
+{
+}
+
+bool
+Panel::eventFilter (QObject* watched, QEvent* xevent)
+{
+  if (! m_blockUpdates)
+    {
+      if (watched == qObject ())
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::Resize:
+                {
+                  gh_manager::auto_lock lock;
+                  graphics_object go = object ();
+
+                  if (go.valid_object ())
+                    {
+                      if (m_title)
+                        {
+                          const uipanel::properties& pp =
+                            Utils::properties<uipanel> (go);
+
+                          if (pp.fontunits_is ("normalized"))
+                            {
+                              QFrame* frame = qWidget<QFrame> ();
+
+                              m_title->setFont (Utils::computeFont<uipanel>
+                                                (pp, frame->height ()));
+                              m_title->resize (m_title->sizeHint ());
+                            }
+                        }
+                      updateLayout ();
+                    }
+                }
+              break;
+
+            case QEvent::MouseButtonPress:
+                {
+                  QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent);
+
+                  if (m->button () == Qt::RightButton)
+                    {
+                      gh_manager::auto_lock lock;
+
+                      ContextMenu::executeAt (properties (), m->globalPos ());
+                    }
+                }
+              break;
+
+            default:
+              break;
+            }
+        }
+      else if (watched == m_container)
+        {
+          switch (xevent->type ())
+            {
+            case QEvent::Resize:
+              if (qWidget<QWidget> ()->isVisible ())
+                {
+                  gh_manager::auto_lock lock;
+
+                  properties ().update_boundingbox ();
+                }
+              break;
+
+            default:
+              break;
+            }
+        }
+    }
+
+  return false;
+}
+
+void
+Panel::update (int pId)
+{
+  uipanel::properties& pp = properties<uipanel> ();
+  QFrame* frame = qWidget<QFrame> ();
+
+  m_blockUpdates = true;
+
+  switch (pId)
+    {
+    case uipanel::properties::ID_POSITION:
+      {
+        Matrix bb = pp.get_boundingbox (false);
+
+        frame->setGeometry (xround (bb(0)), xround (bb(1)),
+                            xround (bb(2)), xround (bb(3)));
+        updateLayout ();
+      }
+      break;
+
+    case uipanel::properties::ID_BORDERWIDTH:
+      frame->setLineWidth (xround (pp.get_borderwidth ()));
+      updateLayout ();
+      break;
+
+    case uipanel::properties::ID_BACKGROUNDCOLOR:
+    case uipanel::properties::ID_FOREGROUNDCOLOR:
+    case uipanel::properties::ID_HIGHLIGHTCOLOR:
+    case uipanel::properties::ID_SHADOWCOLOR:
+      {
+        QPalette pal = frame->palette ();
+
+        setupPalette (pp, pal);
+        frame->setPalette (pal);
+        if (m_title)
+          m_title->setPalette (pal);
+      }
+      break;
+
+    case uipanel::properties::ID_TITLE:
+      {
+        QString title = Utils::fromStdString (pp.get_title ());
+
+        if (title.isEmpty ())
+          {
+            if (m_title)
+              delete m_title;
+            m_title = 0;
+          }
+        else
+          {
+            if (! m_title)
+              {
+                QPalette pal = frame->palette ();
+
+                m_title = new QLabel (title, frame);
+                m_title->setAutoFillBackground (true);
+                m_title->setContentsMargins (4, 0, 4, 0);
+                m_title->setPalette (pal);
+                m_title->setFont (Utils::computeFont<uipanel> (pp));
+                m_title->show ();
+              }
+            else
+              {
+                m_title->setText (title);
+                m_title->resize (m_title->sizeHint ());
+              }
+          }
+        updateLayout ();
+      }
+      break;
+
+    case uipanel::properties::ID_TITLEPOSITION:
+      updateLayout ();
+      break;
+
+    case uipanel::properties::ID_BORDERTYPE:
+      frame->setFrameStyle (frameStyleFromProperties (pp));
+      updateLayout ();
+      break;
+
+    case uipanel::properties::ID_FONTNAME:
+    case uipanel::properties::ID_FONTSIZE:
+    case uipanel::properties::ID_FONTWEIGHT:
+    case uipanel::properties::ID_FONTANGLE:
+      if (m_title)
+        {
+          m_title->setFont (Utils::computeFont<uipanel> (pp));
+          m_title->resize (m_title->sizeHint ());
+          updateLayout ();
+        }
+      break;
+
+    case uipanel::properties::ID_VISIBLE:
+      frame->setVisible (pp.is_visible ());
+      updateLayout ();
+      break;
+
+    default:
+      break;
+    }
+
+  m_blockUpdates = false;
+}
+
+void
+Panel::redraw (void)
+{
+  Canvas* canvas = m_container->canvas (m_handle);
+
+  if (canvas)
+    canvas->redraw ();
+}
+
+void
+Panel::updateLayout (void)
+{
+  uipanel::properties& pp = properties<uipanel> ();
+  QFrame* frame = qWidget<QFrame> ();
+
+  Matrix bb = pp.get_boundingbox (true);
+  int bw = borderWidthFromProperties (pp);
+
+  frame->setFrameRect (QRect (xround (bb(0)) - bw, xround (bb(1)) - bw,
+                              xround (bb(2)) + 2*bw, xround (bb(3)) + 2*bw));
+  m_container->setGeometry (xround (bb(0)), xround (bb(1)),
+                            xround (bb(2)), xround (bb(3)));
+
+  if (m_blockUpdates)
+    pp.update_boundingbox ();
+
+  if (m_title)
+    {
+      QSize sz = m_title->sizeHint ();
+      int offset = 5;
+
+      if (pp.titleposition_is ("lefttop"))
+        m_title->move (bw+offset, 0);
+      else if (pp.titleposition_is ("righttop"))
+        m_title->move (frame->width () - bw - offset - sz.width (), 0);
+      else if (pp.titleposition_is ("leftbottom"))
+        m_title->move (bw+offset, frame->height () - sz.height ());
+      else if (pp.titleposition_is ("rightbottom"))
+        m_title->move (frame->width () - bw - offset - sz.width (),
+                       frame->height () - sz.height ());
+      else if (pp.titleposition_is ("centertop"))
+        m_title->move (frame->width () / 2 - sz.width () / 2, 0);
+      else if (pp.titleposition_is ("centerbottom"))
+        m_title->move (frame->width () / 2 - sz.width () / 2,
+                       frame->height () - sz.height ());
+    }
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/Panel.h
@@ -0,0 +1,63 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Panel__
+#define __QtHandles_Panel__ 1
+
+#include "Object.h"
+
+class QFrame;
+class QLabel;
+
+namespace QtHandles
+{
+
+class Container;
+
+class Panel : public Object
+{
+public:
+  Panel (const graphics_object& go, QFrame* frame);
+  ~Panel (void);
+
+  Container* innerContainer (void) { return m_container; }
+
+  bool eventFilter (QObject* watched, QEvent* event);
+
+  static Panel* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+  void redraw (void);
+
+private:
+  void updateLayout (void);
+
+private:
+  Container* m_container;
+  QLabel* m_title;
+  bool m_blockUpdates;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PopupMenuControl.cc
@@ -0,0 +1,147 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QComboBox>
+
+#include "Container.h"
+#include "PopupMenuControl.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+PopupMenuControl*
+PopupMenuControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new PopupMenuControl (go, new QComboBox (container));
+    }
+
+  return 0;
+}
+
+PopupMenuControl::PopupMenuControl (const graphics_object& go, QComboBox *box)
+  : BaseControl (go, box), m_blockUpdate (false)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  box->addItems (Utils::fromStdString (up.get_string_string ()).split ('|'));
+
+  update (uicontrol::properties::ID_VALUE);
+
+  connect (box, SIGNAL (currentIndexChanged (int)),
+           SLOT (currentIndexChanged (int)));
+}
+
+PopupMenuControl::~PopupMenuControl (void)
+{
+}
+
+void PopupMenuControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QComboBox* box = qWidget<QComboBox> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      m_blockUpdate = true;
+        {
+          int oldCurrent = box->currentIndex ();
+
+          box->clear ();
+          box->addItems (Utils::fromStdString
+                         (up.get_string_string ()).split ('|'));
+          if (box->count() > 0
+              && oldCurrent >= 0
+              && oldCurrent < box->count ())
+            {
+              box->setCurrentIndex (oldCurrent);
+            }
+          else
+            {
+              gh_manager::post_set (m_handle, "value",
+                                    octave_value (box->count () > 0
+                                                  ? 1.0 : 0.0),
+                                    false);
+            }
+        }
+      m_blockUpdate = false;
+      break;
+
+    case uicontrol::properties::ID_VALUE:
+      m_blockUpdate = true;
+        {
+          Matrix value = up.get_value ().matrix_value ();
+
+          if (value.numel () > 0)
+            {
+              if (value(0) !=  static_cast<int>(value(0)))
+                {
+                warning ("popupmenu value should be integer");
+                }
+              else
+                {
+                  int newIndex = int (value(0)) - 1;
+
+                  if (newIndex >= 0 && newIndex < box->count ())
+                    {
+                      if (newIndex != box->currentIndex ())
+                        box->setCurrentIndex (newIndex);
+                    }
+                  else
+                    warning ("popupmenu value not within valid display range");
+                }
+            }
+        }
+      m_blockUpdate = false;
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+void
+PopupMenuControl::currentIndexChanged (int index)
+{
+  if (! m_blockUpdate)
+    {
+      gh_manager::post_set (m_handle, "value",
+                            octave_value (double (index + 1)),
+                            false);
+      gh_manager::post_callback (m_handle, "callback");
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PopupMenuControl.h
@@ -0,0 +1,55 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_PopupMenuControl__
+#define __QtHandles_PopupMenuControl__ 1
+
+#include "BaseControl.h"
+
+class QComboBox;
+
+namespace QtHandles
+{
+
+class PopupMenuControl : public BaseControl
+{
+  Q_OBJECT
+
+public:
+  PopupMenuControl (const graphics_object& go, QComboBox* box);
+  ~PopupMenuControl (void);
+
+  static PopupMenuControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void currentIndexChanged (int index);
+
+private:
+  bool m_blockUpdate;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PushButtonControl.cc
@@ -0,0 +1,82 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QPushButton>
+#include <QtDebug>
+
+#include "PushButtonControl.h"
+#include "Container.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+PushButtonControl*
+PushButtonControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new PushButtonControl (go, new QPushButton (container));
+    }
+
+  return 0;
+}
+
+PushButtonControl::PushButtonControl (const graphics_object& go,
+                                      QPushButton* btn)
+  : ButtonControl (go, btn)
+{
+  btn->setAutoFillBackground (true);
+}
+
+PushButtonControl::~PushButtonControl (void)
+{
+}
+
+void
+PushButtonControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QPushButton* btn = qWidget<QPushButton> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      btn->setText (Utils::fromStdString (up.get_string_string ()));
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+}; // namespave QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PushButtonControl.h
@@ -0,0 +1,47 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_PushButtonControl__
+#define __QtHandles_PushButtonControl__ 1
+
+#include "ButtonControl.h"
+
+class QPushButton;
+
+namespace QtHandles
+{
+
+class PushButtonControl : public ButtonControl
+{
+public:
+  PushButtonControl (const graphics_object& go, QPushButton* btn);
+  ~PushButtonControl (void);
+
+  static PushButtonControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PushTool.cc
@@ -0,0 +1,77 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "PushTool.h"
+
+#include "ToolBarButton.cc"
+
+namespace QtHandles
+{
+
+PushTool*
+PushTool::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      QWidget* parentWidget = parent->qWidget<QWidget> ();
+
+      if (parentWidget)
+        return new PushTool (go, new QAction (parentWidget));
+    }
+
+  return 0;
+}
+
+PushTool::PushTool (const graphics_object& go, QAction* action)
+  : ToolBarButton<uipushtool> (go, action)
+{
+  connect (action, SIGNAL (triggered (bool)), this, SLOT (clicked (void)));
+}
+
+PushTool::~PushTool (void)
+{
+}
+
+void
+PushTool::update (int pId)
+{
+  switch (pId)
+    {
+    default:
+      ToolBarButton<uipushtool>::update (pId);
+      break;
+    }
+}
+
+void
+PushTool::clicked (void)
+{
+  gh_manager::post_callback (m_handle, "clickedcallback");
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/PushTool.h
@@ -0,0 +1,50 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_PushTool__
+#define __QtHandles_PushTool__ 1
+
+#include "ToolBarButton.h"
+
+namespace QtHandles
+{
+
+class PushTool : public ToolBarButton<uipushtool>
+{
+  Q_OBJECT
+
+public:
+  PushTool (const graphics_object& go, QAction* action);
+  ~PushTool (void);
+
+  static PushTool* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void clicked (void);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/QtHandlesUtils.cc
@@ -0,0 +1,380 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QApplication>
+#include <QKeyEvent>
+#include <QMouseEvent>
+
+#include <list>
+
+#include "ov.h"
+#include "graphics.h"
+
+#include "Backend.h"
+#include "Container.h"
+#include "KeyMap.h"
+#include "Object.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+namespace Utils
+{
+
+QString
+fromStdString (const std::string& s)
+{
+  return QString::fromLocal8Bit (s.c_str ());
+}
+
+std::string
+toStdString (const QString& s)
+{
+  return std::string (s.toLocal8Bit ().data ());
+}
+
+QStringList
+fromStringVector (const string_vector& v)
+{
+  QStringList l;
+  octave_idx_type n = v.length ();
+
+  for (octave_idx_type i = 0; i < n; i++)
+    l << fromStdString (v[i]);
+
+  return l;
+}
+
+string_vector
+toStringVector (const QStringList& l)
+{
+  string_vector v (l.length ());
+  int i = 0;
+
+  foreach (const QString& s, l)
+    v[i++] = toStdString (s);
+
+  return v;
+}
+
+Cell toCellString (const QStringList& l)
+{
+  QStringList tmp = l;
+
+  // dont get any empty lines from end of the list
+  while ((tmp.length () > 0) && (tmp.last ().length () == 0))
+    {
+      tmp.removeLast ();
+    }
+  // no strings will be a a 1x1 cell with empty string
+  if (tmp.length () == 0)
+    tmp += "";
+
+  Cell v(toStringVector (tmp));
+  return v;
+}
+
+template <class T>
+QFont
+computeFont (const typename T::properties& props, int height)
+{
+  QFont f (fromStdString (props.get_fontname ()));
+
+  static std::map<std::string, QFont::Weight> weightMap;
+  static std::map<std::string, QFont::Style> angleMap;
+  static bool mapsInitialized = false;
+
+  if (! mapsInitialized)
+    {
+      weightMap[std::string ("normal")] = QFont::Normal;
+      weightMap[std::string ("light")] = QFont::Light;
+      weightMap[std::string ("demi")] = QFont::DemiBold;
+      weightMap[std::string ("bold")] = QFont::Normal;
+
+      angleMap[std::string ("normal")] = QFont::StyleNormal;
+      angleMap[std::string ("italic")] = QFont::StyleItalic;
+      angleMap[std::string ("oblique")] = QFont::StyleOblique;
+
+      mapsInitialized = true;
+    }
+
+  f.setPointSizeF (props.get_fontsize_points (height));
+  f.setWeight (weightMap[props.get_fontweight ()]);
+  f.setStyle (angleMap[props.get_fontangle ()]);
+
+  return f;
+}
+
+template QFont computeFont<uicontrol> (const uicontrol::properties& props,
+                                       int height);
+
+template QFont computeFont<uipanel> (const uipanel::properties& props,
+                                     int height);
+
+QColor
+fromRgb (const Matrix& rgb)
+{
+  QColor c;
+
+  if (rgb.numel () == 3)
+    c.setRgbF (rgb(0), rgb(1), rgb(2));
+
+  return c;
+}
+
+Matrix
+toRgb (const QColor& c)
+{
+  Matrix rgb (1, 3);
+  double* rgbData = rgb.fortran_vec ();
+
+  c.getRgbF (rgbData, rgbData+1, rgbData+2);
+
+  return rgb;
+}
+
+std::string
+figureSelectionType (QMouseEvent* event, bool isDoubleClick)
+{
+  if (isDoubleClick)
+    return std::string ("open");
+  else
+    {
+      Qt::MouseButtons buttons = event->buttons ();
+      Qt::KeyboardModifiers mods = event->modifiers ();
+
+      if (mods == Qt::NoModifier)
+        {
+          if (buttons == Qt::LeftButton)
+            return std::string ("normal");
+          else if (buttons == Qt::RightButton)
+            return std::string ("alt");
+#if defined (Q_WS_WIN)
+          else if (buttons == (Qt::LeftButton|Qt::RightButton))
+            return std::string ("extend");
+#elif defined (Q_WS_X11)
+          else if (buttons == Qt::MidButton)
+            return std::string ("extend");
+#endif
+        }
+      else if (buttons == Qt::LeftButton)
+        {
+          if (mods == Qt::ShiftModifier)
+            return std::string ("extend");
+          else if (mods == Qt::ControlModifier)
+            return std::string ("alt");
+        }
+    }
+
+  return std::string ("normal");
+}
+
+/*
+   Two figureCurrentPoint() routines are required:
+   1) Used for QMouseEvents where cursor position data is in callback from Qt.
+   2) Used for QKeyEvents where cursor position must be determined.
+*/
+Matrix
+figureCurrentPoint (const graphics_object& fig, QMouseEvent* event)
+{
+  Object* tkFig = Backend::toolkitObject (fig);
+
+  if (tkFig)
+    {
+      Container* c = tkFig->innerContainer ();
+
+      if (c)
+        {
+          QPoint qp = c->mapFromGlobal (event->globalPos ());
+
+          return tkFig->properties<figure> ().map_from_boundingbox (qp.x (),
+                                                                    qp.y ());
+        }
+    }
+
+  return Matrix (1, 2, 0.0);
+}
+
+Matrix
+figureCurrentPoint (const graphics_object& fig)
+{
+  Object* tkFig = Backend::toolkitObject (fig);
+
+  if (tkFig)
+    {
+      Container* c = tkFig->innerContainer ();
+
+      if (c)
+        {
+          // FIXME: QCursor::pos() may give inaccurate results with asynchronous
+          //        window systems like X11 over ssh.
+          QPoint qp = c->mapFromGlobal (QCursor::pos ());
+
+          return tkFig->properties<figure> ().map_from_boundingbox (qp.x (),
+                                                                    qp.y ());
+        }
+    }
+
+  return Matrix (1, 2, 0.0);
+}
+
+Qt::Alignment
+fromHVAlign (const caseless_str& halign, const caseless_str& valign)
+{
+  Qt::Alignment flags;
+
+  if (halign.compare ("left"))
+    flags |= Qt::AlignLeft;
+  else if (halign.compare ("center"))
+    flags |= Qt::AlignHCenter;
+  else if (halign.compare ("right"))
+    flags |= Qt::AlignRight;
+  else
+    flags |= Qt::AlignLeft;
+
+  if (valign.compare ("middle"))
+    flags |= Qt::AlignVCenter;
+  else if (valign.compare ("top"))
+    flags |= Qt::AlignTop;
+  else if (valign.compare ("bottom"))
+    flags |= Qt::AlignBottom;
+  else
+    flags |= Qt::AlignVCenter;
+
+  return flags;
+}
+
+QImage
+makeImageFromCData (const octave_value& v, int width, int height)
+{
+  dim_vector dv (v.dims ());
+
+  if (dv.length () == 3 && dv(2) == 3)
+    {
+      int w = qMin (dv(1), static_cast<octave_idx_type> (width));
+      int h = qMin (dv(0), static_cast<octave_idx_type> (height));
+
+      int x_off = (w < width ? (width - w) / 2 : 0);
+      int y_off = (h < height ? (height - h) / 2 : 0);
+
+      QImage img (width, height, QImage::Format_ARGB32);
+      img.fill (qRgba (0, 0, 0, 0));
+
+      if (v.is_uint8_type ())
+        {
+          uint8NDArray d = v.uint8_array_value ();
+
+          for (int i = 0; i < w; i++)
+            for (int j = 0; j < h; j++)
+              {
+                int r = d(j, i, 0);
+                int g = d(j, i, 1);
+                int b = d(j, i, 2);
+                int a = 255;
+
+                img.setPixel (x_off + i, y_off + j, qRgba (r, g, b, a));
+              }
+        }
+      else if (v.is_single_type ())
+        {
+          FloatNDArray f = v.float_array_value ();
+
+          for (int i = 0; i < w; i++)
+            for (int j = 0; j < h; j++)
+              {
+                float r = f(j, i, 0);
+                float g = f(j, i, 1);
+                float b = f(j, i, 2);
+                int a = (xisnan (r) || xisnan (g) || xisnan (b) ? 0 : 255);
+
+                img.setPixel (x_off + i, y_off + j,
+                              qRgba (xround (r * 255),
+                                     xround (g * 255),
+                                     xround (b * 255),
+                                     a));
+              }
+        }
+      else if (v.is_real_type ())
+        {
+          NDArray d = v.array_value ();
+
+          for (int i = 0; i < w; i++)
+            for (int j = 0; j < h; j++)
+              {
+                double r = d(j, i, 0);
+                double g = d(j, i, 1);
+                double b = d(j, i, 2);
+                int a = (xisnan (r) || xisnan (g) || xisnan (b) ? 0 : 255);
+
+                img.setPixel (x_off + i, y_off + j,
+                              qRgba (xround (r * 255),
+                                     xround (g * 255),
+                                     xround (b * 255),
+                                     a));
+              }
+        }
+
+      return img;
+    }
+
+  return QImage ();
+}
+
+octave_scalar_map
+makeKeyEventStruct (QKeyEvent* event)
+{
+  octave_scalar_map retval;
+
+  retval.setfield ("Key", KeyMap::qKeyToKeyString (event->key ()));
+  retval.setfield ("Character", toStdString (event->text ()));
+
+  std::list<std::string> modList;
+  Qt::KeyboardModifiers mods = event->modifiers ();
+
+  if (mods & Qt::ShiftModifier)
+    modList.push_back ("shift");
+  if (mods & Qt::ControlModifier)
+#ifdef Q_OS_MAC
+    modList.push_back ("command");
+#else
+    modList.push_back ("control");
+#endif
+  if (mods & Qt::AltModifier)
+    modList.push_back ("alt");
+#ifdef Q_OS_MAC
+  if (mods & Qt::MetaModifier)
+    modList.push_back ("control");
+#endif
+
+  retval.setfield ("Modifier", Cell (modList));
+
+  return retval;
+}
+
+}; // namespace Utils
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/QtHandlesUtils.h
@@ -0,0 +1,85 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_Utils__
+#define __QtHandles_Utils__ 1
+
+#include <QColor>
+#include <QFont>
+#include <QImage>
+#include <QString>
+#include <QStringList>
+
+#include <string>
+
+#include "graphics.h"
+
+class QKeyEvent;
+class QMouseEvent;
+
+namespace QtHandles
+{
+
+namespace Utils
+{
+  QString fromStdString (const std::string& s);
+  std::string toStdString (const QString& s);
+
+  QStringList fromStringVector (const string_vector& v);
+  string_vector toStringVector (const QStringList& l);
+
+  Cell toCellString (const QStringList& l);
+
+  template <class T>
+  QFont computeFont (const typename T::properties& props, int height = -1);
+
+  QColor fromRgb (const Matrix& rgb);
+  Matrix toRgb (const QColor& c);
+
+  Qt::Alignment fromHVAlign (const caseless_str& halign,
+                             const caseless_str& valign);
+
+  std::string figureSelectionType (QMouseEvent* event,
+                                   bool isDoubleClick = false);
+
+  Matrix figureCurrentPoint (const graphics_object& fig, QMouseEvent* event);
+  Matrix figureCurrentPoint (const graphics_object& fig);
+
+  template <class T>
+  inline typename T::properties&
+  properties (graphics_object obj)
+    { return dynamic_cast<typename T::properties&> (obj.get_properties ()); }
+
+  template <class T>
+  inline typename T::properties&
+  properties (const graphics_handle& h)
+    { return Utils::properties<T> (gh_manager::get_object (h)); }
+
+  QImage makeImageFromCData (const octave_value& v, int width = -1,
+                             int height = -1);
+
+  octave_scalar_map makeKeyEventStruct (QKeyEvent* event);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/RadioButtonControl.cc
@@ -0,0 +1,64 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QRadioButton>
+
+#include "RadioButtonControl.h"
+#include "Container.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+RadioButtonControl*
+RadioButtonControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new RadioButtonControl (go, new QRadioButton (container));
+    }
+
+  return 0;
+}
+
+RadioButtonControl::RadioButtonControl (const graphics_object& go,
+                                        QRadioButton* radio)
+  : ButtonControl (go, radio)
+{
+  radio->setAutoFillBackground (true);
+  radio->setAutoExclusive (false);
+}
+
+RadioButtonControl::~RadioButtonControl (void)
+{
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/RadioButtonControl.h
@@ -0,0 +1,44 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_RadioButton__
+#define __QtHandles_RadioButton__ 1
+
+#include "ButtonControl.h"
+
+class QRadioButton;
+
+namespace QtHandles
+{
+
+class RadioButtonControl : public ButtonControl
+{
+public:
+  RadioButtonControl (const graphics_object& go, QRadioButton* box);
+  ~RadioButtonControl (void);
+
+  static RadioButtonControl* create (const graphics_object& go);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/SliderControl.cc
@@ -0,0 +1,155 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QScrollBar>
+
+#include "Container.h"
+#include "SliderControl.h"
+#include "QtHandlesUtils.h"
+
+#define RANGE_INT_MAX 1000000
+
+namespace QtHandles
+{
+
+SliderControl*
+SliderControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new SliderControl (go, new QScrollBar (container));
+    }
+
+  return 0;
+}
+
+SliderControl::SliderControl (const graphics_object& go,
+                              QAbstractSlider* slider)
+  : BaseControl (go, slider), m_blockUpdates (false)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  slider->setTracking (false);
+  Matrix bb = up.get_boundingbox ();
+  slider->setOrientation (bb(2) > bb(3) ? Qt::Horizontal : Qt::Vertical);
+  Matrix steps = up.get_sliderstep ().matrix_value ();
+  slider->setMinimum (0);
+  slider->setMaximum (RANGE_INT_MAX);
+  slider->setSingleStep (xround (steps(0) * RANGE_INT_MAX));
+  slider->setPageStep (xround (steps(1) * RANGE_INT_MAX));
+  Matrix value = up.get_value ().matrix_value ();
+  if (value.numel () > 0)
+    {
+      double dmin = up.get_min (), dmax = up.get_max ();
+
+      slider->setValue (xround (((value(0) - dmin) / (dmax - dmin))
+                                * RANGE_INT_MAX));
+    }
+
+  connect (slider, SIGNAL (valueChanged (int)), SLOT (valueChanged (int)));
+}
+
+SliderControl::~SliderControl (void)
+{
+}
+
+void
+SliderControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QScrollBar* slider = qWidget<QScrollBar> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_SLIDERSTEP:
+      {
+        Matrix steps = up.get_sliderstep ().matrix_value ();
+
+        slider->setSingleStep (xround (steps(0) * RANGE_INT_MAX));
+        slider->setPageStep (xround (steps(1) * RANGE_INT_MAX));
+      }
+      break;
+
+    case uicontrol::properties::ID_VALUE:
+      {
+        Matrix value = up.get_value ().matrix_value ();
+        double dmax = up.get_max (), dmin = up.get_min ();
+
+        if (value.numel () > 0)
+          {
+            int ival = xround (((value(0) - dmin) / (dmax - dmin))
+                               * RANGE_INT_MAX);
+
+            m_blockUpdates = true;
+            slider->setValue (ival);
+            m_blockUpdates = false;
+          }
+      }
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+void
+SliderControl::valueChanged (int ival)
+{
+  if (! m_blockUpdates)
+    {
+      gh_manager::auto_lock lock;
+      graphics_object go = object ();
+
+      if (go.valid_object ())
+        {
+          uicontrol::properties& up = Utils::properties<uicontrol> (go);
+
+          Matrix value = up.get_value ().matrix_value ();
+          double dmin = up.get_min (), dmax = up.get_max ();
+
+          int ival_tmp = (value.numel () > 0 ?
+                          xround (((value(0) - dmin) / (dmax - dmin))
+                                  * RANGE_INT_MAX) :
+                          0);
+
+          if (ival != ival_tmp || value.numel () > 0)
+            {
+              double dval = dmin + (ival * (dmax - dmin) / RANGE_INT_MAX);
+
+              gh_manager::post_set (m_handle, "value", octave_value (dval));
+              gh_manager::post_callback (m_handle, "callback");
+            }
+        }
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/SliderControl.h
@@ -0,0 +1,55 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_SliderControl__
+#define __QtHandles_SliderControl__ 1
+
+#include "BaseControl.h"
+
+class QAbstractSlider;
+
+namespace QtHandles
+{
+
+class SliderControl : public BaseControl
+{
+  Q_OBJECT
+
+public:
+  SliderControl (const graphics_object& go, QAbstractSlider* slider);
+  ~SliderControl (void);
+
+  static SliderControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void valueChanged (int ival);
+
+private:
+  bool m_blockUpdates;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/TextControl.cc
@@ -0,0 +1,93 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QLabel>
+
+#include "Container.h"
+#include "TextControl.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+TextControl*
+TextControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new TextControl (go, new QLabel (container));
+    }
+
+  return 0;
+}
+
+TextControl::TextControl (const graphics_object& go, QLabel* label)
+  : BaseControl (go, label)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+
+  label->setAutoFillBackground (true);
+  label->setTextFormat (Qt::PlainText);
+  label->setWordWrap (false);
+  label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                                           up.get_verticalalignment ()));
+  label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
+}
+
+TextControl::~TextControl (void)
+{
+}
+
+void
+TextControl::update (int pId)
+{
+  uicontrol::properties& up = properties<uicontrol> ();
+  QLabel* label = qWidget<QLabel> ();
+
+  switch (pId)
+    {
+    case uicontrol::properties::ID_STRING:
+      label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
+      break;
+
+    case uicontrol::properties::ID_HORIZONTALALIGNMENT:
+    case uicontrol::properties::ID_VERTICALALIGNMENT:
+      label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                                               up.get_verticalalignment ()));
+      break;
+
+    default:
+      BaseControl::update (pId);
+      break;
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/TextControl.h
@@ -0,0 +1,47 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_TextControl__
+#define __QtHandles_TextControl__ 1
+
+#include "BaseControl.h"
+
+class QLabel;
+
+namespace QtHandles
+{
+
+class TextControl : public BaseControl
+{
+public:
+  TextControl (const graphics_object& go, QLabel* label);
+  ~TextControl (void);
+
+  static TextControl* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/TextEdit.cc
@@ -0,0 +1,53 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QKeyEvent>
+
+#include "TextEdit.h"
+
+namespace QtHandles
+{
+
+void
+TextEdit::focusOutEvent (QFocusEvent* xevent)
+{
+  QTextEdit::focusOutEvent (xevent);
+
+  emit editingFinished ();
+}
+
+void
+TextEdit::keyPressEvent (QKeyEvent* xevent)
+{
+  QTextEdit::keyPressEvent (xevent);
+
+  if ((xevent->key () == Qt::Key_Return
+       || xevent->key () == Qt::Key_Enter)
+      && xevent->modifiers () == Qt::ControlModifier)
+    emit returnPressed ();
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/TextEdit.h
@@ -0,0 +1,50 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_TextEdit__
+#define __QtHandles_TextEdit__ 1
+
+#include <QTextEdit>
+
+namespace QtHandles
+{
+
+class TextEdit : public QTextEdit
+{
+  Q_OBJECT
+
+public:
+  TextEdit (QWidget* xparent) : QTextEdit(xparent) { }
+  ~TextEdit (void) { }
+
+signals:
+  void editingFinished (void);
+  void returnPressed (void);
+
+protected:
+  void focusOutEvent (QFocusEvent* event);
+  void keyPressEvent (QKeyEvent* event);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToggleButtonControl.cc
@@ -0,0 +1,64 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QPushButton>
+
+#include "ToggleButtonControl.h"
+#include "Container.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+ToggleButtonControl*
+ToggleButtonControl::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      Container* container = parent->innerContainer ();
+
+      if (container)
+        return new ToggleButtonControl (go, new QPushButton (container));
+    }
+
+  return 0;
+}
+
+ToggleButtonControl::ToggleButtonControl (const graphics_object& go,
+                                          QPushButton* btn)
+    : ButtonControl (go, btn)
+{
+  btn->setCheckable (true);
+  btn->setAutoFillBackground (true);
+}
+
+ToggleButtonControl::~ToggleButtonControl (void)
+{
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToggleButtonControl.h
@@ -0,0 +1,44 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ToggleButtonControl__
+#define __QtHandles_ToggleButtonControl__ 1
+
+#include "ButtonControl.h"
+
+class QPushButton;
+
+namespace QtHandles
+{
+
+class ToggleButtonControl : public ButtonControl
+{
+public:
+  ToggleButtonControl (const graphics_object& go, QPushButton* box);
+  ~ToggleButtonControl (void);
+
+  static ToggleButtonControl* create (const graphics_object& go);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToggleTool.cc
@@ -0,0 +1,95 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ToggleTool.h"
+
+#include "ToolBarButton.cc"
+
+namespace QtHandles
+{
+
+ToggleTool*
+ToggleTool::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      QWidget* parentWidget = parent->qWidget<QWidget> ();
+
+      if (parentWidget)
+        return new ToggleTool (go, new QAction (parentWidget));
+    }
+
+  return 0;
+}
+
+ToggleTool::ToggleTool (const graphics_object& go, QAction* action)
+  : ToolBarButton<uitoggletool> (go, action)
+{
+  uitoggletool::properties& tp = properties<uitoggletool> ();
+
+  action->setCheckable (true);
+  action->setChecked (tp.is_state ());
+
+  connect (action, SIGNAL (toggled (bool)),
+           this, SLOT (triggered (bool)));
+}
+
+ToggleTool::~ToggleTool (void)
+{
+}
+
+void
+ToggleTool::update (int pId)
+{
+  uitoggletool::properties& tp = properties<uitoggletool> ();
+  QAction* action = qWidget<QAction> ();
+
+  switch (pId)
+    {
+    case uitoggletool::properties::ID_STATE:
+      action->setChecked (tp.is_state ());
+      break;
+
+    default:
+      ToolBarButton<uitoggletool>::update (pId);
+      break;
+    }
+}
+
+void
+ToggleTool::triggered (bool checked)
+{
+  gh_manager::post_set (m_handle, "state", checked, false);
+  gh_manager::post_callback (m_handle,
+                             checked
+                             ? "oncallback"
+                             : "offcallback");
+  gh_manager::post_callback (m_handle, "clickedcallback");
+}
+
+};
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToggleTool.h
@@ -0,0 +1,50 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ToggleTool__
+#define __QtHandles_ToggleTool__ 1
+
+#include "ToolBarButton.h"
+
+namespace QtHandles
+{
+
+class ToggleTool : public ToolBarButton<uitoggletool>
+{
+  Q_OBJECT
+
+public:
+  ToggleTool (const graphics_object& go, QAction* action);
+  ~ToggleTool (void);
+
+  static ToggleTool* create (const graphics_object& go);
+
+protected:
+  void update (int pId);
+
+private slots:
+  void triggered (bool checked);
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToolBar.cc
@@ -0,0 +1,180 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAction>
+#include <QActionEvent>
+#include <QApplication>
+#include <QEvent>
+#include <QIcon>
+#include <QMainWindow>
+#include <QPixmap>
+#include <QTimer>
+#include <QToolBar>
+
+#include "Figure.h"
+#include "ToolBar.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static QAction*
+addEmptyAction (QToolBar* bar)
+{
+  static QIcon _empty;
+
+  if (_empty.isNull ())
+    {
+      QPixmap pix (16, 16);
+
+      pix.fill (Qt::transparent);
+
+      _empty = QIcon (pix);
+    }
+
+  QAction* a = bar->addAction (_empty, "Empty Toolbar");
+
+  a->setEnabled (false);
+  a->setToolTip ("");
+
+  return a;
+}
+
+ToolBar*
+ToolBar::create (const graphics_object& go)
+{
+  Object* parent = Object::parentObject (go);
+
+  if (parent)
+    {
+      QWidget* parentWidget = parent->qWidget<QWidget> ();
+
+      if (parentWidget)
+        return new ToolBar (go, new QToolBar (parentWidget));
+    }
+
+  return 0;
+}
+
+ToolBar::ToolBar (const graphics_object& go, QToolBar* bar)
+  : Object (go, bar), m_empty (0), m_figure (0)
+{
+  uitoolbar::properties& tp = properties<uitoolbar> ();
+
+  bar->setFloatable (false);
+  bar->setMovable (false);
+  bar->setVisible (tp.is_visible ());
+
+  m_empty = addEmptyAction (bar);
+
+  m_figure =
+    dynamic_cast<Figure*> (Object::fromQObject (bar->parentWidget ()));
+
+  if (m_figure)
+    m_figure->addCustomToolBar (bar, tp.is_visible ());
+
+  bar->installEventFilter (this);
+}
+
+ToolBar::~ToolBar (void)
+{
+}
+
+void
+ToolBar::update (int pId)
+{
+  uitoolbar::properties& tp = properties<uitoolbar> ();
+  QToolBar* bar = qWidget<QToolBar> ();
+
+  switch (pId)
+    {
+    case base_properties::ID_VISIBLE:
+      if (m_figure)
+        m_figure->showCustomToolBar (bar, tp.is_visible ());
+      break;
+
+    default:
+      Object::update (pId);
+      break;
+    }
+}
+
+bool
+ToolBar::eventFilter (QObject* watched, QEvent* xevent)
+{
+  if (watched == qObject ())
+    {
+      switch (xevent->type ())
+        {
+        case QEvent::ActionAdded:
+        case QEvent::ActionRemoved:
+            {
+              QActionEvent* ae = dynamic_cast<QActionEvent*> (xevent);
+              QToolBar* bar = qWidget<QToolBar> ();
+
+              if (ae->action () != m_empty)
+                {
+                  if (xevent->type () == QEvent::ActionAdded)
+                    {
+                      if (bar->actions ().size () == 2)
+                        QTimer::singleShot (0, this, SLOT (hideEmpty (void)));
+                    }
+                  else
+                    {
+                      if (bar->actions ().size () == 1)
+                        m_empty->setVisible (true);
+                    }
+                }
+            }
+          break;
+
+        default:
+          break;
+        }
+    }
+
+  return false;
+}
+
+void
+ToolBar::hideEmpty (void)
+{
+  m_empty->setVisible (false);
+}
+
+void
+ToolBar::beingDeleted (void)
+{
+  if (m_figure)
+    {
+      QToolBar* bar = qWidget<QToolBar> ();
+
+      if (bar)
+        m_figure->showCustomToolBar (bar, false);
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToolBar.h
@@ -0,0 +1,64 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ToolBar__
+#define __QtHandles_ToolBar__ 1
+
+#include "Object.h"
+
+class QAction;
+class QToolBar;
+
+namespace QtHandles
+{
+
+class Figure;
+
+class ToolBar : public Object
+{
+  Q_OBJECT
+
+public:
+  ToolBar (const graphics_object& go, QToolBar* bar);
+  ~ToolBar (void);
+
+  static ToolBar* create (const graphics_object& go);
+
+  Container* innerContainer (void) { return 0; }
+
+  bool eventFilter (QObject* watched, QEvent* event);
+
+protected:
+  void update (int pId);
+  void beingDeleted (void);
+
+private slots:
+  void hideEmpty (void);
+
+private:
+  QAction* m_empty;
+  Figure* m_figure;
+};
+
+}; // namespace QtHandles
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToolBarButton.cc
@@ -0,0 +1,125 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QAction>
+#include <QWidget>
+
+#include "ToolBarButton.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+template <class T>
+ToolBarButton<T>::ToolBarButton (const graphics_object& go, QAction* action)
+  : Object (go, action), m_separator (0)
+{
+  typename T::properties& tp = properties<T> ();
+
+  action->setToolTip (Utils::fromStdString (tp.get_tooltipstring ()));
+  action->setVisible (tp.is_visible ());
+  QImage img = Utils::makeImageFromCData (tp.get_cdata (), 16, 16);
+  action->setIcon (QIcon (QPixmap::fromImage (img)));
+  if (tp.is_separator ())
+    {
+      m_separator = new QAction (action);
+      m_separator->setSeparator (true);
+      m_separator->setVisible (tp.is_visible ());
+    }
+  action->setEnabled (tp.is_enable ());
+
+  QWidget* w = qobject_cast<QWidget*> (action->parent ());
+
+  w->insertAction (w->actions ().back (), action);
+  if (m_separator)
+    w->insertAction (action, m_separator);
+}
+
+template <class T>
+ToolBarButton<T>::~ToolBarButton (void)
+{
+}
+
+template <class T>
+void
+ToolBarButton<T>::update (int pId)
+{
+  typename T::properties& tp = properties<T> ();
+  QAction* action = qWidget<QAction> ();
+
+  switch (pId)
+    {
+    case base_properties::ID_VISIBLE:
+      action->setVisible (tp.is_visible ());
+      if (m_separator)
+        m_separator->setVisible (tp.is_visible ());
+      break;
+
+    case T::properties::ID_TOOLTIPSTRING:
+      action->setToolTip (Utils::fromStdString (tp.get_tooltipstring ()));
+      break;
+
+    case T::properties::ID_CDATA:
+      {
+        QImage img = Utils::makeImageFromCData (tp.get_cdata (), 16, 16);
+
+        action->setIcon (QIcon (QPixmap::fromImage (img)));
+      }
+      break;
+
+    case T::properties::ID_SEPARATOR:
+      if (tp.is_separator ())
+        {
+          if (! m_separator)
+            {
+              m_separator = new QAction (action);
+              m_separator->setSeparator (true);
+              m_separator->setVisible (tp.is_visible ());
+
+              QWidget* w = qobject_cast<QWidget*> (action->parent ());
+
+              w->insertAction (action, m_separator);
+            }
+        }
+      else
+        {
+          if (m_separator)
+            delete m_separator;
+          m_separator = 0;
+        }
+      break;
+
+    case T::properties::ID_ENABLE:
+      action->setEnabled (tp.is_enable ());
+      break;
+
+    default:
+      Object::update (pId);
+      break;
+    }
+}
+
+}; // namespace QtHandles
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/ToolBarButton.h
@@ -0,0 +1,53 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_ToolBarButton__
+#define __QtHandles_ToolBarButton__ 1
+
+#include "Object.h"
+
+class QAction;
+
+namespace QtHandles
+{
+
+class Container;
+
+template <class T>
+class ToolBarButton : public Object
+{
+public:
+  ToolBarButton (const graphics_object& go, QAction* action);
+  ~ToolBarButton (void);
+
+  Container* innerContainer (void) { return 0; }
+
+protected:
+  void update (int pId);
+
+private:
+  QAction* m_separator;
+};
+
+};
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/__init_qt__.cc
@@ -0,0 +1,340 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QApplication>
+#include <QDir>
+#include <QFileDialog>
+#include <QMetaType>
+#include <QPalette>
+#include <QRegExp>
+
+#include "graphics.h"
+#include "toplev.h"
+#include "defun.h"
+
+#include "Backend.h"
+#include "QtHandlesUtils.h"
+
+namespace QtHandles
+{
+
+static bool qtHandlesInitialized = false;
+
+bool
+__init__ (void)
+{
+  if (! qtHandlesInitialized)
+    {
+      if (qApp)
+        {
+          gh_manager::auto_lock lock;
+
+          qRegisterMetaType<graphics_object> ("graphics_object");
+
+          gh_manager::enable_event_processing (true);
+
+          graphics_toolkit tk (new Backend ());
+          gtk_manager::load_toolkit (tk);
+
+          octave_add_atexit_function ("__shutdown_qt__");
+
+          // Change some default settings to use Qt default colors
+          QPalette p;
+          graphics_object root = gh_manager::get_object (0);
+
+          /*
+          root.set ("defaultfigurecolor",
+                    octave_value (Utils::toRgb (p.color (QPalette::Window))));
+          */
+          root.set ("defaultuicontrolbackgroundcolor",
+                    octave_value (Utils::toRgb (p.color (QPalette::Window))));
+          root.set ("defaultuicontrolforegroundcolor",
+                    octave_value (Utils::toRgb
+                                  (p.color (QPalette::WindowText))));
+          root.set ("defaultuipanelbackgroundcolor",
+                    octave_value (Utils::toRgb (p.color (QPalette::Window))));
+          root.set ("defaultuipanelforegroundcolor",
+                    octave_value (Utils::toRgb
+                                  (p.color (QPalette::WindowText))));
+          root.set ("defaultuipanelhighlightcolor",
+                    octave_value (Utils::toRgb (p.color (QPalette::Light))));
+          root.set ("defaultuipanelshadowcolor",
+                    octave_value (Utils::toRgb (p.color (QPalette::Dark))));
+
+          qtHandlesInitialized = true;
+
+          return true;
+        }
+      else
+        error ("__init_qt__: QApplication object must exist.");
+    }
+
+  return false;
+}
+
+bool
+__shutdown__ (void)
+{
+  if (qtHandlesInitialized)
+    {
+      gh_manager::auto_lock lock;
+
+      octave_add_atexit_function ("__shutdown_qt__");
+
+      gtk_manager::unload_toolkit ("qt");
+
+      gh_manager::enable_event_processing (false);
+
+      qtHandlesInitialized = false;
+
+      return true;
+    }
+
+  return false;
+}
+
+}; // namespace QtHandles
+
+DEFUN (__init_qt__, , , "")
+{
+  QtHandles::__init__ ();
+
+  return octave_value ();
+}
+
+DEFUN (__shutdown_qt__, , , "")
+{
+  QtHandles::__shutdown__ ();
+
+  return octave_value ();
+}
+
+void
+install___init_qt___functions (void)
+{
+  install_builtin_function (F__init_qt__, "__init_qt__",
+                            "__init_qt__.cc", "");
+
+  install_builtin_function (F__shutdown_qt__, "__shutdown_qt__",
+                            "__init_qt__.cc", "");
+}
+
+#if 0
+
+static QStringList
+makeFilterSpecs (const Cell& filters)
+{
+  using namespace QtHandles::Utils;
+
+  QStringList filterSpecs;
+  QRegExp parenRe (" ?\\(.*\\)\\s*$");
+
+  for (int i = 0; i < filters.rows (); i++)
+    {
+      QStringList extList =
+        fromStdString (filters(i, 0).string_value ()).split (";");
+      QString desc = fromStdString (filters(i, 1).string_value ()).trimmed ();
+      QString specItem;
+
+      if (desc.contains (parenRe))
+        {
+          // We need to strip any existing parenthesis and recreate it.
+          // In case the format specified in the () section is not correct,
+          // the filters won't work as expected.
+          desc.remove (parenRe);
+        }
+
+      specItem = QString ("%1 (%2)").arg (desc).arg (extList.join (" "));
+
+      filterSpecs.append (specItem);
+    }
+
+  return filterSpecs;
+}
+
+static QString
+appendDirSep (const QString& d)
+{
+  if (! d.endsWith ("/") && ! d.endsWith (QDir::separator ()))
+    return (d + "/");
+  return d;
+}
+
+DEFUN (__uigetfile_qt__, args, , "")
+{
+  using namespace QtHandles::Utils;
+
+  // Expected arguments:
+  //   args(0) : File filter as a cell array {ext1, name1; ext2, name2; ...}
+  //   args(1) : Dialog title
+  //   args(2) : Default file name
+  //   args(3) : Dialog position [ignored]
+  //   args(4) : Multiselection "on"/"off"
+  //   args(5) : Default directory
+
+  octave_value_list retval (3);
+
+  QString caption = fromStdString (args(1).string_value ());
+  QString defaultDirectory = fromStdString (args(5).string_value ());
+  QString defaultFileName = fromStdString (args(2).string_value ());
+  bool isMultiSelect = (args(4).string_value () == "on");
+
+  if (isMultiSelect)
+    retval(0) = Cell ();
+  else
+    retval(0) = "";
+  retval(1) = "";
+  retval(2) = 0.0;
+
+  if (defaultFileName.isEmpty ())
+    defaultFileName = defaultDirectory;
+  else
+    defaultFileName = defaultDirectory + "/" + defaultFileName;
+
+  QStringList filterSpecs = makeFilterSpecs (args(0).cell_value ());
+
+  if (isMultiSelect)
+    {
+      QString filter;
+      QStringList files =
+        QFileDialog::getOpenFileNames (0, caption, defaultFileName,
+                                       filterSpecs.join (";;"), &filter, 0);
+
+      if (! files.isEmpty ())
+        {
+          Cell cFiles (1, files.length ());
+          QString dirName;
+          int i = 0;
+
+          foreach (const QString& s, files)
+            {
+              QFileInfo fi (s);
+
+              if (dirName.isEmpty ())
+                dirName = appendDirSep (fi.canonicalPath ());
+              cFiles(i++) = toStdString (fi.fileName ());
+            }
+
+          retval(0) = cFiles;
+          retval(1) = toStdString (dirName);
+          if (! filter.isEmpty ())
+            retval(2) = static_cast<double> (filterSpecs.indexOf (filter) + 1);
+        }
+    }
+  else
+    {
+      QString filter;
+      QString fileName =
+        QFileDialog::getOpenFileName (0, caption, defaultFileName,
+                                      filterSpecs.join (";;"), &filter, 0);
+
+      if (! fileName.isNull ())
+        {
+          QFileInfo fi (fileName);
+
+          retval(0) = toStdString (fi.fileName ());
+          retval(1) = toStdString (appendDirSep (fi.canonicalPath ()));
+          if (! filter.isEmpty ())
+            retval(2) = static_cast<double> (filterSpecs.indexOf (filter) + 1);
+        }
+    }
+
+  return retval;
+}
+
+DEFUN (__uiputfile_qt__, args, , "")
+{
+  using namespace QtHandles::Utils;
+
+  // Expected arguments:
+  //   args(0) : File filter as a cell array {ext1, name1; ext2, name2; ...}
+  //   args(1) : Dialog title
+  //   args(2) : Default file name
+  //   args(3) : Dialog position [ignored]
+  //   args(4) : Tag [ignored]
+  //   args(5) : Default directory
+
+  octave_value_list retval (3);
+
+  QString caption = fromStdString (args(1).string_value ());
+  QString defaultDirectory = fromStdString (args(5).string_value ());
+  QString defaultFileName = fromStdString (args(2).string_value ());
+
+  retval(0) = "";
+  retval(1) = "";
+  retval(2) = 0.0;
+
+  if (defaultFileName.isEmpty ())
+    defaultFileName = defaultDirectory;
+  else
+    defaultFileName = defaultDirectory + "/" + defaultFileName;
+
+  QStringList filterSpecs = makeFilterSpecs (args(0).cell_value ());
+
+  QString filter;
+  QString fileName =
+    QFileDialog::getSaveFileName (0, caption, defaultFileName,
+                                  filterSpecs.join (";;"), &filter, 0);
+
+  if (! fileName.isNull ())
+    {
+      QFileInfo fi (fileName);
+
+      retval(0) = toStdString (fi.fileName ());
+      if (fi.exists ())
+        retval(1) = toStdString (appendDirSep (fi.canonicalPath ()));
+      else
+        retval(1) = toStdString (appendDirSep (fi.absolutePath ()));
+      if (! filter.isEmpty ())
+        retval(2) = static_cast<double> (filterSpecs.indexOf (filter) + 1);
+    }
+
+  return retval;
+}
+
+DEFUN (__uigetdir_qt__, args, , "")
+{
+  using namespace QtHandles::Utils;
+
+  // Expected arguments:
+  //   args(0) : Start directory
+  //   args(1) : Dialog title
+
+  octave_value retval ("");
+
+  QString caption = fromStdString (args(1).string_value ());
+  QString defaultDirectory = fromStdString (args(0).string_value ());
+
+  QString dirName = QFileDialog::getExistingDirectory (0, caption,
+                                                       defaultDirectory);
+
+  if (! dirName.isNull ())
+    retval = toStdString (dirName);
+
+  return retval;
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/__init_qt__.h
@@ -0,0 +1,35 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_init_qt__
+#define __QtHandles_init_qt__ 1
+
+namespace QtHandles
+{
+
+bool __init__ (void);
+
+}; // namespace QtHandles
+
+extern void install___init_qt___functions (void);
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/annotation-dialog.cc
@@ -0,0 +1,262 @@
+/*
+
+Copyright (C) 2015 John Donoghue
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "annotation-dialog.h"
+#include "ui-annotation-dialog.h"
+
+#include "QtHandlesUtils.h"
+
+#include "resource-manager.h"
+
+#include <QColorDialog>
+#include <QPushButton>
+#include <QPalette>
+
+using namespace QtHandles;
+
+annotation_dialog::annotation_dialog (QWidget *p, const octave_value_list &pr):
+  QDialog (p), ui (new Ui::annotation_dialog)
+{
+  props = pr;
+
+  init ();
+}
+
+void
+annotation_dialog::init ()
+{
+  ui->setupUi (this);
+
+  QSettings *settings = resource_manager::get_settings ();
+
+  // restore last geometry
+  restoreGeometry (settings->value("annotation/geometry").toByteArray ());
+
+  // connect signals
+  connect (ui->button_box, SIGNAL (clicked (QAbstractButton *)),
+           this, SLOT (button_clicked (QAbstractButton *)));
+
+
+  connect (ui->edit_string, SIGNAL (textChanged (const QString&)), 
+           this, SLOT (edit_string_changed (const QString&)));
+
+  connect (ui->btn_color, SIGNAL (clicked ()),
+           this, SLOT (prompt_for_color ()));
+
+  connect (ui->btn_background_color, SIGNAL (clicked ()),
+           this, SLOT (prompt_for_color ()));
+
+  connect (ui->btn_edge_color, SIGNAL (clicked ()),
+           this, SLOT (prompt_for_color ()));
+
+  // set gui element to default values
+  ui->cb_fit_box_to_text->setChecked (true);
+  ui->cb_horz_align->setCurrentIndex ( ui->cb_horz_align->findText("left") );
+  ui->cb_vert_align->setCurrentIndex ( ui->cb_vert_align->findText("middle") );
+
+  // set gui elements to any values from input properties
+  set_gui_props ();
+}
+
+annotation_dialog::~annotation_dialog ()
+{
+  delete ui;
+}
+
+// internal slots
+
+void
+annotation_dialog::button_clicked (QAbstractButton *button)
+{
+  QDialogButtonBox::ButtonRole button_role = ui->button_box->buttonRole (button);
+
+  QSettings *settings = resource_manager::get_settings ();
+
+  // save position
+  settings->setValue ("annotation/geometry",saveGeometry ());
+
+  if (button_role == QDialogButtonBox::ApplyRole ||
+      button_role == QDialogButtonBox::AcceptRole)
+    {
+      get_gui_props ();
+    }
+
+  if (button_role == QDialogButtonBox::RejectRole ||
+      button_role == QDialogButtonBox::AcceptRole)
+    close ();
+}
+
+octave_value_list
+annotation_dialog::get_properties () const
+{
+  return props;
+}
+
+void
+annotation_dialog::get_gui_props ()
+{
+  // set props to the values of the gui
+  props = octave_value_list ();
+
+  Matrix position(1,4);
+  position(0) = ui->sb_x->value ();
+  position(1) = ui->sb_y->value ();
+  position(2) = ui->sb_width->value ();
+  position(3) = ui->sb_height->value ();
+  props.append (ovl ("textbox", position));
+ 
+  props.append (ovl ("string", ui->edit_string->text ().toStdString ()));
+  props.append (ovl ("fitboxtotext", ui->cb_fit_box_to_text->isChecked() ? "on" : "off" ));
+  props.append (ovl ("units", ui->cb_units->currentText ().toStdString () ));
+  props.append (ovl ("horizontalalignment", ui->cb_horz_align->currentText ().toStdString () ));
+  props.append (ovl ("verticalalignment", ui->cb_vert_align->currentText ().toStdString () ));
+  props.append (ovl ("fontname", ui->cb_font_name->currentText ().toStdString()));
+  props.append (ovl ("fontsize", ui->sb_font_size->value ()));
+  props.append (ovl ("fontweight", ui->cb_font_bold->isChecked() ? "bold" : "normal" ));
+  props.append (ovl ("fontangle", ui->cb_font_italic->isChecked() ? "italic" : "normal" ));
+  props.append (ovl ("color", Utils::toRgb (ui->btn_color->palette ().color (QPalette::Button))));
+  props.append (ovl ("linestyle", ui->cb_line_style->currentText ().toStdString ()));
+}
+
+void
+annotation_dialog::set_gui_props ()
+{
+  // set the gui to the values from the props
+  octave_idx_type len  = props.length ();
+
+  for (int i=0; i<len/2; i++)
+    {
+      std::string name = props(i*2).string_value ();
+
+      if (name == "textbox")
+        {
+          Matrix position = props(2*i +1).matrix_value ();
+          int nels = position.numel();
+          if (nels >= 2)
+            {
+              ui->sb_x->setValue (position(0));
+              ui->sb_y->setValue (position(1));
+            }
+          else
+            {
+              ui->sb_x->setValue (0);
+              ui->sb_y->setValue (0);
+            }
+          if (nels >= 4)
+            {
+              ui->sb_width->setValue (position(2));
+              ui->sb_height->setValue (position(3));
+            }
+          else
+            {
+              ui->sb_width->setValue (position(2));
+              ui->sb_height->setValue (position(3));
+            }
+        }
+      else if (name == "string")
+        {
+          // FIXME: handle if is array of strings ?
+          ui->edit_string->setText (props(2*i +1).string_value ().c_str ()); 
+        }
+      else if (name == "fitboxtotext")
+        {
+          ui->cb_fit_box_to_text->setChecked ( props(1*i +1).string_value () == "on" );
+        }
+      else if (name == "units")
+        { 
+          ui->cb_units->setCurrentIndex ( ui->cb_units->findText(props(1*i +1).string_value ().c_str ()) );
+        }
+      else if (name == "horizontalalignment")
+        {
+          ui->cb_horz_align->setCurrentIndex ( ui->cb_horz_align->findText(props(1*i +1).string_value ().c_str ()) );
+        }
+      else if (name == "verticalalignment")
+        {
+          ui->cb_vert_align->setCurrentIndex ( ui->cb_vert_align->findText(props(1*i +1).string_value ().c_str ()) );
+        }
+      else if (name == "fontname")
+        {
+          ui->cb_vert_align->setCurrentIndex ( ui->cb_font_name->findText(props(1*i +1).string_value ().c_str ()) );
+        }
+       else if (name == "fontsize")
+        {
+          ui->sb_font_size->setValue ( props(1*i +1).float_value () );
+        }
+       else if (name == "fontweight")
+        {
+          ui->cb_font_bold->setChecked ( props(1*i +1).string_value () == "bold" );
+        }
+       else if (name == "fontangle")
+        {
+          ui->cb_font_italic->setChecked ( props(1*i +1).string_value () == "italic" );
+        }
+       else if (name == "color")
+        {
+          QColor color;
+          if (props(1*i +1).is_matrix_type ())
+              color = Utils::fromRgb (props(2*i +1).matrix_value ());
+          else
+             color.setNamedColor (props(2*i +1).string_value ().c_str ());
+
+          if (color.isValid ())
+            ui->btn_color->setPalette (QPalette (color));
+        }
+
+    }
+
+  edit_string_changed (ui->edit_string->text ());
+}
+ 
+void
+annotation_dialog::edit_string_changed (const QString &str)
+{
+  ui->button_box->button (QDialogButtonBox::Ok)->setEnabled (str.length () > 0);
+}
+
+void
+annotation_dialog::prompt_for_color ()
+{
+  QWidget *widg = dynamic_cast<QWidget*> (sender ());
+  if (widg)
+    {
+      QColor color = widg->palette ().color (QPalette::Button);
+ 
+      color = QColorDialog::getColor(color, this);
+
+      if (color.isValid ())
+      {
+        widg->setPalette (QPalette (color));
+
+        QString css = QString ("background-color: %1; border: 1px solid %2;")
+                .arg (color.name ())
+                .arg ("#000000");
+  
+        widg->setStyleSheet (css);
+        widg->update ();
+      }
+    }
+}
+
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/annotation-dialog.h
@@ -0,0 +1,62 @@
+/*
+
+Copyright (C) 2015 John Donoghue
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef ANNOTATIONDIALOG_H
+#define ANNOTATIONDIALOG_H
+
+#include <QDialog>
+#include <QLineEdit>
+#include <QAbstractButton>
+
+#include "oct-obj.h"
+
+namespace Ui
+{
+  class annotation_dialog;
+}
+
+class annotation_dialog : public QDialog
+{
+  Q_OBJECT 
+public:
+  explicit annotation_dialog (QWidget * parent, const octave_value_list &pr);
+  ~annotation_dialog ();
+
+  octave_value_list get_properties() const;
+
+private slots:
+  // slots for dialog's buttons
+  void button_clicked (QAbstractButton *button);
+  void edit_string_changed (const QString &str);
+  void prompt_for_color ();
+
+private:
+  void init();
+
+  void get_gui_props ();
+  void set_gui_props ();
+
+  Ui::annotation_dialog * ui;
+  octave_value_list props;
+};
+
+#endif // ANNOTATIONDIALOG_H
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/annotation-dialog.ui
@@ -0,0 +1,1430 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>annotation_dialog</class>
+ <widget class="QDialog" name="annotation_dialog">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>621</width>
+    <height>401</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Annotation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Text</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>String</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" colspan="6">
+       <widget class="QLineEdit" name="edit_string"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_11">
+        <property name="text">
+         <string>Font</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="QFontComboBox" name="cb_font_name">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="editable">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QSpinBox" name="sb_font_size">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimum">
+         <number>2</number>
+        </property>
+        <property name="maximum">
+         <number>96</number>
+        </property>
+        <property name="value">
+         <number>10</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="4">
+       <widget class="QPushButton" name="cb_font_bold">
+        <property name="toolTip">
+         <string>bold</string>
+        </property>
+        <property name="text">
+         <string>b</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="5">
+       <widget class="QPushButton" name="cb_font_italic">
+        <property name="toolTip">
+         <string>italic</string>
+        </property>
+        <property name="text">
+         <string>i</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="6">
+       <widget class="QPushButton" name="btn_color">
+        <property name="palette">
+         <palette>
+          <active>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </active>
+          <inactive>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </inactive>
+          <disabled>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </disabled>
+         </palette>
+        </property>
+        <property name="toolTip">
+         <string>color</string>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">background-color: #000000; border: 1px solid #000000;</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QLabel" name="label_13">
+        <property name="text">
+         <string>Horz alignment</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QComboBox" name="cb_horz_align">
+        <item>
+         <property name="text">
+          <string>left</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>middle</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>right</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="2" column="3" colspan="2">
+       <widget class="QLabel" name="label_14">
+        <property name="text">
+         <string>Vert alignment</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="5" colspan="2">
+       <widget class="QComboBox" name="cb_vert_align">
+        <item>
+         <property name="text">
+          <string>top</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>middle</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>bottom</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Position</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_21">
+        <property name="text">
+         <string>X</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="sb_x">
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLabel" name="label_22">
+        <property name="text">
+         <string>Y</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="QDoubleSpinBox" name="sb_y">
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="4">
+       <widget class="QLabel" name="label_23">
+        <property name="text">
+         <string>Width</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="5">
+       <widget class="QDoubleSpinBox" name="sb_width">
+        <property name="minimum">
+         <double>-99.989999999999995</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="6">
+       <widget class="QLabel" name="label_24">
+        <property name="text">
+         <string>Height</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="7">
+       <widget class="QDoubleSpinBox" name="sb_height">
+        <property name="minimum">
+         <double>-99.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_18">
+        <property name="text">
+         <string>units</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2">
+       <widget class="QComboBox" name="cb_units">
+        <item>
+         <property name="text">
+          <string>normalized</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="1" column="4" colspan="2">
+       <widget class="QCheckBox" name="cb_fit_box_to_text">
+        <property name="text">
+         <string>Fit to box</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="title">
+      <string>Box</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_19">
+        <property name="text">
+         <string>Background</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="btn_background_color">
+        <property name="palette">
+         <palette>
+          <active>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>170</red>
+              <green>170</green>
+              <blue>170</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </active>
+          <inactive>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>170</red>
+              <green>170</green>
+              <blue>170</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </inactive>
+          <disabled>
+           <colorrole role="WindowText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Light">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Midlight">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Dark">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Mid">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>170</red>
+              <green>170</green>
+              <blue>170</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Text">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="BrightText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ButtonText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>127</red>
+              <green>127</green>
+              <blue>127</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Shadow">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="AlternateBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>255</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipBase">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>255</red>
+              <green>255</green>
+              <blue>220</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="ToolTipText">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </disabled>
+         </palette>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">background-color: #ffffff; border: 1px solid #000000;</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLabel" name="label_20">
+        <property name="text">
+         <string>Edge</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" colspan="2">
+       <widget class="QPushButton" name="btn_edge_color">
+        <property name="palette">
+         <palette>
+          <active>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </active>
+          <inactive>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </inactive>
+          <disabled>
+           <colorrole role="Button">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Base">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+           <colorrole role="Window">
+            <brush brushstyle="SolidPattern">
+             <color alpha="255">
+              <red>0</red>
+              <green>0</green>
+              <blue>0</blue>
+             </color>
+            </brush>
+           </colorrole>
+          </disabled>
+         </palette>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">background-color: #000000; border: 1px solid #000000;</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="5" colspan="2">
+       <spacer name="horizontalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>167</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_15">
+        <property name="text">
+         <string>Line style</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QComboBox" name="cb_line_style">
+        <item>
+         <property name="text">
+          <string>none</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="1" column="2" colspan="2">
+       <widget class="QLabel" name="label_16">
+        <property name="text">
+         <string>Line width</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="4" colspan="2">
+       <widget class="QSpinBox" name="sb_line_width">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimum">
+         <number>2</number>
+        </property>
+        <property name="maximum">
+         <number>96</number>
+        </property>
+        <property name="value">
+         <number>10</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="6">
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>137</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="button_box">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>edit_string</tabstop>
+  <tabstop>cb_font_name</tabstop>
+  <tabstop>cb_font_bold</tabstop>
+  <tabstop>cb_font_italic</tabstop>
+  <tabstop>sb_font_size</tabstop>
+  <tabstop>cb_horz_align</tabstop>
+  <tabstop>cb_vert_align</tabstop>
+  <tabstop>cb_units</tabstop>
+  <tabstop>cb_fit_box_to_text</tabstop>
+  <tabstop>btn_edge_color</tabstop>
+  <tabstop>button_box</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_box</sender>
+   <signal>accepted()</signal>
+   <receiver>annotation_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>242</x>
+     <y>339</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_box</sender>
+   <signal>rejected()</signal>
+   <receiver>annotation_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>310</x>
+     <y>339</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/gl-select.cc
@@ -0,0 +1,235 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "gl-select.h"
+
+#include <iostream>
+
+void
+opengl_selector::apply_pick_matrix (void)
+{
+  GLdouble p_matrix[16];
+  GLint viewport[4];
+
+  glGetDoublev (GL_PROJECTION_MATRIX, p_matrix);
+  glGetIntegerv (GL_VIEWPORT, viewport);
+  glMatrixMode (GL_PROJECTION);
+  glLoadIdentity ();
+  gluPickMatrix (xp, yp, size, size, viewport);
+  glMultMatrixd (p_matrix);
+  glMatrixMode (GL_MODELVIEW);
+}
+
+void
+opengl_selector::setup_opengl_transformation (const axes::properties& props)
+{
+  opengl_renderer::setup_opengl_transformation (props);
+  apply_pick_matrix ();
+}
+
+void
+opengl_selector::init_marker (const std::string& m, double sz, float width)
+{
+  opengl_renderer::init_marker (m, sz, width);
+  apply_pick_matrix ();
+}
+
+# define BUFFER_SIZE 128
+
+graphics_object
+opengl_selector::select (const graphics_object& ax, int x, int y, int flags)
+{
+  glEnable (GL_DEPTH_TEST);
+  glDepthFunc (GL_LEQUAL);
+
+  xp = x;
+  yp = y;
+
+  GLuint select_buffer[BUFFER_SIZE];
+
+  glSelectBuffer (BUFFER_SIZE, select_buffer);
+  glRenderMode (GL_SELECT);
+  glInitNames ();
+
+  object_map.clear ();
+
+  draw (ax);
+
+  int hits = glRenderMode (GL_RENDER);
+  graphics_object obj;
+
+  if (hits > 0)
+    {
+      GLuint current_minZ = 0xffffffff;
+      GLuint current_name = 0xffffffff;
+
+      for (int i = 0, j = 0; i < hits && j < BUFFER_SIZE-3; i++)
+        {
+          GLuint n = select_buffer[j++],
+                 minZ = select_buffer[j++];
+
+          j++; // skip maxZ
+          if (((flags & select_last) == 0 && (minZ <= current_minZ))
+              || ((flags & select_last) != 0 && (minZ >= current_minZ)))
+            {
+              bool candidate = true;
+              GLuint name =
+                select_buffer[std::min (j + n, GLuint (BUFFER_SIZE)) - 1];
+
+              if ((flags & select_ignore_hittest) == 0)
+                {
+                  graphics_object go = object_map[name];
+
+                  if (! go.get_properties ().is_hittest ())
+                    candidate = false;
+                }
+
+              if (candidate)
+                {
+                  current_minZ = minZ;
+                  current_name = name;
+                }
+
+              j += n;
+            }
+          else
+            j += n;
+        }
+
+      if (current_name != 0xffffffff)
+        obj = object_map[current_name];
+    }
+  else if (hits < 0)
+    warning ("opengl_selector::select: selection buffer overflow");
+
+  object_map.clear ();
+
+  return obj;
+}
+
+void
+opengl_selector::draw (const graphics_object& go, bool toplevel)
+{
+  GLuint name = object_map.size ();
+
+  object_map[name] = go;
+  glPushName (name);
+  opengl_renderer::draw (go, toplevel);
+  glPopName ();
+}
+
+void
+opengl_selector::fake_text (double x, double y, double z, const Matrix& bbox,
+                            bool use_scale)
+{
+  ColumnVector xpos, xp1, xp2;
+
+  xpos = get_transform ().transform (x, y, z, use_scale);
+
+  xp1 = xp2 = xpos;
+  xp1(0) += bbox(0);
+  xp1(1) -= bbox(1);
+  xp2(0) += (bbox(0) + bbox(2));
+  xp2(1) -= (bbox(1) + bbox(3));
+
+  ColumnVector p1, p2, p3, p4;
+
+  p1 = get_transform ().untransform (xp1(0), xp1(1), xp1(2), false);
+  p2 = get_transform ().untransform (xp2(0), xp1(1), xp1(2), false);
+  p3 = get_transform ().untransform (xp2(0), xp2(1), xp1(2), false);
+  p4 = get_transform ().untransform (xp1(0), xp2(1), xp1(2), false);
+
+  glBegin (GL_QUADS);
+  glVertex3dv (p1.data ());
+  glVertex3dv (p2.data ());
+  glVertex3dv (p3.data ());
+  glVertex3dv (p4.data ());
+  glEnd ();
+}
+
+void
+opengl_selector::draw_text (const text::properties& props)
+{
+  if (props.get_string ().is_empty ())
+    return;
+
+  Matrix pos = props.get_data_position ();
+  const Matrix bbox = props.get_extent_matrix ();
+
+  fake_text (pos(0), pos(1), pos.numel () > 2 ? pos(2) : 0.0, bbox);
+}
+
+Matrix
+opengl_selector::render_text (const std::string& txt,
+                              double x, double y, double z,
+                              int halign, int valign, double rotation)
+{
+#if HAVE_FREETYPE
+  uint8NDArray pixels;
+  Matrix bbox;
+
+  // FIXME: probably more efficient to only compute bbox instead
+  //        of doing full text rendering...
+  text_to_pixels (txt, pixels, bbox, halign, valign, rotation);
+  fake_text (x, y, z, bbox, false);
+
+  return bbox;
+#else
+  return Matrix (1, 4, 0.0);
+#endif
+}
+
+void
+opengl_selector::draw_image (const image::properties& props)
+{
+  Matrix xd = props.get_xdata ().matrix_value ();
+  octave_idx_type nc = props.get_cdata ().matrix_value ().columns ();
+  double x_pix_size = (xd(1) - xd(0)) / (nc - 1);
+
+  Matrix yd = props.get_ydata ().matrix_value ();
+  octave_idx_type nr = props.get_cdata ().matrix_value ().rows ();
+  double y_pix_size = (yd(1) - yd(0)) / (nr - 1);
+
+  ColumnVector p1(3, 0.0), p2(3, 0.0), p3(3, 0.0), p4(3, 0.0);
+  p1(0) = xd(0) - x_pix_size/2;
+  p1(1) = yd(0) - y_pix_size/2;
+
+  p2(0) = xd(1) + x_pix_size/2;
+  p2(1) = yd(0) - y_pix_size/2;
+
+  p3(0) = xd(1) + x_pix_size/2;
+  p3(1) = yd(1) + y_pix_size/2;
+
+  p4(0) = xd(0) - x_pix_size/2;
+  p4(1) = yd(1) + y_pix_size/2;
+  
+  glBegin (GL_QUADS);
+  glVertex3dv (p1.data ());
+  glVertex3dv (p2.data ());
+  glVertex3dv (p3.data ());
+  glVertex3dv (p4.data ());
+  glEnd ();
+}
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/gl-select.h
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 2011-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef __QtHandles_gl_selector__
+#define __QtHandles_gl_selector__ 1
+
+#include "gl-render.h"
+
+#include <map>
+
+enum select_flags
+{
+  select_ignore_hittest  = 0x01,
+  select_last            = 0x02
+};
+
+class opengl_selector : public opengl_renderer
+{
+public:
+  opengl_selector (void) : size (5) { }
+
+  virtual ~opengl_selector (void) { }
+
+  graphics_object select (const graphics_object& ax, int x, int y,
+                          int flags = 0);
+
+  virtual void draw (const graphics_object& go, bool toplevel = true);
+
+protected:
+  virtual void draw_text (const text::properties& props);
+
+  virtual void draw_image (const image::properties& props);
+
+  virtual void setup_opengl_transformation (const axes::properties& props);
+
+  virtual void init_marker (const std::string& m, double size, float width);
+
+  virtual Matrix render_text (const std::string& txt,
+                              double x, double y, double z,
+                              int halign, int valign, double rotation = 0.0);
+
+private:
+  void apply_pick_matrix (void);
+
+  void fake_text (double x, double y, double z, const Matrix& bbox,
+                  bool use_scale = true);
+
+private:
+  // The mouse coordinate of the selection/picking point
+  int xp, yp;
+
+  // The size (in pixels) of the picking window
+  int size;
+
+  // The OpenGL name mapping
+  std::map<GLuint, graphics_object> object_map;
+};
+
+#endif // __QtHandles_gl_selector__
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/images/README
@@ -0,0 +1,15 @@
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+This copyright and license notice covers the images in this directory.
+************************************************************************
+
+TITLE:	Crystal Project Icons
+AUTHOR:	Everaldo Coelho
+SITE:	http://www.everaldo.com
+CONTACT: everaldo@everaldo.com
+
+Copyright (c)  2006-2007  Everaldo Coelho.
+
+The following images are derivative work:
+
+zoom-in.png
+zoom-out.png
new file mode 100644
index 0000000000000000000000000000000000000000..7f74aa5555ede5e445e776a0c13fc8832195919a
GIT binary patch
literal 2882
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
new file mode 100644
index 0000000000000000000000000000000000000000..77a5fb18781f5535f9bdefa010f19754acafbcd5
GIT binary patch
literal 3637
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
Hu0mjf*gnc!
new file mode 100644
index 0000000000000000000000000000000000000000..b0782080887eb986191b9c0e8abd7744b60d30bb
GIT binary patch
literal 3203
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
new file mode 100644
index 0000000000000000000000000000000000000000..b6d0207d33118bac87972f054669b7ce96461e1d
GIT binary patch
literal 3309
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
new file mode 100644
index 0000000000000000000000000000000000000000..c19ee22a7ed341bfa3a3d7fa37c380892df3f2bb
GIT binary patch
literal 3301
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
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/module.mk
@@ -0,0 +1,152 @@
+EXTRA_DIST += \
+  graphics/module.mk \
+  graphics/qthandles.qrc \
+  graphics/images/README \
+  graphics/images/pan.png \
+  graphics/images/rotate.png \
+  graphics/images/select.png \
+  graphics/images/zoom-in.png \
+  graphics/images/zoom-out.png \
+  $(octave_gui_graphics_UI) 
+
+octave_gui_MOC += \
+  graphics/moc-annotation-dialog.cc \
+  graphics/moc-Backend.cc \
+  graphics/moc-ButtonControl.cc \
+  graphics/moc-ContextMenu.cc \
+  graphics/moc-EditControl.cc \
+  graphics/moc-Figure.cc \
+  graphics/moc-FigureWindow.cc \
+  graphics/moc-ListBoxControl.cc \
+  graphics/moc-Menu.cc \
+  graphics/moc-MouseModeActionGroup.cc \
+  graphics/moc-Object.cc \
+  graphics/moc-ObjectFactory.cc \
+  graphics/moc-ObjectProxy.cc \
+  graphics/moc-PopupMenuControl.cc \
+  graphics/moc-PushTool.cc \
+  graphics/moc-SliderControl.cc \
+  graphics/moc-TextEdit.cc \
+  graphics/moc-ToggleTool.cc \
+  graphics/moc-ToolBar.cc
+
+octave_gui_graphics_UI = \
+  graphics/annotation-dialog.ui
+
+octave_gui_graphics_UI_H = $(patsubst graphics/%.ui, graphics/ui-%.h, $(octave_gui_graphics_UI))
+
+BUILT_SOURCES += $(octave_gui_graphics_UI_H)
+
+octave_gui_graphics_RC = graphics/qrc-qthandles.cc
+
+noinst_HEADERS += \
+  graphics/__init_qt__.h \
+  graphics/annotation-dialog.h \
+  graphics/Backend.h \
+  graphics/BaseControl.h \
+  graphics/ButtonControl.h \
+  graphics/Canvas.h \
+  graphics/CheckBoxControl.h \
+  graphics/Container.h \
+  graphics/ContextMenu.h \
+  graphics/EditControl.h \
+  graphics/Figure.h \
+  graphics/FigureWindow.h \
+  graphics/GenericEventNotify.h \
+  graphics/GLCanvas.h \
+  graphics/KeyMap.h \
+  graphics/ListBoxControl.h \
+  graphics/Logger.h \
+  graphics/Menu.h \
+  graphics/MenuContainer.h \
+  graphics/MouseModeActionGroup.h \
+  graphics/Object.h \
+  graphics/ObjectFactory.h \
+  graphics/ObjectProxy.h \
+  graphics/Panel.h \
+  graphics/PopupMenuControl.h \
+  graphics/PushButtonControl.h \
+  graphics/PushTool.h \
+  graphics/QtHandlesUtils.h \
+  graphics/RadioButtonControl.h \
+  graphics/SliderControl.h \
+  graphics/TextControl.h \
+  graphics/TextEdit.h \
+  graphics/ToggleButtonControl.h \
+  graphics/ToggleTool.h \
+  graphics/ToolBar.h \
+  graphics/ToolBarButton.h \
+  graphics/gl-select.h \
+  $(TEMPLATE_SRC)
+
+graphics_libgui_graphics_la_SOURCES = \
+  graphics/__init_qt__.cc \
+  graphics/annotation-dialog.cc \
+  graphics/Backend.cc \
+  graphics/BaseControl.cc \
+  graphics/ButtonControl.cc \
+  graphics/Canvas.cc \
+  graphics/CheckBoxControl.cc \
+  graphics/Container.cc \
+  graphics/ContextMenu.cc \
+  graphics/EditControl.cc \
+  graphics/Figure.cc \
+  graphics/FigureWindow.cc \
+  graphics/GLCanvas.cc \
+  graphics/KeyMap.cc \
+  graphics/ListBoxControl.cc \
+  graphics/Logger.cc \
+  graphics/Menu.cc \
+  graphics/MouseModeActionGroup.cc \
+  graphics/Object.cc \
+  graphics/ObjectFactory.cc \
+  graphics/ObjectProxy.cc \
+  graphics/Panel.cc \
+  graphics/PopupMenuControl.cc \
+  graphics/PushButtonControl.cc \
+  graphics/PushTool.cc \
+  graphics/QtHandlesUtils.cc \
+  graphics/RadioButtonControl.cc \
+  graphics/SliderControl.cc \
+  graphics/TextControl.cc \
+  graphics/TextEdit.cc \
+  graphics/ToggleButtonControl.cc \
+  graphics/ToggleTool.cc \
+  graphics/ToolBar.cc \
+  graphics/gl-select.cc
+
+TEMPLATE_SRC = \
+  graphics/ToolBarButton.cc
+
+nodist_graphics_libgui_graphics_la_SOURCES = $(octave_gui_graphics_MOC) $(octave_gui_graphics_RC)
+
+graphics_libgui_graphics_la_CPPFLAGS = \
+  $(AM_CPPFLAGS) \
+  $(FT2_CPPFLAGS) \
+  $(FONTCONFIG_CPPFLAGS) \
+  $(HDF5_CPPFLAGS) \
+  @OCTGUI_DLL_DEFS@ \
+  @QT_CPPFLAGS@ \
+  -Igraphics -I$(srcdir)/graphics \
+  -Isrc -I$(srcdir)/src \
+  -I$(top_srcdir)/liboctave/cruft/misc \
+  -I$(top_srcdir)/liboctave/array \
+  -I$(top_builddir)/liboctave/numeric -I$(top_srcdir)/liboctave/numeric \
+  -I$(top_builddir)/liboctave/operators -I$(top_srcdir)/liboctave/operators \
+  -I$(top_srcdir)/liboctave/system \
+  -I$(top_srcdir)/liboctave/util \
+  -I$(top_builddir)/libinterp -I$(top_srcdir)/libinterp \
+  -I$(top_builddir)/libinterp/parse-tree -I$(top_srcdir)/libinterp/parse-tree \
+  -I$(top_builddir)/libinterp/corefcn -I$(top_srcdir)/libinterp/corefcn \
+  -I$(top_srcdir)/libinterp/octave-value
+
+graphics_libgui_graphics_la_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS)
+
+graphics_libgui_graphics_la_CXXFLAGS = $(AM_CXXFLAGS) $(WARN_CXXFLAGS)
+
+noinst_LTLIBRARIES += graphics/libgui-graphics.la
+
+CLEANFILES += \
+  $(octave_gui_graphics_MOC) \
+  $(octave_gui_graphics_RC) \
+  $(octave_gui_graphics_UI_H)
new file mode 100644
--- /dev/null
+++ b/libgui/graphics/qthandles.qrc
@@ -0,0 +1,9 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+  <file>images/pan.png</file>
+  <file>images/rotate.png</file>
+  <file>images/select.png</file>
+  <file>images/zoom-in.png</file>
+  <file>images/zoom-out.png</file>
+</qresource>
+</RCC>
--- a/libgui/languages/be_BY.ts
+++ b/libgui/languages/be_BY.ts
@@ -83,11 +83,127 @@
 <context>
     <name>QDialogButtonBox</name>
     <message>
+        <location filename="../../../octave-qt/qdialogbuttonbox.cpp" line="+658"/>
         <location filename="../../../octave-qt/qmessagebox.cpp" line="+1937"/>
         <location line="+446"/>
         <source>OK</source>
         <translation>Добра</translation>
     </message>
+    <message>
+        <location line="+0"/>
+        <source>&amp;OK</source>
+        <translation type="unfinished">&amp;Добра</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished">&amp;Захаваць</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Open</source>
+        <translation type="unfinished">Адкрыць</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Cancel</source>
+        <translation type="unfinished">Скасаваць</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Close</source>
+        <translation type="unfinished">&amp;Закрыць</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Apply</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Reset</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Help</source>
+        <translation type="unfinished">Даведка</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Don&apos;t Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close without Saving</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Discard</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Yes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Yes to &amp;All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;No</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>N&amp;o to All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Save All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Abort</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Retry</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Ignore</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Restore Defaults</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QErrorMessage</name>
@@ -474,11 +590,6 @@
         <source>cursor</source>
         <translation>курсор</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Нататка пра новы GUI Octave&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Адна з найбольшых адметнасцяў Octave 3.8 - графічны інтэрфэйс.  Карыстальнікі апошнімі гадамі прасілі яго найбольш часта, і нарэшце ён амаль гатовы.  Але ён пакуль не такі дасканалы, як бы мы жадалі, таму мы вырашылі пачакаць выпуску з серыі 4.0.x перад тым, як рабіць яго стандартным.&lt;/p&gt;&lt;p&gt;Да таго ж, улічваючы час і колькасць выпраўленняў і паляпшэнняў у параўнанні з апошнім буйным выпускам Octave, мы вырашылі затрымліваць новы выпуск толькі дзеля ўдасканалення GUI, не зважаючы на новыя магчымасці.  Таму прыемнага вам карстання выпускам 3.8 і першай версіяй новага інтэрфэйсу.  Нам здаецца, ён працуе даволі добра, але мы ведаем, што ёсць некаторыя відавочныя грубыя недарэчнасці і шмат чаго, што можна палепшыць.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Нам патрабуецца ваша дапамога&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Ёсць шмат спосабаў, якімі вы можаце дапамагчы нам выправіць праблемы, што яшчэ засталіся, скончыць GUI і палепшыць агульнае уражанне як для новых карыстальнікаў, так і для экспертаў (спасылкі адкрыюцца ў знешнім браўзэры):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Калі вы спрактыкаваны распрацоўнік праграм, то можаце выдаткаваць час, каб дапамагчы ў &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;распрацоўцы Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Калі Octave працуе з памылкамі, вы можаце &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;паведаміць пра праблемы&lt;/a&gt;, з якімі сутыкнуліся.&lt;/li&gt;&lt;li&gt;Няхай вы хоць карыстальнік, хоць распрацоўнік, вы можаце &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;прафундаваць праект&lt;/a&gt;.  Распрацоўка Octave патрабуе шмат часу і навыкаў.  Ваш удзел дапаможа гарантаваць, што Octave і надалей будзе ўдасканальвацца.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Спадзяемся, вы знойдзеце Octave карыснай.  Калі ласка, дапамажыце нам зрабіць яго лепшым для будучыні!&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QPPDOptionsModel</name>
@@ -898,8 +1009,8 @@
     </message>
     <message>
         <location line="+71"/>
-        <source>Print To File...</source>
-        <translation>Друк у файл...</translation>
+        <source>Print To File ...</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+78"/>
@@ -945,7 +1056,7 @@
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Капіяваць</translation>
     </message>
@@ -955,15 +1066,20 @@
         <translation>Уставіць</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>Прыбраць усё</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation type="unfinished">Вылучыць усё</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>вылучэнне скапіявана ў буфер абмену</translation>
     </message>
@@ -1635,6 +1751,127 @@
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation type="unfinished">&amp;Файл</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished">&amp;Захаваць</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation type="unfinished">&amp;Змяніць</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished">Вы&amp;разаць</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation type="unfinished">&amp;Уставіць</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation type="unfinished">&amp;Даведка</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -1650,16 +1887,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Рэдактар Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Файлы Octave (*.m);;Усе файлы (*)</translation>
     </message>
@@ -1675,7 +1913,7 @@
         <translation>Назва новай функцыі:</translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -1684,37 +1922,27 @@
 ужо адкрыты ў рэдактары</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Новы файл</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Захаваць файл</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Адкрыць файл...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Захаваць файл &amp;як...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Друк...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Адрабіць</translation>
     </message>
@@ -1724,42 +1952,42 @@
         <translation>&amp;Паўтарыць</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Капіяваць</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Вы&amp;разаць</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Уставіць</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>&amp;Наступная закладка</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Па&amp;пярэдняя закладка</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Вы&amp;разаць</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Уставіць</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>&amp;Паставіць/прыбраць закладку</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>&amp;Наступная закладка</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Па&amp;пярэдняя закладка</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>&amp;Паставіць/прыбраць закладку</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Выдаліць усе закладкі</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation>&amp;Наступны пункт спыну</translation>
     </message>
@@ -1769,17 +1997,17 @@
         <translation>Па&amp;пярэдні пункт спыну</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>Дадаць/зняць &amp;пункт спыну</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation>&amp;Прыбраць усе пункты спыну</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Закаментаваць</translation>
     </message>
@@ -1789,57 +2017,238 @@
         <translation>&amp;Раскаментаваць</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Знайсці і замяніць...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Захаваць і выканаць файл</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Знайсці і замяніць...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Захаваць і выканаць файл</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>П&amp;ерайсці да радка...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation type="unfinished">Скасаваць</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation>&amp;Ранейшыя файлы</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Змяніць функцыю</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>&amp;Закрыць</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Закрыць усё</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Закрыць іншыя файлы</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation type="unfinished">Вылучыць усё</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Настаўленні...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>&amp;Настаўленні выгляду...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>&amp;Настаўленні выгляду...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished">Рэдактар</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Выканаць &amp;вылучанае</translation>
     </message>
@@ -1849,17 +2258,17 @@
         <translation>&amp;Даведка</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Даведка па ключавым слове</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Дакументацыя па ключавым слове</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -1868,7 +2277,7 @@
 на чытанне: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1877,7 +2286,7 @@
 не існуе. Жадаеце стварыць яго?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -1886,32 +2295,32 @@
 на запіс: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>Асацыяваная картка рэдактара знікла.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Новая &amp;функцыя...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Змяніць</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>&amp;Адладка</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Выканаць</translation>
     </message>
@@ -1919,7 +2328,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>Перайсці да радка</translation>
     </message>
@@ -1929,47 +2363,52 @@
         <translation>Нумар радка</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;без назвы&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Захаваць ці адкінуць змены?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation type="unfinished">Усе файлы (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation>Скасаваць закрыццё, захаваць ці адкінуць змены?</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Рэдактар Octave</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>Файл
-%1
-зараз закрыецца, але ён быў зменены.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Файлы Octave (*.m);;Усе файлы (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -1987,24 +2426,25 @@
 быў выдалены або пераназваны. Можа, захаваць яго зараз?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>Не выйшла адкрыць файл %1 на запіс:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Радок:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Слупок:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Выглядае на тое, што &apos;%1&apos; быў зменены іншай праграмай. Перачытаць яго?</translation>
     </message>
@@ -2012,7 +2452,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Файлавы агляднік</translation>
     </message>
@@ -2027,42 +2467,43 @@
         <translation>Пазначце шлях або назву файла</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Перайсці каталогам вышэй</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Дзеянні з дзейным каталогам</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Шукаць файлы...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Новы файл</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Новы каталог</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Двойчы пстрыкніце па файле для адкрыцця</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>Перайсці да каталогу Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation type="unfinished">Перайсці каталогам вышэй</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Перайсці да дзейнага каталога Octave</translation>
     </message>
@@ -2072,37 +2513,29 @@
         <translation>Задаць каталог Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Зрабіць каталогам Octave дзейны каталог аглядніка</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>Перайсці да хатняга каталогу</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Шукаць каталог...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Шукаць файлы...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Новы файл...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Новы каталог...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Памер файла</translation>
     </message>
@@ -2122,7 +2555,7 @@
         <translation>Паказваць схаваныя</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Адкрыць</translation>
     </message>
@@ -2152,17 +2585,17 @@
         <translation>Задаць дзейны каталог</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Пераназваць</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Выдаліць</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Пераназваць файл ці каталог</translation>
     </message>
@@ -2197,7 +2630,7 @@
         <translation>Немагчыма выдаліць каталог, бо ён не пусты</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>Задаванне каталогу файлавага аглядніка</translation>
     </message>
@@ -2215,7 +2648,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Стварыць каталог</translation>
     </message>
@@ -2231,7 +2669,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>Прыемнага карыстання!</translation>
     </message>
@@ -2254,14 +2692,10 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Спадзяемся, вы знойдзеце Octave карыснай праграмай.&lt;/p&gt;
-&lt;p&gt;Калі ўзнікнуць якія праблемы, то ёсць некалькі спосабаў іх вырашэння: камерцыйная падтрымка, спіс рассылкі, wiki ды іншыя каналы сувязі з супольнасцю.
-Больш інфармацыі па кожным з іх можна атрымаць, завітаўшы на &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (адкрыецца ў знешнім браўзэры).&lt;/p&gt;
-&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+21"/>
@@ -2294,7 +2728,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>Што &amp;шукаць:</translation>
     </message>
@@ -2364,7 +2803,7 @@
         <translation>Шукаць вы&amp;лучанае</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>Шукаць ад канца</translation>
     </message>
@@ -2374,7 +2813,7 @@
         <translation>Шукаць ад пачатку</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Вынік замены</translation>
     </message>
@@ -2384,7 +2823,7 @@
         <translation>%1 элементаў заменена</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>Вынік пошуку</translation>
     </message>
@@ -2407,12 +2846,7 @@
         <translation>Маска назваў:</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Задайце выраз для назваў файлаў</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>Пачынаць з:</translation>
     </message>
@@ -2432,22 +2866,12 @@
         <translation>Пазначыць каталог пачатку пошуку</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Рэкурсіўна</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>Шукаць ува ўсіх падкаталогах</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Знаходзіць каталогі</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation>Дадаваць пасавальныя каталогі ў вынікі пошуку</translation>
     </message>
@@ -2467,9 +2891,24 @@
         <translation>Змяшчае тэкст:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>Улічваць файлы, што ўтрымліваюць пэўны тэкст</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+5"/>
@@ -2532,7 +2971,12 @@
         <translation>Ідзе пошук...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>Пазначыць каталог пошуку</translation>
     </message>
@@ -2553,7 +2997,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Агляд і пошук па гісторыі загадаў.</translation>
     </message>
@@ -2563,17 +3007,22 @@
         <translation>Двойчы пстрык па загадзе перадасць яго ў тэрмінал.</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Увядзіце тэкст для фільтравання гісторыі загадаў.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Гісторыя загадаў</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Капіяваць</translation>
     </message>
@@ -2583,7 +3032,7 @@
         <translation>Вылічыць</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Стварыць сцэнар</translation>
     </message>
@@ -2622,53 +3071,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Загрузіць прастору зменных</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Пра Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Новы</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Новы сцэнар</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Графік</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Адкрыць...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Настаўленні...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Выйсці</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Змяніць</translation>
     </message>
@@ -2678,22 +3117,22 @@
         <translation>Адрабіць</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Капіяваць</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Уставіць</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation>Захаваць прастору зменных як</translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>Файл заўваг да выпуску &apos;%1&apos; пусты.</translation>
     </message>
@@ -2708,17 +3147,42 @@
         <translation>Заўвагі да выпуску Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Навіны супольнасці Octave</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation type="unfinished">Вылучыць усё</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Ачысціць буфер</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Шукаць файлы...</translation>
     </message>
@@ -2738,7 +3202,7 @@
         <translation>Ачысціць прастору зменных</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>Ад&amp;ладка</translation>
     </message>
@@ -2753,32 +3217,27 @@
         <translation>Працягваць</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Выйсці з рэжыму адладкі</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Паказваць файлавы агляднік</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Файлавы агляднік</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Вы выкарыстоўваеце кандыдат на выпуск эксперыментальнага графічнага (GUI) інтэрфэйсу Octave.&lt;/strong&gt;  Octave пастаянна паляпшаецца, і GUI будзе стандартным інтэрфэйсам з версіі 4.0.  Для дадатковай інфармацыі націсніце &quot;Заўвагі да выпуску&quot; у меню &quot;Навіны&quot;, альбо наведайце &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Крок наперад</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Загрузіць прастору зменных...</translation>
     </message>
@@ -2788,22 +3247,22 @@
         <translation>Захаваць прастору зменных як...</translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Функцыя...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Крок назад</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation>Стандартнае размеркаванне вокнаў</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Пакеты Octave</translation>
     </message>
@@ -2823,7 +3282,7 @@
         <translation>Рэсурсы распрацоўніка Octave</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>На дыску</translation>
     </message>
@@ -2833,7 +3292,7 @@
         <translation>Анлайн</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Навіны</translation>
     </message>
@@ -2848,23 +3307,12 @@
         <translation>Навіны супольнасці</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Даведацца болей</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Схаваць</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Інфармацыя пра эксперыментальны GUI Octave</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Пазначце назву каталогу</translation>
     </message>
@@ -2879,69 +3327,74 @@
         <translation>Перайсці каталогам вышэй</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Агляд каталогаў</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Акно</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Паказваць загаднае акно</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Паказваць гісторыю загадаў</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Паказваць прастору зменных</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Паказваць рэдактар</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Паказваць дакументацыю</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Паказваць прастору зменных</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Паказваць рэдактар</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Паказваць дакументацыю</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Загаднае акно</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Гісторыя загадаў</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Прастора зменных</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Рэдактар</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Дакументацыя</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Даведка</translation>
     </message>
@@ -2954,7 +3407,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -3013,18 +3466,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Адчапіць віджэт</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Схаваць віджэт</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Прычапіць віджэт</translation>
     </message>
@@ -3032,7 +3485,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Даведка пра</translation>
     </message>
@@ -3046,28 +3499,18 @@
         <source>Edit</source>
         <translation>Змяніць</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>&amp;Выканаць вылучанае</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Так</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Не</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -3082,13 +3525,13 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>Файл %1 не існуе ў дзейным шляху.  Для адладкі функцыі, якую вы рэдагуеце, трэба змяніць каталог на %2 або дадаць яго да дзейнага шляху.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>Файлу %1 замінае файл з такой самай назвай у дзейным шляху.  Для адладкі функцыі, якую вы рэдагуеце, змяніце каталог на %2.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3106,15 +3549,24 @@
         <translation>Дадаць каталог да дзейнага шляху</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Скасаваць</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation type="unfinished">Стандартны</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -3131,7 +3583,7 @@
 GUI Octave зараз мусіць закрыцца.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Крытычная памылка Octave</translation>
     </message>
@@ -3139,317 +3591,735 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Настаўленні</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Агульныя</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Толькі эмблема Octave</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translatorcomment>не пэўны</translatorcomment>
         <translation>Літарныя значкі</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="-111"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Dock widget title bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>3D</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <location filename="../src/ui-settings-dialog.h" line="+63"/>
         <source>Editor</source>
         <translation>Рэдактар</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Колер</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation>Даўжыня водступу</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation>Табуляцыя робіць водступ</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Аўтаводступы</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Даўжыня табуляцыі</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translatorcomment>- не пэўны
 - даўжэй не трэба, не змяшчаецца!</translatorcomment>
         <translation>Паказваць накіравальныя водступаў</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>Backspace прыбірае водступ</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
         <translation>Для ключавых словаў</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>Улічваць рэгістр</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Замяняць слова на прапанаванае</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Замяняць слова на прапанаванае</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>Для словаў з дакумента</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
         <translation>Памятаць карткі папярэдняга сеансу</translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
         <translation>Свой файлавы рэдактар</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation>Выгляд рэдактара</translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Пазначце шрыфт, ягоны памер (як розніцу ад стандартнага памеру), стыль шрыфту (&lt;b&gt;т&lt;/b&gt;оўсты, &lt;b&gt;к&lt;/b&gt;урсіўны, &lt;b&gt;п&lt;/b&gt;адкрэслены), колер тэксту і колер фону (для фону ружовы (255,0,255) азначае стандартны колер фону).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Terminal Colors</source>
         <translation>Колеры тэрміналу</translation>
     </message>
     <message>
-        <location line="+45"/>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation>Шрыфт</translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
         <translation>Паказваць нумары радкоў</translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Фарбаваць дзейны радок</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Аўтадапаўненне</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Паказваць поўны шлях у загалоўку акна</translation>
-    </message>
-    <message>
         <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Фарбаваць дзейны радок</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Паказваць поўны шлях у загалоўку акна</translation>
+    </message>
+    <message>
+        <location line="-549"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+74"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
         <source>Graphic icons</source>
         <translation>Графічныя значкі</translation>
     </message>
     <message>
+        <location line="+29"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Background inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Octave Startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show whitespace</source>
+        <translation>Паказваць прагальныя знакі</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Не паказваць прагальныя знакі ў водступах</translation>
+    </message>
+    <message>
+        <location line="+58"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Tab width min.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+615"/>
+        <location filename="../src/ui-settings-dialog.h" line="+45"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Ствараць няісныя файлы без пытанняў</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>Загад (%f=файл, %l-радок):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Тэрмінал</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Тып курсора:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Мігценне курсора</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Выкар. колер пярэдняга плану</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Памер шрыфту</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Файлавы агляднік</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Паказваць памеры файлаў</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Паказваць тыпы файлаў</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Паказваць дату апошняга змянення</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Паказваць схаваныя файлы</translation>
+    </message>
+    <message>
+        <location line="-1647"/>
+        <location filename="../src/ui-settings-dialog.h" line="-92"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+270"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation>Паказваць прагальныя знакі</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Не паказваць прагальныя знакі ў водступах</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Пасля ўводу колькі знакаў прапаноўваць дапаўненні</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Ствараць няісныя файлы без пытанняў</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>Загад (%f=файл, %l-радок):</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Тэрмінал</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Тып курсора:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+322"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>Draw a long line marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>File handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+93"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+341"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Display</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Колеры радкоў чаргуюцца</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Прастора зменных</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Сетка</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Мігценне курсора</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Выкар. колер пярэдняга плану</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Памер шрыфту</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Файлавы агляднік</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Паказваць памеры файлаў</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Паказваць тыпы файлаў</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Паказваць дату апошняга змянення</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Паказваць схаваныя файлы</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Колеры радкоў чаргуюцца</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Прастора зменных</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Колеры класаў памяці</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Сетка</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
         <translation>Дазволіць Octave злучацца з вэб-сайтам Octave для адлюстравання навінаў і свежай інфармацыі</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Выкарыстоўваць проксі-сервер</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>HttpProxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>Набор значкоў для віджэтаў</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Мова (патрэбны перазапуск)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Памер значкоў</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Сінхранізаваць дзейны каталог Octave з файлавым агляднікам</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Мова (патрэбны перазапуск)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Памер значкоў</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Сінхранізаваць дзейны каталог Octave з файлавым агляднікам</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Socks5Proxy</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Назва хоста:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>Тып проксі:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Порт:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Імя карыстальніка:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Пароль:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Сістэмная</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>IBeam</translation>
     </message>
@@ -3464,7 +4334,7 @@
         <translation>Падкрэсленне</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Розніца ад стандартнага памеру</translation>
     </message>
@@ -3491,6 +4361,16 @@
         <comment>short form for underlined</comment>
         <translation>п</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -3548,6 +4428,622 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation type="unfinished">Новы файл</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation type="unfinished">Новая функцыя</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation type="unfinished">Загрузіць прастору зменных</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation type="unfinished">Захаваць прастору зменных як</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation type="unfinished">Капіяваць</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation type="unfinished">Уставіць</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation type="unfinished">Адрабіць</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation type="unfinished">Вылучыць усё</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation type="unfinished">Ачысціць буфер</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation type="unfinished">Ачысціць загаднае акно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation type="unfinished">Ачысціць гісторыю загадаў</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation type="unfinished">Ачысціць прастору зменных</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation type="unfinished">Крок назад</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation type="unfinished">Працягваць</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation type="unfinished">Паказваць загаднае акно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation type="unfinished">Паказваць гісторыю загадаў</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation type="unfinished">Паказваць файлавы агляднік</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished">Паказваць прастору зменных</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation type="unfinished">Паказваць рэдактар</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished">Паказваць дакументацыю</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation type="unfinished">Загаднае акно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation type="unfinished">Гісторыя загадаў</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation type="unfinished">Файлавы агляднік</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation type="unfinished">Прастора зменных</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation type="unfinished">Рэдактар</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation type="unfinished">Дакументацыя</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation type="unfinished">Пакеты Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation type="unfinished">Падзяліцца кодам</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation type="unfinished">Палепшыць Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation type="unfinished">Рэсурсы распрацоўніка Octave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation type="unfinished">Пра Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation type="unfinished">Заўвагі да выпуску</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation type="unfinished">Навіны супольнасці</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation type="unfinished">Закрыць усё</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation type="unfinished">Друк</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished">Крок</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished">Стандартнае размеркаванне вокнаў</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished">Паведаміць пра хібу</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished">Закрыць іншыя файлы</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation type="unfinished">Змяніць</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation type="unfinished">Даведка</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation type="unfinished">Выканаць</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -3558,7 +5054,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>Для пошуку ўвядзіце тут штосьці і націсніце Enter</translation>
     </message>
@@ -3567,6 +5063,16 @@
         <source>Global search</source>
         <translation>Глабальны пошук</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation type="unfinished">Памылкі</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -3600,8 +5106,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Клас памяці</translation>
+        <source>Attribute</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+109"/>
@@ -3618,7 +5124,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Прастора зменных</translation>
     </message>
@@ -3628,9 +5134,24 @@
         <translation>Прагляд зменных дзейнай прасторы.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Капіяваць</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3638,19 +5159,19 @@
         <translation>Пераназваць</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Можна пераназываць толькі сімвалы найвышэйшага ўзроўню.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>Выгляд зменных у актыўнай прасторы зменных.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Колеры для класаў памяці:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation type="unfinished"></translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/de_DE.ts
+++ b/libgui/languages/de_DE.ts
@@ -61,16 +61,11 @@
         <source>cursor</source>
         <translation>Cursor</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Einige Hinweise zur neuen Octave GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Eine der größten Neuerungen von Octave 3.8 ist die grafische Benutzerschnittstelle (GUI).  Sie ist das, worum die Nutzer in den letzten Jahren am häufigsten gebeten haben, und nun ist sie fast fertig.  Aber weil noch der Feinschliff fehlt, haben wir beschlossen, mit der GUI als Standard-Benutzerschnittstelle auf die 4.0.x Veröffentlichungen zu warten.&lt;/p&gt;&lt;p&gt;In Anbetracht der vergangenen Zeit, der Anzahl der behobenen Fehler und den Verbesserungen seit der letzten Veröffentlichung haben wir uns dazu entschieden, die nächste Veröffentlichung nicht weiter zu verzögern, nur um die GUI zu perfektionieren.  Daher wünschen wir viel Spaß mit der Version 3.8 von Octave und der Vorschau auf die neue GUI.  Wir sind der Meinung, dass sie schon ziemlich gut funktioniert, obwohl uns bewusst ist, dass es noch einige Ecken und Kanten sowie viele Dinge zu verbessern gibt.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Deshalb brauchen wir Deine Mithilfe!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Es gibt viele Möglichkeiten uns zu helfen die verbleibenden Probleme zu beheben, die GUI weiter zu entwickeln und die Benutzererfahrung für Neulinge und Experten gleichermaßen zu verbessern (Links öffnen im externen Browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Falls Du ein geschickter Software-Entwickler bist, kannst du helfen, indem du dich an der &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;Weiterentwicklung von Octave&lt;/a&gt; beteiligst.&lt;/li&gt;&lt;li&gt;Sollte Octave einmal nicht wie erwartet funktionieren, solltest Du das gefundene &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;Problem melden&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Egal, ob Du Anwender oder Entwickler bist, kannst du &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;helfen, das Projekt zu finanzieren&lt;/a&gt;.  Die Weiterentwicklung von Octave braucht viel Zeit und Sachverstand.  Dein Beitrag hilft sicherzustellen, dass Octave weiter verbessert wird.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Wir hoffen, dass du Octave nützlich findest.  Bitte hilf uns Octave zukünftig noch besser zu machen!&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Kopieren</translation>
     </message>
@@ -80,20 +75,146 @@
         <translation>Einfügen</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Alles auswählen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
         <translation>Alles löschen</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>Auswahl in die Zwischenablage kopiert</translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Werkzeugleiste</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Achsen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Gitter</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Autoskalierung</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Datei</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Speichern</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Speichern &amp;unter</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>Abbildung s&amp;chließen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Bearbeiten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>&amp;Kopieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>&amp;Ausschneiden</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>E&amp;infügen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Hilfe</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;Über QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>Über &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>Über QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Abbildung speichern unter</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Rotieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Vergrößern</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Verkleinern</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Schwenken</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Text einfügen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Auswählen</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -109,16 +230,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Octave Editor</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Octave Dateien (*.m);;Alle Dateien (*)</translation>
     </message>
@@ -135,7 +257,7 @@
 </translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -144,82 +266,72 @@
 ist im Editor bereits geöffnet</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Neue Datei</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>Datei &amp;speichern</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>Datei &amp;Öffnen...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
-        <translation>Datei speichern &amp;als...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>D&amp;atei speichern unter...</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Drucken...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Rückgängig</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>&amp;Redo</source>
-        <translation>&amp;Wiederholen</translation>
+        <translation>&amp;Wiederherstellen</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Copy</source>
+        <translation>&amp;Kopieren</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>&amp;Ausschneiden</translation>
     </message>
     <message>
         <location line="+3"/>
-        <source>&amp;Copy</source>
-        <translation>&amp;Kopieren</translation>
+        <source>Paste</source>
+        <translation>Einfügen</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>&amp;Nächstes Lesezeichen</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>&amp;Vorheriges Lesezeichen</translation>
     </message>
     <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>&amp;Ausschneiden</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Einfügen</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>&amp;Lesezeichen umschalten</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>&amp;Nächstes Lesezeichen</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>&amp;Voriges Lesezeichen</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>&amp;Lesezeichen setzen</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>Alle Lesezeichen &amp;entfernen</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation>&amp;Nächster Haltepunkt</translation>
     </message>
@@ -229,17 +341,17 @@
         <translation>&amp;Vorheriger Haltepunkt</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>Haltepunkt &amp;umschalten</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation>Alle Haltepunkte entfe&amp;rnen</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Kommentieren</translation>
     </message>
@@ -249,57 +361,243 @@
         <translation>Kommentar &amp;entfernen</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Suchen und Ersetzen...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Datei speichern und Ausführen</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translatorcomment>David: Ich denke Einzug erhöhen/verringern passt besser, da Ausrücken wohl das Verschieben von Text vor den Zeilenbeginn meint</translatorcomment>
+        <translation>E&amp;inzug erhöhen</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translatorcomment>Armin: Auch &quot;A&amp;usrücken&quot;</translatorcomment>
+        <translation>Einz&amp;ug verringern</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Suchen und Ersetzen...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Datei speichern und ausführen</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>&amp;Gehe zu Zeile...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Externer Editor kann nicht gestartet werden:
+%1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Erzeugen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Abbrechen</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation>&amp;Zuletzt bearbeitete Dateien</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>Funktion b&amp;earbeiten</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>S&amp;chließen</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Alle schließen</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Andere Dokumente schließen</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Alles auswählen</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>Befe&amp;hle</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Zeile kopieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Zeile ausschneiden</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Bis zum Anfang des Wortes löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Bis zum Ende des Wortes löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Bis zum Anfang der Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Bis zum Ende der Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Zeile oder Auswahl duplizieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Zeilen tauschen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>Vervoll&amp;ständigungsliste anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Format</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Auswahl zu Großb&amp;uchstaben</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Auswahl zu K&amp;leinbuchstaben</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Zeilenenden für &amp;Windows (CRLF) umwandeln</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Zeilenenden für &amp;Unix (LF) umwandeln</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Zeilenenden für &amp;Mac (CR) umwandeln</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Navi&amp;gation</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translatorcomment>Nicht ganz richtig. Funktioniert auch rückwärts mit der öffnenden Klammer. Besser &quot;passend&quot;, &quot;übereinstimmend&quot;, &quot;gegenüberliegend&quot;</translatorcomment>
+        <translation>Zur schließenden Klammer springen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translatorcomment>Nicht ganz richtig. Funktioniert auch rückwärts mit der öffnenden Klammer. Besser &quot;passend&quot;, &quot;übereinstimmend&quot;, &quot;gegenüberliegend&quot;</translatorcomment>
+        <translation>Auswählen bis zur schließenden Klammer</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Einstellungen...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>&amp;Stil-Einstellungen...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>&amp;Stil-Einstellungen...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>An&amp;sicht</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Zei&amp;lennummern anzeigen</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Z&amp;eilenenden anzeigen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>E&amp;inrückungshinweise anzeigen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>&amp;Markierung langer Zeilen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>Ver&amp;größern</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>Ver&amp;kleinern</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>&amp;Normale Größe</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Markierten Quellcode au&amp;sführen</translation>
     </message>
@@ -309,17 +607,17 @@
         <translation>&amp;Hilfe</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Hilfe zum Schlüsselwort</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Dokumentation zum Schlüsselwort</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -329,7 +627,7 @@
 %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -338,7 +636,7 @@
 existiert nicht. Soll sie erzeugt werden?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -348,32 +646,32 @@
 %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>Der zugehörige Editor-Reiter ist nicht mehr vorhanden.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Datei</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Neue &amp;Funktion...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Bearbeiten</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Lee&amp;rzeichen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>&amp;Debuggen</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Ausführen</translation>
     </message>
@@ -381,7 +679,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>Zeilenende:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>Zeile:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>Spalte:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>Kann %1 nicht öffnen: interne Funktion</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Kann Funktion %1 nicht finden</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>Gehe zu Zeile</translation>
     </message>
@@ -391,47 +714,56 @@
         <translation>Zeilennummer</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;unbenannt&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Änderungen speichern oder verwerfen?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>Die Datei
+ 
+   %1
+ 
+soll geschlossen werden, wurde aber modifiziert.  %2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Zeilenenden:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Octave Skripte (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Alle Dateien (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation>Änderungen speichern, verwerfen oder Schließen abbrechen?</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Octave Editor</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>Die Datei
-%1
-soll geschlossen werden, wurde aber verändert.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Octave Dateien (*.m);;All Files (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -447,24 +779,31 @@
 wurde gelöscht oder umbenannt. Soll die Datei jetzt gespeichert werden?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
-        <translation>Die Datei %1  konnte nicht zum Schreiben geöffnet werden:
+        <translation>Die Datei %1 konnte nicht zum Schreiben geöffnet werden:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Zeile:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Spalte:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+ist kein gültiger Bezeichner.
+
+Wird das Skript unter diesem Namen gespeichert, kann
+es nicht als Octave-Befehl aufgerufen werden.
+
+Einen anderen Namen wählen?</translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Die Datei %1 wurde von einer anderen Anwendung verändert. Soll der neue Inhalt geladen werden?</translation>
     </message>
@@ -472,7 +811,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Dateibrowser</translation>
     </message>
@@ -487,44 +826,45 @@
         <translation>Pfad oder Dateinamen eingeben</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Ordern darüber anwählen</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Setze Octave Verzeichnis zu aktuellem Browser Verzeichnis</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Aktionen mit aktuellem Verzeichnis</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Wechsle in Verzeichnis...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Dateien suchen...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Neue Datei</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Neues Verzeichnis</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Doppelklick auf eine Datei um diese zu öffnen</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>Aktuelles Octave Verzeichnis anzeigen</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Ein Verzeichnis höher</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
-        <translation>Zum aktuellen Octave Verezichnis gehen</translation>
+        <translation>Zum aktuellen Octave Verzeichnis gehen</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -532,38 +872,29 @@
         <translation>Octave Verzeichnis setzen</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Setze Octave Verzeichnis zu aktuellem Browser Verzeichnis</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>Wechsle zum Heimatverzeichnis</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Verzeichnis suchen...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translatorcomment>Dateien suchen...</translatorcomment>
-        <translation>Dateien suchen...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Neue Datei...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Neues Verzeichnis...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Doppelklick zum Öffnen im Editor, Rechtsklick für mehr Optionen</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Dateigröße</translation>
     </message>
@@ -583,7 +914,7 @@
         <translation>Verborgene Dateien anzeigen</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Öffnen</translation>
     </message>
@@ -613,17 +944,17 @@
         <translation>Aktuelles Verzeichnis setzen</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Umbenennen</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Löschen</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Umbenennen...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Löschen...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Datei/Verzeichnis umbenennen</translation>
     </message>
@@ -659,7 +990,7 @@
         <translation>Verzeichnis ist nicht leer und kann daher nicht gelöscht werden</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>Setze aktuelles Browser Verzeichnis</translation>
     </message>
@@ -677,7 +1008,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Neue Datei.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Neues Verzeichnis</translation>
     </message>
@@ -693,7 +1029,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>Viel Spaß!</translation>
     </message>
@@ -716,12 +1052,12 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;Wir hoffen, dass Du Octave nützlich findest.&lt;/p&gt;
-&lt;p&gt;Wenn Du auf Probleme stoßen solltest, gibt es eine Reihe von Wegen um Hilfe zu bekommen. Neben der Option kommerziellen Support zu erhalten, gibt es noch eine Mailingliste, ein Wiki und andere Community Support Channels.
+&lt;p&gt;Wenn Du auf Probleme stoßen solltest, gibt es eine Reihe von Wegen, um Hilfe zu bekommen. Neben der Option kommerziellen Support zu erhalten, gibt es noch eine Mailingliste, ein Wiki und andere Community Support Channels.
 Mehr über jede Möglichkeit findest Du im Internet unter &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (Wird im externen Browser geöffnet).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -756,7 +1092,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Suchen und Ersetzen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>&amp;Suche:</translation>
     </message>
@@ -826,7 +1167,7 @@
         <translation>In Auswah&amp;l suchen</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>Vom Ende suchen</translation>
     </message>
@@ -836,9 +1177,9 @@
         <translation>Suche vom Beginn</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
-        <translation>Ergebins der Ersetzungen</translation>
+        <translation>Ergebnis der Ersetzungen</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -846,7 +1187,7 @@
         <translation>%1 Vorkommnisse ersetzt</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>Suchergebnis</translation>
     </message>
@@ -869,12 +1210,7 @@
         <translation>Name:</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Eingabe eines Ausdrucks für den Dateinamen</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>Beginne in:</translation>
     </message>
@@ -894,24 +1230,14 @@
         <translation>Suche Startverzeichnis</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Unterverzeichnisse durchsuchen</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>Rekursive Dateisuche durch Unterverzeichnisse</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Verzeichnisse einbeziehen</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
-        <translation>Auch Verzeichnisse berücksichtigen, die die Suchanfrage erfüllen</translation>
+        <translation>Auch Verzeichnisse berücksichtigen, deren Name die Suchanfrage erfüllt</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -929,9 +1255,24 @@
         <translation>In Datei vorkommender Text:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>Suche Dateien mit übereinstimmendem Text</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Suchausdruck für den Dateinamen</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Unterverzeichnisse einschließen</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Verzeichnisnamen einschließen</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Suche nach Dateien, die einen bestimmten Text enthalten</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -941,12 +1282,12 @@
     <message>
         <location line="+4"/>
         <source>Text case insensitive</source>
-        <translation>Groß-/Kleinschreibung beachten</translation>
+        <translation>Groß-/Kleinschreibung ignorieren</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set text content is case insensitive</source>
-        <translation>Groß-/Kleinschreibung beim Text beachten</translation>
+        <translation>Groß-/Kleinschreibung beim Text ignorieren</translation>
     </message>
     <message>
         <location line="+11"/>
@@ -994,7 +1335,13 @@
         <translation>Suche...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translatorcomment>Armin: alternativ &quot;Übereinstimmungen&quot;</translatorcomment>
+        <translation>%1 Treffer</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>Suchverzeichnis setzen</translation>
     </message>
@@ -1015,27 +1362,32 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Durchsuchen der Befehlshistorie.</translation>
     </message>
     <message>
         <location line="+24"/>
         <source>Double-click a command to transfer it to the terminal.</source>
-        <translation>Doppelklick auf ein Kommando um dieses in das Terminal zu übertragen.</translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Texteingabe zur Filterung der Befehlshistorie.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Doppelklick auf ein Kommando, um dieses in das Terminal zu übertragen.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Suchbegriff eingeben, um die Befehlshistorie zu filtern</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filter</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Befehlshistorie</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Kopieren</translation>
     </message>
@@ -1045,7 +1397,7 @@
         <translation>Ausführen</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Skript erzeugen</translation>
     </message>
@@ -1076,7 +1428,7 @@
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;Es scheint, dass die grafische Benutzerschnittstelle (GUI) zum ersten Mal auf diesem Computer gestartet wurde.
-Klicke auf &apos;Weiter&apos; um eine Konfigurationsdatei anzulegen und Octave zu starten.&lt;/p&gt;
+Klicke auf &apos;Weiter&apos;, um eine Konfigurationsdatei anzulegen und Octave zu starten.&lt;/p&gt;
 &lt;p&gt;Die Konfigurationsdatei wird in&lt;br&gt;%1&lt;br&gt;gespeichert.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -1084,53 +1436,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Lade Arbeitsumgebung</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Über Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Datei</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Neu</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Skript</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Abbildung</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Öffnen...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Einstellungen...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Beenden</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Bearbeiten</translation>
     </message>
@@ -1140,22 +1482,22 @@
         <translation>Rückgängig</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Kopieren</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Einfügen</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
-        <translation>Arbeitsumgebung speichern als</translation>
-    </message>
-    <message>
-        <location line="+124"/>
+        <translation>Arbeitsumgebung speichern unter</translation>
+    </message>
+    <message>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>Die Datei &apos;%1&apos; mit Versionshinweisen ist leer.</translation>
     </message>
@@ -1170,17 +1512,42 @@
         <translation>Versionshinweise zu Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Neuigkeiten aus der Octave Community</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Octave wirklich beenden?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Öffne eine vorhandene Datei im Editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Neue Funktion...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Neue Abbildung</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Alles auswählen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Zwischenablage leeren</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Suche Dateien...</translation>
     </message>
@@ -1200,7 +1567,7 @@
         <translation>Arbeitsumgebung löschen</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>De&amp;bug</translation>
     </message>
@@ -1215,57 +1582,52 @@
         <translation>Fortfahren</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Debug Modus verlassen</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Dateibrowser anzeigen</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Dateibrowser</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Diese Version ist Anwärter auf eine Veröffentlichung der experimentellen Octave GUI.&lt;/strong&gt;  Octave wird ständig verbessert und diese GUI wird die Standard-Benutzerschnittstelle der 4.0 Veröffentlichung sein. Weitere Informationen sind unter &quot;Versionshinweise&quot; im Menü &quot;Neuigkeiten&quot; oder auf &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; zu finden.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Hineinspringen</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Lade Arbeitsumgebung...</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Save Workspace As...</source>
-        <translation>Arbeitsumgebung speichern als...</translation>
-    </message>
-    <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Funktion...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <translation>Arbeitsumgebung speichern unter...</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Neues Skript</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Herausspringen</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation>Fensterlayout auf Grundeinstellung zurücksetzen</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Octave Pakete</translation>
     </message>
@@ -1285,7 +1647,7 @@
         <translation>Ressourcen für Octave Entwickler</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>Auf der Festplatte</translation>
     </message>
@@ -1295,7 +1657,7 @@
         <translation>Im Internet</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Neuigkeiten</translation>
     </message>
@@ -1310,23 +1672,12 @@
         <translation>Neuigkeiten der Community</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Weitere Informationen</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Verbergen</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Informationen zur experimentellen GUI</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Werkzeugleiste</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Neues Verzeichnis eingeben</translation>
     </message>
@@ -1341,69 +1692,74 @@
         <translation>Ein Verzeichnis höher</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Verzeichnis suchen</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Debug-Modus beenden</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Fenster</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Befehlsfenster anzeigen</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Befehlshistorie anzeigen</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Arbeitsumgebung anzeigen</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Editor anzeigen</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Dokumentation anzeigen</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Arbeitsumgebung anzeigen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Editor anzeigen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Dokumentation anzeigen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Befehlsfenster</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Befehlshistorie</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Arbeitsumgebung</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Dokumentation</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Hilfe</translation>
     </message>
@@ -1416,7 +1772,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1475,18 +1831,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Fenster lösen</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Fenster verbergen</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Fenster andocken</translation>
     </message>
@@ -1494,7 +1850,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Hilfe zu</translation>
     </message>
@@ -1508,28 +1864,18 @@
         <source>Edit</source>
         <translation>Bearbeite</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>Markierter Quellcode au&amp;sführen</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Nein</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Erzeugen</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1544,13 +1890,13 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>Die Datei %1 exisitiert nicht im Suchpfad. Um die editierte Funktion zu debuggen, muss entweder in das Verzeichnis %2 gewechselt werden oder dieses Verzeichnis dem Suchpfad hinzugefügt werden.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>Die Datei %1 befindet sich nicht im Suchpfad. Um die momentan geöffnete Datei auszuführen oder zu debuggen, in das Verzeichnis %2 wechseln oder dieses Verzeichnis dem Suchpfad hinzufügen.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>Die Datei %1 wird von einer gleichnamigen Datei im Suchpfad überdeckt. Um die editierte Funktion zu debuggen, muss in das Verzeichnis %2 gewechselt werden.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Die Datei %1 wird von einer Datei gleichen Namens im Suchpfad verdeckt. Um die momentan geöffnete Funktion auszuführen oder zu debuggen, in das Verzeichnis %2 wechseln.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1568,15 +1914,24 @@
         <translation>Verzeichnis zum Suchpfad hinzufügen</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Abbrechen</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Standard</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1590,10 +1945,10 @@
 Stelle sicher, dass Du Lese- und Schreibrechte für
 %2
 besitzt.
-Die Octave Benutzeroberfläche muss jetzt geschlossen werden.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+Die Octave-Benutzeroberfläche muss jetzt geschlossen werden.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Kritischer Octave Fehler</translation>
     </message>
@@ -1601,314 +1956,736 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Einstellungen</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Allgemein</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Nur Octave Logo</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation>Icons mit Buchstaben</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="-111"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Dock widget title bar</source>
+        <translation>Titelleisten der Unterfenster</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation>Klein</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Groß</translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation>Benutzerdefiniert</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <location filename="../src/ui-settings-dialog.h" line="+63"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Farbe</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Funktioniert gut mit Schriftarten fester Breite. 
+Die Position der angezeigten Linie basiert auf der Breite eines Leerzeichens der Standardschriftart.
+Dies funktioniert möglicherweise nicht mit Stilen, die eine Schriftart variabler Breite verwenden 
+oder wenn unterschiedliche Schriftgrößen oder -stile (fett/kursiv/normal) verwendet werden.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Code-Faltung aktivieren</translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Horizontale Bildlaufleiste anzeigen</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Einrückung</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation>Einrücken um</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation>Tabulator rückt ein</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Auto Einrückung</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Tabulatorweite</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation>Einrückregeln anzeigen</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>Rücktaste entfernt Einrückung</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation>Tabulator statt Leerzeichen</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Autovervollständigung</translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
         <translation>Schlüsselwörter berücksichtigen</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>Groß-/Kleinschreibung beachten</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Wort durch Vorschlag ersetzen</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Wort durch Vorschlag ersetzen</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>Wörter im Dokument berücksichtigen</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation>Mit internen Funktionen</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Mit Octave-Funktionen</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Liste von Vorschlägen automatisch anzeigen</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
-        <translation>Editor Dateien der letzten Sitzung wiederherstellen</translation>
-    </message>
-    <message>
-        <location line="+60"/>
+        <translation>Editor-Dateien der letzten Sitzung wiederherstellen</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Extern geänderte Dateien ohne Nachfrage neu laden</translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
         <translation>Externen Editor verwenden</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation>Editor Stile</translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Auswahl von Schrift, Schriftgröße (als Differenz von der Standardgröße), Schriftstil (&lt;b&gt;f&lt;/b&gt;ett, &lt;b&gt;k&lt;/b&gt;ursiv, &lt;b&gt;u&lt;/b&gt;nterstrichen), Text- und Hintergrundfarbe (für den Hintergrund ist die Farbe Pink (255,0,255) ein Platzhalter für die Standardfarbe)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Ändern der Puffergröße löscht Historie)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Puffergröße der Befehlshistorie</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Debug-Position im Terminal ausgeben, zusätzlich zur Markierung im Editor</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Terminal Colors</source>
         <translation>Farben des Befehlsfensters</translation>
     </message>
     <message>
-        <location line="+45"/>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation>Schriftart</translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
         <translation>Zeilennummern anzeigen</translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Aktuelle Zeile hervorheben</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Vervollständigung</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Kompletten Pfad im Reiter anzeigen</translation>
-    </message>
-    <message>
         <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Aktuelle Zeile hervorheben</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Kompletten Pfad im Reiter anzeigen</translation>
+    </message>
+    <message>
+        <location line="-549"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Interface</source>
+        <translation>Benutzeroberfläche</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Vor dem Beenden nachfragen</translation>
+    </message>
+    <message>
+        <location line="+74"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
         <source>Graphic icons</source>
         <translation>Grafische Icons</translation>
     </message>
     <message>
+        <location line="+29"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Statusleiste anzeigen</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Text inaktiv</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Aktiv</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Background inactive</source>
+        <translation>Hintergrund inaktiv</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Octave Startup</source>
+        <translation>Start von Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Startpfad</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Auswählen</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Nach Spalte</translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show whitespace</source>
+        <translation>Leerzeichen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Leerzeichen der Einrückung nicht anzeigen</translation>
+    </message>
+    <message>
+        <location line="+58"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Tab width min.</source>
+        <translation>Reiterbreite min.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>max.</translation>
+    </message>
+    <message>
+        <location line="+615"/>
+        <location filename="../src/ui-settings-dialog.h" line="+45"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Nicht existierende Dateien ohne Nachfrage anlegen</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>Kommandozeile (%f=Datei, %l=Zeile):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Befehlsfenster</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Cursortyp:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Blinkender Cursor</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Vordergrundfarbe verwenden</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Schriftgröße</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Wechsle ins Terminalfenster, wenn ein Befehl von einem anderen Fenster aus gestartet wird</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Dateibrowser</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Dateigröße anzeigen</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Dateityp anzeigen</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Datum der letzten Änderung anzeigen</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Versteckte Dateien anzeigen</translation>
+    </message>
+    <message>
+        <location line="-1647"/>
+        <location filename="../src/ui-settings-dialog.h" line="-92"/>
+        <source>Normal</source>
+        <translation>Normal</translation>
+    </message>
+    <message>
+        <location line="+270"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Diese Einstellungen werden nach dem Laden vorhandener .octaverc-Dateien angewendet.</translation>
+    </message>
+    <message>
         <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation>Leerzeichen anzeigen</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Leerzeichen der Einrückung nicht anzeigen</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Anzahl der eingegebenen Zeichen bis Vervollständigungsliste</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Nicht existierende Dateien ohne Nachfrage anlegen</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>Kommandozeile (%f=Datei, %l=Zeile):</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Befehlsfenster</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Cursortyp:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Arbeitsverzeichnis der vorherigen Sitzung wiederherstellen</translation>
+    </message>
+    <message>
+        <location line="+322"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>Draw a long line marker</source>
+        <translatorcomment>This is a fairly loose translation which is clearer IMO.</translatorcomment>
+        <translation>Vertikale Linie zeichnen</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>EOL-Steuerzeichen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Standard-EOL-Modus</translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Mindestanzahl Zeichen für Öffnen der Liste: </translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>File handling</source>
+        <translation>Dateiverwaltung</translation>
+    </message>
+    <message>
+        <location line="+93"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Wähle Schriftart, Schriftgröße (als Differenz zur Standard-Schriftgröße), Schriftstil (&lt;b&gt;f&lt;/b&gt;ett, &lt;b&gt;k&lt;/b&gt;ursiv, &lt;b&gt;u&lt;/b&gt;nterstrichen), Textfarbe und Hintergrundfarbe (bei letzterer ist Magenta (255,0,255) ein Platzhalter für die Standard-Hintergrundfarbe).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+341"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Display</source>
+        <translation>Anzeige</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Alternierende Farben für die Zeilen verwenden</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Verhalten</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Letztes Verzeichnis der vorherigen Sitzung wiederherstellen</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Arbeitsumgebung</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Tooltips verbergen</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Zum Bearbeiten eines Tastenkürzels auf eine Zelle doppelklicken</translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Netzwerk</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Blinkender Cursor</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Vordergrundfarbe verwenden</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Schriftgröße</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Dateibrowser</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Dateigröße anzeigen</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Dateityp anzeigen</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Datum der letzten Änderung anzeigen</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Versteckte Dateien anzeigen</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Alternierende Farben für die Zeilen verwenden</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Arbeitsumgebung</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Farben der Speicherklassen festlegen</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Netzwerk</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation>Octave erlauben Neuigkeiten und Informationen von der Octave Webseite anzuzeigen</translation>
+        <translation>Octave erlauben, Neuigkeiten und Informationen von der Octave Webseite anzuzeigen</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Proxy-Server verwenden</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>HTTP Proxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>Icons der Unterfenster</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Sprache (Neustart erforderlich)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Icon-Größe</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Octave-Arbeitsverzeichnis und Dateibrowser synchronisieren</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Farben für Variablen-Attribute</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Tastenkürzel</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Wähle diese Option, um Konflikte mit den Tastenkürzeln von &quot;Readline&quot; zu verhindern</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Globale Tastenkürzel deaktivieren, solange Terminal-Fenster den Fokus hat</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Diesen Satz verwenden</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Satz 1:</translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Sprache (Neustart erforderlich)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exportieren</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importieren</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Icongröße</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Octave Arbeitsverzeichnis und Dateibrowser synchronisieren</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Satz 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Aktion</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Satz 1 Standard</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Satz 1 aktuell</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Satz 2 Standard</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Satz 2 aktuell</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Socks5Proxy</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Hostname:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>Proxy Typ:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Port:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Nutzername:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Passwort:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Systemeinstellung</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>IBeam-Cursor</translation>
     </message>
@@ -1923,7 +2700,7 @@
         <translation>Unterstrichener Cursor</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Differenz zur Standardgröße</translation>
     </message>
@@ -1950,6 +2727,16 @@
         <comment>short form for underlined</comment>
         <translation>u</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Octave Start-Ordner festlegen</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Datei-Browser Start-Ordner wählen</translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -2007,6 +2794,628 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Neue Datei</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Neue Funktion</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Neue Abbildung</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Datei öffnen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Lade Arbeitsumgebung</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Arbeitsumgebung speichern unter</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Einstellungen</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Octave beenden</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Kopieren</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Einfügen</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Rückgängig</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Alles auswählen</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Zwischenablage leeren</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>In Dateien suchen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Befehlsfenster löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Befehlshistorie löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Arbeitsumgebung löschen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Hineinspringen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Herausspringen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Fortfahren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Debug-Modus beenden</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Befehlsfenster anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Befehlshistorie anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Dateibrowser anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Arbeitsumgebung anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Editor anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Dokumentation anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Befehlsfenster</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Befehlshistorie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Dateibrowser</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Arbeitsumgebung</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Dokumentation</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Lokal installierte Dokumentation anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Online-Dokumentation anzeigen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Octave Pakete</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Code teilen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Zu Octave beitragen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Ressourcen für Octave Entwickler</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Über Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Versionshinweise</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Neuigkeiten der Community</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Funktion bearbeiten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Datei speichern</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Datei speichern unter</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Schließen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Alle schließen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Drucken</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Wiederherstellen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Ausschneiden</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Suchen und Ersetzen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Bis zum Anfang des Wortes löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Bis zum Ende des Wortes löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Bis zum Anfang der Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Bis zum Ende der Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Zeile löschen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Zeile kopieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Zeile ausschneiden</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Zeile oder Auswahl duplizieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Zeilen tauschen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translatorcomment>David: geändert damit identisch mit dem Editor-Menü</translatorcomment>
+        <translation>Kommentieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translatorcomment>David: geändert damit identisch mit dem Editor-Menü</translatorcomment>
+        <translation>Kommentar entfernen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Auswahl zu Großbuchstaben</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Auswahl zu Kleinbuchstaben</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Einzug erhöhen</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Einzug verringern</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Zeilenenden für Windows umwandeln</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Zeilenenden für Linux umwandeln</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Zeilenenden für Mac umwandeln</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Leerzeichen anzeigen</translation>
+    </message>
+    <message>
+        <location line="-22"/>
+        <source>Goto Line</source>
+        <translation>Gehe zu Zeile</translation>
+    </message>
+    <message>
+        <location line="-125"/>
+        <source>Step</source>
+        <translation>Einzelschritt</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Fensterlayout auf Grundeinstellung zurücksetzen</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Fehler melden</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Andere Dokumente schließen</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Vervollständigungsliste anzeigen</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <source>Move to Matching Brace</source>
+        <translation>Zur schließenden Klammer springen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Auswahl bis zur schließenden Klammer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Lesezeichen umschalten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Nächstes Lesezeichen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Vorheriges Lesezeichen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Alle Lesezeichen entfernen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Stil-Einstellungen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Zeilennummern anzeigen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Endings</source>
+        <translation>Zeilenenden anzeigen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Einrückungshinweise anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Markierung langer Zeilen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Vergrößern</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Verkleinern</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Normale Größe</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Lesezeichen umschalten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Nächster Haltepunkt</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Vorheriger Haltepunkt</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Alle Haltepunkte entfernen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Datei ausführen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Auswahl ausführen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Hilfe zum Schlüsselwort</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Dokumentation zum Schlüsselwort</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Hauptprogramm</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Datei</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Bearbeiten</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Debuggen</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Fenster</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Hilfe</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Neuigkeiten</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Ansicht</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Ausführen</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Neues Tastenkürzel für Satz %1 eingeben</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Das gewünschte Tastenkürzel eingeben oder auf die Schaltfläche rechts klicken, um das Tastenkürzel auf seinen Standardwert zurückzusetzen.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Tastenkürzel direkt durch seine Ausführung eingeben</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Aktives Tastenkürzel</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Standard-Tastenkürzel</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Auf Standardwert setzen</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Doppeltes Tastenkürzel</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>Das gewählte Tastenkürzel
+  &quot;%1&quot;&quot;
+wird bereits für die Aktion
+  &quot;%2&quot;&quot;
+verwendet. Soll das Tastenkürzel trotzdem verwendet werden und damit von der vorgenannten Aktion entfernt werden?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Tastenkürzel-Satz %1 aus Datei importieren ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Octave Tastenkürzel-Dateien (*.osc);;Alle Dateien (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Tastenkürzel-Satz %1 in Datei exportieren ...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Konnte %1 nicht als Octave-Tastenkürzel-Datei öffnen</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2017,15 +3426,25 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
-        <translation>Suchbegriff eingeben und mit &apos;Enter&apos; die Suche starten</translation>
+        <translation>Suchbegriff eingeben und mit der &apos;Eingabetaste&apos; die Suche starten</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Global search</source>
         <translation>Globale Suche</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Fehler</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>Die Info-Datei &lt;p&gt;%1&lt;p&gt;existiert nicht, auch keine komprimierte Version</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2059,8 +3478,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Speicherklasse</translation>
+        <source>Attribute</source>
+        <translation>Attribut</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2077,7 +3496,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Arbeitsumgebung</translation>
     </message>
@@ -2087,9 +3506,24 @@
         <translation>Variablen einsehen, die sich in der aktiven Arbeitsumgebung befinden.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Kopieren</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Text eingeben um die Arbeitsumgebung zu filtern</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filter</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Namen kopieren</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Wert kopieren</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2097,19 +3531,19 @@
         <translation>Umbenennen</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Nur Variablen auf höchster Ebene können umbenannt werden.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>Einsehen der Variablen der aktiven Arbeitsumgebung.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Farben der Speicherklassen:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Farben für Variablen-Attribute:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/en_US.ts
+++ b/libgui/languages/en_US.ts
@@ -61,16 +61,11 @@
         <source>cursor</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
@@ -80,20 +75,146 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -109,16 +230,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -134,44 +256,34 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation type="unfinished"></translation>
     </message>
@@ -181,42 +293,42 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+6"/>
+        <source>&amp;Copy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+3"/>
-        <source>&amp;Copy</source>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
+        <source>Toggle &amp;Bookmark</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation type="unfinished"></translation>
     </message>
@@ -226,17 +338,17 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation type="unfinished"></translation>
     </message>
@@ -246,57 +358,238 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation type="unfinished"></translation>
     </message>
@@ -306,63 +599,63 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation type="unfinished"></translation>
     </message>
@@ -370,7 +663,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation type="unfinished"></translation>
     </message>
@@ -380,44 +698,52 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -431,23 +757,24 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation type="unfinished"></translation>
     </message>
@@ -455,7 +782,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation type="unfinished"></translation>
     </message>
@@ -470,42 +797,43 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -515,37 +843,29 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation type="unfinished"></translation>
     </message>
@@ -565,7 +885,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation type="unfinished"></translation>
     </message>
@@ -595,17 +915,17 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -639,7 +959,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation type="unfinished"></translation>
     </message>
@@ -656,7 +976,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -671,7 +996,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation type="unfinished"></translation>
     </message>
@@ -694,7 +1019,7 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation type="unfinished"></translation>
@@ -719,7 +1044,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -789,7 +1119,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation type="unfinished"></translation>
     </message>
@@ -799,7 +1129,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation type="unfinished"></translation>
     </message>
@@ -809,7 +1139,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation type="unfinished"></translation>
     </message>
@@ -832,12 +1162,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -857,22 +1182,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation type="unfinished"></translation>
     </message>
@@ -892,8 +1207,23 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -957,7 +1287,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -978,7 +1313,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -988,17 +1323,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1008,7 +1348,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1043,53 +1383,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1099,22 +1429,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1129,17 +1459,42 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1159,7 +1514,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1174,32 +1529,27 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1209,22 +1559,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1244,7 +1594,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1254,7 +1604,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1269,23 +1619,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1300,69 +1639,74 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1375,7 +1719,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1411,18 +1755,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1430,7 +1774,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1444,28 +1788,18 @@
         <source>Edit</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1478,12 +1812,12 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1502,15 +1836,24 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1521,7 +1864,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1529,314 +1872,732 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="-111"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Dock widget title bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>3D</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <location filename="../src/ui-settings-dialog.h" line="+63"/>
         <source>Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Terminal Colors</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+45"/>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-549"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+74"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
         <source>Graphic icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+29"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Background inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Octave Startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show whitespace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+58"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Tab width min.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+615"/>
+        <location filename="../src/ui-settings-dialog.h" line="+45"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1647"/>
+        <location filename="../src/ui-settings-dialog.h" line="-92"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+270"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+322"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>Draw a long line marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>File handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+93"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+341"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Display</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1851,7 +2612,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1878,6 +2639,16 @@
         <comment>short form for underlined</comment>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -1924,6 +2695,622 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -1934,7 +3321,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1943,6 +3330,16 @@
         <source>Global search</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -1976,7 +3373,7 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
+        <source>Attribute</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1994,7 +3391,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2004,8 +3401,23 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2014,18 +3426,18 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
+        <source>Colors for variable attributes:</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
--- a/libgui/languages/es_ES.ts
+++ b/libgui/languages/es_ES.ts
@@ -49,7 +49,8 @@
     <message>
         <location line="+1"/>
         <source>background</source>
-        <translation>plano de fondo</translation>
+        <translatorcomment>La interpretación correcta en castellano de background es &apos;segundo plano&apos;, en lugar del literal &apos;plano de fondo&apos;</translatorcomment>
+        <translation>segundo plano</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -61,16 +62,11 @@
         <source>cursor</source>
         <translation>cursor</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Nota acerca de la nueva GUI de Octave&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Una de las novedades más grandes de Octave 3.8 es la interfaz gráfica de usuario.  Esto ha sido algo que los usuarios han solicitado frecuentemente durante los últimos años, y ahora está casi lista. Pero como esta interfaz aún no está tan pulida como a nosotros nos gustaría, hemos decidido esperar hasta la serie de versiones 4.0.x de Octave para hacer a la GUI la interfaz por defecto.&lt;/p&gt;&lt;p&gt;Dado el tiempo transcurrido, el número de correcciones de errores del software (bugs) y el número de mejoras desde la última versión mayor de Octave, también hemos decidido retrasar el lanzamiento de todas estas nuevas mejoras durante más tiempo con el fin de perfeccionar la GUI.  Disfrute de la versión 3.8 de Octave y la versión previa de la nueva GUI.  Creemos que está funcionando razonablemente bien, pero también somos conscientes de que existen muchas cosas que se pueden mejorar.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Necesitamos su ayuda&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Hay varias maneras mediante las cuales usted nos puede ayudar a arreglar errores, completar la GUI y, en general, mejorar la experiencia del usuario, ya sean novatos o expertos (los enlaces se abrirán en un navegador externo):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Si usted es un desarrollador de software experimentado, puede contribuir con su tiempo para ayudar &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;Desarrollo de Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Si Octave no funciona adecuadamente, se le invita a  &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;reportar problemas &lt;/a&gt; que haya encontrado.&lt;/li&gt;&lt;li&gt;Si usted es usuario o desarrollador, puede &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;ayudar a financiar el proyecto&lt;/a&gt;.  El desarrollo de Octave necesita tiempo y conocimientos. Su contribución ayudaría en gran medida a asegurar que Octave continúe mejorando.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Esperamos que haya encontrado Octave muy útil. Por favor, ¡ayúdenos a hacerlo aún mejor en el futuro!&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
@@ -80,20 +76,146 @@
         <translation>Pegar</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>Limpiar todo</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Seleccionar todo</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>Limpiar ventana</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>selección copiada al portapapeles</translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Barra de herramientas de figura</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Ejes</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Malla</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Autoescalado</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Archivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Guardar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Guardar &amp;como</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Cerrar figura</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Editar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>Cop&amp;iar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Cor&amp;tar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Pegar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ayuda</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;Acerca de QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>Acerca de &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>Acerca de QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Guardar figura como</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Rotar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Ampliar</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Reducir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Mover</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Insertar texto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Seleccionar</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -109,16 +231,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Editor de Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Archivos de Octave (*.m);;Todos los archivos (*)</translation>
     </message>
@@ -128,43 +251,27 @@
         <translation>Nueva función</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>New function name:
-</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+536"/>
+        <location line="+718"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Nuevo archivo</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Guardar archivo</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Abrir archivo...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Guardar archivo &amp;como...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Imprimir...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Deshacer</translation>
     </message>
@@ -174,62 +281,99 @@
         <translation>&amp;Rehacer</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copiar</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Cu&amp;t</source>
         <translation>Cor&amp;tar</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
         <source>Paste</source>
         <translation>Pegar</translation>
     </message>
     <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Siguiente &amp;marcador</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Marcador &amp;anterior</translation>
+    </message>
+    <message>
+        <location line="-1237"/>
+        <source>New function name:
+</source>
+        <translation>Nombre para la nueva función:
+</translation>
+    </message>
+    <message>
+        <location line="+99"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>No se puede abrir el editor de texto personalizado
+%1</translation>
+    </message>
+    <message>
+        <location line="+125"/>
+        <source>Could not open file
+%1
+for read: %2.</source>
+        <translation>El fichero
+%1
+no puede ser abierto para lectura: %2.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>File
+%1
+does not exist. Do you want to create it?</source>
+        <translation>El fichero
+%1
+no existe. ¿Desea crearlo?</translation>
+    </message>
+    <message>
+        <location line="+998"/>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>&amp;Alternar marcadores</translation>
+    </message>
+    <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>Siguiente &amp;marcador</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Marcador &amp;anterior</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>&amp;Alternar marcadores</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Eliminar todos los marcadores</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Mostrar &amp;espacios en blanco</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Next Breakpoint</source>
         <translation>&amp;Siguiente punto de interrupción</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Pre&amp;vious Breakpoint</source>
-        <translation>Punto de interrupción &amp;previo</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Punto de interrupción &amp;anterior</translation>
+    </message>
+    <message>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>&amp;Alternar puntos de interrupción</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation>&amp;Eliminar todos los puntos de interrupción</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Comentar</translation>
     </message>
@@ -239,57 +383,251 @@
         <translation>&amp;Eliminar comentario</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Buscar y reemplazar...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Guardar archivo y ejecutar</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>Aplicar &amp;sangría</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Eliminar sangría</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Buscar y reemplazar...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Guardar archivo y ejecutar</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>&amp;Ir a línea...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-978"/>
+        <source>Create</source>
+        <translation>Crear</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Cancelar</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>Could not open file
+%1
+for write: %2.</source>
+        <translation>El fichero
+%2
+no se puede abrir para escritura: %2.</translation>
+    </message>
+    <message>
+        <location line="+62"/>
+        <source>File not saved! A file with the selected name
+%1
+is already open in the editor</source>
+        <translation>¡Fichero no guardado! Ya hay un fichero con el nombre seleccionado
+%1
+abierto en el editor</translation>
+    </message>
+    <message>
+        <location line="+762"/>
         <source>&amp;Recent Editor Files</source>
         <translation>Archivos &amp;recientes</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Editar función</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>C&amp;errar</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Cerrar todo</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Cerrar otros archivos</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Seleccionar todo</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>&amp;Comandos</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Eliminar línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Cortar línea</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Eliminar hasta el inicio de palabra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Eliminar hasta el fin de palabra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Eliminar hasta el inicio de línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Eliminar hasta el final de línea</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar selección/línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Intercambiar con línea anterior</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>&amp;Mostrar lista de comandos coincidentes</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Formato</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Convertir selección a &amp;mayúsculas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Convertir selección a m&amp;inúsculas</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Convertir los finales de línea a &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Convertir los finales de línea a &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Convertir los finales de línea a &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>&amp;Navegación</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translatorcomment>Las posibilidades son paréntesis, corchete o llave.</translatorcomment>
+        <translation>Mover al paréntesis/corchete/llave correspondiente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Seleccionar hasta el paréntesis/corchete/llave correspondiente</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Preferencias...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>Preferencias de &amp;estilos...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>Preferencias de &amp;estilos...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>&amp;Ver</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Mostrar números de &amp;línea</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Mostrar &amp;fines de línea</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Mostrar guías de &amp;sangría</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Mostrar &amp;marcador de longitud de línea</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>&amp;Ampliar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>&amp;Disminuir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>Tamaño &amp;normal</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Ejecutar &amp;selección</translation>
     </message>
@@ -299,70 +637,37 @@
         <translation>&amp;Ayuda</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Ayuda de palabras clave</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Documentación de palabras clave</translation>
     </message>
     <message>
-        <location line="-741"/>
-        <source>Could not open file
-%1
-for read: %2.</source>
-        <translation>No se ha podido abrir el archivo\n%1\npara lectura: %2.</translation>
-    </message>
-    <message>
-        <location line="+22"/>
-        <source>File
-%1
-does not exist. Do you want to create it?</source>
-        <translation>El archivo\n%1\nno existe. ¿Desea crearlo?</translation>
-    </message>
-    <message>
-        <location line="+18"/>
-        <source>Could not open file
-%1
-for write: %2.</source>
-        <translation>No se ha podido abrir el archivo\n%1\npara escritura: %2.</translation>
-    </message>
-    <message>
-        <location line="+59"/>
-        <source>File not saved! A file with the selected name
-%1
-is already open in the editor</source>
-        <translation>¡Archivo no guardado! Un archivo con el nombre seleccionado\n%1\nya se encuentra abierto en el editor</translation>
-    </message>
-    <message>
-        <location line="+28"/>
+        <location line="-969"/>
         <source>The associated file editor tab has disappeared.</source>
-        <translation>La pestaña para la edición del archivo ha desaparecido.</translation>
-    </message>
-    <message>
-        <location line="+521"/>
+        <translation>La pestaña del editor de texto asociado ha desaparecido.</translation>
+    </message>
+    <message>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Archivo</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Nueva &amp;función...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+166"/>
         <source>&amp;Debug</source>
         <translation>&amp;Depurar</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Ejecutar</translation>
     </message>
@@ -370,9 +675,34 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>Fin de línea:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>Línea:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>Columna:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 es una función integrada en Octave</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>No se encuentra la función %1</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
-        <translation>Ir a línea</translation>
+        <translation>Ir a la línea</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -380,82 +710,106 @@
         <translation>Número de línea</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;sin nombre&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>¿Desea guardar o descartar los cambios?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Do you want to cancel closing, save or discard the changes?</source>
-        <translation>¿Desea cancelar el cierre, guardar o descartar los cambios?</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
-        <source>Octave Editor</source>
-        <translation>Editor de Octave</translation>
-    </message>
-    <message>
-        <location line="-293"/>
+        <location line="+4"/>
         <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>El archivo\n%1\nestá a punto de ser cerrado, pero ha sido modificado.\n%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Archivos de Octave(*.m);;Todos los archivos(*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>El fichero
+
+  %1
+
+se va a cerrar, pero ha sido modificado.  %2</translation>
+    </message>
+    <message>
+        <location line="+213"/>
+        <source>Could not open file %1 for write:
+%2.</source>
+        <translation>El fichero %1 no se puede abrir para escritura:
+%2.</translation>
+    </message>
+    <message>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+no es un identificador válido.
+
+Si mantiene este nombre para el fichero, no podrá llamar al script
+usando su nombre como un comando de Octave.
+
+¿Desea seleccionar otro nombre?</translation>
+    </message>
+    <message>
+        <location line="+101"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
-        <translation>\n\n Advertencia: ¡El contenido del editor ha sido modificado!</translation>
+        <translation>
+
+Aviso: ¡el contenido del editor ha sido modificado!</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>It seems that the file
 %1
 has been deleted or renamed. Do you want to save it now?%2</source>
-        <translation>Parece que el archivo\n%1\nha sido eliminado o renombrado.¿Desea guardarlo ahora?%2</translation>
-    </message>
-    <message>
-        <location line="-172"/>
-        <source>Could not open file %1 for write:
-%2.</source>
-        <translation>No se ha podido abrir el archivo %1 para escritura:\n%2.</translation>
-    </message>
-    <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Línea:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Col:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <translation>Parece que el fichero
+%1
+ha sido eliminado o renombrado. ¿Desea salvarlo ahora?%2</translation>
+    </message>
+    <message>
+        <location line="-210"/>
+        <source>Line Endings:</source>
+        <translation>Fin de línea:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Archivos de Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Todos los archivos (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
+        <source>Do you want to cancel closing, save or discard the changes?</source>
+        <translation>¿Desea cancelar el cierre, guardar o descartar los cambios?</translation>
+    </message>
+    <message>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
+        <source>Octave Editor</source>
+        <translation>Editor de Octave</translation>
+    </message>
+    <message>
+        <location line="-22"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
-        <translation>Parece que el archivo \&apos;%1\&apos; ha sido modificado por otra aplicación. ¿Desea recargarlo?</translation>
+        <translation>Parece que el archivo &apos;%1&apos; ha sido modificado por otra aplicación. ¿Desea recargarlo?</translation>
     </message>
 </context>
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Explorador de archivos</translation>
     </message>
@@ -470,42 +824,64 @@
         <translation>Introduzca la dirección o el nombre del archivo</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Subir un directorio</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Asignar el directorio actual del navegador como directorio de Octave</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Acciones en el directorio actual</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Asignar directorio de navegador...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Buscar archivos...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Nuevo archivo</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+123"/>
+        <source>Rename file/directory:
+</source>
+        <translation>Renombrar fichero/directorio
+</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>
+ to: </source>
+        <translation>
+ a: </translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <source>Are you sure you want to delete
+</source>
+        <translation>¿Está seguro de que quiere borrar
+</translation>
+    </message>
+    <message>
+        <location line="+214"/>
         <source>New Directory</source>
         <translation>Nuevo directorio</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Pulse dos veces en un archivo para abrirlo</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>Mostrar el directorio de Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Directorio superior</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Ir al directorio actual de Octave</translation>
     </message>
@@ -515,37 +891,29 @@
         <translation>Seleccionar el directorio de Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Asignar el directorio de Octave como directorio actual del explorador</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>Mostrar el directorio de inicio</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Buscar directorio...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Buscar archivos...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Nuevo archivo...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Nuevo directorio...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Activar para abrir en el editor. Haga clic derecho para ver las alternativas</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Tamaño del archivo</translation>
     </message>
@@ -565,7 +933,7 @@
         <translation>Mostrar ocultos</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Abrir</translation>
     </message>
@@ -595,51 +963,33 @@
         <translation>Asignar directorio actual</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Renombrar</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Eliminar</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Renombrar...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Eliminar...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Renombrar archivo/directorio</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Rename file/directory:
-</source>
-        <translation>Renombrar archivo/directorio:</translation>
+        <location line="+27"/>
+        <location line="+14"/>
+        <source>Delete file/directory</source>
+        <translation>Eliminar archivo/directorio</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>
- to: </source>
-        <translation>\na: </translation>
-    </message>
-    <message>
-        <location line="+25"/>
-        <location line="+14"/>
-        <source>Delete file/directory</source>
-        <translation>Eliminar archivo/directorio</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>Are you sure you want to delete
-</source>
-        <translation>¿Está seguro de que desea eliminar</translation>
-    </message>
-    <message>
-        <location line="+14"/>
         <source>Can not delete a directory that is not empty</source>
         <translation>No se puede eliminar un directorio que no esté vacío</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>Seleccionar directorio de explorador de archivos</translation>
     </message>
@@ -657,7 +1007,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Nuevo archivo.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Crear directorio</translation>
     </message>
@@ -673,14 +1028,14 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
-        <translation>¡Que lo disfrute!</translation>
+        <translation>¡Disfrútelo!</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Previous</source>
-        <translation>Previo</translation>
+        <translation>Anterior</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -696,13 +1051,13 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Esperamos que Octave haya sido una herramienta útil para usted.&lt;/p&gt;
-&lt;p&gt;Si ha encontrado problemas, existen varias opciones para obtener ayuda, incluyendo soporte comercial, una lista de correo electrónico, una página wiki y otros canales de soporte basados en la comunidad.
-Puede encontrar más información acerca de estas opciones visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (abre en un navegador externo).&lt;/p&gt;
+&lt;p&gt;Esperamos que Octave le sea útil.&lt;/p&gt;
+&lt;p&gt;Si se encuentra con problemas, existen varias vías para obtener ayuda, las cuales incluyen soporte comercial, listas de correo, un wiki y otros canales de comunicación soportados por la comunidad.
+Puede encontrar más información visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (se abre en una ventana externa del navegador).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
@@ -726,9 +1081,9 @@
 &lt;head/&gt;&lt;body&gt;
 &lt;p&gt;Para más información acerca de Octave:&lt;/p&gt;
 &lt;ul&gt;
-&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (abre en un navegador externo)&lt;/li&gt;
-&lt;li&gt;Obtenga la documentación en linea en formato &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt; o como &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;documento&lt;/span&gt;&lt;/a&gt; pdf(abre en un navegador externo)&lt;/li&gt;
-&lt;li&gt;Abra el navegador de la documentación de la GUI de Octave con el menú de ayuda&lt;/li&gt;
+&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (se abre en una ventana externa del navegador)&lt;/li&gt;
+&lt;li&gt;Obtenga la documentación en linea en formato &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt; o como &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;documento&lt;/span&gt;&lt;/a&gt; pdf(se abre en una ventana externa del navegador)&lt;/li&gt;
+&lt;li&gt;Abra el navegador de documentación de la GUI de Octave desde el menú de ayuda&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/body&gt;&lt;/html&gt;
 
@@ -739,7 +1094,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Buscar y reemplazar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>&amp;Buscar:</translation>
     </message>
@@ -809,7 +1169,7 @@
         <translation>Buscar se&amp;lección</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>Buscar desde el final</translation>
     </message>
@@ -819,7 +1179,7 @@
         <translation>Buscar desde el inicio</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Reemplazar resultado</translation>
     </message>
@@ -829,7 +1189,7 @@
         <translation>%1 instancias reemplazadas</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>Resultado de la búsqueda</translation>
     </message>
@@ -849,22 +1209,17 @@
     <message>
         <location line="+10"/>
         <source>Named:</source>
-        <translation>Nombrado:</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Introducir la expresión del nombre de archivo</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <translation>Denominado:</translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>Start in:</source>
-        <translation>Iniciar en:</translation>
+        <translation>Buscar en:</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Enter the start directory</source>
-        <translation>Introducir directorio de inicio</translation>
+        <translation>Introduzca el directorio superior de búsqueda</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -874,62 +1229,67 @@
     <message>
         <location line="+1"/>
         <source>Browse for start directory</source>
-        <translation>Explorar para seleccionar el directorio de inicio</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Explorar directorios de forma recursiva</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Explorar para seleccionar el directorio superior de búsqueda</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>Buscar archivos de forma recursiva en los directorios</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Incluir directorios</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation>Incluir directorios que coicidan en los resultados de la búsqueda</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Name case insensitive</source>
-        <translation>Distinguir mayúsculas/minúsculas en nombre</translation>
+        <translation>No distinguir mayúsculas de minúsculas</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set matching name is case insensitive</source>
-        <translation>Establecer distinción entre mayúsculas y minúsculas en el nombre</translation>
+        <translation>Establecer la no distinción entre mayúsculas y minúsculas</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Contains text:</source>
-        <translation>Contiene el texto:</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>La búsqueda debe coincidir con el texto</translation>
+        <translation>Conteniendo el texto:</translation>
+    </message>
+    <message>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Introduzca expresión de búsqueda para los nombres de archivo</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Buscar en subdirectorios</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Incluir nombres de directorios</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Busca en el contenido del fichero</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Text to match</source>
-        <translation>Texto a coincidir</translation>
+        <translation>Texto a buscar</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Text case insensitive</source>
-        <translation>Distinguir mayúsculas/minúsculas en texto</translation>
+        <translation>No distinguir entre mayúsculas y minúsculas</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set text content is case insensitive</source>
-        <translation>Establecer distinción entre mayúsculas y minúsculas en el texto</translation>
+        <translation>Establecer la no distinción entre mayúsculas y minúsculas</translation>
     </message>
     <message>
         <location line="+11"/>
@@ -949,7 +1309,7 @@
     <message>
         <location line="+1"/>
         <source>Start search for matching files</source>
-        <translation>Empezar búsqueda de archivos coincidentes</translation>
+        <translation>Empezar la búsqueda</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -959,7 +1319,7 @@
     <message>
         <location line="+1"/>
         <source>Stop searching</source>
-        <translation>Detener búsqueda</translation>
+        <translation>Detener la búsqueda</translation>
     </message>
     <message>
         <location line="+15"/>
@@ -977,9 +1337,14 @@
         <translation>Buscando...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 resultado(s) coincidente(s)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
-        <translation>Seleccionar directorio de búsqueda</translation>
+        <translation>Seleccionar el directorio de búsqueda</translation>
     </message>
 </context>
 <context>
@@ -998,27 +1363,32 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Explorar y buscar en el historial de comandos.</translation>
     </message>
     <message>
         <location line="+24"/>
         <source>Double-click a command to transfer it to the terminal.</source>
-        <translation>Pulse dos veces un comando para transferirlo al terminal.</translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Introduzca texto para filtrar el historial de comandos.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Haga doble clic en un comando para transferirlo al terminal.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Introduzca texto para filtrar el historial de comandos</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Historial de comandos</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
@@ -1028,10 +1398,10 @@
         <translation>Evaluar</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translatorcomment>Ha sido utilizada la traducción &quot;guión&quot; de script: http://es.wikipedia.org/wiki/Script#Traducci.C3.B3n</translatorcomment>
-        <translation>Crear un guión</translation>
+        <translation>Crear un guión (script)</translation>
     </message>
 </context>
 <context>
@@ -1059,7 +1429,7 @@
 &lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Parece que está utilizando la interface gráfica de Octave por primera vez en esta computadora.
+&lt;p&gt;Parece que está utilizando la interfaz gráfica de Octave por primera vez en esta computadora.
 Pulse &apos;Siguiente&apos; para crear un archivo de configuración e iniciar Octave.&lt;/p&gt;
 &lt;p&gt;El archivo de configuración se guardará en&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
@@ -1068,54 +1438,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
-        <translation>Cargar espacio de trabajo</translation>
-    </message>
-    <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <translation>Cargar el espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Acerca de Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Archivo</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Nuevo</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translatorcomment>Guión/&quot;Script&quot;</translatorcomment>
-        <translation>Guión</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Figura</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Abrir...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Preferencias...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Salir</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
@@ -1125,29 +1484,29 @@
         <translation>Deshacer</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Pegar</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
-        <translation>Guardar espacio de trabajo como</translation>
-    </message>
-    <message>
-        <location line="+124"/>
+        <translation>Guardar el espacio de trabajo como</translation>
+    </message>
+    <message>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
-        <translation>El archivo de las notas de versión %1 está vacío.</translation>
+        <translation>El archivo de notas de versión %1 está vacío.</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>The release notes file &apos;%1&apos; cannot be read.</source>
-        <translation>El archivo de las notas de versión %1 no puede ser leído.</translation>
+        <translation>El archivo de notas de versión %1 no se puede leer.</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -1155,17 +1514,42 @@
         <translation>Notas de la versión de Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Noticas de la comunidad Octave</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>¿Está seguro de que desea salir de Octave?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Abrir un archivo existente en el editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nueva función...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nueva figura</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Seleccionar todo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Limpiar el portapapeles</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Buscar archivos...</translation>
     </message>
@@ -1185,7 +1569,7 @@
         <translation>Limpiar el espacio de trabajo</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>&amp;Depurar</translation>
     </message>
@@ -1200,57 +1584,52 @@
         <translation>Continuar</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Salir del modo de depuración</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Mostrar el explorador de archivos</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Explorador de archivos</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Está utilizando una versión preliminar de la GUI experimental de Octave.&lt;/strong&gt;  Octave se encuentra bajo constante desarrollo y la GUI será la interfaz por defecto en la versión 4.0. Para mayor información, seleccione &quot;Notas de la versión&quot; en el menú &quot;Noticias&quot; de la GUI o visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Iniciar</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Cargar espacio de trabajo...</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Save Workspace As...</source>
-        <translation>Guardar espacio de trabajo como...</translation>
-    </message>
-    <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Función...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <translation>Guardar el espacio de trabajo como...</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Nuevo guión (script)</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Terminar</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
-        <translation>Reestablecer el esquema de ventana predeterminado</translation>
-    </message>
-    <message>
-        <location line="+77"/>
+        <translation>Restablecer el esquema de ventana predeterminado</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Paquetes de Octave</translation>
     </message>
@@ -1262,7 +1641,7 @@
     <message>
         <location line="+3"/>
         <source>Contribute to Octave</source>
-        <translation>Colaborar en Octave</translation>
+        <translation>Colaborar con Octave</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1270,7 +1649,7 @@
         <translation>Recursos para el desarrollador de Octave</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>En disco</translation>
     </message>
@@ -1280,7 +1659,7 @@
         <translation>En línea</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Noticias</translation>
     </message>
@@ -1295,23 +1674,12 @@
         <translation>Noticias de la comunidad</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Mas información</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Ocultar</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Información de la GUI experimental</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Barra de herramientas</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Introduzca el nombre del directorio</translation>
     </message>
@@ -1326,69 +1694,74 @@
         <translation>Directorio superior</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Explorar directorios</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Salir del modo de depuración</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Ventana</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Mostrar la ventana de comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Mostrar el historial de comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Mostrar el espacio de trabajo</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Mostrar el editor</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Mostrar la documentación</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Mostrar el espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Mostrar el editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Mostrar la documentación</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Ventana de comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Historial de comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Espacio de trabajo</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Documentación</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Ayuda</translation>
     </message>
@@ -1401,7 +1774,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1420,7 +1793,7 @@
 Las fuentes de noticias de la comunidad Octave parece que no están disponibles.
 &lt;/p&gt;
 &lt;p&gt;
-Para las últimas novedades, visite
+Para ver las últimas novedades, visite
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
 cuando tenga conexión a la web (el enlace se abre en un navegador externo).
 &lt;/p&gt;
@@ -1445,13 +1818,13 @@
         <translation>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
-La conexión a la web para desplegar las últimas novedades sobre Octave ha sido desactivada.
+La conexión a la web para mostrar las últimas novedades sobre Octave ha sido desactivada.
 &lt;/p&gt;
 &lt;p&gt;
-Para ver las últimas novedades, vea
+Para ver las últimas novedades, vaya a
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
 cuando tenga conexión a la web (el enlace se abre en un navegador externo)
-o active las conexiones de web para ver las novedades en el diálogo de configuración de red de Octave
+o active la conexión a la web para ver las novedades en el diálogo de configuración de red de Octave
 &lt;/p&gt;
 &lt;p&gt;
 &lt;small&gt;&lt;em&gt;&amp;mdash; Los desarrolladores de Octave,
@@ -1461,20 +1834,20 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translatorcomment>Uso &quot;widget&quot; por ser el término usual: http://es.wikipedia.org/wiki/Widget</translatorcomment>
         <translation>Desacoplar widget</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translatorcomment>Uso &quot;widget&quot; por ser el término usual: http://es.wikipedia.org/wiki/Widget</translatorcomment>
         <translation>Ocultar widget</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translatorcomment>Uso &quot;widget&quot; por ser el término usual: http://es.wikipedia.org/wiki/Widget</translatorcomment>
         <translation>Acoplar widget</translation>
@@ -1483,7 +1856,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Ayuda sobre</translation>
     </message>
@@ -1497,32 +1870,24 @@
         <source>Edit</source>
         <translation>Editar</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>&amp;Ejecutar selección</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Sí</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>No</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Crear</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
-        <translation>El archivo\n%1\nno existe. ¿Desea crearlo?</translation>
+        <translation>El fichero
+%1
+no existe. ¿Desea crearlo?</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1531,19 +1896,18 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translatorcomment>Uso la traducción &quot;ruta&quot; para &quot;path&quot;: http://es.wikipedia.org/wiki/Ruta_(informática)</translatorcomment>
-        <translation>El archivo %1 no existe en la ruta de carga.  Para depurar la función que acualmente edita tiene que cambiar al directorio %2 o bien agregar ese directorio a la ruta de carga.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>El archivo %1 no existe en las rutas de búsqueda de funciones (path). Para ejecutar o depurar la función que está editando, tiene que cambiar al directorio %2 o agregar ese directorio a las rutas de búsqueda de funciones (path).</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>El archivo %1 se solapa con un archivo con el mismo nombre en la ruta de carga.  Para depurar la función que edita, cambie al directorio %2.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Existe un archivo con el mismo nombre que %1 en la ruta de búsqueda de funciones (path). Para ejecutar o depurar la función que se está editando, cambie al directorio %2.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory or Add Directory to Load Path</source>
-        <translation>Cambiar directorio o agregar directorio a la ruta de carga</translation>
+        <translation>Cambiar directorio o agregar directorio a la ruta de búsqueda de funciones (path)</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1554,18 +1918,27 @@
         <location line="+1"/>
         <source>Add Directory to Load Path</source>
         <translatorcomment>Uso la traducción &quot;ruta&quot; para &quot;path&quot;: http://es.wikipedia.org/wiki/Ruta_(informática)</translatorcomment>
-        <translation>Agregar directorio a la ruta de carga</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <translation>Agregar directorio a la ruta de búsqueda de funciones (path)</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Cancelar</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Por defecto</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1573,11 +1946,16 @@
 %2
 
 Octave GUI must be closed now.</source>
-        <translation>El archivo de configuración\n%1\nno existe y no puede ser creado.
-Asegúrese de que tiene permisos de escritura sobre\n%2\n\nOctave GUI se cerrará.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>El fichero de configuración
+%1
+no existe y no puede ser creado.
+Asegúrese de que tiene permisos de lectura y escritura en
+%2
+
+La interfaz gráfica de Octave se cerrará.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Error crítico de Octave</translation>
     </message>
@@ -1585,315 +1963,733 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Configuración</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>General</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Sólo logo de Octave</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
-        <translation>Iconos de letras</translation>
+        <translation>Iconos de texto</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Graphic icons</source>
         <translation>Iconos gráficos</translation>
     </message>
     <message>
-        <location line="+39"/>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Acoplar widget de barra de título</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation>Pequeño</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Grande</translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation>Estilo personalizado</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Estas configuraciones se aplicarán después de la ejecución de los ficheros de inicio .octaverc</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Restaurar el directorio de trabajo de la sesión anterior</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Color</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+138"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Draw a long line marker</source>
+        <translation>Mostrar marcador de longitud de línea</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Mostrar caracteres de fin de línea</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Identificador de fin de línea por defecto</translation>
+    </message>
+    <message>
+        <location line="+154"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
         <source>Indent width</source>
         <translation>Ancho de sangría</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation>Sangrar con tabulación</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Sangría automática</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Tamaño del tabulador</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation>Mostrar guías de sangría</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>La tecla de retroceso quita sangría</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+88"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Match keywords</source>
         <translation>Coincidir en palabras clave</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>Distinguir mayúsculas/minúsculas</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Sustituir palabra con sugerencia</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Sustituir palabra con sugerencia</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>Coincidir palabras en documento</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
         <source>Restore editor tabs from previous session on startup</source>
-        <translation>Restaurar las pestañas del editor de la sesión anterior en el arranque </translation>
-    </message>
-    <message>
-        <location line="+60"/>
+        <translation>En el arranque, restaurar las pestañas del editor de la sesión anterior</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
         <source>Use custom file editor</source>
         <translation>Utilizar editor de archivos personalizado</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation>Estilos del editor</translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Seleccione fuente, tamaño de fuente (como diferencia con el tamaño por defecto), estilo de fuente (&lt;b&gt;n&lt;/b&gt;egrita, &lt;b&gt;c&lt;/b&gt;ursiva, &lt;b&gt;s&lt;/b&gt;ubrayada), color de texto y color de fondo(para este último, el color rosa (255,0,255) es un marcador de posición para el color de fondo por defecto).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
         <source>Terminal Colors</source>
         <translatorcomment>En es_ES, terminal suele ser masculino, aunque en el español iberoamericano suele adoptarse el femenino</translatorcomment>
         <translation>Colores del terminal</translation>
     </message>
     <message>
-        <location line="+45"/>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation>Tipo de fuente</translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
         <translation>Mostrar numeros de línea</translation>
     </message>
     <message>
-        <location line="+27"/>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Highlight current line</source>
         <translation>Resaltar línea actual</translation>
     </message>
     <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Autocompletar código</translation>
-    </message>
-    <message>
-        <location line="-282"/>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Show complete path in window title</source>
         <translation>Mostrar ruta completa en el título de la ventana</translation>
     </message>
     <message>
-        <location line="-17"/>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
         <source>Show whitespace</source>
         <translation>Mostrar espacios en blanco</translation>
     </message>
     <message>
-        <location line="+27"/>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Do not show whitespace used for indentation</source>
         <translation>No mostrar los espacios usados para la sangría</translation>
     </message>
     <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation># de caracteres pulsados antes de completar la lista desplegada</translation>
-    </message>
-    <message>
-        <location line="+194"/>
+        <location line="+625"/>
+        <location filename="../src/ui-settings-dialog.h" line="+37"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Número de caracteres a escribir antes de mostrar la lista</translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Create nonexistent files without prompting</source>
         <translation>Crear archivos no existentes sin consultar</translation>
     </message>
     <message>
-        <location line="+57"/>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
         <source>command line (%f=file, %l=line):</source>
-        <translation>línea de comando(%f=archivo, %l=linea):</translation>
+        <translation>línea de comando (%f=archivo, %l=linea):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Terminal</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Tipo de cursor:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Cursor parpadeante</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Usar color de primer plano</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Tamaño de fuente</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Foco al terminal cuando se ejecute un comando desde otro widget</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Explorador de archivos</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Mostrar tamaño de archivo</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Mostrar tipo de archivo</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Mostrar fecha de la última modificación</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Mostrar archivos ocultos</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interfaz</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Confirmar antes de salir</translation>
+    </message>
+    <message>
+        <location line="+103"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Mostrar barra de estado</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Texto inactivo</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Activo</translation>
+    </message>
+    <message>
+        <location line="-152"/>
+        <location filename="../src/ui-settings-dialog.h" line="-10"/>
+        <source>Normal</source>
+        <translation>Normal</translation>
+    </message>
+    <message>
+        <location line="+191"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
+        <source>Background inactive</source>
+        <translation>Fondo inactivo</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Inicio de Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Dirección de inicio</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Explorar</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Después de la columna</translation>
+    </message>
+    <message>
+        <location line="+144"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Tab width min.</source>
+        <translation>Anchura mínima del tabulador</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>máx.</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Esto funciona correctamente con fuentes con espaciado fijo. Se dibuja la línea en una posición basada la anchura de un carácter de la fuente por defecto. Esto podría no funcionar correctamente si los estilos utilizan fuentes proporcionales o si se utilizan fuentes de varios tamaños, negrita, cursiva y textos normales.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Activar plegado de código</translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Mostrar barra de desplazamiento horizontal</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Sangrado</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Indentation uses tabs</source>
+        <translation>Sangrado con tabulador</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Completado automático</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>With Octave builtins</source>
+        <translation>Con funciones internas de Octave</translation>
     </message>
     <message>
         <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Terminal</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Tipo de cursor:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Con funciones de Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Mostrar lista de comandos coincidentes automáticamente</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Manejo de ficheros</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Recargar los archivos modificados externamente sin consultar</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selección de fuente, tamaño (como diferencia con respecto al tamaño por defecto), estilo (&lt;b&gt;n&lt;/b&gt;egrita, &lt;b&gt;c&lt;/b&gt;ursiva, &lt;b&gt;s&lt;/b&gt;ubrayado), color y color de fondo (para el último caso, el magenta (255,0,255) es un sustituto para el color de fondo por defecto).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Cambiar el tamaño del buffer elimina el historial)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Tamaño del buffer para el historial</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Imprimir la ubicación de depuración en la ventana del terminal además de en el editor</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
+        <translation>Mostrar</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Alternar colores de filas</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Comportamiento</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Restaurar último directorio de la sesión previa</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Ocultar sugerencias automáticas</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Los atajos se pueden editar haciendo doble clic en la celda correspondiente</translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Red</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Cursor parpadeante</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Usar color de primer plano</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Tamaño de fuente</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Explorador de archivos</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Mostrar tamaño de archivo</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Mostrar tipo de archivo</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Mostrar fecha de la última modificación</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Mostrar archivos ocultos</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Alternar colores de filas</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Espacio de trabajo</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Colores para las clases de almacenamiento</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Red</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation>Permitir a Octave la conexión al sitio web para desplegar las últimas noticias e información</translation>
+        <translation>Permitir a Octave la conexión al sitio web para mostrar las últimas noticias e información</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Utilizar servidor &quot;proxy&quot;</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>HttpProxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
-        <translation>Iconos para widget acoplados</translation>
+        <translation>Iconos para widget</translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Lenguaje (requiere reinicio)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Tamaño de icono</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Sincronizar el directorio de trabajo de Octave con el explorador de archivos</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Colores para los atributos de variable</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Atajos de teclado</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Seleccione esta opción para evitar conflictos con los atajos de la línea de comandos</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Deshabilitar los atajos globales cuando la ventana del terminal se enfoque </translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Utilice este conjunto</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Conjunto 1:</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Lenguaje (reinicio requerido)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exportar</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importar</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Tamaño de icono</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Sincronizar el directorio de trabajo de Octave con el explorador de archivos</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Conjunto 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Acción</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Conjunto 1 por defecto</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Conjunto 1 actual</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Conjunto 2 por defecto</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Conjunto 2 actual</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>&quot;Socks5Proxy&quot;</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Nombre del host:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>Tipo de proxy:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Puerto:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Nombre de usuario:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Contraseña:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Configuración del sistema</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>Cursor IBeam</translation>
     </message>
@@ -1908,32 +2704,42 @@
         <translation>Cursor de subrayado</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Diferencia con el tamaño predeterminado</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Background color, pink (255,0,255) means default</source>
-        <translation>Color de fondo, rosa (255,0,255) significa predeterminado</translation>
+        <translation>Color de fondo. Rosa (255,0,255) significa predeterminado</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>b</source>
         <comment>short form for bold</comment>
-        <translation>b</translation>
+        <translation>n</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>i</source>
         <comment>short form for italic</comment>
-        <translation>i</translation>
+        <translation>c</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>u</source>
         <comment>short form for underlined</comment>
-        <translation>u</translation>
+        <translation>s</translation>
+    </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Ajuste del directorio de inicio de Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Ajuste del directorio de inicio del explorador de archivos</translation>
     </message>
 </context>
 <context>
@@ -1967,7 +2773,7 @@
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Cuando la GUI de Octave se inicia, chequeará el sitio web de Octave para obtener novedades e información acerca de la comunidad.
+&lt;p&gt;Cuando la GUI se inicia, chequeará el sitio web de Octave para obtener novedades e información acerca de la comunidad.
 Esta verificación se hará una vez cada día como máximo, y las noticias serán desplegadas únicamente si hay algo nuevo desde la última vez que se vieron.&lt;/p&gt;
 &lt;p&gt;También puede revisar las noticias seleccionando &quot;Noticias de la Comunidad&quot; en el menú de ayuda en la GUI o visitando
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
@@ -1987,11 +2793,631 @@
 a:link { text-decoration: underline; color: #0000ff; }
 &lt;/style&gt;
 &lt;head/&gt;&lt;body&gt;
-&lt;p&gt;Permitir la conexión con el sitio web de Octave al arranque para desplegar novedades e información acerca de la comunidad.&lt;/p&gt;
+&lt;p&gt;Permitir la conexión con el sitio web de Octave en el arranque para desplegar novedades e información acerca de la comunidad.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Nuevo archivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nueva función</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nueva figura</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Abrir archivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Cargar espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Guardar el espacio de trabajo como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Preferencias</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Salir de Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Copiar</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Pegar</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Deshacer</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Seleccionar todo</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Limpiar el portapapeles</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Buscar en archivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Limpiar la ventana de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Limpiar el historial de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Limpiar el espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Entrar a</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Salir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Continuar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Abandonar el modo de depuración</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Mostrar la ventana de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Mostrar el historial de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Mostrar el explorador de archivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Mostrar el espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Mostrar el editor</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Mostrar la documentación</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Ventana de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Historial de comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Explorador de archivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentación</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Mostrar la documentación almacenada en disco</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Mostrar la documentación en línea</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Paquetes de Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Compartir código</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Colaborar con Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Recursos para el desarrollador de Octave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Acerca de Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Notas de la versión</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Noticias de la comunidad</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Editar función</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Guardar archivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Guardar figura como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Cerrar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Cerrar todo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Imprimir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Rehacer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Cortar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Buscar y reemplazar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Eliminar hasta el inicio de palabra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Eliminar hasta el fin de palabra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Eliminar hasta el inicio de línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Eliminar hasta el final de línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Eliminar línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Cortar línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar selección/línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Intercambiar con línea anterior</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Comentar la selección</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Descomentar la selección</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Convertir la selección a mayúsculas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Convertir la selección a minúsculas</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Aplicar sangría a la selección</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Reducir sangría a la selección</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Ir a la línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Mover el paréntesis/corchete/llave correspondiente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Seleccionar el paréntesis/corchete/llave correspondiente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Alternar marcador</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Siguiente marcador</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Marcador anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Eliminar todos los marcadores</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Preferencias de estilos</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Mostrar numeros de línea</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation>Siguiente instrucción</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Restablecer el esquema de ventana predeterminado</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Informar de fallo</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Cerrar otros archivos</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Mostrar lista de comandos coincidentes</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Convertir fines de línea a Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Convertir fines de línea a Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Convertir fines de línea a Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Mostrar espacios en blanco</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Mostrar fines de línea</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Mostrar guías de sangría</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Mostrar marcador de longitud de línea</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Aumentar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Disminuir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Zoom normal</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Alternar puntos de interrupción</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Siguiente punto de interrupción</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Punto de interrupción anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Eliminar todos los puntos de interrupción</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Ejecutar archivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Ejecutar selección</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Ayuda de palabras clave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Documentación de palabras clave</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Principal</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Archivo</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Editar</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Depurar</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Ventana</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Ayuda</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Noticias</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Ver</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Ejecutar</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Introduzca nuevo atajo para el conjunto %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Aplique el atajo que desee o haga clic en el botón derecho para restablecer el atajo a su valor predeterminado.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Introduzca directamente un atajo de teclado</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Atajo de teclado actual</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Atajo de teclado por defecto</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Establecer como por defecto</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Atajo de teclado doble</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>El atajo de teclado seleccionado
+  &quot;%1&quot;
+ya se utiliza para la acción
+  &quot;%2&quot;.
+¿Desea utilizar el atajo de cualquier modo suprimiendo la acción previamente asignada?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Importar conjunto de atajos de teclado %1 del archivo ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Archivo de atajos de teclado de Octave (*.osc);;Todos los archivos (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Exportar conjunto de atajos de teclado %1 al archivo ...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>No se ha podido abrir %1 como archivo de atajos de teclado de Octave</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2002,15 +3428,25 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
-        <translation>Escriba aquí y pulse la tecla &apos;Retorno&apos; para buscar</translation>
+        <translation>Escriba aquí y pulse la tecla &apos;enter&apos; para buscar</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Global search</source>
         <translation>Búsqueda global</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>El archivo de información &lt;p&gt;%1&lt;p&gt; o la versión comprimida no existen</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2044,8 +3480,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Clase de almacenamiento</translation>
+        <source>Attribute</source>
+        <translation>Atributo</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2062,7 +3498,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Espacio de trabajo</translation>
     </message>
@@ -2072,9 +3508,24 @@
         <translation>Ver variables en el espacio de trabajo activo.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Copiar</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Introduzca texto para filtrar el espacio de trabajo</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Copiar nombre</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Copiar valor</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2082,19 +3533,19 @@
         <translation>Renombrar</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Sólo los símbolos de alto nivel pueden ser renombrados.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>Ver las variables del espacio de trabajo activo.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Colores para cada clase de almacenamiento:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Colores para los atributos de variable:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/fr_FR.ts
+++ b/libgui/languages/fr_FR.ts
@@ -6,7 +6,7 @@
     <message>
         <location filename="../src/dialog.cc" line="+251"/>
         <source>Select All</source>
-        <translation>Tout sélectionner</translation>
+        <translation>Tout Sélectionner</translation>
     </message>
 </context>
 <context>
@@ -61,16 +61,11 @@
         <source>cursor</source>
         <translation>curseur</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Note à propos du nouveau GUI d&apos;Octave&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Parmi les nouvelles fonctionnalités d&apos;Ocatve 3.8, l&apos;interface graphique est une grande évolution. C&apos;est bien la fonctionnalité que les utilisateurs ont le plus réclamée durant les dernières années, et elle est maintenant presque prête. Elle n&apos;est pas aussi parfaite que nous le souhaiterions et c&apos;est pourquoi nous avons décidé d&apos;attendre la version 4.0 pour en faire l&apos;interface par défaut.&lt;/p&gt;&lt;p&gt;Au vu du nombre de bug résolus et des améliorations apportées depuis la dernière version majeure d&apos;Octave, nous avons décidé  de ne pas retarder plus la parution de ces améliorations pour perfectionner le GUI. Vous pouvez maintenant apprécier la version 3.8 et la version préliminaire de la nouvelle interface graphique. Nous pensons qu&apos;elle fonctionne raisonnablement bien, mais nous savons aussi qu&apos;il y a des points durs évidents et beaucoup d&apos;améliorations possibles.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Nous avons besoin de votre aide&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Il y a de multiples manières d&apos;aider à résoudre les bogues restants, à terminer le GUI et à améliorer l&apos;expérience utilisateur aussi bien pour les novices que pour les experts (liens ouverts dans un navigateur externe):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Si vous êtes un développeur  expérimenté, vous pouvez donner de votre temps et &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;développer Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Si Octave ne fonctionne pas correctement, vous êtes encouragés à &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;signaler les problèmes &lt;/a&gt; que vous trouvez.&lt;/li&gt;&lt;li&gt;Que vous soyez utilisateur ou développeur, vous pouvez &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;aider à financer le projet&lt;/a&gt;. Le développement d&apos;Octave demande beaucoup de temps et d’expertise. Vos contributions permettent d&apos;assurer qu&apos;Octave continuera à s&apos;améliorer.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Nous espérons que vous trouverez Octave utile. S&apos;il vous plaît, aidez nous à l&apos;améliorer encore dans le futur !&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Copier</translation>
     </message>
@@ -80,20 +75,148 @@
         <translation>Coller</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>Tout Effacer</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Tout Sélectionner</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>Nettoyer la Fenêtre de Commande</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>sélection copiée vers le presse-papier</translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translatorcomment>This may be long depending on the context.</translatorcomment>
+        <translation>Barre d&apos;Outils de la Figure</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Axes</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Grille</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Échelle Auto</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Fichier</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Enregistrer</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Enregistrer &amp;Sous</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Fermer la Figure</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Éditer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>&amp;Copier</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Co&amp;uper</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>Co&amp;ller</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Aide</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;À propos de QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>À propos de &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>À propos de QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Enregistrer la Figure Sous</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translatorcomment> </translatorcomment>
+        <translation>Rotation</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Agrandir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Réduire</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Deplacer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Inserer du Texte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Sélectionner</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -103,24 +226,25 @@
     <message>
         <location line="+1"/>
         <source>See the documentation for help.</source>
-        <translation>Regardez la documentation pour plus d&apos;aide.</translation>
+        <translation>Voir la documentation pour plus d&apos;aide.</translation>
     </message>
 </context>
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Éditeur d&apos;Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Fichiers d&apos;Octave (*.m);;Tous les fichiers (*)</translation>
+        <translation>Fichiers Octave (*.m);;Tous les fichiers (*)</translation>
     </message>
     <message>
         <location line="-40"/>
@@ -134,7 +258,7 @@
         <translation>Nom de la nouvelle fonction :</translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -143,37 +267,27 @@
 est déjà ouvert dans l&apos;éditeur</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Nouveau</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Enregistrer</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Ouvrir...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
-        <translation>Enregistrer &amp;sous...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Enregistrer &amp;Sous...</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Imprimer...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Annuler</translation>
     </message>
@@ -183,42 +297,42 @@
         <translation>&amp;Rétablir</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copier</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Co&amp;uper</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Coller</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Marque page &amp;suivant</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Marque page &amp;précédent</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Co&amp;uper</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Coller</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>Basculer &amp;marque page</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>Marque page &amp;suivant</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Marque page &amp;précédent</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>Basculer &amp;marque page</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Supprimer tout marque page</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation>Point d&apos;arrêt suiva&amp;nt</translation>
     </message>
@@ -228,17 +342,17 @@
         <translation>Point d&apos;arrêt &amp;précédent</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>&amp;Ajouter/Retirer un point d&apos;arrêt</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation>&amp;Retirer tous les points d&apos;arrêt</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Commenter</translation>
     </message>
@@ -248,77 +362,259 @@
         <translation>&amp;Décommenter</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Rechercher et remplacer...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Enregistrer et Exécuter</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Indenter</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Désindenter</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Rechercher et remplacer...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Enregistrer et Exécuter</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>&amp;Aller à la ligne...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Impossible de démarrer l&apos;éditeur
+%1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Créer</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Annuler</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation>Fichiers &amp;récents</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Editer Fonction</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>&amp;Fermer</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Tout fermer</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Fermer les autres fichiers</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Tout Sélectionner</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>&amp;Commandes</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copier la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Couper la Ligne</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Effacer jusqu&apos;au Début du Mot</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Effacer jusqu&apos;à la Fin du Mot</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Effacer jusqu&apos;au Début de la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Effacer jusqu&apos;à la Fin de la Ligne</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Dupliquer la Sélection/Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transposer la Ligne</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>&amp;Montrer la Liste de Suggestions</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Format</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>&amp;Sélection en Majuscules</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Sé&amp;lection en Minuscules</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Convertir les Fins de Lignes en &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Convertir les Fins de Lignes en &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Convertir les Fins de Lignes en &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Navi&amp;gation</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Déplacer jusqu&apos;à la Parenthèse Correspondante</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Sélectionner jusqu&apos;à la Parenthèse Correspondante</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Préférences...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>Préférences de &amp;Style...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>Préférences de &amp;Style...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>&amp;Affichage</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>Édit&amp;eur</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Afficher les Numéros de &amp;Lignes</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Éditeur</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Afficher les Fins de Lign&amp;es</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Afficher les Guides d&apos;&amp;Indentation</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Afficher le &amp;Repère de Longue Ligne</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>Agrand&amp;ir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>Réd&amp;uire</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>Taille &amp;Normale</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Exécuter la &amp;Selection</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>&amp;Help</source>
-        <translation>&amp;Aide</translation>
+        <translation>A&amp;ide</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Help on Keyword</source>
+        <translation>&amp;Aide sur le mot de clés</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Help on Keyword</source>
-        <translation>&amp;Aide sur le mot de clés</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Documentation sur le mot de clés</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -327,7 +623,7 @@
 pour lecture : %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -336,7 +632,7 @@
 n&apos;existe pas. Voulez-vous le créer?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -345,40 +641,65 @@
 pour écrire : %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>L&apos;onglet éditeur de fichier associé a disparu.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Fichier</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Nouvelle &amp;Fonction...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editer</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Afficher les e&amp;spaces</translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
-        <translation>&amp;Déboguer</translation>
-    </message>
-    <message>
-        <location line="+9"/>
+        <translation>&amp;Débuguer</translation>
+    </message>
+    <message>
+        <location line="+21"/>
         <source>&amp;Run</source>
-        <translation>&amp;Exécuter</translation>
+        <translation>E&amp;xécuter</translation>
     </message>
 </context>
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>fin de ligne:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>ligne:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>col:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 est une fonction interne</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Impossible de trouver la fonction %1</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>Aller à la ligne</translation>
     </message>
@@ -388,47 +709,56 @@
         <translation>Numéro de ligne</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;sans nom&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Voulez-vous enregistrer ou supprimer les modifications ?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>Le Fichier
+
+  %1
+
+est sur le point d&apos;être fermé mais a été modifié.  %2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Fins de Lignes:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Fichiers Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Tous les Fichiers (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation>Voulez-vous annuler la fermeture, enregistrer ou supprimer les modifications ?</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Éditeur d&apos;Octave</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>Le fichier
-%1
-est en cours de fermeture mais il a été modifié.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Fichiers d&apos;Octave (*.m);;Tous les fichiers (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -446,24 +776,31 @@
 a été supprimé ou rénommé. Voulez-vous l&apos;enregistrer maintenant ?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>Impossible d&apos;ouvrir le fichier %1 pour écrire :
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Ligne :</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Col :</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+n&apos;est pas une identifiant valide.
+
+Si vous gardez ce nom de fichier, vous ne serez pas en mesure de 
+l&apos;exécuter en utilisant son nom en tant que commande Octave.
+
+Voulez vous choisir un autre nom ?</translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Il semblerait que &apos;%1&apos; a été modifié par une autre application. Voulez-vous le récharger ?</translation>
     </message>
@@ -471,7 +808,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Explorateur de fichiers</translation>
     </message>
@@ -486,42 +823,43 @@
         <translation>Entrez le chemin ou le nom du fichier</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Remonter d&apos;un répertoire</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Utiliser le répertoire du navigateur comme répertoire de travail</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Actions sur le répertoire courant</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Choisir le dossier du Navigateur...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Rechercher des fichiers...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Nouveau fichier</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Nouveau répertoire</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Double-cliquer sur un fichier pour l&apos;ouvrir</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>Revenir au répertoire d&apos;Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Monter au répertoire parent</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Aller au répertoire courant d&apos;Octave</translation>
     </message>
@@ -531,37 +869,29 @@
         <translation>Définir le répertoire d&apos;Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Définir le répertoire du navigateur comme répertoire d&apos;Octave</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>Aller au répertoire personnel</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Rechercher dans le répertoire...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Rechercher des fichiers...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Nouveau fichier...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Nouveau répertoire...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Activer pour ouvrir dand l&apos;éditeur, click droit pour les alternatives</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Taille du fichier</translation>
     </message>
@@ -581,7 +911,7 @@
         <translation>Afficher les fichiers cachés</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Ouvrir</translation>
     </message>
@@ -611,17 +941,17 @@
         <translation>Définir le répertoire courant</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Rénommer</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Supprimer</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Renommer...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Effacer...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Rénommer fichier/répertoire</translation>
     </message>
@@ -658,7 +988,7 @@
         <translation>Impossible de supprimer un répertoire qui n&apos;est pas vide</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>Définir le répertoire de l&apos;explorateur de fichiers</translation>
     </message>
@@ -676,7 +1006,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Nouveau Fichier.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Créer un répertoire</translation>
     </message>
@@ -692,7 +1027,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>Appréciez !</translation>
     </message>
@@ -715,13 +1050,13 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;Nous espérons que vous trouvez Octave utile.&lt;/p&gt;
-&lt;p&gt;Si vous rencontrez des problèmes, il y a plusieurs moyens d&apos;obtenir de l&apos;aide parmi les quels des options de support commercial, une liste mail, un wiki et d&apos;autre moyens basés sur le recour à la communauté.
-Vous trouverez plus d&apos;information sur chacun de ces moyens en visitant &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (s&apos;ouvre dans un navigateur externe).&lt;/p&gt;
+&lt;p&gt;Si vous rencontrez des difficultés, il y a plusieurs façon de trouver de l&apos;aide parmis les-quelles des options de support commercial, une liste mail, un wiki et d&apos;autres ressources communautaires.
+Vous trouverez des information sur chacune d&apos;entre elles sur &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (ouvert dans un navigateur externe).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
@@ -755,7 +1090,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Rechercher et Remplacer</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>Rechercher &amp;quoi :</translation>
     </message>
@@ -825,7 +1165,7 @@
         <translation>Recherche dans la sé&amp;lection</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>Rechercher depuis la fin</translation>
     </message>
@@ -835,7 +1175,7 @@
         <translation>Rechercher depuis le début</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Résultats du remplacement</translation>
     </message>
@@ -845,7 +1185,7 @@
         <translation>%1 instances remplacées</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>Résultats de la recherche</translation>
     </message>
@@ -868,12 +1208,7 @@
         <translation>Nommé:</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Entrer le nom du fichier ou une expression</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>Demarrer dans :</translation>
     </message>
@@ -893,22 +1228,12 @@
         <translation>Choisir le répertoire de démarrage</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Parcourir récursivement les sous-répertoires</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>Rechercher les fichiers recursivement dans les sous-répertoires</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Inclure les répertoires</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation>Inclure les répertoires concordants dans des résultats de la recherche</translation>
     </message>
@@ -928,9 +1253,25 @@
         <translation>Contenant le texte :</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>La recherche doit contenir le texte</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translatorcomment>Not sure I understand the </translatorcomment>
+        <translation>Entrer l&apos;expression de recherche de nom de fichier</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Rechercher dans les sous-dossiers</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Inclure les noms de dossiers</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Entrer l&apos;expression de recherche de contenu de fichier</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -993,7 +1334,12 @@
         <translation>Recherche en cours...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>Définir le répertoire de recherche</translation>
     </message>
@@ -1014,7 +1360,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Naviguer et rechercher l&apos;historique des commandes.</translation>
     </message>
@@ -1024,17 +1370,22 @@
         <translation>Double cliquez sur une commande pour la transferer au terminal.</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Entrez du texte pour filtrer l&apos;historique des commandes.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Entrer du texte pour filtrer l&apos;historique des commandes</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrer</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Historique des commandes</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Copier</translation>
     </message>
@@ -1044,7 +1395,7 @@
         <translation>Évaluer</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Créer un fichier de script</translation>
     </message>
@@ -1083,53 +1434,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Charger l&apos;espace de travail</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>À propos d&apos;Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Fichier</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Nouveau</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Fichier de script</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Figure</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Ouvrir...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Préférences...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Quitter</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editer</translation>
     </message>
@@ -1139,22 +1480,22 @@
         <translation>Annuler</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Copier</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Coller</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation>Enregistrer l&apos;espace de travail sous</translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>Le fichier de notes de version &apos;%1&apos; est vide.</translation>
     </message>
@@ -1169,17 +1510,42 @@
         <translation>Notes de la version d&apos;Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Nouvelles de la communauté Octave</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Voulez vous vraiment quitter Octave ?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Ouvrir un fichier existant dans l&apos;éditeur</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nouvelle Fonction...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nouvelle Figure</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Tout Sélectionner</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Effacer le presse-papiers</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Rechercher des fichiers...</translation>
     </message>
@@ -1199,9 +1565,9 @@
         <translation>Nettoyer l&apos;espace de travail</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
-        <translation>Dé&amp;boguer</translation>
+        <translation>Dé&amp;buguer</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1214,32 +1580,27 @@
         <translation>Continuer</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Sortir du mode débogage</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Afficher l&apos;explorateur de fichiers</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Explorateur de fichiers</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Vous utilisez une version &quot;release candidate&quot; du GUI expérimental d&apos;Octave.&lt;/strong&gt;  Octave s&apos;améliore continuellement et ce GUI sera par défaut dans la version 4.0. Pour plus d&apos;informations selectionnez les &quot;Notes de version&quot; dans le menu &quot;Nouvelles&quot; du GUI, ou visitez &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Avancer d&apos;un pas avec entrée</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Charger l&apos;espace de travail...</translation>
     </message>
@@ -1249,22 +1610,22 @@
         <translation>Enregistrer l&apos;espace de travail sous...</translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Fonction...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Nouveau Script</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Exécuter jusqu&apos;à l&apos;instruction de retour</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation>Rétablir la disposition par défaut des fenêtres</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Paquets d&apos;Octave</translation>
     </message>
@@ -1284,9 +1645,9 @@
         <translation>Ressources développeurs d&apos;Octave</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
-        <translation>Installé localement</translation>
+        <translation>Installée localement</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1294,7 +1655,7 @@
         <translation>En ligne</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Nouvelles</translation>
     </message>
@@ -1309,23 +1670,12 @@
         <translation>Nouvelles de la Communauté</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Plus d&apos;Infos</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Cacher</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Infos sur le GUI expérimental</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Barre d&apos;Outils</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Entrez le nom du répertoire</translation>
     </message>
@@ -1340,82 +1690,87 @@
         <translation>Monter au répertoire parent</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Naviguer dans les répertoires</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Quitter le mode Débuguage</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
-        <translation>&amp;Fenêtre</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <translation>Fenê&amp;tre</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Afficher la fenêtre de commande</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Afficher l&apos;historique des commandes</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Afficher l&apos;espace de travail</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Afficher l&apos;éditeur</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Afficher la documentation</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Afficher l&apos;espace de travail</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Afficher l&apos;éditeur</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Afficher la documentation</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Fenêtre de commande</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Historique des commandes</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Espace de travail</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Éditeur</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Documentation</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Aide</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Report Bug</source>
-        <translation>Signaler un bogue</translation>
+        <translation>Signaler un bug</translation>
     </message>
 </context>
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1474,18 +1829,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Détacher le widget</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Cacher le widget</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Attacher le widget</translation>
     </message>
@@ -1493,7 +1848,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Aide sur</translation>
     </message>
@@ -1507,28 +1862,18 @@
         <source>Edit</source>
         <translation>Editer</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>&amp;Exécuter la Selection</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Oui</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Non</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Créer</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1543,13 +1888,13 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>Le fichier %1 n&apos;existe pas dans les chemins accessibles. Pour déboguer la fonction que vous éditez, vous devez soit modifier le répertoire pour %2 ou ajouter le répertoire aux chemins accessibles.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>Le fichier %1 ne se trouve pas dans les chemins accessibles.  Pour exécuter ou débuguer la function éditée, vous devez changer de dossier vers %2 ou ajouter ce dossier aux chemins accessibles.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>Le fichier %1 est occulté par un fichier du même nom dans les chemins accessibles. Pour déboguer la fonction que vous éditez, vous devez modifier le répertoire pour %2.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Le fichier %1 est masqué par un fichier du même nom dans les chemins accessibles.  Pour exécuter ou débuguer la fonction éditée, vous devez changer de dossier vers %2.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1567,15 +1912,24 @@
         <translation>Ajouter le répertoire aux chemins accessibles</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Annuler</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Défaut</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1592,7 +1946,7 @@
 Le GUI d&apos;Octave doit maintenant être fermé.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Erreur Critique d&apos;Octave</translation>
     </message>
@@ -1600,314 +1954,732 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Configuration</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Général</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Logo d&apos;Octave seulement</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation>Icones textuelles</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Graphic icons</source>
         <translation>Icones graphiques</translation>
     </message>
     <message>
-        <location line="+39"/>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Titre du Dock widget</translation>
+    </message>
+    <message>
+        <location line="+60"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Normal</source>
+        <translation>Normal</translation>
+    </message>
+    <message>
+        <location line="+178"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Custom style</source>
+        <translation>Style personnalisé</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Ces préférences sont appliquées après tout fichier de démarrage .octaverc.</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Restaurer le répertoire de travail de la session précédente</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
         <source>Editor</source>
         <translation>Éditeur</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Couleur</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+138"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Draw a long line marker</source>
+        <translation>Montrer le repère de longue ligne</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Montrer les caratères de fin de ligne (EOL)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Fin de lingne par défaut (EOL)</translation>
+    </message>
+    <message>
+        <location line="+154"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
         <source>Indent width</source>
         <translation>Largeur de l&apos;indentation</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
-        <translation>Indentation par tabulation</translation>
+        <translation>Tab indente la ligne</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Indentation automatique</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Largeur de tabulation</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation>Afficher les guides d&apos;indentation</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>Backspace supprime l&apos;indentation</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+88"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Match keywords</source>
         <translation>Inclure les mots clés</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>Sensible à la casse</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Remplacer le mot par la suggestion</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Remplacer le mot par la suggestion</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>Inclure les mots du document</translation>
     </message>
     <message>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>Restaurer les onglets de la session précédente</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>Use custom file editor</source>
+        <translation>Utiliser un éditeur externe</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>Affichage</translation>
+    </message>
+    <message>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Terminal Colors</source>
+        <translation>Couleurs de la fenetre de commandes</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>Police</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>Afficher les numéros des lignes</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Surligner la ligne courante</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Afficher le chemin complet dans le titre de la fenetre</translation>
+    </message>
+    <message>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show whitespace</source>
+        <translation>Afficher les espaces</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Ne pas afficher les espaces utilisés pour l&apos;indentation</translation>
+    </message>
+    <message>
+        <location line="+625"/>
+        <location filename="../src/ui-settings-dialog.h" line="+37"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Nombre de caractères avant affichage de la liste :</translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Créer les fichiers non-existants sans prévenir</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>ligne de commande (%f=fichier, %l=ligne) :</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Terminal</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Type de curseur :</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Curseur clignotant</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Utiliser la couleur de l&apos;avant plan</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Taille de police</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Donner le focus au terminal en cas d&apos;exécution d&apos;une commande depuis une autre fenêtre</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Explorateur de fichiers</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Afficher la taille des fichiers</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Afficher le type des fichiers</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Afficher la date de la dernière modification</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Afficher les fichiers cachés</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interface</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Confirmer avant de quitter</translation>
+    </message>
+    <message>
+        <location line="+103"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Montrer la barre de statut</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Texte inactif</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Actif</translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation>Petit</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Grand</translation>
+    </message>
+    <message>
+        <location line="+181"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Background inactive</source>
+        <translation>Arrière-plan inactif</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Démarrage d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Répertoire au démarrage</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Choisir</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Après la colonne</translation>
+    </message>
+    <message>
+        <location line="+144"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Tab width min.</source>
+        <translation>Largeur de l&apos;onglet: min.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>max.</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Ceci fonctionne bien avec les polices typographiques (monospace). La ligne est dessinée tenant compte de la largeur d&apos;un carctère de la police par défaut. Cela peut disfonctionner lors de l&apos;utilisation de polices à tailles variables ou de caractères gras et italiques.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Activer le Masquage (repliage) de Code</translation>
+    </message>
+    <message>
         <location line="+61"/>
-        <source>Restore editor tabs from previous session on startup</source>
-        <translation>Restaurer les onglets de la session précédente</translation>
-    </message>
-    <message>
-        <location line="+60"/>
-        <source>Use custom file editor</source>
-        <translation>Utiliser un éditeur externe</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
     </message>
     <message>
         <location line="+32"/>
-        <source>Editor Styles</source>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Montrer la barre de défilement horizontal</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Indentation</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Indentation uses tabs</source>
+        <translation>Indentation par tabulation</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Suggestions automatiques (completion)</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>With Octave builtins</source>
+        <translation>Les commandes internes</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Les fonctions Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Montrer la liste de suggestions automatiquement</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Gestion des fichiers</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Recharger automatiquement les fichiers modifiés depuis l&apos;extérieur d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sélectionner la taille de police (difference par rapport à la taille par défaut), son style (&lt;b&gt;g&lt;/b&gt;ras, &lt;b&gt;i&lt;/b&gt;talique, &lt;b&gt;s&lt;/b&gt;ouligné), sa colouleur et la couleur de l&apos;arière-plan (pour ce dernier, la couleur magenta (255,0,255) représente la couleur pas défaut).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Changer la taille du tampon efface l&apos;historique)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Taille du tampon mémoire de l&apos;historique</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Afficher la localisation du débuguage dans le terminal en plus du marqueur dans l&apos;éditeur</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
         <translation>Affichage</translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sélectionnez la police, sa taille (différence par rapport à la taille par défaut), son style (&lt;b&gt;g&lt;/b&gt;ras, &lt;b&gt;i&lt;/b&gt;talique, &lt;b&gt;s&lt;/b&gt;ouligné), la couleur du texte et de l&apos;arrière plan (pour ce dernier, le rose (255,0,255) fait figure de défaut).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Alterner les couleurs des lignes</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Comportement</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Revenir au répertoire de la session precédente</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Espace de travail</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Masquer les bulles d&apos;aide</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Modifier un raccourci en double-cliquant sur une cellule</translation>
     </message>
     <message>
         <location line="+108"/>
-        <source>Terminal Colors</source>
-        <translation>Couleurs de la fenetre de commandes</translation>
-    </message>
-    <message>
-        <location line="+45"/>
-        <source>Font</source>
-        <translation>Police</translation>
-    </message>
-    <message>
-        <location line="-757"/>
-        <source>Show line numbers</source>
-        <translation>Afficher les numéros des lignes</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Surligner la ligne courante</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Suggestions de saisie</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Afficher le chemin complet dans le titre de la fenetre</translation>
-    </message>
-    <message>
-        <location line="-17"/>
-        <source>Show whitespace</source>
-        <translation>Afficher les espaces</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Ne pas afficher les espaces utilisés pour l&apos;indentation</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Nb. de caractères avant affichage de la liste de complétion</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Créer les fichiers non-existants sans prévenir</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>ligne de commande (%f=fichier, %l=ligne) :</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Terminal</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Type de curseur :</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Réseau</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Curseur clignotant</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Utiliser la couleur de l&apos;avant plan</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Taille de police</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Explorateur de fichiers</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Afficher la taille des fichiers</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Afficher le type des fichiers</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Afficher la date de la dernière modification</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Afficher les fichiers cachés</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Alterner les couleurs des lignes</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Espace de travail</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Couleurs des variables</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Réseau</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
         <translation>Autoriser Octave à se connecter à son site internet afin d&apos;afficher les informations et nouvelle fraîches</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Utiliser un serveur proxy</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>Proxy HTTP</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>Jeu d&apos;icones pour les widgets</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Langue (nécessite un redémarrage)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Taille des icones</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Synchroniser le répertoire de travail d&apos;Octave et le navigateur de fichiers</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Couleurs des variables par type</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Raccourcis</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Choisir cette option pour éviter les conflits avec les raccoucis readline</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Désactiver les raccourcis globaux quand la fenêtre de commande est active</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Utiliser ce jeu</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Jeu 1:</translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Langue (nécessite un redémarrage)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exporter</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importer</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Taille des icones</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Synchroniser le répertoire de travail d&apos;Octave et le navigateur de fichiers</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Jeu 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Action</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Défaut jeu 1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Courant jeu 1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Défaut jeu 2</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Courant jeu 1</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Proxy Socks5</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Nom de l&apos;hote :</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>Type de Proxy :</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Port :</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Nom d&apos;utilisateur :</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Mot de passe :</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Reglages système</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>Curseur Trait Vertical</translation>
     </message>
@@ -1922,7 +2694,7 @@
         <translation>Curseur Tiret Bas</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Différence avec la taille par défaut</translation>
     </message>
@@ -1949,6 +2721,16 @@
         <comment>short form for underlined</comment>
         <translation>s</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Choisir le répertoire de démarrage d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Choisir le répertoire de démarrage du navigateur de fichiers</translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -2006,6 +2788,626 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Nouveau Fichier</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nouvelle Fonction</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nouvelle Figure</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Ouvrir un Fichier</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Charger un Espace de Travail</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Enregistrer l&apos;Espace de Travail sous</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Préférences</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Quitter Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Copier</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Coller</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Annuler</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Tout Sélectionner</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Effacer le Presse-Papiers</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Rechercher dans les Fichiers</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Nettoyer la Fenêtre de Commande</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Nettoyer l&apos;Historique des Commandes</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Nettoyer l&apos;Espace de Travail</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Avancer d&apos;un pas avec entrée</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Exécuter jusqu&apos;à l&apos;instruction de retour</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Continuer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Quitter le mode Débuguage</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Afficher la Fenêtre de Commande</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Afficher l&apos;Historique des Commandes</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Afficher l&apos;Explorateur de Fichiers</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Afficher l&apos;Espace de Travail</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Afficher l&apos;Éditeur</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Afficher la Documentation</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Fenêtre de Commande</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Historique des Commandes</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Explorateur de Fichiers</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Espace de Travail</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Éditeur</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentation</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Afficher la Documentation embarquée</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Afficher la Documentation en Ligne</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Paquets d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Partager du Code</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Contribuer à Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Ressources développeurs d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>À propos d&apos;Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Notes de la Version</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Nouvelles de la Communauté</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Editer la Fonction</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Enregister un Fichier</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Enregister un Fichier Sous</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Fermer</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Tout fermer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Imprimer</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Rétablir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Couper</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Rechercher et Remplacer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Effacer jusqu&apos;au Début du Mot</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Effacer jusqu&apos;à la Fin du Mot</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Effacer jusqu&apos;au Début de la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Effacer jusqu&apos;à la Fin de la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Effacer la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copier la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Couper la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Dupliquer la Sélection/Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transposer la Ligne</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Commenter la Sélection</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Décommenter la Sélection</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Sélection en Majuscules</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Sélection en Minuscules</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Indenter la Sélection</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Désindenter la Sélection</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Aller à la Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Déplacer jusqu&apos;à la Parenthèse Correspondante</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Sélectionner jusqu&apos;à la Parenthèse Correspondante</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Ajouter/Supprimer un Marque Page</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Marque Page Suivant</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Marque Page Précédent</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Retirer tous les Marque-Pages</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Préférences de Style</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Afficher les Numéros des Lignes</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation>Avancer d&apos;un pas</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Rétablir la disposition par défaut des fenêtres</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Signaler un bug</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Fermer les autres fichiers</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Montrer la liste de suggestions</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Convertir les caractères de fin de ligne en Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Convertir les caractères de fin de ligne en Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Convertir les caractères de fin de ligne en Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Afficher les Espaces</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Afficher les Fins de Lignes</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Afficher les Guides d&apos;Indentation</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Afficher le Repère de Longue Ligne</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Agrandir</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Réduire</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Taille Normale</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Ajouter/Retirer un Point d&apos;Arrêt</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Point d&apos;Arrêt Suivant</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Point d&apos;Arrêt Précédent</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Retirer tous les Points d&apos;Arrêt</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Exécuter le Script</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Exécuter la Selection</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Aide sur le Mot de Clé</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Documentation sur le Mot de Clé</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Général</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Fichier</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Éditer</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Débuguer</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Fenêtre</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Aide</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Nouvelles</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Affichage</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Exécuter</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Entrer un Raccourci pour le Jeu %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Entrer le raccourci souhaité ou cliquer droit pour le réinitialiser à sa valeur par défaut.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Presser les touches de raccourci</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Raccourci courant</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Raccourci par défaut</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Revenir au défaut</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Raccourci en double</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>Le raccourci choisi
+  &quot;%1&quot;
+est déjà affecté à l&apos;action
+  &quot;%2&quot;.
+voulez l&apos;affecter à la présente action et le retirer de la précédente ?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Importer le jeu de raccourcis &quot;%1&quot; depuis un fichier...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Fichier de Raccourcis Octave (*.osc);;Tous les fichiers (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Exporter le jeu de raccourcis %1 vers un fichier...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Impossible d&apos;ouvrir %1 en tant que fichier de raccourcis</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2016,7 +3418,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>Entrez le texte ici et appuyez sur &apos;Entrée&apos; pour lancer la recherche</translation>
     </message>
@@ -2025,6 +3427,16 @@
         <source>Global search</source>
         <translation>Recherche globale</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>Le fichier info &lt;p&gt;%1&lt;p&gt; ou ses versions compressées n&apos;existent pas</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2058,8 +3470,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Type de stockage</translation>
+        <source>Attribute</source>
+        <translation>Attribut</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2076,7 +3488,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Espace de travail</translation>
     </message>
@@ -2086,9 +3498,24 @@
         <translation>Liste des variables dans l&apos;espace de travail.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Copier</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Entrer du texte pour filtrer l&apos;espace de travail</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrer</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Copier le nom</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Copier la valeur</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2096,19 +3523,19 @@
         <translation>Renommer</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Seules les variables de plus haut niveau peuvent être renommées.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>Voir les variables dans l&apos;espace de travail.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Couleurs pour le type de stockage :</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Couleur pour les attributs des variables:</translation>
     </message>
 </context>
 </TS>
new file mode 100644
--- /dev/null
+++ b/libgui/languages/it_IT.ts
@@ -0,0 +1,5204 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="it_IT">
+<context>
+    <name>ListDialog</name>
+    <message>
+        <location filename="../src/dialog.cc" line="+251"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+</context>
+<context>
+    <name>QColorDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qcolordialog.cpp" line="+1378"/>
+        <source>Hu&amp;e:</source>
+        <translation>&amp;Tinta:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Sat:</source>
+        <translation>&amp;Saturazione:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Val:</source>
+        <translation>&amp;Luminosità:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Red:</source>
+        <translation>&amp;Rosso:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Green:</source>
+        <translation>&amp;Verde:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Bl&amp;ue:</source>
+        <translation>&amp;Blu:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A&amp;lpha channel:</source>
+        <translation>Canale &amp;alfa:</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <source>Select Color</source>
+        <translation>Seleziona Colore</translation>
+    </message>
+    <message>
+        <location line="+183"/>
+        <source>&amp;Basic colors</source>
+        <translation>Colori di &amp;base</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Custom colors</source>
+        <translation>Colori &amp;personalizzati</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Add to Custom Colors</source>
+        <translation>&amp;Aggiungi ai Colori Personalizzati</translation>
+    </message>
+</context>
+<context>
+    <name>QDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qdialog.cpp" line="+528"/>
+        <source>Done</source>
+        <translation>Fatto</translation>
+    </message>
+    <message>
+        <location line="+133"/>
+        <source>What&apos;s This?</source>
+        <translation>Cos&apos;è questo?</translation>
+    </message>
+</context>
+<context>
+    <name>QDialogButtonBox</name>
+    <message>
+        <location filename="../../../octave-qt/qdialogbuttonbox.cpp" line="+658"/>
+        <location filename="../../../octave-qt/qmessagebox.cpp" line="+1937"/>
+        <location line="+446"/>
+        <source>OK</source>
+        <translation>OK</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Salva</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Save</source>
+        <translation>Salva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Open</source>
+        <translation>Apri</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Annulla</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Cancel</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Close</source>
+        <translation>&amp;Chiudi</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Close</source>
+        <translation>Chiudi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Apply</source>
+        <translation>Applica</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Reset</source>
+        <translation>Reset</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Help</source>
+        <translation>Aiuto</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Don&apos;t Save</source>
+        <translation>Non salvare</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close without Saving</source>
+        <translation>Chiudi senza salvare</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Discard</source>
+        <translation>Elimina</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Yes</source>
+        <translation>&amp;Sì</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Yes to &amp;All</source>
+        <translation>Sì a &amp;tutto</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;No</source>
+        <translation>&amp;No</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>N&amp;o to All</source>
+        <translation>N&amp;o a tutto</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Save All</source>
+        <translation>Salva tutto</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Abort</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Retry</source>
+        <translation>Riprova</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Ignore</source>
+        <translation>Ignora</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Restore Defaults</source>
+        <translation>Ripristina defaults</translation>
+    </message>
+</context>
+<context>
+    <name>QErrorMessage</name>
+    <message>
+        <location filename="../../../octave-qt/qerrormessage.cpp" line="+208"/>
+        <source>Debug Message:</source>
+        <translation>Messaggio di Debug:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning:</source>
+        <translation>Avviso:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fatal Error:</source>
+        <translation>Errore Fatale:</translation>
+    </message>
+    <message>
+        <location line="+208"/>
+        <source>&amp;Show this message again</source>
+        <translation>&amp;Mostra di nuovo questo messaggio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+</context>
+<context>
+    <name>QFileDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qfiledialog.cpp" line="+557"/>
+        <location filename="../../../octave-qt/qfiledialog_symbian.cpp" line="+192"/>
+        <source>Find Directory</source>
+        <translation>Trova Cartella</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Open</source>
+        <translation>Apri</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save As</source>
+        <translation>Salva come</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <location line="+550"/>
+        <source>All Files (*)</source>
+        <translation>Tutti i File (*)</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <source>Show </source>
+        <translation>Mostra </translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>&amp;Rename</source>
+        <translation>&amp;Rinomina</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Delete</source>
+        <translation>&amp;Elimina</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show &amp;hidden files</source>
+        <translation>Mostra &amp;file nascosti</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;New Folder</source>
+        <translation>&amp;Nuova cartella</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location line="+750"/>
+        <source>Directory:</source>
+        <translation>Cartella:</translation>
+    </message>
+    <message>
+        <location line="-748"/>
+        <location line="+754"/>
+        <source>File &amp;name:</source>
+        <translation>Nome &amp;file:</translation>
+    </message>
+    <message>
+        <location line="-13"/>
+        <location line="+55"/>
+        <location line="+1582"/>
+        <source>&amp;Open</source>
+        <translation>&amp;Apri</translation>
+    </message>
+    <message>
+        <location line="-1637"/>
+        <location line="+55"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Salva</translation>
+    </message>
+    <message>
+        <location line="-52"/>
+        <source>Directories</source>
+        <translation>Cartelle</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location line="+43"/>
+        <source>&amp;Choose</source>
+        <translation>&amp;Seleziona</translation>
+    </message>
+    <message>
+        <location line="+789"/>
+        <location line="+866"/>
+        <source>%1
+Directory not found.
+Please verify the correct directory name was given.</source>
+        <translation>%1
+Nessuna cartella trovata.
+Verificare la corretta ortografia del nome inserito.</translation>
+    </message>
+    <message>
+        <location line="-832"/>
+        <source>%1 already exists.
+Do you want to replace it?</source>
+        <translation>%1 esiste già.
+Si desidera sostituirlo?</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>%1
+File not found.
+Please verify the correct file name was given.</source>
+        <translation>%1
+File non trovato.
+Verificare la corretta ortografia del nome inserito.</translation>
+    </message>
+    <message>
+        <location line="+462"/>
+        <source>New Folder</source>
+        <translation>Nuova Cartella</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>&apos;%1&apos; is write protected.
+Do you want to delete it anyway?</source>
+        <translation>&apos;%1&apos; è protetto da scrittura.
+Si è certi di volerlo eliminare?</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Are sure you want to delete &apos;%1&apos;?</source>
+        <translation>Si è certi di voler eliminare &apos;%1&apos;?</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Could not delete directory.</source>
+        <translation>Impossibile eliminare la cartella.</translation>
+    </message>
+    <message>
+        <location line="+409"/>
+        <source>Recent Places</source>
+        <translation>Percorsi Recenti</translation>
+    </message>
+    <message>
+        <location filename="../../../octave-qt/qfiledialog_win.cpp" line="+131"/>
+        <source>All Files (*.*)</source>
+        <translation>Tutti i File (*.*)</translation>
+    </message>
+</context>
+<context>
+    <name>QFileSystemModel</name>
+    <message>
+        <location filename="../../../octave-qt/qfilesystemmodel.cpp" line="+763"/>
+        <source>%1 TB</source>
+        <translation>%1 TB</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>%1 GB</source>
+        <translation>%1 GB</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>%1 MB</source>
+        <translation>%1 MB</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>%1 KB</source>
+        <translation>%1 KB</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>%1 bytes</source>
+        <translation>%1 byte</translation>
+    </message>
+    <message>
+        <location line="+90"/>
+        <source>Invalid filename</source>
+        <translation>Nome del file non valido</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&lt;b&gt;The name &quot;%1&quot; can not be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuations marks.</source>
+        <translation>&lt;b&gt;Il nome &quot;%1&quot; non può essere utilizzato.&lt;/b&gt;&lt;p&gt;Si consiglia di utilizzarne uno con meno caratteri o senza segni di punteggiatura.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <source>Name</source>
+        <translation>Nome</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Size</source>
+        <translation>Dimensione</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Kind</source>
+        <comment>Match OS X Finder</comment>
+        <translation>Tipo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Type</source>
+        <comment>All other platforms</comment>
+        <translation>Tipo</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Date Modified</source>
+        <translation>Data Ultima Modifica</translation>
+    </message>
+</context>
+<context>
+    <name>QFontDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qfontdialog.cpp" line="+183"/>
+        <source>Select Font</source>
+        <translation>Seleziona Tipo di Carattere</translation>
+    </message>
+    <message>
+        <location line="+585"/>
+        <source>&amp;Font</source>
+        <translation>&amp;Tipo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Font st&amp;yle</source>
+        <translation>&amp;Stile</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Size</source>
+        <translation>&amp;Dimensione</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Effects</source>
+        <translation>Effetti</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Stri&amp;keout</source>
+        <translation>Bar&amp;rato</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Underline</source>
+        <translation>&amp;Sottolineato</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sample</source>
+        <translation>Colore</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wr&amp;iting System</source>
+        <translation>Sistema di &amp;Scrittura</translation>
+    </message>
+</context>
+<context>
+    <name>QInputDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qinputdialog.cpp" line="+223"/>
+        <source>Enter a value:</source>
+        <translation>Inserire un valore:</translation>
+    </message>
+</context>
+<context>
+    <name>QMessageBox</name>
+    <message>
+        <location filename="../../../octave-qt/qmessagebox.cpp" line="-2244"/>
+        <source>Show Details...</source>
+        <translation>Mostra Dettagli...</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Hide Details...</source>
+        <translation>Nascondi Dettagli...</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <location line="+845"/>
+        <source>OK</source>
+        <translation>OK</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Help</source>
+        <translation>Aiuto</translation>
+    </message>
+    <message>
+        <location line="+488"/>
+        <source>&lt;h3&gt;About Qt&lt;/h3&gt;&lt;p&gt;This program uses Qt version %1.&lt;/p&gt;</source>
+        <translation>&lt;h3&gt;A proposito Qt&lt;/h3&gt;&lt;p&gt;Questo programma utilizza Qt versione %1.&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Qt is available under three different licensing options designed to accommodate the needs of our various users.&lt;/p&gt;&lt;p&gt;Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://qt.digia.com/product/licensing&quot;&gt;qt.digia.com/product/licensing&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;&lt;p&gt;Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;Qt is a Digia product. See &lt;a href=&quot;http://qt.digia.com/&quot;&gt;qt.digia.com&lt;/a&gt; for more information.&lt;/p&gt;</source>
+        <translation>&lt;p&gt;Qt è uno strumento per lo sviluppo di applicazioni multipiattaforma.&lt;/p&gt;&lt;p&gt;Fornisce portabilità completa fra MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux e tutte le principali varianti commerciali di Unix, ed è disponibile per dispositivi embedded come Qt for Embedded Linux e Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Tre opzioni di liceza sono disponibili per rispondede alle esigenze eterogenee dei nostri utenti.&lt;/p&gt;&lt;p&gt;La licenza commerciale è adatta allo sviluppo di software proprietario e/o commerciale, quando non si desidera condividere codice sorgente con terze parti o si è in altro modo impossibilitati a rispettare i termini delle licenze GNU LGPL versione 2.1 o GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;La licenza GNU LGPL versione 2.1 si presta allo sviluppo di allpicazioni Qt (proprietarie o a sorgente aperto), qualora si sia in condizione di rispettare i termini e le condizioni della licenza GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;La licenza GNU GPL versione 3.0 è adatta allo sviluppo di applicazioni Qt che si desidera utilizzare in combinazione con software soggetto ai termini della licenza GNU GPL version 3.0 o quando si desidera rispettare i termini della licenza GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Si faccia riferimento a &lt;a href=&quot;http://qt.digia.com/product/licensing&quot;&gt;qt.digia.com/product/licensing&lt;/a&gt; per una panoramica delle opzioni di licenza di Qt. &lt;/p&gt;&lt;p&gt;Copyright (C) 2013 Digia Plc e/o sussidiarie.&lt;/p&gt;&lt;p&gt;Qt è un prodotto Digia. Si veda &lt;a href=&quot;http://qt.digia.com/&quot;&gt;qt.digia.com&lt;/a&gt; per maggiori informazioni.&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>About Qt</source>
+        <translation>A proposito di Qt</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="../src/workspace-model.cc" line="+75"/>
+        <source>automatic</source>
+        <translation>automatico</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>function</source>
+        <translation>funzione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>global</source>
+        <translation>globale</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>hidden</source>
+        <translation>nascosto</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>inherited</source>
+        <translation>ereditato</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>persistent</source>
+        <translation>persistente</translation>
+    </message>
+    <message>
+        <location filename="../qterminal/libqterminal/QTerminal.cc" line="+65"/>
+        <source>foreground</source>
+        <translation>primo piano</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>background</source>
+        <translation>sfondo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>selection</source>
+        <translation>selezione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>cursor</source>
+        <translation>cursore</translation>
+    </message>
+</context>
+<context>
+    <name>QPPDOptionsModel</name>
+    <message>
+        <location filename="../../../octave-qt/qprintdialog_unix.cpp" line="+1238"/>
+        <source>Name</source>
+        <translation>Nome</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Value</source>
+        <translation>Valore</translation>
+    </message>
+</context>
+<context>
+    <name>QPageSetupWidget</name>
+    <message>
+        <location filename="../../../octave-qt/qpagesetupdialog_unix.cpp" line="+304"/>
+        <source>Centimeters (cm)</source>
+        <translation>Centimetri (cm)</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Millimeters (mm)</source>
+        <translation>Millimetri (mm)</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Inches (in)</source>
+        <translation>Pollici (in)</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Points (pt)</source>
+        <translation>Punti (pt)</translation>
+    </message>
+</context>
+<context>
+    <name>QPrintDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qabstractprintdialog.cpp" line="+116"/>
+        <location line="+13"/>
+        <location filename="../../../octave-qt/qprintdialog_win.cpp" line="+270"/>
+        <source>Print</source>
+        <translation>Stampa</translation>
+    </message>
+    <message>
+        <location filename="../../../octave-qt/qpagesetupdialog_unix.cpp" line="-232"/>
+        <source>A0</source>
+        <translation>A0</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A1</source>
+        <translation>A1</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A2</source>
+        <translation>A2</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A3</source>
+        <translation>A3</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A4</source>
+        <translation>A4</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A5</source>
+        <translation>A5</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A6</source>
+        <translation>A6</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A7</source>
+        <translation>A7</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A8</source>
+        <translation>A8</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A9</source>
+        <translation>A9</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B0</source>
+        <translation>B0</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B1</source>
+        <translation>B1</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B2</source>
+        <translation>B2</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B3</source>
+        <translation>B3</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B4</source>
+        <translation>B4</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B5</source>
+        <translation>B5</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B6</source>
+        <translation>B6</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B7</source>
+        <translation>B7</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B8</source>
+        <translation>B8</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B9</source>
+        <translation>B9</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B10</source>
+        <translation>B10</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>C5E</source>
+        <translation>C5E</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>DLE</source>
+        <translation>DLE</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Executive</source>
+        <translation>Executive</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Folio</source>
+        <translation>Folio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Ledger</source>
+        <translation>Ledger</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Legal</source>
+        <translation>Legal</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Letter</source>
+        <translation>Letter</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Tabloid</source>
+        <translation>Tabloid</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>US Common #10 Envelope</source>
+        <translation>US Common #10 Envelope</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Custom</source>
+        <translation>Personalizzato</translation>
+    </message>
+    <message>
+        <location filename="../../../octave-qt/qprintdialog_qws.cpp" line="+148"/>
+        <source>File exists</source>
+        <translation>Il file esiste</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&lt;qt&gt;Do you want to overwrite it?&lt;/qt&gt;</source>
+        <translation>&lt;qt&gt;Si desidera sovrascriverlo?&lt;/qt&gt;</translation>
+    </message>
+    <message>
+        <location line="+184"/>
+        <source>A0 (841 x 1189 mm)</source>
+        <translation>A0 (841 x 1189 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A1 (594 x 841 mm)</source>
+        <translation>A1 (594 x 841 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A2 (420 x 594 mm)</source>
+        <translation>A2 (420 x 594 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A3 (297 x 420 mm)</source>
+        <translation>A3 (297 x 420 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source>
+        <translation>A4 (210 x 297 mm, 8.26 x 11.7 inches)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A5 (148 x 210 mm)</source>
+        <translation>A5 (148 x 210 mm)&gt;A5 (148 x 210 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A6 (105 x 148 mm)</source>
+        <translation>A6 (105 x 148 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A7 (74 x 105 mm)</source>
+        <translation>A7 (74 x 105 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A8 (52 x 74 mm)</source>
+        <translation>A8 (52 x 74 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>A9 (37 x 52 mm)</source>
+        <translation>A9 (37 x 52 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B0 (1000 x 1414 mm)</source>
+        <translation>B0 (1000 x 1414 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B1 (707 x 1000 mm)</source>
+        <translation>B1 (707 x 1000 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B2 (500 x 707 mm)</source>
+        <translation>B2 (500 x 707 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B3 (353 x 500 mm)</source>
+        <translation>B3 (353 x 500 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B4 (250 x 353 mm)</source>
+        <translation>B4 (250 x 353 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source>
+        <translation>B5 (176 x 250 mm, 6.93 x 9.84 pollici)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B6 (125 x 176 mm)</source>
+        <translation>B6 (125 x 176 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B7 (88 x 125 mm)</source>
+        <translation>B7 (88 x 125 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B8 (62 x 88 mm)</source>
+        <translation>B8 (62 x 88 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B9 (44 x 62 mm)</source>
+        <translation>B9 (44 x 62 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>B10 (31 x 44 mm)</source>
+        <translation>B10 (31 x 44 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>C5E (163 x 229 mm)</source>
+        <translation>C5E (163 x 229 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>DLE (110 x 220 mm)</source>
+        <translation>DLE (110 x 220 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source>
+        <translation>Executive (7.5 x 10 pollici, 191 x 254 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Folio (210 x 330 mm)</source>
+        <translation>Folio (210 x 330 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Ledger (432 x 279 mm)</source>
+        <translation>Ledger (432 x 279 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source>
+        <translation>Legal (8.5 x 14 pollici, 216 x 356 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source>
+        <translation>Letter (8.5 x 11 pollici, 216 x 279 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Tabloid (279 x 432 mm)</source>
+        <translation>Tabloid (279 x 432 mm)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>US Common #10 Envelope (105 x 241 mm)</source>
+        <translation>US Common #10 Busta (105 x 241 mm)</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>Print all</source>
+        <translation>Stampa tutto</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Print selection</source>
+        <translation>Stampa selezione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Print range</source>
+        <translation>Stampa intervallo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Print current page</source>
+        <translation>Stampa la pagina corrente</translation>
+    </message>
+    <message>
+        <location filename="../../../octave-qt/qprintdialog_unix.cpp" line="-844"/>
+        <location line="+68"/>
+        <source>&amp;Options &gt;&gt;</source>
+        <translation>&amp;Opzioni&gt;&gt;</translation>
+    </message>
+    <message>
+        <location line="-63"/>
+        <source>&amp;Print</source>
+        <translation>&amp;Stampa</translation>
+    </message>
+    <message>
+        <location line="+67"/>
+        <source>&amp;Options &lt;&lt;</source>
+        <translation>&amp;Opzioni</translation>
+    </message>
+    <message>
+        <location line="+260"/>
+        <source>Print to File (PDF)</source>
+        <translation>Stampa su file (PDF)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Print to File (Postscript)</source>
+        <translation>Stampa su file (Postscript)</translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <source>Local file</source>
+        <translation>File locale</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Write %1 file</source>
+        <translation>Scrivi %1 file</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Print To File ...</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+78"/>
+        <source>%1 is a directory.
+Please choose a different file name.</source>
+        <translation>%1 è una cartella.
+Si prega di scegliere un altro nome.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>File %1 is not writable.
+Please choose a different file name.</source>
+        <translation>%1 non è scrivibile.
+Si prega di scegliere un altro nome.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>%1 already exists.
+Do you want to overwrite it?</source>
+        <translation>%1 esiste già.
+Si desidera sovrascriverlo?</translation>
+    </message>
+    <message>
+        <location filename="../../../octave-qt/qprintdialog_win.cpp" line="+1"/>
+        <source>The &apos;From&apos; value cannot be greater than the &apos;To&apos; value.</source>
+        <translation>Il valore &apos;Da&apos; non può superare il valore &apos;A&apos;.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>OK</source>
+        <translation>OK</translation>
+    </message>
+</context>
+<context>
+    <name>QPrintPreviewDialog</name>
+    <message>
+        <location filename="../../../octave-qt/qabstractpagesetupdialog.cpp" line="+68"/>
+        <location line="+12"/>
+        <source>Page Setup</source>
+        <translation>Formato Pagina</translation>
+    </message>
+</context>
+<context>
+    <name>QTerminal</name>
+    <message>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
+        <source>Copy</source>
+        <translation>Copia</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Paste</source>
+        <translation>Incolla</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>Svuota Finestra</translation>
+    </message>
+</context>
+<context>
+    <name>QWinTerminalImpl</name>
+    <message>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
+        <source>copied selection to clipboard</source>
+        <translation>selezione copiata negli appunti</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerBash</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbash.cpp" line="+208"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation>Errore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>Commento</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>Numero</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>Parola chiave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>Stringa con doppi apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>Stringa con singoli apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>Operatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation>Identificatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation>Scalare</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Parameter expansion</source>
+        <translation>Espansione dei parametri</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation>Apici inversi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation>Delimitatore dello &quot;here document&quot;</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation>&quot;Here document&quot; delimitato da singoli apici</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerBatch</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbatch.cpp" line="+179"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>Commento</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>Parola chiave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Label</source>
+        <translation>Etichetta</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hide command character</source>
+        <translation>Nascondi caratteri di comando</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>External command</source>
+        <translation>Comando esterno</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Variable</source>
+        <translation>Variabile</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>Operatore</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerCPP</name>
+    <message>
+        <location filename="../../../qsci/qscilexercpp.cpp" line="+352"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive default</source>
+        <translation>Default inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C comment</source>
+        <translation>Commento C</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C comment</source>
+        <translation>Commento C inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ comment</source>
+        <translation>Commento C++</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ comment</source>
+        <translation>Commento C++ inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C comment</source>
+        <translation>Commento C in stile JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C comment</source>
+        <translation>Commento C inattivo in stile JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>Numero</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive number</source>
+        <translation>Numero inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>Parola chiave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive keyword</source>
+        <translation>Parola chiave inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>Stringa con doppi apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive double-quoted string</source>
+        <translation>Stringa con doppi apici inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>Stringa con singoli apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive single-quoted string</source>
+        <translation>Stringa con singoli apici inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>IDL UUID</source>
+        <translation>UUID IDL</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive IDL UUID</source>
+        <translation>UUID IDL inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Pre-processor block</source>
+        <translation>Blocco per il precompilatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive pre-processor block</source>
+        <translation>Blocco inattivo per il precompilatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>Operatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive operator</source>
+        <translation>Operatore inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation>Identificatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive identifier</source>
+        <translation>Identificatore inattivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Unclosed string</source>
+        <translation>Stringa non terminata</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive unclosed string</source>
+        <translation>Stringa non terminata inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C# verbatim string</source>
+        <translation>Stringa senza formattazione C#</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C# verbatim string</source>
+        <translation>Stringa senza formattazione C# inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaScript regular expression</source>
+        <translation>Espressione regolare JavaScript</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaScript regular expression</source>
+        <translation>Espressione regolare JavaScript inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C++ comment</source>
+        <translation>Commento C++ in stile JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C++ comment</source>
+        <translation>Commento C++ inattivo in stile JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Secondary keywords and identifiers</source>
+        <translation>Parole chiave ed identificatori secondari</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive secondary keywords and identifiers</source>
+        <translation>Parole chiave ed identificatori secondari inattivi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword</source>
+        <translation>Parola chiave JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword</source>
+        <translation>Parola chiave JavaDoc inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword error</source>
+        <translation>Errore in una parola chiave JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword error</source>
+        <translation>Errore in una parola chiave JavaDoc inattiva</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Global classes and typedefs</source>
+        <translation>Classi e typedef globali</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive global classes and typedefs</source>
+        <translation>Classi e typedef globali inattivi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ raw string</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ raw string</source>
+        <translation>Stringa &quot;raw&quot; C++ inattiva</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerDiff</name>
+    <message>
+        <location filename="../../../qsci/qscilexerdiff.cpp" line="+107"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>Commento</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation>Comando</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Header</source>
+        <translation>Intestazione</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Position</source>
+        <translation>Posizione</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Removed line</source>
+        <translation>Riga rimossa</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Added line</source>
+        <translation>Riga aggiunta</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Changed line</source>
+        <translation>Riga modificata</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerMatlab</name>
+    <message>
+        <location filename="../../../qsci/qscilexermatlab.cpp" line="+138"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>Commento</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation>Comando</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>Numero</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>Parola chiave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>Stringa con singoli apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>Operatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation>Identificatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>Stringa con doppi apici</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerPerl</name>
+    <message>
+        <location filename="../../../qsci/qscilexerperl.cpp" line="+333"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation>Errore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>Commento</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD</source>
+        <translation>POD</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>Numero</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>Parola chiave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>Stringa con doppi apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>Stringa con apici singoli</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>Operatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation>Identificatore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation>Scalare</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Array</source>
+        <translation>Vettore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hash</source>
+        <translation>Hash</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Symbol table</source>
+        <translation>Tabella dei simboli</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression</source>
+        <translation>Espressione regolare</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution</source>
+        <translation>Sostituzione</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation>Apici inversi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Data section</source>
+        <translation>Sezione dati</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation>Delimitatore dello &quot;here document&quot;</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation>&quot;Here document&quot; delimitato da apici singoli</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document</source>
+        <translation>&quot;Here document&quot; delimitato da doppi apici</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document</source>
+        <translation>&quot;Here document&quot; delimitato da apici inversi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (q)</source>
+        <translation>Stringa delimitata da apici (q)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq)</source>
+        <translation>Stringa delimitata da apici (qq)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx)</source>
+        <translation>Stringa delimitata da apici (qx)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr)</source>
+        <translation>Stringa delimitata da apici (qr)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qw)</source>
+        <translation>Stringa delimitata da apici (qw)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD verbatim</source>
+        <translation>POD senza formattazione</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Subroutine prototype</source>
+        <translation>Prototipo di subroutine</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format identifier</source>
+        <translation>Identificatore del formato</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format body</source>
+        <translation>Corpo del formato</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string (interpolated variable)</source>
+        <translation>Stringa con doppi apici (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Translation</source>
+        <translation>Traduzione</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression (interpolated variable)</source>
+        <translation>Espressione regolare (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution (interpolated variable)</source>
+        <translation>Sostituzione (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks (interpolated variable)</source>
+        <translation>Apici inversi (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document (interpolated variable)</source>
+        <translation>&quot;Here document&quot; delimitato da doppi apici (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document (interpolated variable)</source>
+        <translation>Here document&quot; delimitato da apici inversi (variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq, interpolated variable)</source>
+        <translation>Stringa delimitata da apici (qq, variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx, interpolated variable)</source>
+        <translation>Stringa delimitata da apici (qx, variabile interpolata)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr, interpolated variable)</source>
+        <translation>Stringa delimitata da apici (qr, variabile interpolata)</translation>
+    </message>
+</context>
+<context>
+    <name>QsciScintilla</name>
+    <message>
+        <location filename="../../../qsci/qsciscintilla.cpp" line="+4201"/>
+        <source>&amp;Undo</source>
+        <translation>&amp;Annulla</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>&amp;Redo</source>
+        <translation>&amp;Ripeti</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Cu&amp;t</source>
+        <translation>&amp;Taglia</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Copy</source>
+        <translation>&amp;Copia</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Incolla</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Delete</source>
+        <translation>Cancella</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Barra degli strumenti delle figure</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Assi</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Griglia</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Ridimensiona</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;File</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Salva</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Salva &amp;Come</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Chiudi Figura</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Modifica</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>Co&amp;pia</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>&amp;Taglia</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Incolla</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>Ai&amp;uto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>A Proposito di Qt&amp;Handles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>A Proposito di &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>A Proposito di QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Salva Figura Come</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Ruota</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Ingrandisci</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Riduci</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Panoramica</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Inserisci Testo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Seleziona</translation>
+    </message>
+</context>
+<context>
+    <name>S:</name>
+    <message>
+        <location filename="../../gnulib-hg/lib/quotearg.c" line="+291"/>
+        <source></source>
+        <comment>The placeholder indicates the bug-reporting address for this package. Please add _another line_ saying &quot;Report translation bugs to &lt;...&gt;
+&quot; with the address for translation bugs (typically your translation team&apos;s web or email address).</comment>
+        <translatorcomment>TODO</translatorcomment>
+        <translation></translation>
+    </message>
+</context>
+<context>
+    <name>documentation_dock_widget</name>
+    <message>
+        <location filename="../src/documentation-dock-widget.cc" line="+34"/>
+        <source>Documentation</source>
+        <translation>Documentazione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>See the documentation for help.</source>
+        <translation>Si faccia riferimento alla documentazione per maggiori informazioni.</translation>
+    </message>
+</context>
+<context>
+    <name>file_editor</name>
+    <message>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
+        <location line="+28"/>
+        <source>Octave Editor</source>
+        <translation>Editor di Octave</translation>
+    </message>
+    <message>
+        <location line="-318"/>
+        <source>Octave Files (*.m);;All Files (*)</source>
+        <translation>File di Octave (*.m);;Tutti i File (*)</translation>
+    </message>
+    <message>
+        <location line="-40"/>
+        <source>New Function</source>
+        <translation>Nuova Funzione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New function name:
+</source>
+        <translation>Nome della nuova funzione:</translation>
+    </message>
+    <message>
+        <location line="+330"/>
+        <source>File not saved! A file with the selected name
+%1
+is already open in the editor</source>
+        <translation>File non salvato! Un file chiamato
+%1
+è già aperto nell&apos;editor</translation>
+    </message>
+    <message>
+        <location line="+387"/>
+        <source>&amp;%1 %2</source>
+        <translation>&amp;%1 %2</translation>
+    </message>
+    <message>
+        <location line="+388"/>
+        <source>&amp;Save File</source>
+        <translation>&amp;Salva File</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File &amp;As...</source>
+        <translation>Salva &amp;Come...</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Print...</source>
+        <translation>Stampa...</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;Undo</source>
+        <translation>Annu&amp;lla</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Redo</source>
+        <translation>&amp;Ripeti</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Copy</source>
+        <translation>&amp;Copia</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>&amp;Taglia</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Incolla</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>Co&amp;mandi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Cancella riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copia riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Taglia riga</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Cancella fino a inizio parola</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Cancella fino a fine parola</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Cancella fino a inizio riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Cancella fino a fine riga</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplica selezione/riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Trasponi riga</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>Mostra &amp;lista di completamento</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Formatta</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Rendi &amp;Maiuscola la selezione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Rendi Mi&amp;nuscola la selezione</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>A Capo in Stile &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>A Capo in Stile &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>A Capo in Stile &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Navi&amp;gazione</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Vai alla Parentesi Corrispondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Seleziona fino alla Parentesi Corrispondente</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Segnalibro &amp;Successivo</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-150"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Segnalibro &amp;Precedente</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>Attiva/disattiva &amp;Segnalibro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Remove All Bookmarks</source>
+        <translation>&amp;Elimina Tutti i Segnalibri</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>&amp;View</source>
+        <translation>&amp;Vista</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Mostra Numeri di &amp;Riga</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Mostra a &amp;Capo</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Mostre Guide &amp;Indentazione</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Mostra &amp;Marcatori di Linea Lunga</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>&amp;Ingrandisci</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>&amp;Riduci</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>Dimensione &amp;Normale</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Next Breakpoint</source>
+        <translation>&amp;Breakpoint Successivo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Pre&amp;vious Breakpoint</source>
+        <translation>&amp;Breakpoint Precedente</translation>
+    </message>
+    <message>
+        <location line="-6"/>
+        <source>Toggle &amp;Breakpoint</source>
+        <translation>Attiva/Disattiva &amp;Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>&amp;Remove All Breakpoints</source>
+        <translation>&amp;Rimuovi Tutti i Breakpoint</translation>
+    </message>
+    <message>
+        <location line="-104"/>
+        <source>&amp;Comment</source>
+        <translation>&amp;Commenta</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Uncomment</source>
+        <translation>&amp;Decommenta</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Indenta</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Rimuovi Indentazione</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Trova e Sostituisci...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Salva ed Esegui</translation>
+    </message>
+    <message>
+        <location line="-90"/>
+        <source>Go &amp;to Line...</source>
+        <translation>Vai &amp;alla Riga...</translation>
+    </message>
+    <message>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Impossibile avviare l&apos;editor di file personalizzato
+%1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Crea</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+844"/>
+        <source>&amp;Recent Editor Files</source>
+        <translation>&amp;Documenti Recenti</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>&amp;Edit Function</source>
+        <translation>&amp;Modifica Funzione</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Close</source>
+        <translation>&amp;Chiudi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close All</source>
+        <translation>Chiudi Tutto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close Other Files</source>
+        <translation>Chiudi gli Altri File</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <source>&amp;Preferences...</source>
+        <translation>&amp;Preferenze...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>&amp;Preferenze di stile...</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Mostra Spazio &amp;Bianco</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <source>Run &amp;Selection</source>
+        <translation>Esegui &amp;Selezione</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Aiuto</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Help on Keyword</source>
+        <translation>&amp;Aiuto su Parola Chiave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Documentation on Keyword</source>
+        <translation>&amp;Documentazione sulla Parola Chiave</translation>
+    </message>
+    <message>
+        <location line="-1103"/>
+        <source>Could not open file
+%1
+for read: %2.</source>
+        <translation>Impossibile aprire
+%1
+in lettura: %2.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>File
+%1
+does not exist. Do you want to create it?</source>
+        <translation>Il file
+%1
+non esiste. Si desidera crearlo?</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Could not open file
+%1
+for write: %2.</source>
+        <translation>Impossibile aprire
+%1
+in scrittura: %2.</translation>
+    </message>
+    <message>
+        <location line="+90"/>
+        <source>The associated file editor tab has disappeared.</source>
+        <translation>La scheda corrispondente nell&apos;editor è scomparsa.</translation>
+    </message>
+    <message>
+        <location line="+731"/>
+        <source>&amp;File</source>
+        <translation>&amp;File</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Modifica</translation>
+    </message>
+    <message>
+        <location line="+166"/>
+        <source>&amp;Debug</source>
+        <translation>&amp;Debug</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>&amp;Run</source>
+        <translation>&amp;Esegui</translation>
+    </message>
+</context>
+<context>
+    <name>file_editor_tab</name>
+    <message>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>fine della riga:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>riga:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>riga:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 è una funzione built-in</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Impossibile trovare la funzione %1</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
+        <source>Octave Editor</source>
+        <translation>Editor di Octave</translation>
+    </message>
+    <message>
+        <location line="-711"/>
+        <source>Goto line</source>
+        <translation>Vai alla riga</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Line number</source>
+        <translation>Numero riga</translation>
+    </message>
+    <message>
+        <location line="+146"/>
+        <location line="+63"/>
+        <source>&lt;unnamed&gt;</source>
+        <translation>&lt;senza nome&gt;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>Il file
+
+  %1
+
+sta per essere chiuso ma è stato modificato.  %2</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <source>Do you want to cancel closing, save or discard the changes?</source>
+        <translation>Si desidera annullare l&apos;operazione di chiusura, salvare o annullare le modifiche?</translation>
+    </message>
+    <message>
+        <location line="+298"/>
+        <source>Line Endings:</source>
+        <translation>Terminatori di Riga:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>File di Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Tutti i File (*)</translation>
+    </message>
+    <message>
+        <location line="+179"/>
+        <source>
+
+Warning: The contents in the editor is modified!</source>
+        <translation>
+
+Attenzione: il contenuto nell&apos;editor è modificato!</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>It seems that the file
+%1
+has been deleted or renamed. Do you want to save it now?%2</source>
+        <translation>Sembra che il file
+%1
+sia stato rinominato o rimosso. Si desidera salvarlo ora?%2</translation>
+    </message>
+    <message>
+        <location line="-285"/>
+        <source>Could not open file %1 for write:
+%2.</source>
+        <translation>Impossibile aprire  %1 in scrittura:
+%2.</translation>
+    </message>
+    <message>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+non è un nome valido.
+
+Se lo si mantiene, non si potrà invocare
+lo script come comando Octave.
+
+Si desidera scegliere un altro nome?</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
+        <translation>Sembra che &apos;%1&apos; sia stato modificato da un&apos;altra applicazione. Si desidera ricaricarlo?</translation>
+    </message>
+</context>
+<context>
+    <name>files_dock_widget</name>
+    <message>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
+        <source>File Browser</source>
+        <translation>Gestore dei File</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Browse your files.</source>
+        <translation>Esplorare i propri file.</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Enter the path or filename</source>
+        <translation>Inserire il percorso o il nome del file</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Impostare la cartella di Octave alla cartella corrente</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Actions on current directory</source>
+        <translation>Azioni sulla cartella corrente</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Scegliere la Cartella del Gestore...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
+        <source>Find Files...</source>
+        <translation>Cerca File...</translation>
+    </message>
+    <message>
+        <location line="+364"/>
+        <source>New Directory</source>
+        <translation>Nuova Cartella</translation>
+    </message>
+    <message>
+        <location line="-784"/>
+        <source>Show Octave directory</source>
+        <translation>Mostra la cartella di Octave</translation>
+    </message>
+    <message>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Livello precedente</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Go to current Octave directory</source>
+        <translation>Vai alla directory corrente di Octave</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Set Octave directory</source>
+        <translation>Scegli la cartella di Octave</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Show Home Directory</source>
+        <translation>Mostra la Cartella Personale</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location line="+397"/>
+        <source>New File...</source>
+        <translation>Nuovo File...</translation>
+    </message>
+    <message>
+        <location line="-394"/>
+        <location line="+397"/>
+        <source>New Directory...</source>
+        <translation>Nuova Cartella...</translation>
+    </message>
+    <message>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Attiva per aprire nell&apos;editor, tasto destro per le alternative</translation>
+    </message>
+    <message>
+        <location line="+236"/>
+        <source>File size</source>
+        <translation>Dimensione</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>File type</source>
+        <translation>Tipo</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Date modified</source>
+        <translation>Data ultima modifica</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Show hidden</source>
+        <translation>Mostra file nascosti</translation>
+    </message>
+    <message>
+        <location line="+35"/>
+        <source>Open</source>
+        <translation>Apri</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Open in Default Application</source>
+        <translation>Apri con l&apos;Applicazione Predefinita</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy Selection to Clipboard</source>
+        <translation>Copia Selezione negli Appunti</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Run</source>
+        <translation>Esegui</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Load Data</source>
+        <translation>Carica Dati</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set Current Directory</source>
+        <translation>Seleziona la Cartella Corrente</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Rinomina...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Elimina...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
+        <source>Rename file/directory</source>
+        <translation>Rinomina file/cartella</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rename file/directory:
+</source>
+        <translation>Rinomina file/cartella:
+</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>
+ to: </source>
+        <translation>
+ a: </translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <location line="+14"/>
+        <source>Delete file/directory</source>
+        <translation>Elimina file/cartella</translation>
+    </message>
+    <message>
+        <location line="-13"/>
+        <source>Are you sure you want to delete
+</source>
+        <translation>Si è sicuri di voler eliminare
+</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Can not delete a directory that is not empty</source>
+        <translation>Impossibile eliminare una cartella non vuota</translation>
+    </message>
+    <message>
+        <location line="+151"/>
+        <source>Set directory of file browser</source>
+        <translation>Seleziona la cartella del gestore di file</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>Create File</source>
+        <translation>Nuovo File</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Create file in
+</source>
+        <comment>String ends with \n!</comment>
+        <translation>Nuovo file in
+</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Nuovo.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Create Directory</source>
+        <translation>Nuova Cartella</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Create folder in
+</source>
+        <comment>String ends with \n!</comment>
+        <translation>Nuova cartella in
+</translation>
+    </message>
+</context>
+<context>
+    <name>final_page</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
+        <source>Enjoy!</source>
+        <translation>Buon lavoro!</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Previous</source>
+        <translation>Precedente</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finish</source>
+        <translation>Finito</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
+You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Ci auguriamo che troviate Octave un utile strumento.&lt;/p&gt;
+&lt;p&gt;Se incontraste problemi, ci sono vari modi di ottenere aiuto, tra cui supporto commerciale, una mailing list, una wiki ed altri canali di supporto gestiti dalla community.
+Potete trovare ulteriori informazioni al riguardo visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (si apre in un browser esterno).&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;For more information about Octave:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;Visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (opens in external browser)&lt;/li&gt;
+&lt;li&gt;Get the documentation online as &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- or &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt;-document (opens in external browser)&lt;/li&gt;
+&lt;li&gt;Open the documentation browser of the Octave GUI with the help menu&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Per maggiori informazioni su Octave:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;visita &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (utilizza un browser esterno)&lt;/li&gt;
+&lt;li&gt;Puoi trovare la documentazione online agli indirizzi &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- o &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt; (utilizza un browser esterno)&lt;/li&gt;
+&lt;li&gt;Apri la documentazione dell&apos;interfaccia grafica di Octave utilizzando il menu help&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>find_dialog</name>
+    <message>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Trova e Sostituisci</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find &amp;what:</source>
+        <translation>T&amp;rova:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Re&amp;place with:</source>
+        <translation>Sos&amp;tituisci con:</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Match &amp;case</source>
+        <translation>Maiuscole/&amp;minuscole</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search from &amp;start</source>
+        <translation>Cerca dall&apos;i&amp;nizio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Wrap while searching</source>
+        <translation>&amp;Evidenzia durante la ricerca</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Find Next</source>
+        <translation>&amp;Trova Successivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find &amp;Previous</source>
+        <translation>Trova &amp;Precedente</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Replace</source>
+        <translation>&amp;Sostituisci</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Replace &amp;All</source>
+        <translation>S&amp;ostituisci Tutto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;More...</source>
+        <translation>&amp;Avanzate...</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>&amp;Whole words</source>
+        <translation>Paro&amp;le intere</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Regular E&amp;xpressions</source>
+        <translation>Espressioni Re&amp;golari</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search &amp;backward</source>
+        <translation>Cerca &amp;indietro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search se&amp;lection</source>
+        <translation>Cerca nella sele&amp;zione</translation>
+    </message>
+    <message>
+        <location line="+84"/>
+        <source>Search from end</source>
+        <translation>Cerca dalla fine</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Search from start</source>
+        <translation>Cerca dall&apos;inizio</translation>
+    </message>
+    <message>
+        <location line="+205"/>
+        <source>Replace Result</source>
+        <translation>Sostituisci Risultato</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>%1 items replaced</source>
+        <translation>%1 occorrenze sostituite</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Find Result</source>
+        <translation>Trova Risultato</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No more matches found</source>
+        <translation>Nessun&apos;altra corrispondenza trovata</translation>
+    </message>
+</context>
+<context>
+    <name>find_files_dialog</name>
+    <message>
+        <location filename="../src/find-files-dialog.cc" line="+52"/>
+        <source>Find Files</source>
+        <translation>Cerca File</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Named:</source>
+        <translation>Chiamato:</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Start in:</source>
+        <translation>Comincia da:</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enter the start directory</source>
+        <translation>Inserire la cartella di partenza</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Browse...</source>
+        <translation>Esplora...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Browse for start directory</source>
+        <translation>Seleziona la cartella di partenza</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Search recursively through directories for matching files</source>
+        <translation>Cerca ricorsivamente nella gerarchia di cartelle</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include matching directories in search results</source>
+        <translation>Includi cartelle nei risultati di ricerca</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Name case insensitive</source>
+        <translation>Nessuna distinzione maiuscole/minuscole nel nome</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Set matching name is case insensitive</source>
+        <translation>Nessuna distinzione maiuscole/minuscole per le corrispendenze fra nomi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Contains text:</source>
+        <translation>Contiene il testo:</translation>
+    </message>
+    <message>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Inserire una espressione da ricercare nel nome del file</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Ricerca nelle sottocartelle</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Includi i nomi di cartelle</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Inserisci un&apos;espressione da ricercare nel contenuto del file</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Text to match</source>
+        <translation>Testo da trovare</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Text case insensitive</source>
+        <translation>Testo senza distinzione maisucole/minuscole</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Set text content is case insensitive</source>
+        <translation>Nessuna distinzione maiuscole/minuscole nel contenuto del testo</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Search results</source>
+        <translation>Risultati della ricerca</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>Idle.</source>
+        <translation>Inattivo.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Find</source>
+        <translation>Cerca</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Start search for matching files</source>
+        <translation>Inizia la ricerca</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Stop</source>
+        <translation>Interrompi</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop searching</source>
+        <translation>Interrompi la ricerca</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>File name/location</source>
+        <translation>Nome del file/posizione</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>File contents</source>
+        <translation>Contenuti</translation>
+    </message>
+    <message>
+        <location line="+105"/>
+        <source>Searching...</source>
+        <translation>Ricerca in corso...</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 corrispondenze</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set search directory</source>
+        <translation>Scegli la cartella di ricerca</translation>
+    </message>
+</context>
+<context>
+    <name>find_files_model</name>
+    <message>
+        <location filename="../src/find-files-model.cc" line="+82"/>
+        <source>Filename</source>
+        <translation>Nome del file</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Directory</source>
+        <translation>Cartella</translation>
+    </message>
+</context>
+<context>
+    <name>history_dock_widget</name>
+    <message>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
+        <source>Browse and search the command history.</source>
+        <translation>Naviga nello storico dei comandi.</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Double-click a command to transfer it to the terminal.</source>
+        <translation>Fare doppio click su un comando per trasferirlo nel terminale.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Inserire del testo per filtrare lo storico dei comandi</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtra</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Command History</source>
+        <translation>Storico dei comandi</translation>
+    </message>
+    <message>
+        <location line="+89"/>
+        <source>Copy</source>
+        <translation>Copia</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Evaluate</source>
+        <translation>Valuta</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Create script</source>
+        <translation>Crea script</translation>
+    </message>
+</context>
+<context>
+    <name>initial_page</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="-179"/>
+        <source>Welcome to Octave!</source>
+        <translation>Benvenuto in Octave!</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Next</source>
+        <translation>Successivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;You seem to be using the Octave graphical interface for the first time on this computer.
+Click &apos;Next&apos; to create a configuration file and launch Octave.&lt;/p&gt;
+&lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Sembra che si stia utilizzando l&apos;interfaccia grafica di Octave per la prima volta su questo computer.
+Fare click su &apos;Successivo&apos; per creare un file di configurazione e lanciare Octave.&lt;/p&gt;
+&lt;p&gt;Il file di configurazione verrà salvato in&lt;br&gt;%1.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>main_window</name>
+    <message>
+        <location filename="../src/main-window.cc" line="+268"/>
+        <source>Load Workspace</source>
+        <translation>Carica lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+732"/>
+        <location line="+931"/>
+        <source>About Octave</source>
+        <translation>A proposito di Octave</translation>
+    </message>
+    <message>
+        <location line="-301"/>
+        <source>&amp;File</source>
+        <translation>&amp;File</translation>
+    </message>
+    <message>
+        <location line="+49"/>
+        <source>New</source>
+        <translation>Nuovo</translation>
+    </message>
+    <message>
+        <location line="-43"/>
+        <source>Open...</source>
+        <translation>Apri...</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <source>Preferences...</source>
+        <translation>Preferenze...</translation>
+    </message>
+    <message>
+        <location line="-95"/>
+        <source>Exit</source>
+        <translation>Esci</translation>
+    </message>
+    <message>
+        <location line="+50"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Modifica</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Undo</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Copy</source>
+        <translation>Copia</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Paste</source>
+        <translation>Incolla</translation>
+    </message>
+    <message>
+        <location line="-1469"/>
+        <source>Save Workspace As</source>
+        <translation>Salva lo Spazio di Lavoro Come</translation>
+    </message>
+    <message>
+        <location line="+134"/>
+        <source>The release notes file &apos;%1&apos; is empty.</source>
+        <translation>Il file delle note di rilascio &apos;%1&apos; è vuoto.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>The release notes file &apos;%1&apos; cannot be read.</source>
+        <translation>Il file delle note di rilascio &apos;%1&apos; non può essere letto.</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Octave Release Notes</source>
+        <translation>Note di Rilascio di Octave</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <source>Octave Community News</source>
+        <translation>Notizie dalla Comunità di Octave</translation>
+    </message>
+    <message>
+        <location line="+1041"/>
+        <source>Open an existing file in editor</source>
+        <translation>Apri file esistente nell&apos;editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nuova Funzione...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nuova Figura</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Clear Clipboard</source>
+        <translation>Svuota Appunti</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Find Files...</source>
+        <translation>Trova File...</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Command Window</source>
+        <translation>Svuota la Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Clear Command History</source>
+        <translation>Svuota lo Storico dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Clear Workspace</source>
+        <translation>Svuota lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+49"/>
+        <source>De&amp;bug</source>
+        <translation>De&amp;bug</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Step</source>
+        <translation>Un&apos;istruzione alla volta</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Continue</source>
+        <translation>Continua</translation>
+    </message>
+    <message>
+        <location line="-1027"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Si è sicuri di voler uscire da Octave?</translation>
+    </message>
+    <message>
+        <location line="+1083"/>
+        <source>Show File Browser</source>
+        <translation>Nostra l&apos;Esploratore di Risorse</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>File Browser</source>
+        <translation>Esploratore di Risorse</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <source>Step In</source>
+        <translation>Entra</translation>
+    </message>
+    <message>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
+        <source>Load Workspace...</source>
+        <translation>Apri Spazio di Lavoro...</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Save Workspace As...</source>
+        <translation>Salva Spazio di Lavoro Come...</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Nuovo Script</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Step Out</source>
+        <translation>Esci</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Quit Debug Mode</source>
+        <translation>Esci dalla modalità di Debug</translation>
+    </message>
+    <message>
+        <location line="+81"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Ripristina il Layout della Finestra</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Octave Packages</source>
+        <translation>Octave Packages</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Share Code</source>
+        <translation>Condividi Codice (Agorà)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Contribute to Octave</source>
+        <translation>Contribuisci</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Developer Resources</source>
+        <translation>Risorse per Sviluppatori</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>On Disk</source>
+        <translation>Su Disco</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Online</source>
+        <translation>In Linea</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;News</source>
+        <translation>&amp;Notizie</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Note di Rilascio</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Community News</source>
+        <translation>Notizie dalla Comunità</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Barra degli Strumenti</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Enter directory name</source>
+        <translation>Inserisci nome cartella</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Current Directory: </source>
+        <translation>Cartella Corrente:</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>One directory up</source>
+        <translation>Livello precedente</translation>
+    </message>
+    <message>
+        <location line="-1148"/>
+        <location line="+1151"/>
+        <source>Browse directories</source>
+        <translation>Naviga cartelle</translation>
+    </message>
+    <message>
+        <location line="-137"/>
+        <source>&amp;Window</source>
+        <translation>&amp;Finestra</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command Window</source>
+        <translation>Mostra la Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command History</source>
+        <translation>Mostra lo Storico dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Mostra lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Mostra l&apos;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Mostra la Documentazione</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Command Window</source>
+        <translation>Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command History</source>
+        <translation>Storico dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Workspace</source>
+        <translation>Spazio di lavoro</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+41"/>
+        <source>Documentation</source>
+        <translation>Documentazione</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Aiuto</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Segnala un Problema</translation>
+    </message>
+</context>
+<context>
+    <name>news_reader</name>
+    <message>
+        <location line="-1411"/>
+        <source>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Octave&apos;s community news source seems to be unavailable.
+&lt;/p&gt;
+&lt;p&gt;
+For the latest news, please check
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+when you have a connection to the web (link opens in an external browser).
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Le notizie dalla comunità di Octave non sembrano essere disponibili.
+&lt;/p&gt;
+&lt;p&gt;
+Per le ultime novità, si prega di controllare
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+avendo a disposizione una connesione ad internet (utilizza un browser esterno).
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Gli Sviluppatori di Octave, </translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Connecting to the web to display the latest Octave Community news has been disabled.
+&lt;/p&gt;
+&lt;p&gt;
+For the latest news, please check
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+when you have a connection to the web (link opens in an external browser)
+or enable web connections for news in Octave&apos;s network settings dialog.
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+La connessione ad internet per mostrare le ultime notizie dalla comunità di Octave non è abilitata.
+&lt;/p&gt;
+&lt;p&gt;
+Per le ultime novità, si prega di controllare
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+avendo a disposizione una connesione ad internet (utilizza un browser esterno)
+o di abilitare, nella finestra delle impostazioni di rete di Octave, la connessione ad internet per le notizie.
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Gli Sviluppatori di Octave, </translation>
+    </message>
+</context>
+<context>
+    <name>octave_dock_widget</name>
+    <message>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
+        <source>Undock widget</source>
+        <translation>Rimuovi widget dal lanciatore</translation>
+    </message>
+    <message>
+        <location line="-188"/>
+        <source>Hide widget</source>
+        <translation>Nascondi widget</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <source>Dock widget</source>
+        <translation>Ancora widget al lanciatore</translation>
+    </message>
+</context>
+<context>
+    <name>octave_qscintilla</name>
+    <message>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
+        <source>Help on</source>
+        <translation>Aiuto su</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Documentation on</source>
+        <translation>Documentazione su</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Edit</source>
+        <translation>Modifica</translation>
+    </message>
+</context>
+<context>
+    <name>octave_qt_link</name>
+    <message>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
+        <location line="+6"/>
+        <location line="+7"/>
+        <source>Create</source>
+        <translation>Crea</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <source>File
+%1
+does not exist. Do you want to create it?</source>
+        <translation>Il file
+%1
+non esiste. Si desidera crearlo?</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Editor</source>
+        <translation>Editor di octave</translation>
+    </message>
+    <message>
+        <location line="+211"/>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>Il file %1 non esiste nelle cartelle di esecuzione. Per lanciare o eseguire il debug della funzione in corso di modifica, è necessario passare alla cartella %2 o aggiungere tale cartella alle cartelle di esecuzione.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Il file %1 è nascosto da un file con lo stesso nome presente nelle cartelle di esecuzione. Per lanciare o esguire il debug del file in corso di modifica, passare alla directory %2.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Change Directory or Add Directory to Load Path</source>
+        <translation>Cambia Cartella o Aggiungi Cartella alle Cartelle di Esecuzione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Change Directory</source>
+        <translation>Cambia Cartella</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Add Directory to Load Path</source>
+        <translation>Aggiungi Cartella alle Cartelle di esecuzione</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
+        <source>Cancel</source>
+        <translation>Annulla</translation>
+    </message>
+</context>
+<context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Default</translation>
+    </message>
+</context>
+<context>
+    <name>resource_manager</name>
+    <message>
+        <location filename="../src/resource-manager.cc" line="+245"/>
+        <source>The settings file
+%1
+does not exist and can not be created.
+Make sure you have read and write permissions to
+%2
+
+Octave GUI must be closed now.</source>
+        <translation>Il file di configurazione
+%1
+non esiste e non può essere creato.
+Assicurasi di avere permesso di lettura e scrittura in
+%2
+
+L&apos;inerfaccia grafica verrà chiusa.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Octave Critical Error</source>
+        <translation>Errore Critico di Octave</translation>
+    </message>
+</context>
+<context>
+    <name>settings_dialog</name>
+    <message>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
+        <source>Settings</source>
+        <translation>Impostazioni</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
+        <source>General</source>
+        <translation>Generale</translation>
+    </message>
+    <message>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
+        <source>Octave logo only</source>
+        <translation>Logo di Octave solamente</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Letter icons</source>
+        <translation>Icone testuali</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Graphic icons</source>
+        <translation>Icone grafiche</translation>
+    </message>
+    <message>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Barra del titolo del lanciatore di widget</translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Confirm before exiting</source>
+        <translation>Conferma prima di uscire</translation>
+    </message>
+    <message>
+        <location line="+194"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Custom style</source>
+        <translation>Stile personalizzato</translation>
+    </message>
+    <message>
+        <location line="-91"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Mostra barra di stato</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Testo inattivo</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Attiva</translation>
+    </message>
+    <message>
+        <location line="-152"/>
+        <location filename="../src/ui-settings-dialog.h" line="-10"/>
+        <source>Normal</source>
+        <translation>Normale</translation>
+    </message>
+    <message>
+        <location line="+191"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
+        <source>Background inactive</source>
+        <translation>Sfondo inattivo</translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Queste preferenze vengono applicate dopo tutti i file di avvio .octaverc.</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Ripristina la cartella di lavoro della sessione precedente</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="-54"/>
+        <source>After Column</source>
+        <translation>Numero di colonne</translation>
+    </message>
+    <message>
+        <location line="+104"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Color</source>
+        <translation>Colore</translation>
+    </message>
+    <message>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Questa impostazione è adatta a tipi di caratteri monospaced. La linea è posta in una posizione basata sulla larghezza di uno spazio bianco del tipo di carattere predefinito. Può non funzionare bene se gli stili usano stili di caratteri proporzionali o se diverse dimensioni di carattere, grassetto, corsivo sono utilizzati.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Attiva espansione del codice</translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Mostra barra di scorrimento orizzontale</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Indent width</source>
+        <translation>Ampiezza indentazione</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab indents line</source>
+        <translation>Tasto Tab per l&apos;indentazione</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto indentation</source>
+        <translation>Indentazione automatica</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab width</source>
+        <translation>Ampiezza tabulazione</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show indentation guides</source>
+        <translation>Mostra guide per l&apos;indentazione</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Backspace unindents line</source>
+        <translation>Tasto Backspace per rimuove l&apos;indentazione</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation>Indenta con tabulazioni</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Completamento automatico</translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Match keywords</source>
+        <translation>Abbina parole chiave</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Case sensitive</source>
+        <translation>Distinzione maiuscole/minuscole</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Sostituisci una parola con quella suggerita</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Match words in document</source>
+        <translation>Abbina parole nel documento</translation>
+    </message>
+    <message>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>Ripristina le schede dell&apos;editor dalla sessione precedente all&apos;avvio</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>Use custom file editor</source>
+        <translation>Utilizza editor personalizzato</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>Stili dell&apos;Editor</translation>
+    </message>
+    <message>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Terminal Colors</source>
+        <translation>Colori del Terminale</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>Stile di carattere</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>Mostra numero di riga</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Evidenzia la riga corrente</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Mostra il percorso completo nel titolo della finestra</translation>
+    </message>
+    <message>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show whitespace</source>
+        <translation>Mostra spazi</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Non mostrare gli spazi utilizzati per l&apos;indentazione</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Draw a long line marker</source>
+        <translation>Disegna un marcatore di linea lunga</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Mostra terminatori di riga</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Modalità di default per i teminatori di riga</translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Numero di caratteri prima che la lista sia mostrata: </translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Crea file inesistenti senza chiedere conferma</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>linea di comando (%f=file, %l=riga):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Terminale</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Tipo di cursore:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Lampeggiamento del cursore</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Usa colore di primo piano</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Dimensione carattere</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Rendi il terminale la finestra attiva quando un comando è eseguito da uno widget</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Gestore dei file</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Mostra dimensione del file</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Mostra tipo del file</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Mostra la data di ultima modifica</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Mostra i file nascosti</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interfaccia</translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Small</source>
+        <translation>Piccolo</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Grande</translation>
+    </message>
+    <message>
+        <location line="+200"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Avvio di Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Percorso di avvio</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Naviga</translation>
+    </message>
+    <message>
+        <location line="-1178"/>
+        <location filename="../src/ui-settings-dialog.h" line="-72"/>
+        <source>Tab width min.</source>
+        <translation>Ampiezza tabulazione min.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>max.</translation>
+    </message>
+    <message>
+        <location line="+221"/>
+        <location filename="../src/ui-settings-dialog.h" line="+19"/>
+        <source>Indentation</source>
+        <translation>Indentazione</translation>
+    </message>
+    <message>
+        <location line="+256"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>With Octave builtins</source>
+        <translation>Con built-in di Octave</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Con funzioni di Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Mostra lista di completamento automaticamente</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Gestione file</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Ricarica file modificati esternamente senza chiedere</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Seleziona tipo di carattere, dimension carattere (come differenza dispetto al carattere di default), stile di carattere (&lt;b&gt;g&lt;/b&gt;rassetto, &lt;b&gt;c&lt;/b&gt;orsivo, &lt;b&gt;s&lt;/b&gt;ottolineato), colore del testo, a colore dello sfondo (per quest&apos;ultimo, il colore magenta (255,0,255) indica il colore di default per lo sfondo).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Il cambio della dimensione della lista svuota lo storico comandi)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Dimensione storico comandi</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Stampa la posizione di debug nella finestra del terminale oltre al marcatore nell&apos;editor</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
+        <translation>Mostra</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Colori alternati per le righe</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Comportamento</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Ripristina l&apos;ultima cartella della sessione precedente</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Spazio di lavoro</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Nascondi suggerimenti</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Modifica una scorciatoia facendo doppio click in una cella</translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Rete</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
+        <source>Allow Octave to connect to the Octave web site to display current news and information</source>
+        <translation>Pemetti ad Octave di connettersi al sito web di Octave per mostrare notizie ed informazioni aggiornate</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
+        <source>Use proxy server</source>
+        <translation>Usa server proxy</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>HttpProxy</source>
+        <translation>HttpProxy</translation>
+    </message>
+    <message>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
+        <source>Icon set for dock widgets</source>
+        <translation>Icone per il lanciatore degli widget</translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Lingua (richiede riavvio)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Dimensione icona</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Sincronizza la cartella di lavoro di Octave con il gestore dei file</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Colori per attributi variabili </translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Scorciatoie</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Seleziona questa opzione per evitrare conflitti con le scorciatoie readline</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Disabilita le scorciatoie globali quando il terminale è selezionato</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Utilizza questo insieme</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Insieme 1:</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Esporta</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importa</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Insieme 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Azione</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Insieme 1 predefinito</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Ineieme 1 attuale</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Insieme 2 predefinito</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Insieme 2 attuale</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Socks5Proxy</source>
+        <translation>Socks5Proxy</translation>
+    </message>
+    <message>
+        <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Hostname:</source>
+        <translation>Nome host:</translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
+        <source>Proxy type:</source>
+        <translation>Tipo di proxy:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Port:</source>
+        <translation>Porta:</translation>
+    </message>
+    <message>
+        <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Username:</source>
+        <translation>Nome utente:</translation>
+    </message>
+    <message>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Password:</source>
+        <translation>Password:</translation>
+    </message>
+    <message>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
+        <location line="+4"/>
+        <location line="+561"/>
+        <source>System setting</source>
+        <translation>Parametri di sistema</translation>
+    </message>
+    <message>
+        <location line="-355"/>
+        <source>IBeam Cursor</source>
+        <translation>Cursore IBeam</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Block Cursor</source>
+        <translation>Cursore blocco</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Underline Cursor</source>
+        <translation>Cursore testo sottolineato</translation>
+    </message>
+    <message>
+        <location line="+213"/>
+        <source>Difference to the default size</source>
+        <translation>Differenza rispetto alla dimensione di default</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Background color, pink (255,0,255) means default</source>
+        <translation>Colore dello sfondo; rosa (255,0,255) indica default</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>b</source>
+        <comment>short form for bold</comment>
+        <translation>g</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>i</source>
+        <comment>short form for italic</comment>
+        <translation>c</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>u</source>
+        <comment>short form for underlined</comment>
+        <translation>s</translation>
+    </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Scegli la Cartella di Avvio di Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Scegli la Cartella di Avvio del Gestore di File</translation>
+    </message>
+</context>
+<context>
+    <name>setup_community_news</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+44"/>
+        <source>Community News</source>
+        <translation>Notizie dalla Comunità</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Previous</source>
+        <translation>Precedente</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Next</source>
+        <translation>Successivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Chiudi</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.
+The check will happen at most once each day and news will only be displayed if there is something new since the last time you viewed the news.&lt;/p&gt;
+&lt;p&gt;You may also view the news by selecting the &quot;Community News&quot; item in the &quot;Help&quot; menu in the GUI, or by visiting
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Ad ogni avvio dell&apos;interfaccia grafica, l&apos;applicazione controllerà il sito web di Octave per ottenere notizie ed informazioni recenti dalla comunità. Tale controllo averrà non più di una volta al giorno e la finestra delle notizie verrà aperta soltanto nel caso in cui ci sia qualcosa di nuovo rispetto all&apos;ultima consultazione&lt;/p&gt;
+&lt;p&gt;Le notizie possono essere raggiunte anche selezionando &quot;Notizie dalla Comunità&quot; nel menu &quot;Aiuto&quot; dell&apos;interfaccia grafica, o visitando
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <source>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Permetti all&apos;applicazione di connettersi all&apos;avvio al sito web di Octave per mostrare notizie ed informazione recenti dalla comunità.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Nuovo File</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nuova Funzione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nuova Figura</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Apri File</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Carica lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Salva lo Spazio di Lavoro Come</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Preferenze</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Esci da Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Copia</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Incolla</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Annulla</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Seleziona Tutto</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Svuota Appunti</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Cerca nei file</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Svuota la Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Svuota lo Storico dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Svuota lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Livello Successivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Livello Precedente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Continua</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Esci dalla modalità di Debug</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Mostra la Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Mostra lo Storico dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Nostra l&apos;Esploratore di Risorse</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Mostra lo Spazio di Lavoro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Mostra l&apos;Editor</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Mostra la Documentazione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Finestra dei Comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Storico dei comandi</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Gestore dei File</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Spazio di lavoro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentazione</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Mostra la Documentazione su Disco</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Mostra la Documentazione in Linea</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Octave Packages</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Condividi Codice</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Contribuisci</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Risorse per Sviluppatori</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>A proposito di Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Note di Rilascio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Notizie dalla Comunità</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Modifica Funzione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Salva File</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Salva File Come</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Chiudi</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Chiudi Tutto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Stampa</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Ripeti</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Taglia</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Trova e Sostituisci</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Cancella fino a inizio parola</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Cancella fino a fine parola</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Cancella fino a inizio riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Cancella fino a fine riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Cancella riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copia riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Taglia riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplica selezione/riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Trasponi riga</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Commenta selezione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Decommenta selezione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Rendi la selezione in maisucolo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Rendi la selezione in minuscolo</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Indenta selezione</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Deindenta selezione</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Vai alla riga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Vai alla Parentesi Corrispondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Seleziona fino alla Parentesi Corrispondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Attiva/disattiva Segnalibro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Segnalibro Successivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Segnalibro Precedente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Elimina Tutti i Segnalibri</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Preferenze di stile</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Mostra numeri di riga</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation>Un&apos;istruzione alla volta</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Ripristina il Layout della Finestra</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Segnala un Problema</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Chiudi gli Altri File</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Mostra Lista di Completamenti</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Converti Fine Riga a Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Converti Fine Riga a Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Converti Fine Riga a Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Mostra Spazio Bianco</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Mostra terminatori di riga</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Mostra guide per l&apos;indentazione</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Mostra marcatori linea lunga</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Ingrandisci</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Riduci</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Dimensione normale</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Attiva/disattiva Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Breakpoint Successivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Breakpoint Precedente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Rimuovi Tutti i Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Esegui File</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Esegui Selezione</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Aiuto su Parola Chiave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Documentazione sulla Parola Chiave</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Principale</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>File</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Modifica</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Debug</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Finestra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Aiuto</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Novità</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Vista</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Esegui</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Inserisci nuova Scorciatoia per l&apos;Insieme %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Applica la scorciatoia desiderata o clicca con il tasto destro del mouse per ripristinare la scorciatoia predefinita.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Inserici una scorciatoia eseguendola direttamente</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Scorciatoia attuale</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Scorciatoia predefinita</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Imposta al valore predefinito</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Doppia Scorciatoia</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>La scorciatoia
+&quot;%1&quot;
+è già utilizzata per un l&apos;azione
+&quot;%2&quot;
+Si desidera utilizzare comunque la scorciatoia rimuovendola dall&apos;azione cui era precedentemente associata?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Importa l&apos;insieme di  scorciatoie %1 dal file...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>File Scorciatoia di Octave (*.osc);;Tutti i File (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Esporta l&apos;insieme di  scorciatoie %1 nel file...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Impossibile aprire il file %1 come file di scorciatoie di Octave</translation>
+    </message>
+</context>
+<context>
+    <name>terminal_dock_widget</name>
+    <message>
+        <location filename="../src/terminal-dock-widget.cc" line="+38"/>
+        <source>Command Window</source>
+        <translation>Finestra dei Comandi</translation>
+    </message>
+</context>
+<context>
+    <name>webinfo</name>
+    <message>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
+        <source>Type here and press &apos;Return&apos; to search</source>
+        <translation>Scrivi qui e premi &apos;Invio&apos; per cercare</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Global search</source>
+        <translation>Ricerca globale</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Errore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>Né file di informazione %1 né una sua versione compressa esistono</translation>
+    </message>
+</context>
+<context>
+    <name>welcome_wizard</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+135"/>
+        <source>Welcome to GNU Octave</source>
+        <translation>Benvenuto in GNU Octave</translation>
+    </message>
+</context>
+<context>
+    <name>workspace_model</name>
+    <message>
+        <location filename="../src/workspace-model.cc" line="-42"/>
+        <source>Name</source>
+        <translation>Nome</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Class</source>
+        <translation>Classe</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Dimension</source>
+        <translation>Dimensione</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Value</source>
+        <translation>Valore</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Attribute</source>
+        <translation>Attributo</translation>
+    </message>
+    <message>
+        <location line="+109"/>
+        <source>Right click to copy, rename, or display</source>
+        <translation>Cliccare con il tasto destro del mouse per copiare, rinominare o mostrare</translation>
+    </message>
+    <message>
+        <location line="+37"/>
+        <location line="+2"/>
+        <source>complex</source>
+        <translation>complesso</translation>
+    </message>
+</context>
+<context>
+    <name>workspace_view</name>
+    <message>
+        <location filename="../src/workspace-view.cc" line="+50"/>
+        <source>Workspace</source>
+        <translation>Spazio di lavoro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>View the variables in the active workspace.</source>
+        <translation>Mostra le variabili nello spazio di lavoro attivo.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Inserire del testo per filtrare l&apos;area di lavoro</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtra</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Copia nome</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Copia valore</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Rename</source>
+        <translation>Rinomina</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Only top-level symbols may be renamed.</source>
+        <translation>Solamente i simboli di primo livello possono essere rinominati.</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <source>View the variables in the active workspace.&lt;br&gt;</source>
+        <translation>Mostra le variabili nello spazio di lavoro attivo.&lt;br&gt;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Colors for variable attributes:</source>
+        <translation>Colori per gli attributi variabili:</translation>
+    </message>
+</context>
+</TS>
new file mode 100644
--- /dev/null
+++ b/libgui/languages/ja_JP.ts
@@ -0,0 +1,4186 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja_JP">
+<context>
+    <name>ListDialog</name>
+    <message>
+        <location filename="../src/dialog.cc" line="+251"/>
+        <source>Select All</source>
+        <translation>全て選択</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="../src/workspace-model.cc" line="+75"/>
+        <source>automatic</source>
+        <translation>自動</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>function</source>
+        <translation>関数</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>global</source>
+        <translation>グローバル</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>hidden</source>
+        <translation>隠す</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>inherited</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>persistent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../qterminal/libqterminal/QTerminal.cc" line="+65"/>
+        <source>foreground</source>
+        <translation>前面</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>background</source>
+        <translation>背景</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>selection</source>
+        <translation>選択</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>cursor</source>
+        <translation>カーソル</translation>
+    </message>
+</context>
+<context>
+    <name>QTerminal</name>
+    <message>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
+        <source>Copy</source>
+        <translation>コピー</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Paste</source>
+        <translation>貼り付け</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>全てを選択</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>ウィンドウをクリア</translation>
+    </message>
+</context>
+<context>
+    <name>QWinTerminalImpl</name>
+    <message>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
+        <source>copied selection to clipboard</source>
+        <translation>選択範囲をクリップボードに複製</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerBash</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbash.cpp" line="+208"/>
+        <source>Default</source>
+        <translation>既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation>エラー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>コメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>数</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>キーワード</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>ダブルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished">シングルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>演算子</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation type="unfinished">スカラー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Parameter expansion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation>ヒアドキュメントのデリミタ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation>シングルクォートで囲まれたヒアドキュメント</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerBatch</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbatch.cpp" line="+179"/>
+        <source>Default</source>
+        <translation>既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>コメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>キーワード</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Label</source>
+        <translation>ラベル</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hide command character</source>
+        <translation>コマンド文字を隠す</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>External command</source>
+        <translation>外部コマンド</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Variable</source>
+        <translation>変数</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>演算子</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerCPP</name>
+    <message>
+        <location filename="../../../qsci/qscilexercpp.cpp" line="+352"/>
+        <source>Default</source>
+        <translation>既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished">数</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>キーワード</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>ダブルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>シングルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>IDL UUID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive IDL UUID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Pre-processor block</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive pre-processor block</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>演算子</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Unclosed string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive unclosed string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C# verbatim string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C# verbatim string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaScript regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaScript regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C++ comment</source>
+        <translation type="unfinished">JavaDoc</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Secondary keywords and identifiers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive secondary keywords and identifiers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Global classes and typedefs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive global classes and typedefs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ raw string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ raw string</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerDiff</name>
+    <message>
+        <location filename="../../../qsci/qscilexerdiff.cpp" line="+107"/>
+        <source>Default</source>
+        <translation type="unfinished">既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>コメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation>コマンド</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Header</source>
+        <translation>ヘッダ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Position</source>
+        <translation>位置</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Removed line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Added line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Changed line</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerMatlab</name>
+    <message>
+        <location filename="../../../qsci/qscilexermatlab.cpp" line="+138"/>
+        <source>Default</source>
+        <translation>既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation>コメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation>コマンド</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation>数</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation>キーワード</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation>シングルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation>演算子</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation>ダブルクォートで囲まれた文字列</translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerPerl</name>
+    <message>
+        <location filename="../../../qsci/qscilexerperl.cpp" line="+333"/>
+        <source>Default</source>
+        <translation type="unfinished">既定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation type="unfinished">エラー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished">コメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished">数</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished">キーワード</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation type="unfinished">ダブルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished">シングルクォートで囲まれた文字列</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished">演算子</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation type="unfinished">スカラー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Array</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hash</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Symbol table</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Data section</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation type="unfinished">ヒアドキュメントのデリミタ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation type="unfinished">シングルクォートで囲まれたヒアドキュメント</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (q)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qw)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD verbatim</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Subroutine prototype</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format body</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Translation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciScintilla</name>
+    <message>
+        <location filename="../../../qsci/qsciscintilla.cpp" line="+4201"/>
+        <source>&amp;Undo</source>
+        <translation>元に戻す (&amp;U) </translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>&amp;Redo</source>
+        <translation>やり直す (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Cu&amp;t</source>
+        <translation>切り取り (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Copy</source>
+        <translation>コピー (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Paste</source>
+        <translation>貼り付け (&amp;P)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Delete</source>
+        <translation>削除</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Select All</source>
+        <translation>全てを選択</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>ファイル (&amp;F)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>保存 (&amp;S)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>別名で保存 (&amp;A)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>編集 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>コピー (&amp;y)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>切り取り (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>貼り付け  (&amp;P)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>ヘルプ (&amp;H)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>図を別名で保存</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>回転</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>ズームイン</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>ズームアウト</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>テキストの挿入</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>選択</translation>
+    </message>
+</context>
+<context>
+    <name>documentation_dock_widget</name>
+    <message>
+        <location filename="../src/documentation-dock-widget.cc" line="+34"/>
+        <source>Documentation</source>
+        <translation>ドキュメント</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>See the documentation for help.</source>
+        <translation>ドキュメントを見る</translation>
+    </message>
+</context>
+<context>
+    <name>file_editor</name>
+    <message>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
+        <location line="+28"/>
+        <source>Octave Editor</source>
+        <translation>Octave エディタ</translation>
+    </message>
+    <message>
+        <location line="-318"/>
+        <source>Octave Files (*.m);;All Files (*)</source>
+        <translation>Octave ファイル;;全てのファイル (*)</translation>
+    </message>
+    <message>
+        <location line="-40"/>
+        <source>New Function</source>
+        <translation>新しい関数</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New function name:
+</source>
+        <translation>新しい関数の名前:
+</translation>
+    </message>
+    <message>
+        <location line="+330"/>
+        <source>File not saved! A file with the selected name
+%1
+is already open in the editor</source>
+        <translation>ファイルは保存されていません!
+%1
+同名のファイルがあります</translation>
+    </message>
+    <message>
+        <location line="+387"/>
+        <source>&amp;%1 %2</source>
+        <translation>&amp;%1 %2</translation>
+    </message>
+    <message>
+        <location line="+388"/>
+        <source>&amp;Save File</source>
+        <translation>ファイルの保存 (&amp;S)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File &amp;As...</source>
+        <translation>ファイルを別名で保存 (&amp;A)...</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Print...</source>
+        <translation type="unfinished">陰圧...</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;Undo</source>
+        <translation>元に戻す (&amp;U) </translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Redo</source>
+        <translation>やり直す (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Copy</source>
+        <translation>コピー (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>切り取り (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>貼り付け</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>次のブックマーク (&amp;N)</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>一つ前のブックマーク (&amp;V)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>ブックマークをトグル (&amp;B)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Remove All Bookmarks</source>
+        <translation>全てのブックマークを取り除く (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <source>&amp;Next Breakpoint</source>
+        <translation>次のブレークポイント (&amp;N)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Pre&amp;vious Breakpoint</source>
+        <translation>一つ前のブレークポイント (&amp;V)</translation>
+    </message>
+    <message>
+        <location line="-6"/>
+        <source>Toggle &amp;Breakpoint</source>
+        <translation>ブレークポイントをトグル (&amp;B)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>&amp;Remove All Breakpoints</source>
+        <translation>全てのブレークポイントを解除 (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="-104"/>
+        <source>&amp;Comment</source>
+        <translation>コメント (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Uncomment</source>
+        <translation>コメントを取り消す (&amp;U)</translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>検索と置換 (&amp;F) ...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>ファイルを保存して実行</translation>
+    </message>
+    <message>
+        <location line="-90"/>
+        <source>Go &amp;to Line...</source>
+        <translation>指定行 (&amp;T) ...</translation>
+    </message>
+    <message>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>カスタムエディタからスタートできません
+%1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>キャンセル</translation>
+    </message>
+    <message>
+        <location line="+844"/>
+        <source>&amp;Recent Editor Files</source>
+        <translation>最近開いたファイル (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>&amp;Edit Function</source>
+        <translation>関数の編集 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Close</source>
+        <translation>閉じる (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close All</source>
+        <translation>全て閉じる</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close Other Files</source>
+        <translation>他のファイルを閉じる</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Select All</source>
+        <translation>全選択</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>コマンド (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>行削除</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>行をコピー</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>行を切り取り</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>フォーマット (&amp;)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Indent</source>
+        <translation>インデント (&amp;I)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>アンインデント (&amp;U)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>行末文字を Windows 仕様にする (CRLF) (&amp;W)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>行末文字を Unix 仕様にする (LF) (&amp;U)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>行末文字を Mac 仕様にする (CR) (&amp;U)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>ナビゲーション (&amp;g)</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>対応する括弧に移動</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>対応する括弧を選択</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>&amp;Preferences...</source>
+        <translation>設定 (&amp;P) ...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>スタイルの設定 (&amp;S) ...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>&amp;View</source>
+        <translation>表示 (&amp;V)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>エディタ (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>行番号の表示 (&amp;L)</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished">エディタ</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>行末の表示 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>ズームイン (&amp;I)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>ズームアウト (&amp;O)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>通常サイズ (&amp;N)</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <source>Run &amp;Selection</source>
+        <translation>選択部を実行 (&amp;S)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>ヘルプ (&amp;H)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Documentation on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1103"/>
+        <source>Could not open file
+%1
+for read: %2.</source>
+        <translation>読み込みのためにファイル
+%1
+を開けません: %2.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>File
+%1
+does not exist. Do you want to create it?</source>
+        <translation>ファイル
+%1
+が存在しません.作成しますか?</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Could not open file
+%1
+for write: %2.</source>
+        <translation>書き込みためにファイル
+%1
+が開けません: %2.</translation>
+    </message>
+    <message>
+        <location line="+90"/>
+        <source>The associated file editor tab has disappeared.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+731"/>
+        <source>&amp;File</source>
+        <translation>ファイル (&amp;F)</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>&amp;Edit</source>
+        <translation>編集 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>ホワイトスペースを表示 (&amp;W)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <source>&amp;Debug</source>
+        <translation>デバッグ (&amp;D)</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>&amp;Run</source>
+        <translation>実行 (&amp;R)</translation>
+    </message>
+</context>
+<context>
+    <name>file_editor_tab</name>
+    <message>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+775"/>
+        <source>Goto line</source>
+        <translation>指定行へ行く</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Line number</source>
+        <translation>行数</translation>
+    </message>
+    <message>
+        <location line="+146"/>
+        <location line="+63"/>
+        <source>&lt;unnamed&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>octave のファイル (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>全てのファイル (*)</translation>
+    </message>
+    <message>
+        <location line="+78"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-400"/>
+        <source>Do you want to cancel closing, save or discard the changes?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
+        <source>Octave Editor</source>
+        <translation>Octave 编辑器</translation>
+    </message>
+    <message>
+        <location line="-6"/>
+        <source>
+
+Warning: The contents in the editor is modified!</source>
+        <translation>
+
+警告: エディタ内の内容は変更されています</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>It seems that the file
+%1
+has been deleted or renamed. Do you want to save it now?%2</source>
+        <translation>ファイル
+%1
+削除されたか名前が変更されています。ファイルを今保存しますか?%2</translation>
+    </message>
+    <message>
+        <location line="-285"/>
+        <source>Could not open file %1 for write:
+%2.</source>
+        <translation>ファイル %1 を書き込み用として開けません:
+%2.</translation>
+    </message>
+    <message>
+        <location line="+262"/>
+        <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
+        <translation>&apos;%1&apos; は他のアプリケーションで変更されたいます.再読込しますか?</translation>
+    </message>
+</context>
+<context>
+    <name>files_dock_widget</name>
+    <message>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
+        <source>File Browser</source>
+        <translation>ファイルブラウザ</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Browse your files.</source>
+        <translation>ファイルをブラウズ</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Enter the path or filename</source>
+        <translation>パスまたはファイル名の入力</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Actions on current directory</source>
+        <translation>現在のディレクトリで実行</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
+        <source>Find Files...</source>
+        <translation>ファイルの検索...</translation>
+    </message>
+    <message>
+        <location line="+364"/>
+        <source>New Directory</source>
+        <translation>新しいディレクトリ</translation>
+    </message>
+    <message>
+        <location line="-784"/>
+        <source>Show Octave directory</source>
+        <translation>octave ディレクトリの表示</translation>
+    </message>
+    <message>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Go to current Octave directory</source>
+        <translation>現在の Octave ディレクトリへ行く</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Set Octave directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Show Home Directory</source>
+        <translation>ホームディレクトリの表示</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location line="+397"/>
+        <source>New File...</source>
+        <translation>新規のファイル...</translation>
+    </message>
+    <message>
+        <location line="-394"/>
+        <location line="+397"/>
+        <source>New Directory...</source>
+        <translation>新規のディレクトリ...</translation>
+    </message>
+    <message>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+236"/>
+        <source>File size</source>
+        <translation>ファイルのサイズ</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>File type</source>
+        <translation>ファイルのタイプ</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Date modified</source>
+        <translation>修正日付</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Show hidden</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+35"/>
+        <source>Open</source>
+        <translation>開く</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Open in Default Application</source>
+        <translation>既定のアプリケーションで開く</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy Selection to Clipboard</source>
+        <translation>選択部をクリップボードにコピー</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Run</source>
+        <translation>実行</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Load Data</source>
+        <translation>データのロード</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set Current Directory</source>
+        <translation>現在のディレクトリの設定</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>名前の変更 ...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>削除 ...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
+        <source>Rename file/directory</source>
+        <translation>ファイル名/ディレクトリ名を変更</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rename file/directory:
+</source>
+        <translation>ファイル名/ディレクトリ名を変更:
+</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>
+ to: </source>
+        <translation>
+到: </translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <location line="+14"/>
+        <source>Delete file/directory</source>
+        <translation>ファイル/ディレクトリの削除</translation>
+    </message>
+    <message>
+        <location line="-13"/>
+        <source>Are you sure you want to delete
+</source>
+        <translation>本当に削除しますか
+</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Can not delete a directory that is not empty</source>
+        <translation>空のディレクトリでないので削除できません</translation>
+    </message>
+    <message>
+        <location line="+151"/>
+        <source>Set directory of file browser</source>
+        <translation>ディレクトリをファイルブラウザで設定</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>Create File</source>
+        <translation>ファイルを開く</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Create file in
+</source>
+        <comment>String ends with \n!</comment>
+        <translation type="unfinished">
+</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Create Directory</source>
+        <translation>ディレクトリの作成</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Create folder in
+</source>
+        <comment>String ends with \n!</comment>
+        <translation type="unfinished">
+</translation>
+    </message>
+</context>
+<context>
+    <name>final_page</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
+        <source>Enjoy!</source>
+        <translation>エンジョイ!</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Previous</source>
+        <translation type="unfinished">上一个</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finish</source>
+        <translation>終了</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>取消</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
+You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;For more information about Octave:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;Visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (opens in external browser)&lt;/li&gt;
+&lt;li&gt;Get the documentation online as &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- or &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt;-document (opens in external browser)&lt;/li&gt;
+&lt;li&gt;Open the documentation browser of the Octave GUI with the help menu&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Octave についてさらなる情報を得るには: &lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;次を参照 &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (外部ブラウザでアクセスする.)&lt;/li&gt;
+&lt;li&gt;オンラインドキュメントは次を参照 &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- 或 &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt; PDF 形式 &lt;/span&gt;&lt;/a&gt;-ドキュメント (外部ブラウザでアクセスする.)&lt;/li&gt;
+&lt;li&gt;Octave GUI のヘルプブラウザを開く.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>find_dialog</name>
+    <message>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished">検索と置換</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find &amp;what:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Re&amp;place with:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Match &amp;case</source>
+        <translation>匹配大小写 (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search from &amp;start</source>
+        <translation>始めから検索 (&amp;S)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Wrap while searching</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Find Next</source>
+        <translation>次を検索 (&amp;F)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find &amp;Previous</source>
+        <translation>一つ前の検索 (&amp;P)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>&amp;Replace</source>
+        <translation>置換 (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Replace &amp;All</source>
+        <translation>全てを置換 (&amp;A)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;More...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>&amp;Whole words</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Regular E&amp;xpressions</source>
+        <translation>正規表現 (&amp;X)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search &amp;backward</source>
+        <translation>逆方向へ検索 (&amp;B)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Search se&amp;lection</source>
+        <translation>選択部を検索 (&amp;L)</translation>
+    </message>
+    <message>
+        <location line="+84"/>
+        <source>Search from end</source>
+        <translation>ファイルの終わりから検索</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Search from start</source>
+        <translation>始めから検索</translation>
+    </message>
+    <message>
+        <location line="+205"/>
+        <source>Replace Result</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>%1 items replaced</source>
+        <translation>%1 が置換されました</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Find Result</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No more matches found</source>
+        <translation>これ以上マッチする対象はありません</translation>
+    </message>
+</context>
+<context>
+    <name>find_files_dialog</name>
+    <message>
+        <location filename="../src/find-files-dialog.cc" line="+52"/>
+        <source>Find Files</source>
+        <translation>複数のファイルで検索</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Named:</source>
+        <translation>名称: </translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Start in:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enter the start directory</source>
+        <translation>当初ディレクトリへ設定</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Browse...</source>
+        <translation>ブラウズ ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Browse for start directory</source>
+        <translation>当初ディレクトリをブラウズ录浏览</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Search recursively through directories for matching files</source>
+        <translation>マッチするファイルを再帰的に検索</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include matching directories in search results</source>
+        <translation>検索結果にマッチしてディレクトリを含ませる</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Name case insensitive</source>
+        <translation>検索名で大文字小文字の区別する</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Set matching name is case insensitive</source>
+        <translation>検索名で大文字小文字の区別しない</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Contains text:</source>
+        <translation type="unfinished">包含文字: </translation>
+    </message>
+    <message>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Text to match</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Text case insensitive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Set text content is case insensitive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Search results</source>
+        <translation>検索結果</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>Idle.</source>
+        <translation>空闲。</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Find</source>
+        <translation>検索</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Start search for matching files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Stop</source>
+        <translation>停止</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop searching</source>
+        <translation>検索の停止</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>File name/location</source>
+        <translation>ファイル名/位置</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>File contents</source>
+        <translation>ファイルの内容</translation>
+    </message>
+    <message>
+        <location line="+105"/>
+        <source>Searching...</source>
+        <translation>検索中 ...</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set search directory</source>
+        <translation>検索ディレクトリを設定</translation>
+    </message>
+</context>
+<context>
+    <name>find_files_model</name>
+    <message>
+        <location filename="../src/find-files-model.cc" line="+82"/>
+        <source>Filename</source>
+        <translation>ファイル名</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Directory</source>
+        <translation>ディレクトリ</translation>
+    </message>
+</context>
+<context>
+    <name>history_dock_widget</name>
+    <message>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
+        <source>Browse and search the command history.</source>
+        <translation>コマンドヒストリのブラウザと検索</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Double-click a command to transfer it to the terminal.</source>
+        <translation>ダブルクリックでコマンドを端末に送信</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished">フィルタ</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Command History</source>
+        <translation>コマンドヒストリ</translation>
+    </message>
+    <message>
+        <location line="+89"/>
+        <source>Copy</source>
+        <translation>コピー</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Evaluate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Create script</source>
+        <translation>スクリプトの作成</translation>
+    </message>
+</context>
+<context>
+    <name>initial_page</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="-179"/>
+        <source>Welcome to Octave!</source>
+        <translation>Octaveへようこそ!</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Next</source>
+        <translation>次</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>キャンセル</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;You seem to be using the Octave graphical interface for the first time on this computer.
+Click &apos;Next&apos; to create a configuration file and launch Octave.&lt;/p&gt;
+&lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt; このコンピュータでの Octave のグラフィカルインターフェースへの初めてのアクセスのようです
+&apos;次へ&apos; をクリックして,設定ファイルを作成し,Octave を起動してください.&lt;/p&gt;
+&lt;p&gt;設定ファイルは以下に置かれます&lt;br&gt;%1.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>main_window</name>
+    <message>
+        <location filename="../src/main-window.cc" line="+268"/>
+        <source>Load Workspace</source>
+        <translation>ワークスペースのロード</translation>
+    </message>
+    <message>
+        <location line="+732"/>
+        <location line="+931"/>
+        <source>About Octave</source>
+        <translation>Octave について</translation>
+    </message>
+    <message>
+        <location line="-301"/>
+        <source>&amp;File</source>
+        <translation>ファイル (&amp;F)</translation>
+    </message>
+    <message>
+        <location line="+49"/>
+        <source>New</source>
+        <translation>新規</translation>
+    </message>
+    <message>
+        <location line="-43"/>
+        <source>Open...</source>
+        <translation>開く...</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <source>Preferences...</source>
+        <translation>設定 ...</translation>
+    </message>
+    <message>
+        <location line="-95"/>
+        <source>Exit</source>
+        <translation>終了</translation>
+    </message>
+    <message>
+        <location line="+50"/>
+        <source>&amp;Edit</source>
+        <translation>編集(&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Undo</source>
+        <translation>やり直し</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Copy</source>
+        <translation>コピー</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Paste</source>
+        <translation>貼り付け</translation>
+    </message>
+    <message>
+        <location line="-1469"/>
+        <source>Save Workspace As</source>
+        <translation>ワークスペースを別名で保存</translation>
+    </message>
+    <message>
+        <location line="+134"/>
+        <source>The release notes file &apos;%1&apos; is empty.</source>
+        <translation>リリースノートファイル &apos;%1&apos; が空です.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>The release notes file &apos;%1&apos; cannot be read.</source>
+        <translation>リリースノートファイル &apos;%1&apos; が読み取れません.</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Octave Release Notes</source>
+        <translation>Octave リリースノート</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <source>Octave Community News</source>
+        <translation>Octave コミュニティーニュース</translation>
+    </message>
+    <message>
+        <location line="+1132"/>
+        <source>Clear Clipboard</source>
+        <translation>クリップボードをクリア</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Find Files...</source>
+        <translation>複数ファイルでの検索 ...</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Command Window</source>
+        <translation>コマンドウィンドウのクリア</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Clear Command History</source>
+        <translation>コマンドヒストリのクリア</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Clear Workspace</source>
+        <translation>ワークスペースのクリア</translation>
+    </message>
+    <message>
+        <location line="+49"/>
+        <source>De&amp;bug</source>
+        <translation>デバッグ (&amp;B)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Step</source>
+        <translation>ステップ</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Continue</source>
+        <translation>継続</translation>
+    </message>
+    <message>
+        <location line="+56"/>
+        <source>Show File Browser</source>
+        <translation>ファイルブラウザを開く</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>File Browser</source>
+        <translation>ファイルブラウザ</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <source>Step In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-152"/>
+        <source>Load Workspace...</source>
+        <translation>ワークスペースのロード...</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Save Workspace As...</source>
+        <translation>ワークスペースを別名で保存...</translation>
+    </message>
+    <message>
+        <location line="+153"/>
+        <source>Step Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+94"/>
+        <source>Reset Default Window Layout</source>
+        <translation>既定のウィンドウのレイアウト</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Octave Packages</source>
+        <translation>Octave パッケージ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Share Code</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Contribute to Octave</source>
+        <translation>Octave への貢献</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Developer Resources</source>
+        <translation type="unfinished">Octave 開発チーム</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>On Disk</source>
+        <translation>ディスク上</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Online</source>
+        <translation>オンライン</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;News</source>
+        <translation>ニュース (&amp;N)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>リリースノート</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Community News</source>
+        <translation>コミュニティーニュース</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Enter directory name</source>
+        <translation>ディレクトリ名を入力</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Current Directory: </source>
+        <translation>現在のディレクトリ: </translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>One directory up</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1148"/>
+        <location line="+1151"/>
+        <source>Browse directories</source>
+        <translation>ディレクトリのブラウズ</translation>
+    </message>
+    <message>
+        <location line="-1212"/>
+        <source>Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>本当に Octave を終了しますか?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>エディタに存在するファイルを開く</translation>
+    </message>
+    <message>
+        <location line="+45"/>
+        <source>New Script</source>
+        <translation>新規のスクリプト</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>New Function...</source>
+        <translation>新規の関数 ...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>新規の図</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>全てを選択</translation>
+    </message>
+    <message>
+        <location line="+94"/>
+        <source>Quit Debug Mode</source>
+        <translation>デバッグモードを終了</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>&amp;Window</source>
+        <translation>ウィンドウ (&amp;W)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command Window</source>
+        <translation>コマンドウィンドウ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command History</source>
+        <translation>コマンドヒストリの表示</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>ワークスペースの表示</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>エディタの表示</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>ドキュメントの表示</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Command Window</source>
+        <translation>コマンドウィンドウ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command History</source>
+        <translation>コマンドヒストリ</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Workspace</source>
+        <translation>ワークスペース</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Editor</source>
+        <translation>エディタ</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+41"/>
+        <source>Documentation</source>
+        <translation>ドキュメント</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <source>&amp;Help</source>
+        <translation>ヘルプ (&amp;H)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>バグの報告</translation>
+    </message>
+</context>
+<context>
+    <name>news_reader</name>
+    <message>
+        <location line="-1411"/>
+        <source>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Octave&apos;s community news source seems to be unavailable.
+&lt;/p&gt;
+&lt;p&gt;
+For the latest news, please check
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+when you have a connection to the web (link opens in an external browser).
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Octaveコミュニティニュースが入手できません。
+&lt;/p&gt;
+&lt;p&gt;
+最新のニュースは,以下をクリックしてください.
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+(リンクは外部ブラウザで開きます.) .
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Octave 開発チーム</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Connecting to the web to display the latest Octave Community news has been disabled.
+&lt;/p&gt;
+&lt;p&gt;
+For the latest news, please check
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+when you have a connection to the web (link opens in an external browser)
+or enable web connections for news in Octave&apos;s network settings dialog.
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+最新 Octave コミュニティーニュースを得る接続機能がオフになっています.
+&lt;/p&gt;
+&lt;p&gt;
+もし,ウェブ接続が可能なら,最新のニュースは以下をクリックしてください.(リンクは外部ブラウザで開きます.)
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+もしくは Octave のネットワーク接続ダイアログでウェブ接続をオンにしてください.
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Octave 開発チーム</translation>
+    </message>
+</context>
+<context>
+    <name>octave_dock_widget</name>
+    <message>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
+        <source>Undock widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-188"/>
+        <source>Hide widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <source>Dock widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>octave_qscintilla</name>
+    <message>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
+        <source>Help on</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Documentation on</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Edit</source>
+        <translation>編集</translation>
+    </message>
+</context>
+<context>
+    <name>octave_qt_link</name>
+    <message>
+        <location filename="../src/octave-qt-link.cc" line="+114"/>
+        <source>File
+%1
+does not exist. Do you want to create it?</source>
+        <translation>ファイル
+%1
+見つかりません.作成しますか?</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Editor</source>
+        <translation>Octave エディタ</translation>
+    </message>
+    <message>
+        <location line="-6"/>
+        <location line="+6"/>
+        <location line="+7"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+204"/>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Change Directory or Add Directory to Load Path</source>
+        <translation>ディレクトリの変更またはロードパスへのディレクトリの追加</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Change Directory</source>
+        <translation>ディレクトリの変更</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Add Directory to Load Path</source>
+        <translation>ロードパスへのディレクトリの追加</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
+        <source>Cancel</source>
+        <translation>キャンセル</translation>
+    </message>
+</context>
+<context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>既定</translation>
+    </message>
+</context>
+<context>
+    <name>resource_manager</name>
+    <message>
+        <location filename="../src/resource-manager.cc" line="+245"/>
+        <source>The settings file
+%1
+does not exist and can not be created.
+Make sure you have read and write permissions to
+%2
+
+Octave GUI must be closed now.</source>
+        <translation>設定ファイル
+%1
+が存在せずまた作成もできません.
+次に対する読込,書込の許可を確認してください.
+%2
+
+Octave GUI はオープンできませんでした.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Octave Critical Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>settings_dialog</name>
+    <message>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
+        <source>Settings</source>
+        <translation>設定</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
+        <source>General</source>
+        <translation>一般</translation>
+    </message>
+    <message>
+        <location line="-447"/>
+        <location filename="../src/ui-settings-dialog.h" line="-25"/>
+        <source>Interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Dock widget title bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Confirm before exiting</source>
+        <translation>終了する前に確認</translation>
+    </message>
+    <message>
+        <location line="+57"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Octave logo only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Letter icons</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>ステータスバーを表示</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation>小さい</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>大きい</translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation>カスタムスタイル</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Background inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>起動パス</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1369"/>
+        <location filename="../src/ui-settings-dialog.h" line="-24"/>
+        <source>Editor</source>
+        <translation>エディタ</translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="-54"/>
+        <source>After Column</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+104"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Color</source>
+        <translation>色</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab width min.</source>
+        <translation>タブ幅の最小値</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>最大値</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>本機能は等幅フォントで正常動作します.既定フォントのスペースのキャラクターの幅で行は表示されます.スタイルがプロポーショナルフォントを使う場合や可変フォントサイズ,ボールド,イタリックフォントとノーマルテクストが使用された場合正常に動作しません.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>横方向スクロールバーの表示</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indent width</source>
+        <translation>インデントの幅</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab indents line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto indentation</source>
+        <translation>自動インデント</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab width</source>
+        <translation>タブの幅</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show indentation guides</source>
+        <translation>インデントガイドの表示</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Backspace unindents line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>オートコンプリート</translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Match keywords</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Case sensitive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Match words in document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>起動時に一回前のエディタタブを復元する</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Use custom file editor</source>
+        <translation>外部エディタを使用する</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>エディタのスタイル</translation>
+    </message>
+    <message>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>ヒストリのバッファサイズ</translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Terminal Colors</source>
+        <translation>端末の色</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>フォント</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>行番号の表示</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>現在の行をハイライト</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>ウィンドウのタイトルに完全なパス名を表示する</translation>
+    </message>
+    <message>
+        <location line="-423"/>
+        <location filename="../src/ui-settings-dialog.h" line="-20"/>
+        <source>Graphic icons</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+212"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>設定は .octaverc スタートアップファイルの後に適用されます</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>一つ前のセッションのワーキングディレクトリを保存する</translation>
+    </message>
+    <message>
+        <location line="+127"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Show whitespace</source>
+        <translation>ホワイトスペースの表示</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>アイデントに使用されたホワイトスペースを表示しない</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Draw a long line marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>文末文字を表示する</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>既定の文末文字モード</translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>コマンドライン(%f=ファイル名, %l=行数): </translation>
+    </message>
+    <message>
+        <location line="+489"/>
+        <location filename="../src/ui-settings-dialog.h" line="+31"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
+        <source>Terminal</source>
+        <translation>端末</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>カーソルのタイプ: </translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>カーソルの点滅</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>前景色を使う</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>フォントサイズ</translation>
+    </message>
+    <message>
+        <location line="+196"/>
+        <location filename="../src/ui-settings-dialog.h" line="+18"/>
+        <source>File Browser</source>
+        <translation>ファイルブラウザ</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Display</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show file size</source>
+        <translation>ファイルサイズの表示</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>ファイルタイプの表示</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>最後に修正した日の表示</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>隠しファイルの表示</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Alternating row colors</source>
+        <translation>列の色のオルタネーション</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Workspace</source>
+        <translation>ワークスペース</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>ツールチップを隠す</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>セルのバブルクリックでショートカットを編集する</translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>ネットワーク</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
+        <source>Allow Octave to connect to the Octave web site to display current news and information</source>
+        <translation>現在のニュースや情報を表示させるために Octave が Octave ウェブサイトに接続することを許可する</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
+        <source>Use proxy server</source>
+        <translation>プロキシサーバーを使用する</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>HttpProxy</source>
+        <translation>HTTP Proxy</translation>
+    </message>
+    <message>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
+        <source>Icon set for dock widgets</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>言語 (要再起動)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>アイコンのサイズ</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Normal</source>
+        <translation>標準</translation>
+    </message>
+    <message>
+        <location line="+1195"/>
+        <location filename="../src/ui-settings-dialog.h" line="+72"/>
+        <source>File handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+485"/>
+        <location filename="../src/ui-settings-dialog.h" line="+24"/>
+        <source>Behavior</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Octaveのワーキングディレクトリをファイルブラウザと同期させる</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Restore last directory of previous session</source>
+        <translation>一つ前のセッションの最後のディレクトリを保存する</translation>
+    </message>
+    <message>
+        <location line="+106"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Colors for variable attributes </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>ショートカット</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>このセットを使用する</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>セット 1</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>エクスポート</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>インポート</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>セット 2</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Socks5Proxy</source>
+        <translation>Socks5Proxy</translation>
+    </message>
+    <message>
+        <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Hostname:</source>
+        <translation>ホスト名: </translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
+        <source>Proxy type:</source>
+        <translation>プロキシのタイプ: </translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Port:</source>
+        <translation>ポート: </translation>
+    </message>
+    <message>
+        <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Username:</source>
+        <translation>ユーザー名: </translation>
+    </message>
+    <message>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Password:</source>
+        <translation>パスワード: </translation>
+    </message>
+    <message>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
+        <location line="+4"/>
+        <location line="+561"/>
+        <source>System setting</source>
+        <translation>システム設定</translation>
+    </message>
+    <message>
+        <location line="-355"/>
+        <source>IBeam Cursor</source>
+        <translation>IBeam カーソル</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Block Cursor</source>
+        <translation>ブロックカーソル</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Underline Cursor</source>
+        <translation>下線カーソル</translation>
+    </message>
+    <message>
+        <location line="+213"/>
+        <source>Difference to the default size</source>
+        <translation>既定のサイズとの差</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Background color, pink (255,0,255) means default</source>
+        <translation>背景色,ピンク (255,0,255) が既定を意味する</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>b</source>
+        <comment>short form for bold</comment>
+        <translation>b</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>i</source>
+        <comment>short form for italic</comment>
+        <translation>i</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>u</source>
+        <comment>short form for underlined</comment>
+        <translation>u</translation>
+    </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Octave のスタートアップディレクトリの設定</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>ファイルブラウザのスタートアップディレクトリの設定</translation>
+    </message>
+</context>
+<context>
+    <name>setup_community_news</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+44"/>
+        <source>Community News</source>
+        <translation>コミュニティーニュース</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Previous</source>
+        <translation>一つ前</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Next</source>
+        <translation>次</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>キャンセル</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.
+The check will happen at most once each day and news will only be displayed if there is something new since the last time you viewed the news.&lt;/p&gt;
+&lt;p&gt;You may also view the news by selecting the &quot;Community News&quot; item in the &quot;Help&quot; menu in the GUI, or by visiting
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Octave GUI 起動すると,Octave ウェブサイトがチェックされ Octave コミュニティに関する最新のニュースや情報がチェックされる.
+チェックはほぼ一日一回行われる.前回閲覧されたニュースより新しいニュースが存在する場合にのみニュースは表示される.&lt;/p&gt;
+&lt;p&gt;GUI のメニューのヘルプの &quot;コミュニティーニュース &quot;を選択することによりニュースを見ることができる.もしくは以下のサイトを見ることでニュースを知ることができる.
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <source>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Octave が起動時に Octave コミュニティーに関する最新のニュースや情報を表示するために Octave ウェブサイトに接続することを許可する.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation type="unfinished">新規ファイル</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation type="unfinished">新規関数</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation type="unfinished">新規の図</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>ファイルを開く</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation type="unfinished">ワークスペースをロード</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation type="unfinished">ワークスペースを別名で保存</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>設定</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Octave の終了</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>コピー</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>貼り付け</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>元に戻す</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation type="unfinished">全てを選択</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>クリップボードをクリア</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>複数のファイルで検索</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>コマンドウィンドウのクリア</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>コマンドヒストリのクリア</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>ワークスペースのクリア</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation type="unfinished">継続</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>デバッグモードの終了</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>コマンドウィンドウの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>コマンドヒストリの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>ファイルブラウザの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>ワークスペースの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>エディタの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>ドキュメントの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>コマンドウィンドウ</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>コマンドヒストリ</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>ファイルブラウザ</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>ワークスペース</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>エディタ</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>ドキュメント</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>ディスク保存のドキュメントの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>オンラインドキュメントの表示</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Octave パッケージ</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Octave への貢献</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Octave 開発チーム</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Octave について</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>リリースノート</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>コミュニティーニュース</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>関数の編集</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>ファイルの保存</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>ファイルを別名で保存</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>閉じる</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>全てを閉じる</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>やり直し</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>切り取り</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>検索と置換</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>行削除</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>行のコピー</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>行の切り取り</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>選択部をコメントにする</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>選択部をコメントでなくす</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished">ステップ</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished">既定のウィンドウのレイアウト</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished">バグの報告</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished">他のファイルを閉じる</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>ホワイトスペースの表示</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>ズームイン</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>ズームアウト</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>ブレークポイントをトグル</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>次のブレークポイント</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>一つ前のブレークポイント</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>全てのブレークポイントを解除</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>ファイルを実行</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>選択部を実行</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>メイン</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>ファイル</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>編集</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>デバッグ</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>ウィンドウ</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>ヘルプ</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>ニュース</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>表示</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>実行</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>既定のショートカット</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>ショートカットセット %1 をファイルからインポートする</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Octave ショートカットファイル (*.osc);;全てのファイル (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>ショートカットセット %1 をファイルにエクスポートする</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>%1 を Octave ショートカットファイルとして開くのに失敗しました</translation>
+    </message>
+</context>
+<context>
+    <name>terminal_dock_widget</name>
+    <message>
+        <location filename="../src/terminal-dock-widget.cc" line="+38"/>
+        <source>Command Window</source>
+        <translation>コマンドウィンドウ</translation>
+    </message>
+</context>
+<context>
+    <name>webinfo</name>
+    <message>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
+        <source>Type here and press &apos;Return&apos; to search</source>
+        <translation>ここでタイプして&apos;リターンキー&apos;を押して検索</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Global search</source>
+        <translation>グローバル検索</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>エラー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>info ファイル &lt;p&gt;%1&lt;p&gt; またはその圧縮されたファイルが存在しません</translation>
+    </message>
+</context>
+<context>
+    <name>welcome_wizard</name>
+    <message>
+        <location filename="../src/welcome-wizard.cc" line="+135"/>
+        <source>Welcome to GNU Octave</source>
+        <translation>GNU Octave へようこそ</translation>
+    </message>
+</context>
+<context>
+    <name>workspace_model</name>
+    <message>
+        <location filename="../src/workspace-model.cc" line="-42"/>
+        <source>Name</source>
+        <translation>名前</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Class</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Dimension</source>
+        <translation>次元</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Value</source>
+        <translation>値</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Attribute</source>
+        <translation>属性</translation>
+    </message>
+    <message>
+        <location line="+109"/>
+        <source>Right click to copy, rename, or display</source>
+        <translation>右クリックでコピー,名前の変更,または表示</translation>
+    </message>
+    <message>
+        <location line="+37"/>
+        <location line="+2"/>
+        <source>complex</source>
+        <translation>複素数</translation>
+    </message>
+</context>
+<context>
+    <name>workspace_view</name>
+    <message>
+        <location filename="../src/workspace-view.cc" line="+50"/>
+        <source>Workspace</source>
+        <translation>ワークスペース</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>View the variables in the active workspace.</source>
+        <translation>アクティブなワークスペースの表示。</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>ワークスペースをフィルタするためにテキストを入力</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>フィルタ</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>名前のコピー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>値のコピー</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Rename</source>
+        <translation>名前の変更</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Only top-level symbols may be renamed.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <source>View the variables in the active workspace.&lt;br&gt;</source>
+        <translation>アクティブワークスペースの変数の表示&lt;br&gt;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Colors for variable attributes:</source>
+        <translation>変数の属性のための色</translation>
+    </message>
+</context>
+</TS>
--- a/libgui/languages/nl_NL.ts
+++ b/libgui/languages/nl_NL.ts
@@ -83,11 +83,127 @@
 <context>
     <name>QDialogButtonBox</name>
     <message>
+        <location filename="../../../octave-qt/qdialogbuttonbox.cpp" line="+658"/>
         <location filename="../../../octave-qt/qmessagebox.cpp" line="+1937"/>
         <location line="+446"/>
         <source>OK</source>
         <translation>OK</translation>
     </message>
+    <message>
+        <location line="+0"/>
+        <source>&amp;OK</source>
+        <translation>OK</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Bewaar</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Save</source>
+        <translation>Bewaar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Open</source>
+        <translation>Open</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Cancel</source>
+        <translation>Annuleren</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Cancel</source>
+        <translation>Annuleren</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Close</source>
+        <translation>Sluit bestand</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Close</source>
+        <translation>Sluiten</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Apply</source>
+        <translation>Toepassen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Reset</source>
+        <translation>Reset</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Help</source>
+        <translation>Help</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Don&apos;t Save</source>
+        <translation>N&apos;t opslaan</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close without Saving</source>
+        <translation>Sluit af zonder te bewaren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Discard</source>
+        <translation>Vergeet</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Yes</source>
+        <translation>Ja</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Yes to &amp;All</source>
+        <translation>Ja op &amp;Alles</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;No</source>
+        <translation>Nee</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>N&amp;o to All</source>
+        <translation>Nee op alles</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Save All</source>
+        <translation>Bewaar alles</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Abort</source>
+        <translation>Afbreken</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Retry</source>
+        <translation>Opnieuw</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Ignore</source>
+        <translation>Negeren</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Restore Defaults</source>
+        <translation>Herstellen</translation>
+    </message>
 </context>
 <context>
     <name>QErrorMessage</name>
@@ -109,7 +225,7 @@
     <message>
         <location line="+208"/>
         <source>&amp;Show this message again</source>
-        <translation>Laat deze melding opnieuw zien</translation>
+        <translation>Toon deze melding opnieuw</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -323,7 +439,7 @@
     <message>
         <location line="+7"/>
         <source>Date Modified</source>
-        <translation>Datum verandering</translation>
+        <translation>Datum gewijzigd</translation>
     </message>
 </context>
 <context>
@@ -473,11 +589,6 @@
         <source>cursor</source>
         <translation>Aanwijzer</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Een opmerking over Octave&apos;s Nieuwe GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Een van de belangrijkste nieuwe kenmerken van Octave 3.8 is een grafische user interface (GUI).  Dat is waar de gebruikers de afgelopen jaren het meest om gevraagd hebben en hij is bijna af.  Maar omdat hij nog niet zo gepolijst is als we zouden willen hebben we besloten te wachten tot de versie 4.0 serie voordat we hem de standaard interface maken.&lt;/p&gt;&lt;p&gt;Vanwege de lange tijd en het aantal bug fixes en verbeteringen sinds de laatste major release versie hebben we ook besloten om niet langer meer te wachten op de GUI om al die verbeteringen door te voeren.  Dus geniet van Octave versie 3.8 en de preview van de nieuwe GUI.  We denken dat hij redelijk goed werkt, maar natuurlijk weten we dat er nog ruwe kantjes aan zitten en ruimte voor verbeteringen.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We hebben je hulp nodig&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Er zijn veel manieren waarop je ons kunt helpen de overgebleven problemen te verhelpen, de GUI te completeren, en de gebruikerservaring voor nieuwelingen en experts (de URLs openen een nieuwe browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Als je een bekwame ontwikkelaar bent kun je ons helpen door bij te dragen &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Als Octave niet goed wekt raden we je aan om &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;de problemen te rapporteren &lt;/a&gt; die je tegen komt.&lt;/li&gt;&lt;li&gt;Of je nu gebruiker of ontwikkelaar bent, je kunt ook &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;een bijdrage geven&lt;/a&gt;.  De ontwikkeling van Octave vraagt een hoop tijd en expertise.  Je bijdrage helpt er aan mee dat Octave verbeterd blijft worden.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hopen dat je Octave nuttig vindt.  Help alsjeblieft om het in de toekomst nog beter te maken!&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QPPDOptionsModel</name>
@@ -897,8 +1008,8 @@
     </message>
     <message>
         <location line="+71"/>
-        <source>Print To File...</source>
-        <translation>Druk af naar bestand...</translation>
+        <source>Print To File ...</source>
+        <translation>Afdrukken naar bestand</translation>
     </message>
     <message>
         <location line="+78"/>
@@ -944,7 +1055,7 @@
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Kopiëren</translation>
     </message>
@@ -954,15 +1065,20 @@
         <translation>Plakken</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>Alles wissen</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Alles selecteren</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>Veeg venster schoon</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>selectie is naar klembord gekopieerd</translation>
     </message>
@@ -1233,7 +1349,7 @@
     <message>
         <location line="+3"/>
         <source>Inactive JavaScript regular expression</source>
-        <translation>Inatieve Javascript reguliere uitdrukking</translation>
+        <translation>Inactieve Javascript reguliere uitdrukking</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1634,6 +1750,127 @@
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Figuurwerkbalk</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Assen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Raster</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Automatische verschalen</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>Bestand</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Bewaar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Bewaar  &amp;Als</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>Sluit figuur</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>B&amp;ewerken</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>Kopieren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Knippen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Plakken</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Help</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>Over QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>Over &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>Over QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Bewaar figuur als</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Draaien</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Inzoomen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Uitzoomen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Verschuiven</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Voeg tekst in</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Selecteer</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -1649,16 +1886,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation></translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Octave bestanden (*.m);;Alle bestanden (*)</translation>
     </message>
@@ -1674,7 +1912,7 @@
         <translation>Naam van nieuwe functie:</translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -1683,37 +1921,27 @@
 is reeds geopend in de editor</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation></translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Nieuw Bestand</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>Op&amp;slaan</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Openen...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Opslaan &amp;als...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Afdrukken...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>Ongedaan maken</translation>
     </message>
@@ -1723,64 +1951,64 @@
         <translation>He&amp;rhalen</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>Kopiëren</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Knippen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Plakken</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Volge&amp;nde bladwijzer</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>&amp;Vorige bladwijzer</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Knippen</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Plakken</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>&amp;Bladwijzer invoegen</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>Volge&amp;nde bladwijzer</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>&amp;Vorige bladwijzer</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>&amp;Bladwijzer invoegen</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>Alle bladwijzers ve&amp;rwijderen</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
-        <translation>Volge&amp;nd Breekpunt</translation>
+        <translation>Volge&amp;nd Breakpoint</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Pre&amp;vious Breakpoint</source>
-        <translation>&amp;Vorig Breekpunt</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Vorig Breakpoint</translation>
+    </message>
+    <message>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
-        <translation>Schakel &amp;Breekpunt om</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Toggle &amp;Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
-        <translation>Verwijde&amp;r Alle Breekpunten</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Verwijde&amp;r Alle Breakpoints</translation>
+    </message>
+    <message>
+        <location line="-104"/>
         <source>&amp;Comment</source>
-        <translation>Zet om naar commentaar</translation>
+        <translation>Zet om naar &amp;commentaar</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1788,57 +2016,238 @@
         <translation>Zet om naar code</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>Zoek en Vervang...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Sla Bestand op en Voer uit</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Inspringen</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>Ter&amp;ug inspringen</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>Zoek en Vervang...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Sla Bestand op en Voer uit</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>Ga naar regel...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Kon externe editor niet starten</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Maak nieuw</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Annuleren</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation>&amp;Recent geopend</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>Pas Functie Aan</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>Sluit bestand</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Alle bestanden sluiten</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Andere bestanden sluiten</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Alles selecteren</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>Opdrachten</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Regel weggooien</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Regel kopiëren</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Regel knippen</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Gooi weg tot begin van woord</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Gooi weg tot einde van woord</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Gooi weg tot begin van regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Gooi weg tot einde van regel</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicaat van selectie maken</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transponeer regel</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>Toon aanvullijst</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>Formaat</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Hoofdletters</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Kleine letters</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Zet regeleindes om naar &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Zet regeleindes om naar &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Zet regeleindes om naar &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Navigeer</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Naar gekoppelde accolade</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecteer tot gekoppelde accolade</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>Voorkeuren...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>&amp;Stijlvoorkeuren...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>&amp;Stijlvoorkeuren...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>Weergave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Toon rege&amp;lnummers</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Toon regeleindes</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Toon &amp;inspringraster</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Toon lange-regel &amp;markering</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>Inzoomen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>Uitzoomen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>&amp;Normale grootte</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Geselecteerde tekst uitvoeren</translation>
     </message>
@@ -1848,17 +2257,17 @@
         <translation>&amp;Hulp</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Hulp bij sleutelwoord</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Documentatie bij sleutelwoord</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -1867,7 +2276,7 @@
 niet openen om in te lezen: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1876,7 +2285,7 @@
 bestaat niet. Wilt u het laten aanmaken?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -1885,32 +2294,32 @@
 niet openen om te schrijven: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>Het bijbehorende tabblad in de editor is verdwenen.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>Bestand</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Nieuwe &amp;Functie...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>B&amp;ewerken</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Toon &amp;witruimte-tekens</translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>&amp;Debuggen</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>Uitvoe&amp;ren</translation>
     </message>
@@ -1918,7 +2327,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>eol:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>regel:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>kolom:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 is een interne functie</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Kan functie %1 niet vinden</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>Ga naar regel</translation>
     </message>
@@ -1928,47 +2362,56 @@
         <translation>Regelnummer</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>naamloos</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Wil je de wijzigingen opslaan of niet?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>Het bestand
+
+  %1
+
+dat zou worden gesloten is ondertussen gewijzigd.  %2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Regeleindes:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Octave bestanden (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Alle bestanden (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation>Wil je niet meer afsluiten, danwel het gewijzigde of het originele bestand opslaan?</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation></translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>Het bestand
-%1
-dat gesloten moet worden is gewijzigd.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Octave bestanden (*.m);;Alle bestanden (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -1985,24 +2428,31 @@
 is gewist of hernoemd. Wil je het nu opslaan?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>Kon bestand %1 niet openen om te schrijven:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Regel:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Kolom:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+is geen acceptable naam.
+
+Als je deze bestandsnaam opgeeft kun je de 
+bestandsnaam niet als Octave opdracht gebruiken.
+
+Wil je en andere naam opgeven?</translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Het lijkt erop dat &apos;%1&apos; is gewijzigd door een ander programma. Wil je het opnieuw laden?</translation>
     </message>
@@ -2010,7 +2460,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Bestandsbrowser</translation>
     </message>
@@ -2025,42 +2475,43 @@
         <translation>Voer pad- of bestandsnaam in</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Eén mapniveau omhoog</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Stel huidige browser map in als Octave directory</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Bewerkingen op huidige map</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Stel browser directory in...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Zoek bestanden...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Nieuw bestand</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Nieuwe map</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Dubbelklik een bestand om te openen</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
-        <translation>Laat Octave map zien</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <translation>Toon Octave werkdirectory</translation>
+    </message>
+    <message>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Eén mapniveau omhoog</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Ga naar huidige Octave map</translation>
     </message>
@@ -2070,37 +2521,29 @@
         <translation>Stel Octave map in</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Maak huidige browser map de Octave map</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
-        <translation>Laat home map zien</translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Zoek in map...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Zoek bestanden...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Toon home directory</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Nieuw bestand...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Nieuwe map...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Activeer om in editor in te lezen, rechtsklikken voor alternatieven</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Bestandsgrootte</translation>
     </message>
@@ -2117,10 +2560,10 @@
     <message>
         <location line="+8"/>
         <source>Show hidden</source>
-        <translation>Verborgen bestanden weergeven</translation>
-    </message>
-    <message>
-        <location line="+24"/>
+        <translation>Toon verborgen bestanden</translation>
+    </message>
+    <message>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Open</translation>
     </message>
@@ -2150,17 +2593,17 @@
         <translation>Stel huidige map in</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Hernoemen</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Verwijderen</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Hernoemen...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Weggooien...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Hernoem bestand/map</translation>
     </message>
@@ -2197,7 +2640,7 @@
         <translation>Kan een niet-lege map niet wissen</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>Stel file browser map in</translation>
     </message>
@@ -2215,7 +2658,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>New file.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Maak nieuwe map</translation>
     </message>
@@ -2231,7 +2679,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>Veel plezier!</translation>
     </message>
@@ -2248,19 +2696,19 @@
     <message>
         <location line="+1"/>
         <source>Cancel</source>
-        <translation>Afbreken</translation>
+        <translation>Annuleren</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;We hopen dat je Octave handig vindt.&lt;/p&gt;
-&lt;p&gt;Als je problemen tegenkomt zijn er verschillende manieren om hulp te krijgen waaronder commerciële edities met ondersteuning, een mailinglijst, een wiki en andere community-gebaseerde ondersteuningskanalen.
-Meer informatie hierover kan je vinden op &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opent in een nieuw venster).&lt;\p&gt;
+&lt;p&gt;We hopen dat je Octave een bruikbaar programma vind..&lt;/p&gt;
+&lt;p&gt;Bij problemen is er een aantal manieren om hulp te krijgen, ook commerciele hulpopties, een mailing list, een wiki en andere manieren gebaseerd op de community.
+Meer informatie hierover is te verkrijgen via een bezoek aan &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opent in een externe browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
@@ -2295,7 +2743,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Zoek en vervang</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>Zoek naar:</translation>
     </message>
@@ -2365,7 +2818,7 @@
         <translation>In se&amp;lectie zoeken</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>vanaf einde terug zoeken</translation>
     </message>
@@ -2375,7 +2828,7 @@
         <translation>Zoeken vanaf begin</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Resultaat vervangen</translation>
     </message>
@@ -2385,7 +2838,7 @@
         <translation>%1 vervangingen</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>Zoek resultaat</translation>
     </message>
@@ -2408,12 +2861,7 @@
         <translation>Genaamd:</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Voer de bestandnaam-expressie in</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>Begin in:</translation>
     </message>
@@ -2433,22 +2881,12 @@
         <translation>Blader naar begin map</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Ook in onderliggende mappen</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>Zoek ook in onderliggende mappen naar overeenkomende bestanden</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Neem mappen ook mee</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation>Neem overeenkomende mappen mee in zoekresultaten</translation>
     </message>
@@ -2468,9 +2906,24 @@
         <translation>Met tekst:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>Zoeken naar overeenkomende tekst</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Geef bestandsnaam-zoekpatroon op</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Zoek in subdirectories</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Inclusief subdirectories</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Geef zoekpatroon voor bestandsinhoud</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -2533,7 +2986,12 @@
         <translation>Bezig met zoeken...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 overeenkomsten</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>Stel zoekmap in</translation>
     </message>
@@ -2554,7 +3012,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Bladeren en zoeken door de opdrachtgeschiedenis.</translation>
     </message>
@@ -2564,17 +3022,22 @@
         <translation>Dubbelklik een commando om het naar de terminal te sturen.</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Voer tekst in om de opdrachtgeschiedenis mee te filteren.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Geef zoekpatroon voor filteren van opdrachtgeschiedenis</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filter</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Opdrachtgeschiedenis</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Kopiëren</translation>
     </message>
@@ -2584,7 +3047,7 @@
         <translation>Werk uit</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Nieuw script</translation>
     </message>
@@ -2604,7 +3067,7 @@
     <message>
         <location line="+1"/>
         <source>Cancel</source>
-        <translation>Afbreken</translation>
+        <translation>Annuleren</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -2623,53 +3086,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Werkruimte laden</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Over Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>Bestand</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Nieuw</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Script</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Figuur</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Open...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Voorkeuren...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Afsluiten</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>B&amp;ewerken</translation>
     </message>
@@ -2679,22 +3132,22 @@
         <translation>Ongedaan maken</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Kopiëren</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Plakken</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation>Sla Werkruimte Op Als</translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>Bestand met Release Notes &apos;%1&apos; is leeg.</translation>
     </message>
@@ -2709,17 +3162,42 @@
         <translation>Octave Release Notes</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Octave Community Nieuws</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Zeker weten dat je Octave wil afsluiten?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Open een bestaand bestand in de editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nieuwe functie...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nieuwe figuur</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Alles selecteren</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Wis klembord</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Zoek bestanden...</translation>
     </message>
@@ -2739,7 +3217,7 @@
         <translation>Wis werkruimte</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>De&amp;buggen</translation>
     </message>
@@ -2754,32 +3232,27 @@
         <translation>Doorgaan</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Debuggen afsluiten</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
-        <translation>Laat bestandsbrowser zien</translation>
-    </message>
-    <message>
-        <location line="+26"/>
+        <translation>Toon bestandsbrowser</translation>
+    </message>
+    <message>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Bestandsbrowser</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>Je gerbuikt een &quot;release candiadate&quot; van Octave&apos;s experimentele GUI.&lt;/strong&gt; Octave wordt continu doorontwikkeld en de GUI zal de standaard interface zijn voor versie 4.0.  Kies Release Notes in het Nieuws menu van de GUI voor meer informatie, of kijk op &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Stap In</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Werkruimte laden...</translation>
     </message>
@@ -2789,22 +3262,22 @@
         <translation>Sla Werkruimte Op Als...</translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Functie...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Nieuw script</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Stap Uit</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation>Stel oorspronkelijke window layout opnieuw in</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Octave packages</translation>
     </message>
@@ -2824,7 +3297,7 @@
         <translation>Octave Ontwikkelaar Resurces</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>Op schijf</translation>
     </message>
@@ -2834,7 +3307,7 @@
         <translation>Online</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Nieuws</translation>
     </message>
@@ -2849,23 +3322,12 @@
         <translation>Community Nieuws</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Meer informatie</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Verberg</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Experimentele GUI Informatie</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Werkbalk</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Geef mapnaam op</translation>
     </message>
@@ -2880,69 +3342,74 @@
         <translation>Eén mapniveau omhoog</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Blader door mappen</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Verlaat debug modus</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>Venster</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
-        <translation>Opdrachtvenster weergeven</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Toon opdrachtvenster</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Show Command History</source>
-        <translation>Opdrachtgeschiedenis weergeven</translation>
-    </message>
-    <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Werkruimte weergeven</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Editor weergeven</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Documentatie weergeven</translation>
+        <translation>Toon opdrachtgeschiedenis</translation>
     </message>
     <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Toon werkruimte</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Toon editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Toon documentatie</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Opdrachtvenster</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Opdrachtgeschiedenis</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Werkruimte</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Documentatie</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Hulp</translation>
     </message>
@@ -2955,7 +3422,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -3014,18 +3481,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Widget laten zweven</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Widget verbergen</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Widget in venster opnemen</translation>
     </message>
@@ -3033,7 +3500,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Help over</translation>
     </message>
@@ -3047,28 +3514,18 @@
         <source>Edit</source>
         <translation>Edit</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>Voer selectie uit</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Nee</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Maak nieuw</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -3083,13 +3540,13 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>Het bestand %1 is niet in zoekpad.  Om de functie die je edit te debuggen moet je òf naar debetreffende map %2 gaan, of die map aan het zoekpad toevoegen.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>Het bestand %1 bestaat niet in het zoekpad. Om de functie uit te voeren of te debuggen moet je naar de map %2 of die map aan het zoekpad toevoegen.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>Het bestand %1 is overschaduwd door een bestand met dezelfde naam in het zoekpad.  Ga naar de map %2 om de functie de je edit te kunnen debuggen.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Het bestand %1 is afgedekt door een ander bestand met dezelfde naam in het zoekpad. Om de functie die je nu bewerkt uit te voeren of te debuggen moet je naar de map %2.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3107,15 +3564,24 @@
         <translation>Voeg map toe aan zoekpad</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
-        <translation>Afbreken</translation>
+        <translation>Annuleren</translation>
+    </message>
+</context>
+<context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Standaardtekst</translation>
     </message>
 </context>
 <context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -3132,7 +3598,7 @@
 De Octave GUI moet nu gesloten worden.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Octave Kritieke Fout</translation>
     </message>
@@ -3140,314 +3606,732 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Instellingen</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Algemeen</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Alleen Octave logo</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation>Letter iconen</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Graphic icons</source>
         <translation>Grafische iconen</translation>
     </message>
     <message>
-        <location line="+39"/>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Dock widget titelbalk</translation>
+    </message>
+    <message>
+        <location line="+60"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Normal</source>
+        <translation>Normaal</translation>
+    </message>
+    <message>
+        <location line="+178"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Custom style</source>
+        <translation>Aangepaste stijl</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Deze voorkeuren worden toegepast na verwerking van .octaverc startup bestanden.</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Herstel werkdirectory van vorige sessie</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Kleur</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+138"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Draw a long line marker</source>
+        <translation>Toon een lange lijnmarkering</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Toon EOL tekens</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Standaard EOL instelling</translation>
+    </message>
+    <message>
+        <location line="+154"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
         <source>Indent width</source>
         <translation>Inspringafstand</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation>Inspringen met tab</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Automatisch inspringen</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Tab breedte</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
-        <translation>Laat inspringraster zien</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <translation>Toon inspringraster</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>Backspace doet terug inspringen</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+88"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Match keywords</source>
         <translation>Zoek overeenkomende sleutelwoorden</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>Hoofdlettergevoelig</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Vervang woord door suggestie</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Vervang woord door suggestie</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>Zoek overeenkomende woorden in document</translation>
     </message>
     <message>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>Herstel bij opstarten de editor tabs uit de vorige sessie</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>Use custom file editor</source>
+        <translation>Gebruik een andere editor</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>Editorstijlen</translation>
+    </message>
+    <message>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Terminal Colors</source>
+        <translation>Terminalkleuren</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>Lettertype</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>Toon regelnummers</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Markeer huidige regel</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Toon hele pad in schermtitel</translation>
+    </message>
+    <message>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show whitespace</source>
+        <translation>Toon witruimte-tekens</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Verberg voor inspringen gebruikte witruimte</translation>
+    </message>
+    <message>
+        <location line="+625"/>
+        <location filename="../src/ui-settings-dialog.h" line="+37"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Aantal tekens voordat lijst wordt getoond</translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Maak niet bestaande bestanden aan zonder te vragen</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>command line (%f=bestand, %l=regel):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Opdrachtvenster</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Type aanwijzer:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Knipperende aanwijzer</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Gebruik voorgrondkleur</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Lettergrootte</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Set focus op terminal wanneer een opdracht uit een ander widget wordt uitgevoerd</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Bestandsbrowser</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Toon bestandsgrootte</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Toon bestandstype</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Toon datum van laatste wijziging</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Toon verborgen bestanden</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interface</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Bevestigen voor afsluiten</translation>
+    </message>
+    <message>
+        <location line="+103"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Toon statusbalk</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Inactieve tekst</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Actief</translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation>Klein</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Groot</translation>
+    </message>
+    <message>
+        <location line="+181"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Background inactive</source>
+        <translation>Inactieve achtergrond</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Octave opstarten</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Opstart directory</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Bladeren</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Na kolom</translation>
+    </message>
+    <message>
+        <location line="+144"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Tab width min.</source>
+        <translation>Min. tab breedte</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>Max.</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Dit werkt goed met monospaced fonts. De regel wordt weergegeven op een positie gebaseerd op de breedte van een spatie in de standaard-font. Het werkt mogelijk minder goed bij een stijl met proportionele fonts of als vette, schuine en normale tekst verschillende groottes hebben.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Te lange regels afbreken</translation>
+    </message>
+    <message>
         <location line="+61"/>
-        <source>Restore editor tabs from previous session on startup</source>
-        <translation>Herstel bij opstarten de editor tabs uit de vorige sessie</translation>
-    </message>
-    <message>
-        <location line="+60"/>
-        <source>Use custom file editor</source>
-        <translation>Gebruik een andere editor</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
     </message>
     <message>
         <location line="+32"/>
-        <source>Editor Styles</source>
-        <translation>Editorstijlen</translation>
-    </message>
-    <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecteer font, font grootte (als een verschil van de standaard grootte), font stijl (&lt;b&gt;d&lt;/b&gt;ik, &lt;b&gt;s&lt;/b&gt;chuin, &lt;b&gt;o&lt;/b&gt;nderstreept), tekstkleur en achtergrondkleur (wat betreft de laatste, de kleur roze (255,0,255) is een plaatsvervanger voor de standaard achtergrondkleur).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Toon horizontale schuifbalk</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Inspringen</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Indentation uses tabs</source>
+        <translation>Inspringen m.b.v. tabs</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Automatisch aanvullen</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>With Octave builtins</source>
+        <translation>Met Octave "builtins"</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Met Octave functies</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Toon aanvullijst automatisch</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Bestandsbeheer</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Herlaad bestanden die van buitenaf zijn veranderd zonder bevestiging</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Kies font, fontgrootte (als verschil met standaardgrootte), font stijl (&lt;b&gt;v&lt;/b&gt;et, &lt;b&gt;s&lt;/b&gt;chuin, &lt;b&gt;o&lt;/b&gt;nderstreept), tekstkleur en achtergrondkleur (magenta (255,0,255) is een opvuller voor de standaard achtergrondkleur).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Bij aanpassen van de buffergrootte wordt de geschiedenis gewist)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Grootte van geschiedenisbuffer</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Toon debug locatie ook in terminal (evenals marker in editor)</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
+        <translation>Weergave</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Om en om andere regelkleuren</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Gedrag</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Herstel laatste directory van vorige sessie</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Werkruimte</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Verberg tool tips</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Dubbelklik in een cel om een snelkoppelingen te bewerken</translation>
     </message>
     <message>
         <location line="+108"/>
-        <source>Terminal Colors</source>
-        <translation>Terminalkleuren</translation>
-    </message>
-    <message>
-        <location line="+45"/>
-        <source>Font</source>
-        <translation>Lettertype</translation>
-    </message>
-    <message>
-        <location line="-757"/>
-        <source>Show line numbers</source>
-        <translation>Regelnummers weergeven</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Markeer huidige regel</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Automatisch aanvullen</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Hele pad in schermtitel weergeven</translation>
-    </message>
-    <message>
-        <location line="-17"/>
-        <source>Show whitespace</source>
-        <translation>Laat witruimte zien</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Laat geen voor inspringen gebruikte witruimte zien</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Getypt aantal karakters voordat de aanvullijst verschijnt</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Maak niet bestaande bestanden aan zonder te vragen</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>command line (%f=bestand, %l=regel):</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Opdrachtvenster</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Type aanwijzer:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Netwerk</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Knipperende aanwijzer</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Gebruik voorgrondkleur</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Lettergrootte</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Bestandsbrowser</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Bestandsgrootte weergeven</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Bestandstype weergeven</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Datum van laatste wijziging weergeven</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Verborgen bestanden weergeven</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Om en om andere regelkleuren</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Werkruimte</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Kleuren voor klasse</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Netwerk</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation>Sta Octave toe om te verbinden met de Octave website om recent nieuws en informatie weer te geven</translation>
+        <translation>Sta Octave toe om naar de Octave website te gaan om recente informatie en nieuws weer te geven</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Gebruik proxyserver</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>http proxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>Iconenset voor dock widgets</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Taal instellen (vereist herstart)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Icoongrootte</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Synchroniseer Octave werkmap met bestandsverkenner</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Kleur voor diverse eigenschappen</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Sneltoetsen</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Kies deze optie om verwarring met readline sneltoetsen te vermijden</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Schakel globale sneltoetsen uit als terminal focus heeft</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Deze set gebruiken</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Set 1:</translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Taal instellen (vereist herstart)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exporteer</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importeer</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Icoongrootte</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Synchroniseer Octave werkmap met bestandsverkenner</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Set 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Actie</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Standaardset 1:</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Huidige set 1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Standaardset 2</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Huidige set 2</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation></translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Hostnaam:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation></translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Poort:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Gebruikersnaam:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Wachtwoord:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Systeeminstelling</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>I-balkje</translation>
     </message>
@@ -3462,7 +4346,7 @@
         <translation>Liggend streepje</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Verschil met standaardgrootte</translation>
     </message>
@@ -3489,6 +4373,16 @@
         <comment>short form for underlined</comment>
         <translation>o</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Octave opstart directory</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Stel bestandsbrowser opstartdirectory in</translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -3510,7 +4404,7 @@
     <message>
         <location line="+1"/>
         <source>Cancel</source>
-        <translation>Afbreken</translation>
+        <translation>Annuleren</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -3546,6 +4440,626 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Nieuw bestand</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nieuwe Functie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nieuwe figuur</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Open bestand</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Werkruimte laden</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Sla Werkruimte Op Als</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Voorkeuren</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Verlaat Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Kopiëren</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Plakken</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Ongedaan maken</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Alles selecteren</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Wis klembord</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Zoek in bestanden</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Veeg opdrachtvenster schoon</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Wis opdrachtgeschiedenis</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Wis werkruimte</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Stap naar binnen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Stap naar buiten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Doorgaan</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Stop debug mode</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Toon opdrachtvenster</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Toon opdrachtgeschiedenis</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Toon bestandsbrowser</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Toon werkruimte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Toon editor</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Toon documentatie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Opdrachtvenster</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Opdrachtgeschiedenis</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Bestandsbrowser</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Werkruimte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentatie</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Toon meegeleverde documentatie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Toon on-line documentatie</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Octave packages</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Deel code</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Doneer aan Octave project</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Octave Ontwikkelaar Resurces</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Over Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Release notes</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Community Nieuws</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Bewerk functie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Bewaar bestand</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Bewaar bestand als</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Sluiten</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Alle bestanden sluiten</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Afdrukken</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Opnieuw</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Knippen</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Zoek en vervang</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Wis tot begin van woord</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Wis tot einde van woord</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Wis tot begin van regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Wis tot einde van regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Gooi regel weg</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Kopieer regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Knip regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Dupliceer selectie/regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transponeer regel</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Maak commentaar van selectie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Maak code van selectie</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Zet selectie om naar hoofdletters</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Zet selectie om naar kleine letters</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Selectie laten inspringen</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Selectie terug laten inspringen</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Ga naar regel</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Ga naar gekoppelde accolade</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecteer tot gekoppelde accolade</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Schakel bladwijzer om</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Volgende bladwijzer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Vorige bladwijzer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Alle bladwijzers verwijderen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Stijlvoorkeuren</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Toon regelnummers</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation>Volgende opdracht</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Stel oorspronkelijke window layout opnieuw in</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Probleem rapporteren</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Andere bestanden sluiten</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Toon aanvullijst</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Zet regeleindes om naar Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Zet regeleindes om naar Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Zet regeleindes om naar Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Toon witruimte-tekens</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Toon regeleindes</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Toon inspringlijnen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Toon lange regelmarkering</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Inzoomen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Uitzoomen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Zoomen naar standaard</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Toggle breakpoint</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Volgend breakpoint</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Vorig breakpoint</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Wis alle breakpoints</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Voer bestand uit</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Voer selectie uit</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Hulp voor sleutelwoorden</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Documentation on Keyword</source>
+        <translation>Documentatie van sleutelwoord</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Bestand</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Bewerken</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Debug</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Venster</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Help</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Nieuws</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Weergave</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Uitvoeren</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Geef nieuwe sneltoets voor Set %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Bevestig de gewenste sneltoets of rechtsklikken om de standaard-sneltoets te herstellen</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Geef sneltoets direct op</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Huidige sneltoets</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Standaard sneltoets</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Zet terug naar standaard</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Verdubbel sneltoets</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>De gekozen sneltoets
+  &quot;%1&quot;
+is al in gebruik voor de actie
+  &quot;%2&quot;.
+Wil je de sneltoets toch instellen door hem van de vorige ingestelde actie te wissen?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Octave sneltoetsbestanden (*.osc);;Alle bestanden (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Exporteer sneltoetsset %1 naar bestand ...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Kon bestand %1 niet als Octave sneltoetsbestand openen</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -3556,7 +5070,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>Typ hier en druk op &apos;Enter&apos; om te zoeken</translation>
     </message>
@@ -3565,6 +5079,16 @@
         <source>Global search</source>
         <translation>Globaal zoeken</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Fout</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>Het info bestand &lt;p&gt;%1&lt;p&gt; of gecomprimeerde versie is er niet</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -3584,7 +5108,7 @@
     <message>
         <location line="+1"/>
         <source>Class</source>
-        <translation>Type</translation>
+        <translation>Type (Class)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3598,8 +5122,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Klasse</translation>
+        <source>Attribute</source>
+        <translation>Eigenschap</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -3616,7 +5140,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Werkruimte</translation>
     </message>
@@ -3626,9 +5150,24 @@
         <translation>Bekijk de variabelen in de huidige werkruimte.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Kopiëren</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Geef patroon voor filteren van werkruimte</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filteren</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Kopieer naam</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Kopieer waarde</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3636,19 +5175,19 @@
         <translation>Hernoemen</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Alleen hoofdsymbolen kunnen worden hernoemd.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>Bekijk variabelen in actieve werkruimte</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Kleuren voor klasse:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Kleuren voor eigenschappen van variabelen:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/pt_BR.ts
+++ b/libgui/languages/pt_BR.ts
@@ -59,18 +59,13 @@
     <message>
         <location line="+1"/>
         <source>cursor</source>
-        <translation>indicador</translation>
-    </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;Um aviso sobre a nova interface gráfica do Octave&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Uma das funcionalidades novas mais importantes no Octave versão 3.8 é a interface gráfica (GUI).  É uma coisa que os usuários solicitaram muito frequentemente nos últimos anos, e agora ela está quase pronta.  Mas como ela não está tão bem acabada quanto gostaríamos, decidimos esperar até a próxima versão 4.0 antes de tornar a GUI a interface padrão.&lt;/p&gt;&lt;p&gt;Dado o tempo transcorrido e o número de correções e melhorias desde a última versão, também decidimos não adiar mais o lançamento de todas essas novidades, ao invés ficar aperfeiçoando a GUI.  Portanto, aproveite a versão 3.8 do Octave e a prévia da nova GUI!  Acreditamos que ela está funcionando razoavelmente bem, apesar de alguns aspectos obviamente inacabados, além de muitas melhorias possíveis.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Ajude-nos&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Há muitas formas de você nos ajudar a corrigir os problemas que persistirem, a finalizar a GUI e a melhorar a usabilidade do Octave em geral, tanto para usuários iniciantes quanto para aqueles mais experientes (os links abaixo serão abertos no seu navegador padrão do sistema; o conteúdo poderá estar em inglês):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Se você for um desenvolvedor de software talentoso, ajude-nos contribuindo com o seu tempo, auxiliando no &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;desenvolvimento do Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Se o Octave não estiver funcionando corretamente, convidamos-lhe a &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;relatar os problemas&lt;/a&gt; que você vier a encontrar.&lt;/li&gt;&lt;li&gt;Quer você seja um usuário ou um desenvolvedor, você poderia &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;fazer uma doação&lt;/a&gt; para auxiliar no financiamento do projeto.  Afinal, o desenvolvimento do Octave demanda tempo e conhecimento consideráveis.  A sua generosidade contribui para assegurar a melhoria contínua do Octave.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Esperamos que você goste do Octave.  Ajude-nos a torná-lo ainda melhor no futuro!&lt;/p&gt;</translation>
+        <translation>cursor</translation>
     </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
@@ -80,20 +75,146 @@
         <translation>Colar</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
         <translation>Limpar Tudo</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>seleção copiada para a área de transferência</translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Barra de Ferramentas de Figuras</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Arquivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Salvar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Salvar &amp;Como</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Fechar Figura</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Editar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>&amp;Copiar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Recor&amp;tar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Colar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ajuda</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;Sobre QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>Sobre &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>Sobre QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Salvar Figura Como</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Rotacionar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Mais Zoom</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Menos Zoom</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Mover</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Inserir Texto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Selecionar</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -103,22 +224,23 @@
     <message>
         <location line="+1"/>
         <source>See the documentation for help.</source>
-        <translation>Veja a documentação para ajuda.</translation>
+        <translation>Veja a documentação para obter ajuda.</translation>
     </message>
 </context>
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Editor do Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Arquivos do Octave (*.m);;Todos os Arquivos (*)</translation>
     </message>
@@ -134,44 +256,34 @@
         <translation>Nome da nova função:</translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
         <translation>Arquivo não foi salvo! Um arquivo com o nome selecionado %1 já está aberto no editor</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Novo Script</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Salvar Arquivo</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Abrir Arquivo...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Salvar Arquivo &amp;Como...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Imprimir...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Desfazer</translation>
     </message>
@@ -181,42 +293,42 @@
         <translation>&amp;Refazer</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copiar</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Recor&amp;tar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Colar</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Marcador &amp;Seguinte</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Marcardor &amp;Anterior</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Recor&amp;tar</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Colar</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>Habilitar/desabilitar &amp;Marcador</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>Marcador &amp;Seguinte</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Marcardor &amp;Anterior</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>Habilitar/desabilitar &amp;Marcador</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Remover Todos os Marcadores</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation>Ponto de Parada &amp;Seguinte</translation>
     </message>
@@ -226,17 +338,17 @@
         <translation>Ponto de Parada &amp;Anterior</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>&amp;Ativar/desativar Ponto de Parada</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
-        <translation>&amp;Remover todos os Pontos de Parada</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Remover Todos os Pontos de Parada</translation>
+    </message>
+    <message>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Comentar</translation>
     </message>
@@ -246,57 +358,238 @@
         <translation>&amp;Descomentar</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Buscar e Substituir...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Salvar Arquivo e Executá-lo</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Indentar</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Remover Indentação</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Localizar e Substituir...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Salvar Arquivo e Executá-lo</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation>Vá para &amp;Linha...</translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Não foi possível iniciar editor de arquivo externo %1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Criar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Cancelar</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation>Arquivos &amp;Recentes</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Editar Função</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>&amp;Fechar</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Fechar Todos</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Fechar Demais Arquivos</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>&amp;Comandos</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Deletar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Recortar Linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Deletar até Início da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Deletar até Final da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Deletar até Início da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Deletar até Final da Linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar Seleção/Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transpor Linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>&amp;Exibir Lista de Auto-completar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Formatar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Seleção em M&amp;aiúsculas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Seleção em M&amp;inúsculas</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Converter Finais de Linha para &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Converter Finais de Linha para &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Converter Finais de Linha para &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Nave&amp;gação</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Mover para Parêntese/Chave/Colchete Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecionar até Parêntese/Chave/Colchete Correspondente</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Preferências...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>Preferências de &amp;Estilo...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>Preferências de &amp;Estilo...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>&amp;Visualizar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Exibir &amp;Números de Linha</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished">Editor</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Exibir &amp;Finais de Linha</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Exibir &amp;Guias de Indentação (à Esquerda)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Exibir &amp;Guia de Linhas Longas (à Direita)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>M&amp;ais Zoom</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>M&amp;enos Zoom</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>Tamanho &amp;Normal</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Executar &amp;Seleção</translation>
     </message>
@@ -306,17 +599,17 @@
         <translation>&amp;Ajuda</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Ajuda na Palavra-chave</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Documentação da Palavra-chave</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -325,7 +618,7 @@
 para leitura: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -334,7 +627,7 @@
 não existe. Deseja criá-lo?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -343,32 +636,32 @@
 para escrita: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>A aba do editor associada ao arquivo desapareceu.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Arquivo</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Nova &amp;Função...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>&amp;Depurar</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Executar</translation>
     </message>
@@ -376,7 +669,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>fdl:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>linha:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>col:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 é uma função interna</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Não foi possível encontrar função %1</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>Vá para linha</translation>
     </message>
@@ -386,53 +704,62 @@
         <translation>Número da linha</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;sem_nome&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Você deseja salvar ou descartar as alterações?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>O arquivo
+
+  %1
+
+está para ser fechado mas foi modificado.  %2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Finais de Linha:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Arquivos Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Todos os Arquivos (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
-        <translation>Você deseja cancelar o fechamento, salvar as alterações, ou descartá-las?</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <translation>Deseja cancelar o fechamento, salvar as alterações, ou descartá-las?</translation>
+    </message>
+    <message>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Editor do Octave</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>O arquivo
-%1
-está prestes a ser fechado mas foi modificado.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Arquivos do Octave (*.m);; Todos os Arquivos (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
         <translation>
 
-Aviso: O conteúdo no editor foi modificado!</translation>
+Alerta: O conteúdo aberto no editor foi modificado!</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -441,27 +768,34 @@
 has been deleted or renamed. Do you want to save it now?%2</source>
         <translation>Parece que o arquivo
 %1
-foi removido ou renomeado. Gostaria de salvá-lo agora?%2</translation>
-    </message>
-    <message>
-        <location line="-172"/>
+foi deletado ou renomeado. Gostaria de salvá-lo agora?%2</translation>
+    </message>
+    <message>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>Não foi possível abrir arquivo %1 para escrita:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Linha:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Coluna:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+não é um identificador válido.
+
+Se manter esse nome de arquivo, não será possivel 
+executar esse script como um comando no Octave.
+
+Deseja escolher outro nome? </translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Parece que o arquivo &apos;%1&apos; foi modificado por outra aplicação. Deseja recarregá-lo?</translation>
     </message>
@@ -469,14 +803,14 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
-        <translation>Navegador de Arquivos</translation>
+        <translation>Gerenciador de Arquivos</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Browse your files.</source>
-        <translation>Explore seus arquivos.</translation>
+        <translation>Gerencie seus arquivos.</translation>
     </message>
     <message>
         <location line="+18"/>
@@ -484,82 +818,75 @@
         <translation>Digite o caminho ou nome de arquivo</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Subir um nível de diretório</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Ações no diretório atual</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Definir Diretório a Gerenciar...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Buscar Arquivos...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Novo Arquivo</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Novo Diretório</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Clique duas vezes em um arquivo para abrí-lo</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>Exibir o diretório do Octave</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Exibir diretório acima</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Vá para o diretório atual do Octave</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Set Octave directory</source>
-        <translation>Escolher o diretório do Octave</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Configurar o diretório do Octave igual ao diretório atual no navegador</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <translation>Definir diretório do Octave</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>Exibir Diretório Pessoal</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Buscar no Diretório...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Buscar Arquivos...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Novo Arquivo...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Novo Diretório...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Clique-duplo para ativar, clique com botão direito para alternativas</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>Tamanho do arquivo</translation>
     </message>
@@ -579,7 +906,7 @@
         <translation>Exibir ocultos</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Abrir</translation>
     </message>
@@ -606,20 +933,20 @@
     <message>
         <location line="+6"/>
         <source>Set Current Directory</source>
-        <translation>Escolher Diretório Atual</translation>
-    </message>
-    <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Renomear</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Excluir</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <translation>Definir como Diretório Atual</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Renomear...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Deletar...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Renomear arquivo/diretório</translation>
     </message>
@@ -627,7 +954,8 @@
         <location line="+1"/>
         <source>Rename file/directory:
 </source>
-        <translation>Renomear arquivo/diretório:</translation>
+        <translation>Renomear arquivo/diretório:
+</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -640,23 +968,24 @@
         <location line="+25"/>
         <location line="+14"/>
         <source>Delete file/directory</source>
-        <translation>Remover arquivo/diretório</translation>
+        <translation>Deletar arquivo/diretório</translation>
     </message>
     <message>
         <location line="-13"/>
         <source>Are you sure you want to delete
 </source>
-        <translation>Você tem certeza que deseja excluir</translation>
+        <translation>Você tem certeza que deseja deletar
+</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Can not delete a directory that is not empty</source>
-        <translation>Não é possível excluir um diretório que não está vázio</translation>
-    </message>
-    <message>
-        <location line="+144"/>
+        <translation>Não é possível deletar um diretório que não está vázio</translation>
+    </message>
+    <message>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
-        <translation>Escolher diretório do Navegador de Arquivos</translation>
+        <translation>Definir diretório do gerenciador de arquivos</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -672,7 +1001,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Novo Arquivo.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Criar Diretório</translation>
     </message>
@@ -688,7 +1022,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>Aproveite!</translation>
     </message>
@@ -711,14 +1045,10 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Esperamos que você ache o Octave uma ferramenta útil.&lt;/p&gt;
-&lt;p&gt;Se encontrar dificuldades, existem várias formas de obter assistência, incluindo suporte comercial, listas de email, wiki, e outros canais de suporte comunitários.
-Você pode encontrar mais informações sobre cada um deles visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (link abre em navegador externo).&lt;/p&gt;
-&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+21"/>
@@ -741,9 +1071,9 @@
 &lt;head/&gt;&lt;body&gt;
 &lt;p&gt;Para mais informações sobre o Octave:&lt;/p&gt;
 &lt;ul&gt;
-&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (opens in external browser)&lt;/li&gt;
-&lt;li&gt;Acesse a documentação online como documento &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- ou &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt; (abre em navegador externo)&lt;/li&gt;
-&lt;li&gt;Abrir a documentação na interface gráfica com o menu de ajuda&lt;/li&gt;
+&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (abre em navegador externo)&lt;/li&gt;
+&lt;li&gt;Acesse a documentação online em formator &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;HTML&lt;/a&gt;- ou &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;PDF&lt;/span&gt;&lt;/a&gt; (abre em navegador externo)&lt;/li&gt;
+&lt;li&gt;Abra a documentação dentro do próprio Octave através do menu Ajuda&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -751,9 +1081,14 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Localizar e Substituir</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
-        <translation>&amp;Buscar por:</translation>
+        <translation>&amp;Localizar texto:</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -768,22 +1103,22 @@
     <message>
         <location line="+1"/>
         <source>Search from &amp;start</source>
-        <translation>Buscar a paritr do &amp;início</translation>
+        <translation>Localizar a partir do &amp;início</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>&amp;Wrap while searching</source>
-        <translation>Retornar ao começo se alcançar o &amp;final durante a busca</translation>
+        <translation>Retornar ao início se alcançar o &amp;final durante a busca</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>&amp;Find Next</source>
-        <translation>Buscar &amp;Próximo</translation>
+        <translation>Localizar &amp;Próximo</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Find &amp;Previous</source>
-        <translation>Buscar &amp;Anterior</translation>
+        <translation>Localizar &amp;Anterior</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -813,25 +1148,25 @@
     <message>
         <location line="+1"/>
         <source>Search &amp;backward</source>
-        <translation>Buscar de &amp;trás para frente</translation>
+        <translation>Localizar para &amp;trás</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Search se&amp;lection</source>
-        <translation>Buscar dentro do texto &amp;selecionado</translation>
-    </message>
-    <message>
-        <location line="+71"/>
+        <translation>Localizar dentro do texto &amp;selecionado</translation>
+    </message>
+    <message>
+        <location line="+84"/>
         <source>Search from end</source>
-        <translation>Buscar do final para o começo</translation>
+        <translation>Localizar a partir do final</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Search from start</source>
-        <translation>Buscar do começo para o final</translation>
-    </message>
-    <message>
-        <location line="+121"/>
+        <translation>Localizar a partir do início</translation>
+    </message>
+    <message>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Substituir Resultado</translation>
     </message>
@@ -841,14 +1176,14 @@
         <translation>%1 itens substituidos</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
-        <translation>Buscar Resultado</translation>
+        <translation>Localizar Resultado</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>No more matches found</source>
-        <translation>Nenhum resultado encontrado</translation>
+        <translation>Sem mais ocorrências</translation>
     </message>
 </context>
 <context>
@@ -856,7 +1191,7 @@
     <message>
         <location filename="../src/find-files-dialog.cc" line="+52"/>
         <source>Find Files</source>
-        <translation>Buscar Arquivos</translation>
+        <translation>Localizar Arquivos</translation>
     </message>
     <message>
         <location line="+10"/>
@@ -864,12 +1199,7 @@
         <translation>Nome de arquivo:</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Digite a expressão de busca para os nomes de arquivo</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>Diretório inicial:</translation>
     </message>
@@ -889,24 +1219,14 @@
         <translation>Escolha o diretório inicial</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Buscar em sub-diretórios</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
-        <translation>Buscar recursivamente nos sub-diretórios</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Inclur nomes de diretórios</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Buscar recursivamente nos sub-diretórios por arquivos correspondentes</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
-        <translation>Incluir diretórios no resultado da busca</translation>
+        <translation>Incluir diretórios correspondentes no resultado da busca</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -924,9 +1244,24 @@
         <translation>Contém texto:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>Digite a expressão de busca para conteúdo dos arquivos</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Entre a expressão de busca para nomes de arquivo</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Procurar em subdiretórios</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Incluir nomes de diretórios</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Entre a expressão de busca para conteúdo de arquivos</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -946,22 +1281,22 @@
     <message>
         <location line="+11"/>
         <source>Search results</source>
-        <translation>Resultados da Busca</translation>
+        <translation>Resultados da busca</translation>
     </message>
     <message>
         <location line="+17"/>
         <source>Idle.</source>
-        <translation>Parado.</translation>
+        <translation>Aguardando.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Find</source>
-        <translation>Buscar</translation>
+        <translation>Localizar</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Start search for matching files</source>
-        <translation>Iniciar busca por arquivos</translation>
+        <translation>Iniciar busca por arquivos correspondentes</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -989,9 +1324,14 @@
         <translation>Buscando...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 resultado(s)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
-        <translation>Alterar diretório de busca</translation>
+        <translation>Definir diretório de busca</translation>
     </message>
 </context>
 <context>
@@ -1010,37 +1350,42 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
-        <translation>Naveguar e buscar no histórico de comandos.</translation>
+        <translation>Navegar e buscar no histórico de comandos.</translation>
     </message>
     <message>
         <location line="+24"/>
         <source>Double-click a command to transfer it to the terminal.</source>
-        <translation>Clique duas vezes em um comando para transferí-lo ao terminal.</translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Digite para filtrar o histórico de comandos.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Clique duas vezes em um comando para transferi-lo ao terminal.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Digite para filtrar o histórico de comandos</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Evaluate</source>
-        <translation>Avaliar</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <translation>Executar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Criar script</translation>
     </message>
@@ -1055,7 +1400,7 @@
     <message>
         <location line="+3"/>
         <source>Next</source>
-        <translation>Próximo</translation>
+        <translation>Avançar</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1070,7 +1415,7 @@
 &lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Parece que você está usando a interface gráfica pela primeira vez neste computador.
+&lt;p&gt;Parece que você está usando a interface gráfica do Octave pela primeira vez neste computador.
 Clique em &apos;Avançar&apos; para criar um arquivo de configuração e iniciar o Octave.&lt;/p&gt;
 &lt;p&gt;O arquivo de configuração é armazenado em&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
@@ -1079,53 +1424,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Carregar Ambiente de Trabalho</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Sobre o Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Arquivo</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Novo</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Script</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Figura</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Abrir...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Preferências...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Sair</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
@@ -1135,22 +1470,22 @@
         <translation>Desfazer</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Colar</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation>Salvar Ambiente de Trabalho Como</translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>O arquivo de notas da versão &apos;%1&apos; está vazio.</translation>
     </message>
@@ -1165,19 +1500,44 @@
         <translation>Notas da Versão do Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Novidades da Comunidade</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Tem certeza que deseja sair do Octave?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Abrir um arquivo existente no editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nova Função...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nova Figura</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Limpar Área de Transferência</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
-        <translation>Buscar Arquivos...</translation>
+        <translation>Localizar Arquivos...</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -1195,7 +1555,7 @@
         <translation>Limpar Ambiente de Trabalho</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>De&amp;purar</translation>
     </message>
@@ -1210,32 +1570,27 @@
         <translation>Prosseguir</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Sair do Modo de Depuração</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
-        <translation>Exibir Navegador de Arquivos</translation>
-    </message>
-    <message>
-        <location line="+26"/>
+        <translation>Exibir Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="+20"/>
         <source>File Browser</source>
-        <translation>Navegador de Arquivos</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Você está usando uma versão preliminar da interface gráfica (GUI) experimental do Octave.&lt;/strong&gt;  O software está sob melhoria contínua, e a GUI se tornará a interface padrão na versão 4.0.  Para maiores informações, selecione o item &quot;Notas da Versão&quot; no menu &quot;Novidades&quot; da GUI ou acesse &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <translation>Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>Passo adentro</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Carregar Ambiente de Trabalho...</translation>
     </message>
@@ -1245,22 +1600,22 @@
         <translation>Salvar Ambiente de Trabalho Como...</translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Função...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Novo Script</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation>Passo afora</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
-        <translation>Restaurar Disposição de Janelas Padrão</translation>
-    </message>
-    <message>
-        <location line="+77"/>
+        <translation>Restaurar Layout Padrão das Janelas</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Pacotes do Octave</translation>
     </message>
@@ -1277,20 +1632,20 @@
     <message>
         <location line="+3"/>
         <source>Octave Developer Resources</source>
-        <translation>Recursos para Desenvolvedores do Octave</translation>
-    </message>
-    <message>
-        <location line="+32"/>
+        <translation>Recursos para Desenvolvedores</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>On Disk</source>
-        <translation>No Disco</translation>
+        <translation>No Disco (Em Seu Computador)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Online</source>
-        <translation>Na Internet</translation>
-    </message>
-    <message>
-        <location line="+12"/>
+        <translation>Online (na Internet)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Novidades</translation>
     </message>
@@ -1305,23 +1660,12 @@
         <translation>Novidades da Comunidade</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Mais Informações</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Ocultar</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Aviso sobre a Interface Gráfica Experimental</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>Digite o nome do diretório</translation>
     </message>
@@ -1336,69 +1680,74 @@
         <translation>Diretório um nível acima</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>Escolher diretório</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Sair do Modo Depuração</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Janela</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Exibir Janela de Comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Exibir Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Exibir Ambiente de Trabalho</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Exibir Editor</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Exibir Documentação</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Exibir Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Exibir Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Exibir Documentação</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Janela de Comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Ambiente de Trabalho</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Documentação</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Ajuda</translation>
     </message>
@@ -1411,7 +1760,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1427,15 +1776,15 @@
         <translation>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
-Fonte de notícias da comunidade parece estar indisponível.
+A fonte de notícias da comunidade parece estar indisponível.
 &lt;/p&gt;
 &lt;p&gt;
-Para as últimas notícias, por favor cheque
+Para ver as novidades, por favor acesse
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
-quando tiver conexão com a internet (abre em navegador externo).
+quando tiver conexão com a Internet (abre em navegador externo).
 &lt;/p&gt;
 &lt;p&gt;
-&lt;small&gt;&lt;em&gt;&amp;mdash; Os desenvolvdores do Octave, </translation>
+&lt;small&gt;&lt;em&gt;&amp;mdash; Os Desenvolvdores do Octave, </translation>
     </message>
     <message>
         <location line="+18"/>
@@ -1455,33 +1804,33 @@
         <translation>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
-Conectar a web para mostrar as últimas notícias da comunidade foi desativado.
+A conexão à Internet está desativada para exibir as novidades da comunidade Octave.
 &lt;/p&gt;
 &lt;p&gt;
-Para as últimas notícias, por favor cheque
+Para ver as novidades, por favor acesse
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
-quando tiver conexão com a web (abre em navegador externo)
-ou ative as conexões web para obter notícias em configurações de rede do Octave.
+quando tiver conexão com a Internet (abre em navegador externo)
+ou habilite a conexão à Internet nas preferências de rede do Octave.
 &lt;/p&gt;
 &lt;p&gt;
-&lt;small&gt;&lt;em&gt;&amp;mdash; Os desenvolvedores do Octave, </translation>
+&lt;small&gt;&lt;em&gt;&amp;mdash; Os Desenvolvedores do Octave, </translation>
     </message>
 </context>
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Desacoplar painel</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Esconder painel</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Acoplar painel</translation>
     </message>
@@ -1489,7 +1838,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Ajuda sobre</translation>
     </message>
@@ -1503,28 +1852,18 @@
         <source>Edit</source>
         <translation>Editar</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>&amp;Executar Seleção</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Sim</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Não</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Criar</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1539,39 +1878,48 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>O arquivo %1 não existe no caminho de pesquisa.  Para depurar a função que você está editando, é preciso ou mudar para o diretório %2 ou adicionar esse diretório ao caminho de pesquisa.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>O arquivo %1 não existe no caminho de busca. Para executar ou depurar a função que você está editando, é preciso definir o diretório atual como %2 ou adicionar aquele diretório ao caminho de busca.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>Existe um arquivo com o mesmo nome %1 no caminho de pesquisa. Para depurar a função que você está editando, é preciso mudar para o diretório %2.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>O arquivo %1 é ocultado por um arquivo com o mesmo nome no caminho de busca. Para executar ou deputar a função que você está editando, defina o diretório atual como %2.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory or Add Directory to Load Path</source>
-        <translation>Mudar para Diretório ou Adicionar Diretório ao Caminho de Pesquisa</translation>
+        <translation>Definir Diretório Atual ou Adicionar Diretório ao Caminho de Busca</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory</source>
-        <translation>Mudar para Diretório</translation>
+        <translation>Definir Diretório Atual</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Add Directory to Load Path</source>
-        <translation>Adicionar diretório ao caminho de pesquisa</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <translation>Adicionar Diretório ao Caminho de Busca</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Cancelar</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>Padrão</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1582,345 +1930,763 @@
         <translation>O arquivo de configuração
 %1
 não existe e não pode ser criado.
-Tenha certeza de que você tem permissão de leitura/escrita em
+Certifique-se que você tem permissão de leitura e escrita em
 %2
 
-Octave GUI precisa ser fechado agora.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+A interface gráfica do Octave precisa ser fechada agora.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
-        <translation>Erro crítico no Octave</translation>
+        <translation>Erro Crítico no Octave</translation>
     </message>
 </context>
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Configurações</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Geral</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Apenas logotipo do Octave</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation>Ícones de texto</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Graphic icons</source>
         <translation>Ícones gráficos</translation>
     </message>
     <message>
-        <location line="+39"/>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Barra de título do painel</translation>
+    </message>
+    <message>
+        <location line="+60"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+178"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Custom style</source>
+        <translation>Estilo personalizado</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Essas preferências são aplicadas após os arquivos de inicialização (.octaverc).</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Restaurar diretório de trabalho da sessão anterior</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Cor</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+138"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Draw a long line marker</source>
+        <translation>Desenhe uma guia vertical de linhas longas</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Exibir caracteres de final de linha</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Modo padrão para final de linha</translation>
+    </message>
+    <message>
+        <location line="+154"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
         <source>Indent width</source>
-        <translation>Largura de identação</translation>
+        <translation>Largura de indentação</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
-        <translation>Tecla Tab causa identação na linha</translation>
+        <translation>Tecla Tab causa indentação na linha</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
-        <translation>Auto-identação</translation>
-    </message>
-    <message>
-        <location line="+20"/>
+        <translation>Auto-indentação</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Largura do Tab</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
-        <translation>Exibir guias de identação</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <translation>Exibir guias de indentação</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
-        <translation>Tecla Backspace remove identação da linha</translation>
-    </message>
-    <message>
-        <location line="+155"/>
+        <translation>Tecla Backspace remove indentação da linha</translation>
+    </message>
+    <message>
+        <location line="+88"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Match keywords</source>
-        <translation>Buscar palavras-chave</translation>
-    </message>
-    <message>
-        <location line="+13"/>
-        <source>Case sensitive</source>
-        <translation>Diferenciar maiúsculas/minúsculas</translation>
+        <translation>Completar palavras-chave do Octave</translation>
     </message>
     <message>
         <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Substituir palavra por aquela sugerida</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Case sensitive</source>
+        <translation>Diferenciar maiúsculas/minúsculas</translation>
     </message>
     <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Substituir palavra por aquela sugerida</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
-        <translation>Buscar palavras no documento</translation>
+        <translation>Preencher com palavras do documento</translation>
+    </message>
+    <message>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>Restaurar abas de edição da sessão anterior durante a inicialização</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>Use custom file editor</source>
+        <translation>Usar editor de texto externo</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>Estilos de Edição</translation>
+    </message>
+    <message>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Terminal Colors</source>
+        <translation>Cores do Terminal</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>Fonte</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>Exibir números de linha</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Destacar linha atual</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Exibir caminho completo no título da janela</translation>
+    </message>
+    <message>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show whitespace</source>
+        <translation>Exibir espaços em branco</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Não exibir espaços em branco usados para indentação</translation>
+    </message>
+    <message>
+        <location line="+625"/>
+        <location filename="../src/ui-settings-dialog.h" line="+37"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Número de caracteres antes da lista ser exibida: </translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Criar arquivos não existentes sem confirmar</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>linha de comando (%f=arquivo, %l=linha):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Terminal</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Tipo de cursor:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Cursor piscante</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Usar cor de primeiro plano</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Tamanho de fonte</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Focar no terminal quando executar comando a partir de outro painel</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Exibir tamanho do arquivo</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Exibir tipo do arquivo</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Exibir data de última modificação</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Exibir arquivos ocultos</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interface</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Confirmar antes de sair</translation>
+    </message>
+    <message>
+        <location line="+103"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Exibir barra de status</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Texto inativo</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Ativo</translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation>Pequeno</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Grande</translation>
+    </message>
+    <message>
+        <location line="+181"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Background inactive</source>
+        <translation>Fundo inativo</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Inicialização do Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Caminho de inicialização</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Escolher</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Após coluna</translation>
+    </message>
+    <message>
+        <location line="+144"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Tab width min.</source>
+        <translation>Tamanho da guia: mín.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>máx.</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Isso funciona bem para fontes mono-espaçadas. A guia é desenhada numa posição baseada no tamanho do caractere espaço na fonte padrão. Pode não funcionar muito bem se os estilos usarem fontes proporcionais ou, no caso de fontes de tamanho variável, se negrito, itálico e texto normal forem usados também.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Habilitar Células de Código</translation>
     </message>
     <message>
         <location line="+61"/>
-        <source>Restore editor tabs from previous session on startup</source>
-        <translation>Restaurar abas de edição da sessão anterior durante inicialização</translation>
-    </message>
-    <message>
-        <location line="+60"/>
-        <source>Use custom file editor</source>
-        <translation>Usar editor de texto externo</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
     </message>
     <message>
         <location line="+32"/>
-        <source>Editor Styles</source>
-        <translation>Apresentação</translation>
-    </message>
-    <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecionar fonte, tamanho da fonte (variacão com relacão ao tamanho padrão), estilo da fonte (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor da fonte e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Exibir barra de rolagem horizontal</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Indentação</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Indentation uses tabs</source>
+        <translation>Indentar com caracteres tab</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Auto-completar</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>With Octave builtins</source>
+        <translation>Completar Octave builtins</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Completar funções Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Exibir automaticamente lista de auto-completar</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Manipulação de arquivos</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Recarregar arquivos alterados externamente sem confirmar</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecione a fonte: família, tamanho (variacão com relacão ao tamanho padrão), estilo (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor do texto e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Alterar o tamanho do histório apagará o seu conteúdo atual)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Tamanho do Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Exibir posição de depuração no terminal além de ressaltar no editor</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
+        <translation>Exibição</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Alternar cor das linhas</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Comportamento</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Restaurar diretório da sessão anterior</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Ocultar ajuda de contexto</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Edite uma tecla de atalho clicando duas vezes na célula correspondente</translation>
     </message>
     <message>
         <location line="+108"/>
-        <source>Terminal Colors</source>
-        <translation>Cores do Terminal</translation>
-    </message>
-    <message>
-        <location line="+45"/>
-        <source>Font</source>
-        <translation>Fonte</translation>
-    </message>
-    <message>
-        <location line="-757"/>
-        <source>Show line numbers</source>
-        <translation>Exibir números de linha</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Destacar linha atual</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Oferecer sugestões de preenchimento</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Exibir caminho completo no título da janela</translation>
-    </message>
-    <message>
-        <location line="-17"/>
-        <source>Show whitespace</source>
-        <translation>Exibir espaços em branco</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Não exibir espaços em branco usados para identação</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Número de caracteres digitados antes da apresentar sugestões de preenchimento</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Criar arquivos não existentes sem confirmar</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>linha de comando (%f=arquivo, %l=linha):</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Terminal</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Tipo do Indicador:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Rede</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Indicador piscante</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Usar cor de primeiro plano</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Tamanho de fonte</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Navegador de Arquivos</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Exibir tamanho do arquivo</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Exibir tipo do arquivo</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Exibir data de última modificação</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Exibir arquivos ocultos</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Cores de linhas alternantes</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Ambiente de Trabalho</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Cores das Categorias</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Rede</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation>Permitir Octave se conectar à Internet para mostrar notícias e informações recentes</translation>
+        <translation>Permitir Octave se conectar à Internet para exibir novidades e informações atuais</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Usar servidor proxy</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>Proxy HTTP</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>Conjunto de ícones para painéis</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Idioma (alteração exige reinicialização do Octave)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Tamanho dos ícones</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Manter diretório de trabalho sincronizado com o Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Cores para atributos de variáveis</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Teclas de Atalho</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Selecionar esta opção para prevenir conflitos com teclas de atalho do readline</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Desativar teclas de atalho globais quando o terminal estiver em foco</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Usar este conjunto</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Conjunto 1:</translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Idioma (alteração exige reinicialização do Octave)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exportar</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importar</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Tamanho dos ícones</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Sincronizar diretório atual do Octave com o Navegador de Arquivos</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Conjunto 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Ação</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Conjunto 1 Padrão</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Conjunto 1 Atual</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Conjunto 2 Dadrão</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Conjunto 2 Atual</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Proxy Socks 5</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
-        <translation>Nome do servidor:</translation>
+        <translation>Endereço do servidor:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
-        <translation>Tipo de Proxy:</translation>
+        <translation>Tipo de proxy:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Porta:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Nome de usuário:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Senha:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Configuração do sistema</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
-        <translation>Indicador IBeam</translation>
+        <translation>Cursor IBeam</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Block Cursor</source>
-        <translation>Indicador em Bloco</translation>
+        <translation>Cursor de Bloco</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Underline Cursor</source>
-        <translation>Indicador Sublinhado</translation>
-    </message>
-    <message>
-        <location line="+144"/>
+        <translation>Cursor Sublinhado</translation>
+    </message>
+    <message>
+        <location line="+213"/>
         <source>Difference to the default size</source>
-        <translation>Diferença com relação ao tamanho de fonto padrão</translation>
+        <translation>Diferença com relação ao tamanho de fonte padrão</translation>
     </message>
     <message>
         <location line="+6"/>
@@ -1945,6 +2711,16 @@
         <comment>short form for underlined</comment>
         <translation>s</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Definir Diretório de Inicialização do Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Alterar Diretório de Inicialização do Gerenciador de Arquivos</translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -1961,7 +2737,7 @@
     <message>
         <location line="+1"/>
         <source>Next</source>
-        <translation>Próximo</translation>
+        <translation>Avançar</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1977,9 +2753,9 @@
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Quando a interface gráfica do Octave se inicia, ela busca no sítio do Octave por notícias e informações recentes sobre a comunidade.
-A busca acontece no máximo uma vez por dia e as notícias só serão apresentadas se houver algo novo desde o último acesso.&lt;/p&gt;
-&lt;p&gt;Você também pode ver as notícias selecionando &quot;Notícias da Comunidade&quot; no menu &quot;Novidades&quot; na interface gráfica, ou visitando
+&lt;p&gt;Quando a interface gráfica do Octave se inicia, ela busca no sítio do Octave por novidades e informações recentes da comunidade.
+A busca acontece no máximo uma vez por dia e as notícias só serão apresentadas se houver algo de novo desde o último acesso.&lt;/p&gt;
+&lt;p&gt;Você também pode ver as notícias selecionando &quot;Novidades da Comunidade&quot; no menu &quot;Novidades&quot; na interface gráfica, ou visitando
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -1997,11 +2773,631 @@
 a:link { text-decoration: underline; color: #0000ff; }
 &lt;/style&gt;
 &lt;head/&gt;&lt;body&gt;
-&lt;p&gt;Permitir que o Octave se conecte à Internet durante a inicialização para buscar as notícias e informações atuais sobre a comunidade.&lt;/p&gt;
+&lt;p&gt;Permitir que o Octave se conecte à Internet durante a inicialização para buscar as novidades e informações atuais da comunidade.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Novo Arquivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nova Função</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nova Figura</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Abrir Arquivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Carregar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Salvar Ambiente de Trabalho Como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Preferências</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Sair do Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Copiar</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Colar</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Desfazer</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Limpar Área de Transferência</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Localizar Arquivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Limpar Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Limpar Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Limpar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Passo adentro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Passo afora</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Prosseguir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Sair do Modo Depuração</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Exibir Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Exibir Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Exibir Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Exibir Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Exibir Editor</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Exibir Documentação</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Gerenciador de Arquivos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentação</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Exibir Documentação em Disco (no Computador)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Exibir Documentação Online (na Internet)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Pacotes do Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Compartilhar Código Fonte</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Contribuir com o Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Recursos para Desenvolvedores</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Sobre o Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Notas da Versão</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Novidades da Comunidade</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Editar Função</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Salvar Arquivo</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Salvar Arquivo Como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Fechar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Fechar Todos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Imprimir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Refazer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Recortar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Localizar e Substituir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Deletar até Início da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Deletar até Final da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Deletar até Início da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Deletar até Final da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Deletar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Recortar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar Seleção/Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transpor linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Comentar Seleção</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Descomentar Seleção</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Seleção em Maiúsculas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Seleção em Minúsculas</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Indentar Seleção</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Remover Indentação da Seleção</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Vá para Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Mover para Parêntese/Chave/Colchete Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecionar até Parêntese/Chave/Colchete Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Habilitar/desabilitar Marcador</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Marcador Seguinte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Marcador Anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Remover Todos os Marcadores</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Preferências de Estilo</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Exibir Números de Linha</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished">Passo-a-passo</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished">Restaurar Layout Padrão das Janelas</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished">Reportar Defeito</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished">Fechar Demais Arquivos</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Exibir Finais de Linha</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Exibir Guias de Indentação</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Exibir Guia de Linhas Longas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Mais Zoom</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Menos Zoom</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Zoom Normal</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Ativar/desativar Ponto de Parada</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Ponto de Parada Seguinte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Ponto de Parada Anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Remover Todos Pontos de Parada</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Executar Arquivo</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Executar Seleção</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Ajuda na Palavra-chave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Documentação na Palavra-chave</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Principal</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Arquivo</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Editar</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Depurar</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Janela</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Ajuda</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Novidades</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Visualizar</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Executar</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Entre nova Tecla de atalho para Conjunto %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Aplicar tecla de atalho desejada ou clique no botão à direita para resetá-la para o padrão.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Digite as teclas de atalho pressionando-as diretamente</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Tecla de atalho atual</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Tecla de atalho padrão</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Usar padrão</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Tecla de Atalho Dupla</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>A tecla de atalho escolhida
+&quot;%1
+já é usada para a ação
+&quot;%2&quot;
+Você quer usar a tecla de atalho de qualquer forma, removendo-a da outra ação? </translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Importar conjunto de teclas de atalho %1 de arquivo...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Arquivos de teclas de atalho do Octave (*.osc);; Todos Arquivos (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Exportar conjunto de teclas de atalho %1 para arquivo... </translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Falha ao abrir %1 como arquivo de teclas de atalho do Octave</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2012,7 +3408,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>Digite aqui e pressione &apos;Enter&apos; para buscar</translation>
     </message>
@@ -2021,6 +3417,16 @@
         <source>Global search</source>
         <translation>Busca global</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Erro</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>O arquivo de informação &lt;p&gt;%1&lt;p&gt; ou versões comprimidas não existem</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2054,8 +3460,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Categoria</translation>
+        <source>Attribute</source>
+        <translation>Atributo</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2072,19 +3478,34 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Ambiente de Trabalho</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>View the variables in the active workspace.</source>
-        <translation>Visualizar variáveis no Ambiente de Trabalho.</translation>
-    </message>
-    <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Copiar</translation>
+        <translation>Visualizar variáveis no Ambiente de Trabalho ativo.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Digite para filtrar o Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Copiar nome</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Copiar valor</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2092,19 +3513,19 @@
         <translation>Renomear</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>Somente símbolos do nível mais alto podem ser renomeados.</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
-        <translation>Visualizar as variáveis no Ambiente de Trabalho.&lt;br&gt;</translation>
+        <translation>Visualizar as variáveis no Ambiente de Trabalho ativo.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Cores das categorias:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Cores de atributos de variáveis:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/pt_PT.ts
+++ b/libgui/languages/pt_PT.ts
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.0" language="pt_PT" sourcelanguage="pt_BR">
+<TS version="2.0" language="pt_PT" sourcelanguage="en">
 <context>
     <name>ListDialog</name>
     <message>
         <location filename="../src/dialog.cc" line="+251"/>
         <source>Select All</source>
-        <translation>Seleccionar Tudo</translation>
+        <translation>Selecionar Tudo</translation>
     </message>
 </context>
 <context>
@@ -19,7 +19,7 @@
     <message>
         <location line="+1"/>
         <source>function</source>
-        <translation>função</translation>
+        <translation>funcção</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -34,7 +34,7 @@
     <message>
         <location line="+1"/>
         <source>inherited</source>
-        <translation>herdada</translation>
+        <translation>herdado(a)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -54,23 +54,18 @@
     <message>
         <location line="+1"/>
         <source>selection</source>
-        <translation>selecçao</translation>
+        <translation>selecção</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>cursor</source>
-        <translation>indicador</translation>
-    </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>cursor</translation>
     </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
@@ -80,17 +75,22 @@
         <translation>Colar</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Seleccionar Tudo</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
         <translation>Limpar Tudo</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
-        <translation>selecçao copiada para a área de transferência</translation>
+        <translation>selecção copiada para a área de transferência</translation>
     </message>
 </context>
 <context>
@@ -98,7 +98,7 @@
     <message>
         <location filename="../../../qsci/qscilexerbash.cpp" line="+208"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -118,17 +118,17 @@
     <message>
         <location line="+3"/>
         <source>Keyword</source>
-        <translation>Palavra chave</translation>
+        <translation>Palavra reservada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -143,27 +143,27 @@
     <message>
         <location line="+3"/>
         <source>Scalar</source>
-        <translation>Escalar</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Parameter expansion</source>
-        <translation>Expansão de parâmetro</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Backticks</source>
-        <translation>Acentos graves</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Here document delimiter</source>
-        <translation>Delimitador de here-doc</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted here document</source>
-        <translation>here-doc com apóstrofos</translation>
+        <translation></translation>
     </message>
 </context>
 <context>
@@ -171,7 +171,7 @@
     <message>
         <location filename="../../../qsci/qscilexerbatch.cpp" line="+179"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -181,22 +181,22 @@
     <message>
         <location line="+3"/>
         <source>Keyword</source>
-        <translation>Palavra chave</translation>
+        <translation>Palavra reservada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Label</source>
-        <translation>Etiqueta</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Hide command character</source>
-        <translation>Carácter para esconder comando</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>External command</source>
-        <translation>Comando externo</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -214,12 +214,12 @@
     <message>
         <location filename="../../../qsci/qscilexercpp.cpp" line="+352"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive default</source>
-        <translation>Padrão inactivo</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -229,7 +229,7 @@
     <message>
         <location line="+3"/>
         <source>Inactive C comment</source>
-        <translation>Comentário C inactivo</translation>
+        <translation>Comentário C desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -239,17 +239,17 @@
     <message>
         <location line="+3"/>
         <source>Inactive C++ comment</source>
-        <translation>Comentário C++ inactivo</translation>
+        <translation>Comentário C++ desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>JavaDoc style C comment</source>
-        <translation>Comentário C ao estilo JavaDoc</translation>
+        <translation>Comentário C estilo JavaDoc</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive JavaDoc style C comment</source>
-        <translation>Comentário C inactivo ao estilo JavaDoc</translation>
+        <translation>Comentário C estilo JavaDoc desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -259,57 +259,57 @@
     <message>
         <location line="+3"/>
         <source>Inactive number</source>
-        <translation>Número inactivo</translation>
+        <translation>Número desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Keyword</source>
-        <translation>Palavra chave</translation>
+        <translation>Palavra reservada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive keyword</source>
-        <translation>Palavra chave inactiva</translation>
+        <translation>Palavra reservada desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive double-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation>Double-quoted string desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive single-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation>Single-quoted string desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>IDL UUID</source>
-        <translation>IDL UUID</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive IDL UUID</source>
-        <translation>IDL UUID inactivo</translation>
+        <translation>IDL UUID desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Pre-processor block</source>
-        <translation>Bloco de pre-processador</translation>
+        <translation>Bloco pre-processador</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive pre-processor block</source>
-        <translation>Bloco de pre-processador inactivo</translation>
+        <translation>Bloco pre-processador desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -319,7 +319,7 @@
     <message>
         <location line="+3"/>
         <source>Inactive operator</source>
-        <translation>Operador inactivo</translation>
+        <translation>Operador desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -329,97 +329,97 @@
     <message>
         <location line="+3"/>
         <source>Inactive identifier</source>
-        <translation>Identificador inactivo</translation>
+        <translation>Identificador desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Unclosed string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive unclosed string</source>
-        <translation type="unfinished"></translation>
+        <translation>Unclosed string desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>C# verbatim string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive C# verbatim string</source>
-        <translation type="unfinished"></translation>
+        <translation>C# verbatim string desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>JavaScript regular expression</source>
-        <translation>Expressão regular de JavaScript</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive JavaScript regular expression</source>
-        <translation>Expressão regular de JavaScript inactiva</translation>
+        <translation>JavaScript regular expression desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>JavaDoc style C++ comment</source>
-        <translation>Comentário C++ ao estilo JavaDoc</translation>
+        <translation>C++ comentário estilo JavaDoc</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive JavaDoc style C++ comment</source>
-        <translation>Comentário C++ inactivo ao estilo JavaDoc</translation>
+        <translation>C++ comentário estilo JavaDoc desactivado</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Secondary keywords and identifiers</source>
-        <translation>Palavras chaves e identificadores secundários</translation>
+        <translation>Palavras reservadas e identificadores secundários</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive secondary keywords and identifiers</source>
-        <translation>Palavras chaves e identificadores secundários inactivos</translation>
+        <translation>Palavras reservadas e identificadores secundários desactivados</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>JavaDoc keyword</source>
-        <translation>Palavra chave de JavaDoc</translation>
+        <translation>Palavra reservada JavaDoc</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive JavaDoc keyword</source>
-        <translation>Palavra chave de JavaDoc inactiva</translation>
+        <translation>Palavra reservada JavaDoc desactivada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>JavaDoc keyword error</source>
-        <translation>Erro de palavra chave Javadoc</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive JavaDoc keyword error</source>
-        <translation>Erro de palavra chave Javadoc inactiva</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Global classes and typedefs</source>
-        <translation>Classes globais e typedefs</translation>
+        <translation>Classes e typedefs globais</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive global classes and typedefs</source>
-        <translation>Classes globais e typedefs inactivas</translation>
+        <translation>Classes e typedefs globais desactivadas</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>C++ raw string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive C++ raw string</source>
-        <translation type="unfinished"></translation>
+        <translation>C++ raw string desactivada</translation>
     </message>
 </context>
 <context>
@@ -427,7 +427,7 @@
     <message>
         <location filename="../../../qsci/qscilexerdiff.cpp" line="+107"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -442,7 +442,7 @@
     <message>
         <location line="+3"/>
         <source>Header</source>
-        <translation>Cabeçalho</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -470,7 +470,7 @@
     <message>
         <location filename="../../../qsci/qscilexermatlab.cpp" line="+138"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -490,12 +490,12 @@
     <message>
         <location line="+3"/>
         <source>Keyword</source>
-        <translation>Palavra chave</translation>
+        <translation>Palavra reservada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -510,7 +510,7 @@
     <message>
         <location line="+3"/>
         <source>Double-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
 </context>
 <context>
@@ -518,7 +518,7 @@
     <message>
         <location filename="../../../qsci/qscilexerperl.cpp" line="+333"/>
         <source>Default</source>
-        <translation>Padrão</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -533,7 +533,7 @@
     <message>
         <location line="+3"/>
         <source>POD</source>
-        <translation>POD</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -543,17 +543,17 @@
     <message>
         <location line="+3"/>
         <source>Keyword</source>
-        <translation>Palavra chave</translation>
+        <translation>Palavra reservada</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted string</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -568,17 +568,17 @@
     <message>
         <location line="+3"/>
         <source>Scalar</source>
-        <translation>Escalar</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Array</source>
-        <translation>Array</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Hash</source>
-        <translation>Tabela hash</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -588,7 +588,7 @@
     <message>
         <location line="+3"/>
         <source>Regular expression</source>
-        <translation>Expressão regular</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -598,127 +598,127 @@
     <message>
         <location line="+3"/>
         <source>Backticks</source>
-        <translation>Acentos graves</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Data section</source>
-        <translation>Secção DATA</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Here document delimiter</source>
-        <translation>Delimitador de here-doc</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Single-quoted here document</source>
-        <translation type="unfinished">here-doc com apóstrofos</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted here document</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Backtick here document</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (q)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qq)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qx)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qr)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qw)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>POD verbatim</source>
-        <translation>POD literal</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Subroutine prototype</source>
-        <translation>Protótipo de subrotina</translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Format identifier</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Format body</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted string (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Translation</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Regular expression (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Substitution (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Backticks (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Double-quoted here document (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Backtick here document (interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qq, interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qx, interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Quoted string (qr, interpolated variable)</source>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
 </context>
 <context>
@@ -746,7 +746,7 @@
     <message>
         <location line="+6"/>
         <source>&amp;Paste</source>
-        <translation>Colar</translation>
+        <translation>&amp;Colar</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -756,7 +756,128 @@
     <message>
         <location line="+7"/>
         <source>Select All</source>
-        <translation>Seleccionar Tudo</translation>
+        <translation>Selecionar Tudo</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Barra de Ferramentas de Figuras</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Eixos</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Grelha</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Ajustar automáticamente</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Guardar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Guardar &amp;Como</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Fechar Figura</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Editar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>&amp;Copiar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Cor&amp;tar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Colar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ajuda</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;Sobre QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>Sobre &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>Sobre QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Guardar Figura Como</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Rodar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Ampliar</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Diminuir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Mover</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Inserir Texto</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Selecionar</translation>
     </message>
 </context>
 <context>
@@ -769,78 +890,66 @@
     <message>
         <location line="+1"/>
         <source>See the documentation for help.</source>
-        <translation>Veja a documentação para ajuda.</translation>
+        <translation>Ver a documentação para obter ajuda.</translation>
     </message>
 </context>
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Editor do Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Scripts de Octave (*.m);;Todos os Ficheiros (*)</translation>
+        <translation>Ficheiros do Octave (*.m);;Todos os Ficheiros (*)</translation>
     </message>
     <message>
         <location line="-40"/>
         <source>New Function</source>
-        <translation>Nova função</translation>
+        <translation>Nova Função</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>New function name:
 </source>
-        <translation>Nome da nova função:
-</translation>
-    </message>
-    <message>
-        <location line="+281"/>
+        <translation>Nome da nova função:</translation>
+    </message>
+    <message>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
-        <translation>Ficheiro não foi gravado! Um ficheiro com o nome selecionado
-%1
-já está aberto no editor</translation>
-    </message>
-    <message>
-        <location line="+255"/>
+        <translation>O ficheiro não foi guardado! Um ficheiro com o nome selecionado %1 já está aberto no editor</translation>
+    </message>
+    <message>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
-        <translation>&amp;%1 %2</translation>
-    </message>
-    <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>&amp;Novo Ficheiro</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Guardar Ficheiro</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Abrir Ficheiro...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Guardar Ficheiro &amp;Como...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Imprimir...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>&amp;Desfazer</translation>
     </message>
@@ -850,62 +959,62 @@
         <translation>&amp;Refazer</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copiar</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Cor&amp;tar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Colar</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>Marcador &amp;Seguinte</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Marcardor &amp;Anterior</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Cor&amp;tar</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Colar</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>Activar/Desactivar &amp;Marcador</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>&amp;Próximo Marcador</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Marcardor &amp;Anterior</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>Habilitar/desabilitar &amp;Marcador</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Remover Todos os Marcadores</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
-        <translation>Ponto de interrupção segui&amp;nte</translation>
+        <translation>Breakpoint &amp;Seguinte</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Pre&amp;vious Breakpoint</source>
-        <translation>Ponto de interrupção anterior</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Breakpoint &amp;Anterior</translation>
+    </message>
+    <message>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
-        <translation>Activar/desactivar ponto de interrupção</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Activar/Desactivar Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
-        <translation>&amp;Remover todos os pontos de interrupção</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Remover Todos os Breakpoints</translation>
+    </message>
+    <message>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Comentar</translation>
     </message>
@@ -915,57 +1024,238 @@
         <translation>&amp;Descomentar</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Buscar e Substituir...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation>Gravar ficheiro e executar</translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Indentar</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Remover Indentação</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Localizar e Substituir...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Guardar Ficheiro e Executá-lo</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
-        <translation>Ir para &amp;Linha...</translation>
-    </message>
-    <message>
-        <location line="+55"/>
+        <translation>Ir para a &amp;Linha...</translation>
+    </message>
+    <message>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Não foi possível iniciar o editor de ficheiro externo %1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Criar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Cancelar</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
-        <translation>Ficheiros &amp;recentes</translation>
-    </message>
-    <message>
-        <location line="+11"/>
+        <translation>Ficheiros &amp;Recentes</translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Editar Função</translation>
     </message>
     <message>
+        <location line="+12"/>
+        <source>&amp;Close</source>
+        <translation>&amp;Fechar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close All</source>
+        <translation>Fechar Todos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Close Other Files</source>
+        <translation>Fechar Outros Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
         <location line="+10"/>
-        <source>&amp;Close</source>
-        <translation>&amp;Fechar</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Close All</source>
-        <translation>Fechar Todos</translation>
+        <source>&amp;Commands</source>
+        <translation>&amp;Comandos</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Apagar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Cortar Linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Apagar até ao Início da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Apagar até ao Fim da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Apagar até ao Início da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Apagar até ao Fim da Linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar Selecção/Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transpor linha</translation>
     </message>
     <message>
         <location line="+5"/>
-        <source>Close Other Files</source>
-        <translation>Fechar os Outros Ficheiros</translation>
-    </message>
-    <message>
-        <location line="+31"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished">&amp;Mostrar Lista de Auto-completar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Formatar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>M&amp;AIÚSCULAS</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>M&amp;INÚSCULAS</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Converter Fins de Linha para &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Converter Fins de Linha para &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Converter Fins de Linha para &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Nave&amp;gação</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Mover para o Parênteses Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecionar até ao Parênteses Correspondente</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Preferências...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>Preferências de &amp;Estilo...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>Preferências de &amp;Estilo...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>&amp;Visualizar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Mostrar &amp;Números de Linha</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Mostrar &amp;Fins de Linha</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Mostrar &amp;Guias de Indentação</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Mostrar &amp;Guia de Linhas Longas</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>&amp;Aumentar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>&amp;Diminuir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>Tamanho &amp;Normal</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>Executar &amp;Selecção</translation>
     </message>
@@ -975,17 +1265,17 @@
         <translation>&amp;Ajuda</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
-        <translation>&amp;Ajuda da Palavra-chave</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Ajuda na Palavra Reservada</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
-        <translation>&amp;Documentação da Palavra-chave</translation>
-    </message>
-    <message>
-        <location line="-741"/>
+        <translation>&amp;Documentação da Palavra Reservada</translation>
+    </message>
+    <message>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -994,16 +1284,16 @@
 para leitura: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
-        <translation>O ficheiro
+        <translation>Ficheiro
 %1
 não existe. Deseja criá-lo?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -1012,32 +1302,32 @@
 para escrita: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>A aba do editor associada ao ficheiro desapareceu.</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Ficheiro</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>Nova &amp;função</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Mostrar &amp;Whitespace</translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
-        <translation>&amp;Depurar</translation>
-    </message>
-    <message>
-        <location line="+9"/>
+        <translation>&amp;Debug</translation>
+    </message>
+    <message>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Executar</translation>
     </message>
@@ -1045,9 +1335,34 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>eol:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>linha:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>col:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 é uma função interna</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Não foi possível encontrar função %1</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
-        <translation>Ir para linha</translation>
+        <translation>Ir para a linha</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1055,53 +1370,62 @@
         <translation>Número da linha</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;sem_nome&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Você deseja guardar ou descartar as alterações?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>O ficheiro
+
+  %1
+
+vai ser fechado mas foi modificado.  %2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Fins de Linha:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Ficheiros Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Todos os Ficheiros (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
-        <translation>Você deseja cancelar o fecho, guardar, ou descartar as alterações?</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <translation>Deseja cancelar o fecho, guardar as alterações, ou descartá-las?</translation>
+    </message>
+    <message>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Editor do Octave</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>O ficheiro
-%1
-está prestes a ser fechado mas foi modificado.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Ficheiros de Octave (*.m);; Todos os Ficheiros (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
         <translation>
 
-Aviso: O conteúdo no editor foi modificado!</translation>
+Alerta: O conteúdo aberto no editor foi modificado!</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -1110,132 +1434,132 @@
 has been deleted or renamed. Do you want to save it now?%2</source>
         <translation>Parece que o ficheiro
 %1
-foi removido ou renomeado. Pretende guardá-lo agora?%2</translation>
-    </message>
-    <message>
-        <location line="-172"/>
+foi apagado ou movido. Gostaria de guardar agora?%2</translation>
+    </message>
+    <message>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
-        <translation>Não foi possível abrir o ficheiro %1 para escrita:
+        <translation>Não foi possível abrir ficheiro %1 para escrita:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>Linha:</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>Col:</translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+não é um identificador válido.
+
+Se manter esse nome de ficheiro, não será possivel 
+executar esse script como um comando no Octave.
+
+Deseja escolher outro nome? </translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
-        <translation>Parece que o ficheiro &apos;%1&apos; foi modificado por outro aplicativo. Deseja recarregá-lo?</translation>
+        <translation>Parece que o ficheiro &apos;%1&apos; foi modificado por outra aplicativo. Deseja recarregá-lo?</translation>
     </message>
 </context>
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Navegador de Ficheiros</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Browse your files.</source>
-        <translation>Navegue pelos seus ficheiros.</translation>
+        <translation>Navegar ficheiros.</translation>
     </message>
     <message>
         <location line="+18"/>
         <source>Enter the path or filename</source>
-        <translation>Introduza o caminho ou nome do ficheiro</translation>
-    </message>
-    <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>Subir um nível de directório</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <translation>Introduzir o local ou nome de ficheiro</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Ir para o directório do Octave</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>Acções no directório actual</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Ir para...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
-        <translation>Procurar Ficheiros...</translation>
-    </message>
-    <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Novo Ficheiro</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>Localizar Ficheiros...</translation>
+    </message>
+    <message>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>Novo Directório</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>Clicar duas vezes num ficheiro para o abrir</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
-        <translation>Mostrar o directório actual do Octave</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <translation>Exibir o directório do Octave</translation>
+    </message>
+    <message>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Um nível acima</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>Ir para o directório actual do Octave</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Set Octave directory</source>
-        <translation>Definir o directório actual do Octave</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>Definir o directório actual do Octave para o directório actual do navegador</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <translation>Definir directório do Octave</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Show Home Directory</source>
-        <translation>Mostrar directório pessoal</translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>Procurar no directório...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Encontrar Ficheiros...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Mostrar Directório Pessoal</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Novo Ficheiro...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>Novo Directório...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Duplo-clique para activar, botão direito para alternativas</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
-        <translation>Tamanho de ficheiro</translation>
+        <translation>Tamanho do ficheiro</translation>
     </message>
     <message>
         <location line="+8"/>
         <source>File type</source>
-        <translation>Tipo de ficheiro</translation>
+        <translation>Tipo do ficheiro</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -1245,17 +1569,17 @@
     <message>
         <location line="+8"/>
         <source>Show hidden</source>
-        <translation>Mostrar ficheiros escondidos</translation>
-    </message>
-    <message>
-        <location line="+24"/>
+        <translation>Mostrar ocultos</translation>
+    </message>
+    <message>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Abrir</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Open in Default Application</source>
-        <translation>Abrir no Aplicativo Padrão</translation>
+        <translation>Abrir no Programa Default</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1275,59 +1599,58 @@
     <message>
         <location line="+6"/>
         <source>Set Current Directory</source>
-        <translation>Definir Directório Actual</translation>
-    </message>
-    <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Renomear</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Excluir</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <translation>Definir como Directório Actual</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Mudar nome...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Apagar...</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
-        <translation>Renomear ficheiro/directório</translation>
+        <translation>Mudar nome do ficheiro/directório</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Rename file/directory:
 </source>
-        <translation>Renomear ficheiro/directório:
-</translation>
+        <translation>Mudar nome do ficheiro/directório:</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>
  to: </source>
         <translation>
- para:</translation>
+para:</translation>
     </message>
     <message>
         <location line="+25"/>
         <location line="+14"/>
         <source>Delete file/directory</source>
-        <translation>Remover ficheiro/directório</translation>
+        <translation>Apagar ficheiro/directório</translation>
     </message>
     <message>
         <location line="-13"/>
         <source>Are you sure you want to delete
 </source>
-        <translation>Tem a certeza que deseja remover
+        <translation>Tem certeza que deseja apagar
 </translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Can not delete a directory that is not empty</source>
-        <translation>Não é possível remover um directório que não está vazio</translation>
-    </message>
-    <message>
-        <location line="+144"/>
+        <translation>Não é possível apagar um directório que não está vázio</translation>
+    </message>
+    <message>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
-        <translation>Definir directório do navegador de ficheiros</translation>
+        <translation>Definir directório do nagevador de ficheiros</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -1343,7 +1666,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Novo Ficheiro.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Criar Directório</translation>
     </message>
@@ -1359,9 +1687,9 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
-        <translation>Diverte-te!</translation>
+        <translation>Aproveite!</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -1382,13 +1710,13 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Esperamos que o Octave lhe seja uma ferramenta útil.&lt;/p&gt;
-&lt;p&gt;Se encontrar problemas, existem várias formas de obter ajuda: suporte comercial; um grupo de discussão; uma wiki; e vários outros métodos baseados na comunidade do Octave.
-É possível encontrar mais informações sobre cada um destes online em &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (abre num navegador externo).&lt;/p&gt;
+&lt;p&gt;Esperamos que Octave lhe seja uma ferramenta útil.&lt;/p&gt;
+&lt;p&gt;Se encontrar problemas, existem várias formas de obter ajuda, incluindo suporte comercial, a mailing list, a wiki, e outras formas de suporte baseadas na comunidade do Octave.
+Pode encontrar mais informações sobre cada uma destas hipóteses em &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (abre no browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
@@ -1410,11 +1738,11 @@
 a:link { text-decoration: underline; color: #0000ff; }
 &lt;/style&gt;
 &lt;head/&gt;&lt;body&gt;
-&lt;p&gt;Para mais informação sobre Octave::&lt;/p&gt;
+&lt;p&gt;Para mais informações sobre o Octave:&lt;/p&gt;
 &lt;ul&gt;
-&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (abre num navegador externo)&lt;/li&gt;
-&lt;li&gt;Obtenha a documentação online em &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- ou documento-&lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt; &lt;/li&gt;
-&lt;li&gt;Abrir o navegador de documentação do Octave com o menu de ajuda&lt;/li&gt;
+&lt;li&gt;Visite &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;Documentação online em formator &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;HTML&lt;/a&gt;- ou &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;PDF&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;Abra a documentação dentro da GUI do Octave através do menu Ajuda&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -1422,9 +1750,14 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Localizar e Substituir</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
-        <translation>Procurar por:</translation>
+        <translation>&amp;Localizar texto:</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1434,27 +1767,27 @@
     <message>
         <location line="+4"/>
         <source>Match &amp;case</source>
-        <translation>Equivaler capitalização</translation>
+        <translation>Considerar &amp;maiúsculas/minúsculas</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Search from &amp;start</source>
-        <translation>Procurar a partir do início</translation>
+        <translation>Localizar a partir do &amp;início</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>&amp;Wrap while searching</source>
-        <translation>Dar a volta durante a procura</translation>
+        <translation>Retornar ao início se alcançar o &amp;final durante a busca</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>&amp;Find Next</source>
-        <translation>Buscar &amp;Próximo</translation>
+        <translation>Localizar &amp;Próximo</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Find &amp;Previous</source>
-        <translation>Buscar &amp;Anterior</translation>
+        <translation>Localizar &amp;Anterior</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1469,12 +1802,12 @@
     <message>
         <location line="+2"/>
         <source>&amp;More...</source>
-        <translation>&amp;Mais...</translation>
+        <translation>&amp;Mais opções...</translation>
     </message>
     <message>
         <location line="+13"/>
         <source>&amp;Whole words</source>
-        <translation>Palavras inteiras</translation>
+        <translation>Palavras &amp;inteiras</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1484,25 +1817,25 @@
     <message>
         <location line="+1"/>
         <source>Search &amp;backward</source>
-        <translation>Procurar para trás</translation>
+        <translation>Localizar para &amp;trás</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Search se&amp;lection</source>
-        <translation>Procurar dentro da selecção</translation>
-    </message>
-    <message>
-        <location line="+71"/>
+        <translation>Localizar dentro do texto &amp;selecionado</translation>
+    </message>
+    <message>
+        <location line="+84"/>
         <source>Search from end</source>
-        <translation>Procurar a partir do fim</translation>
+        <translation>Localizar a partir do final</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Search from start</source>
-        <translation>Procurar a partir do início</translation>
-    </message>
-    <message>
-        <location line="+121"/>
+        <translation>Localizar a partir do início</translation>
+    </message>
+    <message>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>Substituir Resultado</translation>
     </message>
@@ -1512,14 +1845,14 @@
         <translation>%1 itens substituidos</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
-        <translation>Buscar Resultado</translation>
+        <translation>Localizar Resultado</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>No more matches found</source>
-        <translation>Não foi encontrado mais nenhum resultado</translation>
+        <translation>Sem mais ocorrências</translation>
     </message>
 </context>
 <context>
@@ -1527,67 +1860,52 @@
     <message>
         <location filename="../src/find-files-dialog.cc" line="+52"/>
         <source>Find Files</source>
-        <translation>Procurar Ficheiros</translation>
+        <translation>Localizar Ficheiros</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>Named:</source>
-        <translation>Chamados:</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>Introduza a expressão para o nome do ficheiro</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <translation>Nome de ficheiro:</translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>Start in:</source>
-        <translation>Iniciar em:</translation>
+        <translation>Directório inicial:</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Enter the start directory</source>
-        <translation>Introduzir o directório inicial</translation>
+        <translation>Digite o directório inicial</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Browse...</source>
-        <translation>Navegar...</translation>
+        <translation>Escolher...</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Browse for start directory</source>
-        <translation>Navegar por directório inicial</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>Entrar em sub-directórios</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Escolha o directório inicial</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
-        <translation>Procurar recursivamente pelos directórios por ficheiros correspondentes</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>Incluir directórios</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Buscar recursivamente nos sub-directórios por ficheiros correspondentes</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
-        <translation>Incluir directórios correspondentes nos resultado da pesquisa</translation>
+        <translation>Incluir directórios correspondentes no resultado da busca</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Name case insensitive</source>
-        <translation>Insensível à capitalização</translation>
+        <translation>Não diferenciar maiúsculas/minúsculas no nome</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set matching name is case insensitive</source>
-        <translation>Definir se o nome é insensível à capitalização</translation>
+        <translation>Definir se nome é insensível a maúscula/minúscula</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1595,44 +1913,59 @@
         <translation>Contém texto:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>Pesquisa precisa corresponder ao texto</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Entre a expressão de busca para nomes de ficheiro</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation>Procurar em subdirectórios</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>Incluir nomes de directórios</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Entre a expressão de procura para conteúdo de ficheiros</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Text to match</source>
-        <translation>Texto para corresponder</translation>
+        <translation>Texto a procurar</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Text case insensitive</source>
-        <translation>Texto insensível à capitalização</translation>
+        <translation>Não diferenciar maiúsculas/minúsculas no texto</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set text content is case insensitive</source>
-        <translation>Definir se o texto é insensível à capitalização</translation>
+        <translation>Definir se texto é insensível a maiúscula/minúscula</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Search results</source>
-        <translation>Resultados de pesquisa</translation>
+        <translation>Resultados da procura</translation>
     </message>
     <message>
         <location line="+17"/>
         <source>Idle.</source>
-        <translation>Parado.</translation>
+        <translation>Aguardando.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Find</source>
-        <translation>Buscar</translation>
+        <translation>Localizar</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Start search for matching files</source>
-        <translation>Iniciar procura por ficheiros correspondentes</translation>
+        <translation type="unfinished">Iniciar procura por ficheiros correspondentes</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1647,7 +1980,7 @@
     <message>
         <location line="+15"/>
         <source>File name/location</source>
-        <translation>Nome/localização do ficheiro</translation>
+        <translation>Nome/local do ficheiro</translation>
     </message>
     <message>
         <location line="+17"/>
@@ -1657,12 +1990,17 @@
     <message>
         <location line="+105"/>
         <source>Searching...</source>
-        <translation>Procurando...</translation>
-    </message>
-    <message>
-        <location line="+32"/>
+        <translation>A procurar...</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 resultado(s)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
-        <translation>Definir directório de procura</translation>
+        <translation>Definir directório de busca</translation>
     </message>
 </context>
 <context>
@@ -1681,37 +2019,42 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
-        <translation>Navegar e procurar no histórico de comandos.</translation>
+        <translation>Navegar e buscar no histórico de comandos.</translation>
     </message>
     <message>
         <location line="+24"/>
         <source>Double-click a command to transfer it to the terminal.</source>
-        <translation>Clicar duas vezes num comando para transferir para a linha de comandos</translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Introduza texto para filtrar o histórico de comandos.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Clique duas vezes num comando para transferi-lo ao terminal.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Digite para filtrar o histórico de comandos</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Evaluate</source>
-        <translation>Avaliar</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <translation>Executar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Criar script</translation>
     </message>
@@ -1721,12 +2064,12 @@
     <message>
         <location filename="../src/welcome-wizard.cc" line="-179"/>
         <source>Welcome to Octave!</source>
-        <translation>Bem-vindo ao Octave!</translation>
+        <translation>Bem-vindo(a) ao Octave!</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Next</source>
-        <translation>Próximo</translation>
+        <translation>Avançar</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1741,62 +2084,52 @@
 &lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Parece que está a utilizar a interface gráfica do Octave pela primeira vez neste computador.
-Clique &apos;Próximo&apos; para criar um ficheiro de configuração e iniciar o Octave.&lt;/p&gt;
-&lt;p&gt;O ficheiro de configuração é gravado em in&lt;br&gt;%1.&lt;/p&gt;
+&lt;p&gt;Parece que você está usando a interface gráfica do Octave pela primeira vez neste computador.
+Clique em &apos;Avançar&apos; para criar um ficheiro de configuração e iniciar o Octave.&lt;/p&gt;
+&lt;p&gt;O ficheiro de configuração é armazenado em&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
-        <translation>Carregar ambiente de trabalho</translation>
-    </message>
-    <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <translation>Carregar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Sobre o Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
-        <translation>Ficheiro</translation>
-    </message>
-    <message>
-        <location line="+54"/>
+        <translation>&amp;Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+49"/>
         <source>New</source>
         <translation>Novo</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Script</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>Figura</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Abrir...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Preferências...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Sair</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
@@ -1806,22 +2139,22 @@
         <translation>Desfazer</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Copiar</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Colar</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
-        <translation>Guardar Ambiente de Trabalho como</translation>
-    </message>
-    <message>
-        <location line="+124"/>
+        <translation>Guardar Ambiente de Trabalho Como</translation>
+    </message>
+    <message>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>O ficheiro de notas da versão &apos;%1&apos; está vazio.</translation>
     </message>
@@ -1836,19 +2169,44 @@
         <translation>Notas da Versão do Octave</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
-        <translation>Notícias da comunidade Octave</translation>
-    </message>
-    <message>
-        <location line="+939"/>
+        <translation>Novidades da Comunidade</translation>
+    </message>
+    <message>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Tem certeza que deseja sair do Octave?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Abrir um ficheiro existente no editor</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Nova Função...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Nova Figura</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation>Limpar Área de Transferência</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
-        <translation>Encontrar Ficheiros...</translation>
+        <translation>Localizar Ficheiros...</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -1866,7 +2224,7 @@
         <translation>Limpar Ambiente de Trabalho</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>De&amp;purar</translation>
     </message>
@@ -1878,62 +2236,57 @@
     <message>
         <location line="+12"/>
         <source>Continue</source>
-        <translation>Continuar</translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Sair do Modo de Depuração</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <translation>Prosseguir</translation>
+    </message>
+    <message>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Mostrar Navegador de Ficheiros</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Navegador de Ficheiros</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;Esta é uma versão experimental da interface gráfica para Octave.&lt;/strong&gt;  Octave é um projecto activo em constante desenvolvimento e a interface gráfica será a interface padrão para a versão 4.0. Para mais informações, ver as &quot;Notas de versão&quot; no menu &quot;Novidades&quot;, ou visitar &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="-151"/>
+        <translation>Passo adentro</translation>
+    </message>
+    <message>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
-        <translation>Carregar ambiente de trabalho...</translation>
+        <translation>Carregar Ambiente de Trabalho...</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Save Workspace As...</source>
-        <translation>Guardar Ambiente de Trabalho como...</translation>
-    </message>
-    <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Função...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <translation>Guardar Ambiente de Trabalho Como...</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Novo Script</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <translation>Passo afora</translation>
+    </message>
+    <message>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
-        <translation>Restaurar Disposição de Janelas Padrão</translation>
-    </message>
-    <message>
-        <location line="+77"/>
+        <translation>Restaurar Layout Padrão das Janelas</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Octave Packages</source>
-        <translation>Pacotes do Octave</translation>
+        <translation>Bibliotecas do Octave</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1948,20 +2301,20 @@
     <message>
         <location line="+3"/>
         <source>Octave Developer Resources</source>
-        <translation>Recursos para Programadores do Octave</translation>
-    </message>
-    <message>
-        <location line="+32"/>
+        <translation>Recursos para Programadores</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>On Disk</source>
-        <translation>No Disco</translation>
+        <translation>No Disco (Em Seu Computador)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Online</source>
-        <translation>Na Internet</translation>
-    </message>
-    <message>
-        <location line="+12"/>
+        <translation>Online (na Internet)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Novidades</translation>
     </message>
@@ -1976,113 +2329,107 @@
         <translation>Novidades da Comunidade</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>Mais informações</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>Esconder</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>Informação sobre a interface gráfica experimental</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Barra de Ferramentas</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
-        <translation>Introduzir nome do directório</translation>
+        <translation>Digite o nome do directório</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Current Directory: </source>
-        <translation>Directório Actual</translation>
+        <translation>Directório Actual:</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>One directory up</source>
-        <translation>Um nível de directório acima</translation>
-    </message>
-    <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <translation>Directório um nível acima</translation>
+    </message>
+    <message>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
-        <translation>Navegar directórios</translation>
-    </message>
-    <message>
-        <location line="-405"/>
+        <translation>Escolher directório</translation>
+    </message>
+    <message>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Sair do Modo Depuração</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Janela</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Exibir Janela de Comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Exibir Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Exibir Ambiente de Trabalho</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Exibir Editor</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Exibir Documentação</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Exibir Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Exibir Editor</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Exibir Documentação</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Janela de Comandos</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Histórico de Comandos</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
-        <translation>Ambiente de trabalho</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Documentação</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Ajuda</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Report Bug</source>
-        <translation>Reportar Defeito</translation>
+        <translation>Reportar Problema</translation>
     </message>
 </context>
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -2098,15 +2445,15 @@
         <translation>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
-As notícias da comunidade do Octave não estão disponíveis de momento.
+A fonte de notícias da comunidade parece estar indisponível.
 &lt;/p&gt;
 &lt;p&gt;
-Para as últimas notícias, consultar
+Para ver as novidades, vá a
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
-quando houver ligação à internet.
+quando tiver ligação com a Internet.
 &lt;/p&gt;
 &lt;p&gt;
-&lt;small&gt;&lt;em&gt;&amp;mdash; Os programadores do Octave, </translation>
+&lt;small&gt;&lt;em&gt;&amp;mdash; Os Programadores do Octave, </translation>
     </message>
     <message>
         <location line="+18"/>
@@ -2126,33 +2473,32 @@
         <translation>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
-Ligar-se à internet para mostrar as últimas notícias da comunidade de Octave foi desactivado.
+A ligação à Internet está desactivada para exibir as novidades da comunidade Octave.
 &lt;/p&gt;
 &lt;p&gt;
-Para as últimas notícias, consultar
+Para ver as novidades, vá a
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
-quando houver ligação à internet ou
-active ligação para as notícias na secção Network do menu de preferências.
+quando tiver ligação à Internet ou active a ligação à Internet nas preferências do Octave.
 &lt;/p&gt;
 &lt;p&gt;
-&lt;small&gt;&lt;em&gt;&amp;mdash; Os programadores do Octave, </translation>
+&lt;small&gt;&lt;em&gt;&amp;mdash; Os Programadores do Octave, </translation>
     </message>
 </context>
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Desacoplar painel</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
-        <translation>Esconder painel</translation>
-    </message>
-    <message>
-        <location line="+104"/>
+        <translation>Ocultar painel</translation>
+    </message>
+    <message>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Acoplar painel</translation>
     </message>
@@ -2160,7 +2506,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>Ajuda sobre</translation>
     </message>
@@ -2174,32 +2520,22 @@
         <source>Edit</source>
         <translation>Editar</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>&amp;Executar Selecção</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation>Sim</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>Não</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Criar</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
-        <translation>O ficheiro
+        <translation>Ficheiro
 %1
 não existe. Deseja criá-lo?</translation>
     </message>
@@ -2210,39 +2546,48 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>O ficheiro %1 não existe no caminho de pesquisa. Para depurar a função que está a ser editada, é preciso mudar para o directório %2 ou adicionar esse directório ao caminho de pesquisa.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation type="unfinished">O ficheiro %1 não existe no caminho de procura. Para executar ou depurar a função que você está editando, é preciso definir o directório actual como %2 ou adicionar aquele directório ao caminho de busca.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>O ficheiro %1 é ignorado a favor de outro ficheiro no caminho de pesquisa com o mesmo nome. Para depurar a função, é preciso mudar para o directório %2.</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>O ficheiro %1 é sobreposto por um ficheiro com o mesmo nome no loadpath. Para executar ou fazer debug à função, mude o directório actual para %2.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory or Add Directory to Load Path</source>
-        <translation>Alterar directório ou adicionar ao caminho de pesquisa</translation>
+        <translation>Mudar Directório Actual ou Adicionar Directório ao Load Path</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory</source>
-        <translation>Alterar Directório</translation>
+        <translation>Definir Directório Actual</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Add Directory to Load Path</source>
-        <translation>Adicionar directório ao caminho de pesquisa</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <translation>Adicionar Directório ao Load Path</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Cancelar</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation></translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -2250,353 +2595,771 @@
 %2
 
 Octave GUI must be closed now.</source>
-        <translation>O ficheiro de preferências
+        <translation>O ficheiro de configuração
 %1
 não existe e não pode ser criado.
-Confirme que tem permissões de leitura e escrita para
+Certifique-se que tem permissão de leitura e escrita em
 %2
 
-A Octave GUI tem de ser fechado agora.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+A interface gráfica do Octave precisa ser fechada agora.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
-        <translation>Erro crítico do Octave</translation>
+        <translation>Erro Crítico no Octave</translation>
     </message>
 </context>
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Configurações</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Geral</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation>Apenas logotipo do Octave</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
-        <translation>Ícones de letras</translation>
+        <translation>Ícones de texto</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Graphic icons</source>
         <translation>Ícones gráficos</translation>
     </message>
     <message>
-        <location line="+39"/>
+        <location line="-118"/>
+        <location filename="../src/ui-settings-dialog.h" line="-9"/>
+        <source>Dock widget title bar</source>
+        <translation>Barra de título do painel</translation>
+    </message>
+    <message>
+        <location line="+60"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Normal</source>
+        <translation>Normal</translation>
+    </message>
+    <message>
+        <location line="+178"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Custom style</source>
+        <translation>Estilo personalizado</translation>
+    </message>
+    <message>
+        <location line="+92"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Estas preferências são aplicadas depois dos ficheiros de inicialização (.octaverc).</translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Restaurar directório de trabalho da sessão anterior</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <location filename="../src/ui-settings-dialog.h" line="+58"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Cor</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+138"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Draw a long line marker</source>
+        <translation>Desenhar guia vertical de linhas longas</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Mostrar caracteres de fins de linha</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Modo padrão para final de linha</translation>
+    </message>
+    <message>
+        <location line="+154"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
         <source>Indent width</source>
-        <translation>Largura da identação</translation>
+        <translation>Largura de indentação</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
-        <translation>Tabulador identa linha</translation>
+        <translation>Tecla Tab causa indentação na linha</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
-        <translation>Auto-identação</translation>
-    </message>
-    <message>
-        <location line="+20"/>
+        <translation>Auto-indentação</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
-        <translation>Largura do tabulador</translation>
+        <translation>Largura do Tab</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
-        <translation>Exibir guias de identação</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <translation>Exibir guias de indentação</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
-        <translation>Tecla Apagar remove identação na linha</translation>
-    </message>
-    <message>
-        <location line="+155"/>
+        <translation>Tecla Backspace remove indentação da linha</translation>
+    </message>
+    <message>
+        <location line="+88"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
         <source>Match keywords</source>
-        <translation>Buscar palavras-chave</translation>
-    </message>
-    <message>
-        <location line="+13"/>
-        <source>Case sensitive</source>
-        <translation>Sensível à capitalização</translation>
+        <translation>Completar palavras-chave do Octave</translation>
     </message>
     <message>
         <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>Substituir palavra pela sugerida</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Case sensitive</source>
+        <translation>Diferenciar maiúsculas/minúsculas</translation>
     </message>
     <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Substituir palavra por aquela sugerida</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
-        <translation>Buscar palavras no documento</translation>
+        <translation>Preencher com palavras do documento</translation>
+    </message>
+    <message>
+        <location line="+173"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Restore editor tabs from previous session on startup</source>
+        <translation>Restaurar abas de edição da sessão anterior durante a inicialização</translation>
+    </message>
+    <message>
+        <location line="-426"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>Use custom file editor</source>
+        <translation>Usar editor de texto externo</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
+        <source>Editor Styles</source>
+        <translation>Estilos do Editor</translation>
+    </message>
+    <message>
+        <location line="+287"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Terminal Colors</source>
+        <translation>Cores do Terminal</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>Tipo de letra</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>Mostrar números da linha</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Destacar linha actual</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation type="unfinished">Mostrar caminho completo no título da janela</translation>
+    </message>
+    <message>
+        <location line="-29"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show whitespace</source>
+        <translation>Mostrar whitespace</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Não mostrar whitespace usados para indentação</translation>
+    </message>
+    <message>
+        <location line="+625"/>
+        <location filename="../src/ui-settings-dialog.h" line="+37"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Número de caracteres antes da lista ser exibida: </translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Criar ficheiros não existentes sem confirmar</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>linha de comando (%f=ficheiro, %l=linha):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Linha de comandos</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Tipo de cursor:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Cursor a piscar</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Usar cor do primeiro plano</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Tamanho da letra</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Focar na linha de comandos ao executar comando a partir de um outro painel</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Navegador de Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Mostrar tamanho do ficheiro</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Mostrar tipo do ficheiro</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Mostrar data da última modificação</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Mostrar ficheiros ocultos</translation>
+    </message>
+    <message>
+        <location line="-1715"/>
+        <location filename="../src/ui-settings-dialog.h" line="-97"/>
+        <source>Interface</source>
+        <translation>Interface</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Confirmar antes de sair</translation>
+    </message>
+    <message>
+        <location line="+103"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Mostrar barra de estado</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Texto inactivo</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Activo</translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation>Pequeno</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Grande</translation>
+    </message>
+    <message>
+        <location line="+181"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Background inactive</source>
+        <translation>Fundo inactivo</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation>3D</translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation>Inicialização do Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Caminho de inicialização</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Navegar</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Após coluna</translation>
+    </message>
+    <message>
+        <location line="+144"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Tab width min.</source>
+        <translation>Tamanho da guia: mín.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>máx.</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Isto funciona bem para tipos de letra monospace. A guia é desenhada numa posição baseada na largura do espaço do tipo de letra default. Pode não funcionar muito bem se os estilos usarem fontes não monospace, mistura de letras com diferentes tamanhos ou estilos.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Activar Células de Código</translation>
     </message>
     <message>
         <location line="+61"/>
-        <source>Restore editor tabs from previous session on startup</source>
-        <translation>Restaurar abas de edição da sessão anterior durante inicialização</translation>
-    </message>
-    <message>
-        <location line="+60"/>
-        <source>Use custom file editor</source>
-        <translation>Usar editor de texto externo</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
     </message>
     <message>
         <location line="+32"/>
-        <source>Editor Styles</source>
-        <translation>Estilos do Editor</translation>
-    </message>
-    <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Seleccionar tipo de letra, tamanho (como diferença para o tamanho padrão), decoração (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor do texto e cor do fundo de tela (para o último, a cor rosa (255,0,255) é sinônimo da cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Exibir barra horizontal</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Indentação</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Indentation uses tabs</source>
+        <translation>Indentar com caracteres tab</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Auto-completar</translation>
+    </message>
+    <message>
+        <location line="+101"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>With Octave builtins</source>
+        <translation>Completar Octave builtins</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Completar funções Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Exibir automaticamente lista de auto-completar</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>File handling</source>
+        <translation>Manipulação de ficheiros</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Recarregar ficheiros alterados externamente sem confirmar</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecione a fonte: família, tamanho (variacão com relacão ao tamanho padrão), estilo (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor do texto e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+192"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Alterar o tamanho do histório apagará o seu conteúdo actual)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Tamanho do Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Exibir posição de depuração no terminal além de ressaltar no editor</translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Display</source>
+        <translation>Exibição</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Alternar cor das linhas</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Comportamento</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Restaurar directório da sessão anterior</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Ocultar ajuda de contexto</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Edite uma tecla de atalho clicando duas vezes na célula correspondente</translation>
     </message>
     <message>
         <location line="+108"/>
-        <source>Terminal Colors</source>
-        <translation>Cores do Terminal</translation>
-    </message>
-    <message>
-        <location line="+45"/>
-        <source>Font</source>
-        <translation>Tipo de Letra</translation>
-    </message>
-    <message>
-        <location line="-757"/>
-        <source>Show line numbers</source>
-        <translation>Exibir número de linha</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Enfatizar linha actual</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Sguestões para copletar código</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Exibir caminho completo no título da janela</translation>
-    </message>
-    <message>
-        <location line="-17"/>
-        <source>Show whitespace</source>
-        <translation>Mostrar whitespace</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>Não mostrar whitespace usado para indentação</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>Número de carácteres antes de mostrar lista de preenchimento automático</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>Criar ficheiros não existentes automaticamente</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>linha do comando (%f=ficheiro, %l=linha):</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Terminal</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Tipo de Cursor:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Rede</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Indicador piscante</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation>Usar cor do fundo</translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Tamanho da letra</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Navegador de Ficheiros</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Mostrar tamanho do ficheiro</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Mostrar tipo de ficheiro</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Mostrar data da última modificação</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Mostrar ficheiros escondidos</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Cores de linhas alternantes</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Ambiente de trabalho</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>Cores das Classes de Armazenamento</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Rede</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation>Permitir ao Octave ligar-se ao site do Octave para mostrar notícias e informações</translation>
+        <translation>Permitir Octave ligar-se à Internet para exibir novidades e informações</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Usar servidor proxy</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>Proxy HTTP</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
-        <translation>Conjunto de ícones para paineis</translation>
+        <translation>Conjunto de ícones para painéis</translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Idioma (alteração exige reinicialização do Octave)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Tamanho dos ícones</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Manter directório de trabalho sincronizado com o Navegador de Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Cores para atributos de variáveis</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Teclas de Atalho</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Selecionar esta opção para prevenir conflitos com teclas de atalho do readline</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Desativar teclas de atalho globais quando o terminal estiver em foco</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Usar este conjunto</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Conjunto 1:</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Idioma (reinicialização do Octave necessária)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Exportar</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Importar</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Tamanho do Ícone</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>Sincronizar o directório de trabalho do Octave com o navegador de ficheiros</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Conjunto 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Acção</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>Conjunto 1 Padrão</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Conjunto 1 Actual</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>Conjunto 2 Dadrão</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Conjunto 2 Actual</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Proxy Socks 5</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
-        <translation>Nome do servidor:</translation>
+        <translation>Endereço do servidor:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>Tipo de proxy:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Porta:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
-        <translation>Nome do utilizador:</translation>
+        <translation>Nome de usuário:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
-        <translation>Senha:</translation>
-    </message>
-    <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <translation>Palavra-chave:</translation>
+    </message>
+    <message>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>Configuração do sistema</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
-        <translation>Indicador IBeam</translation>
+        <translation>Cursor IBeam</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Block Cursor</source>
-        <translation>Indicador em Bloco</translation>
+        <translation>Cursor de Bloco</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Underline Cursor</source>
-        <translation>Indicador Sublinhado</translation>
-    </message>
-    <message>
-        <location line="+144"/>
+        <translation>Cursor Sublinhado</translation>
+    </message>
+    <message>
+        <location line="+213"/>
         <source>Difference to the default size</source>
-        <translation>Diferença com relação ao tamanho de fonto padrão</translation>
+        <translation>Diferença em relação ao tamanho do tipo de letra default</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Background color, pink (255,0,255) means default</source>
-        <translation>Cor de fundo, rosa (255,0,255) significa padrão</translation>
+        <translation>Cor de fundo rosa (255,0,255) significa padrão</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -2616,6 +3379,16 @@
         <comment>short form for underlined</comment>
         <translation>s</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Definir Directório de Inicialização do Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Alterar Directório de Inicialização do Navegador de Ficheiros</translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -2632,7 +3405,7 @@
     <message>
         <location line="+1"/>
         <source>Next</source>
-        <translation>Próximo</translation>
+        <translation>Avançar</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -2648,9 +3421,9 @@
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Quando o Octave inicia, irá consultar o website do Octave para as últimas notícias e informações sobre a comunidade do Octave.
-A consulta é feita no máximo uma vez por dia e notícias só serão apresentadas quando houver algo novo desde a vez anterior.&lt;/p&gt;
-&lt;p&gt;Também é possível ver as notícias seleccionando &quot;Notícias da comunidade&quot; no menu &quot;Ajuda&quot;, ou ao visitar
+&lt;p&gt;Quando a interface gráfica do Octave se inicia, ela busca no sítio do Octave por novidades e informações recentes da comunidade.
+A busca acontece no máximo uma vez por dia e as notícias só serão apresentadas se houver algo de novo desde o último acesso.&lt;/p&gt;
+&lt;p&gt;Você também pode ver as notícias selecionando &quot;Novidades da Comunidade&quot; no menu &quot;Novidades&quot; na interface gráfica, ou visitando
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -2668,11 +3441,631 @@
 a:link { text-decoration: underline; color: #0000ff; }
 &lt;/style&gt;
 &lt;head/&gt;&lt;body&gt;
-&lt;p&gt;Permitir ao Octave ligar-se ao website do Octave para mostrar as últimas notícias e informações sobre a comunidade do Octave.&lt;/p&gt;
+&lt;p&gt;Permitir que o Octave se conecte à Internet durante a inicialização para buscar as novidades e informações atuais da comunidade.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Novo Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Nova Função</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Nova Figura</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Abrir Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Carregar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Guardar Ambiente de Trabalho Como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Preferências</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Sair do Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Copiar</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Colar</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Desfazer</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Selecionar Tudo</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Limpar Área de Transferência</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Localizar Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Limpar Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Limpar Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Limpar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Continuar</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Sair do Modo de Debug</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Mostrar Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Mostrar Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Mostrar Navegador de Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Mostrar Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Mostrar Editor</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Mostrar Documentação</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Janela de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Histórico de Comandos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Navegador de Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Editor</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Documentação</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Mostrar Documentação local</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Mostrar Documentação Online</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Bibliotecas do Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Partilhar Código</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Contribuir para o Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Recursos para Programadores do Octave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Sobre o Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Notas da Versão</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Novidades da Comunidade</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Editar Função</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Guardar Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Guardar Ficheiro Como</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Fechar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Fechar Todos</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Imprimir</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation>Refazer</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Cortar</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Localizar e Substituir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Apagar até ao Início da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Apagar até ao Fim da Palavra</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Apagar até ao Início da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Apagar até ao Fim da Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Apagar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Copiar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Cortar Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Duplicar Selecção/Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Transpor linha</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Comentar Selecção</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Descomentar Selecção</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>MAIÚSCULAS</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>MINÚSCULAS</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Indentar Selecção</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Remover Indentação da Selecção</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation>Ir para Linha</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation>Ir para o Parênteses Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Selecionar até ao Parênteses Correspondente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Activar/desactivar Marcador</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Marcador Seguinte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Marcador Anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Remover Todos os Marcadores</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Preferências de Estilo</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Mostrar Números de Linha</translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Restaurar Layout Default das Janelas</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Reportar Problema</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Fechar Outros Ficheiros</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Mostrar Lista de Completação</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Converter Fins de Linha para Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Converter Fins de Linha para Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Converter Fins de Linha para Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Mostrar Whitespace</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation>Mostrar Fins de Linha</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Mostrar Guias de Indentação</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Mostrar Guia de Linhas Longas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Aumentar</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Diminuir</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Zoom Normal</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Ativar/desativar Breakpoint</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Breakpoint Seguinte</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Breakpoint Anterior</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Remover Todos os Breakpoints</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Executar Ficheiro</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Executar Selecção</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Ajuda na Palavra-chave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Documentação na Palavra-chave</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Principal</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Ficheiro</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Editar</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Debug</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Janela</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Ajuda</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Novidades</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Ver</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Executar</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Entre nova Tecla de atalho para Conjunto %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Aplicar tecla de atalho desejada ou clique no botão à direita para voltar ao default.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Introduzir as teclas de atalho pressionando-as directamente</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Tecla de atalho actual</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Tecla de atalho padrão</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Usar default</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Atalho Duplicado</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>A tecla de atalho escolhida
+&quot;%1
+já é usada para a acção
+&quot;%2&quot;
+Quer usar a tecla de atalho de qualquer forma, removendo-a da outra acção? </translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Importar conjunto de teclas de atalho %1 de ficheiro...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Ficheiros de teclas de atalho do Octave (*.osc);; Todos Ficheiros (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Exportar conjunto de teclas de atalho %1 para ficheiro... </translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Falha ao abrir %1 como ficheiro de teclas de atalho do Octave</translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2683,15 +4076,25 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
-        <translation>Digite aqui e pressione &apos;Enter&apos; para buscar</translation>
+        <translation>Introduzir aqui e pressione &apos;Enter&apos; para procurar</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Global search</source>
         <translation>Procura global</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Erro</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>O ficheiro de informação &lt;p&gt;%1&lt;p&gt; ou versões comprimidas não existem</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2725,13 +4128,13 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>Classe de Armazenamento</translation>
+        <source>Attribute</source>
+        <translation>Atributo</translation>
     </message>
     <message>
         <location line="+109"/>
         <source>Right click to copy, rename, or display</source>
-        <translation>Clique com botão direito para copiar, renomear ou exibir</translation>
+        <translation>Botão direito para copiar, mudar nome, ou mostrar</translation>
     </message>
     <message>
         <location line="+37"/>
@@ -2743,39 +4146,54 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
-        <translation>Ambiente de trabalho</translation>
+        <translation>Ambiente de Trabalho</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>View the variables in the active workspace.</source>
-        <translation>Visualizar variáveis no ambiente de trabalho ativo.</translation>
-    </message>
-    <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Copiar</translation>
+        <translation>Ver variáveis no Ambiente de Trabalho activo.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Introduzir texto para filtrar o Ambiente de Trabalho</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Filtrar</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Copiar nome</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Copiar valor</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Rename</source>
-        <translation>Renomear</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <translation>Mudar nome</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
-        <translation>Apenas símbolos do nível maisl alto podem ser renomeados.</translation>
-    </message>
-    <message>
-        <location line="+125"/>
+        <translation>Apenas símbolos do nível mais alto podem ter o nome modificado.</translation>
+    </message>
+    <message>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
-        <translation>Visualizar as variáveis no ambiente de trabalho ativo.&lt;br&gt;</translation>
+        <translation>Ver as variáveis no Ambiente de Trabalho activo.&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>Cores para classe de armazenamento:</translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Cores de atributos de variáveis:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/ru_RU.ts
+++ b/libgui/languages/ru_RU.ts
@@ -14,63 +14,58 @@
     <message>
         <location filename="../src/workspace-model.cc" line="+75"/>
         <source>automatic</source>
-        <translation type="unfinished"></translation>
+        <translation>автоматическая</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>function</source>
-        <translation type="unfinished"></translation>
+        <translation>функция</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>global</source>
-        <translation type="unfinished"></translation>
+        <translation>глобальная</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>hidden</source>
-        <translation type="unfinished"></translation>
+        <translation>скрытая</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>inherited</source>
-        <translation type="unfinished"></translation>
+        <translation>унаследованный</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>persistent</source>
-        <translation type="unfinished"></translation>
+        <translation>постоянная</translation>
     </message>
     <message>
         <location filename="../qterminal/libqterminal/QTerminal.cc" line="+65"/>
         <source>foreground</source>
-        <translation type="unfinished"></translation>
+        <translation>цвет текста</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>background</source>
-        <translation type="unfinished"></translation>
+        <translation>фон</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>selection</source>
-        <translation type="unfinished"></translation>
+        <translation>выделение</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>cursor</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>указатель</translation>
     </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>Копировать</translation>
     </message>
@@ -80,20 +75,146 @@
         <translation>Вставить</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>Очистить всё</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation>Выделить всё</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation>Очистить окно</translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>выделенное скопировано в буфер обмена</translation>
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation>Панель инструментов графического объекта</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation>Оси координат</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation>Координатная сетка</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation>Автоматический масштаб</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Сохранить</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation>Сохранить &amp;как</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation>&amp;Закрыть графический объект</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation>&amp;Правка</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation>&amp;Копировать</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation>Вы&amp;резать</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation>&amp;Вставить</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Помощь</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation>&amp;О QtHandles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation>О &amp;Qt</translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation>О QtHandles</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation>Сохранить графический объект как</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation>Повернуть</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Увеличить</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation>Уменьшить</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation>Переместить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation>Вставить текст</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation>Выбрать</translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -109,32 +230,34 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Редактор Octave</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Файлы Octave (*.m);;Все файлы (*)</translation>
     </message>
     <message>
         <location line="-40"/>
         <source>New Function</source>
-        <translation type="unfinished"></translation>
+        <translation>Новая функция</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>New function name:
 </source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+281"/>
+        <translation>Имя новой функции:
+</translation>
+    </message>
+    <message>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -143,37 +266,27 @@
 уже открыт в редакторе</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>Созд&amp;ать</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>&amp;Сохранить</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Открыть...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Сохранить &amp;как...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>Печать...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>О&amp;тменить</translation>
     </message>
@@ -183,62 +296,62 @@
         <translation>&amp;Повторить</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>&amp;Копировать</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>Вы&amp;резать</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>Вставить</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>С&amp;ледующая закладка</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>Пр&amp;едыдущая закладка</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>Вы&amp;резать</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>Вставить</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>&amp;Установить/снять закладку</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>С&amp;ледующая закладка</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>Пр&amp;едыдущая закладка</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>&amp;Установить/снять закладку</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>&amp;Удалить все закладки</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
-        <translation></translation>
+        <translation>&amp;Следующая точка останова</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Pre&amp;vious Breakpoint</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Предыдущая точка останова</translation>
+    </message>
+    <message>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Установить/снять точку останова</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <translation>&amp;Удалить все точки останова</translation>
+    </message>
+    <message>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>&amp;Закомментировать</translation>
     </message>
@@ -248,59 +361,241 @@
         <translation>&amp;Раскомментировать</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation>&amp;Найти и заменить...</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
-        <translation></translation>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
+        <translation>&amp;Вставить отступ</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation>&amp;Убрать отступ</translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation>&amp;Найти и заменить...</translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation>Сохранить файл и запустить</translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
-        <translation>&amp;Перейти к строчке...</translation>
-    </message>
-    <message>
-        <location line="+55"/>
+        <translation>&amp;Перейти к строке...</translation>
+    </message>
+    <message>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation>Невозможно запустить внешний редактор
+%1</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation>Создать</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>Отмена</translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
-        <translation>&amp;Недавние файлы редактора</translation>
-    </message>
-    <message>
-        <location line="+11"/>
+        <translation>По&amp;следние файлы</translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation>&amp;Редактировать функцию</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation>&amp;Закрыть</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation>Закрыть всё</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>Закрыть другие файлы</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation>Выделить всё</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation>&amp;Команды</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation>Удалить строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Копировать строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Вырезать строку</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation>Удалить до начала слова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Удалить до конца слова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Удалить до начала строки</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Удалить до конца строки</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Дублировать выделенное/строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Переместить строку</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation>Показать &amp;список завершения</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation>&amp;Формат</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation>Перевести в &amp;верхний регистр</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation>Перевести в &amp;нижний регистр</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation>Конец строки &amp;Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation>Конец строки &amp;Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation>Конец строки &amp;Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation>Нави&amp;гация</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation>Перейти к соответствующей скобке</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Выделить до соответствующей скобки</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Настройки...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>Настройки &amp;стиля...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>Настройки &amp;стиля...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation>&amp;Вид</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation>&amp;Редактор</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation>Показывать &amp;номера строк</translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation>Редактор</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation>Показывать символ &amp;конца строки</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation>Показывать линии &amp;отступов</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation>Показывать линию переноса &amp;строк</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation>У&amp;величить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation>У&amp;меньшить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation>&amp;Нормальный размер</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
-        <translation></translation>
+        <translation>&amp;Запустить выделенное</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -308,17 +603,17 @@
         <translation>&amp;Помощь</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>&amp;Помощь по зарезервированному слову</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>&amp;Документация по зарезервированному слову</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -327,7 +622,7 @@
 для чтения: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -336,7 +631,7 @@
 не существует. Вы хотите создать его?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -345,32 +640,32 @@
 для записи: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation></translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>&amp;Правка</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation>Показывать символ &amp;пробела</translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>&amp;Отладка</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>&amp;Запуск</translation>
     </message>
@@ -378,9 +673,34 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation>конец строки:</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation>строка:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation>столбец:</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation>%1 является встроенной функцией</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation>Невозможно найти функцию %1</translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
-        <translation>Перейти к строчке</translation>
+        <translation>Перейти к строке</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -388,47 +708,57 @@
         <translation></translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;без названия&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>Вы хотите сохранить или отменить изменения?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation>Файл
+
+  %1
+
+был изменён.
+%2</translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation>Конец строки:</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation>Файлы Octave (*.m)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation>Все файлы (*)</translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
-        <translation>Вы хотите отменить закрытие, сохранить или отменить изменения?</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <translation>Сохранить изменения или отклонить их?</translation>
+    </message>
+    <message>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Редактор Octave</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>Файл
-%1
-должен быть закрыть, но он был изменен.
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Файлы Octave (*.m);;Все файлы (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -446,24 +776,31 @@
 был удален или переименован. Вы хотите сохранить его?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>Не удалось открыть файл %1 для записи:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation>&quot;%1&quot;
+не является разрешённым идентификатором.
+
+Если Вы оставите это имя то потеряете возможность 
+запускать свой сценарий, используя имя как команду Octave.
+
+Желаете выбрать другое имя?</translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>Кажется, файл &apos;%1&apos; был изменен другим приложением. Вы хотите обновить его содержимое?</translation>
     </message>
@@ -471,7 +808,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>Файловый менеджер</translation>
     </message>
@@ -486,82 +823,75 @@
         <translation>Введите путь или имя файла</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation>Задать просматриваемую папку как рабочую папку Octave</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+373"/>
+        <translation>Действия в текущей папке</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation>Выбрать папку...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>Найти файлы...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>Новый файл</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
-        <translation>Новая директория</translation>
-    </message>
-    <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <translation>Новая папка</translation>
+    </message>
+    <message>
+        <location line="-784"/>
         <source>Show Octave directory</source>
-        <translation>Перейти к текущей директории Octave</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <translation>Перейти к текущей рабочей папке Octave</translation>
+    </message>
+    <message>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation>Перейти на одну папку вверх</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
-        <translation>Перейти к текущей директории Octave</translation>
+        <translation>Перейти к текущей рабочей папке Octave</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Set Octave directory</source>
-        <translation>Установить директорию Octave</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <translation>Установить рабочую папку Octave</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Show Home Directory</source>
-        <translation>Показывать домашнюю директорию</translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation>Найти файлы...</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Показывать домашнюю папку</translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>Новый файл...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
-        <translation>Новая директория...</translation>
-    </message>
-    <message>
-        <location line="+276"/>
+        <translation>Новая папка...</translation>
+    </message>
+    <message>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation>Нажмите для открытия в редакторе, альтернитивные действия по нажатию правой кнопкой</translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation></translation>
     </message>
@@ -581,7 +911,7 @@
         <translation></translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>Открыть</translation>
     </message>
@@ -611,17 +941,18 @@
         <translation>Установить текущую директорию</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>Переименовать</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>Удалить</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation>Переименовать...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation>Удалить...
+</translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>Переименовать файл/директорию</translation>
     </message>
@@ -655,7 +986,7 @@
         <translation>Невозможно удалить непустую директорию</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation></translation>
     </message>
@@ -673,7 +1004,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation>Новый файл.txt</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>Создать директорию</translation>
     </message>
@@ -689,14 +1025,14 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
-        <translation></translation>
+        <translation>Наслаждайтесь!</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Previous</source>
-        <translation></translation>
+        <translation>Назад</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -712,10 +1048,14 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation></translation>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Мы надеемся Octave окажется удобным решением для Вас.&lt;/p&gt;
+&lt;p&gt;В случае возникновения проблем существует несколько путей их устранения, включая коммерческую поддержку, почтовые рассылки, wiki-сайт и другие варианты поддержки от сообщества.
+Вы можете найти больше информации, посетив &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (открывается во внешнем браузере).&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+21"/>
@@ -731,13 +1071,29 @@
 &lt;li&gt;Open the documentation browser of the Octave GUI with the help menu&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation></translation>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Для дополнительной информации об Octave:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;Посетите &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt; (открывается во внешнем браузере)&lt;/li&gt;
+&lt;li&gt;Получите документацию в виде &lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/index.html&quot;&gt;html&lt;/a&gt;- или &lt;a href=&quot;http://www.gnu.org/software/octave/octave.pdf&quot;&gt;pdf&lt;/span&gt;&lt;/a&gt;-документов (открывается во внешнем браузере)&lt;/li&gt;
+&lt;li&gt;Откройте документацию через графическую оболочку Octave&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation>Найти и заменить</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>&amp;Найти:</translation>
     </message>
@@ -759,7 +1115,7 @@
     <message>
         <location line="+1"/>
         <source>&amp;Wrap while searching</source>
-        <translation></translation>
+        <translation>Искать по &amp;кругу</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -789,7 +1145,7 @@
     <message>
         <location line="+13"/>
         <source>&amp;Whole words</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Целое слово</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -804,10 +1160,10 @@
     <message>
         <location line="+1"/>
         <source>Search se&amp;lection</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+71"/>
+        <translation>Искать &amp;выделенное</translation>
+    </message>
+    <message>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>Искать с конца</translation>
     </message>
@@ -817,19 +1173,19 @@
         <translation>Искать с начала</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
-        <translation type="unfinished"></translation>
+        <translation>Результат замены</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>%1 items replaced</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+10"/>
+        <translation>%1 элементов заменено</translation>
+    </message>
+    <message>
+        <location line="+15"/>
         <source>Find Result</source>
-        <translation type="unfinished"></translation>
+        <translation>Результаты поиска</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -847,62 +1203,47 @@
     <message>
         <location line="+10"/>
         <source>Named:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <translation>Имя:</translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>Start in:</source>
-        <translation type="unfinished"></translation>
+        <translation>Искать в:</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Enter the start directory</source>
-        <translation type="unfinished"></translation>
+        <translation>Введите начальную папку</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Browse...</source>
-        <translation type="unfinished"></translation>
+        <translation>Выбрать...</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Browse for start directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Выбрать начальную папку</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
-        <translation>Искать рекурсивно в директориях подходящие файлы</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Искать рекурсивно в папках подходящие файлы</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
-        <translation type="unfinished"></translation>
+        <translation>Искать в именах папок</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Name case insensitive</source>
-        <translation type="unfinished"></translation>
+        <translation>С учётом регистра</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set matching name is case insensitive</source>
-        <translation type="unfinished"></translation>
+        <translation>Искать с учётом регистра</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -910,34 +1251,50 @@
         <translation>Содержит текст:</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation type="unfinished"></translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation>Введите регулярное выражение для поиска</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translatorcomment>&quot;Во вложенных папках&quot; занимает много места в окне</translatorcomment>
+        <translation>В подпапках</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation>В именах папок</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation>Искать в содержимом файлов</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Text to match</source>
-        <translation type="unfinished"></translation>
+        <translation>Текст для поиска</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Text case insensitive</source>
-        <translation type="unfinished"></translation>
+        <translation>С учётом регистра</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Set text content is case insensitive</source>
-        <translation type="unfinished"></translation>
+        <translation>Искать с учётом регистра</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Search results</source>
-        <translation type="unfinished"></translation>
+        <translation>Результаты поиска</translation>
     </message>
     <message>
         <location line="+17"/>
         <source>Idle.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ожидание.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -947,7 +1304,7 @@
     <message>
         <location line="+1"/>
         <source>Start search for matching files</source>
-        <translation type="unfinished"></translation>
+        <translation>Начать поиск</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -957,7 +1314,7 @@
     <message>
         <location line="+1"/>
         <source>Stop searching</source>
-        <translation type="unfinished"></translation>
+        <translation>Остановить поиск</translation>
     </message>
     <message>
         <location line="+15"/>
@@ -972,10 +1329,15 @@
     <message>
         <location line="+105"/>
         <source>Searching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+32"/>
+        <translation>Поиск...</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation>%1 найдено</translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>Установить директорию для поиска</translation>
     </message>
@@ -990,33 +1352,38 @@
     <message>
         <location line="+1"/>
         <source>Directory</source>
-        <translation>Директория</translation>
+        <translation>Папка</translation>
     </message>
 </context>
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>Просмотр и поиск в журнале выполненных команд.</translation>
     </message>
     <message>
         <location line="+24"/>
         <source>Double-click a command to transfer it to the terminal.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>Введите текст для фильтрации выполненных команд.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Двойное нажатие отправляет команду в терминал.</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation>Введите текст для поиска по истории выполненных команд</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Фильтр</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>Журнал выполненных команд</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>Копировать</translation>
     </message>
@@ -1026,7 +1393,7 @@
         <translation>Выполнить</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>Создать скрипт</translation>
     </message>
@@ -1036,17 +1403,17 @@
     <message>
         <location filename="../src/welcome-wizard.cc" line="-179"/>
         <source>Welcome to Octave!</source>
-        <translation type="unfinished">Добро пожаловать в Octave!</translation>
+        <translation>Добро пожаловать в Octave!</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Next</source>
-        <translation type="unfinished"></translation>
+        <translation>Далее</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Cancel</source>
-        <translation type="unfinished">Отмена</translation>
+        <translation>Отмена</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -1055,59 +1422,53 @@
 Click &apos;Next&apos; to create a configuration file and launch Octave.&lt;/p&gt;
 &lt;p&gt;The configuration file is stored in&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;Вы используете графическую оболочку Octave в первый раз на этом компьютере.
+Нажмите &quot;Далее&quot; для создания файла настроек и запуска Octave.&lt;/p&gt;
+&lt;p&gt;Файл настроек находится в&lt;br&gt;%1.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
 </context>
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>Загрузить область переменных</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>Об Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>Новый</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>Скрипт</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>Открыть...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>Настройки...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>Выход</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>&amp;Правка</translation>
     </message>
@@ -1117,47 +1478,72 @@
         <translation>Отменить</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>Копировать</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>Вставить</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+124"/>
+        <translation>Сохранить область переменных как</translation>
+    </message>
+    <message>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Файл с примечаниями к выпуску &apos;%1&apos; пустой.</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>The release notes file &apos;%1&apos; cannot be read.</source>
-        <translation type="unfinished"></translation>
+        <translation>Файл с примечаниями к выпуску &apos;%1&apos; не может быть прочтён.</translation>
     </message>
     <message>
         <location line="+13"/>
         <source>Octave Release Notes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+189"/>
+        <translation>Примечания к выпуску Octave</translation>
+    </message>
+    <message>
+        <location line="+192"/>
         <source>Octave Community News</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+939"/>
+        <translation>Новости сообщества Octave</translation>
+    </message>
+    <message>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation>Вы уверены, что хотите выйти из Octave?</translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation>Открыть существующий файл в редакторе</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation>Новая функция...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation>Новый графический объект</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation>Выделить всё</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <translation>Очистить буфер обмена</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>Найти файлы...</translation>
     </message>
@@ -1174,10 +1560,10 @@
     <message>
         <location line="+3"/>
         <source>Clear Workspace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+40"/>
+        <translation>Очистить область переменных</translation>
+    </message>
+    <message>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>&amp;Отладка</translation>
     </message>
@@ -1192,57 +1578,52 @@
         <translation>Продолжить</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>Выйти из режима отладки</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>Показывать файловый менеджер</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>Файловый менеджер</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-151"/>
+        <translation>Шаг с заходом</translation>
+    </message>
+    <message>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation>Octave</translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation>Загрузить область переменных...</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Save Workspace As...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>Функция...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <translation>Сохранить область переменных как...</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation>Новый сценарий</translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <translation>Шаг с выходом</translation>
+    </message>
+    <message>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+77"/>
+        <translation>Сбросить расположение окон</translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Пакеты Octave</translation>
     </message>
@@ -1254,7 +1635,7 @@
     <message>
         <location line="+3"/>
         <source>Contribute to Octave</source>
-        <translation type="unfinished"></translation>
+        <translation>Внести вклад в Octave</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1262,24 +1643,24 @@
         <translation>Ресурсы разработчика Octave</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>На диске</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Online</source>
-        <translation>Онлайн</translation>
-    </message>
-    <message>
-        <location line="+12"/>
+        <translation>На веб-сайте Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>&amp;Новости</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Release Notes</source>
-        <translation type="unfinished"></translation>
+        <translation>Примечания к выпуску</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1287,100 +1668,94 @@
         <translation>Новости сообщества</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation>Панель инструментов</translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
-        <translation>Введите название директории</translation>
+        <translation>Введите путь</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Current Directory: </source>
-        <translation>Текущая директория: </translation>
+        <translation>Текущая папка: </translation>
     </message>
     <message>
         <location line="+4"/>
         <source>One directory up</source>
-        <translation>Одной директорией вверх</translation>
-    </message>
-    <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <translation>Перейти на одну папку вверх</translation>
+    </message>
+    <message>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
-        <translation>Просмотр директорий</translation>
-    </message>
-    <message>
-        <location line="-405"/>
+        <translation>Выбрать папку</translation>
+    </message>
+    <message>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation>Выйти из режима отладки</translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation>&amp;Окно</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation>Показывать командное окно</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation>Показывать журнал выполненных команд</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>Показывать область переменных</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>Показывать редактор</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>Показывать документацию</translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>Показывать область переменных</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>Показывать редактор</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>Показывать документацию</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>Командное окно</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>Журнал выполненных команд</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>Область переменных</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>Редактор</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>Документация</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>&amp;Помощь</translation>
     </message>
@@ -1393,7 +1768,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1406,7 +1781,18 @@
 &lt;/p&gt;
 &lt;p&gt;
 &lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Новости сообщества Octave недоступны.
+&lt;/p&gt;
+&lt;p&gt;
+Для информации о последних новостях посетите
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+когда у Вас будет подключение к сети интернет (ссылка открывается во внешнем браузере).
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Разоаботчики Octave,</translation>
     </message>
     <message>
         <location line="+18"/>
@@ -1423,24 +1809,36 @@
 &lt;/p&gt;
 &lt;p&gt;
 &lt;small&gt;&lt;em&gt;&amp;mdash; The Octave Developers, </source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;
+Подключение к веб-сайту Octave для оповещения о новостях сообщеста запрещено.
+&lt;/p&gt;
+&lt;p&gt;
+Для информации о последних новостях посетите
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;
+когда у Вас будет подключение к сети интернет (ссылка открывается во внешнем браузере),
+или разрешите подключение к веб-сайту Octave в настройках.
+&lt;/p&gt;
+&lt;p&gt;
+&lt;small&gt;&lt;em&gt;&amp;mdash; Разработчики Octave,</translation>
     </message>
 </context>
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>Открепить виджет</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>Спрятать виджет</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>Закрепить виджет</translation>
     </message>
@@ -1448,89 +1846,88 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
-        <translation type="unfinished"></translation>
+        <translation>Справка по</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Documentation on</source>
-        <translation type="unfinished"></translation>
+        <translation>Документация по</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Edit</source>
         <translation>Редактировать</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation>Создать</translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
-        <translation type="unfinished">Файл
+        <translation>Файл
 %1
 не существует. Вы хотите создать его?</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Octave Editor</source>
-        <translation type="unfinished">Редактор Octave</translation>
+        <translation>Редактор Octave</translation>
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>Файл %1 не существует в пути загрузки.  Чтобы отладить редактируемую вами функцию, вы должны либо изменить директорию на %2, или добавить эту директорию в путь загрузки.</translation>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation>Файл %1 не находится в загрузочном пути. Для запуска или отладки редактируемой функции необходимо перейти в папку %2 или добавить её в загрузочный путь.</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation type="unfinished"></translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation>Файл %1 заслонён одноимённым файлом из загрузочного пути. Для запуска или отладки редактируемой функции перейдите в папку %2.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory or Add Directory to Load Path</source>
-        <translation>Изменить директорию или добавить директорию в путь загрузки</translation>
+        <translation>Перейти в папку или добавить её в путь загрузки</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Change Directory</source>
-        <translation>Изменить директорию</translation>
+        <translation>Сменить папку</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Add Directory to Load Path</source>
-        <translation>Добавить директорию в путь загрузки</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <translation>Добавить папку в путь загрузки</translation>
+    </message>
+    <message>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>Отмена</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation>По умолчанию</translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1538,340 +1935,764 @@
 %2
 
 Octave GUI must be closed now.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <translation>Файл настроек
+%1
+не существует и не может быть создан.
+Убедитесь, что у Вас есть права права на чтение и запись в
+%2
+
+Графическая оболочка Octave будет закрыта.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
-        <translation type="unfinished"></translation>
+        <translation>Критическая ошибка в Octave</translation>
     </message>
 </context>
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>Параметры</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>Основное</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
-        <translation type="unfinished">Только логотип Octave</translation>
+        <translation>Только логотип Octave</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+46"/>
+        <translation>Значок с буквой</translation>
+    </message>
+    <message>
+        <location line="-111"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Dock widget title bar</source>
+        <translation>Заголовки виджетов</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation>Маленькие</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation>Большие</translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation>Свой стиль</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>3D</source>
+        <translation>Объёмный вид</translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <location filename="../src/ui-settings-dialog.h" line="+63"/>
         <source>Editor</source>
         <translation>Редактор</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation>Цвет</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation>Это хорошо работает для моноширинных шрифтов. Позиция линии зависит от ширины символа пробела. В случае использования пропорционального шрифта линия может не совпадать с реальным положением переноса.</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation>Разрешить сворачивание блоков</translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation>Windows (CRLF)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation>Mac (CR)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation>Unix (LF)</translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation>Показывать горизонтальную полосу прокрутки</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation>Отступы</translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation>Ширина отступа</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
-        <translation type="unfinished"></translation>
+        <translation>Показывать линии табуляции</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>Авто-отступы</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
-        <translation type="unfinished"></translation>
+        <translation>Ширина табуляции</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <translation>Показывать линии отступов</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+155"/>
+        <translation>Уменьшение отступа клавишей backspace</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation>Отступы табуляцией</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation>Автодополнение</translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
-        <translation type="unfinished"></translation>
+        <translation>Зарезервированные слова</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
-        <translation>Чувствительный к регистру</translation>
-    </message>
-    <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation type="unfinished"></translation>
+        <translation>С учётом регистра</translation>
     </message>
     <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>Заменять слово предложенным</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+61"/>
+        <translation>Слова из документа</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation>Встроенные слова Octave</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation>Функции Octave</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation>Показать список завершения автоматически</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
         <translation>Восстанавливать вкладки редактора с предыдущей сессии во время запуска</translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation>Перезагружать файлы, изменённые другими программами без запроса</translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+32"/>
+        <translation>Использовать внешний редактор</translation>
+    </message>
+    <message>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <translation>Вид редактора</translation>
+    </message>
+    <message>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation>(Изменение параметра очищает историю)</translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation>Длина истории выполненных команд</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation>Показывать отладочную информацию в командном окне в дополнение к отметкам в редакторе</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Terminal Colors</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+45"/>
+        <translation>Цветовая схема</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation>Шрифт</translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
-        <translation>Показывать количество строк</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>Подсвечивать текущую строку</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>Дополнение кода</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>Показывать полный путь в заголовке окна</translation>
+        <translation>Показывать номера строк</translation>
     </message>
     <message>
         <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>Подсвечивать текущую строку</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>Показывать полный путь в заголовке окна</translation>
+    </message>
+    <message>
+        <location line="-549"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Interface</source>
+        <translation>Внешний вид</translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation>Подтверждать выход</translation>
+    </message>
+    <message>
+        <location line="+74"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
         <source>Graphic icons</source>
-        <translation type="unfinished"></translation>
+        <translation>Графический значок</translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation>Показывать строку состояния</translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation>Текст неактивный</translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation>Активный</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Background inactive</source>
+        <translation>Фон неактивный</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Octave Startup</source>
+        <translation>Запуск Octave</translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation>Начальный путь</translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation>Выбрать</translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation>Показывать после </translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show whitespace</source>
+        <translation>Показывать символ пробела</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>Не показывать пробелы, используемые для отступов</translation>
+    </message>
+    <message>
+        <location line="+58"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Tab width min.</source>
+        <translation>Ширина вкладок мин.</translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation>макс.</translation>
+    </message>
+    <message>
+        <location line="+615"/>
+        <location filename="../src/ui-settings-dialog.h" line="+45"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>Создавать отсутствующие файлы без запроса</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>команда (%f=файл, %l=строка):</translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation>Командная строка</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>Тип указателя:</translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>Мигающий указатель</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation>Использовать цвет текста</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation>Размер шрифта</translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation>Устанавливать фокус на командном окне при запуске команды из другого виджета</translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation>Файловый менеджер</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation>Показывать размер файлов</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>Показывать типы файлов</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>Показывать дату последнего изменения</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>Показывать скрытые файлы</translation>
+    </message>
+    <message>
+        <location line="-1647"/>
+        <location filename="../src/ui-settings-dialog.h" line="-92"/>
+        <source>Normal</source>
+        <translation>Обычные</translation>
+    </message>
+    <message>
+        <location line="+270"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation>Эти настройки применяются после конфигурационных файлов octaverc.</translation>
     </message>
     <message>
         <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>Командная строка</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>Тип курсора:</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation>Восстанавливать рабочую папку предыдущей сессии</translation>
+    </message>
+    <message>
+        <location line="+322"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>Draw a long line marker</source>
+        <translation>Показывать линию переноса строк</translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation>Показывать символ конца строки</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation>Конец строки по умолчанию</translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation>Минимальная длина слова до отображения списка: </translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>File handling</source>
+        <translation>Работа с файлами</translation>
+    </message>
+    <message>
+        <location line="+93"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Выберите шрифт, его размер (как разницу от размера по умолчанию), стиль шрифта (&lt;b&gt;ж&lt;/b&gt;ирный, &lt;b&gt;к&lt;/b&gt;урсив, &lt;b&gt;п&lt;/b&gt;одчёркнутый), цвет текста и фона (для фона пурпурный цвет (255,0,255) является обозначением фона по умолчанию).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+    <message>
+        <location line="+341"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Display</source>
+        <translation>Внешний вид</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation>Чередующиеся цвета строк</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation>Поведение</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation>Открывать последнюю папку предыдущей сессии</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation>Область переменных</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation>Не показывать подсказку об обозначениях</translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation>Для изменения комбинации клавиш дважды нажмите на ячейку</translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
+        <translation>Сеть</translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>Мигающий курсор</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation>Размер шрифта</translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation>Файловый менеджер</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>Показывать размер файлов</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>Показывать типы файлов</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>Показывать дату последнего изменения</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>Показывать скрытые файлы</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>Чередующиеся цвета строк</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation>Область переменных</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation>Сеть</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
-        <translation type="unfinished"></translation>
+        <translation>Разрешить подключаться к веб-сайту Octave для отображения новостей и другой информации</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>Использовать прокси-сервер</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>HttpProxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
-        <translation type="unfinished"></translation>
+        <translation>Значок виджета в панели задач</translation>
+    </message>
+    <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>Язык (требуется перезапуск)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>Размер значков</translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>Синхронизировать рабочую папку Octave с менеджером фалов</translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation>Цветовое обозначение переменных</translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation>Комбинации клавиш</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation>Используйте для предотвращения конфликтов между комбинациями клавиш</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation>Запретить глабальные комбинации клавиш, когда командное окно в фокусе</translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation>Использовать этот набор</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation>Набор 1:</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>Язык (требуется перезапуск)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation>Экспортировать</translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation>Импортировать</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>Размер иконок</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation>Набор 2:</translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation>Действие</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation>По умолчанию из набора 1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation>Текущая из набора 1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation>По умолчанию из набора 2</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation>Текущая из набора 2</translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Socks5Proxy</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>Имя хоста:</translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
-        <translation type="unfinished"></translation>
+        <translation>Тип сервера:</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>Порт:</translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>Имя пользователя:</translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>Пароль:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-286"/>
+        <translation>Используемый в системе</translation>
+    </message>
+    <message>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
-        <translation type="unfinished"></translation>
+        <translation>Вертикальная черта</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Block Cursor</source>
-        <translation type="unfinished"></translation>
+        <translation>Блок</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Underline Cursor</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+144"/>
+        <translation>Черта снизу</translation>
+    </message>
+    <message>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>Отличие то размера по умолчанию</translation>
     </message>
@@ -1884,19 +2705,29 @@
         <location line="+2"/>
         <source>b</source>
         <comment>short form for bold</comment>
-        <translation type="unfinished"></translation>
+        <translation>ж</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>i</source>
         <comment>short form for italic</comment>
-        <translation type="unfinished"></translation>
+        <translation>к</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>u</source>
         <comment>short form for underlined</comment>
-        <translation type="unfinished"></translation>
+        <translation>п</translation>
+    </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation>Установить начальную рабочую папку Octave</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation>Установить начальную папку для файлового менеджера</translation>
     </message>
 </context>
 <context>
@@ -1904,22 +2735,22 @@
     <message>
         <location filename="../src/welcome-wizard.cc" line="+44"/>
         <source>Community News</source>
-        <translation type="unfinished">Новости сообщества</translation>
+        <translation>Новости сообщества</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Previous</source>
-        <translation type="unfinished"></translation>
+        <translation>Назад</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Next</source>
-        <translation type="unfinished"></translation>
+        <translation>Далее</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Cancel</source>
-        <translation type="unfinished">Отмена</translation>
+        <translation>Отмена</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -1929,7 +2760,12 @@
 &lt;p&gt;You may also view the news by selecting the &quot;Community News&quot; item in the &quot;Help&quot; menu in the GUI, or by visiting
 &lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;После запуска графической оболочки Octave веб-сайт программы проверяется на наличие новостей.
+Проверка будет производиться раз в день и отображать непрочитанные вами новости в случае их наличия.&lt;/p&gt;
+&lt;p&gt;Также Вы можете просматривать новости, нажав &quot;Новости сообщества&quot; в меню программы, или посетив
+&lt;a href=&quot;http://octave.org/community-news.html&quot;&gt;http://octave.org/community-news.html&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+26"/>
@@ -1940,7 +2776,633 @@
 &lt;head/&gt;&lt;body&gt;
 &lt;p&gt;Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
+        <translation>&lt;html&gt;&lt;head&gt;
+&lt;style&gt;
+a:link { text-decoration: underline; color: #0000ff; }
+&lt;/style&gt;
+&lt;head/&gt;&lt;body&gt;
+&lt;p&gt;Разрешить Octave проверять веб-сайт при запуске и оповещать о новостях сообщества.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation>Новый файл</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation>Новый сценарий</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation>Новый графический объект</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation>Открыть файл</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation>Загрузить область переменных</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation>Сохранить область переменных как</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation>Настройки</translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation>Выйли из Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation>Копировать</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation>Вставить</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation>Отменить</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation>Выделить всё</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation>Очистить буфер обмена</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation>Найти файлы</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation>Очистить командное окно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation>Очистить журнал выполненных команд</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation>Очистить область переменных</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation>Шаг с заходом</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation>Шаг с выходом</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation>Продолжить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation>Выйти из режима отладки</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation>Показывать командное окно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation>Показывать журнал выполненных команд</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation>Показывать файловый менеджер</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation>Показывать область переменных</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation>Показывать редактор</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation>Показывать документацию</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation>Командное окно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation>Журнал выполненных команд</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation>Файловый менеджер</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation>Область переменных</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation>Редактор</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation>Документация</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation>Документация на диске</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation>Документация на веб-сайте Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation>Пакеты Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation>Поделиться кодом</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation>Внести вклад в Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation>Ресурсы разработчика Octave</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation>Об Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation>Примечания к выпуску</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation>Новости сообщества</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation>Редактировать функцию</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation>Сохранить файл</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation>Сохранить файл как</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation>Закрыть</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation>Закрыть всё</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation>Печать</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation>Вырезать</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation>Найти и заменить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation>Удалить до начала слова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation>Удалить до конца слова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation>Удалить до начала строки</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation>Удалить до конца строки</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation>Удалить строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation>Копировать строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation>Вырезать строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation>Дублировать выделенное/строку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation>Переместить строку</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation>Закоментировать выделенное</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation>Раскоментировать выделенное</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation>Перевести в верхний регистр</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation>Перевести в нижний регистр</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation>Вставить отступ</translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation>Убрать отступ</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation>Преобразовать конец строки в формат Windows</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation>Преобразовать конец строки в формат Unix</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation>Преобразовать конец строки в формат Mac</translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation>Показывать символ пробела</translation>
+    </message>
+    <message>
+        <location line="-22"/>
+        <source>Goto Line</source>
+        <translation>Перейти к строке</translation>
+    </message>
+    <message>
+        <location line="-125"/>
+        <source>Step</source>
+        <translation>Шаг</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation>Сбросить расположение окон</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation>Сообщить об ошибке</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation>Закрыть другие файлы</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation>Показать список завершения</translation>
+    </message>
+    <message>
+        <location line="+33"/>
+        <source>Move to Matching Brace</source>
+        <translation>Перейти к соответствующей скобке</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation>Выделить до соответствующей скобки</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation>Установить закладку</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation>Следующая закладка</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation>Предыдущая закладка</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation>Удалить все закладки</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation>Настройки стиля</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation>Показывать номера строк</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Endings</source>
+        <translation>Показывать символ конца строки</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation>Показывать линии отступов</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation>Показывать линию переноса строк</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation>Увеличить</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation>Уменьшить</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation>Обычный масштаб</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation>Установить/снять точку останова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation>Следующая точка останова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation>Предыдущая точка останова</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation>Удалить все точки останова</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation>Запустить файл</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation>Запустить выделенное</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation>Помощь по зарезервированному слову</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation>Документация по зарезервированному слову</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation>Основное окно</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation>Файл</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation>Редактировать</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation>Отладка</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation>Окно</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation>Помощь</translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation>Новости</translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation>Вид</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation>Запуск</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation>Ввести новую комбинацию клавиш для набора %1</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation>Назначьте комбинацию клавиш или нажмине на кнопку сброса на значение по умолчанию.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation>Ввести комбинацию клавиш путём её воспроизведения</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation>Текущая комбинация</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation>Комбинация по умолчанию</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation>Значение по умолчанию</translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation>Конфликт комбинаций клавиш</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation>Выбранная комбинация клавиш
+  &quot;%1&quot;
+уже используется для действия
+  &quot;%2&quot;.
+Вы действительно хотите использовать эту комбинацию?</translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation>Импортировать набор комбинаций клавиш %1 из файла ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation>Файл набора комбинаций клавиш Octave (*.osc);;Все файлы (*)</translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation>Экспортировать набор комбинаций клавиш %1 в файл ...</translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation>Невозможно открыть %1 как набор комбинаций клавиш Octave</translation>
     </message>
 </context>
 <context>
@@ -1954,7 +3416,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>Вводите сюда и нажмите &apos;Enter&apos;, чтобы начать поиск</translation>
     </message>
@@ -1963,6 +3425,16 @@
         <source>Global search</source>
         <translation>Глобальный поиск</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation>Ошибка</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation>Info-файл&lt;p&gt;%1&lt;p&gt;или его сжатая версия не существуют</translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -1996,8 +3468,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation type="unfinished"></translation>
+        <source>Attribute</source>
+        <translation>Свойство</translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2008,25 +3480,40 @@
         <location line="+37"/>
         <location line="+2"/>
         <source>complex</source>
-        <translation type="unfinished"></translation>
+        <translation>комплексная</translation>
     </message>
 </context>
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>Область переменных</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>View the variables in the active workspace.</source>
-        <translation>Просмотр содержимого текущей области переменных.</translation>
-    </message>
-    <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>Копировать</translation>
+        <translation>Содержимое текущей области переменных.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation>Введите текст для поиска в области переменных</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation>Фильтр</translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation>Копировать имя</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation>Копировать значение</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2034,19 +3521,19 @@
         <translation>Переименовать</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+125"/>
+        <translation>Только элементы верхнего уровня могут быть переименованы.</translation>
+    </message>
+    <message>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
-        <translation>Просмотр содержимого текущей области переменных.&lt;br&gt; </translation>
+        <translation>Содержимое текущей области переменных.&lt;br&gt; </translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation type="unfinished"></translation>
+        <source>Colors for variable attributes:</source>
+        <translation>Цветовое обозначение переменных:</translation>
     </message>
 </context>
 </TS>
--- a/libgui/languages/translators
+++ b/libgui/languages/translators
@@ -4,9 +4,11 @@
 # translation files is en_US.ts
 be_BY Mihas Varantsou <meequz@gmail.com>
 de_DE Andreas Weber <andy.weber.aw@googlemail.com>
-es_ES Valentin Ortega-Clavero <arcanos3030@gmail.com>
+es_ES Valentin Ortega-Clavero <arcanos3030@gmail.com>, José Luis García Pallero <jgpallero@gmail.com>
 fr_FR David Bateman <dbateman@free.fr>, Catalin Codreanu <codreanu.catalin@gmail.com>
-pt_BR Júlio Hoffimann Mendes <julio.hoffimann@gmail.com>
+it_IT Massimiliano Fasi <massimiliano.fasi@gmail.com>
+ja_JP Tatsuro Matsuoka <tmacchant@yahoo.co.jp>
+pt_BR Júlio Hoffimann Mendes <julio.hoffimann@gmail.com>, Felipe G. Nievinski <fgnievinski@gmail.com>
 pt_PT Carnë Draug <carandraug@octave.org>
 ru_RU Andriy Shinkarchuck <adriano32.gnu@gmail.com>
 uk_UA Andriy Shinkarchuck <adriano32.gnu@gmail.com>
--- a/libgui/languages/uk_UA.ts
+++ b/libgui/languages/uk_UA.ts
@@ -61,16 +61,11 @@
         <source>cursor</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
@@ -80,15 +75,20 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation type="unfinished"></translation>
     </message>
@@ -760,6 +760,127 @@
     </message>
 </context>
 <context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation type="unfinished">&amp;Файл</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation type="unfinished">&amp;Правка</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished">Виріза&amp;ти</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -775,16 +896,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -800,44 +922,34 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation type="unfinished">&amp;Створити</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation type="unfinished">&amp;Зберегти</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>&amp;Відкрити...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>Зберегти &amp;як...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation type="unfinished">В&amp;ернути</translation>
     </message>
@@ -847,42 +959,42 @@
         <translation type="unfinished">П&amp;овторити</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation type="unfinished">&amp;Копіювати</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished">Виріза&amp;ти</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation type="unfinished">До &amp;наступної закладки</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation type="unfinished">До &amp;попередньої закладки</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation type="unfinished">Виріза&amp;ти</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation type="unfinished"></translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation type="unfinished">В&amp;становити/видалити закладку</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation type="unfinished">До &amp;наступної закладки</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation type="unfinished">До &amp;попередньої закладки</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation type="unfinished">В&amp;становити/видалити закладку</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation type="unfinished"></translation>
     </message>
@@ -892,17 +1004,17 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation type="unfinished"></translation>
     </message>
@@ -912,57 +1024,238 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>&amp;Find and Replace...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Save File and Run</source>
+        <location line="+5"/>
+        <source>&amp;Indent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-55"/>
+        <source>&amp;Find and Replace...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+162"/>
+        <source>Save File and Run</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-90"/>
         <source>Go &amp;to Line...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+55"/>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+844"/>
         <source>&amp;Recent Editor Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+8"/>
         <source>&amp;Edit Function</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>&amp;Close</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+2"/>
         <source>Close All</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished">Редактор</translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation type="unfinished"></translation>
     </message>
@@ -972,63 +1265,63 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation type="unfinished">&amp;Файл</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation type="unfinished">&amp;Правка</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation type="unfinished">&amp;Виконання</translation>
     </message>
@@ -1036,7 +1329,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1046,44 +1364,52 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-322"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -1097,23 +1423,24 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+177"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+85"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1121,7 +1448,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation type="unfinished">Файловий менеджер</translation>
     </message>
@@ -1136,42 +1463,43 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1181,37 +1509,29 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Find Files...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1231,7 +1551,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1261,17 +1581,17 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1305,7 +1625,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1322,7 +1642,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1337,7 +1662,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1360,7 +1685,7 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation type="unfinished"></translation>
@@ -1385,7 +1710,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1455,7 +1785,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1465,7 +1795,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1475,7 +1805,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1498,12 +1828,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1523,22 +1848,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1558,8 +1873,23 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1623,7 +1953,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1644,7 +1979,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation type="unfinished">Перегляд і пошук серед історії виконаних команд.</translation>
     </message>
@@ -1654,17 +1989,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation type="unfinished">Введіть текст для фільтрування історії виконаних команд.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation type="unfinished">Історія виконаних команд</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1674,7 +2014,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1709,53 +2049,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation type="unfinished">Завантажити область змінних</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation type="unfinished">Про Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation type="unfinished">&amp;Файл</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation type="unfinished">Вийти</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation type="unfinished">&amp;Правка</translation>
     </message>
@@ -1765,22 +2095,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1795,17 +2125,42 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+187"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <source>New Function...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Clear Clipboard</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1825,7 +2180,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1840,32 +2195,27 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation type="unfinished">Файловий менеджер</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-1020"/>
+        <source>Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+868"/>
         <source>Load Workspace...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1875,22 +2225,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+29"/>
+        <source>New Script</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+124"/>
         <source>Step Out</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1910,7 +2260,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1920,7 +2270,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1935,23 +2285,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1966,69 +2305,74 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-175"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
         <source>&amp;Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+3"/>
         <source>Show Command Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Show Command History</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation type="unfinished">Історія виконаних команд</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation type="unfinished">Область змінних</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation type="unfinished">Редактор</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation type="unfinished">Документація</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2041,7 +2385,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -2077,18 +2421,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2096,7 +2440,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2110,28 +2454,18 @@
         <source>Edit</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
+        <location filename="../src/octave-qt-link.cc" line="+111"/>
         <location line="+6"/>
         <location line="+7"/>
-        <source>Yes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -2144,12 +2478,12 @@
     </message>
     <message>
         <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2168,15 +2502,24 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -2187,7 +2530,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2195,314 +2538,732 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation type="unfinished">Налаштування</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-338"/>
+        <location filename="../src/ui-settings-dialog.h" line="-17"/>
         <source>Octave logo only</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="-111"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Dock widget title bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Small</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>3D</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <location filename="../src/ui-settings-dialog.h" line="+63"/>
         <source>Editor</source>
         <translation type="unfinished">Редактор</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+151"/>
+        <location filename="../src/ui-settings-dialog.h" line="-49"/>
         <source>Color</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+135"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Terminal Colors</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+45"/>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
         <source>Font</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-757"/>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
         <source>Show line numbers</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-549"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
+        <source>Interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Confirm before exiting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+74"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
         <source>Graphic icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+29"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Background inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Octave Startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1322"/>
+        <location filename="../src/ui-settings-dialog.h" line="-78"/>
+        <source>After Column</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Show whitespace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+58"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Tab width min.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+615"/>
+        <location filename="../src/ui-settings-dialog.h" line="+45"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+521"/>
+        <location filename="../src/ui-settings-dialog.h" line="+43"/>
+        <source>Terminal</source>
+        <translation type="unfinished">Командний рядок</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Use foreground color</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Font size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+123"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+73"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>File Browser</source>
+        <translation type="unfinished">Файловий менеджер</translation>
+    </message>
+    <message>
+        <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Show file size</source>
+        <translation type="unfinished">Показувати розмір файлів</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation type="unfinished">Показувати типи файлів</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation type="unfinished">Показувати дату останньої зміни</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation type="unfinished">Показувати приховані файли</translation>
+    </message>
+    <message>
+        <location line="-1647"/>
+        <location filename="../src/ui-settings-dialog.h" line="-92"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+270"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation type="unfinished">emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation type="unfinished">Командний рядок</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+322"/>
+        <location filename="../src/ui-settings-dialog.h" line="+15"/>
+        <source>Draw a long line marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+79"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>File handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+93"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+341"/>
+        <location filename="../src/ui-settings-dialog.h" line="+13"/>
+        <source>Display</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Alternating row colors</source>
+        <translation type="unfinished">Чергувати колір рядків</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Behavior</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore last directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Workspace</source>
+        <translation type="unfinished">Область змінних</translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
+        <source>Network</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Use foreground color</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+94"/>
-        <source>Font size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>File Browser</source>
-        <translation type="unfinished">Файловий менеджер</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation type="unfinished">Показувати розмір файлів</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation type="unfinished">Показувати типи файлів</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation type="unfinished">Показувати дату останньої зміни</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation type="unfinished">Показувати приховані файли</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation type="unfinished">Чергувати колір рядків</translation>
-    </message>
-    <message>
-        <location line="+21"/>
-        <source>Workspace</source>
-        <translation type="unfinished">Область змінних</translation>
-    </message>
-    <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+35"/>
-        <source>Network</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1714"/>
+        <location filename="../src/ui-settings-dialog.h" line="+100"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+132"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Colors for variable attributes </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation type="unfinished">Пароль:</translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2517,7 +3278,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2544,6 +3305,16 @@
         <comment>short form for underlined</comment>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -2590,6 +3361,622 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation type="unfinished">Завантажити область змінних</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation type="unfinished">Історія виконаних команд</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation type="unfinished">Файловий менеджер</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation type="unfinished">Область змінних</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation type="unfinished">Редактор</translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation type="unfinished">Документація</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation type="unfinished">Про Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished">Повідомити про помилку</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2600,7 +3987,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2609,6 +3996,16 @@
         <source>Global search</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2642,7 +4039,7 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
+        <source>Attribute</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2660,7 +4057,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation type="unfinished">Область змінних</translation>
     </message>
@@ -2670,8 +4067,23 @@
         <translation type="unfinished">Перегляд змісту поточної області змінних.</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2680,18 +4092,18 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
+        <source>Colors for variable attributes:</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
--- a/libgui/languages/zh_CN.ts
+++ b/libgui/languages/zh_CN.ts
@@ -1,14 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
 <TS version="2.0" language="zh_CN">
-    <extra-po-header-po_revision_date></extra-po-header-po_revision_date>
-    <extra-po-headers>MIME-Version,Content-Type,Content-Transfer-Encoding,Plural-Forms,X-Language,X-Qt-Contexts,Project-Id-Version,POT-Creation-Date,PO-Revision-Date,Last-Translator,Language-Team,Language,X-Generator</extra-po-headers>
-    <extra-po-header-x_generator>Poedit 1.6.4</extra-po-header-x_generator>
-    <extra-po-header-language_team>安同开源社区 &lt;aosc@members.fsf.org&gt;</extra-po-header-language_team>
-    <extra-po-header-project_id_version>octave</extra-po-header-project_id_version>
-    <extra-po-header-pot_creation_date></extra-po-header-pot_creation_date>
-    <extra-po-header-language>zh_CN</extra-po-header-language>
-    <extra-po-header-last_translator>Jeff Bai &lt;jeffbaichina@members.fsf.org&gt;</extra-po-header-last_translator>
 <context>
     <name>ListDialog</name>
     <message>
@@ -69,16 +61,11 @@
         <source>cursor</source>
         <translation>光标</translation>
     </message>
-    <message>
-        <location filename="../src/main-window.cc" line="+1900"/>
-        <source>&lt;p&gt;&lt;strong&gt;A Note about Octave&apos;s New GUI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the biggest new features for Octave 3.8 is a graphical user interface.  It is the one thing that users have requested most often over the last few years and now it is almost ready.  But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface.&lt;/p&gt;&lt;p&gt;Given the length of time and the number of bug fixes and improvements since the last major release, we also decided against delaying the release of all these new improvements any longer just to perfect the GUI.  So please enjoy the 3.8 release of Octave and the preview of the new GUI.  We believe it is working reasonably well, but we also know that there are some obvious rough spots and many things that could be improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We Need Your Help&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There are many ways that you can help us fix the remaining problems, complete the GUI, and improve the overall user experience for both novices and experts alike (links will open an external browser):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;If you are a skilled software developer, you can help by contributing your time to help &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;If Octave does not work properly, you are encouraged to &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;report problems &lt;/a&gt; that you find.&lt;/li&gt;&lt;li&gt;Whether you are a user or developer, you can &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;help to fund the project&lt;/a&gt;.  Octave development takes a lot of time and expertise.  Your contributions help to ensure that Octave will continue to improve.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;We hope you find Octave to be useful.  Please help us make it even better for the future!&lt;/p&gt;</source>
-        <translation>&lt;p&gt;&lt;strong&gt;关于 Octave 新用户界面的一点注意事项&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Octave 最重要的一个新特性就是图形界面。这是用户在过往几年需求最大、最多的一个特性,现在这个界面终于基本就绪了。但是这个界面现在恐怕还不特别完善、尚需打磨,所以我们计划在 4.0.x 发行系列才将图形界面作为默认的用户界面。&lt;/p&gt;&lt;p&gt;考虑到这个版本的和上个主要版本之间开发时长和修复的 Bug 数量还有一部分的改进,我们决定不再推迟发行以打磨界面。所以请尽情享用 Octave 的 3.8 版本以及新界面的预览吧。我们认为这个版本已经相当可用,不过我们也知道这个发行存在一定量的粗糙细节和很多可以做得更好的地方。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;我们需要你的帮助&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;你有很多方法可以帮助我们处理依然存在的问题,完善用户界面,并给专家和新手们改进用户体验 (以下链接会打开外部浏览器):&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;如果你是一个有一定经验的软件爱你开发者,你可以使用你的闲时来帮助我们 &lt;a href=&quot;http://octave.org/get-involved.html&quot;&gt;develop Octave&lt;/a&gt;。&lt;/li&gt;&lt;li&gt;如果 Octave 工作不正常,我们鼓励你 &lt;a href=&quot;http://octave.org/bugs.html&quot;&gt;报告问题&lt;/a&gt;。&lt;/li&gt;&lt;li&gt;无论你是开发者还是用户,你可以 &lt;a href=&quot;http://octave.org/donate.html&quot;&gt;资助我们&lt;/a&gt;。Octave 的开发需要大量时间和经验。你的贡献让我们有信心让 Octave 继续变得更好。&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;我们希望 Octave 可以给你带来一定的帮助。请帮助我们让 Octave 的未来变得更好!&lt;/p&gt;</translation>
-    </message>
 </context>
 <context>
     <name>QTerminal</name>
     <message>
-        <location filename="../qterminal/libqterminal/QTerminal.h" line="+121"/>
+        <location filename="../qterminal/libqterminal/QTerminal.h" line="+135"/>
         <source>Copy</source>
         <translation>复制</translation>
     </message>
@@ -88,20 +75,812 @@
         <translation>粘贴</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Clear All</source>
-        <translation>清空</translation>
+        <location line="+5"/>
+        <source>Select All</source>
+        <translation type="unfinished">全选</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Clear Window</source>
+        <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1536"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1778"/>
         <source>copied selection to clipboard</source>
         <translation>复制选定区域到剪贴板</translation>
     </message>
 </context>
 <context>
+    <name>QsciLexerBash</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbash.cpp" line="+208"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Parameter expansion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerBatch</name>
+    <message>
+        <location filename="../../../qsci/qscilexerbatch.cpp" line="+179"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Label</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hide command character</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>External command</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Variable</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerCPP</name>
+    <message>
+        <location filename="../../../qsci/qscilexercpp.cpp" line="+352"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>IDL UUID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive IDL UUID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Pre-processor block</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive pre-processor block</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Unclosed string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive unclosed string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C# verbatim string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C# verbatim string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaScript regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaScript regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc style C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc style C++ comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Secondary keywords and identifiers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive secondary keywords and identifiers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>JavaDoc keyword error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive JavaDoc keyword error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Global classes and typedefs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive global classes and typedefs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>C++ raw string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inactive C++ raw string</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerDiff</name>
+    <message>
+        <location filename="../../../qsci/qscilexerdiff.cpp" line="+107"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Header</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Removed line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Added line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Changed line</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerMatlab</name>
+    <message>
+        <location filename="../../../qsci/qscilexermatlab.cpp" line="+138"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Command</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciLexerPerl</name>
+    <message>
+        <location filename="../../../qsci/qscilexerperl.cpp" line="+333"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Comment</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted string</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Operator</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Scalar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Array</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Hash</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Symbol table</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Data section</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Here document delimiter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Single-quoted here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (q)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qw)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>POD verbatim</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Subroutine prototype</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format identifier</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Format body</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted string (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Translation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Regular expression (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Substitution (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backticks (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Double-quoted here document (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Backtick here document (interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qq, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qx, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Quoted string (qr, interpolated variable)</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QsciScintilla</name>
+    <message>
+        <location filename="../../../qsci/qsciscintilla.cpp" line="+4201"/>
+        <source>&amp;Undo</source>
+        <translation type="unfinished">撤销 (&amp;U) </translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>&amp;Redo</source>
+        <translation type="unfinished">重做 (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished">剪切 (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Copy</source>
+        <translation type="unfinished">复制 (&amp;C)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>&amp;Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Delete</source>
+        <translation type="unfinished">删除</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Select All</source>
+        <translation type="unfinished">全选</translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::Figure</name>
+    <message>
+        <location filename="../graphics/Figure.cc" line="+282"/>
+        <source>Figure ToolBar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Axes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Autoscale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>&amp;File</source>
+        <translation type="unfinished">文件 (&amp;F)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save &amp;As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Close Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Edit</source>
+        <translation type="unfinished">编辑 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cop&amp;y</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cu&amp;t</source>
+        <translation type="unfinished">剪切 (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Paste</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Help</source>
+        <translation type="unfinished">帮助 (&amp;H)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About &amp;Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+427"/>
+        <source>About QtHandles</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <source>Save Figure As</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QtHandles::MouseModeActionGroup</name>
+    <message>
+        <location filename="../graphics/MouseModeActionGroup.cc" line="+40"/>
+        <source>Rotate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Pan</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Insert Text</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>documentation_dock_widget</name>
     <message>
         <location filename="../src/documentation-dock-widget.cc" line="+34"/>
@@ -117,16 +896,17 @@
 <context>
     <name>file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+346"/>
-        <location line="+22"/>
-        <location line="+18"/>
-        <location line="+59"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+285"/>
+        <location line="+125"/>
+        <location line="+19"/>
+        <location line="+25"/>
+        <location line="+62"/>
         <location line="+28"/>
         <source>Octave Editor</source>
         <translation>Octave 编辑器</translation>
     </message>
     <message>
-        <location line="-269"/>
+        <location line="-318"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Octave 文件 (*.m);;所有文件 (*)</translation>
     </message>
@@ -143,7 +923,7 @@
 </translation>
     </message>
     <message>
-        <location line="+281"/>
+        <location line="+330"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -152,37 +932,27 @@
 的文件在编辑器中被打开</translation>
     </message>
     <message>
-        <location line="+255"/>
+        <location line="+387"/>
         <source>&amp;%1 %2</source>
         <translation>&amp;%1 %2</translation>
     </message>
     <message>
-        <location line="+175"/>
-        <source>&amp;New File</source>
-        <translation>新建文件 (&amp;N)</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+388"/>
         <source>&amp;Save File</source>
         <translation>保存文件 (&amp;S)</translation>
     </message>
     <message>
-        <location line="-3"/>
-        <source>&amp;Open File...</source>
-        <translation>打开文件 (&amp;O) ...</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+2"/>
         <source>Save File &amp;As...</source>
         <translation>文件另存为 (&amp;A)...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+14"/>
         <source>Print...</source>
         <translation>打印...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>&amp;Undo</source>
         <translation>撤销 (&amp;U) </translation>
     </message>
@@ -192,42 +962,42 @@
         <translation>重做 (&amp;R)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>&amp;Copy</source>
         <translation>复制 (&amp;C)</translation>
     </message>
     <message>
+        <location line="+3"/>
+        <source>Cu&amp;t</source>
+        <translation>剪切 (&amp;T)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Paste</source>
+        <translation>粘贴</translation>
+    </message>
+    <message>
+        <location line="+96"/>
+        <source>&amp;Next Bookmark</source>
+        <translation>下一个书签 (&amp;N)</translation>
+    </message>
+    <message>
+        <location line="-2"/>
+        <source>Pre&amp;vious Bookmark</source>
+        <translation>上一个书签 (&amp;V)</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>Cu&amp;t</source>
-        <translation>剪切 (&amp;T)</translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Paste</source>
-        <translation>粘贴</translation>
+        <source>Toggle &amp;Bookmark</source>
+        <translation>打开/关闭书签 (&amp;B)</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>&amp;Next Bookmark</source>
-        <translation>下一个书签 (&amp;N)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Pre&amp;vious Bookmark</source>
-        <translation>上一个书签 (&amp;V)</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Toggle &amp;Bookmark</source>
-        <translation>打开/关闭书签 (&amp;B)</translation>
-    </message>
-    <message>
-        <location line="+3"/>
         <source>&amp;Remove All Bookmarks</source>
         <translation>移除所有书签 (&amp;R)</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+54"/>
         <source>&amp;Next Breakpoint</source>
         <translation>下一个断点 (&amp;N)</translation>
     </message>
@@ -237,17 +1007,17 @@
         <translation>上一个断点 (&amp;V)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-6"/>
         <source>Toggle &amp;Breakpoint</source>
         <translation>打开/关闭断点 (&amp;B)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+9"/>
         <source>&amp;Remove All Breakpoints</source>
         <translation>移除所有断点 (&amp;R)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-104"/>
         <source>&amp;Comment</source>
         <translation>注释 (&amp;C)</translation>
     </message>
@@ -257,57 +1027,238 @@
         <translation>取消注释 (&amp;U)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-48"/>
         <source>&amp;Find and Replace...</source>
         <translation>查找并替换 (&amp;F) ...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+162"/>
         <source>Save File and Run</source>
         <translation>保存文件并运行</translation>
     </message>
     <message>
+        <location line="-90"/>
+        <source>Go &amp;to Line...</source>
+        <translation>跳至行 (&amp;T) ...</translation>
+    </message>
+    <message>
+        <location line="-1126"/>
+        <source>Could not start custom file editor
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+148"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation type="unfinished">取消</translation>
+    </message>
+    <message>
+        <location line="+844"/>
+        <source>&amp;Recent Editor Files</source>
+        <translation>最近编辑器文件 (&amp;R)</translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>&amp;Edit Function</source>
+        <translation>编辑函数 (&amp;E)</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Close</source>
+        <translation>关闭 (&amp;C)</translation>
+    </message>
+    <message>
         <location line="+2"/>
-        <source>Go &amp;to Line...</source>
-        <translation>跳至行 (&amp;T) ...</translation>
-    </message>
-    <message>
-        <location line="+55"/>
-        <source>&amp;Recent Editor Files</source>
-        <translation>最近编辑器文件 (&amp;R)</translation>
-    </message>
-    <message>
-        <location line="+11"/>
-        <source>&amp;Edit Function</source>
-        <translation>编辑函数 (&amp;E)</translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>&amp;Close</source>
-        <translation>关闭 (&amp;C)</translation>
-    </message>
-    <message>
-        <location line="+4"/>
         <source>Close All</source>
         <translation>关闭全部</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
         <source>Close Other Files</source>
         <translation>关闭其他文件</translation>
     </message>
     <message>
         <location line="+31"/>
+        <source>Select All</source>
+        <translation type="unfinished">全选</translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>&amp;Commands</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>&amp;Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Format</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>&amp;Indent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Unindent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Convert Line Endings to &amp;Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Convert Line Endings to &amp;Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Navi&amp;gation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>&amp;Preferences...</source>
         <translation>首选项 (&amp;P) ...</translation>
     </message>
     <message>
+        <location line="+2"/>
+        <source>&amp;Styles Preferences...</source>
+        <translation>风格首选项 (&amp;S) ...</translation>
+    </message>
+    <message>
         <location line="+4"/>
-        <source>&amp;Styles Preferences...</source>
-        <translation>风格首选项 (&amp;S) ...</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <source>&amp;View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show &amp;Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+128"/>
+        <source>Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-120"/>
+        <source>Show Line &amp;Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show &amp;Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Long Line &amp;Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Zoom &amp;In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom &amp;Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&amp;Normal Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>Run &amp;Selection</source>
         <translation>运行选定部分 (&amp;S)</translation>
     </message>
@@ -317,17 +1268,17 @@
         <translation>帮助 (&amp;H)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&amp;Help on Keyword</source>
         <translation>帮助关键字 (&amp;H)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>&amp;Documentation on Keyword</source>
         <translation>文档关键字 (&amp;D)</translation>
     </message>
     <message>
-        <location line="-741"/>
+        <location line="-1103"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -336,7 +1287,7 @@
 无法打开/读取: %2.</translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+19"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -345,7 +1296,7 @@
 不存在。你希望创建它么?</translation>
     </message>
     <message>
-        <location line="+18"/>
+        <location line="+25"/>
         <source>Could not open file
 %1
 for write: %2.</source>
@@ -354,32 +1305,32 @@
 无法打开/写入: %2.</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+90"/>
         <source>The associated file editor tab has disappeared.</source>
         <translation>关联文件的编辑标签消失了。</translation>
     </message>
     <message>
-        <location line="+521"/>
+        <location line="+731"/>
         <source>&amp;File</source>
         <translation>文件 (&amp;F)</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>New &amp;Function...</source>
-        <translation>新建函数 (&amp;F) ...</translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>&amp;Edit</source>
         <translation>编辑 (&amp;E)</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+138"/>
+        <source>Show &amp;Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
         <source>&amp;Debug</source>
         <translation>除错 (&amp;D)</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+21"/>
         <source>&amp;Run</source>
         <translation>运行 (&amp;R)</translation>
     </message>
@@ -387,7 +1338,32 @@
 <context>
     <name>file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+803"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+92"/>
+        <source>eol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>line:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>col:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <source>%1 is a built-in function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <source>Can not find function %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+775"/>
         <source>Goto line</source>
         <translation>前往行</translation>
     </message>
@@ -397,47 +1373,63 @@
         <translation>行数</translation>
     </message>
     <message>
-        <location line="+71"/>
-        <location line="+69"/>
+        <location line="+146"/>
+        <location line="+63"/>
         <source>&lt;unnamed&gt;</source>
         <translation>&lt;未命名&gt;</translation>
     </message>
     <message>
-        <location line="-12"/>
-        <source>Do you want to save or discard the changes?</source>
-        <translation>你希望保存还是丢弃更改?</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+4"/>
+        <source>The file
+
+  %1
+
+is about to be closed but has been modified.  %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+288"/>
+        <source>Line Endings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Octave Files (*.m)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+78"/>
+        <source>&quot;%1&quot;
+is not a valid identifier.
+
+If you keep this file name, you will not be able to
+call your script using its name as an Octave command.
+
+Do you want to choose another name?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-400"/>
         <source>Do you want to cancel closing, save or discard the changes?</source>
         <translation>你希望关闭,保存还是丢弃更改?</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <location line="+122"/>
-        <location line="+150"/>
-        <location line="+22"/>
+        <location line="-970"/>
+        <location line="+979"/>
+        <location line="+213"/>
+        <location line="+177"/>
+        <location line="+85"/>
+        <location line="+23"/>
         <source>Octave Editor</source>
         <translation>Octave 编辑器</translation>
     </message>
     <message>
-        <location line="-293"/>
-        <source>The file
-%1
-is about to be closed but has been modified.
-%2</source>
-        <translation>数据文件
-%1
-即将要被关闭,但是它已经被更改。
-%2</translation>
-    </message>
-    <message>
-        <location line="+201"/>
-        <source>Octave Files (*.m);;All Files (*)</source>
-        <translation>Octave 文件 (*.m);;所有文件 (*)</translation>
-    </message>
-    <message>
-        <location line="+86"/>
+        <location line="-6"/>
         <source>
 
 Warning: The contents in the editor is modified!</source>
@@ -455,24 +1447,14 @@
 已经被修改或重命名。你希望现在保存这个文件吗?%2</translation>
     </message>
     <message>
-        <location line="-172"/>
+        <location line="-285"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>无法打开文件 %1 以写入:
 %2.</translation>
     </message>
     <message>
-        <location line="-975"/>
-        <source>Line:</source>
-        <translation>行: </translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Col:</source>
-        <translation>列: </translation>
-    </message>
-    <message>
-        <location line="+1122"/>
+        <location line="+262"/>
         <source>It seems that &apos;%1&apos; has been modified by another application. Do you want to reload it?</source>
         <translation>看起来 &apos;%1&apos; 已经被其他应用修改。你希望重新载入这个文件吗?</translation>
     </message>
@@ -480,7 +1462,7 @@
 <context>
     <name>files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+68"/>
+        <location filename="../src/files-dock-widget.cc" line="+69"/>
         <source>File Browser</source>
         <translation>文件浏览器</translation>
     </message>
@@ -495,42 +1477,43 @@
         <translation>输入路径或文件名</translation>
     </message>
     <message>
-        <location line="+11"/>
-        <source>Move up one directory</source>
-        <translation>向上一级移动</translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+24"/>
+        <source>Set Octave directory to current browser directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Actions on current directory</source>
         <translation>在当前目录的操作</translation>
     </message>
     <message>
-        <location line="+373"/>
+        <location line="+15"/>
+        <source>Set Browser Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+388"/>
         <source>Find Files...</source>
         <translation>查找文件...</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>New File</source>
-        <translation>新建文件</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+364"/>
         <source>New Directory</source>
         <translation>新建目录</translation>
     </message>
     <message>
-        <location line="-323"/>
-        <source>Double-click a file to open it</source>
-        <translation>双击一个文件以打开它</translation>
-    </message>
-    <message>
-        <location line="-79"/>
+        <location line="-784"/>
         <source>Show Octave directory</source>
         <translation>显示 Octave 目录</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="-4"/>
+        <source>One directory up</source>
+        <translation type="unfinished">向上一级</translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Go to current Octave directory</source>
         <translation>前往当前的 Octave 目录</translation>
     </message>
@@ -540,32 +1523,29 @@
         <translation>设置 Octave 目录</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set Octave directroy to current browser directory</source>
-        <translation>设置 Octave 路径为当前浏览的目录</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Show Home Directory</source>
         <translation>显示主目录</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Search Directory...</source>
-        <translation>搜索目录...</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
+        <location line="+397"/>
         <source>New File...</source>
         <translation>新建文件...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-394"/>
+        <location line="+397"/>
         <source>New Directory...</source>
         <translation>新建目录...</translation>
     </message>
     <message>
-        <location line="+276"/>
+        <location line="-335"/>
+        <source>Activate to open in editor, right click for alternatives</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+236"/>
         <source>File size</source>
         <translation>文件大小</translation>
     </message>
@@ -585,7 +1565,7 @@
         <translation>显示隐藏文件</translation>
     </message>
     <message>
-        <location line="+24"/>
+        <location line="+35"/>
         <source>Open</source>
         <translation>打开</translation>
     </message>
@@ -615,17 +1595,17 @@
         <translation>设置当前目录</translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Rename</source>
-        <translation>重命名</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Delete</source>
-        <translation>删除</translation>
-    </message>
-    <message>
-        <location line="+108"/>
+        <location line="+9"/>
+        <source>Rename...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+115"/>
         <source>Rename file/directory</source>
         <translation>重命名文件/目录</translation>
     </message>
@@ -662,7 +1642,7 @@
         <translation>不能删除一个非空目录</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+151"/>
         <source>Set directory of file browser</source>
         <translation>设置目录到文件浏览器</translation>
     </message>
@@ -680,7 +1660,12 @@
 </translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+1"/>
+        <source>New File.txt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Create Directory</source>
         <translation>创建目录</translation>
     </message>
@@ -696,7 +1681,7 @@
 <context>
     <name>final_page</name>
     <message>
-        <location filename="../src/welcome-wizard.cc" line="+194"/>
+        <location filename="../src/welcome-wizard.cc" line="+199"/>
         <source>Enjoy!</source>
         <translation>尽情享受吧!</translation>
     </message>
@@ -719,14 +1704,10 @@
         <location line="+7"/>
         <source>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;We hope you find Octave to be a useful tool.&lt;/p&gt;
-&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.
+&lt;p&gt;If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;我们希望 Octave 能给你带来便利和帮助。&lt;/p&gt;
-&lt;p&gt;当你在使用过程中遇到问题时,有许多办法获取帮助,包括商业支持选项、一个邮件列表、一个百科以及其他社区的支持频道。
-你也可以访问这里以获取更多的信息 &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (将会在外部浏览器打开)。&lt;/p&gt;
-&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+21"/>
@@ -759,7 +1740,12 @@
 <context>
     <name>find_dialog</name>
     <message>
-        <location filename="../src/m-editor/find-dialog.cc" line="+77"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+74"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Find &amp;what:</source>
         <translation>搜索 (&amp;W) : </translation>
     </message>
@@ -829,7 +1815,7 @@
         <translation>搜索选中 (&amp;L)</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+84"/>
         <source>Search from end</source>
         <translation>从尾部搜索</translation>
     </message>
@@ -839,7 +1825,7 @@
         <translation>从开头搜索</translation>
     </message>
     <message>
-        <location line="+121"/>
+        <location line="+205"/>
         <source>Replace Result</source>
         <translation>替换结果</translation>
     </message>
@@ -849,7 +1835,7 @@
         <translation>%1 项已替换</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+15"/>
         <source>Find Result</source>
         <translation>查找结果</translation>
     </message>
@@ -872,12 +1858,7 @@
         <translation>名称: </translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Enter the filename expression</source>
-        <translation>输入文件名表达式</translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+8"/>
         <source>Start in:</source>
         <translation>从: </translation>
     </message>
@@ -897,22 +1878,12 @@
         <translation>从初始目录浏览</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Recurse directories</source>
-        <translation>递归目录</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Search recursively through directories for matching files</source>
         <translation>递归搜索目录以查找匹配文件</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Include directories</source>
-        <translation>包含目录</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+6"/>
         <source>Include matching directories in search results</source>
         <translation>在搜索结果中包含匹配目录</translation>
     </message>
@@ -932,9 +1903,24 @@
         <translation>包含文字: </translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Search must match text</source>
-        <translation>搜索必须匹配文字</translation>
+        <location line="-35"/>
+        <source>Enter the filename search expression</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Search subdirectories</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Include directory names</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Enter the file content search expression</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+5"/>
@@ -997,7 +1983,12 @@
         <translation>正在搜索...</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+23"/>
+        <source>%1 match(es)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Set search directory</source>
         <translation>设置搜索目录</translation>
     </message>
@@ -1018,7 +2009,7 @@
 <context>
     <name>history_dock_widget</name>
     <message>
-        <location filename="../src/history-dock-widget.cc" line="+43"/>
+        <location filename="../src/history-dock-widget.cc" line="+47"/>
         <source>Browse and search the command history.</source>
         <translation>浏览并搜索命令历史。</translation>
     </message>
@@ -1028,17 +2019,22 @@
         <translation>双击一个命令以传递到终端。</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Enter text to filter the command history.</source>
-        <translation>输入文字以过滤命令历史。</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+8"/>
+        <source>Enter text to filter the command history</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command History</source>
         <translation>命令历史</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+89"/>
         <source>Copy</source>
         <translation>复制</translation>
     </message>
@@ -1048,7 +2044,7 @@
         <translation>评估</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Create script</source>
         <translation>创建脚本</translation>
     </message>
@@ -1087,53 +2083,43 @@
 <context>
     <name>main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="-1696"/>
+        <location filename="../src/main-window.cc" line="+268"/>
         <source>Load Workspace</source>
         <translation>载入工作空间</translation>
     </message>
     <message>
-        <location line="+645"/>
-        <location line="+876"/>
+        <location line="+732"/>
+        <location line="+931"/>
         <source>About Octave</source>
         <translation>关于 Octave</translation>
     </message>
     <message>
-        <location line="-371"/>
+        <location line="-301"/>
         <source>&amp;File</source>
         <translation>文件 (&amp;F)</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+49"/>
         <source>New</source>
         <translation>新建</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Script</source>
-        <translation>脚本</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Figure</source>
-        <translation>图形</translation>
-    </message>
-    <message>
-        <location line="-59"/>
+        <location line="-43"/>
         <source>Open...</source>
         <translation>打开...</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+117"/>
         <source>Preferences...</source>
         <translation>首选项...</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-95"/>
         <source>Exit</source>
         <translation>退出</translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+50"/>
         <source>&amp;Edit</source>
         <translation>编辑 (&amp;E)</translation>
     </message>
@@ -1143,22 +2129,22 @@
         <translation>撤销</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Copy</source>
         <translation>复制</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
         <source>Paste</source>
         <translation>粘贴</translation>
     </message>
     <message>
-        <location line="-1265"/>
+        <location line="-1469"/>
         <source>Save Workspace As</source>
         <translation>工作空间另存为</translation>
     </message>
     <message>
-        <location line="+124"/>
+        <location line="+134"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation>发行注记文件 &apos;%1&apos; 是空的。</translation>
     </message>
@@ -1173,17 +2159,17 @@
         <translation>Octave 发行注记</translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>Octave Community News</source>
         <translation>Octave 社区新闻</translation>
     </message>
     <message>
-        <location line="+939"/>
+        <location line="+1132"/>
         <source>Clear Clipboard</source>
         <translation>清空剪贴板</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Find Files...</source>
         <translation>查找文件...</translation>
     </message>
@@ -1203,7 +2189,7 @@
         <translation>清空工作空间</translation>
     </message>
     <message>
-        <location line="+40"/>
+        <location line="+49"/>
         <source>De&amp;bug</source>
         <translation>除错 (&amp;B)</translation>
     </message>
@@ -1218,32 +2204,22 @@
         <translation>继续</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Exit Debug Mode</source>
-        <translation>退出除错模式</translation>
-    </message>
-    <message>
-        <location line="+51"/>
+        <location line="+56"/>
         <source>Show File Browser</source>
         <translation>显示文件浏览器</translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+20"/>
         <source>File Browser</source>
         <translation>文件浏览器</translation>
     </message>
     <message>
-        <location line="+194"/>
-        <source>&lt;strong&gt;You are using a release candidate of Octave&apos;s experimental GUI.&lt;/strong&gt;  Octave is under continuous improvement and the GUI will be the default interface for the 4.0 release.  For more information, select the &quot;Release Notes&quot; item in the &quot;News&quot; menu of the GUI, or visit &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</source>
-        <translation>&lt;strong&gt;你正在使用一个候选发布版本的 Octave GUI .&lt;/strong&gt;  Octave 目前正在不停改进以让此图形界面成为 4.0 的默认界面。欲了解更多详情,请选择 GUI 中 &quot;新闻&quot; 目录下的 &quot;发行注记&quot;,或访问 &lt;a href=&quot;http://octave.org&quot;&gt;http://octave.org&lt;/a&gt;.</translation>
-    </message>
-    <message>
-        <location line="-288"/>
+        <location line="-84"/>
         <source>Step In</source>
         <translation>步进</translation>
     </message>
     <message>
-        <location line="-151"/>
+        <location line="-152"/>
         <source>Load Workspace...</source>
         <translation>载入工作空间...</translation>
     </message>
@@ -1253,22 +2229,17 @@
         <translation>工作空间另存为...</translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Function...</source>
-        <translation>函数...</translation>
-    </message>
-    <message>
-        <location line="+111"/>
+        <location line="+153"/>
         <source>Step Out</source>
         <translation>步出</translation>
     </message>
     <message>
-        <location line="+108"/>
+        <location line="+94"/>
         <source>Reset Default Window Layout</source>
         <translation>复位为默认窗口布局</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+16"/>
         <source>Octave Packages</source>
         <translation>Octave 软件包</translation>
     </message>
@@ -1288,7 +2259,7 @@
         <translation>Octave 开发者资源</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+14"/>
         <source>On Disk</source>
         <translation>磁盘上</translation>
     </message>
@@ -1298,7 +2269,7 @@
         <translation>在线</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
         <source>&amp;News</source>
         <translation>新闻 (&amp;N)</translation>
     </message>
@@ -1313,23 +2284,12 @@
         <translation>社区新闻</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <source>More Info</source>
-        <translation>更多信息</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Hide</source>
-        <translation>隐藏</translation>
-    </message>
-    <message>
-        <location line="+47"/>
-        <location line="+66"/>
-        <source>Experimental GUI Info</source>
-        <translation>实验性 GUI 信息</translation>
-    </message>
-    <message>
-        <location line="+27"/>
+        <location line="+6"/>
+        <source>Toolbar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
         <source>Enter directory name</source>
         <translation>输入目录名</translation>
     </message>
@@ -1344,69 +2304,109 @@
         <translation>向上一级</translation>
     </message>
     <message>
-        <location line="-1283"/>
-        <location line="+1286"/>
+        <location line="-1148"/>
+        <location line="+1151"/>
         <source>Browse directories</source>
         <translation>浏览目录</translation>
     </message>
     <message>
-        <location line="-405"/>
-        <source>&amp;Window</source>
-        <translation>窗口 (&amp;W)</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show Command Window</source>
-        <translation>显示命令窗口</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Command History</source>
-        <translation>显示命令历史</translation>
-    </message>
-    <message>
-        <location line="+8"/>
-        <source>Show Workspace</source>
-        <translation>显示工作空间</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Show Editor</source>
-        <translation>显示编辑器</translation>
+        <location line="-1212"/>
+        <source>Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Are you sure you want to exit Octave?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+854"/>
+        <source>Open an existing file in editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+45"/>
+        <source>New Script</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>New Function...</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+4"/>
-        <source>Show Documentation</source>
-        <translation>显示文档</translation>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Select All</source>
+        <translation type="unfinished">全选</translation>
+    </message>
+    <message>
+        <location line="+94"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>&amp;Window</source>
+        <translation>窗口 (&amp;W)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command Window</source>
+        <translation>显示命令窗口</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Command History</source>
+        <translation>显示命令历史</translation>
     </message>
     <message>
         <location line="+6"/>
+        <source>Show Workspace</source>
+        <translation>显示工作空间</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Editor</source>
+        <translation>显示编辑器</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show Documentation</source>
+        <translation>显示文档</translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Command Window</source>
         <translation>命令窗口</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Command History</source>
         <translation>命令历史</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+6"/>
         <source>Workspace</source>
         <translation>工作空间</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Editor</source>
         <translation>编辑器</translation>
     </message>
     <message>
-        <location line="+4"/>
-        <location line="+121"/>
+        <location line="+3"/>
+        <location line="+41"/>
         <source>Documentation</source>
         <translation>文档</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-30"/>
         <source>&amp;Help</source>
         <translation>帮助 (&amp;H)</translation>
     </message>
@@ -1419,7 +2419,7 @@
 <context>
     <name>news_reader</name>
     <message>
-        <location line="-1282"/>
+        <location line="-1411"/>
         <source>&lt;html&gt;
 &lt;body&gt;
 &lt;p&gt;
@@ -1478,18 +2478,18 @@
 <context>
     <name>octave_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+61"/>
-        <location line="+163"/>
+        <location filename="../src/octave-dock-widget.cc" line="+68"/>
+        <location line="+198"/>
         <source>Undock widget</source>
         <translation>移动挂件</translation>
     </message>
     <message>
-        <location line="-153"/>
+        <location line="-188"/>
         <source>Hide widget</source>
         <translation>隐藏挂件</translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+132"/>
         <source>Dock widget</source>
         <translation>停靠挂件</translation>
     </message>
@@ -1497,7 +2497,7 @@
 <context>
     <name>octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+130"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+226"/>
         <source>Help on</source>
         <translation>开启帮助</translation>
     </message>
@@ -1511,28 +2511,11 @@
         <source>Edit</source>
         <translation>编辑</translation>
     </message>
-    <message>
-        <location line="+5"/>
-        <source>&amp;Run Selection</source>
-        <translation>运行选定项 (&amp;R)</translation>
-    </message>
 </context>
 <context>
     <name>octave_qt_link</name>
     <message>
-        <location filename="../src/octave-qt-link.cc" line="+94"/>
-        <location line="+6"/>
-        <location line="+7"/>
-        <source>Yes</source>
-        <translation>是</translation>
-    </message>
-    <message>
-        <location line="-13"/>
-        <source>No</source>
-        <translation>不</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location filename="../src/octave-qt-link.cc" line="+114"/>
         <source>File
 %1
 does not exist. Do you want to create it?</source>
@@ -1546,14 +2529,21 @@
         <translation>Octave 编辑器</translation>
     </message>
     <message>
-        <location line="+211"/>
-        <source>The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
-        <translation>文件 %1 不存在于载入路径。要给当前编辑的函数除错,你必须切换到目录 %2 或添加那个目录到载入路径。</translation>
+        <location line="-6"/>
+        <location line="+6"/>
+        <location line="+7"/>
+        <source>Create</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+204"/>
+        <source>The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.</source>
-        <translation>文件 %1 在相同目录被创建影子文件。要给当前编辑的函数除错,请切换到目录 %2 .</translation>
+        <source>The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -1571,15 +2561,24 @@
         <translation>添加目录到载入路径</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-223"/>
+        <location line="+224"/>
         <source>Cancel</source>
         <translation>取消</translation>
     </message>
 </context>
 <context>
+    <name>octave_txt_lexer</name>
+    <message>
+        <location filename="../src/m-editor/octave-txt-lexer.cc" line="+39"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+235"/>
+        <location filename="../src/resource-manager.cc" line="+245"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -1596,7 +2595,7 @@
 Die Octave Benutzeroberfläche muss jetzt geschlossen werden.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Octave Critical Error</source>
         <translation>Octave 严重错误</translation>
     </message>
@@ -1604,314 +2603,732 @@
 <context>
     <name>settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.ui" line="+29"/>
+        <location filename="../src/settings-dialog.ui" line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1738"/>
         <source>Settings</source>
         <translation>设置</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+19"/>
+        <location line="+468"/>
+        <location filename="../src/ui-settings-dialog.h" line="+25"/>
+        <location line="+1"/>
         <source>General</source>
         <translation>常规</translation>
     </message>
     <message>
-        <location line="+97"/>
+        <location line="-447"/>
+        <location filename="../src/ui-settings-dialog.h" line="-25"/>
+        <source>Interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Dock widget title bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Confirm before exiting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+57"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
         <source>Octave logo only</source>
         <translation>仅 Octave 徽标</translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Letter icons</source>
         <translation>字母图标</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="+36"/>
+        <location line="+592"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <location line="+28"/>
+        <source>Show status bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-540"/>
+        <location filename="../src/ui-settings-dialog.h" line="-26"/>
+        <source>Text inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-32"/>
+        <location line="+45"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <location line="+2"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-159"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Small</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Large</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+168"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>Custom style</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Background inactive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>3D</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+54"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Octave Startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <location line="+1392"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <location line="+82"/>
+        <source>Startup path</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1379"/>
+        <location line="+1409"/>
+        <location filename="../src/ui-settings-dialog.h" line="-81"/>
+        <location line="+83"/>
+        <source>Browse</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1369"/>
+        <location filename="../src/ui-settings-dialog.h" line="-24"/>
         <source>Editor</source>
         <translation> 编辑器</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+47"/>
+        <location filename="../src/ui-settings-dialog.h" line="-54"/>
+        <source>After Column</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+104"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
         <source>Color</source>
         <translation>颜色</translation>
     </message>
     <message>
-        <location line="+120"/>
+        <location line="+40"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Tab width min.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>max.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Enable Code Folding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+61"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>Windows (CRLF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Mac (CR)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Unix (LF)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Show horizontal scroll bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Indentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Indent width</source>
         <translation>缩进宽度</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab indents line</source>
         <translation>Tab 键缩进行</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Auto indentation</source>
         <translation>自动缩进</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Tab width</source>
         <translation>Tab 键宽度</translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Show indentation guides</source>
         <translation>显示缩进参考线</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Backspace unindents line</source>
         <translation>退格键删除缩进符</translation>
     </message>
     <message>
-        <location line="+155"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Indentation uses tabs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Auto completion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Match keywords</source>
         <translation>匹配关键字</translation>
     </message>
     <message>
         <location line="+13"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Case sensitive</source>
         <translation>大小写敏感</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Replace word by suggested one</source>
-        <translation>使用建议的单词替换原有的</translation>
-    </message>
-    <message>
         <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Replace word by suggested one</source>
+        <translation>使用建议的单词替换原有的</translation>
+    </message>
+    <message>
+        <location line="-10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Match words in document</source>
         <translation>在文档中匹配单词</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>With Octave builtins</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>With Octave functions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+64"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
+        <source>Show completion list automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
         <source>Restore editor tabs from previous session on startup</source>
         <translation>在启动时恢复上次会话的编辑器标签</translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+20"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Reload externally changed files without prompt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-446"/>
+        <location filename="../src/ui-settings-dialog.h" line="-30"/>
         <source>Use custom file editor</source>
         <translation>使用自定义文件编辑器</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+482"/>
+        <location filename="../src/ui-settings-dialog.h" line="+33"/>
         <source>Editor Styles</source>
         <translation>编辑器风格</translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;选择字体和字体大小 (和默认大小不同),以及字体风格 (&lt;b&gt;粗&lt;/b&gt;体, &lt;b&gt;斜&lt;/b&gt;体, &lt;b&gt;下&lt;/b&gt;划线), 文字颜色和背景色 (对于后者,粉红色 (255,0,255) 是默认背景颜色的占位符)。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+108"/>
-        <source>Terminal Colors</source>
-        <translation>终端颜色</translation>
-    </message>
-    <message>
-        <location line="+45"/>
-        <source>Font</source>
-        <translation>字体</translation>
-    </message>
-    <message>
-        <location line="-757"/>
-        <source>Show line numbers</source>
-        <translation>显示行数</translation>
-    </message>
-    <message>
-        <location line="+27"/>
-        <source>Highlight current line</source>
-        <translation>高亮当前行</translation>
-    </message>
-    <message>
-        <location line="+262"/>
-        <source>Code completion</source>
-        <translation>代码补全</translation>
-    </message>
-    <message>
-        <location line="-282"/>
-        <source>Show complete path in window title</source>
-        <translation>在窗口标题显示完整路径</translation>
-    </message>
-    <message>
-        <location line="-72"/>
-        <source>Graphic icons</source>
-        <translation>图形图标</translation>
-    </message>
-    <message>
-        <location line="+55"/>
-        <source>Show whitespace</source>
-        <translation>显示空白</translation>
+        <location line="+209"/>
+        <location filename="../src/ui-settings-dialog.h" line="+6"/>
+        <source>(Changing buffer size clears history)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>History buffer Size</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+27"/>
-        <source>Do not show whitespace used for indentation</source>
-        <translation>不要显示缩进的空白空间</translation>
-    </message>
-    <message>
-        <location line="+290"/>
-        <source># of characters typed before completion list displayed</source>
-        <translation>在补全列表显示前输入字符的数量</translation>
-    </message>
-    <message>
-        <location line="+194"/>
-        <source>Create nonexistent files without prompting</source>
-        <translation>在创建不存在的文件时不提示</translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>command line (%f=file, %l=line):</source>
-        <translation>命令行 (%f=文件, %l=行数): </translation>
-    </message>
-    <message>
-        <location line="+10"/>
-        <source>emacs</source>
-        <translation>Emacs</translation>
-    </message>
-    <message>
-        <location line="+67"/>
-        <source>Terminal</source>
-        <translation>终端</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Cursor type:</source>
-        <translation>光标类型: </translation>
-    </message>
-    <message>
-        <location line="+23"/>
-        <source>Cursor blinking</source>
-        <translation>光标闪烁</translation>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set focus to terminal when running a command from within another widget</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Print debug location in terminal window in addition to the marker in the editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Terminal Colors</source>
+        <translation>终端颜色</translation>
+    </message>
+    <message>
+        <location line="-173"/>
+        <location filename="../src/ui-settings-dialog.h" line="-6"/>
+        <source>Font</source>
+        <translation>字体</translation>
+    </message>
+    <message>
+        <location line="-917"/>
+        <location filename="../src/ui-settings-dialog.h" line="-58"/>
+        <source>Show line numbers</source>
+        <translation>显示行数</translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Highlight current line</source>
+        <translation>高亮当前行</translation>
+    </message>
+    <message>
+        <location line="+85"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
+        <source>Show complete path in window title</source>
+        <translation>在窗口标题显示完整路径</translation>
+    </message>
+    <message>
+        <location line="-423"/>
+        <location filename="../src/ui-settings-dialog.h" line="-20"/>
+        <source>Graphic icons</source>
+        <translation>图形图标</translation>
+    </message>
+    <message>
+        <location line="+212"/>
+        <location filename="../src/ui-settings-dialog.h" line="+10"/>
+        <source>These preferences are applied after any .octaverc startup files.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+55"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Restore working directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+127"/>
+        <location filename="../src/ui-settings-dialog.h" line="+5"/>
+        <source>Show whitespace</source>
+        <translation>显示空白</translation>
+    </message>
+    <message>
+        <location line="+39"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Do not show whitespace used for indentation</source>
+        <translation>不要显示缩进的空白空间</translation>
+    </message>
+    <message>
+        <location line="+156"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Draw a long line marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+48"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show EOL characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Default EOL mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+412"/>
+        <location filename="../src/ui-settings-dialog.h" line="+26"/>
+        <source>Number of characters before list is shown: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+112"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
+        <source>Create nonexistent files without prompting</source>
+        <translation>在创建不存在的文件时不提示</translation>
+    </message>
+    <message>
+        <location line="-429"/>
+        <location filename="../src/ui-settings-dialog.h" line="-28"/>
+        <source>command line (%f=file, %l=line):</source>
+        <translation>命令行 (%f=文件, %l=行数): </translation>
+    </message>
+    <message>
+        <location line="+489"/>
+        <location filename="../src/ui-settings-dialog.h" line="+31"/>
+        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+32"/>
+        <location filename="../src/ui-settings-dialog.h" line="+12"/>
+        <source>Terminal</source>
+        <translation>终端</translation>
+    </message>
+    <message>
+        <location line="+51"/>
+        <location filename="../src/ui-settings-dialog.h" line="-8"/>
+        <source>Cursor type:</source>
+        <translation>光标类型: </translation>
+    </message>
+    <message>
+        <location line="-11"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Cursor blinking</source>
+        <translation>光标闪烁</translation>
+    </message>
+    <message>
+        <location line="-7"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
         <source>Use foreground color</source>
         <translation>使用前景色</translation>
     </message>
     <message>
-        <location line="+94"/>
+        <location line="+59"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Font size</source>
         <translation>字体大小</translation>
     </message>
     <message>
-        <location line="+35"/>
+        <location line="+196"/>
+        <location filename="../src/ui-settings-dialog.h" line="+18"/>
         <source>File Browser</source>
         <translation>文件浏览器</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Show file size</source>
-        <translation>显示文件大小</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show file type</source>
-        <translation>显示文件类型</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show date of last modification</source>
-        <translation>显示最后修改日期</translation>
-    </message>
-    <message>
-        <location line="+7"/>
-        <source>Show hidden files</source>
-        <translation>显示隐藏文件</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Alternating row colors</source>
-        <translation>备选列颜色</translation>
-    </message>
-    <message>
         <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-11"/>
+        <source>Display</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show file size</source>
+        <translation>显示文件大小</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show file type</source>
+        <translation>显示文件类型</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Show date of last modification</source>
+        <translation>显示最后修改日期</translation>
+    </message>
+    <message>
+        <location line="-14"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <source>Show hidden files</source>
+        <translation>显示隐藏文件</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Alternating row colors</source>
+        <translation>备选列颜色</translation>
+    </message>
+    <message>
+        <location line="+117"/>
+        <location filename="../src/ui-settings-dialog.h" line="+9"/>
         <source>Workspace</source>
         <translation>工作空间</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <source>Storage Class Colors</source>
-        <translation>存储类颜色</translation>
-    </message>
-    <message>
-        <location line="+35"/>
+        <location line="+42"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Hide tool tips</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+182"/>
+        <location filename="../src/ui-settings-dialog.h" line="+14"/>
+        <source>Edit a shortcut by double-clicking in a cell</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+108"/>
+        <location filename="../src/ui-settings-dialog.h" line="+20"/>
         <source>Network</source>
         <translation>网络</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-12"/>
         <source>Allow Octave to connect to the Octave web site to display current news and information</source>
         <translation>允许 Octave 连接到 Octave 站点以显示当前新闻和信息</translation>
     </message>
     <message>
         <location line="+46"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Use proxy server</source>
         <translation>使用代理服务器</translation>
     </message>
     <message>
         <location line="-23"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>HttpProxy</source>
         <translation>HTTP Proxy</translation>
     </message>
     <message>
-        <location line="-1129"/>
+        <location line="-2083"/>
+        <location filename="../src/ui-settings-dialog.h" line="-123"/>
         <source>Icon set for dock widgets</source>
         <translation>挂件的图标集</translation>
     </message>
     <message>
+        <location line="-48"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
+        <source>Language (requires restart)</source>
+        <translation>语言 (需要重启)</translation>
+    </message>
+    <message>
+        <location line="-58"/>
+        <location filename="../src/ui-settings-dialog.h" line="-5"/>
+        <source>Icon size</source>
+        <translation>图标大小</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1195"/>
+        <location filename="../src/ui-settings-dialog.h" line="+72"/>
+        <source>File handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+485"/>
+        <location filename="../src/ui-settings-dialog.h" line="+24"/>
+        <source>Behavior</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Synchronize Octave working directory with file browser</source>
+        <translation>使用文件浏览器同步 Octave 工作目录</translation>
+    </message>
+    <message>
+        <location line="+26"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Restore last directory of previous session</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+106"/>
+        <location filename="../src/ui-settings-dialog.h" line="+3"/>
+        <source>Colors for variable attributes </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <location filename="../src/ui-settings-dialog.h" line="+22"/>
+        <source>Shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location filename="../src/ui-settings-dialog.h" line="-18"/>
+        <source>Select this option to prevent conflicts with readline shortcuts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location filename="../src/ui-settings-dialog.h" line="+2"/>
+        <source>Disable global shortcuts when terminal window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+31"/>
+        <location line="+28"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+4"/>
+        <source>Use this set</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
+        <source>Set 1:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location line="+7"/>
-        <source>Language (requires restart)</source>
-        <translation>语言 (需要重启)</translation>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <location line="+3"/>
+        <source>Export</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-30"/>
+        <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="-2"/>
+        <location line="+3"/>
+        <source>Import</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Icon size</source>
-        <translation>图标大小</translation>
-    </message>
-    <message>
-        <location line="+991"/>
-        <source>Synchronize Octave working directory with file browser</source>
-        <translation>使用文件浏览器同步 Octave 工作目录</translation>
-    </message>
-    <message>
-        <location line="+129"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
+        <source>Set 2:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+86"/>
+        <location filename="../src/ui-settings-dialog.h" line="+7"/>
+        <source>Action</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 1 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="-1"/>
+        <source>Set 2 Actual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+68"/>
+        <location filename="../src/ui-settings-dialog.h" line="+11"/>
         <source>Socks5Proxy</source>
         <translation>Socks5Proxy</translation>
     </message>
     <message>
         <location line="-16"/>
+        <location filename="../src/ui-settings-dialog.h" line="-4"/>
         <source>Hostname:</source>
         <translation>主机名: </translation>
     </message>
     <message>
         <location line="+44"/>
+        <location filename="../src/ui-settings-dialog.h" line="+8"/>
         <source>Proxy type:</source>
         <translation>代理类型: </translation>
     </message>
     <message>
         <location line="+10"/>
+        <location filename="../src/ui-settings-dialog.h" line="+1"/>
         <source>Port:</source>
         <translation>端口: </translation>
     </message>
     <message>
         <location line="-27"/>
+        <location filename="../src/ui-settings-dialog.h" line="-3"/>
         <source>Username:</source>
         <translation>用户名: </translation>
     </message>
     <message>
         <location line="+37"/>
+        <location filename="../src/ui-settings-dialog.h" line="+4"/>
         <source>Password:</source>
         <translation>密码: </translation>
     </message>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+71"/>
+        <location filename="../src/settings-dialog.cc" line="+77"/>
         <location line="+4"/>
-        <location line="+389"/>
+        <location line="+561"/>
         <source>System setting</source>
         <translation>系统设置</translation>
     </message>
     <message>
-        <location line="-286"/>
+        <location line="-355"/>
         <source>IBeam Cursor</source>
         <translation>IBeam 光标</translation>
     </message>
@@ -1926,7 +3343,7 @@
         <translation>给光标添加下划线</translation>
     </message>
     <message>
-        <location line="+144"/>
+        <location line="+213"/>
         <source>Difference to the default size</source>
         <translation>和默认大小的差别</translation>
     </message>
@@ -1953,6 +3370,16 @@
         <comment>short form for underlined</comment>
         <translation>u</translation>
     </message>
+    <message>
+        <location line="+497"/>
+        <source>Set Octave Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set File Browser Startup Directory</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>setup_community_news</name>
@@ -2010,6 +3437,622 @@
     </message>
 </context>
 <context>
+    <name>shortcut_manager</name>
+    <message>
+        <location filename="../src/shortcut-manager.cc" line="+109"/>
+        <source>New File</source>
+        <translation type="unfinished">新建文件</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>New Function</source>
+        <translation type="unfinished">新建函数</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>New Figure</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Open File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Load Workspace</source>
+        <translation type="unfinished">载入工作空间</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save Workspace As</source>
+        <translation type="unfinished">工作空间另存为</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+158"/>
+        <source>Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-157"/>
+        <source>Exit Octave</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+84"/>
+        <source>Copy</source>
+        <translation type="unfinished">复制</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <location line="+85"/>
+        <source>Paste</source>
+        <translation type="unfinished">粘贴</translation>
+    </message>
+    <message>
+        <location line="-84"/>
+        <location line="+80"/>
+        <source>Undo</source>
+        <translation type="unfinished">撤销</translation>
+    </message>
+    <message>
+        <location line="-79"/>
+        <location line="+84"/>
+        <source>Select All</source>
+        <translation type="unfinished">全选</translation>
+    </message>
+    <message>
+        <location line="-83"/>
+        <source>Clear Clipboard</source>
+        <translation type="unfinished">清空剪贴板</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Find in Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command Window</source>
+        <translation type="unfinished">清空命令窗口</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Command History</source>
+        <translation type="unfinished">清空命令历史</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Clear Workspace</source>
+        <translation type="unfinished">清空工作空间</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Step Into</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Step Out</source>
+        <translation type="unfinished">步出</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Continue</source>
+        <translation type="unfinished">继续</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Quit Debug Mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Command Window</source>
+        <translation type="unfinished">显示命令窗口</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Command History</source>
+        <translation type="unfinished">显示命令历史</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show File Browser</source>
+        <translation type="unfinished">显示文件浏览器</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Workspace</source>
+        <translation type="unfinished">显示工作空间</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Editor</source>
+        <translation type="unfinished">显示编辑器</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Documentation</source>
+        <translation type="unfinished">显示文档</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command Window</source>
+        <translation type="unfinished">命令窗口</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Command History</source>
+        <translation type="unfinished">命令历史</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>File Browser</source>
+        <translation type="unfinished">文件浏览器</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+216"/>
+        <source>Editor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-214"/>
+        <source>Documentation</source>
+        <translation type="unfinished">文档</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Show Ondisk Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Online Documentation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Octave Packages</source>
+        <translation type="unfinished">Octave 软件包</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Share Code</source>
+        <translation type="unfinished">共享代码</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Contribute to Octave</source>
+        <translation type="unfinished">贡献 Octave</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Octave Developer Resources</source>
+        <translation type="unfinished">Octave 开发者资源</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>About Octave</source>
+        <translation type="unfinished">关于 Octave</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Release Notes</source>
+        <translation type="unfinished">发行注记</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Community News</source>
+        <translation type="unfinished">社区新闻</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Edit Function</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Save File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Save File As</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Close All</source>
+        <translation type="unfinished">关闭全部</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Redo</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Find and Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Word</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to Start of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete to End of Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Delete Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Copy Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Cut Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Duplicate Selection/Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Transpose Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Comment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uncomment Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Uppercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Lowercase Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <location line="+5"/>
+        <source>Indent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-3"/>
+        <location line="+5"/>
+        <source>Unindent Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Goto Line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Move to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Select to Matching Brace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Toggle Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Bookmark</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Styles Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Show Line Numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-145"/>
+        <source>Step</source>
+        <translation type="unfinished">步骤</translation>
+    </message>
+    <message>
+        <location line="+36"/>
+        <source>Reset Default Window Layout</source>
+        <translation type="unfinished">复位为默认窗口布局</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Report Bug</source>
+        <translation type="unfinished">报告问题</translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Close Other Files</source>
+        <translation type="unfinished">关闭其他文件</translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Show Completion List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
+        <source>Convert Line Endings to Windows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Unix</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Convert Line Endings to Mac</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Show Whitespace Characters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Line Endings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Indentation Guides</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Show Long Line Marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zoom In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Zoom Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+3"/>
+        <source>Zoom Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Toggle Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Next Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Previous Breakpoint</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Remove All Breakpoints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run Selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Help on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Document on Keyword</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+42"/>
+        <source>Main</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+23"/>
+        <source>File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+23"/>
+        <source>Edit</source>
+        <translation type="unfinished">编辑</translation>
+    </message>
+    <message>
+        <location line="-21"/>
+        <location line="+25"/>
+        <source>Debug</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>Window</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+25"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-23"/>
+        <source>News</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Run</source>
+        <translation type="unfinished">运行</translation>
+    </message>
+    <message>
+        <location line="+124"/>
+        <source>Enter new Shortcut for Set %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Apply the desired shortcut or click on the right button to reset the shortcut to its default.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Enter shortcut directly by performing it</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Actual shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Default shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Set to default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+53"/>
+        <source>Double Shortcut</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>The chosen shortcut
+  &quot;%1&quot;
+is already used for the action
+  &quot;%2&quot;.
+Do you want to use the shortcut anyhow removing it from the previous action?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+71"/>
+        <source>Import shortcut set %1 from file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <location line="+6"/>
+        <source>Octave Shortcut Files (*.osc);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-1"/>
+        <source>Export shortcut set %1 into file ...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+15"/>
+        <source>Failed to open %1 as octave shortcut file</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>terminal_dock_widget</name>
     <message>
         <location filename="../src/terminal-dock-widget.cc" line="+38"/>
@@ -2020,7 +4063,7 @@
 <context>
     <name>webinfo</name>
     <message>
-        <location filename="../src/qtinfo/webinfo.cc" line="+80"/>
+        <location filename="../src/qtinfo/webinfo.cc" line="+83"/>
         <source>Type here and press &apos;Return&apos; to search</source>
         <translation>在这里输入并按下回车以搜索</translation>
     </message>
@@ -2029,6 +4072,16 @@
         <source>Global search</source>
         <translation>全局搜索</translation>
     </message>
+    <message>
+        <location line="+18"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>The info file&lt;p&gt;%1&lt;p&gt;or compressed versions do not exist</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>welcome_wizard</name>
@@ -2062,8 +4115,8 @@
     </message>
     <message>
         <location line="+1"/>
-        <source>Storage Class</source>
-        <translation>存储类</translation>
+        <source>Attribute</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+109"/>
@@ -2080,7 +4133,7 @@
 <context>
     <name>workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+47"/>
+        <location filename="../src/workspace-view.cc" line="+50"/>
         <source>Workspace</source>
         <translation>工作区</translation>
     </message>
@@ -2090,9 +4143,24 @@
         <translation>显示当前活动工作区的变量。</translation>
     </message>
     <message>
-        <location line="+76"/>
-        <source>Copy</source>
-        <translation>复制</translation>
+        <location line="+3"/>
+        <source>Enter text to filter the workspace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+161"/>
+        <source>Copy name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copy value</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2100,19 +4168,19 @@
         <translation>重命名</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Only top-level symbols may be renamed.</source>
         <translation>只有顶级符号才能被重命名。</translation>
     </message>
     <message>
-        <location line="+125"/>
+        <location line="+132"/>
         <source>View the variables in the active workspace.&lt;br&gt;</source>
         <translation>显示当前活动工作区的变量。&lt;br&gt;</translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>Colors for the storage class:</source>
-        <translation>存储类的颜色: </translation>
+        <source>Colors for variable attributes:</source>
+        <translation type="unfinished"></translation>
     </message>
 </context>
 </TS>
--- a/libgui/link-deps.mk
+++ b/libgui/link-deps.mk
@@ -7,10 +7,11 @@
 endif
 
 LIBOCTGUI_LINK_DEPS += \
-  @QT_LIBS@
+  $(QT_LIBS) \
+  $(OPENGL_LIBS)
 
 LIBOCTGUI_LINK_OPTS = \
-  @QT_LDFLAGS@
+  $(QT_LDFLAGS)
 
 if AMCOND_LINK_ALL_DEPS
   LIBOCTGUI_LINK_DEPS += $(LIBOCTINTERP_LINK_DEPS)
--- a/libgui/qterminal-module.mk
+++ b/libgui/qterminal-module.mk
@@ -35,7 +35,8 @@
 qterminal_libqterminal_la_CPPFLAGS = \
   $(AM_CPPFLAGS) \
   @QT_CPPFLAGS@ \
-  -I$(srcdir)/qterminal/libqterminal
+  -I$(srcdir)/qterminal/libqterminal \
+  -I$(srcdir)/src
 
 qterminal_libqterminal_la_CFLAGS = $(AM_CFLAGS)
 
--- a/libgui/qterminal/libqterminal/QTerminal.cc
+++ b/libgui/qterminal/libqterminal/QTerminal.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2012-2013 Michael Goffioul.
-Copyright (C) 2012-2013 Jacob Dawid.
+Copyright (C) 2012-2015 Michael Goffioul.
+Copyright (C) 2012-2015 Jacob Dawid.
 
 This file is part of QTerminal.
 
@@ -71,6 +71,17 @@
   return names;
 }
 
+// slot for disabling the interrupt action when terminal loses focus
+void
+QTerminal::set_global_shortcuts (bool focus_out)
+  {
+    if (focus_out)
+      _interrupt_action->setShortcut (QKeySequence ());
+    else
+     _interrupt_action->setShortcut (
+              QKeySequence (Qt::ControlModifier + Qt::Key_C));
+  }
+
 void
 QTerminal::notice_settings (const QSettings *settings)
 {
@@ -118,4 +129,22 @@
     (cursorUseForegroundColor,
      settings->value ("terminal/color_c",
                       QVariant (colors.at (3))).value<QColor> ());
+  setScrollBufferSize (settings->value ("terminal/history_buffer",1000).toInt () );
+
+  // check whether Copy shoretcut is Ctrl-C
+  int set = settings->value ("shortcuts/set",0).toInt ();
+  QKeySequence copy;
+  QString key = QString ("shortcuts/main_edit:copy");
+  if (set)
+    key.append ("_1");  // if second set is active
+  copy = QKeySequence (settings->value (key).toString ()); // the copy shortcut
+
+  //  dis- or enable extra interrupt action
+  QKeySequence ctrl;
+  ctrl = Qt::ControlModifier;
+
+  bool extra_ir_action = (copy != QKeySequence (ctrl + Qt::Key_C));
+
+  _interrupt_action->setEnabled (extra_ir_action);
+  has_extra_interrupt (extra_ir_action);
 }
--- a/libgui/qterminal/libqterminal/QTerminal.h
+++ b/libgui/qterminal/libqterminal/QTerminal.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2012-2013 Michael Goffioul.
-Copyright (C) 2012-2013 Jacob Dawid.
+Copyright (C) 2012-2015 Michael Goffioul.
+Copyright (C) 2012-2015 Jacob Dawid.
 
 This file is part of QTerminal.
 
@@ -33,6 +33,9 @@
 #include <QMenu>
 #include <QClipboard>
 #include <QApplication>
+#include <QAction>
+
+#include "resource-manager.h"
 
 class QTerminal : public QWidget
 {
@@ -56,6 +59,8 @@
 
   virtual QString selectedText () = 0;
 
+  virtual void has_extra_interrupt (bool extra) = 0;
+
   enum CursorType
   {
     UnderlineCursor,
@@ -81,6 +86,8 @@
   virtual void setCursorColor (bool useForegroundColor,
                                const QColor& color) = 0;
 
+  virtual void setScrollBufferSize(int value=1000) = 0;
+
 signals:
 
   void report_status_message (const QString&);
@@ -93,6 +100,8 @@
 
   virtual void pasteClipboard (void) = 0;
 
+  virtual void selectAll (void) = 0;
+
   virtual void handleCustomContextMenuRequested (const QPoint& at)
   {
     QClipboard * cb = QApplication::clipboard ();
@@ -106,27 +115,38 @@
 
   void notice_settings (const QSettings *settings);
 
+  virtual void init_terminal_size (void) { }
+
   void terminal_interrupt (void) { emit interrupt_signal (); }
 
+  void set_global_shortcuts (bool focus_out);
+
 protected:
 
   QTerminal (QWidget *xparent = 0) : QWidget (xparent)
   {
+    // context menu
     setContextMenuPolicy (Qt::CustomContextMenu);
 
     _contextMenu = new QMenu (this);
 
     _copy_action = _contextMenu->addAction (
-                     QIcon (":/actions/icons/editcopy.png"),
+                     resource_manager::icon ("edit-copy"),
                      tr ("Copy"), this, SLOT (copyClipboard ()));
 
     _paste_action = _contextMenu->addAction (
-                      QIcon (":/actions/icons/editpaste.png"),
+                     resource_manager::icon ("edit-paste"),
                       tr ("Paste"), this, SLOT (pasteClipboard ()));
 
     _contextMenu->addSeparator ();
 
-    _contextMenu->addAction (tr ("Clear All"), parent (),
+    _selectall_action = _contextMenu->addAction (
+                      tr ("Select All"), this, SLOT (selectAll ()));
+
+
+    _contextMenu->addSeparator ();
+
+    _contextMenu->addAction (tr ("Clear Window"), parent (),
                              SLOT (handle_clear_command_window_request ()));
 
     connect (this, SIGNAL (customContextMenuRequested (QPoint)),
@@ -138,11 +158,27 @@
     connect (xparent, SIGNAL (settings_changed (const QSettings *)),
              this, SLOT (notice_settings (const QSettings *)));
 
+    connect (xparent, SIGNAL (init_terminal_size_signal ()),
+             this, SLOT (init_terminal_size ()));
+
     connect (xparent, SIGNAL (copyClipboard_signal ()),
              this, SLOT (copyClipboard ()));
 
     connect (xparent, SIGNAL (pasteClipboard_signal ()),
              this, SLOT (pasteClipboard ()));
+
+    connect (xparent, SIGNAL (selectAll_signal ()),
+             this, SLOT (selectAll ()));
+
+    // extra interrupt action
+    _interrupt_action = new QAction (this);
+    addAction (_interrupt_action);
+
+    _interrupt_action->setShortcut (
+            QKeySequence (Qt::ControlModifier + Qt::Key_C));
+
+    connect (_interrupt_action, SIGNAL (triggered ()),
+            this, SLOT (terminal_interrupt ()));
   }
 
 private:
@@ -150,6 +186,9 @@
   QMenu *_contextMenu;
   QAction * _copy_action;
   QAction * _paste_action;
+  QAction * _selectall_action;
+
+  QAction *_interrupt_action;
 };
 
 #endif // QTERMINAL_H
--- a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp
+++ b/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp
@@ -1,5 +1,5 @@
 /*  Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
@@ -69,13 +69,23 @@
     m_terminalModel = new TerminalModel(m_kpty);
     m_terminalModel->setAutoClose(true);
     m_terminalModel->setCodec(QTextCodec::codecForName("UTF-8"));
-    m_terminalModel->setHistoryType(HistoryTypeBuffer(1000));
+    m_terminalModel->setHistoryType(HistoryTypeBuffer (1000));
     m_terminalModel->setDarkBackground(true);
     m_terminalModel->setKeyBindings("");
     m_terminalModel->run();
     m_terminalModel->addView(m_terminalView);
     connectToPty();
 }
+void QUnixTerminalImpl::setScrollBufferSize(int value)
+{
+  if (value > 0)
+    {
+      m_terminalModel->clearHistory ();
+      m_terminalModel->setHistoryType (HistoryTypeBuffer ( value ));
+    }
+  else
+    m_terminalModel->setHistoryType (HistoryTypeNone ());
+}
 
 void QUnixTerminalImpl::connectToPty()
 {
@@ -197,7 +207,7 @@
 
 void QUnixTerminalImpl::copyClipboard()
 {
-    m_terminalView->copyClipboard();
+    m_terminalView->copyClipboard (_extra_interrupt);
 }
 
 void QUnixTerminalImpl::pasteClipboard()
@@ -205,7 +215,19 @@
     m_terminalView->pasteClipboard();
 }
 
+void QUnixTerminalImpl::selectAll()
+{
+    m_terminalView->selectAll();
+}
+
+
 QString QUnixTerminalImpl::selectedText ()
 {
   return m_terminalView->selectedText ();
 }
+
+void
+QUnixTerminalImpl::has_extra_interrupt (bool extra)
+{
+  _extra_interrupt = extra;
+}
--- a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h
+++ b/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h
@@ -1,5 +1,5 @@
 /*  Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
@@ -47,12 +47,14 @@
     void setForegroundColor (const QColor& color);
     void setSelectionColor (const QColor& color);
     void setCursorColor (bool useForegroundColor, const QColor& color);
-
+    void setScrollBufferSize(int value);
     QString selectedText();
+    void has_extra_interrupt (bool extra_interrupt);
 
 public slots:
     void copyClipboard();
     void pasteClipboard();
+    void selectAll();
 
 protected:
     void showEvent(QShowEvent *);
@@ -65,6 +67,7 @@
     TerminalView *m_terminalView;
     TerminalModel *m_terminalModel;
     KPty *m_kpty;
+    bool _extra_interrupt;
 };
 
 #endif // Q_UNIXTERMINALIMPL
--- a/libgui/qterminal/libqterminal/unix/Screen.cpp
+++ b/libgui/qterminal/libqterminal/unix/Screen.cpp
@@ -110,7 +110,7 @@
 
 // Cursor Setting --------------------------------------------------------------
 
-/*! \section Cursor
+/*! @section Cursor
 
     The `cursor' is a location within the screen that is implicitely used in
     many operations. The operations within this section allow to manipulate
@@ -502,7 +502,7 @@
 /*!
     returns the image.
 
-    Get the size of the image by \sa getLines and \sa getColumns.
+    Get the size of the image by @sa getLines and @sa getColumns.
 
     NOTE that the image returned by this function must later be
     freed.
@@ -861,7 +861,7 @@
 
 /*! scroll up `n' lines within current region.
     The `n' new lines are cleared.
-    \sa setRegion \sa scrollDown
+    @sa setRegion @sa scrollDown
 */
 
 QRect Screen::lastScrolledRegion() const
@@ -889,7 +889,7 @@
 
 /*! scroll down `n' lines within current region.
     The `n' new lines are cleared.
-    \sa setRegion \sa scrollUp
+    @sa setRegion @sa scrollUp
 */
 
 void Screen::scrollDown(int from, int n)
@@ -949,7 +949,7 @@
 
 // Erasing ---------------------------------------------------------------------
 
-/*! \section Erasing
+/*! @section Erasing
 
     This group of operations erase parts of the screen contents by filling
     it with spaces colored due to the current rendition settings.
--- a/libgui/qterminal/libqterminal/unix/Screen.h
+++ b/libgui/qterminal/libqterminal/unix/Screen.h
@@ -50,7 +50,7 @@
 class TerminalCharacterDecoder;
 
 /**
-    \brief An image of characters with associated attributes.
+    @brief An image of characters with associated attributes.
 
     The terminal emulation ( Emulation ) receives a serial stream of
     characters from the program currently running in the terminal.
--- a/libgui/qterminal/libqterminal/unix/SelfListener.cpp
+++ b/libgui/qterminal/libqterminal/unix/SelfListener.cpp
@@ -1,5 +1,5 @@
 /* qterminal - a terminal widget for Qt
- * Copyright (C) 2011, 2013 Jacob Dawid (jacob.dawid@googlemail.com)
+ * Copyright (C) 2011, 2013 Jacob Dawid (jacob.dawid@cybercatalyst.com)
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as
--- a/libgui/qterminal/libqterminal/unix/SelfListener.h
+++ b/libgui/qterminal/libqterminal/unix/SelfListener.h
@@ -1,5 +1,5 @@
 /* qterminal - a terminal widget for Qt
- * Copyright (C) 2011, 2013 Jacob Dawid (jacob.dawid@googlemail.com)
+ * Copyright (C) 2011, 2013 Jacob Dawid (jacob.dawid@cybercatalyst.com)
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as
--- a/libgui/qterminal/libqterminal/unix/TerminalModel.cpp
+++ b/libgui/qterminal/libqterminal/unix/TerminalModel.cpp
@@ -5,7 +5,7 @@
     Copyright (C) 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
 
     Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- a/libgui/qterminal/libqterminal/unix/TerminalModel.h
+++ b/libgui/qterminal/libqterminal/unix/TerminalModel.h
@@ -5,7 +5,7 @@
     Copyright (C) 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
 
     Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp
@@ -5,7 +5,7 @@
     Copyright (C) 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
 
     Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -328,6 +328,8 @@
 
   connect (this, SIGNAL (set_global_shortcuts_signal (bool)),
            parent->parent (), SLOT (set_global_shortcuts (bool)));
+  connect (this, SIGNAL (set_global_shortcuts_signal (bool)),
+           parent, SLOT (set_global_shortcuts (bool)));
 
 }
 
@@ -2272,7 +2274,7 @@
   QApplication::clipboard()->setText(t, QClipboard::Selection);
 }
 
-void TerminalView::copyClipboard()
+void TerminalView::copyClipboard(bool extra_interrupt)
 {
   if ( !_screenWindow || !hasFocus())
     return;
@@ -2280,7 +2282,10 @@
   QString text = _screenWindow->selectedText(_preserveLineBreaks);
 
   if (text.isEmpty ())
-    emit interrupt_signal ();
+    {
+      if (! extra_interrupt)
+        emit interrupt_signal ();
+    }
   else
     QApplication::clipboard()->setText(text);
 }
@@ -2293,11 +2298,26 @@
     }
 }
 
+void TerminalView::selectAll()
+{
+  if ( !_screenWindow || !hasFocus())
+    return;
+
+  _screenWindow->setSelectionStart(0,-_screenWindow->currentLine(), false);
+  //_screenWindow->setSelectionEnd(_screenWindow->windowColumns(),
+  //                               _screenWindow->windowLines());
+
+  _screenWindow->setSelectionEnd(_screenWindow->columnCount(),
+                                 _screenWindow->windowLines());
+}
+
+
 void TerminalView::pasteSelection()
 {
   emitSelection(true,false);
 }
 
+
 /* ------------------------------------------------------------------------- */
 /*                                                                           */
 /*                                Keyboard                                   */
@@ -2424,45 +2444,6 @@
   return QVariant();
 }
 
-bool TerminalView::event( QEvent *e )
-{
-  if ( e->type() == QEvent::ShortcutOverride )
-    {
-      QKeyEvent* keyEvent = static_cast<QKeyEvent *>( e );
-
-      // a check to see if keyEvent->text() is empty is used
-      // to avoid intercepting the press of the modifier key on its own.
-      //
-      // this is important as it allows a press and release of the Alt key
-      // on its own to focus the menu bar, making it possible to
-      // work with the menu without using the mouse
-      if ( (keyEvent->modifiers() == Qt::AltModifier) &&
-           !keyEvent->text().isEmpty() )
-        {
-          keyEvent->accept();
-          return true;
-        }
-
-      // Override any of the following shortcuts because
-      // they are needed by the terminal
-      int keyCode = keyEvent->key() | keyEvent->modifiers();
-      switch ( keyCode )
-        {
-        // list is taken from the QLineEdit::event() code
-        case Qt::Key_Tab:
-        case Qt::Key_Delete:
-        case Qt::Key_Home:
-        case Qt::Key_End:
-        case Qt::Key_Backspace:
-        case Qt::Key_Left:
-        case Qt::Key_Right:
-          keyEvent->accept();
-          return true;
-        }
-    }
-  return QWidget::event( e );
-}
-
 void TerminalView::setBellMode(int mode)
 {
   _bellMode=mode;
@@ -2612,6 +2593,17 @@
   //  KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
 
   QString dropText;
+
+  if (event->mimeData ()->hasUrls ())
+  {
+    foreach (QUrl url, event->mimeData ()->urls ())
+    {
+      if(dropText.length () > 0)
+        dropText += "\n";
+      dropText  += url.toLocalFile ();
+    }
+  }
+
   /*  if (!urls.isEmpty())
   {
     for ( int i = 0 ; i < urls.count() ; i++ )
--- a/libgui/qterminal/libqterminal/unix/TerminalView.h
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.h
@@ -3,7 +3,7 @@
     Copyright (C) 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
 
     Rewritten for QT4 by e_k <e_k at users.sourceforge.net>, Copyright (C)2008
-    Copyright (C) 2012-2013 Jacob Dawid <jacob.dawid@googlemail.com>
+    Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -404,7 +404,7 @@
     void updateLineProperties();
 
     /** Copies the selected text to the clipboard. */
-    void copyClipboard();
+    void copyClipboard (bool extra_interrupt);
     /**
      * Pastes the content of the clipboard into the
      * display.
@@ -416,6 +416,11 @@
      */
     void pasteSelection();
 
+    /**
+     * selects all content
+     */
+    void selectAll();
+
 	 /**
 	 * Causes the widget to display or hide a message informing the user that terminal
 	 * output has been suspended (by using the flow control key combination Ctrl+S)
@@ -485,8 +490,6 @@
 
 
 protected:
-    virtual bool event( QEvent * );
-
     virtual void paintEvent( QPaintEvent * );
 
     void focusInEvent(QFocusEvent *focusEvent);
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
@@ -1221,10 +1221,10 @@
 
 /*! shows the contents of the scan buffer.
 
-    This functions is used for diagnostics. It is called by \e ReportErrorToken
+    This functions is used for diagnostics. It is called by @e ReportErrorToken
     to inform about strings that cannot be decoded or handled by the emulation.
 
-    \sa ReportErrorToken
+    @sa ReportErrorToken
 */
 
 static void hexdump(int* s, int len)
--- a/libgui/qterminal/libqterminal/unix/kpty.cpp
+++ b/libgui/qterminal/libqterminal/unix/kpty.cpp
@@ -386,6 +386,7 @@
 
   struct ::termios t;
   tcGetAttr(&t);
+  t.c_iflag &= ~IXON;
   t.c_lflag &= ~ECHOCTL;
   tcSetAttr(&t);
   return true;
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp
+++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp
@@ -1,3 +1,4 @@
+
 /*
 
 Copyright (C) 2011, 2013 Michael Goffioul.
@@ -24,7 +25,7 @@
 #include <QClipboard>
 #include <QColor>
 #include <QFont>
-#include <QHBoxLayout>
+#include <QGridLayout>
 #include <QPaintEvent>
 #include <QPainter>
 #include <QResizeEvent>
@@ -35,6 +36,9 @@
 #include <QToolTip>
 #include <QCursor>
 #include <QMessageBox>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QUrl>
 
 #include <fcntl.h>
 #include <io.h>
@@ -173,16 +177,21 @@
   QConsolePrivate (QWinTerminalImpl* parent, const QString& cmd = QString ());
   ~QConsolePrivate (void);
 
-  void updateConsoleSize (bool sync = false);
+  void updateConsoleSize (bool sync = false, bool allow_smaller_width = false);
   void syncConsoleParameters (void);
   void grabConsoleBuffer (CHAR_INFO* buf = 0);
-  void updateScrollBar (void);
-  void setScrollValue (int value);
+  void updateHorizontalScrollBar (void);
+  void updateVerticalScrollBar (void);
+  void setHorizontalScrollValue (int value);
+  void setVerticalScrollValue (int value);
   void updateConsoleView (bool grab = true);
   void monitorConsole (void);
   void startCommand (void);
   void sendConsoleText (const QString& s);
   QRect cursorRect (void);
+  void selectAll();
+  void selectWord(const QPoint& cellPos);
+  void selectLine(const QPoint& cellPos);
 
   void log (const char* fmt, ...);
 
@@ -204,6 +213,7 @@
   void setForegroundColor (const QColor& color);
   void setSelectionColor (const QColor& color);
   void setCursorColor (bool useForegroundColor, const QColor& color);
+  void setScrollBufferSize (int value);
 
   void drawTextBackground (QPainter& p, int cx1, int cy1, int cx2, int cy2,
                            int cw, int ch);
@@ -249,7 +259,8 @@
   HANDLE m_process;
 
   QConsoleView* m_consoleView;
-  QScrollBar* m_scrollBar;
+  QScrollBar* m_horizontalScrollBar;
+  QScrollBar* m_verticalScrollBar;
   QTimer* m_consoleWatcher;
   QConsoleThread *m_consoleThread;
 
@@ -362,13 +373,15 @@
   m_buffer = m_tmpBuffer = 0;
 
   m_consoleView = new QConsoleView (parent);
-  m_scrollBar = new QScrollBar (Qt::Vertical, parent);
+  m_horizontalScrollBar = new QScrollBar (Qt::Horizontal, parent);
+  m_verticalScrollBar = new QScrollBar (Qt::Vertical, parent);
 
-  QHBoxLayout* l = new QHBoxLayout (parent);
+  QGridLayout* l = new QGridLayout (parent);
   l->setContentsMargins (0, 0, 0, 0);
   l->setSpacing (0);
-  l->addWidget (m_consoleView, 1);
-  l->addWidget (m_scrollBar, 0);
+  l->addWidget (m_consoleView, 0, 0);
+  l->addWidget (m_horizontalScrollBar, 1, 0);
+  l->addWidget (m_verticalScrollBar, 0, 1);
 
   // Choose 15 (0xF) as index into the Windows console color map for the
   // background and 0 (0x0) as the index for the foreground.  This
@@ -394,7 +407,8 @@
   parent->setFocusPolicy (Qt::StrongFocus);
   parent->winId ();
 
-  updateScrollBar ();
+  updateHorizontalScrollBar ();
+  updateVerticalScrollBar ();
 
   m_consoleWatcher = new QTimer (parent);
   m_consoleWatcher->setInterval (10);
@@ -404,8 +418,12 @@
   QObject::connect (m_blinkCursorTimer, SIGNAL (timeout()),
                     q, SLOT (blinkCursorEvent ()));
 
-  QObject::connect (m_scrollBar, SIGNAL (valueChanged (int)),
-                    q, SLOT (scrollValueChanged (int)));
+  QObject::connect (m_horizontalScrollBar, SIGNAL (valueChanged (int)),
+                    q, SLOT (horizontalScrollValueChanged (int)));
+
+  QObject::connect (m_verticalScrollBar, SIGNAL (valueChanged (int)),
+                    q, SLOT (verticalScrollValueChanged (int)));
+
   QObject::connect (m_consoleWatcher, SIGNAL (timeout (void)),
                     q, SLOT (monitorConsole (void)));
 
@@ -575,6 +593,9 @@
 void QConsolePrivate::setBackgroundColor (const QColor& color)
 {
   m_colors[15] = color;
+
+  QPalette palette (color);
+  m_consoleView->setPalette (palette);
 }
 
 void QConsolePrivate::setForegroundColor (const QColor& color)
@@ -593,6 +614,16 @@
   m_cursorColor = useForegroundColor ? QColor () : color;
 }
 
+void QConsolePrivate::setScrollBufferSize (int value)
+{
+  CONSOLE_SCREEN_BUFFER_INFO sbi;
+  GetConsoleScreenBufferInfo (m_stdOut, &sbi);
+
+  m_bufferSize = QSize (sbi.dwSize.X, (SHORT)value);
+
+  updateConsoleSize (true);
+}
+
 void QConsolePrivate::drawTextBackground (QPainter& p, int cx1, int cy1,
                                           int cx2, int cy2, int cw, int ch)
 {
@@ -654,6 +685,83 @@
   p.restore ();
 }
 
+void QConsolePrivate::selectAll()
+{
+  m_beginSelection = QPoint (0,0);
+  m_endSelection = QPoint(m_bufferSize.width (),
+                          m_cursorPos.y());
+  updateSelection();
+}
+
+void QConsolePrivate::selectWord (const QPoint & cellpos)
+{
+  QPoint begin = cellpos;
+  QPoint end = cellpos;
+
+  int stride = m_consoleRect.width ();
+
+  int verticalScrollOffset = m_consoleRect.top ();
+  int horizontalScrollOffset = m_consoleRect.left ();
+
+  // get begin, end in buffer offsets
+  begin.ry () -= verticalScrollOffset;
+  end.ry () -= verticalScrollOffset;
+
+  begin.rx () -= horizontalScrollOffset;
+  end.rx () -= horizontalScrollOffset;
+
+  // loog at current clicked on char to determinate ig getting space chunk or nonspace chunk
+  if (QChar(m_buffer[begin.y ()*stride + begin.x ()].Char.UnicodeChar).isSpace () == false)
+  {
+    // from current char, go back and fwd to find start and end of block
+    while(begin.x () > 0 &&
+          QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace() == false)
+    {
+        begin.rx () --;
+    }
+
+    while(end.x () < m_consoleRect.width () &&
+          QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace() == false)
+    {
+      end.rx () ++;
+    }
+  }
+  else
+  {
+    while(begin.x () > 0 &&
+          QChar(m_buffer[begin.y ()*stride + begin.x () -1].Char.UnicodeChar).isSpace())
+    {
+      begin.rx () --;
+    }
+
+    while(end.x () < m_consoleRect.width () &&
+          QChar(m_buffer[end.y ()*stride + end.x () +1].Char.UnicodeChar).isSpace ())
+    {
+      end.rx () ++;
+    }
+  }
+
+  // convert console  offsets to absolute cell positions
+  begin.ry () += verticalScrollOffset;
+  end.ry () += verticalScrollOffset;
+
+  begin.rx () += horizontalScrollOffset;
+  end.rx () += horizontalScrollOffset;
+
+  m_beginSelection = begin;
+  m_endSelection = end;
+
+  updateSelection ();
+}
+
+void QConsolePrivate::selectLine (const QPoint & cellpos)
+{
+  m_beginSelection = QPoint (0, cellpos.y ());
+  m_endSelection = QPoint (m_bufferSize.width ()-1, cellpos.y ());
+  updateSelection ();
+}
+
+
 void QConsolePrivate::drawSelection (QPainter& p, int cx1, int cy1,
                                      int cx2, int cy2, int cw, int ch)
 {
@@ -667,10 +775,14 @@
   if (haveSelection)
     maybeSwapPoints (begin, end);
 
-  int scrollOffset = m_consoleRect.top ();
+  int verticalScrollOffset = m_consoleRect.top ();
+  int horizontalScrollOffset = m_consoleRect.left ();
 
-  begin.ry () -= scrollOffset;
-  end.ry () -= scrollOffset;
+  begin.ry () -= verticalScrollOffset;
+  end.ry () -= verticalScrollOffset;
+
+  begin.rx () -= horizontalScrollOffset;
+  end.rx () -= horizontalScrollOffset;
 
   int ascent = p.fontMetrics ().ascent ();
   int stride = m_consoleRect.width ();
@@ -871,9 +983,9 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void QConsolePrivate::updateConsoleSize (bool sync)
+void QConsolePrivate::updateConsoleSize (bool sync, bool allow_smaller_width)
 {
-  QFontMetrics fm (m_font);
+  QFontMetrics fm = m_consoleView->fontMetrics ();
   QSize winSize = m_consoleView->size ();
 
   m_charSize.rwidth () = fm.averageCharWidth ();
@@ -882,9 +994,30 @@
   m_consoleRect.setWidth (winSize.width () / fm.averageCharWidth ());
   m_consoleRect.setHeight (winSize.height () / fm.lineSpacing ());
 
-  m_bufferSize.rwidth () = m_consoleRect.width ();
-  m_bufferSize.rheight () = qMax (m_bufferSize.height (),
-                                  m_consoleRect.height ());
+  // Don't shrink the size of the buffer.  That way wide lines won't be
+  // truncated and will reappear if the window is enlarged again later.
+
+  if (allow_smaller_width || m_consoleRect.width () > m_bufferSize.width ())
+    m_bufferSize.rwidth () = m_consoleRect.width ();
+
+  if (qMax (m_bufferSize.height (), m_consoleRect.height ())
+      > m_bufferSize.height ())
+    m_bufferSize.rheight () = qMax (m_bufferSize.height (),
+                                    m_consoleRect.height ());
+
+  // Store the terminal size in the environment.  When Octave is
+  // initialized, we ask the command editor (usually readline) to prefer
+  // using these values rather than querying the terminal so that the
+  // buffer size can be larger than the size of the window that the
+  // command editor will actually use.
+
+  qputenv ("LINES", QByteArray::number (m_consoleRect.height ()));
+  qputenv ("COLUMNS", QByteArray::number (m_consoleRect.width ()));
+
+  // Force the command line editor (usually readline) to notice the
+  // change in screen size as soon as possible.
+
+  q->setSize (m_consoleRect.height (), m_consoleRect.width ());
 
   m_consoleRect.moveLeft (0);
   if (m_consoleRect.bottom () >= m_bufferSize.height ())
@@ -902,7 +1035,8 @@
   if (sync)
     syncConsoleParameters ();
 
-  updateScrollBar ();
+  updateHorizontalScrollBar ();
+  updateVerticalScrollBar ();
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -989,25 +1123,70 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void QConsolePrivate::updateScrollBar (void)
+void QConsolePrivate::updateHorizontalScrollBar (void)
 {
-  m_scrollBar->setMinimum (0);
-  if (m_bufferSize.height () > m_consoleRect.height ())
-    m_scrollBar->setMaximum (m_bufferSize.height () - m_consoleRect.height ());
+  m_horizontalScrollBar->setMinimum (0);
+  if (m_bufferSize.width () > m_consoleRect.width ())
+    m_horizontalScrollBar->setMaximum (m_bufferSize.width () - m_consoleRect.width ());
   else
-    m_scrollBar->setMaximum (0);
-  m_scrollBar->setSingleStep (1);
-  m_scrollBar->setPageStep (m_consoleRect.height ());
-  m_scrollBar->setValue (m_consoleRect.top ());
+    m_horizontalScrollBar->setMaximum (0);
+  m_horizontalScrollBar->setSingleStep (1);
+  m_horizontalScrollBar->setPageStep (m_consoleRect.width ());
+  m_horizontalScrollBar->setValue (m_consoleRect.left ());
+
+  log ("Horizontal scrollbar parameters updated: %d/%d/%d/%d\n",
+       m_horizontalScrollBar->minimum (),
+       m_horizontalScrollBar->maximum (),
+       m_horizontalScrollBar->singleStep (),
+       m_horizontalScrollBar->pageStep ());
+}
 
-  log ("Scrollbar parameters updated: %d/%d/%d/%d\n",
-       m_scrollBar->minimum (), m_scrollBar->maximum (),
-       m_scrollBar->singleStep (), m_scrollBar->pageStep ());
+void QConsolePrivate::updateVerticalScrollBar (void)
+{
+  m_verticalScrollBar->setMinimum (0);
+  if (m_bufferSize.height () > m_consoleRect.height ())
+    m_verticalScrollBar->setMaximum (m_bufferSize.height () - m_consoleRect.height ());
+  else
+    m_verticalScrollBar->setMaximum (0);
+  m_verticalScrollBar->setSingleStep (1);
+  m_verticalScrollBar->setPageStep (m_consoleRect.height ());
+  m_verticalScrollBar->setValue (m_consoleRect.top ());
+
+  log ("Vertical scrollbar parameters updated: %d/%d/%d/%d\n",
+       m_verticalScrollBar->minimum (), m_verticalScrollBar->maximum (),
+       m_verticalScrollBar->singleStep (), m_verticalScrollBar->pageStep ());
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-void QConsolePrivate::setScrollValue (int value)
+void QConsolePrivate::setHorizontalScrollValue (int value)
+{
+  if (value == m_consoleRect.left ())
+    return;
+
+  SMALL_RECT r;
+  HANDLE hStdOut = m_stdOut;
+
+  if (value + m_consoleRect.width () > m_bufferSize.width ())
+    value = m_bufferSize.width () - m_consoleRect.width ();
+
+  r.Left = value;
+  r.Top = m_consoleRect.top ();
+  r.Right = value + m_consoleRect.width () - 1;
+  r.Bottom = m_consoleRect.bottom ();
+
+  log ("Scrolling window horizontally: (%d, %d) -> (%d, %d) [%d x %d]\n",
+       r.Left, r.Top, r.Right, r.Bottom,
+       r.Right - r.Left + 1, r.Bottom - r.Top + 1);
+
+  if (SetConsoleWindowInfo (hStdOut, TRUE, &r))
+    {
+      m_consoleRect.moveLeft (value);
+      updateConsoleView ();
+    }
+}
+
+void QConsolePrivate::setVerticalScrollValue (int value)
 {
   if (value == m_consoleRect.top ())
     return;
@@ -1023,7 +1202,7 @@
   r.Right = m_consoleRect.right ();
   r.Bottom = value + m_consoleRect.height () - 1;
 
-  log ("Scrolling window: (%d, %d) -> (%d, %d) [%d x %d]\n",
+  log ("Scrolling window vertically: (%d, %d) -> (%d, %d) [%d x %d]\n",
        r.Left, r.Top, r.Right, r.Bottom,
        r.Right - r.Left + 1, r.Bottom - r.Top + 1);
 
@@ -1070,7 +1249,8 @@
           // Buffer size changed
           m_bufferSize.rwidth () = sbi.dwSize.X;
           m_bufferSize.rheight () = sbi.dwSize.Y;
-          updateScrollBar ();
+          updateHorizontalScrollBar ();
+          updateVerticalScrollBar ();
         }
 
       if (m_cursorPos.x () != sbi.dwCursorPosition.X
@@ -1098,7 +1278,8 @@
           m_consoleRect = QRect (sbi.srWindow.Left, sbi.srWindow.Top,
                                  sbi.srWindow.Right - sbi.srWindow.Left + 1,
                                  sbi.srWindow.Bottom - sbi.srWindow.Top + 1);
-          updateScrollBar ();
+          updateHorizontalScrollBar ();
+          updateVerticalScrollBar ();
           updateConsoleView ();
           return;
         }
@@ -1238,12 +1419,20 @@
 //////////////////////////////////////////////////////////////////////////////
 
 QWinTerminalImpl::QWinTerminalImpl (QWidget* parent)
-    : QTerminal (parent), d (new QConsolePrivate (this))
+    : QTerminal (parent), d (new QConsolePrivate (this)),
+      allowTripleClick (false)
 {
     installEventFilter (this);
 
     connect (this, SIGNAL (set_global_shortcuts_signal (bool)),
            parent, SLOT (set_global_shortcuts (bool)));
+    connect (this, SIGNAL (set_global_shortcuts_signal (bool)),
+             this, SLOT (set_global_shortcuts (bool)));
+
+    connect (this, SIGNAL (set_screen_size_signal (int, int)),
+             parent, SLOT (set_screen_size (int, int)));
+
+    setAcceptDrops (true);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1272,7 +1461,11 @@
 
 void QWinTerminalImpl::mousePressEvent (QMouseEvent *event)
 {
-  if (event->button () == Qt::LeftButton)
+  if (allowTripleClick)
+    {
+      mouseTripleClickEvent (event);
+    }
+  else if (event->button () == Qt::LeftButton)
     {
       d->m_settingSelection = true;
 
@@ -1282,7 +1475,7 @@
 
 void QWinTerminalImpl::mouseReleaseEvent (QMouseEvent *event)
 {
-  if (event->button () == Qt::LeftButton)
+  if (event->button () == Qt::LeftButton && d->m_settingSelection)
     {
       d->m_endSelection = d->posToCell (event->pos ());
 
@@ -1292,6 +1485,36 @@
     }
 }
 
+void QWinTerminalImpl::mouseDoubleClickEvent (QMouseEvent *event)
+{
+  if (event->button () == Qt::LeftButton)
+    {
+      // doubleclick - select word
+      d->m_settingSelection = false;
+
+      d->selectWord (d->posToCell (event->pos ()));
+
+      allowTripleClick = true;
+
+      QTimer::singleShot (QApplication::doubleClickInterval (),this,
+                     SLOT (tripleClickTimeout ()));
+
+    }
+}
+
+void QWinTerminalImpl::mouseTripleClickEvent (QMouseEvent *event)
+{
+  if (event->button () == Qt::LeftButton)
+    {
+      d->selectLine (d->posToCell (event->pos ()));
+    }
+}
+
+void QWinTerminalImpl::tripleClickTimeout ()
+{
+  allowTripleClick = false;
+}
+
 //////////////////////////////////////////////////////////////////////////////
 
 void QWinTerminalImpl::viewResizeEvent (QConsoleView*, QResizeEvent*)
@@ -1357,6 +1580,13 @@
     }
 }
 
+// Reset width of console buffer and terminal window to be the same.
+
+void QWinTerminalImpl::init_terminal_size (void)
+{
+  d->updateConsoleSize (true, true);
+}
+
 //////////////////////////////////////////////////////////////////////////////
 
 void QWinTerminalImpl::wheelEvent (QWheelEvent* event)
@@ -1365,16 +1595,21 @@
     {
       // Forward to the scrollbar (avoid recursion)
       d->m_inWheelEvent = true;
-      QApplication::sendEvent (d->m_scrollBar, event);
+      QApplication::sendEvent (d->m_verticalScrollBar, event);
       d->m_inWheelEvent = false;
     }
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-void QWinTerminalImpl::scrollValueChanged (int value)
+void QWinTerminalImpl::horizontalScrollValueChanged (int value)
 {
-  d->setScrollValue (value);
+  d->setHorizontalScrollValue (value);
+}
+
+void QWinTerminalImpl::verticalScrollValueChanged (int value)
+{
+  d->setVerticalScrollValue (value);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1500,6 +1735,12 @@
   d->setCursorColor (useForegroundColor, color);
 }
 
+void QWinTerminalImpl::setScrollBufferSize(int value)
+{
+  d->setScrollBufferSize (value);
+}
+
+
 //////////////////////////////////////////////////////////////////////////////
 
 void QWinTerminalImpl::setTerminalFont (const QFont& f)
@@ -1513,13 +1754,14 @@
 
 void QWinTerminalImpl::setSize (int columns, int lines)
 {
-  Q_UNUSED (columns);
-  Q_UNUSED (lines);
+  d->log ("emit set_screen_size_signal (%d, %d)\n", columns, lines);
+
+  emit set_screen_size_signal (columns, lines);
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-void QWinTerminalImpl::copyClipboard (void)
+void QWinTerminalImpl::copyClipboard ()
 {
   if(!hasFocus()) return;
 
@@ -1528,11 +1770,13 @@
   QString selection = d->getSelection ();
 
   if (selection.isEmpty ())
-    terminal_interrupt ();
+    {
+      if (! _extra_interrupt)
+        terminal_interrupt ();
+    }
   else
     {
       clipboard->setText (selection);
-
       emit report_status_message (tr ("copied selection to clipboard"));
     }
 }
@@ -1549,6 +1793,16 @@
     sendText (text);
 }
 
+//////////////////////////////////////////////////////////////////////////////
+
+void QWinTerminalImpl::selectAll (void)
+{
+  if(!hasFocus()) return;
+
+  d->selectAll();
+}
+
+
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -1557,3 +1811,38 @@
   QString selection = d->getSelection ();
   return selection;
 }
+
+//////////////////////////////////////////////////////////////////////////////
+
+void QWinTerminalImpl::dragEnterEvent (QDragEnterEvent *event)
+{
+   if (event->mimeData ()->hasUrls ())
+     {
+       event->acceptProposedAction();
+     }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void QWinTerminalImpl::dropEvent (QDropEvent *event)
+{
+  QString dropText;
+
+  if (event->mimeData ()->hasUrls ())
+    {
+      foreach (QUrl url, event->mimeData ()->urls ())
+        {
+          if(dropText.length () > 0)
+            dropText += "\n";
+          dropText  += url.toLocalFile ();
+        }
+      sendText (dropText);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void QWinTerminalImpl::has_extra_interrupt (bool extra)
+{
+  _extra_interrupt = extra;
+}
\ No newline at end of file
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h
+++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h
@@ -32,6 +32,8 @@
 class QResizeEvent;
 class QWheelEvent;
 class QPoint;
+class QDragEnterEvent;
+class QDropEvent;
 
 class QConsolePrivate;
 class QConsoleThread;
@@ -60,18 +62,24 @@
   void setForegroundColor (const QColor& color);
   void setSelectionColor (const QColor& color);
   void setCursorColor (bool useForegoundColor, const QColor& color);
+  void setScrollBufferSize(int value);
 
   QString selectedText ();
 
+  void has_extra_interrupt (bool);
+
 public slots:
   void copyClipboard (void);
   void pasteClipboard (void);
+  void selectAll (void);
   void blinkCursorEvent (void);
+  void init_terminal_size (void);
 
 signals:
   void terminated (void);
   void titleChanged (const QString&);
   void set_global_shortcuts_signal (bool);
+  void set_screen_size_signal (int, int);
 
 protected:
   void viewPaintEvent (QConsoleView*, QPaintEvent*);
@@ -86,16 +94,25 @@
   void mouseMoveEvent (QMouseEvent *event);
   void mousePressEvent (QMouseEvent *event);
   void mouseReleaseEvent (QMouseEvent *event);
+  void mouseDoubleClickEvent (QMouseEvent* event);
+  void mouseTripleClickEvent (QMouseEvent* event);
 
   bool eventFilter(QObject *obj, QEvent *ev);
 
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+
 private slots:
-  void scrollValueChanged (int value);
+  void horizontalScrollValueChanged (int value);
+  void verticalScrollValueChanged (int value);
   void monitorConsole (void);
   void updateSelection (void);
+  void tripleClickTimeout (void);
 
 private:
   QConsolePrivate* d;
+  bool allowTripleClick;
+  bool _extra_interrupt;
 };
 
 //////////////////////////////////////////////////////////////////////////////
--- a/libgui/src/color-picker.cc
+++ b/libgui/src/color-picker.cc
@@ -3,7 +3,7 @@
 // by Harald Jedele, 23.03.01, GPL version 2 or any later version.
 //
 // Copyright (C) FZI Forschungszentrum Informatik Karlsruhe
-// Copyright (C) 2013 Torsten
+// Copyright (C) 2013-2015 Torsten
 //
 // This file is part of Octave.
 //
--- a/libgui/src/color-picker.h
+++ b/libgui/src/color-picker.h
@@ -3,7 +3,7 @@
 // by Harald Jedele, 23.03.01, GPL version 2 or any later version.
 //
 // Copyright (C) FZI Forschungszentrum Informatik Karlsruhe
-// Copyright (C) 2013 Torsten
+// Copyright (C) 2013-2015 Torsten
 //
 // This file is part of Octave.
 //
--- a/libgui/src/dialog.cc
+++ b/libgui/src/dialog.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2013 Daniel J. Sebald
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2013-2015 Daniel J. Sebald
 
 This file is part of Octave.
 
@@ -62,6 +62,9 @@
 void
 QUIWidgetCreator::dialog_button_clicked (QAbstractButton *button)
 {
+  // Wait for link thread to go to sleep state.
+  mutex.lock ();
+
   // Store the value so that builtin functions can retrieve.
   if (button)
     dialog_button = button->text ();
@@ -69,6 +72,8 @@
   // The value should always be 1 for the Octave functions.
   dialog_result = 1;
 
+  mutex.unlock ();
+
   // Wake up Octave process so that it continues.
   waitcondition.wakeAll ();
 }
@@ -78,10 +83,15 @@
 QUIWidgetCreator::list_select_finished (const QIntList& selected,
                                         int button_pressed)
 {
+  // Wait for link thread to go to sleep state.
+  mutex.lock ();
+
   // Store the value so that builtin functions can retrieve.
   *list_index = selected;
   dialog_result = button_pressed;
 
+  mutex.unlock ();
+
   // Wake up Octave process so that it continues.
   waitcondition.wakeAll ();
 }
@@ -90,10 +100,15 @@
 void
 QUIWidgetCreator::input_finished (const QStringList& input, int button_pressed)
 {
+  // Wait for link thread to go to sleep state.
+  mutex.lock ();
+
   // Store the value so that builtin functions can retrieve.
   *string_list = input;
   dialog_result = button_pressed;
 
+  mutex.unlock ();
+
   // Wake up Octave process so that it continues.
   waitcondition.wakeAll ();
 }
@@ -102,11 +117,16 @@
 QUIWidgetCreator::filedialog_finished (const QStringList& files,
                                        const QString& path, int filterindex)
 {
+  // Wait for link thread to go to sleep state.
+  mutex.lock ();
+
   // Store the value so that builtin functions can retrieve.
   *string_list = files;
   dialog_result = filterindex;
   *path_name = path;
 
+  mutex.unlock ();
+
   // Wake up Octave process so that it continues.
   waitcondition.wakeAll ();
 }
@@ -193,14 +213,10 @@
   QListView *view = new QListView;
   view->setModel (model);
 
-  if (mode == "Single")
+  if (mode == "single")
     view->setSelectionMode (QAbstractItemView::SingleSelection);
-  else if (mode == "Multiple")
+  else if (mode == "multiple")
     view->setSelectionMode (QAbstractItemView::ExtendedSelection);
-//  else if ()
-//    view->setSelectionMode (QAbstractItemView::ContiguousSelection);
-//  else if ()
-//    view->setSelectionMode (QAbstractItemView::MultiSelection);
   else
     view->setSelectionMode (QAbstractItemView::NoSelection);
 
@@ -249,7 +265,7 @@
     }
   listLayout->addWidget (view);
   QPushButton *select_all = new QPushButton (tr ("Select All"));
-  select_all->setEnabled (mode == "Multiple");
+  select_all->setEnabled (mode == "multiple");
   listLayout->addWidget (select_all);
 
   QPushButton *buttonOk = new QPushButton (ok_string);
@@ -466,18 +482,18 @@
            &uiwidget_creator,
            SLOT (filedialog_finished (const QStringList&, const QString&,
                                       int)));
+  connect (this, SIGNAL (accepted ()), this, SLOT (acceptSelection ()));
+  connect (this, SIGNAL (rejected ()), this, SLOT (rejectSelection ()));
 }
 
 void
-FileDialog::reject (void)
+FileDialog::rejectSelection(void)
 {
   QStringList empty;
   emit finish_input (empty, "", 0);
-  done (QDialog::Rejected);
-
 }
 
-void FileDialog::accept (void)
+void FileDialog::acceptSelection (void)
 {
   QStringList string_result;
   QString path;
@@ -485,20 +501,33 @@
 
   string_result = selectedFiles ();
 
+  if (testOption (QFileDialog::ShowDirsOnly)  == true &&
+      string_result.size () > 0)
+    {
+      path = string_result[0];
+    }
+  else
+    {
+      path = directory ().absolutePath ();
+    }
+
   // Matlab expects just the file name, whereas the file dialog gave us
-  // pull path names, so fix it.
+  // full path names, so fix it.
 
   for (int i = 0; i < string_result.size (); i++)
     string_result[i] = QFileInfo (string_result[i]).fileName ();
 
+  // if not showing only dirs, add end slash for the path component
+  if (testOption (QFileDialog::ShowDirsOnly)  == false)
+    path = path + "/";
 
-  path = directory ().absolutePath ();
+  // convert to native slashes
+  path = QDir::toNativeSeparators (path);
 
   QStringList name_filters = nameFilters ();
   idx = name_filters.indexOf (selectedNameFilter ()) + 1;
 
   // send the selected info
   emit finish_input (string_result, path, idx);
-  done (QDialog::Accepted);
 }
 
--- a/libgui/src/dialog.h
+++ b/libgui/src/dialog.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2013 Daniel J. Sebald
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2013-2015 Daniel J. Sebald
 
 This file is part of Octave.
 
@@ -114,11 +114,11 @@
 
   const QString *get_dialog_path (void) { return path_name; }
 
-  void wait (void)
-  {
-    // Wait while the user is responding to message box.
-    waitcondition.wait (&mutex);
-  }
+  // GUI objects cannot be accessed in the non-GUI thread.  However,
+  // signals can be sent to slots across threads with proper
+  // synchronization.  Hence, the use of QWaitCondition.
+  QMutex mutex;
+  QWaitCondition waitcondition;
 
 signals:
 
@@ -159,13 +159,6 @@
 
   QString *path_name;
 
-  // GUI objects cannot be accessed in the non-GUI thread.  However,
-  // signals can be sent to slots across threads with proper
-  // synchronization.  Hence, the use of QWaitCondition.
-
-  QMutex mutex;
-
-  QWaitCondition waitcondition;
 };
 
 extern QUIWidgetCreator uiwidget_creator;
@@ -261,9 +254,9 @@
 
 private slots:
 
-  void reject (void);
+  void rejectSelection (void);
 
-  void accept (void);
+  void acceptSelection (void);
 };
 
 #endif
--- a/libgui/src/documentation-dock-widget.cc
+++ b/libgui/src/documentation-dock-widget.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -52,12 +52,17 @@
   _webinfo->pasteClipboard ();
 }
 void
+documentation_dock_widget::selectAll ()
+{
+  _webinfo->selectAll ();
+}
+
+void
 documentation_dock_widget::showDoc (const QString &name)
 {
-  // show the doc pane
+  // show the doc pane without focus for carrying on typing in the console
   if (!isVisible ())
     setVisible (true);
-  setFocus ();
   raise ();
 
   _webinfo->load_ref (name);
--- a/libgui/src/documentation-dock-widget.h
+++ b/libgui/src/documentation-dock-widget.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -38,6 +38,7 @@
 protected slots:
   void copyClipboard ();
   void pasteClipboard ();
+  void selectAll ();
 
   void showDoc (const QString & name);
 private:
--- a/libgui/src/files-dock-widget.cc
+++ b/libgui/src/files-dock-widget.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John P. Swensen
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John P. Swensen
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -46,6 +46,7 @@
 #include <QFileDialog>
 
 #include "load-save.h"
+#include "oct-env.h"
 
 class FileTreeViewer : public QTreeView
 {
@@ -90,31 +91,31 @@
   _current_directory->setInsertPolicy (QComboBox::NoInsert);
   _current_directory->setSizeAdjustPolicy (
     QComboBox::AdjustToMinimumContentsLengthWithIcon);
-  QSizePolicy sizePol (QSizePolicy::Expanding, QSizePolicy::Maximum);
+  QSizePolicy sizePol (QSizePolicy::Expanding, QSizePolicy::Preferred);
   _current_directory->setSizePolicy (sizePol);
 
-  QAction *directory_up_action = new QAction (QIcon (":/actions/icons/up.png"),
+  QAction *directory_up_action = new QAction (resource_manager::icon ("go-up"),
                                               "", _navigation_tool_bar);
-  directory_up_action->setToolTip (tr ("Move up one directory"));
+  directory_up_action->setToolTip (tr ("One directory up"));
 
   _sync_browser_directory_action
-    = new QAction (QIcon (":/actions/icons/reload.png"),
+    = new QAction (resource_manager::icon ("go-first"),
                    tr ("Show Octave directory"), _navigation_tool_bar);
   _sync_browser_directory_action->setToolTip (
     tr ("Go to current Octave directory"));
   _sync_browser_directory_action->setEnabled ("false");
 
   _sync_octave_directory_action
-    = new QAction (QIcon (":/actions/icons/ok.png"),
+    = new QAction (resource_manager::icon ("go-last"),
                    tr ("Set Octave directory"), _navigation_tool_bar);
   _sync_octave_directory_action->setToolTip (
-    tr ("Set Octave directroy to current browser directory"));
+    tr ("Set Octave directory to current browser directory"));
   _sync_octave_directory_action->setEnabled ("false");
 
   QToolButton * popdown_button = new QToolButton ();
   popdown_button->setToolTip (tr ("Actions on current directory"));
   QMenu * popdown_menu = new QMenu ();
-  popdown_menu->addAction (QIcon (":/actions/icons/home.png"),
+  popdown_menu->addAction (resource_manager::icon ("user-home"),
                            tr ("Show Home Directory"),
                            this, SLOT (popdownmenu_home (bool)));
   popdown_menu->addAction (_sync_browser_directory_action);
@@ -122,22 +123,22 @@
   popdown_button->setMenu (popdown_menu);
   popdown_button->setPopupMode (QToolButton::InstantPopup);
   popdown_button->setDefaultAction (new QAction (
-                                      QIcon (":/actions/icons/gear.png"), "",
-                                      _navigation_tool_bar));
+                              resource_manager::icon ("applications-system"), "",
+                              _navigation_tool_bar));
 
   popdown_menu->addSeparator ();
-  popdown_menu->addAction (QIcon (":/actions/icons/folder.png"),
-                           tr ("Search Directory..."),
+  popdown_menu->addAction (resource_manager::icon ("folder"),
+                           tr ("Set Browser Directory..."),
                            this, SLOT (popdownmenu_search_dir (bool)));
   popdown_menu->addSeparator ();
-  popdown_menu->addAction (QIcon (":/actions/icons/findf.png"),
+  popdown_menu->addAction (resource_manager::icon ("edit-find"),
                            tr ("Find Files..."),
                            this, SLOT (popdownmenu_findfiles (bool)));
   popdown_menu->addSeparator ();
-  popdown_menu->addAction (QIcon (":/actions/icons/filenew.png"),
+  popdown_menu->addAction (resource_manager::icon ("document-new"),
                            tr ("New File..."),
                            this, SLOT (popdownmenu_newfile (bool)));
-  popdown_menu->addAction (QIcon (":/actions/icons/folder_new.png"),
+  popdown_menu->addAction (resource_manager::icon ("folder-new"),
                            tr ("New Directory..."),
                            this, SLOT (popdownmenu_newdir (bool)));
 
@@ -155,8 +156,29 @@
   QSettings *settings = resource_manager::get_settings ();
   // FIXME: what should happen if settings is 0?
 
-  // Create the QFileSystemModel starting in the actual directory
-  QDir curr_dir;
+  // Create the QFileSystemModel starting in the desired directory
+  QDir startup_dir;  // take current dir
+
+  if (settings->value ("filesdockwidget/restore_last_dir",false).toBool ())
+    {
+      // restore last dir from previous session
+      QStringList last_dirs
+        = settings->value ("filesdockwidget/mru_dir_list").toStringList ();
+      if (last_dirs.length () > 0)
+        startup_dir = QDir (last_dirs.at (0));  // last dir in previous session
+    }
+  else if (! settings->value ("filesdockwidget/startup_dir").toString ().isEmpty ())
+    {
+      // do not restore but there is a startup dir configured
+      startup_dir = QDir (settings->value ("filesdockwidget/startup_dir").toString ());
+    }
+
+  if (! startup_dir.exists ())
+    {
+      // the configured startup dir does not exist, take actual one
+      startup_dir = QDir ();
+    }
+
   _file_system_model = new QFileSystemModel (this);
   if (settings->value ("filesdockwidget/showHiddenFiles",false).toBool ())
     {
@@ -168,7 +190,7 @@
       _file_system_model->setFilter (QDir::NoDotAndDotDot | QDir::AllEntries);
     }
   QModelIndex rootPathIndex = _file_system_model->setRootPath (
-                                curr_dir.absolutePath ());
+                                startup_dir.absolutePath ());
 
   // Attach the model to the QTreeView and set the root index
   _file_tree_view = new FileTreeViewer (container);
@@ -178,7 +200,8 @@
   _file_tree_view->setSortingEnabled (true);
   _file_tree_view->setAlternatingRowColors (true);
   _file_tree_view->setAnimated (true);
-  _file_tree_view->setToolTip (tr ("Double-click a file to open it"));
+  _file_tree_view->setToolTip (
+    tr ("Activate to open in editor, right click for alternatives"));
 
   // get sort column and order as well as cloumn state (order and width)
 
@@ -198,7 +221,7 @@
   _current_directory->setEditText (
     _file_system_model->fileInfo (rootPathIndex).  absoluteFilePath ());
 
-  connect (_file_tree_view, SIGNAL (doubleClicked (const QModelIndex &)),
+  connect (_file_tree_view, SIGNAL (activated (const QModelIndex &)),
            this, SLOT (item_double_clicked (const QModelIndex &)));
 
   // add context menu to tree_view
@@ -473,7 +496,7 @@
         }
 
       // construct the context menu depending on item
-      menu.addAction (QIcon (":/actions/icons/fileopen.png"), tr ("Open"),
+      menu.addAction (resource_manager::icon ("document-open"), tr ("Open"),
                       this, SLOT (contextmenu_open (bool)));
 
       menu.addAction (tr ("Open in Default Application"),
@@ -483,7 +506,7 @@
                       this, SLOT (contextmenu_copy_selection (bool)));
 
       if (info.isFile () && info.suffix () == "m")
-        menu.addAction (QIcon (":/actions/icons/artsbuilderexecute.png"),
+        menu.addAction (resource_manager::icon ("media-playback-start"),
                         tr ("Run"), this, SLOT (contextmenu_run (bool)));
 
       if (info.isFile ())
@@ -492,28 +515,28 @@
       if (info.isDir ())
         {
           menu.addSeparator ();
-          menu.addAction (QIcon (":/actions/icons/ok.png"),
+          menu.addAction (resource_manager::icon ("go-first"),
                           tr ("Set Current Directory"),
                           this, SLOT (contextmenu_setcurrentdir (bool)));
           menu.addSeparator ();
-          menu.addAction (QIcon (":/actions/icons/findf.png"),
+          menu.addAction (resource_manager::icon ("edit-find"),
                           tr ("Find Files..."), this,
                           SLOT (contextmenu_findfiles (bool)));
         }
 
       menu.addSeparator ();
-      menu.addAction (tr ("Rename"), this, SLOT (contextmenu_rename (bool)));
-      menu.addAction (QIcon (":/actions/icons/editdelete.png"), tr ("Delete"),
-                      this, SLOT (contextmenu_delete (bool)));
+      menu.addAction (tr ("Rename..."), this, SLOT (contextmenu_rename (bool)));
+      menu.addAction (resource_manager::icon ("edit-delete"),
+                      tr ("Delete..."), this, SLOT (contextmenu_delete (bool)));
 
       if (info.isDir ())
         {
           menu.addSeparator ();
-          menu.addAction (QIcon (":/actions/icons/filenew.png"),
-                          tr ("New File"),
+          menu.addAction (resource_manager::icon ("document-new"),
+                          tr ("New File..."),
                           this, SLOT (contextmenu_newfile (bool)));
-          menu.addAction (QIcon (":/actions/icons/folder_new.png"),
-                          tr ("New Directory"),
+          menu.addAction (resource_manager::icon ("folder-new"),
+                          tr ("New Directory..."),
                           this, SLOT (contextmenu_newdir (bool)));
         }
 
@@ -530,7 +553,7 @@
   QItemSelectionModel *m = _file_tree_view->selectionModel ();
   QModelIndexList rows = m->selectedRows ();
 
-  for ( QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++)
+  for (QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++)
     {
       QFileInfo file = _file_system_model->fileInfo (*it);
       if (file.exists ())
@@ -640,7 +663,7 @@
   QItemSelectionModel *m = _file_tree_view->selectionModel ();
   QModelIndexList rows = m->selectedRows ();
 
-  for ( QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++)
+  for (QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++)
     {
       QModelIndex index = *it;
 
@@ -753,9 +776,15 @@
 {
   // Qsettings pointer is checked before emitting.
 
-  int icon_size = settings->value ("toolbar_icon_size",16).toInt ();
-  if (icon_size > 16)
-    icon_size = icon_size - 4;
+  int icon_size_settings = settings->value ("toolbar_icon_size",0).toInt ();
+  QStyle *st = style ();
+  int icon_size = st->pixelMetric (QStyle::PM_ToolBarIconSize);
+
+  if (icon_size_settings == 1)
+    icon_size = st->pixelMetric (QStyle::PM_LargeIconSize);
+  else if (icon_size_settings == -1)
+    icon_size = st->pixelMetric (QStyle::PM_SmallIconSize);
+
   _navigation_tool_bar->setIconSize (QSize (icon_size,icon_size));
 
   // file names are always shown, other columns can be hidden by settings
@@ -794,7 +823,8 @@
 void
 files_dock_widget::popdownmenu_home (bool)
 {
-  QString dir = qgetenv ("HOME");
+  QString dir = QString::fromStdString (octave_env::get_home_directory ());
+
   if (dir.isEmpty ())
     dir = QDir::homePath ();
 
@@ -836,7 +866,7 @@
 
   QString name = QInputDialog::getText (this, tr ("Create File"),
        tr ("Create file in\n","String ends with \\n!") + parent_dir,
-       QLineEdit::Normal, "New File.txt", &ok);
+       QLineEdit::Normal, tr ("New File.txt"), &ok);
   if (ok && name.length () > 0)
     {
       name = parent_dir + "/" + name;
@@ -854,7 +884,7 @@
 
   QString name = QInputDialog::getText (this, tr ("Create Directory"),
                 tr ("Create folder in\n","String ends with \\n!") + parent_dir,
-                QLineEdit::Normal, "New Directory", &ok);
+                QLineEdit::Normal, tr ("New Directory"), &ok);
   if (ok && name.length () > 0)
     {
       QDir dir (parent_dir);
@@ -903,5 +933,20 @@
     }
 }
 
+void
+files_dock_widget::selectAll ()
+{
+  if (_file_tree_view->hasFocus ())
+    _file_tree_view->selectAll ();
+  if (_current_directory->hasFocus ())
+    {
+      QLineEdit * edit = _current_directory->lineEdit ();
+      if (edit)
+        {
+          edit->selectAll ();
+        }
+    }
+}
 
 
+
--- a/libgui/src/files-dock-widget.h
+++ b/libgui/src/files-dock-widget.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -40,8 +40,8 @@
 #include "octave-dock-widget.h"
 
 /**
-   \class files_dock_widget
-   \brief Dock widget to display files in the current directory.
+   @class files_dock_widget
+   @brief Dock widget to display files in the current directory.
 */
 class files_dock_widget : public octave_dock_widget
 {
@@ -113,6 +113,7 @@
   /* from octave_doc_widget */
   void copyClipboard ();
   void pasteClipboard ();
+  void selectAll ();
 
 signals:
 
--- a/libgui/src/find-files-dialog.cc
+++ b/libgui/src/find-files-dialog.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John Donoghue
+Copyright (C) 2013-2015 John Donoghue
 
 This file is part of Octave.
 
@@ -50,7 +50,7 @@
   : QDialog (p)
 {
   setWindowTitle (tr ("Find Files"));
-  setWindowIcon (QIcon (":/actions/icons/search.png"));
+  setWindowIcon (resource_manager::icon ("edit-find"));
 
   _dir_iterator = 0;
 
@@ -61,7 +61,7 @@
 
   QLabel * file_name_label = new QLabel (tr ("Named:"));
   _file_name_edit = new QLineEdit;
-  _file_name_edit->setToolTip (tr ("Enter the filename expression"));
+  _file_name_edit->setToolTip (tr ("Enter the filename search expression"));
 
   _file_name_edit->setText (settings->value ("findfiles/file_name",
                                              "*").toString ());
@@ -79,13 +79,13 @@
   _browse_button->setToolTip (tr ("Browse for start directory"));
   connect (_browse_button, SIGNAL (clicked ()), this, SLOT (browse_folders ()));
 
-  _recurse_dirs_check = new QCheckBox (tr ("Recurse directories"));
+  _recurse_dirs_check = new QCheckBox (tr ("Search subdirectories"));
   _recurse_dirs_check->setChecked (settings->value ("findfiles/recurse_dirs",
                                                     false).toBool ());
   _recurse_dirs_check->setToolTip (
     tr ("Search recursively through directories for matching files"));
 
-  _include_dirs_check = new QCheckBox (tr ("Include directories"));
+  _include_dirs_check = new QCheckBox (tr ("Include directory names"));
   _include_dirs_check->setChecked (settings->value ("findfiles/include_dirs",
                                                     false).toBool ());
   _include_dirs_check->setToolTip (
@@ -97,7 +97,7 @@
   _name_case_check->setToolTip (tr ("Set matching name is case insensitive"));
 
   _contains_text_check = new QCheckBox (tr ("Contains text:"));
-  _contains_text_check->setToolTip (tr ("Search must match text"));
+  _contains_text_check->setToolTip (tr ("Enter the file content search expression"));
   _contains_text_check->setChecked (settings->value ("findfiles/check_text",
                                                       false).toBool ());
 
@@ -304,7 +304,7 @@
   _contains_text_edit->setEnabled (true);
 
   find_files_model *m = static_cast<find_files_model *> (_file_list->model ());
-  QString res_str = QString ("%1 matches").arg (m->rowCount ());
+  QString res_str = QString (tr("%1 match(es)")).arg (m->rowCount ());
 
   _status_bar->showMessage (res_str);
 }
--- a/libgui/src/find-files-dialog.h
+++ b/libgui/src/find-files-dialog.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John Donoghue
+Copyright (C) 2013-2015 John Donoghue
 
 This file is part of Octave.
 
--- a/libgui/src/find-files-model.cc
+++ b/libgui/src/find-files-model.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John Donoghue
+Copyright (C) 2013-2015 John Donoghue
 
 This file is part of Octave.
 
@@ -101,7 +101,7 @@
 void
 find_files_model::addFile (const QFileInfo &info)
 {
-  beginInsertRows (QModelIndex (), _files.size (), _files.size () );
+  beginInsertRows (QModelIndex (), _files.size (), _files.size ());
 
   QList<QFileInfo>::Iterator it;
   find_file_less_than less_than (_sortorder);
--- a/libgui/src/find-files-model.h
+++ b/libgui/src/find-files-model.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John Donoghue
+Copyright (C) 2013-2015 John Donoghue
 
 This file is part of Octave.
 
--- a/libgui/src/history-dock-widget.cc
+++ b/libgui/src/history-dock-widget.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -29,8 +29,12 @@
 #include <QVBoxLayout>
 #include <QMenu>
 #include <QScrollBar>
+#include <QDesktopWidget>
+#include <QCompleter>
+#include <QLabel>
 
 #include "error.h"
+#include "resource-manager.h"
 
 #include "cmd-hist.h"
 
@@ -71,37 +75,116 @@
            SIGNAL (customContextMenuRequested (const QPoint &)), this,
            SLOT (ctxMenu (const QPoint &)));
 
-  _filter_line_edit = new QLineEdit (this);
-  _filter_line_edit->setStatusTip (
-    tr ("Enter text to filter the command history."));
-  QVBoxLayout *vbox_layout = new QVBoxLayout ();
+  _filter = new QComboBox (this);
+  _filter->setToolTip (tr ("Enter text to filter the command history"));
+  _filter->setEditable (true);
+  _filter->setMaxCount (MaxFilterHistory);
+  _filter->setInsertPolicy (QComboBox::NoInsert);
+  _filter->setSizeAdjustPolicy (
+            QComboBox::AdjustToMinimumContentsLengthWithIcon);
+  QSizePolicy sizePol (QSizePolicy::Expanding, QSizePolicy::Preferred);
+  _filter->setSizePolicy (sizePol);
+  _filter->completer ()->setCaseSensitivity (Qt::CaseSensitive);
+
+  QLabel *filter_label = new QLabel (tr ("Filter"));
+
+  _filter_checkbox = new QCheckBox ();
 
   setWindowIcon (QIcon (":/actions/icons/logo.png"));
   set_title (tr ("Command History"));
   setWidget (new QWidget ());
 
+  QVBoxLayout *vbox_layout = new QVBoxLayout ();
+  QHBoxLayout *hbox_layout = new QHBoxLayout ();
+  hbox_layout->addWidget (filter_label);
+  hbox_layout->addWidget (_filter_checkbox);
+  hbox_layout->addWidget (_filter);
+  vbox_layout->addLayout (hbox_layout);
   vbox_layout->addWidget (_history_list_view);
-  vbox_layout->addWidget (_filter_line_edit);
   vbox_layout->setMargin (2);
 
   widget ()->setLayout (vbox_layout);
 
-  connect (_filter_line_edit, SIGNAL (textEdited (QString)),
-           &_sort_filter_proxy_model, SLOT (setFilterWildcard (QString)));
+  setFocusProxy (_filter->lineEdit ());
+
+  // Init state of the filter
+  QSettings *settings = resource_manager::get_settings ();
+  _filter->addItems (settings->value ("history_dock_widget/mru_list").toStringList ());
+
+  bool filter_state =
+            settings->value ("history_dock_widget/filter_active", false).toBool ();
+  _filter_checkbox->setChecked (filter_state);
+  filter_activate (filter_state);
+
+  // Connect signals and slots
+  connect (_filter, SIGNAL (editTextChanged (const QString&)),
+           &_sort_filter_proxy_model, SLOT (setFilterWildcard (const QString&)));
+  connect (_filter_checkbox, SIGNAL (toggled (bool)),
+           this, SLOT (filter_activate (bool)));
+  connect (_filter->lineEdit (), SIGNAL (editingFinished ()),
+           this, SLOT (update_filter_history ()));
 
   connect (_history_list_view, SIGNAL (doubleClicked (QModelIndex)),
            this, SLOT (handle_double_click (QModelIndex)));
 
-  setFocusProxy (_filter_line_edit);
+  // shrink max. displayed entry size to desktop width
+  QSize screen = QDesktopWidget ().screenGeometry ().size ();
+  int w = screen.width ();
+  QFontMetrics fm = _history_list_view->fontMetrics ();
+  int h = fm.height ();
+  _history_list_view->setGridSize (QSize (w,h));
+  _history_list_view->setTextElideMode (Qt::ElideRight);
+}
+
+history_dock_widget::~history_dock_widget ()
+{
+  QSettings *settings = resource_manager::get_settings ();
+
+  settings->setValue ("history_dock_widget/filter_active",
+                      _filter_checkbox->isChecked ());
+
+  QStringList mru;
+  for (int i = 0; i < _filter->count (); i++)
+    mru.append (_filter->itemText (i));
+  settings->setValue ("history_dock_widget/mru_list", mru);
+
+  settings->sync ();
+}
+
+void
+history_dock_widget::filter_activate (bool state)
+{
+  _filter->setEnabled (state);
+  _sort_filter_proxy_model.setDynamicSortFilter (state);
+
+  if (state)
+    _sort_filter_proxy_model.setFilterWildcard (_filter->currentText ());
+  else
+    _sort_filter_proxy_model.setFilterWildcard (QString ());
+}
+
+void
+history_dock_widget::update_filter_history ()
+{
+  QString text = _filter->currentText ();   // get current text
+  int index = _filter->findText (text);     // and its actual index
+
+  if (index > -1)
+    _filter->removeItem (index);    // remove if already existing
+
+  _filter->insertItem (0, text);    // (re)insert at beginning
+  _filter->setCurrentIndex (0);
 }
 
 void history_dock_widget::ctxMenu (const QPoint &xpos)
 {
   QMenu menu (this);
-  menu.addAction (tr ("Copy"), this, SLOT (handle_contextmenu_copy (bool)));
+  menu.addAction (resource_manager::icon ("edit-copy"),
+                  tr ("Copy"), this, SLOT (handle_contextmenu_copy (bool)));
   menu.addAction (tr ("Evaluate"), this,
                   SLOT (handle_contextmenu_evaluate (bool)));
-  menu.addAction (tr ("Create script"), this,
+  menu.addAction (resource_manager::icon ("document-new"),
+                  tr ("Create script"), this,
                   SLOT (handle_contextmenu_create_script (bool)));
   menu.exec (_history_list_view->mapToGlobal (xpos));
 }
@@ -203,22 +286,35 @@
 {
   if (_history_list_view->hasFocus ())
     handle_contextmenu_copy (true);
-  if (_filter_line_edit->hasFocus () && _filter_line_edit->hasSelectedText ())
+  if (_filter->lineEdit ()->hasFocus ()
+      && _filter->lineEdit ()->hasSelectedText ())
     {
       QClipboard *clipboard = QApplication::clipboard ();
-      clipboard->setText ( _filter_line_edit->selectedText ());
+      clipboard->setText ( _filter->lineEdit ()->selectedText ());
     }
 }
 
 void
 history_dock_widget::pasteClipboard ()
 {
-  if (_filter_line_edit->hasFocus ())
+  if (_filter->lineEdit ()->hasFocus ())
     {
       QClipboard *clipboard = QApplication::clipboard ();
       QString str =  clipboard->text ();
       if (str.length () > 0)
-        _filter_line_edit->insert (str);
+        _filter->lineEdit ()->insert (str);
     }
 }
 
+void
+history_dock_widget::selectAll ()
+{
+  if (_filter->lineEdit ()->hasFocus ())
+    {
+      _filter->lineEdit ()->selectAll ();
+    }
+  if (_history_list_view->hasFocus ())
+    {
+      _history_list_view->selectAll ();
+    }
+}
--- a/libgui/src/history-dock-widget.h
+++ b/libgui/src/history-dock-widget.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -27,6 +27,9 @@
 #include <QListView>
 #include <QSortFilterProxyModel>
 #include <QStringListModel>
+#include <QComboBox>
+#include <QCheckBox>
+
 #include "octave-dock-widget.h"
 
 class history_dock_widget : public octave_dock_widget
@@ -36,6 +39,7 @@
 public:
 
   history_dock_widget (QWidget *parent = 0);
+  ~history_dock_widget ();
 
 public slots:
 
@@ -56,6 +60,9 @@
 
 private slots:
 
+  void update_filter_history ();
+  void filter_activate (bool enable);
+
   void handle_double_click (QModelIndex modelIndex);
   void handle_contextmenu_copy (bool flag);
   void handle_contextmenu_evaluate (bool flag);
@@ -64,16 +71,20 @@
 
   void copyClipboard ();
   void pasteClipboard ();
+  void selectAll ();
 
 private:
 
   void construct ();
   QListView *_history_list_view;
-  QLineEdit *_filter_line_edit;
   QSortFilterProxyModel _sort_filter_proxy_model;
 
   /** Stores the current history_model. */
   QStringListModel *_history_model;
+
+  QCheckBox *_filter_checkbox;
+  QComboBox *_filter;
+  enum { MaxFilterHistory = 10 };
 };
 
 #endif // HISTORYDOCKWIDGET_H
new file mode 100644
index 0000000000000000000000000000000000000000..0d7d014c69f9c521c91048244249e6276c18070b
GIT binary patch
literal 15732
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%0A7!ag>$DcZ+1NwF7<Ho
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/applications-system.svg
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg53383"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/categories"
+   sodipodi:docname="applications-system.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective31" />
+    <linearGradient
+       id="linearGradient3264">
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="0"
+         id="stop3266" />
+      <stop
+         id="stop3276"
+         offset="0.25"
+         style="stop-color:#f8f8f8;stop-opacity:1;" />
+      <stop
+         id="stop3272"
+         offset="0.5"
+         style="stop-color:#e2e2e2;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b0b0b0;stop-opacity:1;"
+         offset="0.75"
+         id="stop3274" />
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="1"
+         id="stop3268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3264"
+       id="linearGradient3281"
+       gradientUnits="userSpaceOnUse"
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)" />
+    <linearGradient
+       id="linearGradient2300">
+      <stop
+         id="stop2302"
+         offset="0.0000000"
+         style="stop-color:#000000;stop-opacity:0.32673267;" />
+      <stop
+         id="stop2304"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="aigrd1"
+       gradientUnits="userSpaceOnUse"
+       x1="99.7773"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311">
+      <stop
+         offset="0"
+         style="stop-color:#184375"
+         id="stop53300" />
+      <stop
+         offset="1"
+         style="stop-color:#C8BDDC"
+         id="stop53302" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd1"
+       id="linearGradient53551"
+       gradientUnits="userSpaceOnUse"
+       x1="99.7773"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311"
+       gradientTransform="matrix(0.200685,0.000000,0.000000,0.200685,-0.585758,-1.050787)" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       r="11.689870"
+       fy="72.568001"
+       fx="14.287618"
+       cy="68.872971"
+       cx="14.287618"
+       gradientTransform="matrix(1.399258,-2.234445e-7,8.196178e-8,0.513264,4.365074,4.839285)"
+       id="radialGradient2308"
+       xlink:href="#linearGradient2300"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3264"
+       id="linearGradient3760"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)"
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd1"
+       id="linearGradient3773"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.200685,0,0,0.200685,-54.33576,-1.050787)"
+       x1="99.7773"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:showpageshadow="false"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.11764706"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568542"
+     inkscape:cx="43.652227"
+     inkscape:cy="21.164787"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="872"
+     inkscape:window-height="697"
+     inkscape:window-x="562"
+     inkscape:window-y="151" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>System Applications</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz/</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>system</rdf:li>
+            <rdf:li>applications</rdf:li>
+            <rdf:li>group</rdf:li>
+            <rdf:li>category</rdf:li>
+            <rdf:li>admin</rdf:li>
+            <rdf:li>root</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="shadow"
+     id="layer2"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(1.186380,0.000000,0.000000,1.186380,-4.539687,-7.794678)"
+       d="M 44.285715 38.714287 A 19.928572 9.8372450 0 1 1  4.4285717,38.714287 A 19.928572 9.8372450 0 1 1  44.285715 38.714287 z"
+       sodipodi:ry="9.8372450"
+       sodipodi:rx="19.928572"
+       sodipodi:cy="38.714287"
+       sodipodi:cx="24.357143"
+       id="path1538"
+       style="color:#000000;fill:url(#radialGradient2308);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.50000042;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       style="opacity:1;color:#000000;fill:url(#linearGradient3773);fill-opacity:1;fill-rule:nonzero;stroke:#3f4561;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 22.699525,0.94746963 C 22.22635,0.97984519 21.766437,1.0531317 21.301673,1.1063165 L 21.269903,1.1063165 L 20.157975,7.1742671 C 18.345621,7.5870046 16.640562,8.2874574 15.106644,9.2392765 L 10.118853,5.6493371 C 8.770521,6.6961412 7.543552,7.9170049 6.465374,9.2392765 L 9.928236,14.290607 C 8.876814,15.89739 8.086153,17.732094 7.640841,19.659632 C 7.640765,19.668743 7.640779,19.689813 7.640841,19.691401 L 1.60466,20.644482 C 1.494303,21.545851 1.445813,22.477386 1.445813,23.408418 C 1.445813,24.170171 1.466846,24.921747 1.541121,25.664043 L 7.577303,26.744202 C 8.0066,28.840363 8.822112,30.797987 9.960006,32.526228 L 6.370066,37.450482 C 7.398201,38.726866 8.585171,39.888962 9.864698,40.913343 L 14.947798,37.418712 C 16.724273,38.551956 18.707343,39.346604 20.856901,39.737877 L 21.809983,45.742288 C 22.487237,45.803935 23.181758,45.805827 23.874992,45.805827 C 24.853677,45.805826 25.788512,45.768738 26.734236,45.64698 L 27.877933,39.515491 C 29.91886,39.007587 31.836112,38.126493 33.501113,36.942172 L 38.393596,40.500342 C 39.662366,39.420897 40.822583,38.180154 41.824689,36.846863 L 38.266519,31.700225 C 39.230125,30.036028 39.897817,28.199859 40.23622,26.235892 L 46.240632,25.282811 C 46.29329,24.656221 46.30417,24.048546 46.30417,23.408418 C 46.30417,22.296018 46.174875,21.205317 46.018246,20.136172 L 39.918526,19.024244 C 39.440518,17.259164 38.656214,15.612364 37.662901,14.13176 L 41.25284,9.2075071 C 40.140075,7.8466524 38.870718,6.5895264 37.472284,5.5222596 L 32.293876,9.0804296 C 30.805549,8.200202 29.203897,7.5248159 27.464931,7.1424978 L 26.51185,1.1063165 C 25.644369,1.0042729 24.769749,0.94746963 23.874992,0.94746963 C 23.633166,0.94746964 23.384286,0.93986063 23.144296,0.94746963 C 23.027301,0.95117908 22.911525,0.94066346 22.794833,0.94746963 C 22.763228,0.94931296 22.73107,0.94531125 22.699525,0.94746963 z M 23.525529,16.387386 C 23.641592,16.381497 23.757473,16.387386 23.874992,16.387386 C 27.635598,16.387386 30.705408,19.457196 30.705408,23.217802 C 30.705409,26.978407 27.635597,30.016448 23.874992,30.016448 C 20.114387,30.016449 17.076346,26.978407 17.076346,23.217802 C 17.076347,19.574716 19.927558,16.569963 23.525529,16.387386 z "
+       id="path3243" />
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       sodipodi:type="arc"
+       style="opacity:0.64772728;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.62180054;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path3283"
+       sodipodi:cx="23.511301"
+       sodipodi:cy="23.781593"
+       sodipodi:rx="12.727922"
+       sodipodi:ry="12.727922"
+       d="M 36.239223 23.781593 A 12.727922 12.727922 0 1 1  10.783379,23.781593 A 12.727922 12.727922 0 1 1  36.239223 23.781593 z"
+       transform="matrix(0.616598,0,0,0.616598,9.38202,8.539674)" />
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       id="path3285"
+       d="M 21.995808,2.1484671 L 21.103024,8.0235243 C 19.404254,8.4103946 16.279442,9.5936035 14.841657,10.485771 L 10.091975,6.9406268 C 8.828145,7.9218257 8.741474,7.9883656 7.730867,9.2277688 L 11.165063,14.320988 C 10.179537,15.827071 8.995796,18.510982 8.570778,20.42893 C 8.570778,20.42893 2.552988,21.443355 2.552988,21.443355 C 2.449547,22.288234 2.49926,24.096528 2.56888,24.792303 L 8.317097,25.82782 C 8.71949,27.79261 10.225324,30.955232 11.291904,32.575161 L 7.656902,37.377719 C 8.620601,38.57411 8.813474,38.683589 10.01281,39.64377 L 14.873441,36.082733 C 16.538581,37.144954 19.84373,38.437109 21.858571,38.80386 L 22.656299,44.604952 C 23.291109,44.662736 25.044829,44.824827 25.931283,44.710701 L 26.824066,38.671821 C 28.737084,38.195749 32.042539,36.838896 33.603191,35.728798 L 38.458624,39.236958 C 39.647878,38.225166 39.658533,38.072709 40.597835,36.822978 L 36.999815,31.708667 C 37.90303,30.148767 39.070902,27.098068 39.388097,25.257187 L 45.279046,24.279744 C 45.328399,23.692424 45.330802,22.054578 45.18399,21.052439 L 39.182092,20.016922 C 38.73404,18.362463 37.196418,15.381153 36.265359,13.993342 L 40.080075,9.1907857 C 39.037052,7.915218 38.64924,7.7402002 37.338448,6.7398212 L 32.313994,10.337839 C 30.918941,9.5127782 28.137095,8.2550417 26.507114,7.8966842 L 25.619528,2.1484671 C 24.806414,2.0528187 22.460488,2.0952921 21.995808,2.1484671 z "
+       style="opacity:0.34659089;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.99999923;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
+    <path
+       style="opacity:0.5;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 10.102903,6.2970655 C 8.7545689,7.3438694 8.1656464,7.9719226 7.0874684,9.2941942 L 10.489927,14.259153 C 9.4385072,15.857755 8.3316275,18.426114 8.1423859,19.987706 C 8.1423859,19.987706 2.0798859,21.0319 2.0798859,21.0319 C 2.0109129,21.595256 1.90625,22.884803 1.90625,22.884803 L 2.0830267,24.447303 C 2.5107567,24.535638 2.9231817,24.617818 3.3642767,24.666053 L 3.8642767,23.134803 C 4.2083177,23.163279 4.5439297,23.197303 4.8955267,23.197303 C 5.2467347,23.197303 5.6139847,23.163473 5.9580267,23.134803 L 6.4267767,24.666053 C 6.8680647,24.617818 7.3115487,24.535638 7.7392767,24.447303 L 7.7392767,22.884803 C 8.4250337,22.72518 9.0712777,22.497045 9.7080267,22.228553 L 10.645527,23.509803 C 11.047878,23.327709 11.421123,23.133984 11.801777,22.916053 L 11.301777,21.416053 C 11.89901,21.053803 12.463529,20.620706 12.989277,20.166053 L 14.270527,21.103553 C 14.596162,20.806973 14.91164,20.491691 15.208027,20.166053 L 14.270527,18.916053 C 14.725373,18.390305 15.127027,17.826171 15.489277,17.228553 L 16.989277,17.697303 C 17.207208,17.316456 17.432571,16.943209 17.614277,16.541053 L 16.333027,15.603553 C 16.601517,14.966804 16.798016,14.320561 16.958027,13.634803 L 18.551777,13.634803 C 18.640112,13.207076 18.691236,12.763591 18.739277,12.322303 L 17.239277,11.853553 C 17.268139,11.509705 17.301777,11.142456 17.301777,10.791053 C 17.301776,10.43965 17.267753,10.104039 17.239277,9.7598034 L 18.739277,9.2910534 C 18.69373,8.8711662 18.633686,8.4490548 18.551777,8.0410534 C 17.404349,8.4403544 15.999117,9.1941729 14.983265,9.8245243 L 10.102903,6.2970655 z "
+       id="path3767"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="cccccccccsccccccccccccccccccccsccccc" />
+    <path
+       style="opacity:0.5;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 37.236641,17.217754 C 36.85286,17.39913 36.490003,17.603509 36.123236,17.813295 L 36.692886,19.548136 C 35.995792,19.970436 35.338156,20.467825 34.725008,20.998151 L 33.249099,19.910639 C 32.869013,20.256538 32.507327,20.618223 32.161588,20.998151 L 33.249099,22.474059 C 32.718773,23.087371 32.221547,23.745002 31.799084,24.441937 L 31.255328,24.260685 C 31.207646,24.960968 31.018949,25.62217 30.737466,26.228563 L 30.841038,26.306242 C 30.527881,27.048922 30.27649,27.83664 30.090137,28.636624 L 28.614229,28.636624 C 28.477946,28.722076 28.343676,28.821684 28.199938,28.895555 C 28.121568,29.310822 28.065026,29.712881 28.018687,30.138426 L 29.77942,30.708074 C 29.746033,31.10935 29.727633,31.515269 29.727633,31.925052 C 29.727631,32.334993 29.746034,32.740753 29.77942,33.142029 L 28.018687,33.711677 C 28.074705,34.226432 28.148678,34.740347 28.251725,35.239372 L 30.090137,35.213479 C 30.218255,35.763466 30.393202,36.320918 30.582107,36.844746 C 31.327023,36.557466 32.05594,36.214561 32.731236,35.809021 C 32.319649,34.59298 32.083908,33.279913 32.083908,31.925052 C 32.083909,26.727119 35.376289,22.288397 39.981313,20.583861 L 38.893802,20.402608 C 38.671014,19.579946 38.382478,18.774017 38.013435,18.020441 C 38.002581,17.998277 37.99851,17.96486 37.987542,17.942761 L 37.935756,17.890975 L 37.236641,17.217754 z "
+       id="path3770"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+  </g>
+</svg>
deleted file mode 100644
index 908f07e6251f0cbc93b27306598dc55368754f7d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 547352555623c9c740f95c4e1224e7a8f01af2a9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 4b533ed0b9f4717a6cf3096ddfa6191f03ed4702..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3dde167dbaa609970883c562cb2d25342b1e8b33..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 814f916b5aab5d9474f3e857e982b123ac673b0c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 33573170bbd8e08397055c87d0e437def53346e9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..f643b1a5a881df357e8fcd1dc60f982c176f3f2d
GIT binary patch
literal 11853
zc$}45^<NZU)Sg|Ib?HSwR-{2fK)MkY6anc5k&s5Z8<vm~>6Y#e0a0=hq#LBWyF>cr
z`@Vm{d*{yF&u4zPbIvp8Ip;i|nNTGKDLia4Yybf8WTfAyJglhyP8jsz+9vw3_hEq=
z%1XTf?*BV7n+jq9fEti_Bd+F_y65d0NAV~5ph9S_`J=-S<nu?K9AycntPm?K$YXIt
z<#Qt!O#&~i-C8tj0-oN?ZjZ>x`M;-9le~J>*H-CAqF&_g4GbbiTCpZ^%D|te7RP;Q
z!j6u?#TQb+GjnwZ=JfsXkUm!h`HQmR^8KxYi_cdtcsRs~c>W)giiei;3N%26Wl9SO
zaDxC0WPdwQxPBSzFB<aThcO@y#L(I2=&sV>p$zkJQE|x^emMl#z#AZsBZ=~j{T(|d
zk_-ukQfm?J+s|*^;sRi5a3(HtQ)EHs5u9K3N@T(F!`3Yfz(-=D9Do~4pC>>U7!jED
zbl&yU2Mk1#uMD=QHxyzol7c@10#M@!vSM!$CLC()*DQ^;o3{V}&g6o_)C|JITV78*
z(@+v>NgY{-4Y6V*!jKpsiFP}fwINEuFBkvR1ZBj$=oY>bvB$WYb^!Yw&F!rfvBI_G
zR8J6e;x;_`2Onj?fhf(2>&a1n|Hfj|vEJt|{X5M#Ko(+f>^7SU#*kSYyd}R_uW-Bj
zyx{o3DSX>MG+Q85njUHw?aIuq0YpjDtH{HOnAEZ$i_NL;*pgpw^*;|UTfsf>wfai5
zvS4bp8zF*GLrmi<B+*sTLV?}n6$3wWny@1;z#|~IKyUJXh;!luBMVDQOEuO1CT0<K
z{Iktdnc!8u(#A4BDtQePcbn!3H0}2naek58@iv5)chO%Qt_>x{1;_cnz}Di!N$5s?
zd7E{5N<A|bdKyiKn6D#{J2|+rMA{N`zB-C*U1X1N_`o3CBla5h5r9g)eVc7|!!UrM
zs|J{xo5L(pGzJm9)n|{5R&}Z-J5zY9zd+<p623ftUf8((B92uH_*F~dWnxl3#Im(+
zyRK;yZ^G3@Dd@i{d|<Fh;EViGz<A)!%rW#Fc7OFXCMF|o(H*n$X}W&m$k^hd0sl*`
zSi4~$Ge4gJoQW?w=yY&+xXW97MF8q}B5;C5Q+U-SrBvm@w(5R@mWjC-A^+OpbYOcR
znD^f!CNu5={Ydpt>Gs#IWOjxXOm`O*iSbP-k{{tA*-3lb+uMPJQa_nCvjL=}q@=b0
zdHLBoe@XGpA{w3e!s(Vz;OeH4Df`@r>h&5PKQf7@+dH~jq}XCe>Mc^0c{3T;TnI0}
z*q|OipKSe`9eD^fAVQ#!(Avu-pdF<29{Vxu=S<DCJUz$Fi0tO&--^r*!*U%)Ecd$t
z5)yr1Q3N?F1S~%~mY$xjfH1-*O?@c<q@<+u@XD7QtuKi3ICY;Djpfi9ahHlnz!<D2
zQQJDUn3{U&6HnynGf&UNsVIZeIaavvEe2xmlp|7EUo)`>E2(1+b1@G57_n%-JACBy
z>Wui*Y5-@*Z=Rxck(9Ei)JumM0H<%%K6tJw?6UiFk@{yQU~XZ-+;7Yk+jzOKebDmJ
zgYOz|fN+^DnG@ry&JW}#`)hBxiLCQe<klXhJi}KJ+W<Z2^_qJ`AI(`Ry?AMvWM&m%
zsuZ{RFw>RKF%fR#`TLj8hCH8dHRxMddC`7EQ6EGz<!y%&F)A#BzXjkxQ9(gLN*o9)
zgYaMJOI5LqVyY#@`lvIjK!cw3{=%P^rbxI02`}DM`Ag%5daL+-+DFx)st!-NJG`7J
z;y9&6GQPazguX4h_SlGqOP`&=<kGP95_H$P#qOU{+@C5c5&a4|gbm(rvpj5#SaH`q
z0)c4g9Zxrh6+R$45B&jyfmA^izHey~%(V;Nn0YsK3h7=y)h2AKj={XV<{pb6$n>-W
zDK|8);88LWqr)6eEY^T;M@8fyfSWgp=r+z2rWav_72<!UPCD`vu|`tdaGrow^O4P~
zkKr#TJ`O{ncH7qron2Y4UG#!B7Tm0kSJ@f@T8%+1)b@vqtv2`k>R$Em0Os5uKYm27
z2q?oLFn<($FxHkz?9Q&J+;_HEjmrp{Lgj-nG|KVLN|&Rp^%aZTw?R(m4kWX?)3-2E
zN{M{qMQj^<FW!+hu7(TZ$M8$9HU_tem{%d<(kTyHssBZNEc&Sg%hUV-YG0A26ovwD
z#JBHE(OPy)kKOs0VJVT#i42PAa-JR@FQqsCHDde+igTRG#Nplr0o9#Ha=GnyA5AuG
ze`ftl?4Q!@T?V+x=PtPfl#t%=<8)S2PUvq04EIbC@tQTZRhmInfB}to90u+|_$L%`
zHlPMPDyJc6V$64n1P>I+`u;c&4v%<k+zN(~2miZ!$iIG79eGFpZUWTR2RraKJt+M?
z|6a0t@#IU|g$&~c31Dq){oD_k*%RX>4nOQ#YRf27``b_|^p`~=^W%<2!?O-2iXx0h
znNBY2YK;NI4=BeckA0K#e=>r=#~S=Z78B-AJvejHd2<6Q2znrE=Gn#T!eX$QKO>JL
z14R3+*McYz#Gr-v!rQ2#c|l7ex$gByWROTZ;q|Lmujm8@iR1^K0em*IT?M0CP#_Qv
zmVn*uA1<AJ-8y~EvEaD&-NgLgZ_@B)K_I1{_LnFBsTOO-ubk+D52Mbw$ti8)xDX}U
z03|x*!%y%x8@ray9q>WZRw8id%B;0VlI?~`wNiZpO<ZCCH$}UWCCeLebVv~v{X4Ul
zp?}8sOG;ef5@>-4?E`=K@4tWl+CP}I;XJ$82+C}1Yz$fvn3A~FPZi?59Wg)E59Lh5
zd0tkQbd1Ju;fXZmlHQ*(I^B2`ei83f!DmOGrh+ScwXN1=a5y4HJzw)^YkEccZ_6VE
zEM$0M!+xxqx_KOJ*U4MO-}b(V9aVjS`Qm$9AbmZ2y@Xc8Yr76y12;tXN+$@Q(bb=h
z>))SM*YONHF$asoR}&Hv#vT|w@Qqo39nfm>sNKaqmm4t7{VElCr)5w|2!Pktey(N(
zqZ8u*ASs{bm!)RJC5Jx}Vm4%LZw^WuNxe10r5kmnR(0gkj313I62;VwpyN;@km#pm
zGE#D)z>@T1g}FCD%u3NhX7%`Gb)<&s@zx!*C+jqh|2V$i-U7&;>Z#|i{m`}^ud`U6
z@83(Ss~1&QI~teXum2j+9xN4nUF>rAug?!d=gqr~_bmn1bJ)$ZQKI=w(z}zOSCoUC
z3o%?Qg3srZ56X<viQegw(Wp+XT}KsN5pC+<h>UerQm`ACvS)Eq^7n<rE=62xSqE?`
zssHIZ-^;Xjbbxn$JYKlLYadYoP-v|-c?t@Guxx2?x)}@_aNHBmBHOW&7x_7?9F)MW
zPe}~P8c}hiI@mN%A^hs|E$PDMrkzo#-lJAm?19=f=3^Wq=&ipk!6A&Toe=sIeALn1
z`-FGexnvQ3nwZj6?<QW26o-Wu)6&Bhu?5mx(#v0ec}r++1rfmiK#dxTV@7z~Is>RT
zTj9*ztLLw3YjsoUr}EK1Q)MV9DB8@f$_IlU4DoL@$UC`+85pS08T~F1%b0VV|7|xh
z(b_h6WHgq2D&h3W2sq-ZFV<@(BSIi-DY=2LX_pr@Sf49gX0a(pAN9B9gGd%Cpb(FM
zuF5P@moi0|lvh*FV(xRz+nj}@>>W_FN+JauB3{3qV)=XHaJo}Y5))lJq4x|f$%%kL
z;4ny~$-(?zkgop6c*W)u1-LSgo`y)o=~A1Gv#m@#72U0xk6(G#1oNqXrt|!56gYmq
zQ_56@^eVB%>Kg=bS==<H^~<svKf~?2v|4Y9FMr8YpfEM4<~S-3_wV>XnqFm*G2L*X
zn$7fhheA7a<I=x6t0OiH8_=ETO>KE*RK+&#-ro}+Wj0WwFL#9oxjGH9{7rEB`rAoX
zR;yb(QZOcQJ6|udHbWp}x})Tzr^b%_mgO#Fb*v3=ob-Cf8K;oLk{q~xhJi}GZ$-ph
zUj!sGgs?M<w=s%Y)aggRyFFV~d$D+i$&`2e;Pp;FrRxg@AcQH55NFtRfA-hAY^P>r
z38f|rRfV$*5iDzSrh@w0dRK+~D+|z<R@9d%g~dtqVHUFT3Cp<H7j2w6KX{~NyK;En
zRB+a3TR*HY*)=mByn<!>T%P{2s#Ii`X|#~r&;W~W6<DQqiPSM%-PdrTSw~WtzSST~
zFqRr7=?eV<MSXq7AM|jKypuCxMQdefNMFZ<mqk;ew1_h)-=d3L^n=!#@Ka6HQL|`3
z=ZUMJ6=n#WlAH7nLqqT4o;rB@q=(yiZd3p4aolksj+Ic}rUC<JltKVk!U-M|@3vBy
zm8Wn`G~vn=1mwIkF|(&ZA6utcFq%C<y67(IPfIXKf(O)>&ur>8xZ1|%TJ)AKsPoSn
z$eR9Wq8QuNBNStHeRphuIQV{o6jcKBi3|vhf?NuV^aCR2|B=10OkBO!&*I5uSwMPx
z@|>^6XTh!~!Yb6`_%@g<>eMyBuH8(YEg13!VfoW$Fg-FPd((uk<zrhA=b($|vlmYQ
z7)`s&-TL|IESRX<gxgFaRb*=ag^5CHm&})pvWrQ#Z(iGOo`8$a=jlTwq2Z7IC>mlL
zbn#9`XW!*T0Q|zzFg0T7(v!31)EcSuVK8c#$LV>jbWt(OTc9J;#d+!o?<E|0Mxr@s
zJsuuDORto&f!p)_!`M7h8K``)B9j^h0sK=sK96jDEB)TXYq^`4=j7~{KkDB4ED`U_
z<3OS4N0%j6YVkrvoe~O>1FcTRe@6o6sOi54YkW9y>~fed<u%^+9QOTNqQqkK@+4a|
zY+nuAyC}{YY=t6!g}o`H#TELvQ{<7da(U|LsOmm1MytW$Z2{<$rKO2>0!=U1c+2g1
z9=Q=7fDWboov6F+a3@W(?&%2{Xl^3K?Hlbs;kpT528dBm2_~LbcpP|tV-ps0p80%9
zxmt6tJyU`Plq^Vm-xC1V9Sm2B!(u}r-;V@N(<uvs3FwY8?y;JhD69+sLw7-m^;`{b
zNFt?B&3m|{VUw_Sf;fy&vqFz;b<QodkO{DRxn216t>*g;l9P=9NC04zxy5tZ+UjMB
zVdHtAyr2gq9mCfPy0*X<GfYW?q@#ve5o(ZC71oAh<r-ZNvve8YV~GA0Wl+Kamz)F_
zmJkO}mV;4rdu@M{=E^ZPk5Bg1pCMLhdS*|yccZUruvevs#OJnoeSJOK!q4zQRr?#<
zQ?)ux<KM*feKX^h+}rM{8%6b=xN^k{Jl%GJr%i*HW>xJHNa(RS@Nmfxqv%3x2_~ev
zk}fFIs3Wh=Xe&jEy7$sA$I3_yTJAxzwF@#&OUtZE;<WzCiMuIu^%Mg$ic<;-q8=MF
z&X5iJuCgvLu=7Y@VZ&|oC&prV!~SE4IJF-VP$k0B9;*4Qp>20{N)B9I<8aTM%=DUz
zQBR&XqcD;ay=3?wj{@eu=$!1xF-}<#s>-^;q$T68!nW&sk9C+vIUO`{lOyx@mT-6I
z#hL4wB$vmS8=BSh3FgVcjN$6+Q&mRw1a*J7H`*r)5oBneNx=q}T5Wq@PI9QejwQD=
z_g}HB%TJ<_p?b~-q;!X|E@F==GqHwrM+ovU5*ScLcmmM3Bpmt3m^Q8N+bl_(*DL3S
zsvA1;6|&SviERcn{F7=Oc3knlQNPB*?Z|0W3#Qk2y}ccsbzOOx!j_q2(+9qGPyks<
z(%;oIO=#^y<Ed<H`1FX4hTgtK6T4n??;Kuoim^|wFisW3-bu8xZt){*rCZWZurmEQ
zNdggP;d=fN2~+%r-6T4Mu();JqCORPi!iozamuqfo}z*rjJYELrw({=N%cv<lvVWv
zL^`J3cIHPJ)7|t>{+^RYY8aRZ;)kii{0tB;IT%E2c7>Gn+>(n{JUM(u-Sg#HD#IFP
z=!ZA0Nj8)eBZ_!ib#kC;iZ>+W!&y5|QALHt)~zI#_xOKnxsTtE_cAZL{)xJj#$I%w
z9$L1iC&r|xLY#)p{){XvmiI3w+M&SqH+W^I>;YcE2bS%kCDpCJ4`7&Xl7@>b(tnVn
z{Of|j7ptp~uC2l3ku<?ZE|0?zmU{Y4ssM_DDm{W_g48gj5C~$WVq^?htMO*kJnh%`
z0)43>8AB`X&Jdx|NaS1QE0d?=i(<oP>&W?`sJ}h`Mt|mn!GCMt1ByjWi=!z=80aMC
z72_ZavQozmgn>eW6Ib8!rodI%>J|PI4nIz)d5XPlBo!J7$`25f1B~jKZz&gm7ihH=
z7>R)pOpT)$JjB_wN5@oQg`THqdCRvm&;Kqh&tP?*iS}L({3?ZI<uwg%+oW-!%7i5t
z;30t3*VoTeF`%CgGK5ckl#7T;mCES9a#=g>Lo=PvD{h~7VM~I7f{==7{yw{inzmr^
zhK3UgaaoKcq}>HnM2ed;-;a|BH(w)@6^8>;UHz-pk5Ak$UYxiVXRQ&_WjuZBATvg}
zPLsXFZw5GVYmCe<WK0~ev$3)DWGX51psW<Wn8vLyPliIwHAzEQUsI7oREa&W_zjwI
zB6>MHV+;y%g>$D9oJ}K6Ey%QltaIg{(hPgN0dbtjiLV}ktAfUSEArGF1$+i%2q%t|
z9Wt&0=E@q7s(9wN%*?1Y;HAC~PDInilL*Qw{0VB}N4XW0;)7k)h1M;P$-y0uxpVLr
zZs$E!v!|>UcBiUy5(uK+<vqZGB$m7uTcarP6m(oCkS)l15L?!E@Kh%Mz&7gE%&Kh-
zVsQxQO^g+kD5)=>SZ+eR^z616n+ZGVSO1sV`3}?X!KK=N?%q&rFBmo!XfB5145d;5
z)nCj}=oJqCtY6NeJuH@$wii^<{q+SmjPD}pM$dW3rYHP}Af9DLBzdhXx3_t=O=k%_
zzIQjxb^@ir5;RmBYqLd&^gPv;Cte#6V3enF>0{K=N3GGEH2k>UWCyMxN1KI0U`0?u
z!Dz?)<*(cY0W*A#RWFQy%kk)k&hZ$>X|o<00mR4iYSkNJobS6otun9J8AypkO6}O9
zbrq3!>>vdCL<Ay^%C|Uf_P!>2_UzfCe7R(Y6vX+|@J|eCa(vbPH(Ye|GJVWTV^x7O
z-`#)VQl+NSoiwGprJL>3nil(Fcd&A3HKW#tVEAlN8#qaQ1;rpZf;uzKA5IO2SGpa&
zCl@=%kD!>_;ls+zoB$bffiCDHtz=|+hKUx1g@qaS<{DfP9Y1PTim^K8$_tBAxCaC2
z%N!X20c9udLHfkg4XzW!zQ_ev20CMkymP8srza_PN$_kiDV@bAWriPRBZW2B$A1HQ
zO9H%rDTDGKDi2I~c$SL@hqS_vxNG4ms^4g+rPyfT_qoPk7>#lD)c1#~!u;h48`(tV
z;ZF=?f{Eu*2@%l8$-Yo~Kd_a%5G#e9`mBIn-|=6rSN0ER<)HQe{lB+Zx_7AH%O6IC
zlc7kABtn7W($e1}YZIA`T(&y&nf@Qw`-~Qvk8&z(@F8x?fZt1*nAC3L{My>uuQMN7
z4b1`G$Dx(d^uI%xraemp`PClx-Fgp5UvWa$J*Q88C<+YJX1$I;u$~Pr4ns{152Jm8
z1uJjB4VKar01AvoXqcL&lf$drjy}oRCMVwS0{Xg?GhV$Zq?Dgh<3glk-Z<+{^hb*;
zB&=OMgz&%pLYI7=eL%Wk^hdeo^Q|Q3bPDpCokNp#t0V5XI|+C9f$Txsh!tG3p$fJR
zxenpy3rhr(WLZdp)+GXjJt$x+{3)*4n6$=Iqhihkq!UkFUq^QDgaq~~!Q~^2t+f);
z=F=6)>Wlv42!g=2r4f_f1bIsf3&Db{Wy4c85=%ZDHn!SF&D=f!$5v_X!p8dp-hqVz
zUeGzIk(}9($&=Y|v%V?r!^p?)Q&603Jgd3-n3*U#GNyj8oTQ`)UP9SV&|18+yJCl<
zhrH}cE0x#z_^XRR2@yt_$EEZze>HV=-m@^4a)BL5`W1YX^~?|DcSZO>^7J&3hEILn
z1pYCMgyim<P=xpu4yg5d#sUoMoa)=~!Vr(Btf~FimPMF^2@5X^jxuVt02d~+B01=s
z<m6Pr`QiyCADUN%YHD5{@nWq#pK1_m*c!YSsk1JeEyALWhG9X#ygTD%C1T$Q+p^yz
zKBzG$0JZ(KMh%kzp;F#GjYR?|_{6-JJ5SiD=gyjfR3w$w_JSrx60R8~ThswuNaBy_
zYLsA75;w*Zn8Ra&RdR`>_n;x%4LBK-syOWRN%&{2#?vR#emC9dn8GschE=rfM1_Z0
z)}YGwm<fGf@9FKoB~o+RbFzO@h?4LjU?m1c4GZeZwjM=c)88S^m)kaSl>J-vk(hG+
zYrqp1a9KBP#1TYnbnzJP<`y(VTIm7C$1?z0IfD#-h{Je&Rn;{34KJnma<V^tnvZoL
zFR``Ry`5s5Xz^0y=yIfNL59DfRV{D1yW;#7m<=FDc{~{z$wC`V(sYE)K*-D@=7o<Z
zF&S6vN(qS@c$C_Nt^PD0*9BBKaESHT7A>*KoBbTUP$>%3eeH1{>W0^ZH-Wz(iPjJh
zSR3D{`?%$e?2LLdLl%8fz31rP!COa5RmESU?6BZA`p2PTvmQHTc+dE4MD~vFvw=nK
zjLYyBVcAe%Yu(fnr+;#(?c65)0~4eui^f$ML`|%Ae{N!gLup^I1La~N>ylg7i8&DA
zkL+7|wt5D4pbN%LXwuv*GRA!ZD-C7T;F_j2jSS?Z2*h}ATHdit;wp~4>Ut}wr(5lG
zuG6AZyI3X?OD&`FCSk4UV%Bl6uqiN`4R6I=l)0Dds^#CGSK%9xAmFcaE<V+d9Z0_7
zMbnQ%z`x~WgY~4$ma`?ZqYAMnV8+o8IGSTnaR~4P&N&|9lg@~uwnHd|-jbC?OLG${
z!8w%X5K6`6$r16I^O0fO8X2yVJKH4+H@n-tzTT0n4Q9l>-&yljikN49ShENeRGI_k
zHZ~Dovb)|W8`oqn*J=1TUDz~4jLqV{T)kYLDdfE79AjQYPBUa?5*Sd-ZSb8~x1gi7
z@FC40dQ%_Yku5k^KlyvU+;lA?IKFQ{@&ygKS>%hJRxVbZGs(Ur?=KZHu-?#yiuZ>H
z3t!$Cf(m4!Op<qYc6w(br?Rs_21m<(UUb@H1ICH$zR>k=@~I+NdDWwCb`b$0w)08T
z!W68>J-4(0`A-fRsn|H)r<39)oR|xTC0O$#4V>@MJRI3G`2kZCmyDJ{6h_2>bmqz4
z+zDQ*;*iywxe-a41{;f+gO=^;W)8OrUDwM98e-=Fm@+ZZcUHQ~UxT&W+CCH<cV(^o
z^OZYYWo6W@2E+VpKk89Ak=S6H{EdyOMj-`c5_dZ53DQxuXK%@96TgVP&n@SYd<X_(
z;+6lMD_ga_eUSBidfu#;AzF4`g)qC36q1*h*KC?Osngyr7%>V$etUKONW<rJh^DZq
z<EH>2B#^yD<bK(a7c*U`Tsl*qx=SdBRV;h6aHFqIjn`y=47c5o+>d7MhuESM>un7V
z`6$_mly}<26AVHK-C39SqZ#QyI}t|X4*-CYre78g|DXoICA40|hhZRhmxAlKWu`F!
z1Kfa$M#BjlxeWZQac(ZYY4W@3!WDc>$8=*Q2BUq24%Qh0QYx)-L5?H=L!-8(UojuS
z;d;7OhcG>#^OH@HqnM)``b3^5S9H<&FBHVksq(80-44U9STogTgCW!~wFHw*YwO7O
zm%{;%zUGZEd`@70wDhIgGVS?UGeB(v7bqutO?k9RI60&Jc&Ez`4hjreZwg`jHPh|a
zEm9?ia^DN3V_*Jye+3;W@*`jAzyB;gPo!%5?-3Q1f!jlDHgkuC{a+duhrb1=Zv&_r
z1MU7{qN6fZTkc;K8hV8(7ZxJTw?_Q;QWeHedR|Spe!q43;P;Pnp%-D>d{PnY-tJz5
z{(}JrXvwg^z<e`%H%0&*A&TphTpZ>j`CfyKZ;FfP^a62b3QD%OBu&Rv5&tkU!pvS$
z*@^z5h9w(wZS^?DlfFPGzHjn4JM3j|AqP<#^I821x;Y&!L2Ge5`$BWx!}8y!EC6ZH
zfm^7nt3=UT;2ruk+x01i<D{MG`meN>Dvsu;I3Yy8T>ozvf^~}zC5a$_f&!Ih9H|#U
zv<Rt!bDB%QfOyf(sO5MmOLg+>ydqiwk4Dk-DSxKH`8c7&#<!1yhknJybQ#yP8y+~`
z=pGLuNk$2n<)=?%Q6^7snl94Yb7k(0<DFZMpehmUR)Lyj;Dg)8Ns{C5vXpzU*QP4Q
zCmt>CzR!h^hHjX1K8rYq5g1{p%?mIFof6UdA-Q<{3>Zq%^YCzy94nun>T1Ais1`!`
z^{*GC3xaijPzGYqW!1(0maj9;W3v^a5LG7DW{BOI`fegSXx{f|fCvB<V`N`;E4};b
zK74;}8_BJG#|@x3o$fk)k<ZA$06bl)JB9Z=6(sAA6Yc0=GT>)g?wIq@kbscri?)VC
zp{`g^gL-YN({hXfBau5iw!0kySgp$ju>&RH{Iz}{$h*)o3Lg2k0gA!pMPYV7l~3~%
zP(+^bh>^_E&NpV)TFaCw*52)0nOGsw`^&*di?*#3C;(_x8U6ui-mGkI^K7MiisD4<
zU;xk4I=Txo_|9>_NHFM4dGqxAt65r7Tx@AC8u;X#m;@k;*^nv@t`l+*vRW6kr!2Ec
zR9&VZ1Hb@bpjNkG^BTd=T1+Ddxf$@0{>h)6ikm0iuNY^~(4cUtOym86+M%|{cPjDw
zPUjCrTqR*GVyC>prlw-5ezOsbf=iSX7hi#p_hSXnU%fA{ANM&!itc<;J+3T_rUZbO
z<ZoB6c5qw>l3Bj2#p`Umb?s+s`#jbXyVbrmlq|J8<H=#&-0fso;ys+;;rf`u8L~ol
zNSz8uxH;8Ob)MJhq11)l0RZp(zkdPV2&Dy)7UCYyc>Ig4vs=?yuyZ+~mjQR$V|?SY
z-kz<o7=7v;wBHB@fcH8&)qznTwG(K>&c=K{ZjV*ym>k724xcnEOv%;@$VjXfmr%<k
zFS8uIJkwvC9fw4eXZG66bk8~Wmb^~wbD8w2fKn^KrPEg-K>(C;F?@&TtKr3dnt+pe
z2BDV2jAze3naFsBtNnGQExaa$B6b#*(Y7VKjePlU1KTTO8x#OgY0&DQR9tKUz+PR<
zDt70}EL8Vo2jefT4*Ebp`S?bL(9&9tQ`a~=51|g<CUUFwpMb3P0UI)(pU<xGJRZgW
z*2j>q>oW6T$l(OoAm0LoT3RBW_c|He+}Q~xO@b_=i1kjlzIThc#dZCy559aFu`)eT
zrjyvNJ%R}WfWB}16&aifn5ZGgLGO&X_*d5Pe-zUsI#m_LUFDu9<||4W-+COXtLGH^
zR%94pYD+~zguH<gUz_+N$|6?*BL!Q^1R?(GYd+X)U!A{1AUAs0zL?7PVDgL8`)*H$
z-=F94$M5QNddQlug7|+Dg}w>WEdSu{(4WG)aq6Co0|g{t-(GpTP<7gW$}A06-<>`K
z$jF*4;u){6>`p@&qn!I_mswsYIqcQKUg}~CBqXl+p?8P`G)Xr==s}v(>C4n&#&y9e
zUr!Mq;cYYbTfx7B)Brtz^v`#ktiBMK_pYPpn2*{=<Fk*8@zw6>^J$LFj_uT(MN0=_
z2DHvUblG30Tc}ucIRGF?b#i=soCW5O4a8S8U%egxKo|gTT1RxoJ$aR;e!q89EF5Cm
zhurGtf1S?He&H?{scn}6EN_Fs?&-Wog}!E#OMM)ro$C!(S9)-*+q(}Jk%WZgq(DeW
z^iTh~A5;?eNY+7eLOld5k^TC#M)rPBSyU^>Q=<M8>l5K$Zb!@Z*C}1@p^%8Tf$%iW
zamT~OR++#k<l!GuDn;L$m9*2vR$qwGM~<L@M7`gKS+5Iq>hS%TRl|4avHaXmsQc6L
z*18A_J0o9Hk@tP}@Jp3ByuwYOTD-A#-4WneH>g~h4cUJ>GDwY18khe{$As)7csKnD
zYoPET1k=R{fAMfhH8ZZ2#Wxi`tNgy!-tzW&-J1714S1lMtgI|Qr%MqTe|;1gnlP1a
zm$c=dq%AdEy7zndP=)U;)v|S+H*Sn^FpOw!PT*=ZBl|wtEZi1b`zs6#<~E~!czaC0
zj^0An2Onvw#$x!X+p1AflScPmoTl+D&>ZFWy9#=nQZ0PH#TAs#+#+{5*g-cOxLg%`
zDciV}Iu9uF@$=kE5*#UMYirlk)}D>IaZ?Gj=;NP38+A?CTW+}O>+45KG|HBZwG%2G
zOu||9?^w=9WC;@#^s$LbyXW<A_hzxUxcrgo@s{tNVnL|K#wAijDMm`Q7cDKnD%K|?
z_{SxH{ej;no2gGRNE{-0%1kgMvfk&azJdi6FQ#5v%Fk0bxAa%}j!v#Zk6~y71+f)Q
zk(iEww1bas^vU;RAp%+&wX6HGFK_2<1(>^FG;d<)4@C$fR?PMF^)FHd9fNQh>m2j#
zZ4Ytxl@I3?MK6u*_Gf?n%~A@%K%L%R431~`-aY7OoU}6-O<@uz#@fj`&Cu*_%QOsF
zap#ayJIV{oKrW4(AF!0WldJPq!}n%F!-`Eg5<uqT0^e~Fy(ul#fFmUZ&Z{IahtUN5
zt-}sxM8+n1m~O9wk2l@-o89q1z3km5%ehs>$uH(?D(dR)d$kkw`#)DAhO<33b|Ftx
zF^DC0w~o7QeNLXq$K;O9{&IY-OpJLx9ElIBTey?GRrK9PA0FZ=eNqgOCBQe_e8~H|
zvsh2Q_?eTrX}hqCZwSDRHmu<ib|2<((l*c83KSMlN<W`$8MFImy-=-pUg^?OxUyz5
zkRR>o-{jngM#1S^GA)J9_g{s?GB)%_OGu%y0-^qR_adHKEna1%h975(_A&eb7|ju5
zhS&F<=Ii~@#RvK9ooJMAXpZ8J|EGN7d(p6fSs<6J@-*~~8!(iuEb84!F;Sf(Rfkl5
zfAexx0Dnm)7XHZ`rKXNql@A>`-Rj6!6NyaR_O<u~tc+`ZI1wneH2qj<%lM+W;F*eI
zwcwVS_DS9I+pyPHB%b?XG#y-3lS9<!`%|Gc3yA|*{94*gyRzI*L{9VTq+{q^mfJ)9
z{(K=NNY?&Le<OE-GvbDk34b@ZI`4k@AhT9~*v!2r#QwZXXe%1MsB*F3D_G}y{}n;0
zH%R`TrlJ)I_*snZE=V1aWClCd{aQ}xRMr)K7T_(ctj#;8cB>uCY*&1fx?PvxLu4t=
zq((060SjIbj+$V@1kwriQ~7oV*cEK9+|qjr;yztp931FXo5~9vNceU{;J`XYA*n1U
zIK{s(9^o&BGNwOpHT9FF<;w4+%A^rziSdeq_Vs?>_P?6<><+74dQ3fV9yahhUC&=c
z;+6b)04i$@oYX$$msP~ZPfMI`oP?^}f?O#qIu-k@r<iA#V7nZ65K&NchWiHme2f?P
z%vaz(jLN&L=H|OVUYyc9EL#OXS%%mts{4PPX|A*O!CaIFCCFz+Hvg>5MUuqU>;FUN
zpz&lNW_o%$iW(*YFohXTm?(;B2b1c5XqU|CXN@*z2$Un>;p0<z7Z9j&w7Jmp60dSQ
zg(|Dq1wY$cSV{SBOstRWn(A}KGt~r4PEsFS$%abL4XS8`>(8r~t>3qw>!&vz9_U|O
zKgt<4cRE?`4-j_QwUhjb(->(#0a*c|vN=6i-4|}w`7si8U9@wHi(hoPC)^emzXOm7
zCPmH7%^=`ZEzEZ(Uj9CqvwuF%@Nd1ZxcXNt)b^7{D-W5=UCo+<{8b~x0fk2iswdG^
z!REGvU424#0tdl2|H3G|>H+%GGTjCj$i~1V_pf<LQjy0Yj*uk`0+CE0gpZdu+Vh}E
zGo8~Y=!1p^!=<;$>j`InBnnLK*op27rC7J3?BIbP8oa5@@q!33jrJvpW-?jq&Rw#4
zct-x#xD?FxGq_!;esUX0b>vk<(Wp%PSvsbjM_x6<eLZ=fP3K3r`*MeN6k(hQo-QsR
zplJwng%UANdSA>X22~|eK4E*`UZLBdVP#|U#B3n-Y3ajwEE(NvTAg}eWuO_ZkF@!k
z0a)5UlA`B$3x6gQnl|HW(Kp(QlkX5<qW-0Mmh0k<Uj#FXJ~U6IsC~|LVeWdjdhm(K
ziqxYtempdX3-fu2&gPY4af4AOzISH?g%E1@KhNiVuJ>NMm_WDBeX&xr^bE@<pAU&=
zJqr*?g>VGX9W;fzUbGmL?wxRCkgn>U$=CT<sI1hw>xlw2b#(+Ub$;{-+powqo;%{-
zxD_RlEq?G*W)c(2bxFA~;P_9(Cny?lEGPnV@6nS#Bq8X`7xugJcdDmO2mCwrJh1rH
zda8cC#y$Ijo;qnb#QOStuZe%bt9n9~HKCf{G&7tO2<t&t_YJc2S{v`F&zSN$N>5A^
zM6J-HK*N3)l`H*JH1T1y{JMR#HkG9gt%*A8^BX0{B$C}C$6a)D3%C2OX+-=TENDlC
zzDFIJ7~vgJRsJhZd*KNL84ge&0b1!OI8VwDh-j;W!oyAGg9$_f0<P2fn!H>m12@)m
zV+(wbzx;L9Tywt!h9)NX9cHZS&h{2s#7Mc%3k)|%a}ASF)zMeOJp+MDK5L>ZMrBJ{
zu0(6`Wp8a!SW30@F1Eh71=ISU75hFzC7dG%b&fA0aU|T+d(6VCRyrdI%0K*as0mHU
z;oPx8cxl{;S9zgudh9ZUD7Q{Cpsn^DJk^`%hRM6IU%;qpBC4H^#M)QPb$CM0Ze52g
zNTpcxV%Bl)8^7)O&T<+XMyLF8liIG$q84JG?HNH(!**O;+)sJn=v|Awpb_pt^9eWk
z^o66*0_7m1A*T4eyUdKW&Q8Hk%@r-;$j;G)%K_JVD(_R}CbXl6MI*?*!%1`nFvEb_
zP9={${am_cAgB^2;L><!ed_c+!0F}ss6pX=Fph@EX2~&#`pFl(A2l_&SMh1B-07tG
z!dnuU{$bsRB4_%_%1cED3A^U^;*Gb{bkYS^Cq1yAZZdzuA8oMT7R#>95d22G@;EiW
z_-@i0Q{Z0SC_7l?^<mR61d@)^Cbc6usiv;}Csh;x9fZvuEZpY0CsZ8kY|Pfz+D{8D
zpz-r~8Z0Nu_jxVHiOK#v+nXBvG5>Sq4*-afv9xubj%@Gj%$<eQkw!`JAkt6Uo|jPG
zWHD*{RBOhh*PU1ye0A~R;J@adC)ZOPp&Rm210c?>Y7|-6%#p=_>#@}=r=r?>UzmAW
z|49i>XLrJoREEBjmA$QZBPDU{lsMoA!apA;4ULVpr(TLs&A+zzU9H0l8kD`(F|++Q
zqn$WEuAFI&hpc1m^{IB5PjnL3gz7SVvT4}Y2@LU$m=uc*P*>D-zrAmCCSET9YKSC6
zIUd5)S7A|7CcFwjSqwDp$Ii$S?BB0>q!mAp|64t;RkK=-k;6lX$ss^#dGwO+Y6xsl
znh4&c3k;um-}vRLXox6^Dy=`}1qqUrCO4_t<)wf(6M%#bCslc#Xx%T+qtXpa|1?Z)
zwyi=s6!bAsA9sYsaQhyK(vzWcX#jEHQs0Ox1iZ-*QIY0@*nGVNdEbtp173jQ+Fmu#
zfig4T*;ji1K=}kD04tXtb?d)-5(()lvrUB|i2VOfU8~c3kSCoR1v`{z40sqak_vCi
IB@F!k2gnF^(EtDd
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/bp-next.svg
@@ -0,0 +1,1072 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="48"
+   height="48"
+   id="svg1307"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="bp-next.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview113"
+     showgrid="false"
+     inkscape:zoom="6.2802734"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg1307" />
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         id="stop3840"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3842"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         id="stop3839"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3841"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         id="stop2259"
+         style="stop-color:#ef2929;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2261"
+         style="stop-color:#cc0000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2228"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient1368"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient2263"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3843"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3845"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient2690"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="107.5884"
+       cy="83.990814"
+       r="12.551644"
+       fx="107.5884"
+       fy="83.990814"
+       id="radialGradient2314"
+       xlink:href="#linearGradient2691"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient2306"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         id="stop3342-1"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-3"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691">
+      <stop
+         id="stop2693"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2695"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5079"
+         style="stop-color:#ae9b00;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         id="stop2686"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3040"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3044"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3047"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3050"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3052"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3054"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3058"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3844"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3846"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3848"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3850"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3852"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3854"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3856"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3858"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3940"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3944"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3946"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3948"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3950"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3952"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3954"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3957"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3960"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3963"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3965"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3968"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3971"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3973"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3982"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3984"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3986"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3988"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3990"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3992"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3994"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3863"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3865"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3867"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3869"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3871"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3873"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3875"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3980"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3983"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3987"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3989"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3993"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3996"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3998"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4007"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4009"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4011"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4013"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4015"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4017"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4019"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3103"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3105"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)"
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient3107"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3109"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3340"
+       id="radialGradient3111"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)"
+       cx="21.929186"
+       cy="-3.2182934"
+       fx="21.929186"
+       fy="-3.2182934"
+       r="13" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3113"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2684"
+       id="linearGradient3115"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3117"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3119"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5075"
+       id="linearGradient3121"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3123"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3125"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3340"
+       id="radialGradient3134"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.1094029,0,0,2.3370305,-73.764431,10.35981)"
+       cx="21.929186"
+       cy="-3.2182934"
+       fx="21.929186"
+       fy="-3.2182934"
+       r="13" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3138"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.377542,0,0,2.3892631,-30.211602,-38.123458)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient3141"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2922213,0,0,0.34100651,-6.8343259,25.695418)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3144"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.4461825,0,0,2.4582417,-31.301145,-40.340245)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3146"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0340809,0,0,1.1159395,0.47116784,-2.1305226)"
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>player</rdf:li>
+            <rdf:li>record</rdf:li>
+            <rdf:li>music</rdf:li>
+            <rdf:li>sound</rdf:li>
+            <rdf:li>video</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="matrix(-0.68905195,0,0,0.8954059,48.834569,7.5492018)"
+     id="layer4"
+     style="fill:url(#radialGradient3846);fill-opacity:1;display:inline" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 38.215122,22.420146 a 14.477133,14.507213 0 0 1 -28.9542657,0 14.477133,14.507213 0 1 1 28.9542657,0 z"
+     id="path3835"
+     style="opacity:0.15;color:#000000;fill:url(#radialGradient3144);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3146);stroke-width:3.36944985;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 45.477198,38.115266 a 20.216462,5.3349602 0 0 1 -40.4329242,0 20.216462,5.3349602 0 1 1 40.4329242,0 z"
+     id="path2226"
+     style="opacity:0.03999999;color:#000000;fill:url(#radialGradient3141);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 37.354019,22.875867 a 14.070901,14.100139 0 0 1 -28.1418019,0 14.070901,14.100139 0 1 1 28.1418019,0 z"
+     id="path2525"
+     style="color:#000000;fill:url(#radialGradient3138);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.12315083;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 36.209731,22.87587 a 12.916233,12.916233 0 0 1 -25.832466,0 12.916233,12.916233 0 1 1 25.832466,0 z"
+     id="path2527"
+     style="color:#000000;fill:none;stroke:#f77d7d;stroke-width:1.12315106;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="M 23.117991,9.3980567 C 16.065134,9.4874482 10.309113,15.004888 9.8507809,21.963298 16.722014,24.79002 25.429344,20.333357 35.842726,18.164933 35.069538,15.077877 30.727092,9.3980567 23.293484,9.3980567 c -0.05808,0 -0.117591,-7.335e-4 -0.175493,0 z"
+     id="path2529"
+     style="opacity:0.6;fill:url(#radialGradient3134);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" />
+  <g
+     transform="matrix(-1.1231501,0,0,1.1231501,69.253277,-3.6162014)"
+     id="g4000">
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.565946,42.917735 0,-27.30988 -17.963571,13.2673 17.963571,14.04258 z"
+       id="path2682"
+       style="opacity:0.15;color:#000000;fill:url(#radialGradient3113);fill-opacity:1;stroke:url(#linearGradient3115);stroke-width:3.5710001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.221792,41.405833 0,-24.902568 -16.608417,12.451285 16.608417,12.451283 z"
+       id="path3375"
+       style="color:#000000;fill:url(#radialGradient3117);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.221792,41.405833 0,-24.902568 -16.608417,12.451285 16.608417,12.451283 z"
+       id="path2479"
+       style="color:#000000;fill:url(#radialGradient3119);fill-opacity:1;stroke:url(#linearGradient3121);stroke-width:2.08500004;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 39.877266,17.286284 0,23.336517 L 24.308998,28.954542 39.877266,17.286284 z m -0.689052,1.566961 -13.479579,10.101297 13.479579,10.101298 0,-20.202595 z"
+       id="path2481"
+       style="color:#000000;fill:url(#radialGradient3123);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 39.230907,18.797738 0,10.465057 c -2.941699,-0.0401 -6.314579,-0.30942 -11.756948,-1.678886 l 11.756948,-8.786171 z"
+       id="path2339"
+       style="opacity:0.5;color:#000000;fill:url(#radialGradient3125);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..bb66686c8cf3e92dfd16e04ec74a9395eb6e9405
GIT binary patch
literal 11888
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/bp-prev.svg
@@ -0,0 +1,1147 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="48"
+   height="48"
+   id="svg1307"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="bp-next.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview113"
+     showgrid="false"
+     inkscape:zoom="6.2802734"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg1307" />
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         id="stop3840"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3842"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         id="stop3839"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3841"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         id="stop2259"
+         style="stop-color:#ef2929;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2261"
+         style="stop-color:#cc0000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2228"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient1368"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient2263"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3843"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3845"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient2690"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="107.5884"
+       cy="83.990814"
+       r="12.551644"
+       fx="107.5884"
+       fy="83.990814"
+       id="radialGradient2314"
+       xlink:href="#linearGradient2691"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient2306"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         id="stop3342-1"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-3"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691">
+      <stop
+         id="stop2693"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2695"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5079"
+         style="stop-color:#ae9b00;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         id="stop2686"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3040"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3044"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3047"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3050"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3052"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3054"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3058"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3844"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3846"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3848"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3850"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3852"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3854"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3856"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3858"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3940"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3944"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3946"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3948"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3950"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3952"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3954"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3957"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3960"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3963"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3965"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3968"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3971"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3973"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3982"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3984"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3986"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3988"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3990"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3992"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3994"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3863"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3865"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3867"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3869"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3871"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3873"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3875"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3980"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3983"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3987"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3989"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3993"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3996"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3998"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4007"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4009"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4011"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4013"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4015"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4017"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4019"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3103"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3105"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)"
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient3107"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3109"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3340"
+       id="radialGradient3111"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)"
+       cx="21.929186"
+       cy="-3.2182934"
+       fx="21.929186"
+       fy="-3.2182934"
+       r="13" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3113"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2684"
+       id="linearGradient3115"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3117"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3119"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5075"
+       id="linearGradient3121"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3123"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3125"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3340"
+       id="radialGradient3134"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.1094029,0,0,2.3370305,-73.764431,10.35981)"
+       cx="21.929186"
+       cy="-3.2182934"
+       fx="21.929186"
+       fy="-3.2182934"
+       r="13" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3138"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.377542,0,0,2.3892631,-30.211602,-38.123458)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient3141"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2922213,0,0,0.34100651,-6.8343259,25.695418)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3144"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.4461825,0,0,2.4582417,-31.301145,-40.340245)"
+       cx="22.5"
+       cy="28.116049"
+       fx="22.5"
+       fy="28.116049"
+       r="14.537862" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3146"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0340809,0,0,1.1159395,0.47116784,-2.1305226)"
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3148"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2684"
+       id="linearGradient3150"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3152"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3154"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5075"
+       id="linearGradient3156"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3158"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3160"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>player</rdf:li>
+            <rdf:li>record</rdf:li>
+            <rdf:li>music</rdf:li>
+            <rdf:li>sound</rdf:li>
+            <rdf:li>video</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="matrix(-0.68905195,0,0,0.8954059,48.834569,7.5492018)"
+     id="layer4"
+     style="fill:url(#radialGradient3846);fill-opacity:1;display:inline" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 38.215122,22.420146 a 14.477133,14.507213 0 0 1 -28.9542657,0 14.477133,14.507213 0 1 1 28.9542657,0 z"
+     id="path3835"
+     style="opacity:0.15;color:#000000;fill:url(#radialGradient3144);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3146);stroke-width:3.36944985;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 45.477198,38.115266 a 20.216462,5.3349602 0 0 1 -40.4329242,0 20.216462,5.3349602 0 1 1 40.4329242,0 z"
+     id="path2226"
+     style="opacity:0.03999999;color:#000000;fill:url(#radialGradient3141);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 37.354019,22.875867 a 14.070901,14.100139 0 0 1 -28.1418019,0 14.070901,14.100139 0 1 1 28.1418019,0 z"
+     id="path2525"
+     style="color:#000000;fill:url(#radialGradient3138);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.12315083;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="m 36.209731,22.87587 a 12.916233,12.916233 0 0 1 -25.832466,0 12.916233,12.916233 0 1 1 25.832466,0 z"
+     id="path2527"
+     style="color:#000000;fill:none;stroke:#f77d7d;stroke-width:1.12315106;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     inkscape:connector-curvature="0"
+     d="M 23.117991,9.3980567 C 16.065134,9.4874482 10.309113,15.004888 9.8507809,21.963298 16.722014,24.79002 25.429344,20.333357 35.842726,18.164933 35.069538,15.077877 30.727092,9.3980567 23.293484,9.3980567 c -0.05808,0 -0.117591,-7.335e-4 -0.175493,0 z"
+     id="path2529"
+     style="opacity:0.6;fill:url(#radialGradient3134);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" />
+  <g
+     transform="matrix(1.1231501,0,0,1.1231501,-1.694229,-3.6162014)"
+     id="g4000">
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.565946,42.917735 0,-27.30988 -17.963571,13.2673 17.963571,14.04258 z"
+       id="path2682"
+       style="opacity:0.15;color:#000000;fill:url(#radialGradient3148);fill-opacity:1;stroke:url(#linearGradient3150);stroke-width:3.5710001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.221792,41.405833 0,-24.902568 -16.608417,12.451285 16.608417,12.451283 z"
+       id="path3375"
+       style="color:#000000;fill:url(#radialGradient3152);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 40.221792,41.405833 0,-24.902568 -16.608417,12.451285 16.608417,12.451283 z"
+       id="path2479"
+       style="color:#000000;fill:url(#radialGradient3154);fill-opacity:1;stroke:url(#linearGradient3156);stroke-width:2.08500004;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 39.877266,17.286284 0,23.336517 L 24.308998,28.954542 39.877266,17.286284 z m -0.689052,1.566961 -13.479579,10.101297 13.479579,10.101298 0,-20.202595 z"
+       id="path2481"
+       style="color:#000000;fill:url(#radialGradient3158);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 39.230907,18.797738 0,10.465057 c -2.941699,-0.0401 -6.314579,-0.30942 -11.756948,-1.678886 l 11.756948,-8.786171 z"
+       id="path2339"
+       style="opacity:0.5;color:#000000;fill:url(#radialGradient3160);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..c265937160b3bd8351d8f64485270dc76e98802a
GIT binary patch
literal 15898
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/bp-rm-all.svg
@@ -0,0 +1,1243 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.1"
+   width="48"
+   height="48"
+   id="svg1307">
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         id="stop3840"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3842"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         id="stop3839"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3841"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         id="stop2259"
+         style="stop-color:#ef2929;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2261"
+         style="stop-color:#cc0000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2228"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient1368"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient2263"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3843"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3845"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient2690"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="107.5884"
+       cy="83.990814"
+       r="12.551644"
+       fx="107.5884"
+       fy="83.990814"
+       id="radialGradient2314"
+       xlink:href="#linearGradient2691"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient2306"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         id="stop3342-1"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-3"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691">
+      <stop
+         id="stop2693"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2695"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5079"
+         style="stop-color:#ae9b00;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         id="stop2686"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3040"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3044"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3047"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3050"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3052"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3054"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3058"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3844"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3846"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3848"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3850"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3852"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3854"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3856"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3858"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3940"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3944"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3946"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3948"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3950"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3952"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3954"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3957"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3960"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3963"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3965"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3968"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3971"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3973"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3982"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3984"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3986"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3988"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3990"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3992"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3994"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3863"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3865"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3867"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3869"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3871"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3873"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3875"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3980"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3983"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3987"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3989"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3993"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3996"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3998"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4007"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4009"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4011"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4013"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4015"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4017"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4019"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3134"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.1094029,0,0,2.3370305,-73.764431,10.35981)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3138"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.377542,0,0,2.3892631,-30.211602,-38.123458)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3141"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2922213,0,0,0.34100651,-6.8343259,25.695418)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3144"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.4461825,0,0,2.4582417,-31.301145,-40.340245)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3146"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0340809,0,0,1.1159395,0.47116784,-2.1305226)" />
+    <linearGradient
+       x1="9.5621576"
+       y1="6.952559"
+       x2="14.766725"
+       y2="14.200403"
+       id="linearGradient2249"
+       xlink:href="#linearGradient2243"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="20.764477"
+       cy="19.540945"
+       r="14.799585"
+       fx="20.764477"
+       fy="19.540945"
+       id="radialGradient9318"
+       xlink:href="#linearGradient9320"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.449398,-0.216492,0.564416,1.171617,-1.432288,2.546108)" />
+    <linearGradient
+       x1="11.996646"
+       y1="19.591736"
+       x2="17.774033"
+       y2="16.234594"
+       id="linearGradient8582"
+       xlink:href="#linearGradient8576"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.014891,0,0,1.00592,-0.331699,-0.140188)" />
+    <linearGradient
+       x1="10.615304"
+       y1="28.122555"
+       x2="2.0069747"
+       y2="27.234833"
+       id="linearGradient15309"
+       xlink:href="#linearGradient15303"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1767,0,0,1.176702,-0.819769,-5.307055)" />
+    <linearGradient
+       x1="12.233433"
+       y1="12.363223"
+       x2="16.870909"
+       y2="17.110941"
+       id="linearGradient11653"
+       xlink:href="#linearGradient11647"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.965926,0.262102,-0.258819,0.978177,2.957072,-5.939741)" />
+    <linearGradient
+       x1="16.92873"
+       y1="34.010502"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient7996"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.861487,1.49214,-17.87951,-13.91085)" />
+    <linearGradient
+       x1="14.045431"
+       y1="37.57589"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient7994"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.801305,1.3879,-12.8183,-11.14456)" />
+    <linearGradient
+       x1="15.096997"
+       y1="36.96777"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient7992"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.843479,1.460948,-19.74053,-11.13423)" />
+    <linearGradient
+       x1="19.616243"
+       y1="39.252983"
+       x2="18.485983"
+       y2="29.909071"
+       id="linearGradient7990"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.797961,1.38211,-15.72934,-9.277499)" />
+    <linearGradient
+       x1="9.1053896"
+       y1="38.828144"
+       x2="10.146956"
+       y2="30.140831"
+       id="linearGradient7988"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.797491,1.381294,-15.69909,-9.225099)" />
+    <linearGradient
+       id="linearGradient5739">
+      <stop
+         id="stop5741"
+         style="stop-color:#c4a000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5743"
+         style="stop-color:#c4a000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11647">
+      <stop
+         id="stop11649"
+         style="stop-color:#c17d10;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop11651"
+         style="stop-color:#9b650c;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15303">
+      <stop
+         id="stop15305"
+         style="stop-color:#b30000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop15311"
+         style="stop-color:#ff5c5c;stop-opacity:1"
+         offset="0.5" />
+      <stop
+         id="stop15307"
+         style="stop-color:#c30000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="22.571428"
+       cy="30.857143"
+       r="15.571428"
+       fx="22.571428"
+       fy="30.857143"
+       id="radialGradient3564"
+       xlink:href="#linearGradient3558"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.651376,0,10.75754)" />
+    <linearGradient
+       id="linearGradient3558">
+      <stop
+         id="stop3560"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3562"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8576">
+      <stop
+         id="stop8578"
+         style="stop-color:#dac203;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8584"
+         style="stop-color:#fdec69;stop-opacity:1"
+         offset="0.5" />
+      <stop
+         id="stop8580"
+         style="stop-color:#fdef7e;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9320">
+      <stop
+         id="stop9322"
+         style="stop-color:#fef088;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop9324"
+         style="stop-color:#fde63a;stop-opacity:1"
+         offset="0.5" />
+      <stop
+         id="stop9326"
+         style="stop-color:#dac203;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2243">
+      <stop
+         id="stop2245"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2247"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       x1="10.615304"
+       y1="28.122555"
+       x2="2.0069747"
+       y2="27.234833"
+       id="linearGradient3478"
+       xlink:href="#linearGradient15303"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1767002,0,0,1.1767026,-3.1134726,-7.1721388)" />
+    <linearGradient
+       x1="11.996646"
+       y1="19.591736"
+       x2="17.774033"
+       y2="16.234594"
+       id="linearGradient3482"
+       xlink:href="#linearGradient8576"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.014891,0,0,1.00592,-3.2506433,-0.60854196)" />
+    <linearGradient
+       x1="16.92873"
+       y1="34.010502"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient3485"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.861487,1.49214,-20.798454,-14.379204)" />
+    <linearGradient
+       x1="14.045431"
+       y1="37.57589"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient3488"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.801305,1.3879,-15.737244,-11.612914)" />
+    <linearGradient
+       x1="15.096997"
+       y1="36.96777"
+       x2="14.045431"
+       y2="29"
+       id="linearGradient3491"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.843479,1.460948,-22.659474,-11.602584)" />
+    <linearGradient
+       x1="19.616243"
+       y1="39.252983"
+       x2="18.485983"
+       y2="29.909071"
+       id="linearGradient3494"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.797961,1.38211,-18.648284,-9.745853)" />
+    <linearGradient
+       x1="9.1053896"
+       y1="38.828144"
+       x2="10.146956"
+       y2="30.140831"
+       id="linearGradient3498"
+       xlink:href="#linearGradient5739"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.866026,-0.5,0.797491,1.381294,-18.618034,-9.693453)" />
+    <radialGradient
+       cx="20.764477"
+       cy="19.540945"
+       r="14.799585"
+       fx="20.764477"
+       fy="19.540945"
+       id="radialGradient3501"
+       xlink:href="#linearGradient9320"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.449398,-0.216492,0.564416,1.171617,-4.3512323,2.077754)" />
+    <linearGradient
+       x1="9.5621576"
+       y1="6.952559"
+       x2="14.766725"
+       y2="14.200403"
+       id="linearGradient3504"
+       xlink:href="#linearGradient2243"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-2.9189443,-0.46835396)" />
+    <linearGradient
+       x1="12.233433"
+       y1="12.363223"
+       x2="16.870909"
+       y2="17.110941"
+       id="linearGradient3507"
+       xlink:href="#linearGradient11647"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.965926,0.262102,-0.258819,0.978177,0.0381277,-6.408095)" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>player</rdf:li>
+            <rdf:li>record</rdf:li>
+            <rdf:li>music</rdf:li>
+            <rdf:li>sound</rdf:li>
+            <rdf:li>video</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="matrix(-0.68905195,0,0,0.8954059,48.834569,7.5492018)"
+     id="layer4"
+     style="fill:url(#radialGradient3846);fill-opacity:1;display:inline" />
+  <path
+     d="m 38.215122,22.420146 a 14.477133,14.507213 0 0 1 -28.9542657,0 14.477133,14.507213 0 1 1 28.9542657,0 z"
+     id="path3835"
+     style="opacity:0.15;color:#000000;fill:url(#radialGradient3144);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3146);stroke-width:3.36944985;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 45.477198,38.115266 a 20.216462,5.3349602 0 0 1 -40.4329242,0 20.216462,5.3349602 0 1 1 40.4329242,0 z"
+     id="path2226"
+     style="opacity:0.03999999;color:#000000;fill:url(#radialGradient3141);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 37.354019,22.875867 a 14.070901,14.100139 0 0 1 -28.1418019,0 14.070901,14.100139 0 1 1 28.1418019,0 z"
+     id="path2525"
+     style="color:#000000;fill:url(#radialGradient3138);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.12315083;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 36.209731,22.87587 a 12.916233,12.916233 0 0 1 -25.832466,0 12.916233,12.916233 0 1 1 25.832466,0 z"
+     id="path2527"
+     style="color:#000000;fill:none;stroke:#f77d7d;stroke-width:1.12315106;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="M 23.117991,9.3980567 C 16.065134,9.4874482 10.309113,15.004888 9.8507809,21.963298 16.722014,24.79002 25.429344,20.333357 35.842726,18.164933 35.069538,15.077877 30.727092,9.3980567 23.293484,9.3980567 c -0.05808,0 -0.117591,-7.335e-4 -0.175493,0 z"
+     id="path2529"
+     style="opacity:0.6;fill:url(#radialGradient3134);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" />
+  <path
+     d="m 3.9973675,1.3096646 c 1.7297758,-0.87805946 4.1259252,0.0035 5.0117902,1.5573199 l 4.1702393,9.4847145 c 0.885865,1.55382 0.633416,3.369304 -0.566029,4.070586 -1.199445,0.701283 -2.8782333,0.01494 -3.7640993,-1.538881 L 2.9308059,6.5276765 C 2.0449411,4.9738526 2.3018093,2.1703547 3.9973675,1.3096646 z"
+     id="path7966"
+     style="fill:url(#linearGradient3507);fill-opacity:1;fill-rule:evenodd;stroke:#8f5902;stroke-width:1.00632107;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+  <path
+     d="M 4.5273258,2.2675564 C 5.9492788,1.4817366 7.3480307,2.0748153 8.2226237,3.6069441 L 12.670762,13.693669 10.239241,15.113531 3.9426298,6.2931951 C 3.0680368,4.7610665 3.0663828,3.0749226 4.5273258,2.2675564 z"
+     id="path14575"
+     style="opacity:0.42307691;fill:none;stroke:url(#linearGradient3504);stroke-width:1.00569046;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+  <path
+     d="M 11.861904,22.325213 C 11.066409,26.612048 12.49587,36.277714 18.121137,42.01921 22.467891,42.160501 32.111228,38.601529 38.652232,31.822172 29.416056,27.305462 23.115703,16.099195 18.216925,18.539498 l -6.355021,3.785715 z"
+     id="path7968"
+     style="fill:url(#radialGradient3501);fill-opacity:1;fill-rule:evenodd;stroke:#c4a000;stroke-width:1.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 13.419415,23.89892 c 2.349016,6.270271 2.489443,12.788302 7.183783,17.919884"
+     id="path7972"
+     style="fill:none;stroke:url(#linearGradient3498);stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="M 12.999836,22.94577 C 12.087743,23.453874 12.839457,35.465984 18.58409,40.946137 25.970076,40.75924 34.107806,34.54995 36.977042,32.108291 27.477626,26.124169 22.052239,17.346522 18.496252,19.534707 l -5.496416,3.411063 z"
+     id="path7970"
+     style="opacity:0.46153846;fill:none;stroke:#ffffff;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 20.929541,21.804978 c 0.866361,-0.749 5.75002,6.087667 14.998501,12.381801"
+     id="path7974"
+     style="fill:none;stroke:url(#linearGradient3494);stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 15.093949,22.395567 c 3.71231,5.347495 2.96299,12.424255 8.840816,18.08111"
+     id="path7976"
+     style="fill:none;stroke:url(#linearGradient3491);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 20.064954,22.307467 c 0,0 8.17673,13.071629 11.181934,15.104561"
+     id="path7978"
+     style="fill:none;stroke:url(#linearGradient3488);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 16.381364,21.732341 c 3.447146,2.916815 8.702557,14.163188 11.310014,17.47775"
+     id="path7980"
+     style="fill:none;stroke:url(#linearGradient3485);stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="M 5.5900009,17.593512 17.051672,11.034606 c 0.59865,2.382571 -0.34184,3.240585 1.79595,7.147713 l -7.910292,4.52664 C 9.4839017,19.231539 7.3724437,19.298661 5.5900009,17.593512 z"
+     id="path7982"
+     style="fill:url(#linearGradient3482);fill-opacity:1;fill-rule:evenodd;stroke:#c4a000;stroke-width:1.01039541;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <path
+     d="M 11.124505,20.777335 C 10.310544,19.356118 8.5621917,18.540993 7.4451857,17.650106 l 8.7574223,-4.933738 c -0.01959,1.480968 0.566905,3.088206 0.875611,4.518667 l -5.953714,3.5423 z"
+     id="path11655"
+     style="opacity:0.2472527;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <rect
+     width="13.015025"
+     height="3.4598923"
+     rx="0.99999756"
+     ry="0.99999857"
+     x="-3.7064905"
+     y="22.30971"
+     transform="matrix(0.86602487,-0.50000092,0.49999974,0.86602555,0,0)"
+     id="rect7984"
+     style="fill:url(#linearGradient3478);fill-opacity:1;fill-rule:evenodd;stroke:#690000;stroke-width:0.99999839;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <path
+     d="m -17.172594,4.0836182 a 2.1465743,2.1465743 0 1 1 -4.293148,0 2.1465743,2.1465743 0 1 1 4.293148,0 z"
+     transform="matrix(0.583557,0.156364,-0.156364,0.583557,17.538876,4.690428)"
+     id="path10193"
+     style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#8f5902;stroke-width:1.65524161;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <path
+     d="m 24.81589,40.086885 c 0,0 1.506584,-0.500648 2.176098,-0.941755 -1.237437,-1.944544 -3.403341,-5.895665 -5.403126,-8.87592 1.193243,6.540738 3.227028,9.817675 3.227028,9.817675 z"
+     id="path3558"
+     style="opacity:0.31730772;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  <path
+     d="m 28.222861,38.589916 2.025998,-1.08517 C 28.304315,35.648591 22.780362,27.388848 22.780362,27.388848 l 5.442499,11.201068 z"
+     id="path3560"
+     style="opacity:0.31730772;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  <path
+     d="m 32.739578,35.919455 2.436371,-1.743752 c -3.181981,-1.325825 -11.58654,-9.880449 -11.58654,-9.880449 2.382935,3.011895 6.767234,8.612306 9.150169,11.624201 z"
+     id="path3562"
+     style="opacity:0.31730772;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  <path
+     d="m 36.234745,33.448854 1.692313,-1.409508 c -3.314563,-1.502602 -12.495677,-9.912017 -12.495677,-9.912017 0,0 6.074587,9.200205 10.803364,11.321525 z"
+     id="path3565"
+     style="opacity:0.31730772;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  <path
+     d="m 21.457132,41.103351 c 0,0 1.197225,-0.279677 2.043516,-0.455619 -1.458408,-1.237437 -3.801089,-4.437257 -5.093767,-8.610755 0.530331,6.894292 3.050251,9.066374 3.050251,9.066374 z"
+     id="path2265"
+     style="opacity:0.31730766;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  <path
+     d="m 18.451928,41.501098 c 0,0 1.24802,-0.01368 1.24802,-0.01368 -2.298097,-2.519069 -3.138175,-5.365335 -4.430854,-9.40625 -0.132581,4.684583 3.182834,9.419926 3.182834,9.419926 z"
+     id="path2267"
+     style="opacity:0.31730766;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..422472f79fa08136a54d0ef97f76787d6acac661
GIT binary patch
literal 8572
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
MRn%0dLRdxoA7CI#(EtDd
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/bp-toggle.svg
@@ -0,0 +1,948 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.1"
+   width="48"
+   height="48"
+   id="svg1307">
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         id="stop3840"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3842"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         id="stop3839"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3841"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         id="stop2259"
+         style="stop-color:#ef2929;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2261"
+         style="stop-color:#cc0000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2228"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient1368"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient2263"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3843"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3845"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient2690"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="107.5884"
+       cy="83.990814"
+       r="12.551644"
+       fx="107.5884"
+       fy="83.990814"
+       id="radialGradient2314"
+       xlink:href="#linearGradient2691"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient2306"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         id="stop3342-1"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-3"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691">
+      <stop
+         id="stop2693"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2695"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5079"
+         style="stop-color:#ae9b00;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         id="stop2686"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3040"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3044"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3047"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3050"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3052"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3054"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3058"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3844"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3846"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3848"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3850"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3852"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3854"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3856"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3858"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3940"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3944"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3946"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3948"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3950"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3952"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3954"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3957"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3960"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3963"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3965"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3968"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3971"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3973"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3982"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3984"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3986"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3988"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3990"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3992"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3994"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3863"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3865"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3867"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3869"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3871"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3873"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3875"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3980"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3983"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3987"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3989"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3993"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3996"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3998"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4007"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4009"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4011"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4013"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4015"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4017"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4019"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3134"
+       xlink:href="#linearGradient3340"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.1094029,0,0,2.3370305,-73.764431,10.35981)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3138"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.377542,0,0,2.3892631,-30.211602,-38.123458)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3141"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2922213,0,0,0.34100651,-6.8343259,25.695418)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3144"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.4461825,0,0,2.4582417,-31.301145,-40.340245)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3146"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0340809,0,0,1.1159395,0.47116784,-2.1305226)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3148"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3150"
+       xlink:href="#linearGradient2684"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3152"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3154"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3156"
+       xlink:href="#linearGradient5075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3158"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3160"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>player</rdf:li>
+            <rdf:li>record</rdf:li>
+            <rdf:li>music</rdf:li>
+            <rdf:li>sound</rdf:li>
+            <rdf:li>video</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="matrix(-0.68905195,0,0,0.8954059,48.834569,7.5492018)"
+     id="layer4"
+     style="fill:url(#radialGradient3846);fill-opacity:1;display:inline" />
+  <path
+     d="m 38.215122,22.420146 a 14.477133,14.507213 0 0 1 -28.9542657,0 14.477133,14.507213 0 1 1 28.9542657,0 z"
+     id="path3835"
+     style="opacity:0.15;color:#000000;fill:url(#radialGradient3144);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3146);stroke-width:3.36944985;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 45.477198,38.115266 a 20.216462,5.3349602 0 0 1 -40.4329242,0 20.216462,5.3349602 0 1 1 40.4329242,0 z"
+     id="path2226"
+     style="opacity:0.03999999;color:#000000;fill:url(#radialGradient3141);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 37.354019,22.875867 a 14.070901,14.100139 0 0 1 -28.1418019,0 14.070901,14.100139 0 1 1 28.1418019,0 z"
+     id="path2525"
+     style="color:#000000;fill:url(#radialGradient3138);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.12315083;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="m 36.209731,22.87587 a 12.916233,12.916233 0 0 1 -25.832466,0 12.916233,12.916233 0 1 1 25.832466,0 z"
+     id="path2527"
+     style="color:#000000;fill:none;stroke:#f77d7d;stroke-width:1.12315106;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+  <path
+     d="M 23.117991,9.3980567 C 16.065134,9.4874482 10.309113,15.004888 9.8507809,21.963298 16.722014,24.79002 25.429344,20.333357 35.842726,18.164933 35.069538,15.077877 30.727092,9.3980567 23.293484,9.3980567 c -0.05808,0 -0.117591,-7.335e-4 -0.175493,0 z"
+     id="path2529"
+     style="opacity:0.6;fill:url(#radialGradient3134);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline" />
+</svg>
deleted file mode 100644
index 122ea66f099371b3272cae63812cdac415557c46..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a183a08ec073d4390d4f4d4a3416c184daf1326f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 7f1731df9a0b78e661e21c0597ff862071222b9b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 7d7e2e3ad2b797f3077b65989dcd8ccfb4dcbed8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1753139eae90fd43069b2bd7da99b852b3fd2e93..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..ce72dcaa159e75100684a39ae85adde97c1dae00
GIT binary patch
literal 6276
zc$|fJbyU<()c2QVS(aE>QUs9|MN+zRDd}1o1XdIfX#qj0C8brQyOES`2`QD7T5<tV
z8kUf*hu?YMf1mTroSA$7n9tlZ_nuo5p{uO|BV{B7005?@s)V|snEw_Oa<g~IKJC9D
z5Niz;CE)tMnf<ls696zss42-Cc&Be$IDDY9OYz5jY0=3Navz#QqaSv4bPVu!xc-16
z=1A1SNz#&kR&djAR+ol#KaVNseRSWAM$<l_;-Pb^fs=C2BaMEG`8v^`&CTX%W&tnk
zHLHtNHABEqcrtgFQ?kUWM*#ln<m|2XFtTyLK07N{!ms)K-?k5K^{cPdF+f87K=lJc
zJ_!83Go>)I0v!ZK81oW<0PC70yh5Kx*#QJ`HWkLQ+82zJ!~D+A`Xv&g&W$9*tOH8j
z&9oRvfE?{8sIy_Fz(#@wHSXM*g~ywJhVYYiw9T=5mgmHQUxcuBo+62L$&|yDV7&LZ
zv@j!kEvu{tOYPl1MYu;Udd=75+#k|HsWDuDDewlE{FAXU5v2|ZWQLwx^~uJ1My)QX
z-P0ul5<~NRj-Ia4=qx2IU-&b0APk~EEQ0jZh+be6J49qYH?2}!Afe-p+@Z*dVk)nB
zHz70Pv%QNY%Rd_aS%I&}lz~t+sm)UIDnth%OGj@nWRAJ+W6HNyCYKHw4f@3q_x5jB
zaT6e}7)^PihzQ13MWq6(PZVQF=iI|o<Z_U<@AA1-j}X2MrbU(Z2dE`z3wj_f*Bu0`
zMrlHrt~O+*E))7HdxZOc--01&F!b@a5~!ntr>L`wZPfm}V*O)V_dCMnQl{<o>|iou
zm6`~~RCRo@6>bjVF+K7xTli=H++8n{(!luXn4kG>)E7VcSyXZLrt3sD9ha;sKZP|F
zxXppEdDFqo-PNYAbyn9L8&rSfiB1%kZDc7BxJ!i+ktl0FFe)2J_TEdtx>f&SfEW}4
zpAiD`B-W(>udqz$&gMe!VcK2!ib9E3X|)kH$Bw-^ZF>@q!?yjZT0o&fQ|Ljtw53pZ
z9f+YgTJSAM&=8h9(MF*J>LXqN+#?u)x4cmkUXDudAA2uN_=#J*l5R-n`S3aL-4r)6
z#}zVA!paj8RuP(3^>(>WHzSR{$#156<9I&iIvojP1O}9HAwUH{#6hp}l;Ji&J<1z|
z_&79<UfD_*5hm;-K29noP%Z9UF|Vv|qrW~L#k;lsnUXXxu8DPM#nAc?xpod9K>4+u
zC<XY4te4E>+&{6;<qi=SG4|*mD`~r1LRQ`EX{l%>M-&+ylYzyM`+K1ZI7pR$7AXB_
zP0lpRi<y30Ur5D`^@qBzE`aW_f@89EoH~w*Si0K%{sphaPBjsrAsAZ&f6PGsawG!K
zAgK%qQ3TZ!+(S&G_6P)KW?Z^|da@w3EIbO)3~Mu$q;hXpqE4P~{`)?IG1tzl<ngP!
zcLhc>kry+XsjI4xn3w@VCNq`HtOkbIXVX8ApIRP2f}1t{rpea2k;^9&%M!3<$rCG{
z3Ml|%H6<igz-U!|gcH98{~b0oldEc{V{mfkXi)siH}3tuJXUo?o`=8g51}BE*!l2)
ztD~gdwYll<H}8cNK<cPAE4aE-0j|rMdpXbLlt7#^p008c4;)LOwoL0Dbo6}l(M<=F
z$g!U>DL{D}#jNZx=fxj=O0;tK645wjf*v7=Y2|`H168tO${FVzUU2$ZSAz2oeu(Bf
z6>A1MB|NH(Ss&asX}-`NpHMmGTw}DwHPSB3A3n%j+ld~4JP~=(=!-Rz=uQL%oEQ6I
zhmV;uGw||6ADqKF=)b#B)t8SWY-}shzaSnS<(NX1Bbc5AtX}$x-@keJURksmrJ;6a
zL}{5j=Oh@7tzHs!Zd{u1nqAPI@sI8h1rv<cBb*8#`b>6cwc)|fE)2#nTORZ1fSDWd
zCe^?MRa$<|21K9g{kxaEj8$wHt|2vkhTSr&v)l5BhiE&?;^0qgmF0p&ujWE|f(nSb
zMt)6u5=yQdA+h%@q$VcN{dts6kL_e5Mf5h8l0J<kZEmoW(cQ<`r{W&e?vLrh`T;4W
z-Lm#{uzzsN^Gar$T{)7iZn$Xjqj9WQuFu}faqNF8k*qLphPJewQ+mJcdYLEc-8S?*
zwQ!mg&1mhUN|TohRxLoO7WBFm5426RJb;c9io+Sylfcft9rZ$ZZTkFLX)MBtY=GWF
z3$5J;8dzToqbi4dH(EY=@5p`SxY`%h(7ei&%#qYTQ82d7U7!A>YSd0kODnk0K7Uiv
z*(?EHG5Ay0Ze*)TtaAirGRYA#;-_)^9M`aee!SRBs6#NtPBb-d`SzSpBY(_ZGewX&
z(Xe}MO?A47G_a%?cER3I&iy(zHnm+w5*@qVOyQ+ofHE^QG}IDJn^1ZDxZ?9rfk`7q
zwQ>^#B0y;9+!kl$k9VDyUw<B00K4r0b0n-p*igkeK`pX9jihE~S7S=mCk%bh&#$+}
zcU105UsgbqfG+-*MLJoy$*HO2uTPG*QF+#+BU4jroE;lX+Fn?L*?UCEV@(9jAA=0<
zgcfcRI8cD!#2%jaUq)jj7${Fj7n{lOUfQW7#Za5Vu@}jLuzIJb{~SXY;Uyam+ft$x
zk~O;O+oyS#(;ult;Dz=pFJHbyvFl_;e`Pe#Bp6+<UDXH;mxR6E0NVZrPuKVsfbY1%
z1V`2a0lk^PUN5y=YmhCItL$y<bi^Yl!9cPAnfpu&n&H>W4+3wNEgC4U`xcz#n%P)I
zkq<xp@bvJg9ZV5opZxnLlCz`MevA=SOuOD3%S2D%xmr?I3Gyg=XPb{UeKyj{&{4OA
zA!@m@NaRu&d2|xP*Yv;#6G;-EBl#&FASg`fjV~TU&%Tlt;jb~A?5*n$yA}Lz;gDi7
zGeS4mQD0yG?bXF;9x>(J=y`J;Ybrt|PE4Gw7zABp9!@BWdrvu+8n~dcXa~+gRn-!(
z-*v4aOf0d4rvt^-g!YQi>^e_+Ny*jw36ZhJ1My#%>P7lq%Qbo~BsxxJho5AhjTh@X
zMbSShX^(FB7o;md^uocxfuB5BSgY%I#k2WoO@VYGkFsFfd|jSc1+0fnvCWl?F5zxa
z4_aE+jH~`q`+-Y_*$%bV#~67ad=aKDGDu!1DjFQlFNl)F(ISFOGdP`};N}BlNVY@U
za?Zw53p+E&yRtnbE#@aDjS>cJ`yddA^<H(<6c->(gm$r1zK*SHDS;1=&z&MuZ$**>
z#o&90OPEYO5yfYiByDvva;AE7P1fww=9J{wI`F!O$BYZZ<cz1r!r3}8{>>Y6!vtPd
z!O($tPJP>QvpO#N3=KMcOhrWnq>En_>&f#%Zq&kNMUix5vWmWW=Q%;@&iHk(#8;kc
zOG!$p@x`UzAHL8+Kd4iEhs_x_WrYJquaFNu2nr?7OqGl;daT!QYy>9MnwkV$w%+F+
z<2<##b{+c>H-!;Q(KNKPv#T#CU<=q??2P=n#Y#^KCpo$b=I+mAbv^Yu9()yzw1t;E
ze4G?%(VsMWBoqu+1I_>H{(w?Y4}&B7qhAkLHBzT&ddz%rn5<^AAkOr|7g{-s4JyP}
zrA#~4A6B&Nl$flddT7ymzk6WK6`u<2*Bs{;GPGk7x&epmbqJ3Gxx!d{0puXSc(Tth
z)U_2pW0cqjyDB9y-TPrr0Sb(WCq-gHFbGiay^yf@l+N1qnj1!_=sodx*Qrb=zkbie
zygNntkl}K{l2A=p@E@H5)N_W%ww*ylBHP>Bp<jKDwKp90taE_nUI51~<-YW$0JQ4>
zx@WjsL-=~q2fVNP8%sEK8b7-KbKnXYA4h^x4j=MYgWC>lefySa{$cPj@maI&p~v9G
za=VM=WzBZ6K@%hNUi1@QY_;d+q}m{@wLFFcoMw7?z{IjVNF4Ndfv$1ECLEkolA{vT
z;T<%3SM?n^xaikclR##Xrv}CoXuaWwwS(({+2Q6I{O*QDa&NFRSy$+uZ^n}9gi01z
zHSA$8@m+89s46@P*AYS2kzz;DO~h6ukCy!m+M@0&eQ;I>Zs(^BKba1CPPRm)sx2~F
zEIVUq@oiWe`p2;!!8(vU9h3PN|Ckrc@MgQYGI7B9?WL8AW&OFIo*yadXYuj8*Ft`@
zVstquBp4ZRucn=M>cl2wFH$k~A_)?QRtDKCR{!;+B`Tli6F=or!Y$2Ta(reWC>a7C
z8`e|E^e@CnFqh`Cm=M^#6zr30dHZW;u)yZI1@;GjwA!0a<(}TQw8HiI+80E~+a%(<
z?d^?o%<-ts*)YEZv~A_T2~08pwRSVRd|9r4z%`q5*f@2Nl{gBk@F6aT3aM~YTy6dm
z_oJ}%Ih073bSvAUc3<yo7u7njE9m#M$clew%sq2k*bVM|7v14Nf^U)P@?WMwe0B0A
zLZGS$h)5rAsY%0)Zin!+{lVZS0Yp0R%fc!nBPh1XA%{dU<BJ#x^mngYb0Rz2qq4Oz
zz9s+TwavOmWR8gO?>R+*DT)e9E{_SC!sPIm6%XRjB$1?ZpxG?1!Xa{Kom*9MUmG@4
zF<^mdh~nE$N3{^&`(=p6LX@|uuHLOhY9y4ojUfSNQ_RSxn`F#s;>yHlPb>fmdQy!$
zS0Ad+4_5#^fFhPgdP@n;+VelVlLZ`muM1y|bUfX<Tz1jrhz8Np5r^k>olaQAGGb61
zwA#uSi*Yw;c=wU1(i~zROOzNr+n5=l|H2&AC9g=tZ0jW<Vf3Y#<r7p>zL?@p@Xz;O
z5-a2U;bqnYF0FggkaNl;i(s-J6T^4;F4k9vO%AjZNs+QyEVw53)%@1W+FUR{dBQrB
zlnWE==3IX+*W&Jc?wXyW5c4>*r)3sSm8_J#$Gi>%s=6nV(dAQ1Xx%yam)ONg_Q~r?
zF<7PQdQgUge*Z5Pj4=%;MXYW!a5?+P&%fJ!%lUV=i&9S7)lzJa8gUm~>4{9lm5ui1
z?@F>3F&JC_t-$luyj~KKp0fAV@w}r>6_`EwF%Jw@fvLu4(9jeEiO?QvDi`Jp!Z3(W
zhLh5XAi$}2y!~m?%D0PtJFlSR%Vx7754{h*{ralrmbV5Ul#UJaGlc*;!6C2vqv*K2
zJN2?$ohQ?;^zg@`7*95lKkp)h!Fl-;_GG73Lo&x&+HL{-4H>{k!7K}%txop~?Hr+`
zZSqmUH6F8B@U^dpJx!l$@xpfuWk|96b?Zt)`62QB1rBcV(-dH5=!thjU<7EB*?}EY
zwab=e(QoGoE#f0^U6xJ)Qon$A<pQ%O%*8#{0PS>fD)CjgV>oBa{>r;{UZqVF`!W}X
zFcCq)(T1DgvA<{gDI}7*qdr4kfQYa%4^_z#MX6~s$$Li-`kow7v}fvlP%=@6(eZMB
zecYk}WPt}j3MZt3!s5~QU5+KOaKmHlLVT{>yU$J6e?PDG32RAx8eToGcbYZ&^-;bG
zfxL=liY8h-@z&{;DeV=X)NZTmVv`?PAY-S1-tA-4MHG4b!BIk(sl{WgDjn}g%th%J
zskCk@7Qw3XllR}7&G%&q#N4)NlBSyOv97w_X~FZd7#k7X^pDCpiiv01d@%iLDa*X`
z$qGi?@tAx7{xcw4Cv{sKLY6?l@6*Rq_x1y%vSV>?OnlPko14X7d2YQ8%EyPPIz>!7
zeli=WB3e>p*<J@LgH@;QVmB?WX^vv<c-&l=is}kg_|M?bJ4xiwGoQvdE9=utyw`L`
z;EPX-XTCOvjHJpD_gyHTJ%7M5CC|alNt(C5?s#y2L11vDx_3fYs}NNjXw#pV@SdfV
zpGzI+e}zwALKDI7gf7!LedEdoiHc1e__d1RO90^zsn>JydXkBEw_I7F#>xnOe&MjI
zE1`|foNxkz2PmIcum*ogu}j=nJ*=8io<cb8=H8xtO0-clu<pUwliSR`gsLPH8&S;8
z3B5J{Y0Q0f=seM~1mv8c6E)SaeEsA0A9;lgB9cD`)GDzVz0)<yp3XKRoLu<>iC>0N
z&qFQhjm+u43kVgVigR{$cAmx`JM=;5w#i97gW@6je|TvK0`S7(E%I66s(V3Pi^Bf=
ztHcDAidR_$AuHqf6ii^J^x3(}y%Z|CC9<b&D4|OWsZ=|eMoNzMh=Fu5^1Ozc8h4bW
z2QNh6Hl=O}(DpC57U{uv6NZFebM$a0`1S3}wBx&JhQtAROd)6Pp94{fcA21$HS`KS
zZ1~z2wIwfC^xaqFPW{SDcm@6Xp9}V-rKP=7{hL^&!UN4FVg75MO?pK8DC8CmIM2tn
zffpaw6~Q+5WI-Q;HW#;f^6*6}M#}ng1D@xMcv$lG(~t>=_0^(=tJA#ljN`kJ&3F5&
zBU1|xExqPFjmJyZp2-6fCwle?=8*-JR;$QyN`i++1|8-9ieu#)7W0mX8!ZmOli&{O
z`_G8(NcuA7J)_U{m61;`9~wMW7(R2kgsUo>)y3~W*U;z(sCssmhTZScgW=70sR+U9
zoxD`(VO|zNC;~0Red$eX`aLsps1}SYgyyhj*1Zos+xrVg_3tptt#2<rBd^f-vasBJ
zGp}ZKA>hFVV}ATi17KoxQ`z>YH{FW5@mUomMyS=s{9OqO(N^OEcaR7*x(`qDO+wE6
zWo^aC_}ctOp=aW|lWx(mboXP);1M66Xr14};`Y9}mE(j5^?|d^jg1QNQc6~Ou<kRE
z1|3581LxsoX8ZA@EHyIIuVjg3v|()dusd(g!Eb$ZVjT{{EH5{QLRro<v2o|PyQ||)
zz@-vx6l$l3^`T2Qy$x>%^9QP}xI>L*|HxZLpuYVKyOVHXC=6Ziw(*YvH@EPv%2(jG
z37B=;!0EDe*roMAY8bTQO?3gq$g)OiaUNS!v4G;^je|XX<u<&6k%OGLMmC&l_b_}!
z_|S;TT>Xx?IHs))o#Z4wDuimfPFXnk*f-mPlftRqAwgrpt&M+vHR%oq3T!5KJEC=M
z-iwda^x*_KiNfP=q3xHue^71Bdoi5)3RqtQAI0?+8rSw<4fwNDFuNFOc2c;t>HmZO
zHN|jWL%+*P`DZDFW@b;!Rysw9;e46;Vqru_EMXsiUScmcSuPyUTaU?O-BIM|@No6(
z#c{(>Z#Yt^2iRrA)%iX=Qd|1o7GJ-AsBn6=+{M0kw&`NcV--Hf{!#RaT%FHq*lfGR
z$BEUPGTEboxhQ36C_Dus$%PnSByXtc9X>3e4j9BdXHsqn$6C!swO#F%%i2s{_%4mU
z%S@hdTh*ObXHf)VtvLU~YC-{}V~Auwp(&8vX{!Nay9Kr-BfPxy-ma5l&EiwqB1Vj!
zF%=z4x7m)34QsiAh&W1FT4;^k3lI;%;YNU0M%J|hCVr%rHrdI<h`{G)OWwsLYeraM
ze^B$X{a@M1cv6}<R`Xx}AjxNr>(t6K#BW8+ca<W*D?I5D0X1mE18KIlEfcwLeMLu0
z`m4?I!{jXg*VQV|2HDeo5(-Co)64wWp7%7?3YfJa1oCUSzIs?86S`iHXQgU2A<69|
ze3sLA^2E`0!+)yg>?5Cu*n+rT-43mRGCq>`uO-h7ZqEX_Yw?wsa;vNKOIwh&zzmiw
z2R1488vmqyo%>p*v-5#Lm(I_wBsY~-sIKJJ&(5_q)7Fc9{K%}2!6T@eECEK-j<K!5
zcVa<SrtUOMh~~}<u=@V9y~H8$8yz4$n1SeE;^Sw-H`ab<${Mm~<lZ02%sqKMPe!vP
zQ+4JBrvb&c05*qwxnG7OcKbD&91A!7=W2dGvwGodA)wb~Iq{z%$Vsw!E{xl+=p4Dv
zs<?A*6Q`Ob;v3!OW0M|EaS}2-$X(L#tv06nEf45rLS{r&nuuCTn%%IGhgqj@{Vum6
zNJZZOec>-qmesCo_vyii(Z5YNW44gjja6^f^Gd~}&t~1XoEd)Ze`(4c3PsR^zptbo
zWr_QvTPFlFim!1cB3a%g&Su9-_np7|xN%DB^zP05;1sFF6u->Z*Dub+qIzmJgJz*m
z?>J^wIrc@?QMP->&NIK;Xx1vbVrG2^z9|-_(oPSrWe;_$T+eK6O;R+w_>9WVyTyi=
zHou(y=jWo}Mj$<8qob)%<0b~F_X2v9(^+_YT<#E?0vm~LBW5`(H149**1)+yPYsmb
zdwShz6Bc()vpOf(DRpzgl@$31^Vy4oNC0AUsHV3nm~AbO0QhSl*|&eGcjzu3gnjzA
zv!9a-cI_N61xz`VtvO2N5<C|F&rkUO&vZ(4UK7H9S(v*`?MVVRLrqy*sX_rA^gk73
B>H7cx
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/db-cont.svg
@@ -0,0 +1,1162 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg53383"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="db-cont.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective31" />
+    <linearGradient
+       id="linearGradient3264">
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="0"
+         id="stop3266" />
+      <stop
+         id="stop3276"
+         offset="0.25"
+         style="stop-color:#f8f8f8;stop-opacity:1;" />
+      <stop
+         id="stop3272"
+         offset="0.5"
+         style="stop-color:#e2e2e2;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b0b0b0;stop-opacity:1;"
+         offset="0.75"
+         id="stop3274" />
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="1"
+         id="stop3268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3264"
+       id="linearGradient3281"
+       gradientUnits="userSpaceOnUse"
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)" />
+    <linearGradient
+       id="linearGradient2300">
+      <stop
+         id="stop2302"
+         offset="0.0000000"
+         style="stop-color:#000000;stop-opacity:0.32673267;" />
+      <stop
+         id="stop2304"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="aigrd1"
+       gradientUnits="userSpaceOnUse"
+       x1="99.7773"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311">
+      <stop
+         offset="0"
+         style="stop-color:#184375"
+         id="stop53300" />
+      <stop
+         offset="1"
+         style="stop-color:#C8BDDC"
+         id="stop53302" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd1"
+       id="linearGradient53551"
+       gradientUnits="userSpaceOnUse"
+       x1="99.7773"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311"
+       gradientTransform="matrix(0.200685,0.000000,0.000000,0.200685,-0.585758,-1.050787)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3264"
+       id="linearGradient3760"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)"
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914" />
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop3344"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0.62886596;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         offset="0"
+         style="stop-color:#adb0a8;stop-opacity:1;" />
+      <stop
+         id="stop5079"
+         offset="1"
+         style="stop-color:#464744;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop2588"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2686" />
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="1"
+         id="stop2688" />
+    </linearGradient>
+    <inkscape:perspective
+       id="perspective49"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 24 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <radialGradient
+       r="13"
+       fy="-3.2182934"
+       fx="21.929186"
+       cy="-3.2182934"
+       cx="21.929186"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient3111"
+       xlink:href="#linearGradient3340-3"
+       inkscape:collect="always" />
+    <radialGradient
+       r="14.537862"
+       fy="28.116049"
+       fx="22.5"
+       cy="28.116049"
+       cx="22.5"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient3109"
+       xlink:href="#linearGradient2257"
+       inkscape:collect="always" />
+    <radialGradient
+       r="15.644737"
+       fy="36.421127"
+       fx="24.837126"
+       cy="36.421127"
+       cx="24.837126"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient3107"
+       xlink:href="#linearGradient8662"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="35.546108"
+       x2="21.816015"
+       y1="8.9115314"
+       x1="21.702389"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3105"
+       xlink:href="#linearGradient3837"
+       inkscape:collect="always" />
+    <radialGradient
+       r="14.537862"
+       fy="28.116049"
+       fx="22.5"
+       cy="28.116049"
+       cx="22.5"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient3103"
+       xlink:href="#linearGradient2257"
+       inkscape:collect="always" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4019"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4017"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient4015"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4013"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4011"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient4009"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4007"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3998"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3996"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3993"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3989"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3987"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3983"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3980"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3875"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3873"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3871"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3869"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3867"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3865"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3863"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3994"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3992"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3990"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3988"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3986"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3984"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3982"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3973"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3971"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3968"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3965"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3963"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3960"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3957"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3954"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3952"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3950"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="translate(-45.00042,-71.09425)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3948"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3946"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3944"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3942"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3940"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3858"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3856"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3854"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3852"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3850"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3848"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3846"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3844"
+       fy="24.25"
+       fx="25.03499"
+       r="14.034989"
+       cy="24.25"
+       cx="25.03499" />
+    <linearGradient
+       gradientTransform="translate(-45.00042,-71.09425)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient3058"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <linearGradient
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient3054"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <linearGradient
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3052"
+       y2="35.546108"
+       x2="21.816015"
+       y1="8.9115314"
+       x1="21.702389" />
+    <radialGradient
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3050"
+       fy="28.116049"
+       fx="22.5"
+       r="14.537862"
+       cy="28.116049"
+       cx="22.5" />
+    <radialGradient
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient8662"
+       id="radialGradient3047"
+       fy="36.421127"
+       fx="24.837126"
+       r="15.644737"
+       cy="36.421127"
+       cx="24.837126" />
+    <radialGradient
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3044"
+       fy="28.116049"
+       fx="22.5"
+       r="14.537862"
+       cy="28.116049"
+       cx="22.5" />
+    <radialGradient
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3340-3"
+       id="radialGradient3040"
+       fy="-3.2182934"
+       fx="21.929186"
+       r="13"
+       cy="-3.2182934"
+       cx="21.929186" />
+    <linearGradient
+       id="linearGradient2684-4">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop2686-6" />
+      <stop
+         offset="1"
+         style="stop-color:#000000;stop-opacity:1"
+         id="stop2688-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584-3">
+      <stop
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1"
+         id="stop2586-5" />
+      <stop
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0"
+         id="stop2588-7" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075-2">
+      <stop
+         offset="0"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         id="stop5077-8" />
+      <stop
+         offset="1"
+         style="stop-color:#ae9b00;stop-opacity:1"
+         id="stop5079-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691-4">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop2693-2" />
+      <stop
+         offset="1"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         id="stop2695-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop3342-1" />
+      <stop
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         id="stop3344-3" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="translate(-45.00042,-71.09425)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient2306-0"
+       y2="95"
+       x2="70.826942"
+       y1="124.11652"
+       x1="71.288956" />
+    <radialGradient
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2691-4"
+       id="radialGradient2314-7"
+       fy="83.990814"
+       fx="107.5884"
+       r="12.551644"
+       cy="83.990814"
+       cx="107.5884" />
+    <linearGradient
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient2690-7"
+       y2="88.923729"
+       x2="70.951942"
+       y1="101.74152"
+       x1="70.913956" />
+    <radialGradient
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2257"
+       id="radialGradient3845"
+       fy="28.116049"
+       fx="22.5"
+       r="14.537862"
+       cy="28.116049"
+       cx="22.5" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3837"
+       id="linearGradient3843"
+       y2="35.546108"
+       x2="21.816015"
+       y1="8.9115314"
+       x1="21.702389" />
+    <radialGradient
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2257"
+       id="radialGradient2263"
+       fy="28.116049"
+       fx="22.5"
+       r="14.537862"
+       cy="28.116049"
+       cx="22.5" />
+    <radialGradient
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient3340-3"
+       id="radialGradient1368"
+       fy="-3.2182934"
+       fx="21.929186"
+       r="13"
+       cy="-3.2182934"
+       cx="21.929186" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient8662"
+       id="radialGradient2228"
+       fy="36.421127"
+       fx="24.837126"
+       r="15.644737"
+       cy="36.421127"
+       cx="24.837126" />
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1"
+         id="stop8664" />
+      <stop
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0"
+         id="stop8666" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340-3">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop3342-4" />
+      <stop
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0"
+         id="stop3344-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         offset="0"
+         style="stop-color:#ef2929;stop-opacity:1"
+         id="stop2259" />
+      <stop
+         offset="1"
+         style="stop-color:#cc0000;stop-opacity:1"
+         id="stop2261" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1"
+         id="stop3839" />
+      <stop
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         id="stop3841" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         offset="0"
+         style="stop-color:#ccb600;stop-opacity:1;"
+         id="stop3840" />
+      <stop
+         offset="1"
+         style="stop-color:#fff59d;stop-opacity:1;"
+         id="stop3842" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient3362"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4212"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,2.8375548,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4215"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,2.8375548,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4218"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,2.8375548,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient4220"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.0056752,-36.819966,-72.182713)"
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4223"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,2.8375548,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4226"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,2.8375548,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient4228"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.99423209,0,0,1.1345837,-44.74498,-84.518165)"
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:showpageshadow="false"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.11764706"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.133209"
+     inkscape:cx="30.849263"
+     inkscape:cy="22.600978"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1074"
+     inkscape:window-height="718"
+     inkscape:window-x="151"
+     inkscape:window-y="37"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz/</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>system</rdf:li>
+            <rdf:li>applications</rdf:li>
+            <rdf:li>group</rdf:li>
+            <rdf:li>category</rdf:li>
+            <rdf:li>admin</rdf:li>
+            <rdf:li>root</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="shadow"
+     id="layer2"
+     inkscape:groupmode="layer" />
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       sodipodi:type="arc"
+       style="opacity:0.64772728;color:#000000;fill:none;stroke:#ffffff;stroke-width:1.62180054;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3283"
+       sodipodi:cx="23.511301"
+       sodipodi:cy="23.781593"
+       sodipodi:rx="12.727922"
+       sodipodi:ry="12.727922"
+       d="m 36.239223,23.781593 a 12.727922,12.727922 0 1 1 -25.455844,0 12.727922,12.727922 0 1 1 25.455844,0 z"
+       transform="matrix(0.616598,0,0,0.616598,6.8161989,8.539674)" />
+    <g
+       transform="matrix(-0.68905195,0,0,0.8954059,93.73874,-31.255459)"
+       id="layer4-1"
+       style="fill:url(#radialGradient3362);fill-opacity:1;display:inline" />
+    <path
+       style="opacity:0.15;color:#000000;fill:url(#radialGradient4226);fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:4.27993584;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2682-2"
+       d="m 13.412795,39.039184 0,-30.6730942 22.974692,14.9011692 -22.974692,15.771925 z"
+       inkscape:connector-curvature="0" />
+    <path
+       style="color:#000000;fill:url(#radialGradient4223);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3375-6"
+       d="m 13.852954,37.341091 0,-27.9693214 21.241504,13.9846624 -21.241504,13.984659 z"
+       inkscape:connector-curvature="0" />
+    <path
+       style="color:#000000;fill:url(#radialGradient4218);fill-opacity:1;stroke:url(#linearGradient4220);stroke-width:2.4989264;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2479-2"
+       d="m 13.852954,37.341091 0,-27.9693214 21.241504,13.9846624 -21.241504,13.984659 z"
+       inkscape:connector-curvature="0" />
+    <path
+       style="color:#000000;fill:url(#radialGradient4215);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2481-3"
+       d="m 14.293589,10.251218 0,26.210411 L 34.204784,23.356423 14.293589,10.251218 z m 0.88127,1.759932 17.239845,11.345273 -17.239845,11.345274 0,-22.690547 z"
+       inkscape:connector-curvature="0" />
+    <path
+       style="opacity:0.5;color:#000000;fill:url(#radialGradient4212);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible"
+       id="path2339-1"
+       d="m 15.120256,11.948807 0,11.75383 c 3.762316,-0.04504 8.076096,-0.347525 15.036669,-1.885641 L 15.120256,11.948807 z"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..d29af51a7daa80fc0340232ea68546c0c98f218e
GIT binary patch
literal 9058
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
U=<o}q{r~^~07*qoM6N<$f<_sZ_5c6?
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/db-step-in.svg
@@ -0,0 +1,1185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="48"
+   height="48"
+   id="svg1307"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="db-step-in.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="942"
+     inkscape:window-height="732"
+     id="namedview153"
+     showgrid="false"
+     inkscape:zoom="11.120117"
+     inkscape:cx="45.398399"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg1307" />
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient2817">
+      <stop
+         id="stop2819"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2821"
+         style="stop-color:#ffffff;stop-opacity:0.48453608"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2697">
+      <stop
+         id="stop2699"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2701"
+         style="stop-color:#3d556f;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2679">
+      <stop
+         id="stop2681"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2683"
+         style="stop-color:#ccd0c7;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3081">
+      <stop
+         id="stop3083"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3085"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2112"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2122"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2124"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2137"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2139"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2725"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2727"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2729"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2731"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2733"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2745"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2747"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2749"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2751"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2753"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2791"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2793"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2795"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2797"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2800"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2803"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2806"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-145.0004,-97.0943)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2809"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2823"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2825"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-26.09426)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2831"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,186.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2858"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2860"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2862"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2864"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3421"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3424"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3427"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3430"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3066"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3068"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3070"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3072"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3076"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3079"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3082"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3085"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3862"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3864"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3866"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3868"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3872"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3875"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3878"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3881"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3930"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3932"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3934"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3936"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3938"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3940"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3944"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <radialGradient
+       cx="15.987216"
+       cy="1.5350308"
+       r="17.171415"
+       fx="15.987216"
+       fy="1.5350308"
+       id="radialGradient1471"
+       xlink:href="#linearGradient8650"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-2.046729,-1.55761,0,44.11559,66.93275)" />
+    <radialGradient
+       cx="35.292667"
+       cy="20.494493"
+       r="16.9562"
+       fx="35.292667"
+       fy="20.494493"
+       id="radialGradient1469"
+       xlink:href="#linearGradient1442"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-0.843022,1.020168,0,0.606436,42.58614)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient1444"
+       xlink:href="#linearGradient8662-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8650">
+      <stop
+         id="stop8652"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8654"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662-5">
+      <stop
+         id="stop8664-5"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-5"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1442">
+      <stop
+         id="stop1444"
+         style="stop-color:#73d216;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop1446"
+         style="stop-color:#4e9a06;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient2332"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-25.12402,-17.82636)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2322"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2314"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient1764"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,46.1744,54.10111)" />
+    <linearGradient
+       id="linearGradient2187">
+      <stop
+         id="stop2189"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2191"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient8668"
+       xlink:href="#linearGradient8662-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8662-0">
+      <stop
+         id="stop8664-7"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-7"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2308">
+      <stop
+         id="stop2310"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2312"
+         style="stop-color:#edd400;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2316">
+      <stop
+         id="stop2318"
+         style="stop-color:#c4a000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2320"
+         style="stop-color:#c4a000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2326">
+      <stop
+         id="stop2328"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2330"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4285"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4288"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4291"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4293"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4301"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4303"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4305"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4307"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient3152"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient3155"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3158"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3160"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3932"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3935"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3938"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3941"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3979"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3981"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3983"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3985"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3987"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3989"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3991"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3993"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2326"
+       id="radialGradient3131"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)"
+       cx="15.09403"
+       cy="13.282721"
+       fx="15.09403"
+       fy="13.282721"
+       r="10.16466" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient3134"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)"
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.153309"
+       y2="11.735918" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2308"
+       id="linearGradient3137"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2316"
+       id="linearGradient3139"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>stop</rdf:li>
+            <rdf:li>playback</rdf:li>
+            <rdf:li>video</rdf:li>
+            <rdf:li>music</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="g3948">
+    <path
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z"
+       id="path2815"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3941);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z"
+       id="path2827"
+       style="color:#000000;fill:url(#radialGradient3938);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z"
+       id="path2762"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3935);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z"
+       id="path2811"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3932);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z"
+       id="path2479"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+  <g
+     id="g3141">
+    <path
+       sodipodi:nodetypes="ccccccc"
+       d="M 44.117176,3.2163465 C 47.943214,0.52153449 51.42355,28.446295 33.745367,28.819609 l 0,7.636668 -13.560892,-11.881386 13.560892,-12.460485 0,7.875305 C 45.200365,20.467008 41.087781,0.5535716 44.117176,3.2163465 z"
+       id="path1432"
+       style="color:#000000;fill:url(#linearGradient3137);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3139);stroke-width:1.61500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       d="M 44.143119,3.1084549 C 46.587837,2.3052332 49.373587,28.33916 32.919657,27.962459 l 0,6.597052 -11.442476,-9.989319 11.442476,-10.543459 0,6.742487 C 45.09727,23.660786 44.003867,1.5647582 44.143119,3.1084549 z"
+       id="path2177"
+       style="opacity:0.69886361;color:#000000;fill:none;stroke:url(#linearGradient3134);stroke-width:0.81454206;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 20.848487,24.596087 4.607747,-4.391758 c 5.111719,0.143992 2.807846,5.183715 11.951344,7.703577 l -4.031779,0.503973 -0.072,7.055612 -12.455316,-10.871404 z"
+       id="path2324"
+       style="opacity:0.51136361;color:#000000;fill:url(#radialGradient3131);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+       inkscape:connector-curvature="0" />
+  </g>
+  <g
+     transform="translate(0,28.820401)"
+     id="g3955">
+    <path
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z"
+       id="path3957"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3987);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z"
+       id="path3959"
+       style="color:#000000;fill:url(#radialGradient3989);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z"
+       id="path3961"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3991);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z"
+       id="path3963"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3993);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z"
+       id="path3965"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..31b6166d19f8351ca8bf606c60fd0f0bcafb230c
GIT binary patch
literal 9039
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
BiOv83
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/db-step-out.svg
@@ -0,0 +1,1190 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.0"
+   width="48"
+   height="48"
+   id="svg1307">
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient2817">
+      <stop
+         id="stop2819"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2821"
+         style="stop-color:#ffffff;stop-opacity:0.48453608"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2697">
+      <stop
+         id="stop2699"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2701"
+         style="stop-color:#3d556f;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2679">
+      <stop
+         id="stop2681"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2683"
+         style="stop-color:#ccd0c7;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3081">
+      <stop
+         id="stop3083"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3085"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2112"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2122"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2124"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2137"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2139"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2725"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2727"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2729"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2731"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2733"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2745"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2747"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2749"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2751"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2753"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2791"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2793"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2795"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2797"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2800"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2803"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2806"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-145.0004,-97.0943)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2809"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2823"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2825"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-26.09426)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2831"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,186.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2858"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2860"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2862"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2864"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3421"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3424"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3427"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3430"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3066"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3068"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3070"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3072"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3076"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3079"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3082"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3085"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3862"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3864"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3866"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3868"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3872"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3875"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3878"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3881"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3930"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3932"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3934"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3936"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3938"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3940"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3944"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <radialGradient
+       cx="15.987216"
+       cy="1.5350308"
+       r="17.171415"
+       fx="15.987216"
+       fy="1.5350308"
+       id="radialGradient1471"
+       xlink:href="#linearGradient8650"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-2.046729,-1.55761,0,44.11559,66.93275)" />
+    <radialGradient
+       cx="35.292667"
+       cy="20.494493"
+       r="16.9562"
+       fx="35.292667"
+       fy="20.494493"
+       id="radialGradient1469"
+       xlink:href="#linearGradient1442"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-0.843022,1.020168,0,0.606436,42.58614)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient1444"
+       xlink:href="#linearGradient8662-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8650">
+      <stop
+         id="stop8652"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8654"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662-5">
+      <stop
+         id="stop8664-5"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-5"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1442">
+      <stop
+         id="stop1444"
+         style="stop-color:#73d216;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop1446"
+         style="stop-color:#4e9a06;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient2332"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-25.12402,-17.82636)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2322"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2314"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient1764"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,46.1744,54.10111)" />
+    <linearGradient
+       id="linearGradient2187">
+      <stop
+         id="stop2189"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2191"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient8668"
+       xlink:href="#linearGradient8662-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8662-0">
+      <stop
+         id="stop8664-7"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-7"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2308">
+      <stop
+         id="stop2310"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2312"
+         style="stop-color:#edd400;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2316">
+      <stop
+         id="stop2318"
+         style="stop-color:#c4a000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2320"
+         style="stop-color:#c4a000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2326">
+      <stop
+         id="stop2328"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2330"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4285"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4288"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4291"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4293"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4301"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4303"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4305"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4307"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient3152"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient3155"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3158"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3160"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3932"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3935"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3938"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3941"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3979"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3981"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3983"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3985"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3987"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3989"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3991"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3993"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient3131"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.153309"
+       y2="11.735918"
+       id="linearGradient3134"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3137"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3139"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3146"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient3148"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.153309"
+       y2="11.735918"
+       id="linearGradient3150"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient3153"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>stop</rdf:li>
+            <rdf:li>playback</rdf:li>
+            <rdf:li>video</rdf:li>
+            <rdf:li>music</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="g3948">
+    <path
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z"
+       id="path2815"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3941);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z"
+       id="path2827"
+       style="color:#000000;fill:url(#radialGradient3938);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z"
+       id="path2762"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3935);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z"
+       id="path2811"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3932);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z"
+       id="path2479"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+  <g
+     transform="matrix(0,-1,1,0,9.8491719,66.812383)"
+     id="g3141">
+    <path
+       d="M 44.117176,3.2163465 C 47.943214,0.52153449 51.42355,28.446295 33.745367,28.819609 l 0,7.636668 -13.560892,-11.881386 13.560892,-12.460485 0,7.875305 C 45.200365,20.467008 41.087781,0.5535716 44.117176,3.2163465 z"
+       id="path1432"
+       style="color:#000000;fill:url(#linearGradient3146);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3148);stroke-width:1.61500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible" />
+    <path
+       d="M 44.143119,3.1084549 C 46.587837,2.3052332 49.373587,28.33916 32.919657,27.962459 l 0,6.597052 -11.442476,-9.989319 11.442476,-10.543459 0,6.742487 C 45.09727,23.660786 44.003867,1.5647582 44.143119,3.1084549 z"
+       id="path2177"
+       style="opacity:0.69886361;color:#000000;fill:none;stroke:url(#linearGradient3150);stroke-width:0.81454206;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible" />
+    <path
+       d="m 20.848487,24.596087 4.607747,-4.391758 c 5.111719,0.143992 2.807846,5.183715 11.951344,7.703577 l -4.031779,0.503973 -0.072,7.055612 -12.455316,-10.871404 z"
+       id="path2324"
+       style="opacity:0.51136361;color:#000000;fill:url(#radialGradient3153);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+  </g>
+  <g
+     transform="translate(0,28.820401)"
+     id="g3955">
+    <path
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z"
+       id="path3957"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3987);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z"
+       id="path3959"
+       style="color:#000000;fill:url(#radialGradient3989);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z"
+       id="path3961"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3991);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z"
+       id="path3963"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3993);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+    <path
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z"
+       id="path3965"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..77f6fb1a79e5f3407d9361f56ae9368bdf26efdb
GIT binary patch
literal 10928
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
SDvZJa0000<MNUMnLSTY_X+RMG
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/db-step.svg
@@ -0,0 +1,1197 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="48"
+   height="48"
+   id="svg1307"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="db-step.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview144"
+     showgrid="false"
+     inkscape:zoom="6.2802734"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg1307" />
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient2817">
+      <stop
+         id="stop2819"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2821"
+         style="stop-color:#ffffff;stop-opacity:0.48453608"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2697">
+      <stop
+         id="stop2699"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2701"
+         style="stop-color:#3d556f;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2679">
+      <stop
+         id="stop2681"
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2683"
+         style="stop-color:#ccd0c7;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3081">
+      <stop
+         id="stop3083"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3085"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2112"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2122"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2124"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2137"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2139"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2725"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2727"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2729"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2731"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2733"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2745"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2747"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2749"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2751"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2753"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2791"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2793"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2795"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2797"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2800"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2803"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2806"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-145.0004,-97.0943)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2809"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2823"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2825"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-26.09426)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2831"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,186.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2858"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2860"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2862"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2864"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3421"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3424"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3427"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3430"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3066"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3068"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3070"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3072"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3076"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3079"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3082"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3085"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3862"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3864"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3866"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3868"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3872"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3875"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3878"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3881"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3930"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3932"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3934"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3936"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3938"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.3506486,0,0,0.54288762,-227.80734,-41.066722)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient3940"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.583141e-6,-0.5517047,2.5629708,-6.4362101e-7,-255.94569,107.6634)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2859905,0,0,0.51688203,-216.46493,-38.571363)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3944"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5439796,0,0,0.51462591,-37.861026,-1.8434169)" />
+    <radialGradient
+       cx="15.987216"
+       cy="1.5350308"
+       r="17.171415"
+       fx="15.987216"
+       fy="1.5350308"
+       id="radialGradient1471"
+       xlink:href="#linearGradient8650"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-2.046729,-1.55761,0,44.11559,66.93275)" />
+    <radialGradient
+       cx="35.292667"
+       cy="20.494493"
+       r="16.9562"
+       fx="35.292667"
+       fy="20.494493"
+       id="radialGradient1469"
+       xlink:href="#linearGradient1442"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-0.843022,1.020168,0,0.606436,42.58614)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient1444"
+       xlink:href="#linearGradient8662-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8650">
+      <stop
+         id="stop8652"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8654"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662-5">
+      <stop
+         id="stop8664-5"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-5"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1442">
+      <stop
+         id="stop1444"
+         style="stop-color:#73d216;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop1446"
+         style="stop-color:#4e9a06;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient2332"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-25.12402,-17.82636)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2322"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient2314"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient1764"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,46.1744,54.10111)" />
+    <linearGradient
+       id="linearGradient2187">
+      <stop
+         id="stop2189"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2191"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient8668"
+       xlink:href="#linearGradient8662-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8662-0">
+      <stop
+         id="stop8664-7"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666-7"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2308">
+      <stop
+         id="stop2310"
+         style="stop-color:#edd400;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2312"
+         style="stop-color:#edd400;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2316">
+      <stop
+         id="stop2318"
+         style="stop-color:#c4a000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2320"
+         style="stop-color:#c4a000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2326">
+      <stop
+         id="stop2328"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2330"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4285"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4288"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4291"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4293"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4301"
+       xlink:href="#linearGradient2308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       id="linearGradient4303"
+       xlink:href="#linearGradient2316"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-52.912011,-6.2461712)" />
+    <linearGradient
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769"
+       id="linearGradient4305"
+       xlink:href="#linearGradient2187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-1.171926,-1.171926,0,-6.737611,47.854939)" />
+    <radialGradient
+       cx="15.09403"
+       cy="13.282721"
+       r="10.16466"
+       fx="15.09403"
+       fy="13.282721"
+       id="radialGradient4307"
+       xlink:href="#linearGradient2326"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.496031,0,0,2.300689,-78.036031,-24.072531)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2326"
+       id="radialGradient3152"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.0331228,0,0,-1.8740085,-5.0157934,53.519798)"
+       cx="15.09403"
+       cy="13.282721"
+       fx="15.09403"
+       fy="13.282721"
+       r="10.16466" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient3155"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.95458329,-0.95458329,0,53.059785,-5.0681686)"
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2308"
+       id="linearGradient3158"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2316"
+       id="linearGradient3160"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.81454229,0,0,-0.81454229,15.448783,38.999474)"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3081"
+       id="linearGradient3932"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)"
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2697"
+       id="linearGradient3935"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)"
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2679"
+       id="radialGradient3938"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)"
+       cx="169.77171"
+       cy="100.20107"
+       fx="169.77171"
+       fy="100.20107"
+       r="11" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2817"
+       id="linearGradient3941"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)"
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2817"
+       id="linearGradient3979"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)"
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2679"
+       id="radialGradient3981"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)"
+       cx="169.77171"
+       cy="100.20107"
+       fx="169.77171"
+       fy="100.20107"
+       r="11" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2697"
+       id="linearGradient3983"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)"
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3081"
+       id="linearGradient3985"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)"
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2817"
+       id="linearGradient3987"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.2553876,0,0,0.60128935,-385.70745,-46.744834)"
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2679"
+       id="radialGradient3989"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(7.6531818e-6,-0.61105494,4.2797901,-7.1285925e-7,-432.69442,117.98509)"
+       cx="169.77171"
+       cy="100.20107"
+       fx="169.77171"
+       fy="100.20107"
+       r="11" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2697"
+       id="linearGradient3991"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1474179,0,0,0.57248618,-366.76727,-43.981034)"
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3081"
+       id="linearGradient3993"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.5782224,0,0,0.56998736,-68.52461,-3.3020389)"
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>stop</rdf:li>
+            <rdf:li>playback</rdf:li>
+            <rdf:li>video</rdf:li>
+            <rdf:li>music</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="g3948">
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.14999999999999999;color:#000000;fill:none;stroke:url(#linearGradient3941);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2815"
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:url(#radialGradient3938);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2827"
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3935);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2762"
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3932);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2811"
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible"
+       id="path2479"
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z" />
+  </g>
+  <g
+     id="g3943">
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:url(#linearGradient3158);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3160);stroke-width:1.615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible"
+       id="path1432"
+       d="M 23.254087,2.3170754 C 55.8568,1.240951 50.704133,28.985857 33.745367,28.819609 l 0,7.636668 L 20.184475,24.574891 33.745367,12.114406 c 0,0 0,7.875305 0,7.875305 C 45.200365,20.467008 48.551732,2.5319679 23.254087,2.3170754 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.69886361;color:#000000;fill:none;stroke:url(#linearGradient3155);stroke-width:0.81454206;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible"
+       id="path2177"
+       d="m 40.725889,6.9753206 c 9.54896,4.9521134 6.669302,21.3638394 -7.806232,20.9871384 l 0,6.597052 c 0,0 -11.442476,-9.989319 -11.442476,-9.989319 L 32.919657,14.026733 c 0,0 0,6.742487 0,6.742487 12.087686,0.28368 11.533846,-10.391605 7.806232,-13.7938994 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.51136361;color:#000000;fill:url(#radialGradient3152);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path2324"
+       d="m 20.848487,24.596087 4.607747,-4.391758 c 5.111719,0.143992 2.807846,5.183715 11.951344,7.703577 l -4.031779,0.503973 -0.072,7.055612 -12.455316,-10.871404 z" />
+  </g>
+  <g
+     id="g3955"
+     transform="translate(0,28.820401)">
+    <path
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z"
+       id="path3957"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3987);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z"
+       id="path3959"
+       style="color:#000000;fill:url(#radialGradient3989);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z"
+       id="path3961"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3991);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z"
+       id="path3963"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3993);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z"
+       id="path3965"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible"
+       inkscape:connector-curvature="0" />
+  </g>
+  <g
+     id="g3967"
+     transform="translate(0,14.489816)">
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.15;color:#000000;fill:none;stroke:url(#linearGradient3979);stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3969"
+       d="m 1.0912395,4.0641145 0,12.6270745 18.0430855,0 0,-12.6270745 -18.0430855,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:url(#radialGradient3981);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3971"
+       d="m 1.517632,4.3927965 0,11.9697345 17.187014,0 0,-11.9697345 -17.187014,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3983);stroke-width:1.5;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3973"
+       d="m 1.5148283,4.3940481 0,12.0222089 17.1793407,0 0,-12.0222089 -17.1793407,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;fill:none;stroke:url(#linearGradient3985);stroke-width:0.70037949;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+       id="path3975"
+       d="m 2.3764769,4.9627829 0,10.8297601 15.4693311,0 0,-10.8297601 -15.4693311,0 z" />
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.5;color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible"
+       id="path3977"
+       d="m 2.8066584,5.2688715 0,6.0174935 14.6089616,-1.590452 0,-4.4774218 -14.6089616,0.050384 z" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..0802af8f12da358d9f3e32c370f089580b7a426e
GIT binary patch
literal 1721
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/db-stop.svg
@@ -0,0 +1,677 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="48"
+   height="48"
+   id="svg1307"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="db-stop.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview93"
+     showgrid="false"
+     inkscape:zoom="6.2802734"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg1307" />
+  <defs
+     id="defs1309">
+    <linearGradient
+       id="linearGradient2817">
+      <stop
+         id="stop2819"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2821"
+         style="stop-color:#ffffff;stop-opacity:0.48453608"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2697">
+      <stop
+         id="stop2699"
+         style="stop-color:#babdb6;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2701"
+         style="stop-color:#555753;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2679">
+      <stop
+         id="stop2681"
+         style="stop-color:#f7f7f7;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2683"
+         style="stop-color:#ccd0c7;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3081">
+      <stop
+         id="stop3083"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3085"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2112"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2122"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2124"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2137"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2139"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2725"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2727"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2729"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2731"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2733"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2745"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2747"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2749"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2751"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2753"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2791"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-42.61165,283.7891)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2793"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2795"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-12,0)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2797"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(133,70.99999)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2800"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2803"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2806"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-145.0004,-97.0943)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2809"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2823"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2825"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-26.09426)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2831"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,186.6949)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient2858"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103262,0,0,1.054917,-163.1228,-76.31138)" />
+    <radialGradient
+       cx="169.77171"
+       cy="100.20107"
+       r="11"
+       fx="169.77171"
+       fy="100.20107"
+       id="radialGradient2860"
+       xlink:href="#linearGradient2679"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.562309e-6,-1.07205,1.992104,-1.250658e-6,-175.6121,212.6949)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient2862"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.004384,-145.0004,-71.4625)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient2864"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-4e-4,-0.09426)" />
+    <linearGradient
+       x1="15.089521"
+       y1="15.291994"
+       x2="14"
+       y2="52.510574"
+       id="linearGradient3421"
+       xlink:href="#linearGradient3081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.000198,0,0,1,-67.006,-0.09426)" />
+    <linearGradient
+       x1="169"
+       y1="110.33805"
+       x2="169"
+       y2="93.204849"
+       id="linearGradient3424"
+       xlink:href="#linearGradient2697"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.498884,0,0,1.004384,-414.0618,-71.4625)" />
+    <linearGradient
+       x1="174.83363"
+       y1="84.263489"
+       x2="174.74524"
+       y2="105.49083"
+       id="linearGradient3430"
+       xlink:href="#linearGradient2817"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.624525,0,0,1.054917,-436.1019,-76.31138)" />
+    <filter
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       color-interpolation-filters="sRGB"
+       id="filter3489">
+      <feColorMatrix
+         result="result2"
+         type="saturate"
+         in="SourceGraphic"
+         values="1"
+         id="feColorMatrix3491" />
+      <feFlood
+         result="result1"
+         flood-opacity="1"
+         flood-color="rgb(254,102,0)"
+         id="feFlood3493" />
+      <feBlend
+         in2="result2"
+         mode="multiply"
+         in="result1"
+         result="result3"
+         id="feBlend3495" />
+      <feComposite
+         in2="SourceGraphic"
+         operator="in"
+         result="result4"
+         id="feComposite3497" />
+    </filter>
+    <filter
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       color-interpolation-filters="sRGB"
+       id="filter3499">
+      <feColorMatrix
+         result="result2"
+         type="saturate"
+         in="SourceGraphic"
+         values="1"
+         id="feColorMatrix3501" />
+      <feFlood
+         result="result1"
+         flood-opacity="1"
+         flood-color="rgb(254,102,0)"
+         id="feFlood3503" />
+      <feBlend
+         in2="result2"
+         mode="multiply"
+         in="result1"
+         result="result3"
+         id="feBlend3505" />
+      <feComposite
+         in2="SourceGraphic"
+         operator="in"
+         result="result4"
+         id="feComposite3507" />
+    </filter>
+    <filter
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       color-interpolation-filters="sRGB"
+       id="filter3509">
+      <feColorMatrix
+         result="result2"
+         type="saturate"
+         in="SourceGraphic"
+         values="1"
+         id="feColorMatrix3511" />
+      <feFlood
+         result="result1"
+         flood-opacity="1"
+         flood-color="rgb(254,102,0)"
+         id="feFlood3513" />
+      <feBlend
+         in2="result2"
+         mode="multiply"
+         in="result1"
+         result="result3"
+         id="feBlend3515" />
+      <feComposite
+         in2="SourceGraphic"
+         operator="in"
+         result="result4"
+         id="feComposite3517" />
+    </filter>
+    <filter
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       color-interpolation-filters="sRGB"
+       id="filter3519">
+      <feColorMatrix
+         result="result2"
+         type="saturate"
+         in="SourceGraphic"
+         values="1"
+         id="feColorMatrix3521" />
+      <feFlood
+         result="result1"
+         flood-opacity="1"
+         flood-color="rgb(254,102,0)"
+         id="feFlood3523" />
+      <feBlend
+         in2="result2"
+         mode="multiply"
+         in="result1"
+         result="result3"
+         id="feBlend3525" />
+      <feComposite
+         in2="SourceGraphic"
+         operator="in"
+         result="result4"
+         id="feComposite3527" />
+    </filter>
+    <filter
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       color-interpolation-filters="sRGB"
+       id="filter3529">
+      <feColorMatrix
+         result="result2"
+         type="saturate"
+         in="SourceGraphic"
+         values="1"
+         id="feColorMatrix3531" />
+      <feFlood
+         result="result1"
+         flood-opacity="1"
+         flood-color="rgb(254,102,0)"
+         id="feFlood3533" />
+      <feBlend
+         in2="result2"
+         mode="multiply"
+         in="result1"
+         result="result3"
+         id="feBlend3535" />
+      <feComposite
+         in2="SourceGraphic"
+         operator="in"
+         result="result4"
+         id="feComposite3537" />
+    </filter>
+    <radialGradient
+       cx="23.070683"
+       cy="35.127438"
+       r="10.31934"
+       fx="23.070683"
+       fy="35.127438"
+       id="radialGradient2097"
+       xlink:href="#linearGradient2091"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.914812,0.01265023,-0.00821502,0.213562,2.253914,27.18889)" />
+    <linearGradient
+       id="linearGradient2091">
+      <stop
+         id="stop2093"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2095"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="23.070683"
+       cy="35.127438"
+       r="10.31934"
+       fx="23.070683"
+       fy="35.127438"
+       id="radialGradient3774"
+       xlink:href="#linearGradient2091"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.914812,0.01265023,-0.00821502,0.213562,2.253914,27.18889)" />
+  </defs>
+  <metadata
+     id="metadata1312">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Lapo Calamandrei</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>media</rdf:li>
+            <rdf:li>stop</rdf:li>
+            <rdf:li>playback</rdf:li>
+            <rdf:li>video</rdf:li>
+            <rdf:li>music</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     style="display:inline"
+     transform="matrix(1.0709833,0,0,1.0709833,-1.8743797,-2.0804371)">
+    <path
+       d="m 14.00382,12.829103 0,22.153256 20.996184,0 0,-22.153256 -20.996184,0 z"
+       id="path2815"
+       style="opacity:0.15;color:#000000;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3430);stroke-width:1.99999952;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3529)"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 14.5,13.40575 0,21 20,0 0,-21 -20,0 z"
+       id="path2827"
+       style="color:#000000;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3519)"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 14.496737,13.407946 0,21.092064 19.991071,0 0,-21.092064 -19.991071,0 z"
+       id="path2762"
+       style="color:#000000;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3424);stroke-width:0.99999952;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3509)"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 15.499412,14.40575 0,19 18.001183,0 0,-19 -18.001183,0 z"
+       id="path2811"
+       style="color:#000000;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3421);stroke-width:0.99999976;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3499)"
+       inkscape:connector-curvature="0" />
+    <path
+       d="M 16,14.942758 16,25.5 l 17,-2.79033 0,-7.8553 -17,0.08839 z"
+       id="path2479"
+       style="opacity:0.5;color:#000000;fill:#d40000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible;filter:url(#filter3489)"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 33.278212,34.94062 a 10.31934,2.320194 0 1 1 -20.63868,0 10.31934,2.320194 0 1 1 20.63868,0 z"
+       transform="matrix(1.5216388,0,0,1.3064015,-10.77236,-6.2589442)"
+       id="path1361"
+       style="opacity:0.10439561;fill:url(#radialGradient3774);fill-opacity:1;stroke:none"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
deleted file mode 100644
index 532f4b4b8aa18a19aa29e550fe839c48e5d60689..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 671e3299121eb8de50d6e0564084e05904e48a87..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3fe18e6d45b2058d78520bfb6584ddfd78dee591..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b697dd8ec68ee5feaeef932c41f07eb13ea5661d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index dab44a4ad261a5d3236bd449a461cfff80bc5569..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..bdc277cd3b60d1657e1bdd28e8b4b4c3ab1edc3e
GIT binary patch
literal 7360
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/document-new.svg
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg249"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="document-new.svg"
+   inkscape:export-filename="/home/jimmac/gfx/novell/pdes/trunk/docs/BIGmime-text.png"
+   inkscape:export-xdpi="240.00000"
+   inkscape:export-ydpi="240.00000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective69" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4542">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop4544" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4546" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4542"
+       id="radialGradient4548"
+       cx="24.306795"
+       cy="42.07798"
+       fx="24.306795"
+       fy="42.07798"
+       r="15.821514"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,-6.310056e-16,30.08928)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient15662">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15664" />
+      <stop
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15666" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="64.5679"
+       fx="20.8921"
+       r="5.257"
+       cy="64.5679"
+       cx="20.8921"
+       id="aigrd3">
+      <stop
+         id="stop15573"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15575"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="114.5684"
+       fx="20.8921"
+       r="5.256"
+       cy="114.5684"
+       cx="20.8921"
+       id="aigrd2">
+      <stop
+         id="stop15566"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15568"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient269">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop270" />
+      <stop
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop271" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         style="stop-color:#fafafa;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop260" />
+      <stop
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop261" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12512">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop12513" />
+      <stop
+         style="stop-color:#fff520;stop-opacity:0.89108908;"
+         offset="0.50000000"
+         id="stop12517" />
+      <stop
+         style="stop-color:#fff300;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12514" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12512"
+       id="radialGradient278"
+       gradientUnits="userSpaceOnUse"
+       cx="55.000000"
+       cy="125.00000"
+       fx="55.000000"
+       fy="125.00000"
+       r="14.375000" />
+    <radialGradient
+       r="37.751713"
+       fy="3.7561285"
+       fx="8.8244190"
+       cy="3.7561285"
+       cx="8.8244190"
+       gradientTransform="matrix(0.968273,0.000000,0.000000,1.032767,3.353553,0.646447)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient15656"
+       xlink:href="#linearGradient269"
+       inkscape:collect="always" />
+    <radialGradient
+       r="86.708450"
+       fy="35.736916"
+       fx="33.966679"
+       cy="35.736916"
+       cx="33.966679"
+       gradientTransform="scale(0.960493,1.041132)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient15658"
+       xlink:href="#linearGradient259"
+       inkscape:collect="always" />
+    <radialGradient
+       r="38.158695"
+       fy="7.2678967"
+       fx="8.1435566"
+       cy="7.2678967"
+       cx="8.1435566"
+       gradientTransform="matrix(0.968273,0.000000,0.000000,1.032767,3.353553,0.646447)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient15668"
+       xlink:href="#linearGradient15662"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd2"
+       id="radialGradient2283"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       cx="20.8921"
+       cy="114.5684"
+       fx="20.8921"
+       fy="114.5684"
+       r="5.256" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd3"
+       id="radialGradient2285"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       cx="20.8921"
+       cy="64.5679"
+       fx="20.8921"
+       fy="64.5679"
+       r="5.257" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.32941176"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-130.2425"
+     inkscape:cy="-6.4480487"
+     inkscape:current-layer="layer6"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="872"
+     inkscape:window-height="688"
+     inkscape:window-x="166"
+     inkscape:window-y="151"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>New Document</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Shadow"
+     id="layer6"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="Base"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <rect
+       ry="1.1490486"
+       y="3.6464462"
+       x="6.6035528"
+       height="40.920494"
+       width="34.875000"
+       id="rect15391"
+       style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+    <rect
+       rx="0.14904857"
+       ry="0.14904857"
+       y="4.5839462"
+       x="7.6660538"
+       height="38.946384"
+       width="32.775887"
+       id="rect15660"
+       style="color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+    <g
+       id="g2270"
+       transform="translate(0.646447,-3.798933e-2)">
+      <g
+         transform="matrix(0.229703,0.000000,0.000000,0.229703,4.967081,4.244972)"
+         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4.0000000"
+         id="g1440">
+        <radialGradient
+           gradientUnits="userSpaceOnUse"
+           fy="114.56840"
+           fx="20.892099"
+           r="5.2560000"
+           cy="114.56840"
+           cx="20.892099"
+           id="radialGradient1442">
+          <stop
+             id="stop1444"
+             style="stop-color:#F0F0F0"
+             offset="0" />
+          <stop
+             id="stop1446"
+             style="stop-color:#474747"
+             offset="1" />
+        </radialGradient>
+        <path
+           id="path1448"
+           d="M 23.428000,113.07000 C 23.428000,115.04300 21.828000,116.64200 19.855000,116.64200 C 17.881000,116.64200 16.282000,115.04200 16.282000,113.07000 C 16.282000,111.09600 17.882000,109.49700 19.855000,109.49700 C 21.828000,109.49700 23.428000,111.09700 23.428000,113.07000 z "
+           style="stroke:none" />
+        <radialGradient
+           gradientUnits="userSpaceOnUse"
+           fy="64.567902"
+           fx="20.892099"
+           r="5.2570000"
+           cy="64.567902"
+           cx="20.892099"
+           id="radialGradient1450">
+          <stop
+             id="stop1452"
+             style="stop-color:#F0F0F0"
+             offset="0" />
+          <stop
+             id="stop1454"
+             style="stop-color:#474747"
+             offset="1" />
+        </radialGradient>
+        <path
+           id="path1456"
+           d="M 23.428000,63.070000 C 23.428000,65.043000 21.828000,66.643000 19.855000,66.643000 C 17.881000,66.643000 16.282000,65.043000 16.282000,63.070000 C 16.282000,61.096000 17.882000,59.497000 19.855000,59.497000 C 21.828000,59.497000 23.428000,61.097000 23.428000,63.070000 z "
+           style="stroke:none" />
+      </g>
+      <path
+         id="path15570"
+         d="M 9.9950109,29.952326 C 9.9950109,30.405530 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.7210780,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
+         style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000" />
+      <path
+         id="path15577"
+         d="M 9.9950109,18.467176 C 9.9950109,18.920380 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.920380 8.3535532,18.467176 C 8.3535532,18.013742 8.7210780,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
+         style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000" />
+    </g>
+    <path
+       sodipodi:nodetypes="cc"
+       id="path15672"
+       d="M 11.505723,5.4942766 L 11.505723,43.400869"
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.017543854" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path15674"
+       d="M 12.500000,5.0205154 L 12.500000,43.038228"
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.20467831" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="new"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="color:#000000;fill:url(#radialGradient278);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.2500002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block"
+       id="path12511"
+       sodipodi:cx="55.000000"
+       sodipodi:cy="125.00000"
+       sodipodi:rx="14.375000"
+       sodipodi:ry="14.375000"
+       d="M 69.375000 125.00000 A 14.375000 14.375000 0 1 1  40.625000,125.00000 A 14.375000 14.375000 0 1 1  69.375000 125.00000 z"
+       transform="matrix(0.783292,0.000000,0.000000,0.783292,-6.340883,-86.65168)"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/stock_new-16.png"
+       inkscape:export-xdpi="33.852203"
+       inkscape:export-ydpi="33.852203" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..4bef740f934bcae54881d31c269d33e0459f5b69
GIT binary patch
literal 7237
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%0DK83&dJI8$
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/document-open.svg
@@ -0,0 +1,535 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg97"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="document-open.svg"
+   inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/snowdunes/gnome-fs-directory-accept.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective90" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       id="linearGradient269">
+      <stop
+         id="stop270"
+         offset="0.0000000"
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
+      <stop
+         id="stop271"
+         offset="1.0000000"
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient269"
+       id="radialGradient8234"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.968273,0.000000,0.000000,1.046686,44.36453,-17.00717)"
+       cx="8.8244190"
+       cy="3.7561285"
+       fx="8.8244190"
+       fy="3.7561285"
+       r="37.751713" />
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         id="stop260"
+         offset="0.0000000"
+         style="stop-color:#fafafa;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#a8a8a8;stop-opacity:1;"
+         offset="0.5"
+         id="stop8238" />
+      <stop
+         id="stop261"
+         offset="1"
+         style="stop-color:#cdcdcd;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient259"
+       id="linearGradient8236"
+       x1="25.875"
+       y1="10.625"
+       x2="25.25"
+       y2="30.875"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,1.238806,0.000000,-7.880597)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient13842">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop13844" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop13846" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9766">
+      <stop
+         style="stop-color:#6194cb;stop-opacity:1;"
+         offset="0"
+         id="stop9768" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="1"
+         id="stop9770" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient148">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.13402061;"
+         offset="0.0000000"
+         id="stop149" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.051546391;"
+         offset="1.0000000"
+         id="stop150" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient335">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop336" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop337" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1789">
+      <stop
+         style="stop-color:#a0a0a0;stop-opacity:1;"
+         offset="0"
+         id="stop1790" />
+      <stop
+         style="stop-color:#a8a8a8;stop-opacity:1;"
+         offset="1"
+         id="stop1791" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient137">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.70059878;"
+         offset="0.0000000"
+         id="stop138" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop139" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient335"
+       id="linearGradient155"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.421537,0.703464)"
+       x1="19.116116"
+       y1="28.946041"
+       x2="19.426924"
+       y2="51.912693" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient148"
+       id="linearGradient156"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.535299,0.000000,0.000000,0.651339,3.451418,2.448000)"
+       x1="14.899379"
+       y1="27.059643"
+       x2="22.715446"
+       y2="41.836895" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient137"
+       id="linearGradient158"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.462696,0.000000,6.907908e-2,0.683669,0.000000,0.000000)"
+       x1="5.2657914"
+       y1="18.725863"
+       x2="8.2122240"
+       y2="52.625851" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1789"
+       id="radialGradient159"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.015635,0.000000,0.103105,1.000512,0.000000,-8.369458e-2)"
+       cx="26.106777"
+       cy="38.195114"
+       fx="26.106777"
+       fy="38.195114"
+       r="32.259769" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9766"
+       id="linearGradient13162"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,1.022118,52.05694,-1.323026)"
+       x1="22.175976"
+       y1="36.987999"
+       x2="22.065331"
+       y2="32.050499" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient13842"
+       id="linearGradient13848"
+       x1="22.25"
+       y1="37.625"
+       x2="19.75"
+       y2="14.875"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-123.73861"
+     inkscape:cy="37.388301"
+     inkscape:current-layer="layer3"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1027"
+     inkscape:window-height="818"
+     inkscape:window-x="407"
+     inkscape:window-y="30"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Folder Icon Accept</dc:title>
+        <dc:date>2005-01-31</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <dc:description>Active state - when files are being dragged to.</dc:description>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>Novell, Inc.</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Folder"
+     inkscape:groupmode="layer" />
+  <g
+     inkscape:label="Open"
+     id="layer3"
+     inkscape:groupmode="layer">
+    <path
+       sodipodi:nodetypes="ccccccssssccc"
+       style="color:#000000;fill:url(#radialGradient159);fill-opacity:1;fill-rule:nonzero;stroke:#5a5a5a;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path2375"
+       d="M 4.6200285,38.651015 C 4.6618365,39.07147 5.1174141,39.491924 5.5311838,39.491924 L 36.667346,39.491924 C 37.081116,39.491924 37.453078,39.07147 37.41127,38.651015 L 34.714653,11.531728 C 34.672845,11.111274 34.217267,10.69082 33.803498,10.69082 L 21.080082,10.69082 C 20.489536,10.69082 19.870999,10.311268 19.677221,9.7304849 L 18.574219,6.4246085 C 18.404967,5.9173308 18.027069,5.6888138 17.259746,5.6888138 L 2.3224188,5.6888138 C 1.9086492,5.6888138 1.5366876,6.109268 1.5784956,6.529722 L 4.6200285,38.651015 z " />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 3.3386019,17.533487 L 34.488461,17.533487"
+       id="path13113"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.3301525,37.533487 L 35.317907,37.533487"
+       id="path13160"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13139"
+       d="M 5.3301525,35.533487 L 35.317907,35.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.165152e-2,0,0,1.903841e-2,42.41538,36.93372)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       sodipodi:nodetypes="ccccccsscsscccc"
+       id="path2380"
+       d="M 6.1717518,38.418674 C 6.2031078,38.729001 6.0171270,38.935886 5.6963478,38.832443 L 5.6963478,38.832443 C 5.3755686,38.729001 5.1477798,38.522116 5.1164238,38.211789 L 2.0868572,6.8445942 C 2.0555012,6.5342670 2.2434512,6.3468711 2.5537784,6.3468711 L 17.303531,6.2554251 C 17.834815,6.2521313 18.042960,6.3087310 18.183330,6.7726371 C 18.183330,6.7726371 19.268704,9.8854350 19.429564,10.470742 L 17.873968,7.5537061 C 17.608788,7.0564434 17.275224,7.1399365 16.901178,7.1399365 L 3.7717775,7.1399365 C 3.4614503,7.1399365 3.2754695,7.3468213 3.3068255,7.6571485 L 6.2856462,38.522116 L 6.1717518,38.418674 z "
+       style="color:#000000;fill:url(#linearGradient158);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.1734115;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13145"
+       d="M 2.3052333,7.533487 L 17.088967,7.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13115"
+       d="M 2.7573333,11.533487 L 33.496214,11.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <g
+       inkscape:export-ydpi="74.800003"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       transform="matrix(1.034424,0.000000,0.104520,1.034424,-10.03248,2.631914)"
+       id="g2381"
+       style="fill:#ffffff;fill-opacity:0.58031088;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4.0000000;display:block">
+      <path
+         sodipodi:nodetypes="cscscs"
+         id="path2382"
+         d="M 41.785743,9.0363862 C 41.795369,8.5618034 41.800932,8.3118806 41.362350,8.3121830 L 28.806530,8.3208402 C 28.506530,8.3208402 28.481916,8.1776341 28.806530,8.3208402 C 29.131144,8.4640463 30.053628,8.9791114 30.989227,9.0218349 C 30.989227,9.0218349 41.785704,9.0382983 41.785743,9.0363862 z "
+         style="stroke:none" />
+    </g>
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13123"
+       d="M 3.1628954,15.533487 L 33.993452,15.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.1594716,33.533487 L 35.147226,33.533487"
+       id="path13121"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13119"
+       d="M 4.8658086,31.533487 L 34.974533,31.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.6336367,29.533487 L 34.802847,29.533487"
+       id="path13135"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13137"
+       d="M 4.4629557,27.533487 L 34.632166,27.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.2556718,25.533487 L 34.460793,25.533487"
+       id="path13143"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13133"
+       d="M 4.0235198,23.533487 L 34.289101,23.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 3.8528389,21.533487 L 34.11842,21.533487"
+       id="path13117"
+       sodipodi:nodetypes="cc" />
+    <g
+       inkscape:export-ydpi="74.800003"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       transform="matrix(1.034424,0,0.10452,1.034424,-10.03248,2.631914)"
+       id="g1853"
+       style="fill:#ffffff;fill-opacity:0.5803109;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4;display:block">
+      <path
+         sodipodi:nodetypes="cscscs"
+         id="path1855"
+         d="M 41.785743,9.0363862 C 41.795369,8.5618034 41.800932,8.3118806 41.36235,8.312183 L 28.80653,8.3208402 C 28.50653,8.3208402 28.481916,8.1776341 28.80653,8.3208402 C 29.131144,8.4640463 30.053628,8.9791114 30.989227,9.0218349 C 30.989227,9.0218349 41.785704,9.0382983 41.785743,9.0363862 z "
+         style="stroke:none" />
+    </g>
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 2.9642313,13.533487 L 33.990735,13.533487"
+       id="path13127"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path13125"
+       d="M 3.6514189,19.533487 L 33.947215,19.533487"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 2.5242572,9.5334871 L 17.805073,9.5334871"
+       id="path13147"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.39204545;color:#000000;fill:url(#linearGradient13848);fill-opacity:1.0;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 34.375,14.125 L 37,38.75 L 6,38.875 C 6,38.875 4.125,14.125 4.125,14.125 C 4.125,14.125 34.5,14.125 34.375,14.125 z "
+       id="path13840"
+       sodipodi:nodetypes="cccsc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient8236);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient8234);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 43.375,2.4944033 C 43.875,19.373135 34.299937,21.022879 37.362437,31.494661 C 37.362437,31.494661 5.875,32.380598 5.875,32.380598 C 4,19.527986 14.25,11.166045 11.25,2.649254 L 43.375,2.4944033 z "
+       id="path8230"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 15.4375,6.5624999 L 39,6.5624999"
+       id="path8277"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:export-ydpi="74.800003"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       sodipodi:nodetypes="cccsscccscc"
+       id="path2401"
+       d="M 5.7785654,39.065997 C 5.8820074,39.277466 6.0888914,39.488925 6.3992173,39.488925 L 39.70767,39.488925 C 39.914562,39.488925 40.228834,39.36262 40.415844,39.224574 C 40.946246,38.833039 41.070704,38.612189 41.308626,38.251107 C 43.756752,34.535647 47.113767,18.974214 47.113767,18.974214 C 47.217209,18.762754 47.010326,18.551294 46.7,18.551294 L 11.776358,18.551294 C 11.466032,18.551294 10.120393,34.658624 6.9133592,37.838317 L 5.6751235,39.065997 L 5.7785654,39.065997 z "
+       style="opacity:1;color:#000000;fill:url(#linearGradient13162);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path8279"
+       d="M 15.356073,8.5624999 L 35.08142,8.5624999"
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       id="path323"
+       d="M 13.134476,20.138641 C 12.361729,25.129398 11.633175,29.147884 10.418486,33.652505 C 12.804971,32.945398 17.534602,30.448000 27.534602,30.448000 C 37.534602,30.448000 44.258175,21.199301 45.186253,20.094447 L 13.134476,20.138641 z "
+       style="fill:url(#linearGradient156);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 15.143007,10.5625 L 39.457831,10.5625"
+       id="path8281"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient155);stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible;opacity:0.52272727"
+       d="M 45.820083,19.687500 L 12.661612,19.687500 C 12.661612,19.687500 10.513864,35.707107 7.9393398,37.928078 C 16.060417,37.928078 39.510511,37.879442 39.530330,37.879442 C 41.281989,37.879442 44.437971,25.243248 45.820083,19.687500 z "
+       id="path324"
+       sodipodi:nodetypes="cccsc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path8283"
+       d="M 14.398767,12.5625 L 38.252159,12.5625"
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1.00000048;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 13.629028,14.5625 L 36.975331,14.5625"
+       id="path8285"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path8287"
+       d="M 12.520679,16.5625 L 31.16684,16.5625"
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 6.375,31.75 C 5.1336344,19.511961 13.5625,12.6875 12,2.9999999 L 42.875,2.9999999 L 12.875,3.6249999 C 14.125,13.1875 6.6786165,18.271447 6.375,31.75 z "
+       id="path8289"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="pattern" />
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..c25162a426706a97998d5c093011e83fdddb3c26
GIT binary patch
literal 4830
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/document-print.svg
@@ -0,0 +1,532 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="document-print.svg"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg2994"
+   height="48px"
+   width="48px"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective84" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient7612">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop7614" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop7616" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7612"
+       id="radialGradient7618"
+       cx="24.000000"
+       cy="41.875000"
+       fx="24.000000"
+       fy="41.875000"
+       r="19.125000"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,0.000000,27.91667)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4762">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.12371134;"
+         offset="0.0000000"
+         id="stop4764" />
+      <stop
+         id="stop4768"
+         offset="0.10344828"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4766" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4741">
+      <stop
+         id="stop4743"
+         offset="0.0000000"
+         style="stop-color:#dcdcda;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4745"
+         offset="1.0000000"
+         style="stop-color:#bab9b7;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4733">
+      <stop
+         id="stop4735"
+         offset="0.0000000"
+         style="stop-color:#000000;stop-opacity:0.23711340;" />
+      <stop
+         id="stop4737"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4698">
+      <stop
+         id="stop4700"
+         offset="0.0000000"
+         style="stop-color:#fffffd;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#bbbbb9;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop4706" />
+      <stop
+         id="stop4702"
+         offset="1.0000000"
+         style="stop-color:#000000;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4688">
+      <stop
+         id="stop4690"
+         offset="0.0000000"
+         style="stop-color:#666666;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4692"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4680"
+       inkscape:collect="always">
+      <stop
+         id="stop4682"
+         offset="0"
+         style="stop-color:#f7f6f5;stop-opacity:1;" />
+      <stop
+         id="stop4684"
+         offset="1"
+         style="stop-color:#f7f6f5;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4668">
+      <stop
+         id="stop4670"
+         offset="0"
+         style="stop-color:#8e8d87;stop-opacity:1;" />
+      <stop
+         style="stop-color:#cbc9c1;stop-opacity:1.0000000;"
+         offset="0.27586207"
+         id="stop4676" />
+      <stop
+         id="stop4672"
+         offset="1.0000000"
+         style="stop-color:#8e8d87;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         id="stop260"
+         offset="0.0000000"
+         style="stop-color:#e0e0e0;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.40546969"
+         id="stop4886" />
+      <stop
+         style="stop-color:#cdcdcd;stop-opacity:1.0000000;"
+         offset="0.53448278"
+         id="stop4884" />
+      <stop
+         id="stop261"
+         offset="1.0000000"
+         style="stop-color:#494949;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662">
+      <stop
+         id="stop15664"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+      <stop
+         id="stop15666"
+         offset="1.0000000"
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="2.1227016"
+       fy="26.925594"
+       fx="9.1295490"
+       cy="26.925594"
+       cx="9.1295490"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient1433"
+       xlink:href="#linearGradient4698"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="72.064316"
+       x2="9.9128132"
+       y1="57.227650"
+       x1="9.8698082"
+       gradientTransform="matrix(2.772086,0.000000,0.000000,0.360739,0.618718,2.883883)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1447"
+       xlink:href="#linearGradient4733"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="54.136139"
+       x2="10.338233"
+       y1="64.652260"
+       x1="10.338233"
+       gradientTransform="matrix(2.369844,0.000000,0.000000,0.421969,0.000000,2.000000)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1451"
+       xlink:href="#linearGradient4680"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="62.282467"
+       x2="9.7052784"
+       y1="70.724976"
+       x1="9.7316532"
+       gradientTransform="matrix(2.369844,0.000000,0.000000,0.421969,0.000000,2.000000)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1453"
+       xlink:href="#linearGradient4688"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="19.337463"
+       x2="20.717800"
+       y1="25.140253"
+       x1="20.771229"
+       gradientTransform="matrix(1.198769,0,0,0.853565,-0.143086,2.034513)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1456"
+       xlink:href="#linearGradient15662"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="25.247311"
+       x2="24.789707"
+       y1="3.6785457"
+       x1="25.056711"
+       gradientTransform="matrix(0.944939,0,0,1.076147,6.844577e-2,4.093177)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1459"
+       xlink:href="#linearGradient259"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="58.831264"
+       x2="15.487823"
+       y1="32.539238"
+       x1="15.387969"
+       gradientTransform="matrix(1.490161,0,0,0.668741,8.895132e-2,2)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1464"
+       xlink:href="#linearGradient4762"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="88.294930"
+       x2="18.972126"
+       y1="88.294930"
+       x1="1.8456430"
+       gradientTransform="matrix(2.291824,0,0,0.434269,8.855179e-2,2)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1468"
+       xlink:href="#linearGradient4741"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="88.294933"
+       x2="18.972126"
+       y1="88.294933"
+       x1="1.8456431"
+       gradientTransform="matrix(2.30272,0,0,0.437918,0,0.584034)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient1471"
+       xlink:href="#linearGradient4668"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="160"
+     inkscape:window-x="331"
+     inkscape:window-height="688"
+     inkscape:window-width="872"
+     inkscape:guide-bbox="true"
+     showguides="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer1"
+     inkscape:cy="-18.264187"
+     inkscape:cx="-72.591911"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.090196078"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:showpageshadow="false"
+     fill="#729fcf" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Print Document</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>document</rdf:li>
+            <rdf:li>lpr</rdf:li>
+            <rdf:li>print</rdf:li>
+            <rdf:li>local</rdf:li>
+            <rdf:li>laser</rdf:li>
+            <rdf:li>bubblejet</rdf:li>
+            <rdf:li>inkjet</rdf:li>
+            <rdf:li>print</rdf:li>
+            <rdf:li>output</rdf:li>
+            <rdf:li>cups</rdf:li>
+            <rdf:li>lpd</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1"
+     id="layer1">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.411405e-2,0,0,1.929202e-2,45.48953,39.75228)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <rect
+       ry="1.7115477"
+       rx="1.7115483"
+       y="36.004189"
+       x="4.75"
+       height="6.4915943"
+       width="38.4375"
+       id="rect4652"
+       style="fill:url(#linearGradient1471);fill-opacity:1;stroke:#595959;stroke-width:0.99999982;stroke-miterlimit:4;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="cssssssssssss"
+       id="rect4609"
+       d="M 7.1308961,21.5 L 40.870615,21.5 C 41.255661,21.5 41.747648,21.788155 42.051049,22.223919 C 42.354451,22.659684 43.787518,24.83394 44.109448,25.297964 C 44.431378,25.761987 44.502397,26.201852 44.502397,26.774049 L 44.502397,38.850951 C 44.502397,39.764524 43.770402,40.5 42.861152,40.5 L 5.1403596,40.5 C 4.2311094,40.5 3.4991138,39.764524 3.4991138,38.850951 L 3.4991138,26.774049 C 3.4991138,26.280031 3.6002798,25.571641 3.9455202,25.120718 C 4.3811666,24.551713 5.5498664,22.57277 5.8581276,22.153118 C 6.1663887,21.733467 6.7324461,21.5 7.1308961,21.5 z "
+       style="color:#000000;fill:url(#linearGradient1468);fill-opacity:1;fill-rule:nonzero;stroke:#676767;stroke-width:1.00000036;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cssssssss"
+       id="path4718"
+       d="M 7.705278,21.975532 C 7.20729,21.975532 6.5669691,22.107308 6.3043987,22.511224 L 4.4657443,25.339651 C 4.169761,25.794966 4.4993705,26.868141 5.3900051,26.868141 L 42.678553,26.868141 C 43.883282,26.868141 43.8868,25.858073 43.602814,25.428039 L 41.851714,22.776389 C 41.534204,22.295589 41.418956,21.975532 40.625945,21.975532 L 7.705278,21.975532 z "
+       style="fill:#fbfbfb;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1464);stroke-width:0.94696701;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 7.6002951,22.445756 L 40.374658,22.445756 C 40.739745,22.445756 41.206233,22.718629 41.493909,23.131283 C 41.781585,23.543938 42.788049,25.160945 43.093293,25.60036 C 43.398536,26.039775 43.528159,26.456312 43.528159,26.998164 L 43.528159,38.279261 C 43.528159,39.144385 43.394653,39.528356 42.532529,39.528356 L 5.530506,39.528356 C 4.6683828,39.528356 4.472593,39.144385 4.472593,38.279261 L 4.472593,26.998164 C 4.472593,26.530345 4.6930819,25.859523 5.0204282,25.432514 C 5.4334949,24.893685 6.1012112,23.461633 6.393495,23.064237 C 6.6857789,22.666841 7.222497,22.445756 7.6002951,22.445756 z "
+       id="path4750"
+       sodipodi:nodetypes="cssssssssssss" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="rect15391"
+       d="M 11.68177,4.4977642 L 36.313839,4.4977642 C 36.964072,4.4977642 37.487546,5.007949 37.487546,5.6416762 L 37.487546,24.348117 L 10.508063,24.348117 L 10.508063,5.6416762 C 10.508063,5.007949 11.031536,4.4977642 11.68177,4.4977642 z "
+       style="color:#000000;fill:url(#linearGradient1459);fill-opacity:1;fill-rule:nonzero;stroke:#898989;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <rect
+       style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1456);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       id="rect15660"
+       width="25.000576"
+       height="18.836374"
+       x="11.498513"
+       y="5.4992466"
+       ry="0.17677675"
+       rx="0.17677672" />
+    <rect
+       ry="1.7115483"
+       rx="1.7115483"
+       y="27.375000"
+       x="6.8750000"
+       height="5.1875000"
+       width="33.750000"
+       id="rect4678"
+       style="fill:url(#linearGradient1451);fill-opacity:1.0000000;stroke:url(#linearGradient1453);stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
+    <path
+       transform="translate(0.000000,2.000000)"
+       d="M 10.871767 27.626486 A 1.2816310 1.2816310 0 1 1  8.3085046,27.626486 A 1.2816310 1.2816310 0 1 1  10.871767 27.626486 z"
+       sodipodi:ry="1.2816310"
+       sodipodi:rx="1.2816310"
+       sodipodi:cy="27.626486"
+       sodipodi:cx="9.5901356"
+       id="path4696"
+       style="fill:url(#radialGradient1433);fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:nodetypes="csscssssc"
+       id="path4731"
+       d="M 11.743718,25.416053 L 37.306218,25.478553 C 37.993716,25.480234 38.294038,25.107558 38.243718,24.478553 L 38.118718,22.916053 L 39.984835,22.916053 C 40.797335,22.916053 40.975035,23.108616 41.172335,23.478553 L 41.672335,24.416053 C 42.199130,25.403793 43.483508,26.390165 42.170495,26.390165 C 37.667784,26.390165 13.993718,26.041053 11.743718,25.416053 z "
+       style="fill:url(#linearGradient1447);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.36571429" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+       d="M 42.9375,26.5 L 4.8125,26.5"
+       id="path4760"
+       sodipodi:nodetypes="cc" />
+    <g
+       transform="translate(0.000000,2.000000)"
+       style="opacity:0.43575415"
+       id="g4849">
+      <rect
+         style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4831"
+         width="19.000000"
+         height="1.0000000"
+         x="14.000000"
+         y="5.0000000" />
+      <rect
+         y="7.0000000"
+         x="14.000000"
+         height="1.0000000"
+         width="19.000000"
+         id="rect4833"
+         style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4835"
+         width="19.000000"
+         height="1.0000000"
+         x="14.000000"
+         y="9.0000000" />
+      <rect
+         y="11.000000"
+         x="14.000000"
+         height="1.0000000"
+         width="19.000000"
+         id="rect4837"
+         style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4839"
+         width="11.000000"
+         height="1.0000000"
+         x="14.000000"
+         y="13.000000" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="arrow">
+    <path
+       sodipodi:nodetypes="cccccccc"
+       id="path8643"
+       d="M 21.02159,20.989431 L 27.989391,20.989431 L 27.989391,16.064984 L 31,16.064984 L 24.553756,8 L 17.435622,15.986875 L 21.023684,15.986875 L 21.02159,20.989431 z "
+       style="opacity:1;color:#000000;fill:#a7a7a7;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999958;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..6c532d6e08d9233864a62f405422fbc1384cde64
GIT binary patch
literal 11288
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
G;{O1T^6JI_
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/document-save-as.svg
@@ -0,0 +1,663 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="document-save-as.svg"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg2913"
+   height="48px"
+   width="48px"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective111" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       id="linearGradient6965">
+      <stop
+         style="stop-color:#dddddd;stop-opacity:1;"
+         offset="0"
+         id="stop6967" />
+      <stop
+         style="stop-color:#fdfdfd;stop-opacity:1;"
+         offset="1"
+         id="stop6969" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient6925">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1;"
+         offset="0"
+         id="stop6927" />
+      <stop
+         style="stop-color:#204a87;stop-opacity:0;"
+         offset="1"
+         id="stop6929" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient6901">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop6903" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0;"
+         offset="1"
+         id="stop6905" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4991">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop4993" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4995" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4991"
+       id="radialGradient4997"
+       cx="23.447077"
+       cy="6.4576745"
+       fx="23.447077"
+       fy="6.4576745"
+       r="19.0625"
+       gradientTransform="matrix(-1.314471,-1.006312e-2,-1.022964e-2,1.336221,46.22108,-4.909887)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2187"
+       inkscape:collect="always">
+      <stop
+         id="stop2189"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop2191"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient1764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.914114,1.412791e-16,-1.412791e-16,0.914114,-3.868698,-2.706902)"
+       x1="33.059906"
+       y1="27.394117"
+       x2="12.624337"
+       y2="12.583769" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient8668"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737"
+       gradientTransform="matrix(1.000000,-7.816467e-32,-1.132409e-32,0.536723,-5.897962e-14,16.87306)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2555">
+      <stop
+         id="stop2557"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561" />
+      <stop
+         id="stop2563"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565" />
+      <stop
+         id="stop2559"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4264"
+       inkscape:collect="always">
+      <stop
+         id="stop4266"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop4268"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4254"
+       inkscape:collect="always">
+      <stop
+         id="stop4256"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4258"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244">
+      <stop
+         id="stop4246"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4236"
+       inkscape:collect="always">
+      <stop
+         id="stop4238"
+         offset="0"
+         style="stop-color:#eeeeee;stop-opacity:1;" />
+      <stop
+         id="stop4240"
+         offset="1"
+         style="stop-color:#eeeeee;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228">
+      <stop
+         id="stop4230"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184">
+      <stop
+         id="stop4186"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="translate(0.795493,3.799180)"
+       y2="35.281250"
+       x2="24.687500"
+       y1="35.281250"
+       x1="7.0625000"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4209"
+       xlink:href="#linearGradient4184"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="40.943935"
+       x2="36.183067"
+       y1="28.481176"
+       x1="7.6046205"
+       id="linearGradient4234"
+       xlink:href="#linearGradient4228"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="33.758667"
+       x2="12.221823"
+       y1="37.205811"
+       x1="12.277412"
+       id="linearGradient4242"
+       xlink:href="#linearGradient4236"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.286242,0.781698,-0.710782,1.169552,-2.354348,0.248140)"
+       r="20.935817"
+       fy="2.9585190"
+       fx="15.571491"
+       cy="2.9585190"
+       cx="15.571491"
+       id="radialGradient4250"
+       xlink:href="#linearGradient4244"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="47.620636"
+       x2="44.096100"
+       y1="4.4331360"
+       x1="12.378357"
+       id="linearGradient4260"
+       xlink:href="#linearGradient4254"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.651032,-2.885063e-16,9.455693)"
+       r="23.555494"
+       fy="27.096155"
+       fx="23.201941"
+       cy="27.096155"
+       cx="23.201941"
+       id="radialGradient4270"
+       xlink:href="#linearGradient4264"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="26.357183"
+       x2="23.688078"
+       y1="11.318835"
+       x1="23.688078"
+       id="linearGradient4272"
+       xlink:href="#linearGradient4274"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2555"
+       id="linearGradient2553"
+       x1="33.431175"
+       y1="31.964777"
+       x2="21.747974"
+       y2="11.780679"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6901"
+       id="linearGradient6907"
+       x1="14.751649"
+       y1="15.868432"
+       x2="8.8953285"
+       y2="16.743431"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6925"
+       id="linearGradient6931"
+       x1="12.25"
+       y1="18.25"
+       x2="7"
+       y2="21.118431"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6965"
+       id="linearGradient6971"
+       x1="28.061466"
+       y1="31.431349"
+       x2="28.061466"
+       y2="36.437492"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="0"
+     inkscape:window-height="818"
+     inkscape:window-width="999"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer2"
+     inkscape:cy="15.12998"
+     inkscape:cx="-21.21754"
+     inkscape:zoom="2.8284271"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.22745098"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:showpageshadow="false"
+     fill="#3465a4"
+     stroke="#204a87" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Save As</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>hdd</rdf:li>
+            <rdf:li>hard drive</rdf:li>
+            <rdf:li>save as</rdf:li>
+            <rdf:li>io</rdf:li>
+            <rdf:li>store</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:identifier />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="pix"
+     id="layer2"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.411405e-2,0,0,1.929202e-2,45.48953,41.75228)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       sodipodi:nodetypes="cccsccccccccc"
+       id="path4196"
+       d="M 11.28569,13.087628 C 10.66069,13.087628 10.254441,13.377808 10.004442,13.931381 C 10.004441,13.931381 3.5356915,31.034938 3.5356915,31.034938 C 3.5356915,31.034938 3.2856915,31.706497 3.2856915,32.816188 C 3.2856915,32.816188 3.2856915,42.466156 3.2856915,42.466156 C 3.2856915,43.548769 3.943477,44.091158 4.9419415,44.091156 L 43.50444,44.091156 C 44.489293,44.091156 45.09819,43.372976 45.09819,42.247406 L 45.09819,32.597438 C 45.09819,32.597438 45.204153,31.827015 45.00444,31.284938 L 38.28569,14.087631 C 38.101165,13.575725 37.648785,13.099533 37.16069,13.087628 L 11.28569,13.087628 z "
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#535353;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path4170"
+       d="M 3.2735915,32.121812 L 4.0381936,31.429597 L 41.647883,31.492097 L 45.11029,31.809395 L 45.11029,42.247927 C 45.11029,43.373496 44.503272,44.091258 43.518419,44.091258 L 4.9354314,44.091258 C 3.9369667,44.091258 3.2735915,43.549207 3.2735915,42.466594 L 3.2735915,32.121812 z "
+       style="fill:url(#linearGradient4234);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.02044296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="csccccccs"
+       id="path3093"
+       d="M 3.5490842,31.039404 C 2.8347985,32.50369 3.5484686,33.432261 4.5847985,33.432261 C 4.5847985,33.432261 43.584797,33.432261 43.584797,33.432261 C 44.703844,33.408451 45.430035,32.420356 45.013368,31.289403 L 38.299082,14.078704 C 38.114558,13.566798 37.64432,13.090606 37.156225,13.078701 L 11.299083,13.078701 C 10.674083,13.078701 10.263369,13.382274 10.01337,13.935847 C 10.01337,13.935847 3.5490842,31.039404 3.5490842,31.039404 z "
+       style="fill:url(#radialGradient4250);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <rect
+       y="36.299183"
+       x="7.857996"
+       height="5.5625"
+       width="17.625"
+       id="rect4174"
+       style="opacity:1;color:#000000;fill:url(#linearGradient4209);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.40899992;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cscc"
+       id="path4194"
+       d="M 7.8579947,41.86168 C 7.8579947,41.86168 7.8579947,37.850195 7.8579947,37.850195 C 9.6935221,41.029421 16.154485,41.86168 20.795492,41.86168 C 20.795492,41.86168 7.8579947,41.86168 7.8579947,41.86168 z "
+       style="opacity:0.81142853;fill:url(#linearGradient4242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="cccccccc"
+       id="path4201"
+       d="M 44.796162,30.753688 C 44.859684,32.003662 44.382159,33.069528 43.474046,33.097438 C 43.474046,33.097438 5.3553296,33.097437 5.3553297,33.097438 C 4.0660978,33.097438 3.4875937,32.772491 3.271279,32.229382 C 3.3630404,33.173714 4.0970964,33.878688 5.3553297,33.878688 C 5.3553296,33.878687 43.474046,33.878688 43.474046,33.878688 C 44.550053,33.845617 45.226851,32.454664 44.82621,30.883897 L 44.796162,30.753688 z "
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       id="path4211"
+       d="M 10.96875,15.28125 C 10.922675,15.481571 10.78125,15.668047 10.78125,15.875 C 10.78125,16.823605 11.37223,17.664474 12.125,18.46875 C 12.365268,18.314675 12.490117,18.114342 12.75,17.96875 C 11.809691,17.152746 11.196604,16.252168 10.96875,15.28125 z M 37.625,15.28125 C 37.396273,16.250866 36.782988,17.153676 35.84375,17.96875 C 36.117894,18.122332 36.247738,18.33699 36.5,18.5 C 37.257262,17.693344 37.8125,16.826956 37.8125,15.875 C 37.8125,15.668047 37.670906,15.481571 37.625,15.28125 z M 39.8125,23.71875 C 39.198709,27.758861 32.513887,30.96875 24.28125,30.96875 C 16.068996,30.968751 9.4211001,27.775964 8.78125,23.75 C 8.7488928,23.947132 8.65625,24.141882 8.65625,24.34375 C 8.6562503,28.661697 15.645354,32.187501 24.28125,32.1875 C 32.917146,32.1875 39.937499,28.661698 39.9375,24.34375 C 39.9375,24.130826 39.848449,23.926394 39.8125,23.71875 z "
+       style="opacity:0.69142857;color:#000000;fill:url(#linearGradient4272);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       transform="translate(8.838843e-2,5.301780)"
+       d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1  5.833631,25.593554 A 1.3700194 1.016466 0 1 1  8.5736699 25.593554 z"
+       sodipodi:ry="1.016466"
+       sodipodi:rx="1.3700194"
+       sodipodi:cy="25.593554"
+       sodipodi:cx="7.2036505"
+       id="path4224"
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path4226"
+       sodipodi:cx="7.2036505"
+       sodipodi:cy="25.593554"
+       sodipodi:rx="1.3700194"
+       sodipodi:ry="1.016466"
+       d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1  5.833631,25.593554 A 1.3700194 1.016466 0 1 1  8.5736699 25.593554 z"
+       transform="translate(33.96705,5.213390)" />
+    <path
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4260);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 11.642515,13.540723 C 11.040823,13.540723 10.649724,13.820081 10.409049,14.35301 C 10.409048,14.35301 3.9940341,30.943732 3.9940341,30.943732 C 3.9940341,30.943732 3.7533573,31.590247 3.7533573,32.658555 C 3.7533573,32.658555 3.7533573,41.948651 3.7533573,41.948651 C 3.7533573,43.303391 4.1974134,43.57555 5.3478414,43.57555 L 43.034746,43.57555 C 44.357872,43.57555 44.569062,43.259153 44.569062,41.738058 L 44.569062,32.447962 C 44.569062,32.447962 44.671072,31.706271 44.478807,31.184409 L 37.885616,14.378434 C 37.707973,13.885617 37.334964,13.552184 36.865071,13.540723 L 11.642515,13.540723 z "
+       id="path4252"
+       sodipodi:nodetypes="cccsccccccccc" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 40.5,36.554166 L 40.5,41.575101"
+       id="path4282" />
+    <path
+       id="path4284"
+       d="M 38.5,36.613943 L 38.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 36.5,36.613943 L 36.5,41.634878"
+       id="path4286" />
+    <path
+       id="path4288"
+       d="M 34.5,36.613943 L 34.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 32.5,36.613943 L 32.5,41.634878"
+       id="path4290" />
+    <path
+       id="path4292"
+       d="M 30.5,36.613943 L 30.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       id="path4294"
+       d="M 39.5,36.604065 L 39.5,41.625"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 37.5,36.663842 L 37.5,41.684777"
+       id="path4296" />
+    <path
+       id="path4298"
+       d="M 35.5,36.663842 L 35.5,41.684777"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 33.5,36.663842 L 33.5,41.684777"
+       id="path4300" />
+    <path
+       id="path4302"
+       d="M 31.5,36.663842 L 31.5,41.684777"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       id="path4572"
+       d="M 7.875,36.3125 L 7.875,41.84375 L 20.4375,41.84375 L 8.21875,41.5 L 7.875,36.3125 z "
+       style="opacity:0.43999999;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.20571427;color:#000000;fill:url(#linearGradient2553);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93365198;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42372879;visibility:visible;display:inline;overflow:visible"
+       id="path2545"
+       sodipodi:cx="25"
+       sodipodi:cy="19.5625"
+       sodipodi:rx="14.875"
+       sodipodi:ry="6.6875"
+       d="M 39.875 19.5625 A 14.875 6.6875 0 1 1  10.125,19.5625 A 14.875 6.6875 0 1 1  39.875 19.5625 z"
+       transform="matrix(1.037815,0.000000,0.000000,1.060747,-1.632878,3.030370)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="down">
+    <path
+       transform="matrix(1.130190,1.178179e-16,7.918544e-17,-0.759601,-3.909725,53.66554)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.14117647;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient6907);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient6931);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 3.2034501,25.835194 C 2.1729477,-5.3853369 28.741616,-0.4511153 28.582416,15.788689 L 35.89533,15.788689 L 24.517652,28.774671 L 12.585426,15.788689 C 12.585426,15.788689 20.126859,15.788689 20.126859,15.788689 C 20.583921,4.8193225 3.4092324,1.6100346 3.2034501,25.835194 z "
+       id="path1432"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path2177"
+       d="M 7.6642103,9.1041047 C 12.40638,-0.0400306 28.122336,2.7175443 27.761604,16.579393 L 34.078976,16.579393 C 34.078976,16.579393 24.513151,27.536769 24.513151,27.536769 L 14.41668,16.579393 C 14.41668,16.579393 20.87332,16.579393 20.87332,16.579393 C 21.144975,5.0041615 10.922265,5.5345215 7.6642103,9.1041047 z "
+       style="opacity:0.47159091;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1764);stroke-width:0.99999934;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:0.49431817;color:#000000;fill:url(#radialGradient4997);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 34.767155,16.211613 L 32.782979,18.757322 C 27.372947,17.241029 24.896829,21.486664 17.109284,20.489112 L 13.247998,16.080077 L 20.434468,16.162862 C 20.483219,4.3164571 8.3443098,4.998966 5.0292663,13.627829 C 8.8372201,-1.2611216 27.893316,0.8064118 28.28332,16.114112 L 34.767155,16.211613 z "
+       id="path4989"
+       sodipodi:nodetypes="cccccccc" />
+    <rect
+       style="opacity:1;color:#000000;fill:url(#linearGradient6971);fill-opacity:1.0;fill-rule:nonzero;stroke:#7d7d7d;stroke-width:0.99999976;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       id="rect6951"
+       width="39.247944"
+       height="12.278223"
+       x="4.5635238"
+       y="30.298382"
+       rx="1.6249996"
+       ry="1.6249996" />
+    <rect
+       style="opacity:0.59659091;color:#000000;fill:#7d7d7d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       id="rect6953"
+       width="16"
+       height="7"
+       x="7"
+       y="33"
+       ry="0" />
+    <rect
+       style="opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       id="rect6957"
+       width="1"
+       height="9"
+       x="24"
+       y="32" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..eaef1e250a9a027d660264a4e3b5c74b28c5d232
GIT binary patch
literal 12104
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/document-save.svg
@@ -0,0 +1,619 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="document-save.svg"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg2913"
+   height="48px"
+   width="48px"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective104" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient6925">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1;"
+         offset="0"
+         id="stop6927" />
+      <stop
+         style="stop-color:#204a87;stop-opacity:0;"
+         offset="1"
+         id="stop6929" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient6901">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop6903" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0;"
+         offset="1"
+         id="stop6905" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4991">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop4993" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4995" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4991"
+       id="radialGradient4997"
+       cx="23.447077"
+       cy="6.4576745"
+       fx="23.447077"
+       fy="6.4576745"
+       r="19.0625"
+       gradientTransform="matrix(-1.314471,-1.006312e-2,-1.022964e-2,1.336221,46.22108,-4.909887)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2187"
+       inkscape:collect="always">
+      <stop
+         id="stop2189"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop2191"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient1764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.914114,1.412791e-16,-1.412791e-16,0.914114,-3.868698,-2.706902)"
+       x1="33.059906"
+       y1="27.394117"
+       x2="12.624337"
+       y2="12.583769" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient8668"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737"
+       gradientTransform="matrix(1.000000,-7.816467e-32,-1.132409e-32,0.536723,-5.897962e-14,16.87306)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2555">
+      <stop
+         id="stop2557"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561" />
+      <stop
+         id="stop2563"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565" />
+      <stop
+         id="stop2559"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4264"
+       inkscape:collect="always">
+      <stop
+         id="stop4266"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop4268"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4254"
+       inkscape:collect="always">
+      <stop
+         id="stop4256"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4258"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244">
+      <stop
+         id="stop4246"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4236"
+       inkscape:collect="always">
+      <stop
+         id="stop4238"
+         offset="0"
+         style="stop-color:#eeeeee;stop-opacity:1;" />
+      <stop
+         id="stop4240"
+         offset="1"
+         style="stop-color:#eeeeee;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228">
+      <stop
+         id="stop4230"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184">
+      <stop
+         id="stop4186"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="translate(0.795493,3.799180)"
+       y2="35.281250"
+       x2="24.687500"
+       y1="35.281250"
+       x1="7.0625000"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4209"
+       xlink:href="#linearGradient4184"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="40.943935"
+       x2="36.183067"
+       y1="28.481176"
+       x1="7.6046205"
+       id="linearGradient4234"
+       xlink:href="#linearGradient4228"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="33.758667"
+       x2="12.221823"
+       y1="37.205811"
+       x1="12.277412"
+       id="linearGradient4242"
+       xlink:href="#linearGradient4236"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.286242,0.781698,-0.710782,1.169552,-2.354348,0.248140)"
+       r="20.935817"
+       fy="2.9585190"
+       fx="15.571491"
+       cy="2.9585190"
+       cx="15.571491"
+       id="radialGradient4250"
+       xlink:href="#linearGradient4244"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="47.620636"
+       x2="44.096100"
+       y1="4.4331360"
+       x1="12.378357"
+       id="linearGradient4260"
+       xlink:href="#linearGradient4254"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.651032,-2.885063e-16,9.455693)"
+       r="23.555494"
+       fy="27.096155"
+       fx="23.201941"
+       cy="27.096155"
+       cx="23.201941"
+       id="radialGradient4270"
+       xlink:href="#linearGradient4264"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="26.357183"
+       x2="23.688078"
+       y1="11.318835"
+       x1="23.688078"
+       id="linearGradient4272"
+       xlink:href="#linearGradient4274"
+       inkscape:collect="always"
+       gradientTransform="translate(0.000000,5.125000)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2555"
+       id="linearGradient2553"
+       x1="33.431175"
+       y1="31.964777"
+       x2="21.747974"
+       y2="11.780679"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6901"
+       id="linearGradient6907"
+       x1="14.751649"
+       y1="15.868432"
+       x2="8.8953285"
+       y2="16.743431"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6925"
+       id="linearGradient6931"
+       x1="12.25"
+       y1="18.25"
+       x2="7"
+       y2="21.118431"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="0"
+     inkscape:window-height="818"
+     inkscape:window-width="999"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer2"
+     inkscape:cy="11.891468"
+     inkscape:cx="-133.68151"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.22745098"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:showpageshadow="false"
+     fill="#3465a4"
+     stroke="#204a87" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Save</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>hdd</rdf:li>
+            <rdf:li>hard drive</rdf:li>
+            <rdf:li>save</rdf:li>
+            <rdf:li>io</rdf:li>
+            <rdf:li>store</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:identifier />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="pix"
+     id="layer2"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.411405e-2,0,0,1.929202e-2,45.48953,41.75228)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       sodipodi:nodetypes="cccsccccccccc"
+       id="path4196"
+       d="M 11.28569,13.087628 C 10.66069,13.087628 10.254441,13.377808 10.004442,13.931381 C 10.004441,13.931381 3.5356915,31.034938 3.5356915,31.034938 C 3.5356915,31.034938 3.2856915,31.706497 3.2856915,32.816188 C 3.2856915,32.816188 3.2856915,42.466156 3.2856915,42.466156 C 3.2856915,43.548769 3.943477,44.091158 4.9419415,44.091156 L 43.50444,44.091156 C 44.489293,44.091156 45.09819,43.372976 45.09819,42.247406 L 45.09819,32.597438 C 45.09819,32.597438 45.204153,31.827015 45.00444,31.284938 L 38.28569,14.087631 C 38.101165,13.575725 37.648785,13.099533 37.16069,13.087628 L 11.28569,13.087628 z "
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#535353;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path4170"
+       d="M 3.2735915,32.121812 L 4.0381936,31.429597 L 41.647883,31.492097 L 45.11029,31.809395 L 45.11029,42.247927 C 45.11029,43.373496 44.503272,44.091258 43.518419,44.091258 L 4.9354314,44.091258 C 3.9369667,44.091258 3.2735915,43.549207 3.2735915,42.466594 L 3.2735915,32.121812 z "
+       style="fill:url(#linearGradient4234);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.02044296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="csccccccs"
+       id="path3093"
+       d="M 3.5490842,31.039404 C 2.8347985,32.50369 3.5484686,33.432261 4.5847985,33.432261 C 4.5847985,33.432261 43.584797,33.432261 43.584797,33.432261 C 44.703844,33.408451 45.430035,32.420356 45.013368,31.289403 L 38.299082,14.078704 C 38.114558,13.566798 37.64432,13.090606 37.156225,13.078701 L 11.299083,13.078701 C 10.674083,13.078701 10.263369,13.382274 10.01337,13.935847 C 10.01337,13.935847 3.5490842,31.039404 3.5490842,31.039404 z "
+       style="fill:url(#radialGradient4250);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <rect
+       y="36.299183"
+       x="7.857996"
+       height="5.5625"
+       width="17.625"
+       id="rect4174"
+       style="opacity:1;color:#000000;fill:url(#linearGradient4209);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.40899992;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cscc"
+       id="path4194"
+       d="M 7.8579947,41.86168 C 7.8579947,41.86168 7.8579947,37.850195 7.8579947,37.850195 C 9.6935221,41.029421 16.154485,41.86168 20.795492,41.86168 C 20.795492,41.86168 7.8579947,41.86168 7.8579947,41.86168 z "
+       style="opacity:0.81142853;fill:url(#linearGradient4242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="cccccccc"
+       id="path4201"
+       d="M 44.796162,30.753688 C 44.859684,32.003662 44.382159,33.069528 43.474046,33.097438 C 43.474046,33.097438 5.3553296,33.097437 5.3553297,33.097438 C 4.0660978,33.097438 3.4875937,32.772491 3.271279,32.229382 C 3.3630404,33.173714 4.0970964,33.878688 5.3553297,33.878688 C 5.3553296,33.878687 43.474046,33.878688 43.474046,33.878688 C 44.550053,33.845617 45.226851,32.454664 44.82621,30.883897 L 44.796162,30.753688 z "
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       id="path4211"
+       d="M 10.96875,15.28125 C 10.922675,15.481571 10.78125,15.668047 10.78125,15.875 C 10.78125,16.823605 11.37223,17.664474 12.125,18.46875 C 12.365268,18.314675 12.490117,18.114342 12.75,17.96875 C 11.809691,17.152746 11.196604,16.252168 10.96875,15.28125 z M 37.625,15.28125 C 37.396273,16.250866 36.782988,17.153676 35.84375,17.96875 C 36.117894,18.122332 36.247738,18.33699 36.5,18.5 C 37.257262,17.693344 37.8125,16.826956 37.8125,15.875 C 37.8125,15.668047 37.670906,15.481571 37.625,15.28125 z M 39.8125,23.71875 C 39.198709,27.758861 32.513887,30.96875 24.28125,30.96875 C 16.068996,30.968751 9.4211001,27.775964 8.78125,23.75 C 8.7488928,23.947132 8.65625,24.141882 8.65625,24.34375 C 8.6562503,28.661697 15.645354,32.187501 24.28125,32.1875 C 32.917146,32.1875 39.937499,28.661698 39.9375,24.34375 C 39.9375,24.130826 39.848449,23.926394 39.8125,23.71875 z "
+       style="opacity:0.69142857;color:#000000;fill:url(#linearGradient4272);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       transform="translate(8.838843e-2,5.301780)"
+       d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1  5.833631,25.593554 A 1.3700194 1.016466 0 1 1  8.5736699 25.593554 z"
+       sodipodi:ry="1.016466"
+       sodipodi:rx="1.3700194"
+       sodipodi:cy="25.593554"
+       sodipodi:cx="7.2036505"
+       id="path4224"
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path4226"
+       sodipodi:cx="7.2036505"
+       sodipodi:cy="25.593554"
+       sodipodi:rx="1.3700194"
+       sodipodi:ry="1.016466"
+       d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1  5.833631,25.593554 A 1.3700194 1.016466 0 1 1  8.5736699 25.593554 z"
+       transform="translate(33.96705,5.213390)" />
+    <path
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4260);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 11.642515,13.540723 C 11.040823,13.540723 10.649724,13.820081 10.409049,14.35301 C 10.409048,14.35301 3.9940341,30.943732 3.9940341,30.943732 C 3.9940341,30.943732 3.7533573,31.590247 3.7533573,32.658555 C 3.7533573,32.658555 3.7533573,41.948651 3.7533573,41.948651 C 3.7533573,43.303391 4.1974134,43.57555 5.3478414,43.57555 L 43.034746,43.57555 C 44.357872,43.57555 44.569062,43.259153 44.569062,41.738058 L 44.569062,32.447962 C 44.569062,32.447962 44.671072,31.706271 44.478807,31.184409 L 37.885616,14.378434 C 37.707973,13.885617 37.334964,13.552184 36.865071,13.540723 L 11.642515,13.540723 z "
+       id="path4252"
+       sodipodi:nodetypes="cccsccccccccc" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 40.5,36.554166 L 40.5,41.575101"
+       id="path4282" />
+    <path
+       id="path4284"
+       d="M 38.5,36.613943 L 38.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 36.5,36.613943 L 36.5,41.634878"
+       id="path4286" />
+    <path
+       id="path4288"
+       d="M 34.5,36.613943 L 34.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885"
+       d="M 32.5,36.613943 L 32.5,41.634878"
+       id="path4290" />
+    <path
+       id="path4292"
+       d="M 30.5,36.613943 L 30.5,41.634878"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" />
+    <path
+       id="path4294"
+       d="M 39.5,36.604065 L 39.5,41.625"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 37.5,36.663842 L 37.5,41.684777"
+       id="path4296" />
+    <path
+       id="path4298"
+       d="M 35.5,36.663842 L 35.5,41.684777"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 33.5,36.663842 L 33.5,41.684777"
+       id="path4300" />
+    <path
+       id="path4302"
+       d="M 31.5,36.663842 L 31.5,41.684777"
+       style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       id="path4572"
+       d="M 7.875,36.3125 L 7.875,41.84375 L 20.4375,41.84375 L 8.21875,41.5 L 7.875,36.3125 z "
+       style="opacity:0.43999999;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.20571427;color:#000000;fill:url(#linearGradient2553);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93365198;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42372879;visibility:visible;display:inline;overflow:visible"
+       id="path2545"
+       sodipodi:cx="25"
+       sodipodi:cy="19.5625"
+       sodipodi:rx="14.875"
+       sodipodi:ry="6.6875"
+       d="M 39.875 19.5625 A 14.875 6.6875 0 1 1  10.125,19.5625 A 14.875 6.6875 0 1 1  39.875 19.5625 z"
+       transform="matrix(1.037815,0.000000,0.000000,1.060747,-1.632878,3.030370)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="down">
+    <path
+       transform="matrix(1.130190,1.178179e-16,7.918544e-17,-0.759601,-3.909725,53.66554)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.14117647;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient6907);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient6931);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 3.2034501,25.835194 C 2.1729477,-5.3853369 28.741616,-0.4511153 28.582416,15.788689 L 35.89533,15.788689 L 24.517652,28.774671 L 12.585426,15.788689 C 12.585426,15.788689 20.126859,15.788689 20.126859,15.788689 C 20.583921,4.8193225 3.4092324,1.6100346 3.2034501,25.835194 z "
+       id="path1432"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path2177"
+       d="M 7.6642103,9.1041047 C 12.40638,-0.0400306 28.122336,2.7175443 27.761604,16.579393 L 34.078976,16.579393 C 34.078976,16.579393 24.513151,27.536769 24.513151,27.536769 L 14.41668,16.579393 C 14.41668,16.579393 20.87332,16.579393 20.87332,16.579393 C 21.144975,5.0041615 10.922265,5.5345215 7.6642103,9.1041047 z "
+       style="opacity:0.47159091;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1764);stroke-width:0.99999934;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:0.49431817;color:#000000;fill:url(#radialGradient4997);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 34.767155,16.211613 L 32.782979,18.757322 C 27.372947,17.241029 24.896829,21.486664 17.109284,20.489112 L 13.247998,16.080077 L 20.434468,16.162862 C 20.483219,4.3164571 8.3443098,4.998966 5.0292663,13.627829 C 8.8372201,-1.2611216 27.893316,0.8064118 28.28332,16.114112 L 34.767155,16.211613 z "
+       id="path4989"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..c17690ab3d44531f26320f4254a357f5dc6de12a
GIT binary patch
literal 3741
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
Hu0mjftVJ+4
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-copy.svg
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg4198"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   sodipodi:docname="edit-copy.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4200">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective45" />
+    <linearGradient
+       id="linearGradient15218">
+      <stop
+         style="stop-color:#f0f0ef;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15220" />
+      <stop
+         id="stop2269"
+         offset="0.59928656"
+         style="stop-color:#e8e8e8;stop-opacity:1;" />
+      <stop
+         id="stop2267"
+         offset="0.82758623"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#d8d8d3;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15222" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2259">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2261" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2263" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2224">
+      <stop
+         style="stop-color:#7c7c7c;stop-opacity:1;"
+         offset="0"
+         id="stop2226" />
+      <stop
+         style="stop-color:#b8b8b8;stop-opacity:1;"
+         offset="1"
+         id="stop2228" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2224"
+       id="linearGradient2230"
+       x1="35.996582"
+       y1="40.458221"
+       x2="33.664921"
+       y2="37.770721"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(6.161836,4.033411)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2251">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2253" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2255" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2251"
+       id="linearGradient2257"
+       x1="33.396004"
+       y1="36.921333"
+       x2="34.170048"
+       y2="38.070381"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(6.161836,3.658411)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15218"
+       id="linearGradient4258"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.065698,0.000000,0.000000,0.987595,-8.548320,-4.891713)"
+       x1="22.308331"
+       y1="18.992140"
+       x2="35.785294"
+       y2="39.498238" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2259"
+       id="linearGradient4260"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.998504,0.000000,0.000000,0.998246,-6.970391,-4.892901)"
+       x1="26.076092"
+       y1="26.696676"
+       x2="30.811172"
+       y2="42.007351" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2259"
+       id="linearGradient13651"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.999421,0.000000,0.000000,1.000000,5.991319,4.033411)"
+       x1="26.076092"
+       y1="26.696676"
+       x2="30.811172"
+       y2="42.007351" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15218"
+       id="linearGradient13653"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.067236,0.000000,0.000000,0.989276,4.391684,4.035227)"
+       x1="22.308331"
+       y1="18.992140"
+       x2="35.785294"
+       y2="39.498238" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#bebebe"
+     borderopacity="1.0000000"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4142136"
+     inkscape:cx="-57.902952"
+     inkscape:cy="48.133585"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="873"
+     inkscape:window-height="699"
+     inkscape:window-x="264"
+     inkscape:window-y="149"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata4203">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Edit Copy</dc:title>
+        <dc:date>2005-10-15</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>copy</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g4268"
+       style="opacity:0.49999997"
+       transform="matrix(1.001508,0.000000,0.000000,1.000616,-5.002205e-2,-6.304895e-2)">
+      <rect
+         y="34.033413"
+         x="20.161837"
+         height="2.0000000"
+         width="13.000000"
+         id="rect2279"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         ry="0.56615961"
+         rx="0.56565511"
+         y="1.5629303"
+         x="1.5484408"
+         height="35.976688"
+         width="30.951559"
+         id="rect4238"
+         style="opacity:1.0000000;fill:url(#linearGradient4258);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99893934;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+      <rect
+         ry="0.0000000"
+         rx="0.0000000"
+         y="2.5605955"
+         x="2.5325129"
+         height="33.981056"
+         width="28.970741"
+         id="rect4240"
+         style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient4260);stroke-width:0.99893963;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+      <rect
+         y="10.033414"
+         x="7.0161190"
+         height="2.0000000"
+         width="21.000000"
+         id="rect4248"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4250"
+         width="20.000000"
+         height="2.0000000"
+         x="7.0161190"
+         y="14.033414" />
+      <rect
+         y="18.033415"
+         x="7.0161190"
+         height="2.0000000"
+         width="18.000000"
+         id="rect4252"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4254"
+         width="21.000000"
+         height="2.0000000"
+         x="7.0161190"
+         y="22.033415" />
+      <rect
+         y="26.033413"
+         x="7.0161190"
+         height="2.0000000"
+         width="13.000000"
+         id="rect4256"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+    </g>
+    <g
+       id="g12863">
+      <path
+         style="fill:url(#linearGradient13653);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#888a85;stroke-width:1.0000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+         d="M 15.072946,10.500852 L 44.929331,10.500852 C 45.245071,10.500852 45.499257,10.753945 45.499257,11.068324 L 45.499257,38.235686 C 45.499257,40.712138 38.619447,46.538773 36.231325,46.538773 L 15.072946,46.538773 C 14.757206,46.538773 14.50302,46.285681 14.50302,45.9713 L 14.50302,11.068324 C 14.50302,10.753945 14.757206,10.500852 15.072946,10.500852 z "
+         id="rect12413"
+         sodipodi:nodetypes="ccccccccc" />
+      <rect
+         ry="0.0000000"
+         rx="0.0000000"
+         y="11.500000"
+         x="15.502951"
+         height="34.040764"
+         width="28.997349"
+         id="rect15244"
+         style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient13651);stroke-width:1.0000008;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path2210"
+         d="M 36.220918,46.536966 C 38.251336,46.866864 45.809711,42.007037 45.505329,38.039122 C 43.942067,40.462219 40.746807,39.32586 36.638049,39.48487 C 36.638049,39.48487 37.033418,46.036966 36.220918,46.536966 z "
+         style="opacity:1.0000000;color:#000000;fill:url(#linearGradient2230);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#868a84;stroke-width:1.0000002;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.36931817;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2257);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 37.671355,44.345464 C 39.041134,43.661635 42.099604,42.198999 43.398985,40.317995 C 41.802891,40.99805 40.451175,40.527491 37.696651,40.5084 C 37.696651,40.5084 37.858973,43.570494 37.671355,44.345464 z "
+         id="path2247"
+         sodipodi:nodetypes="cccc" />
+      <rect
+         y="19.033415"
+         x="20.000000"
+         height="2.0000000"
+         width="21.000000"
+         id="rect2271"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect2273"
+         width="19.992233"
+         height="2.0000000"
+         x="20.000000"
+         y="23.033415" />
+      <rect
+         y="27.033415"
+         x="20.000000"
+         height="2.0000000"
+         width="17.976702"
+         id="rect2275"
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.17045452;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect2277"
+         width="21.000000"
+         height="2.0000000"
+         x="20.000000"
+         y="31.033415" />
+    </g>
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..154d739e1343dc2f05c6e85f9beccd28d8fe7fde
GIT binary patch
literal 12877
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-cut.svg
@@ -0,0 +1,508 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg23883"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   version="1.0"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="edit-cut.svg"
+   inkscape:export-filename="/home/garrett/edit-cut.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs23885">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective70" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2269">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2271" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2273" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2259">
+      <stop
+         style="stop-color:#9a0c00;stop-opacity:1;"
+         offset="0"
+         id="stop2261" />
+      <stop
+         style="stop-color:#9a0c00;stop-opacity:0;"
+         offset="1"
+         id="stop2263" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2251">
+      <stop
+         style="stop-color:#df2a2a;stop-opacity:1;"
+         offset="0"
+         id="stop2253" />
+      <stop
+         style="stop-color:#df2a2a;stop-opacity:0;"
+         offset="1"
+         id="stop2255" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2229">
+      <stop
+         style="stop-color:#e2e2e2;stop-opacity:1;"
+         offset="0"
+         id="stop2231" />
+      <stop
+         style="stop-color:#d8d8d8;stop-opacity:1;"
+         offset="1"
+         id="stop2233" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,1.010300,1.007969e-18,-0.159801)"
+       r="7.2848282"
+       cy="23.333008"
+       cx="165.06104"
+       id="radialGradient16850">
+      <stop
+         id="stop16852"
+         style="stop-color:#EF3535"
+         offset="0" />
+      <stop
+         id="stop16854"
+         style="stop-color:#a40000;stop-opacity:0"
+         offset="1" />
+    </radialGradient>
+    <linearGradient
+       id="XMLID_897_"
+       gradientUnits="userSpaceOnUse"
+       x1="292.97168"
+       y1="4.7592773"
+       x2="296.93979"
+       y2="10.711433">
+      <stop
+         offset="0"
+         style="stop-color:#EEEEEC"
+         id="stop45093" />
+      <stop
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;"
+         id="stop45095" />
+    </linearGradient>
+    <linearGradient
+       id="path3230_2_"
+       gradientUnits="userSpaceOnUse"
+       x1="1668.7646"
+       y1="185.30176"
+       x2="1679.5989"
+       y2="175.78883"
+       gradientTransform="matrix(1.213800,0.000000,0.282500,-1.671200,46.72625,447.9442)">
+      <stop
+         offset="0"
+         style="stop-color:#FFFFFF"
+         id="stop4977" />
+      <stop
+         offset="1"
+         style="stop-color:#CFCFCF"
+         id="stop4979" />
+    </linearGradient>
+    <linearGradient
+       id="path3311_1_"
+       gradientUnits="userSpaceOnUse"
+       x1="1420.5474"
+       y1="-50.919434"
+       x2="1420.6542"
+       y2="-79.574341"
+       gradientTransform="matrix(2.051000,0.000000,0.167200,-0.989000,-799.2049,221.0724)">
+      <stop
+         offset="0"
+         style="stop-color:#C4A000"
+         id="stop4970" />
+      <stop
+         offset="1"
+         style="stop-color:#957A00"
+         id="stop4972" />
+    </linearGradient>
+    <radialGradient
+       id="XMLID_52_"
+       cx="165.06104"
+       cy="23.333008"
+       r="7.2848282"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,1.010300,1.007969e-18,-0.159801)"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         offset="0"
+         style="stop-color:#EF3535"
+         id="stop812" />
+      <stop
+         id="stop2239"
+         style="stop-color:#c91a1a;stop-opacity:1;"
+         offset="0" />
+      <stop
+         offset="1"
+         style="stop-color:#ff4c4c;stop-opacity:1;"
+         id="stop814" />
+    </radialGradient>
+    <linearGradient
+       id="XMLID_45_"
+       gradientUnits="userSpaceOnUse"
+       x1="68.175293"
+       y1="21.424805"
+       x2="74.587158"
+       y2="27.836672">
+      <stop
+         offset="0"
+         style="stop-color:#BABDB6"
+         id="stop695" />
+      <stop
+         offset="1"
+         style="stop-color:#EEEEEC"
+         id="stop697" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#path3230_2_"
+       id="linearGradient142876"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.213781,0,0.282495,-1.671173,-1712.251,391.532)"
+       x1="1668.7646"
+       y1="185.30176"
+       x2="1679.5989"
+       y2="175.78883" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#path3230_2_"
+       id="linearGradient142884"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.213781,0.000000,0.282495,-1.671173,-1385.251,394.5320)"
+       x1="1668.7646"
+       y1="185.30176"
+       x2="1679.5989"
+       y2="175.78883" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#path3311_1_"
+       id="linearGradient142892"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.050967,0.000000,0.167197,-0.988984,-2231.169,167.6639)"
+       x1="1420.5474"
+       y1="-50.919434"
+       x2="1420.6542"
+       y2="-79.574341" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_45_"
+       id="linearGradient16739"
+       x1="22.225399"
+       y1="23.843431"
+       x2="24.190449"
+       y2="22.860907"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="linearGradient16769"
+       x1="294.59497"
+       y1="12.187603"
+       x2="297.18515"
+       y2="13.3396"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="linearGradient16894"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.624438,0.000000,0.000000,3.624438,-1053.179,-16.84720)"
+       x1="296.76199"
+       y1="12.012225"
+       x2="297.79822"
+       y2="10.946587" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="linearGradient16946"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.637893,0.000000,0.000000,3.470375,-1056.116,-16.00724)"
+       x1="296.48611"
+       y1="15.506916"
+       x2="296.52905"
+       y2="9.8769522" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_897_"
+       id="linearGradient16968"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-4.127761,0.000000,0.000000,4.136601,1244.465,-11.90495)"
+       x1="292.97168"
+       y1="4.7592773"
+       x2="296.93979"
+       y2="10.711433" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_897_"
+       id="linearGradient16974"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.053427,0.000000,0.000000,4.136601,-1175.535,-11.90495)"
+       x1="292.97168"
+       y1="4.7592773"
+       x2="296.93979"
+       y2="10.711433" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#radialGradient16850"
+       id="linearGradient17028"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.161878,0.000000,0.000000,0.992497,-5.112111,6.400522e-2)"
+       x1="39.619942"
+       y1="44.540932"
+       x2="-3.532515"
+       y2="-11.889042" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="linearGradient17034"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.161878,0.000000,0.000000,0.992497,-2.666967,6.400522e-2)"
+       x1="13.82536"
+       y1="40.068752"
+       x2="7.6700611"
+       y2="2.3262277" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="linearGradient17037"
+       gradientUnits="userSpaceOnUse"
+       x1="7.184845"
+       y1="31.056622"
+       x2="25.152235"
+       y2="50.774887"
+       gradientTransform="matrix(1.161878,0.000000,0.000000,0.992497,-2.430779,0.265761)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2229"
+       id="linearGradient2235"
+       x1="20.288025"
+       y1="6.4603648"
+       x2="24.32597"
+       y2="23.942537"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2229"
+       id="linearGradient2237"
+       x1="20.288025"
+       y1="6.4603648"
+       x2="24.32597"
+       y2="23.942537"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_52_"
+       id="radialGradient2241"
+       cx="34.376091"
+       cy="37.50008"
+       fx="34.376091"
+       fy="37.50008"
+       r="8.3887873"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,1.060381,0.000000,-2.299514)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2251"
+       id="linearGradient2257"
+       x1="298.47852"
+       y1="13.599585"
+       x2="298.86948"
+       y2="13.802949"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2259"
+       id="linearGradient2265"
+       x1="298.47852"
+       y1="13.599585"
+       x2="298.86948"
+       y2="13.802949"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2269"
+       id="radialGradient2275"
+       cx="25.1875"
+       cy="41.625"
+       fx="25.1875"
+       fy="41.625"
+       r="18.0625"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.325260,2.029626e-16,28.08607)"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.13333333"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313708"
+     inkscape:cx="32.034218"
+     inkscape:cy="23.0589"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     gridtolerance="0.5px"
+     inkscape:window-width="1011"
+     inkscape:window-height="818"
+     inkscape:window-x="177"
+     inkscape:window-y="30"
+     stroke="#a40000"
+     inkscape:showpageshadow="false">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#0000ff"
+       empcolor="#0000ff"
+       opacity="0.2"
+       empopacity="0.4"
+       empspacing="4" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata23888">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Edit Cut</dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Garrett Le Sage</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>cut</rdf:li>
+            <rdf:li>clipboard</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:url(#linearGradient16968);stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 34.174311,1.6249997 C 34.386261,1.6935355 34.59157,1.7696619 34.798294,1.842502 C 35.449709,4.0395037 38.469777,6.2612218 37.321354,8.4491328 C 33.495509,14.82952 29.697021,21.294565 25.899759,27.72527 C 25.154013,27.872172 24.401732,27.952183 23.647995,27.96996 C 22.061603,28.01017 20.433063,27.775465 18.927431,27.23589 C 23.978303,18.684616 29.031301,10.114483 34.174311,1.6249997 z "
+       id="path16717" />
+    <path
+       style="fill:url(#linearGradient2237);fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 34.288823,4.25 C 34.057702,4.5574529 33.839208,5.120942 33.602793,5.40625 C 29.555938,12.158979 25.440784,18.900329 21.378976,25.625 C 21.318425,25.878117 20.565047,26.637291 21.366935,26.567963 C 22.478492,26.765843 23.638682,26.918567 24.746762,26.625 C 28.505752,20.407794 32.192639,14.142582 35.943048,7.9231779 C 36.285519,7.5359043 36.352163,6.9979201 35.992403,6.611197 C 35.462387,5.7945892 34.925464,4.9364821 34.382373,4.15625 L 34.311813,4.2269607 L 34.288823,4.25 z "
+       id="path16719" />
+    <polygon
+       style="fill:url(#linearGradient16769);fill-opacity:1;stroke:#9a0c00;stroke-width:0.28144068;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="polygon45129"
+       points="297.04443,12.300293 296.39941,13.384766 295.13281,14.71875 294.73242,13.672852 295.74658,11.960449 297.04443,12.300293 "
+       transform="matrix(3.637893,0.000000,0.000000,3.470375,-1056.116,-16.00724)" />
+    <path
+       style="fill:url(#linearGradient16946);fill-opacity:1;stroke:none;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 20.40625,26.96875 C 19.183905,27.455468 19.192232,29.003929 18.481272,29.932762 C 18.138949,30.648557 17.537483,31.278989 17.28125,32.03125 C 17.271571,32.546641 17.729203,33.391474 18.3125,32.9375 C 19.697476,31.791172 20.876866,30.398821 21.756725,28.810629 C 21.989088,28.320596 22.552476,27.916466 22.625,27.40625 C 22.086431,26.835441 21.112182,26.873225 20.40625,26.96875 z "
+       id="polygon16896" />
+    <path
+       style="fill:url(#linearGradient16974);stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 12.960099,1.6249997 C 12.751966,1.6935355 12.550355,1.7696619 12.347353,1.842502 C 11.707669,4.0395037 8.7419877,6.2612218 9.8697297,8.4491328 C 13.626677,14.82952 17.35676,21.294565 21.085639,27.72527 C 21.817956,27.872172 22.55669,27.952183 23.296853,27.96996 C 24.854677,28.01017 26.453889,27.775465 27.932407,27.23589 C 22.972493,18.684616 18.010492,10.114483 12.960099,1.6249997 z "
+       id="polygon45097" />
+    <path
+       style="fill:url(#linearGradient2235);fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 12.719667,4.25 C 12.336632,5.3766793 11.270006,6.2059645 11.004855,7.40625 C 14.713376,13.800362 18.475798,20.175378 22.181757,26.5625 C 23.380123,26.820799 24.610198,26.655657 25.795112,26.40625 C 25.606339,25.665807 25.056911,25.075319 24.765129,24.3767 C 20.870526,17.806174 16.941429,11.242872 13.087127,4.65625 C 13.072466,4.5046403 12.870425,4.1721152 12.719667,4.25 z "
+       id="path16635" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;color:#000000;fill:url(#linearGradient16739);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path16731"
+       sodipodi:cx="23.207924"
+       sodipodi:cy="23.843431"
+       sodipodi:rx="0.98252523"
+       sodipodi:ry="0.98252523"
+       d="M 24.190449 23.843431 A 0.98252523 0.98252523 0 1 1  22.225399,23.843431 A 0.98252523 0.98252523 0 1 1  24.190449 23.843431 z"
+       transform="matrix(0.979893,0.000000,0.000000,1.000000,0.311384,0.174043)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.26704544;color:#000000;fill:url(#radialGradient2275);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path2267"
+       sodipodi:cx="25.1875"
+       sodipodi:cy="41.625"
+       sodipodi:rx="18.0625"
+       sodipodi:ry="5.875"
+       d="M 43.25 41.625 A 18.0625 5.875 0 1 1  7.125,41.625 A 18.0625 5.875 0 1 1  43.25 41.625 z"
+       transform="matrix(1.256055,0.000000,0.000000,0.819149,-7.199394,9.090421)" />
+    <path
+       id="path45138"
+       style="fill:url(#linearGradient17037);fill-opacity:1;stroke:#a40000;stroke-opacity:1"
+       d="M 17.700393,30.286934 C 20.935404,32.013583 21.196229,36.899851 18.278338,41.201286 C 15.360479,45.50525 10.373849,47.596472 7.1373807,45.877418 C 3.9008825,44.150767 3.6415462,39.267032 6.5594356,34.965597 C 9.4758075,30.664166 14.463925,28.572944 17.700393,30.286934 z M 15.845268,33.029079 C 14.408745,32.26545 11.33781,33.569599 9.3789266,36.463107 C 7.4160164,39.356612 7.5560293,42.376624 8.991202,43.137951 C 10.426348,43.906181 13.499985,42.597432 15.458868,39.703925 C 17.42313,36.81042 17.281765,33.792709 15.845268,33.029079 z " />
+    <path
+       style="fill:url(#linearGradient17034);fill-opacity:1;stroke:none;stroke-opacity:1"
+       d="M 14.3255,30.583289 C 12.400369,30.97051 10.691041,32.037306 9.2785926,33.064531 C 8.5268294,33.759433 8.0350294,34.514452 7.3629449,35.31874 C 5.6546178,37.670805 4.9387067,40.762168 6.2901069,43.388409 C 6.90956,44.841515 8.9327419,45.435852 10.658323,45.067542 C 12.110236,44.819078 13.339639,43.906473 14.470735,43.268641 C 15.391637,42.47786 16.024749,41.642131 16.803626,40.677364 C 18.612986,38.202962 19.595537,34.928687 18.101604,32.165081 C 17.377898,31.022952 15.866963,30.41829 14.3255,30.583289 z M 14.797513,31.54477 C 16.814017,31.795124 18.154487,33.577585 17.92006,35.266634 C 17.940833,37.553573 16.774038,39.710728 15.196909,41.500756 C 13.779705,42.902737 11.848294,44.229027 9.5327534,44.137076 C 8.1738996,44.134209 7.100179,43.224779 6.7169325,42.176618 C 6.1002938,39.644695 6.9116496,36.911389 8.6831288,34.83862 C 10.041367,33.315308 11.877976,31.95152 14.150642,31.596926 C 14.366331,31.581652 14.581522,31.554432 14.797513,31.54477 z "
+       id="path16771" />
+    <path
+       d="M 30.331764,30.286934 C 27.096753,32.013583 26.835929,36.899851 29.75382,41.201286 C 32.671679,45.50525 37.658309,47.596472 40.894777,45.877418 C 44.131276,44.150767 44.390611,39.267032 41.472722,34.965597 C 38.55635,30.664166 33.568233,28.572944 30.331764,30.286934 z M 32.18689,33.029079 C 33.623412,32.26545 36.694348,33.569599 38.653231,36.463107 C 40.616141,39.356612 40.476128,42.376624 39.040956,43.137951 C 37.60581,43.906181 34.532173,42.597432 32.57329,39.703925 C 30.609028,36.81042 30.750393,33.792709 32.18689,33.029079 z "
+       style="fill:url(#radialGradient2241);fill-opacity:1;stroke:#a40000;stroke-opacity:1"
+       id="path11967" />
+    <polygon
+       style="fill:url(#linearGradient2257);fill-opacity:1;stroke:url(#linearGradient2265);stroke-width:0.27590489;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="polygon45101"
+       points="296.95605,12.300293 297.6001,13.384766 298.86719,14.71875 299.26807,13.672852 298.25391,11.960449 296.95605,12.300293 "
+       transform="matrix(3.624438,0.000000,0.000000,3.624438,-1053.179,-16.84720)" />
+    <path
+       style="fill:url(#linearGradient16894);fill-opacity:1;stroke:none;stroke-width:0.27590489;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 26.15625,27.9375 C 25.729502,28.136321 25.139436,28.138981 24.8125,28.4375 C 25.76252,29.838889 26.702412,31.352161 27.663379,32.650077 C 28.331933,33.404621 29.019194,34.150303 29.78125,34.8125 C 30.516527,33.421076 29.91641,31.751292 28.96875,30.625 C 28.366215,29.725307 28.138928,28.512038 27.125,28.03125 C 26.820951,27.912839 26.474385,27.853373 26.15625,27.9375 z "
+       id="polygon16860" />
+    <path
+       style="fill:url(#linearGradient17028);fill-opacity:1;stroke:none;stroke-opacity:1"
+       d="M 32.280087,30.449093 C 30.759703,30.678844 29.385141,31.534748 29.039639,32.837057 C 27.908495,35.232508 28.824763,37.950571 30.319418,40.063908 C 31.421345,41.40911 32.259488,42.993821 33.959001,43.837878 C 35.429654,44.761502 37.300143,45.728452 39.176641,45.138766 C 40.689956,44.705317 41.547313,43.4582 41.856813,42.166912 C 42.461243,39.856882 41.561117,37.490951 40.149846,35.530428 C 39.491173,34.616722 38.816861,33.647222 38.036528,32.835783 C 36.841969,31.932329 35.398614,31.184254 33.947688,30.603431 C 33.41359,30.493019 32.832464,30.37069 32.280087,30.449093 z M 32.715792,31.658699 C 34.473095,31.591923 35.950305,32.398157 37.092162,33.427664 C 38.124459,34.396792 39.113817,35.23287 39.754673,36.426541 C 40.831856,38.24711 41.142534,40.4065 40.594777,42.390073 C 40.066397,43.714585 38.368623,44.362109 36.803657,44.006518 C 34.821776,43.77769 33.586317,42.335503 32.277091,41.198158 C 30.771344,39.766768 29.83647,37.719532 29.76651,35.715783 C 29.780622,34.698114 29.740042,33.53736 30.464653,32.682212 C 30.876926,32.139062 31.84466,31.627886 32.715792,31.658699 z "
+       id="path16795" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..65e84fb07fc4741a707a87353774d698e7b6a7f8
GIT binary patch
literal 11734
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-delete.svg
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg1306"
+   sodipodi:version="0.32"
+   inkscape:version="0.42"
+   sodipodi:docbase="/home/andreas/projekt/tango/scalable"
+   sodipodi:docname="edit-delete.svg"
+   inkscape:export-filename="/home/andreas/projekt/tango/22/delete.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000">
+  <defs
+     id="defs1308">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2251">
+      <stop
+         style="stop-color:#ef2929"
+         offset="0"
+         id="stop2253" />
+      <stop
+         style="stop-color:#cc0000"
+         offset="1"
+         id="stop2255" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126"
+       inkscape:collect="always">
+      <stop
+         id="stop4128"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop4130"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <radialGradient
+       r="17.142857"
+       fy="40.000000"
+       fx="23.857143"
+       cy="40.000000"
+       cx="23.857143"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.500000,1.635742e-14,20.00000)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient7449"
+       xlink:href="#linearGradient4126"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2251"
+       id="radialGradient2257"
+       cx="20.935379"
+       cy="12.592707"
+       fx="20.935379"
+       fy="12.592707"
+       r="19.967958"
+       gradientTransform="matrix(-1.262871,2.796553e-2,-3.606716e-2,-1.629656,47.36662,36.49787)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4126"
+       id="radialGradient2275"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.500000,1.713935e-14,20.00000)"
+       cx="23.857143"
+       cy="40.000000"
+       fx="23.857143"
+       fy="40.000000"
+       r="17.142857" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2251"
+       id="radialGradient2277"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.618549,1.369740e-2,-1.766555e-2,-0.798198,22.46266,17.62692)"
+       cx="20.935379"
+       cy="12.592707"
+       fx="20.935379"
+       fy="12.592707"
+       r="19.967958" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.000000"
+     inkscape:cx="27.981306"
+     inkscape:cy="29.284234"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     fill="#73d216"
+     stroke="#a40000"
+     inkscape:window-width="1280"
+     inkscape:window-height="949"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata1311">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Delete</dc:title>
+        <dc:date>2005-12-28</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://tango-project.org</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>delete</rdf:li>
+            <rdf:li>remove</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Attribution" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(1.225000,0.000000,0.000000,0.408334,-5.221224,25.17622)"
+       d="M 41.000000 40.000000 A 17.142857 8.5714283 0 1 1  6.7142868,40.000000 A 17.142857 8.5714283 0 1 1  41.000000 40.000000 z"
+       sodipodi:ry="8.5714283"
+       sodipodi:rx="17.142857"
+       sodipodi:cy="40.000000"
+       sodipodi:cx="23.857143"
+       id="path6548"
+       style="opacity:0.52688169;color:#000000;fill:url(#radialGradient7449);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1.0000000;fill:url(#radialGradient2257);fill-opacity:1.0000000;stroke:#a40000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       d="M 24.035816,3.5720836 C 13.289574,3.5720836 4.5678570,12.294146 4.5678580,23.040834 C 4.5678580,33.787521 13.289575,42.509583 24.035816,42.509584 C 34.782058,42.509584 43.503776,33.787520 43.503775,23.040834 C 43.503775,12.294147 34.782058,3.5720836 24.035816,3.5720836 z M 24.004517,8.4783336 C 32.049892,8.4783336 38.589837,14.990984 38.589837,23.009584 C 38.589837,25.981868 37.657973,28.737374 36.117218,31.040834 L 15.960683,10.915834 C 18.272680,9.3813936 21.022553,8.4783336 24.004517,8.4783336 z M 12.267404,14.447084 L 32.580435,34.728334 C 30.166684,36.490827 27.221538,37.540834 24.004517,37.540834 C 15.959141,37.540834 9.4191980,31.028184 9.4191980,23.009584 C 9.4191980,19.803270 10.497961,16.851741 12.267404,14.447084 z "
+       id="path1314" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.55376345;fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.98682600;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="path2242"
+       sodipodi:cx="28.357143"
+       sodipodi:cy="27.214285"
+       sodipodi:rx="18.357143"
+       sodipodi:ry="18.142857"
+       d="M 46.714287 27.214285 A 18.357143 18.142857 0 1 1  10.000000,27.214285 A 18.357143 18.142857 0 1 1  46.714287 27.214285 z"
+       transform="matrix(1.007576,0.000000,0.000000,1.019157,-4.568194,-4.726048)" />
+    <path
+       style="opacity:0.47849461;fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       d="M 15.075203,11.366727 L 35.646632,31.938156"
+       id="path2261"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.30645159;fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       d="M 4.4323460,19.795298 C 4.4561550,21.985774 9.8371077,20.461965 9.8609167,21.652441 C 9.8132977,19.842917 11.837108,15.961965 12.289489,15.152441 L 20.932346,23.509584 C 20.884728,21.771489 27.122823,23.390537 27.003776,21.509584 L 16.718061,10.866727 C 18.241871,10.081013 21.837109,8.7952976 24.075204,8.9381546 C 32.313299,9.1524406 38.051394,16.795298 38.075204,22.009584 L 37.503775,27.009584 C 37.384727,28.866727 43.337108,26.795298 43.146632,28.295298 C 43.551394,27.152441 44.027584,24.795298 43.932346,22.081013 C 43.884727,12.438155 35.765679,3.3667266 24.003775,3.1524406 C 15.420441,3.2833936 8.4978220,8.1822026 6.1287740,14.661370 C 5.9933010,14.694830 4.6585360,16.842917 4.4323460,19.795298 z "
+       id="path2263"
+       sodipodi:nodetypes="cccccccccccccc" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..f79c34cdca13150ab0102ae22b8f400a91cd070d
GIT binary patch
literal 13645
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
Yxym7<cNJsn0Kg9!2}SWLQNw`$0YvJ{g8%>k
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-find-replace.svg
@@ -0,0 +1,974 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="30"
+   inkscape:export-xdpi="30"
+   inkscape:export-filename="/home/garrett/edit-find-replace-16.png"
+   sodipodi:docname="edit-find-replace.svg"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg249"
+   height="48.000000px"
+   width="48.000000px"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective144" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4542">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop4544" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4546" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662">
+      <stop
+         id="stop15664"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop15666"
+         offset="1.0000000"
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       id="aigrd3"
+       cx="20.8921"
+       cy="64.5679"
+       r="5.257"
+       fx="20.8921"
+       fy="64.5679"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         offset="0"
+         style="stop-color:#F0F0F0"
+         id="stop15573" />
+      <stop
+         offset="1.0000000"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         id="stop15575" />
+    </radialGradient>
+    <radialGradient
+       id="aigrd2"
+       cx="20.8921"
+       cy="114.5684"
+       r="5.256"
+       fx="20.8921"
+       fy="114.5684"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         offset="0"
+         style="stop-color:#F0F0F0"
+         id="stop15566" />
+      <stop
+         offset="1.0000000"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         id="stop15568" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient269">
+      <stop
+         id="stop270"
+         offset="0.0000000"
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
+      <stop
+         id="stop271"
+         offset="1.0000000"
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         id="stop260"
+         offset="0.0000000"
+         style="stop-color:#fafafa;stop-opacity:1.0000000;" />
+      <stop
+         id="stop261"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient269"
+       id="radialGradient15656"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.968273,0,0,1.032767,3.353553,0.646447)"
+       cx="8.8244190"
+       cy="3.7561285"
+       fx="8.8244190"
+       fy="3.7561285"
+       r="37.751713" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient259"
+       id="radialGradient15658"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(0.960493,1.041132)"
+       cx="33.966679"
+       cy="35.736916"
+       fx="33.966679"
+       fy="35.736916"
+       r="86.708450" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15662"
+       id="radialGradient15668"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.968273,0,0,1.032767,3.353553,0.646447)"
+       cx="8.1435566"
+       cy="7.2678967"
+       fx="8.1435566"
+       fy="7.2678967"
+       r="38.158695" />
+    <radialGradient
+       r="5.256"
+       fy="114.5684"
+       fx="20.8921"
+       cy="114.5684"
+       cx="20.8921"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient2283"
+       xlink:href="#aigrd2"
+       inkscape:collect="always" />
+    <radialGradient
+       r="5.257"
+       fy="64.5679"
+       fx="20.8921"
+       cy="64.5679"
+       cx="20.8921"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient2285"
+       xlink:href="#aigrd3"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4542"
+       id="radialGradient4548"
+       cx="24.306795"
+       cy="42.07798"
+       fx="24.306795"
+       fy="42.07798"
+       r="15.821514"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,0.000000,30.08928)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4440">
+      <stop
+         id="stop4442"
+         offset="0"
+         style="stop-color:#7d7d7d;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b1b1b1;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop4448" />
+      <stop
+         id="stop4444"
+         offset="1.0000000"
+         style="stop-color:#686868;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4454">
+      <stop
+         id="stop4456"
+         offset="0.0000000"
+         style="stop-color:#729fcf;stop-opacity:0.20784314;" />
+      <stop
+         id="stop4458"
+         offset="1.0000000"
+         style="stop-color:#729fcf;stop-opacity:0.67619050;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4467">
+      <stop
+         id="stop4469"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4471"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.24761905;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4477"
+       inkscape:collect="always">
+      <stop
+         id="stop4479"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop4481"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2366">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2368" />
+      <stop
+         id="stop2374"
+         offset="0.50000000"
+         style="stop-color:#ffffff;stop-opacity:0.21904762;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop2370" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2846">
+      <stop
+         style="stop-color:#8a8a8a;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop2848" />
+      <stop
+         style="stop-color:#484848;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop2850" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2865"
+       inkscape:collect="always">
+      <stop
+         id="stop2867"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop2869"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2966">
+      <stop
+         id="stop2968"
+         offset="0"
+         style="stop-color:#ffd1d1;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ff1d1d;stop-opacity:1;"
+         offset="0.5"
+         id="stop3006" />
+      <stop
+         id="stop2970"
+         offset="1"
+         style="stop-color:#6f0000;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2974">
+      <stop
+         id="stop2976"
+         offset="0"
+         style="stop-color:#c1c1c1;stop-opacity:1;" />
+      <stop
+         id="stop2978"
+         offset="1"
+         style="stop-color:#acacac;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2984"
+       inkscape:collect="always">
+      <stop
+         id="stop2986"
+         offset="0"
+         style="stop-color:#e7e2b8;stop-opacity:1;" />
+      <stop
+         id="stop2988"
+         offset="1"
+         style="stop-color:#e7e2b8;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2994">
+      <stop
+         id="stop2996"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop2998"
+         offset="1"
+         style="stop-color:#c9c9c9;stop-opacity:1;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4477"
+       id="radialGradient2504"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.237968,-1.591178e-15,28.93278)"
+       cx="24.130018"
+       cy="37.967922"
+       fx="24.130018"
+       fy="37.967922"
+       r="16.528622" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2865"
+       id="radialGradient2552"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.348243,-2.396518e-14,26.35543)"
+       cx="23.5625"
+       cy="40.4375"
+       fx="23.5625"
+       fy="40.4375"
+       r="19.5625" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient2554"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-5.669292,-3.312994e-15)"
+       x1="48.90625"
+       y1="17.376184"
+       x2="50.988335"
+       y2="22.250591" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2974"
+       id="linearGradient2556"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-5.669292,-3.312994e-15)"
+       x1="46"
+       y1="19.8125"
+       x2="47.6875"
+       y2="22.625" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2984"
+       id="radialGradient2558"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.923565,-1.236196e-16,8.582434e-17,2.029717,-61.55532,-27.88417)"
+       cx="29.053354"
+       cy="27.640751"
+       fx="29.053354"
+       fy="27.640751"
+       r="3.2408544" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2994"
+       id="linearGradient2560"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-5.825542,0.125)"
+       x1="25.71875"
+       y1="31.046875"
+       x2="25.514589"
+       y2="30.703125" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2846"
+       id="linearGradient2730"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1,0,0,1,48.18409,-6.22072e-15)"
+       x1="27.366341"
+       y1="26.580296"
+       x2="31.335964"
+       y2="30.557772" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4440"
+       id="linearGradient2732"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.334593,0,0,1.291292,55.15793,-7.460658)"
+       x1="30.656250"
+       y1="34.000000"
+       x2="33.218750"
+       y2="31.062500" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2366"
+       id="linearGradient2734"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1,0,0,1,44.17827,-7.045146e-16)"
+       x1="18.292673"
+       y1="13.602121"
+       x2="17.500893"
+       y2="25.743469" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4454"
+       id="radialGradient2736"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1,0,0,1,43.352,1.032377e-15)"
+       cx="18.240929"
+       cy="21.817987"
+       fx="18.240929"
+       fy="21.817987"
+       r="8.3085051" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4467"
+       id="radialGradient2738"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.592963,-7.7469e-24,-5.714443e-24,2.252104,-25.05976,-18.941)"
+       cx="15.414371"
+       cy="13.078408"
+       fx="15.414371"
+       fy="13.078408"
+       r="6.6562500" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="126"
+     inkscape:window-x="59"
+     inkscape:window-height="705"
+     inkscape:window-width="1102"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="true"
+     inkscape:current-layer="layer6"
+     inkscape:cy="-7.874336"
+     inkscape:cx="38.123818"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.59607843"
+     bordercolor="#434343"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:showpageshadow="false"
+     borderlayer="true" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Edit Find Replace</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>find</rdf:li>
+            <rdf:li>locate</rdf:li>
+            <rdf:li>search</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Garrett LeSage</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source />
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner, Steven Garrity</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Shadow">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+  </g>
+  <g
+     style="display:inline"
+     inkscape:groupmode="layer"
+     inkscape:label="Base"
+     id="layer1">
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.017543854"
+       d="M 11.505723,5.4942766 L 11.505723,43.400869"
+       id="path15672"
+       sodipodi:nodetypes="cc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="Magnifying Glass"
+     style="display:inline">
+    <g
+       id="g2679">
+      <rect
+         rx="1.1449448"
+         inkscape:r_cy="true"
+         inkscape:r_cx="true"
+         transform="matrix(1.003584,0,0,1.001943,-0.12722,-0.153534)"
+         ry="1.1468204"
+         y="3.6464462"
+         x="6.6035528"
+         height="40.920494"
+         width="34.875"
+         id="rect15391"
+         style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:0.99724436;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+      <rect
+         inkscape:r_cy="true"
+         inkscape:r_cx="true"
+         transform="matrix(1.003584,0,0,1.001943,-0.12722,-0.153534)"
+         rx="0.14851625"
+         ry="0.14875954"
+         y="4.5839462"
+         x="7.6660538"
+         height="38.946384"
+         width="32.775887"
+         id="rect15660"
+         style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:0.99724436;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+      <g
+         id="g2270"
+         transform="translate(0.646447,-3.798933e-2)"
+         style="display:inline">
+        <g
+           transform="matrix(0.229703,0.000000,0.000000,0.229703,4.967081,4.244972)"
+           style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4.0000000"
+           id="g1440">
+          <radialGradient
+             gradientUnits="userSpaceOnUse"
+             fy="114.56840"
+             fx="20.892099"
+             r="5.2560000"
+             cy="114.56840"
+             cx="20.892099"
+             id="radialGradient1442">
+            <stop
+               id="stop1444"
+               style="stop-color:#F0F0F0"
+               offset="0" />
+            <stop
+               id="stop1446"
+               style="stop-color:#474747"
+               offset="1" />
+          </radialGradient>
+          <path
+             id="path1448"
+             d="M 23.428000,113.07000 C 23.428000,115.04300 21.828000,116.64200 19.855000,116.64200 C 17.881000,116.64200 16.282000,115.04200 16.282000,113.07000 C 16.282000,111.09600 17.882000,109.49700 19.855000,109.49700 C 21.828000,109.49700 23.428000,111.09700 23.428000,113.07000 z "
+             style="stroke:none" />
+          <radialGradient
+             gradientUnits="userSpaceOnUse"
+             fy="64.567902"
+             fx="20.892099"
+             r="5.2570000"
+             cy="64.567902"
+             cx="20.892099"
+             id="radialGradient1450">
+            <stop
+               id="stop1452"
+               style="stop-color:#F0F0F0"
+               offset="0" />
+            <stop
+               id="stop1454"
+               style="stop-color:#474747"
+               offset="1" />
+          </radialGradient>
+          <path
+             id="path1456"
+             d="M 23.428000,63.070000 C 23.428000,65.043000 21.828000,66.643000 19.855000,66.643000 C 17.881000,66.643000 16.282000,65.043000 16.282000,63.070000 C 16.282000,61.096000 17.882000,59.497000 19.855000,59.497000 C 21.828000,59.497000 23.428000,61.097000 23.428000,63.070000 z "
+             style="stroke:none" />
+        </g>
+        <path
+           id="path15570"
+           d="M 9.9950109,29.952326 C 9.9950109,30.405530 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.7210780,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
+           style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000" />
+        <path
+           id="path15577"
+           d="M 9.9950109,18.467176 C 9.9950109,18.920380 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.920380 8.3535532,18.467176 C 8.3535532,18.013742 8.7210780,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
+           style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000" />
+      </g>
+      <path
+         sodipodi:nodetypes="cc"
+         id="path15674"
+         d="M 12.500000,5.0205154 L 12.500000,43.038228"
+         style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.20467831;display:inline" />
+      <g
+         id="g2253"
+         transform="matrix(0.909091,0.000000,0.000000,1.000000,2.363628,0.000000)">
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="9.0000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15686"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="11.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15688"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="13.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15690"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="15.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15692"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="17.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15694"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="19.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15696"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="21.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15698"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="23.000000"
+           x="15.000002"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15700"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.068204239"
+           y="25.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="9.9000053"
+           id="rect15732"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="29.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15736"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="31.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15738"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="33.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15740"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.15156493"
+           y="35.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="22.000004"
+           id="rect15742"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+        <rect
+           ry="0.065390877"
+           rx="0.10609552"
+           y="37.000000"
+           x="14.999992"
+           height="1.0000000"
+           width="15.400014"
+           id="rect15744"
+           style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+      </g>
+    </g>
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       transform="matrix(0.962422,0,0,1.011366,-7.130766,-7.903209)"
+       d="M 40.65864 37.967922 A 16.528622 3.9332814 0 1 1  7.6013966,37.967922 A 16.528622 3.9332814 0 1 1  40.65864 37.967922 z"
+       sodipodi:ry="3.9332814"
+       sodipodi:rx="16.528622"
+       sodipodi:cy="37.967922"
+       sodipodi:cx="24.130018"
+       id="path4475"
+       style="opacity:0.17112301;color:#000000;fill:url(#radialGradient2504);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <g
+       id="g2711"
+       transform="translate(-1.000325,-0.85088)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true">
+      <path
+         transform="matrix(-0.643277,0,0,0.643277,31.49802,4.828704)"
+         sodipodi:nodetypes="csscccscccscczzzz"
+         id="path2844"
+         d="M 18.627569,3.1435548 C 10.488439,3.1435548 3.8827682,9.7492259 3.8827682,17.888356 C 3.8827682,26.027486 10.488439,32.633158 18.627569,32.633158 C 22.107124,32.633158 25.17857,31.248765 27.701292,29.230511 C 27.495915,30.237392 27.623257,31.265879 28.457436,31.990436 L 39.42152,41.517846 C 40.654936,42.589175 42.508982,42.448806 43.58031,41.215389 C 44.651638,39.981971 44.511269,38.127927 43.277853,37.056599 L 32.313769,27.529188 C 31.642242,26.945909 30.820891,26.773219 30.007531,26.886466 C 31.994231,24.374044 33.37237,21.337663 33.37237,17.888356 C 33.37237,9.7492259 26.766699,3.1435548 18.627569,3.1435548 z M 18.551954,4.3697381 C 26.191413,4.3697381 31.843729,9.1586886 31.843729,17.661513 C 31.843729,26.336626 26.027039,30.953288 18.551954,30.953288 C 11.249005,30.953288 5.2601806,25.475196 5.2601806,17.661513 C 5.2601806,9.6774061 11.084819,4.369738 18.551954,4.3697381 z "
+         style="color:#000000;fill:#dcdcdc;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2730);stroke-width:3.10908341;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="matrix(-0.643277,0,0,0.643277,31.49802,4.828704)"
+         style="color:#000000;fill:#dcdcdc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 18.602905,3.0803551 C 10.437465,3.0803551 3.8104408,9.7073791 3.8104408,17.872819 C 3.8104408,26.038259 10.437465,32.665283 18.602905,32.665283 C 22.093708,32.665283 25.175082,31.276416 27.70596,29.251638 C 27.499919,30.261774 27.627672,31.293585 28.464547,32.020484 L 39.464073,41.578691 C 40.701476,42.653483 42.561515,42.512661 43.636306,41.275256 C 44.711097,40.037852 44.570274,38.177814 43.332871,37.103023 L 32.333346,27.544815 C 31.659648,26.959651 30.835642,26.786402 30.019653,26.900016 C 32.012775,24.379472 33.395369,21.333276 33.395369,17.872819 C 33.395369,9.7073791 26.768345,3.0803551 18.602905,3.0803551 z M 18.527046,6.2664243 C 24.808154,6.2664245 29.905864,11.364135 29.905864,17.645243 C 29.905864,23.926351 24.808154,29.024061 18.527046,29.024061 C 12.245938,29.024061 7.1482276,23.926351 7.1482276,17.645243 C 7.1482278,11.364135 12.245938,6.2664243 18.527046,6.2664243 z "
+         id="path4430"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="matrix(-0.643277,0,0,0.643277,31.49802,4.828704)"
+         style="color:#000000;fill:url(#linearGradient2732);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 39.507004,41.57769 C 39.028332,39.304503 40.904334,36.766268 43.091057,36.789315 C 43.091057,36.789315 32.33069,27.531204 32.33069,27.531204 C 29.385899,27.474498 28.061188,29.80382 28.553876,32.131126 L 39.507004,41.57769 z "
+         id="path4438"
+         sodipodi:nodetypes="ccccc"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         sodipodi:type="arc"
+         style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2734);stroke-width:1.24788225;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="path4450"
+         sodipodi:cx="17.500893"
+         sodipodi:cy="18.920233"
+         sodipodi:rx="11.048544"
+         sodipodi:ry="11.048544"
+         d="M 28.549437 18.920233 A 11.048544 11.048544 0 1 1  6.4523487,18.920233 A 11.048544 11.048544 0 1 1  28.549437 18.920233 z"
+         transform="matrix(-0.801358,0,0,0.801358,33.70147,0.855159)"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <rect
+         style="opacity:0.43315507;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.55458939;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect4495"
+         width="19.048439"
+         height="4.4404783"
+         x="40.373337"
+         y="0.14086054"
+         rx="3.3215265"
+         ry="2.9348745"
+         transform="matrix(-0.484379,0.4233,0.417423,0.489452,31.49802,4.828704)"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         sodipodi:type="arc"
+         style="color:#000000;fill:url(#radialGradient2736);fill-opacity:1;fill-rule:evenodd;stroke:#3063a3;stroke-width:1.11148739;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dashoffset:0;stroke-opacity:1;visibility:visible"
+         id="path4452"
+         sodipodi:cx="17.589281"
+         sodipodi:cy="18.478292"
+         sodipodi:rx="8.3085051"
+         sodipodi:ry="8.3085051"
+         d="M 25.897786 18.478292 A 8.3085051 8.3085051 0 1 1  9.280776,18.478292 A 8.3085051 8.3085051 0 1 1  25.897786 18.478292 z"
+         transform="matrix(-0.899697,0,0,0.899697,35.502,-0.509826)"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="matrix(0.643277,0,0,0.643277,7.855933,4.828704)"
+         style="opacity:0.83422457;color:#000000;fill:url(#radialGradient2738);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 18.156915,7.3966938 C 12.949325,7.3966938 8.7323681,11.613651 8.7323681,16.821241 C 8.7323681,18.325216 9.1526753,19.709014 9.77954,20.971144 C 11.03192,21.432757 12.362297,21.746827 13.774307,21.746827 C 19.945262,21.746827 24.873589,16.88519 25.254413,10.809698 C 23.523449,8.7641668 21.044374,7.3966938 18.156915,7.3966938 z "
+         id="path4462"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+    </g>
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       transform="matrix(0.616613,0,0,0.293577,12.73816,29.12848)"
+       d="M 43.125 40.4375 A 19.5625 6.8125 0 1 1  4,40.4375 A 19.5625 6.8125 0 1 1  43.125 40.4375 z"
+       sodipodi:ry="6.8125"
+       sodipodi:rx="19.5625"
+       sodipodi:cy="40.4375"
+       sodipodi:cx="23.5625"
+       id="path3008"
+       style="opacity:0.2;color:#000000;fill:url(#radialGradient2552);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <g
+       id="g1574"
+       transform="matrix(1.033699,-0.276979,0.276979,1.033699,16.06828,-14.54823)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true">
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="cccccc"
+         id="path2960"
+         d="M 17.34116,32.5 L 22.96616,26.875 L 43.059909,17.125 C 46.309909,15.875 48.247409,20.5 45.372409,22.125 L 25.34116,31.5 L 17.34116,32.5 z "
+         style="color:#000000;fill:#cb9022;fill-opacity:1;fill-rule:evenodd;stroke:#5c410c;stroke-width:0.93443578;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         style="color:#000000;fill:url(#linearGradient2554);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 38.330708,20 C 38.330708,20 39.768208,20.09375 40.330708,21.34375 C 40.910201,22.631511 40.330708,24 40.330708,24 L 45.361958,21.53125 C 45.361958,21.53125 46.81399,20.649883 46.018208,18.6875 C 45.233296,16.751923 43.330708,17.53125 43.330708,17.53125 L 38.330708,20 z "
+         id="path2964"
+         sodipodi:nodetypes="czcczcc"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="czcczcc"
+         id="path2962"
+         d="M 38.330708,20 C 38.330708,20 39.768208,20.09375 40.330708,21.34375 C 40.910201,22.631511 40.330708,24 40.330708,24 L 42.330708,23 C 42.330708,23 43.15774,21.681133 42.549458,20.3125 C 41.924458,18.90625 40.330708,19 40.330708,19 L 38.330708,20 z "
+         style="color:#000000;fill:url(#linearGradient2556);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="cccc"
+         id="path2982"
+         d="M 18.768208,31.78125 L 23.268208,27.28125 C 24.768208,28.09375 25.549458,29.4375 25.143208,31 L 18.768208,31.78125 z "
+         style="color:#000000;fill:url(#radialGradient2558);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="cccc"
+         id="path2992"
+         d="M 20.111958,30.375 L 18.486958,31.96875 L 20.830708,31.65625 C 21.049458,30.9375 20.643208,30.59375 20.111958,30.375 z "
+         style="color:#000000;fill:url(#linearGradient2560);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="ccccc"
+         id="path3002"
+         d="M 23.268208,27.25 L 24.830708,28.5 L 40.218048,21.18133 C 39.773616,20.325286 38.976281,20.096733 38.314669,20.019068 L 23.268208,27.25 z "
+         style="color:#000000;fill:#ffffff;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+      <path
+         transform="translate(-29.75546,19)"
+         sodipodi:nodetypes="ccccc"
+         id="path3004"
+         d="M 25.143208,31.0625 L 25.330708,30.3125 L 40.561798,23.1829 C 40.561798,23.1829 40.451638,23.796527 40.345919,23.93225 L 25.143208,31.0625 z "
+         style="color:#000000;fill:#000000;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+    </g>
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..846ed3983e69cadacb1862aa4aac62ba74974ca7
GIT binary patch
literal 10887
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
Q8UWr@6x8Lvq0B@72i9DYt^fc4
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-find.svg
@@ -0,0 +1,750 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/steven/edit-find-48.png"
+   sodipodi:docname="edit-find.svg"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg249"
+   height="48.000000px"
+   width="48.000000px"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective113" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4542">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop4544" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4546" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662">
+      <stop
+         id="stop15664"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop15666"
+         offset="1.0000000"
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       id="aigrd3"
+       cx="20.8921"
+       cy="64.5679"
+       r="5.257"
+       fx="20.8921"
+       fy="64.5679"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         offset="0"
+         style="stop-color:#F0F0F0"
+         id="stop15573" />
+      <stop
+         offset="1.0000000"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         id="stop15575" />
+    </radialGradient>
+    <radialGradient
+       id="aigrd2"
+       cx="20.8921"
+       cy="114.5684"
+       r="5.256"
+       fx="20.8921"
+       fy="114.5684"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         offset="0"
+         style="stop-color:#F0F0F0"
+         id="stop15566" />
+      <stop
+         offset="1.0000000"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         id="stop15568" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient269">
+      <stop
+         id="stop270"
+         offset="0.0000000"
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
+      <stop
+         id="stop271"
+         offset="1.0000000"
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         id="stop260"
+         offset="0.0000000"
+         style="stop-color:#fafafa;stop-opacity:1.0000000;" />
+      <stop
+         id="stop261"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient269"
+       id="radialGradient15656"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.968273,0.000000,0.000000,1.032767,3.353553,0.646447)"
+       cx="8.8244190"
+       cy="3.7561285"
+       fx="8.8244190"
+       fy="3.7561285"
+       r="37.751713" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient259"
+       id="radialGradient15658"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(0.960493,1.041132)"
+       cx="33.966679"
+       cy="35.736916"
+       fx="33.966679"
+       fy="35.736916"
+       r="86.708450" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15662"
+       id="radialGradient15668"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.968273,0.000000,0.000000,1.032767,3.353553,0.646447)"
+       cx="8.1435566"
+       cy="7.2678967"
+       fx="8.1435566"
+       fy="7.2678967"
+       r="38.158695" />
+    <radialGradient
+       r="5.256"
+       fy="114.5684"
+       fx="20.8921"
+       cy="114.5684"
+       cx="20.8921"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient2283"
+       xlink:href="#aigrd2"
+       inkscape:collect="always" />
+    <radialGradient
+       r="5.257"
+       fy="64.5679"
+       fx="20.8921"
+       cy="64.5679"
+       cx="20.8921"
+       gradientTransform="matrix(0.229703,0.000000,0.000000,0.229703,4.613529,3.979808)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient2285"
+       xlink:href="#aigrd3"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4542"
+       id="radialGradient4548"
+       cx="24.306795"
+       cy="42.07798"
+       fx="24.306795"
+       fy="42.07798"
+       r="15.821514"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,0.000000,30.08928)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4440">
+      <stop
+         id="stop4442"
+         offset="0"
+         style="stop-color:#7d7d7d;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b1b1b1;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop4448" />
+      <stop
+         id="stop4444"
+         offset="1.0000000"
+         style="stop-color:#686868;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4454">
+      <stop
+         id="stop4456"
+         offset="0.0000000"
+         style="stop-color:#729fcf;stop-opacity:0.20784314;" />
+      <stop
+         id="stop4458"
+         offset="1.0000000"
+         style="stop-color:#729fcf;stop-opacity:0.67619050;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4467">
+      <stop
+         id="stop4469"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4471"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.24761905;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4477"
+       inkscape:collect="always">
+      <stop
+         id="stop4479"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop4481"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2366">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2368" />
+      <stop
+         id="stop2374"
+         offset="0.50000000"
+         style="stop-color:#ffffff;stop-opacity:0.21904762;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop2370" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2846">
+      <stop
+         style="stop-color:#8a8a8a;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop2848" />
+      <stop
+         style="stop-color:#484848;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop2850" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4477"
+       id="radialGradient1527"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.237968,-8.821068e-16,28.93278)"
+       cx="24.130018"
+       cy="37.967922"
+       fx="24.130018"
+       fy="37.967922"
+       r="16.528622" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2846"
+       id="linearGradient1529"
+       gradientUnits="userSpaceOnUse"
+       x1="27.366341"
+       y1="26.580296"
+       x2="31.335964"
+       y2="30.557772" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4440"
+       id="linearGradient1531"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.334593,0.000000,0.000000,1.291292,-6.973842,-7.460658)"
+       x1="30.656250"
+       y1="34.000000"
+       x2="33.218750"
+       y2="31.062500" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2366"
+       id="linearGradient1533"
+       gradientUnits="userSpaceOnUse"
+       x1="18.292673"
+       y1="13.602121"
+       x2="17.500893"
+       y2="25.743469" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4454"
+       id="radialGradient1537"
+       gradientUnits="userSpaceOnUse"
+       cx="18.240929"
+       cy="21.817987"
+       fx="18.240929"
+       fy="21.817987"
+       r="8.3085051" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4467"
+       id="radialGradient1539"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.592963,-7.746900e-24,-5.714443e-24,2.252104,-25.05975,-18.94100)"
+       cx="15.414371"
+       cy="13.078408"
+       fx="15.414371"
+       fy="13.078408"
+       r="6.6562500" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="418"
+     inkscape:window-height="818"
+     inkscape:window-width="1016"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="true"
+     inkscape:current-layer="layer6"
+     inkscape:cy="14.980943"
+     inkscape:cx="25.938708"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.25490196"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Edit Find</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>find</rdf:li>
+            <rdf:li>locate</rdf:li>
+            <rdf:li>search</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Steven Garrity</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source />
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Shadow">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+  </g>
+  <g
+     style="display:inline"
+     inkscape:groupmode="layer"
+     inkscape:label="Base"
+     id="layer1">
+    <rect
+       style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+       id="rect15391"
+       width="34.875000"
+       height="40.920494"
+       x="6.6035528"
+       y="3.6464462"
+       ry="1.1490486" />
+    <rect
+       style="color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+       id="rect15660"
+       width="32.775887"
+       height="38.946384"
+       x="7.6660538"
+       y="4.5839462"
+       ry="0.14904857"
+       rx="0.14904857" />
+    <g
+       transform="translate(0.646447,-3.798933e-2)"
+       id="g2270">
+      <g
+         id="g1440"
+         style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4.0000000"
+         transform="matrix(0.229703,0.000000,0.000000,0.229703,4.967081,4.244972)">
+        <radialGradient
+           id="radialGradient1442"
+           cx="20.892099"
+           cy="114.56840"
+           r="5.2560000"
+           fx="20.892099"
+           fy="114.56840"
+           gradientUnits="userSpaceOnUse">
+          <stop
+             offset="0"
+             style="stop-color:#F0F0F0"
+             id="stop1444" />
+          <stop
+             offset="1"
+             style="stop-color:#474747"
+             id="stop1446" />
+        </radialGradient>
+        <path
+           style="stroke:none"
+           d="M 23.428000,113.07000 C 23.428000,115.04300 21.828000,116.64200 19.855000,116.64200 C 17.881000,116.64200 16.282000,115.04200 16.282000,113.07000 C 16.282000,111.09600 17.882000,109.49700 19.855000,109.49700 C 21.828000,109.49700 23.428000,111.09700 23.428000,113.07000 z "
+           id="path1448" />
+        <radialGradient
+           id="radialGradient1450"
+           cx="20.892099"
+           cy="64.567902"
+           r="5.2570000"
+           fx="20.892099"
+           fy="64.567902"
+           gradientUnits="userSpaceOnUse">
+          <stop
+             offset="0"
+             style="stop-color:#F0F0F0"
+             id="stop1452" />
+          <stop
+             offset="1"
+             style="stop-color:#474747"
+             id="stop1454" />
+        </radialGradient>
+        <path
+           style="stroke:none"
+           d="M 23.428000,63.070000 C 23.428000,65.043000 21.828000,66.643000 19.855000,66.643000 C 17.881000,66.643000 16.282000,65.043000 16.282000,63.070000 C 16.282000,61.096000 17.882000,59.497000 19.855000,59.497000 C 21.828000,59.497000 23.428000,61.097000 23.428000,63.070000 z "
+           id="path1456" />
+      </g>
+      <path
+         style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+         d="M 9.9950109,29.952326 C 9.9950109,30.405530 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.7210780,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
+         id="path15570" />
+      <path
+         style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+         d="M 9.9950109,18.467176 C 9.9950109,18.920380 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.920380 8.3535532,18.467176 C 8.3535532,18.013742 8.7210780,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
+         id="path15577" />
+    </g>
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.017543854"
+       d="M 11.505723,5.4942766 L 11.505723,43.400869"
+       id="path15672"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.20467831"
+       d="M 12.500000,5.0205154 L 12.500000,43.038228"
+       id="path15674"
+       sodipodi:nodetypes="cc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="Magnifying Glass"
+     style="display:inline">
+    <g
+       transform="matrix(0.909091,0.000000,0.000000,1.000000,2.363628,0.000000)"
+       id="g2253">
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15686"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="9.0000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15688"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="11.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15690"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="13.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15692"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="15.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15694"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="17.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15696"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="19.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15698"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="21.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15700"
+         width="22.000004"
+         height="1.0000000"
+         x="15.000002"
+         y="23.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15732"
+         width="9.9000053"
+         height="1.0000000"
+         x="14.999992"
+         y="25.000000"
+         rx="0.068204239"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15736"
+         width="22.000004"
+         height="1.0000000"
+         x="14.999992"
+         y="29.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15738"
+         width="22.000004"
+         height="1.0000000"
+         x="14.999992"
+         y="31.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15740"
+         width="22.000004"
+         height="1.0000000"
+         x="14.999992"
+         y="33.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15742"
+         width="22.000004"
+         height="1.0000000"
+         x="14.999992"
+         y="35.000000"
+         rx="0.15156493"
+         ry="0.065390877" />
+      <rect
+         style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+         id="rect15744"
+         width="15.400014"
+         height="1.0000000"
+         x="14.999992"
+         y="37.000000"
+         rx="0.10609552"
+         ry="0.065390877" />
+    </g>
+    <g
+       id="g1772"
+       transform="matrix(0.665377,0.000000,0.000000,0.665377,15.98645,17.90835)">
+      <path
+         sodipodi:type="arc"
+         style="opacity:0.17112298;color:#000000;fill:url(#radialGradient1527);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="path4475"
+         sodipodi:cx="24.130018"
+         sodipodi:cy="37.967922"
+         sodipodi:rx="16.528622"
+         sodipodi:ry="3.9332814"
+         d="M 40.658640 37.967922 A 16.528622 3.9332814 0 1 1  7.6013966,37.967922 A 16.528622 3.9332814 0 1 1  40.658640 37.967922 z"
+         transform="matrix(1.446431,0.000000,0.000000,1.519990,-10.97453,-17.75168)" />
+      <path
+         sodipodi:nodetypes="csscccscccscczzzz"
+         id="path2844"
+         d="M 18.627569,3.1435548 C 10.488439,3.1435548 3.8827682,9.7492259 3.8827682,17.888356 C 3.8827682,26.027486 10.488439,32.633158 18.627569,32.633158 C 22.107124,32.633158 25.178570,31.248765 27.701292,29.230511 C 27.495915,30.237392 27.623257,31.265879 28.457436,31.990436 L 39.421520,41.517846 C 40.654936,42.589175 42.508982,42.448806 43.580310,41.215389 C 44.651638,39.981971 44.511269,38.127927 43.277853,37.056599 L 32.313769,27.529188 C 31.642242,26.945909 30.820891,26.773219 30.007531,26.886466 C 31.994231,24.374044 33.372370,21.337663 33.372370,17.888356 C 33.372370,9.7492259 26.766699,3.1435548 18.627569,3.1435548 z M 18.551954,4.3697381 C 26.191413,4.3697381 31.843729,9.1586886 31.843729,17.661513 C 31.843729,26.336626 26.027039,30.953288 18.551954,30.953288 C 11.249005,30.953288 5.2601806,25.475196 5.2601806,17.661513 C 5.2601806,9.6774061 11.084819,4.3697380 18.551954,4.3697381 z "
+         style="opacity:1.0000000;color:#000000;fill:#dcdcdc;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient1529);stroke-width:3.0058157;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:1.0000000;color:#000000;fill:#dcdcdc;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         d="M 18.602905,3.0803551 C 10.437465,3.0803551 3.8104408,9.7073791 3.8104408,17.872819 C 3.8104408,26.038259 10.437465,32.665283 18.602905,32.665283 C 22.093708,32.665283 25.175082,31.276416 27.705960,29.251638 C 27.499919,30.261774 27.627672,31.293585 28.464547,32.020484 L 39.464073,41.578691 C 40.701476,42.653483 42.561515,42.512661 43.636306,41.275256 C 44.711097,40.037852 44.570274,38.177814 43.332871,37.103023 L 32.333346,27.544815 C 31.659648,26.959651 30.835642,26.786402 30.019653,26.900016 C 32.012775,24.379472 33.395369,21.333276 33.395369,17.872819 C 33.395369,9.7073791 26.768345,3.0803551 18.602905,3.0803551 z M 18.527046,6.2664243 C 24.808154,6.2664245 29.905864,11.364135 29.905864,17.645243 C 29.905864,23.926351 24.808154,29.024061 18.527046,29.024061 C 12.245938,29.024061 7.1482276,23.926351 7.1482276,17.645243 C 7.1482278,11.364135 12.245938,6.2664243 18.527046,6.2664243 z "
+         id="path4430" />
+      <path
+         style="opacity:1.0000000;color:#000000;fill:url(#linearGradient1531);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         d="M 39.507004,41.577690 C 39.028332,39.304503 40.904334,36.766268 43.091057,36.789315 C 43.091057,36.789315 32.330690,27.531204 32.330690,27.531204 C 29.385899,27.474498 28.061188,29.803820 28.553876,32.131126 L 39.507004,41.577690 z "
+         id="path4438"
+         sodipodi:nodetypes="ccccc" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1.0000000;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient1533);stroke-width:1.2064340;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="path4450"
+         sodipodi:cx="17.500893"
+         sodipodi:cy="18.920233"
+         sodipodi:rx="11.048544"
+         sodipodi:ry="11.048544"
+         d="M 28.549437 18.920233 A 11.048544 11.048544 0 1 1  6.4523487,18.920233 A 11.048544 11.048544 0 1 1  28.549437 18.920233 z"
+         transform="matrix(1.245743,0.000000,0.000000,1.245743,-3.425346,-6.177033)" />
+      <rect
+         style="opacity:0.43315509;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.5029539;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="rect4495"
+         width="19.048439"
+         height="4.4404783"
+         x="40.373337"
+         y="0.14086054"
+         rx="3.2112026"
+         ry="2.8373930"
+         transform="matrix(0.752986,0.658037,-0.648902,0.760872,0.000000,0.000000)" />
+      <path
+         sodipodi:type="arc"
+         style="color:#000000;fill:url(#radialGradient1537);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3063a3;stroke-width:1.0745695;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible"
+         id="path4452"
+         sodipodi:cx="17.589281"
+         sodipodi:cy="18.478292"
+         sodipodi:rx="8.3085051"
+         sodipodi:ry="8.3085051"
+         d="M 25.897786 18.478292 A 8.3085051 8.3085051 0 1 1  9.2807760,18.478292 A 8.3085051 8.3085051 0 1 1  25.897786 18.478292 z"
+         transform="matrix(1.398614,0.000000,0.000000,1.398614,-6.224338,-8.298958)" />
+      <path
+         style="opacity:0.83422458;color:#000000;fill:url(#radialGradient1539);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         d="M 18.156915,7.3966938 C 12.949325,7.3966938 8.7323681,11.613651 8.7323681,16.821241 C 8.7323681,18.325216 9.1526753,19.709014 9.7795400,20.971144 C 11.031920,21.432757 12.362297,21.746827 13.774307,21.746827 C 19.945262,21.746827 24.873589,16.885190 25.254413,10.809698 C 23.523449,8.7641668 21.044374,7.3966938 18.156915,7.3966938 z "
+         id="path4462" />
+    </g>
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..69367ced823724d96d2e843b7e877e9e08b0add2
GIT binary patch
literal 5459
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
JPDHLkV1iQcXe<B#
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-paste.svg
@@ -0,0 +1,531 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg12360"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="edit-paste.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs12362">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective80" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2259">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2261" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2263" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2251">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2253" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2255" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2239">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2241" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2243" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2224">
+      <stop
+         style="stop-color:#7c7c7c;stop-opacity:1;"
+         offset="0"
+         id="stop2226" />
+      <stop
+         style="stop-color:#b8b8b8;stop-opacity:1;"
+         offset="1"
+         id="stop2228" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2216">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2218" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2220" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15234">
+      <stop
+         style="stop-color:#97978a;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15236" />
+      <stop
+         id="stop15242"
+         offset="0.50000000"
+         style="stop-color:#c2c2b9;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#7d7d6f;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15238" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15218">
+      <stop
+         style="stop-color:#f0f0ef;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15220" />
+      <stop
+         id="stop2269"
+         offset="0.59928656"
+         style="stop-color:#e8e8e8;stop-opacity:1;" />
+      <stop
+         id="stop2267"
+         offset="0.82758623"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#d8d8d3;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15222" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14484">
+      <stop
+         style="stop-color:#c68827;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop14486" />
+      <stop
+         style="stop-color:#89601f;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop14488" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient13746">
+      <stop
+         style="stop-color:#646459;stop-opacity:1;"
+         offset="0"
+         id="stop13748" />
+      <stop
+         style="stop-color:#646459;stop-opacity:0;"
+         offset="1"
+         id="stop13750" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient13746"
+       id="radialGradient13752"
+       cx="24.647722"
+       cy="45.272587"
+       fx="24.647722"
+       fy="45.272587"
+       r="21.011173"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.110577,4.987330e-17,40.26648)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient14484"
+       id="linearGradient14490"
+       x1="6.1071744"
+       y1="10.451290"
+       x2="33.857143"
+       y2="37.879860"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15218"
+       id="linearGradient15224"
+       x1="22.308331"
+       y1="18.992140"
+       x2="35.785294"
+       y2="39.498238"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.065698,0.000000,0.000000,0.987595,-1.564439,7.487332e-2)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15234"
+       id="linearGradient15240"
+       x1="25.404572"
+       y1="3.8180194"
+       x2="25.464211"
+       y2="9.3233509"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.052632,0.000000,0.000000,1.000000,-1.789474,0.000000)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2216"
+       id="linearGradient2222"
+       x1="36.8125"
+       y1="39.15625"
+       x2="39.0625"
+       y2="42.0625"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2224"
+       id="linearGradient2230"
+       x1="35.996582"
+       y1="40.458221"
+       x2="33.664921"
+       y2="37.770721"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2239"
+       id="linearGradient2245"
+       x1="25.682829"
+       y1="12.172059"
+       x2="25.692169"
+       y2="-0.20294096"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2251"
+       id="linearGradient2257"
+       x1="33.396004"
+       y1="36.921333"
+       x2="34.170048"
+       y2="38.070381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2259"
+       id="linearGradient2265"
+       x1="26.076092"
+       y1="26.696676"
+       x2="30.811172"
+       y2="42.007351"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15234"
+       id="linearGradient2283"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.538743,0.000000,0.000000,0.511806,10.80080,-0.582640)"
+       x1="25.404572"
+       y1="3.8180194"
+       x2="25.404572"
+       y2="6.481061" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15234"
+       id="linearGradient2287"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.005222,0.000000,0.000000,0.883928,-0.627923,0.843750)"
+       x1="25.404572"
+       y1="3.8180194"
+       x2="25.464211"
+       y2="9.3233509" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.15294118"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-125.14425"
+     inkscape:cy="14.046835"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="872"
+     inkscape:window-height="818"
+     inkscape:window-x="385"
+     inkscape:window-y="30"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata12365">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Edit Paste</dc:title>
+        <dc:date>2005-10-10</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>paste</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.325216e-2,0,0,1.485743e-2,44.80627,43.06039)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <rect
+       style="opacity:1.0000000;fill:url(#linearGradient14490);fill-opacity:1.0;fill-rule:evenodd;stroke:#714c16;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1"
+       id="rect12368"
+       width="39.035683"
+       height="41.045437"
+       x="4.4643173"
+       y="4.5000000"
+       rx="1.3879371"
+       ry="1.3879364" />
+    <rect
+       style="opacity:1;fill:url(#linearGradient15224);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect12413"
+       width="30.951559"
+       height="35.976688"
+       x="8.5323219"
+       y="6.5295157"
+       rx="0.56650835"
+       ry="0.56650835" />
+    <rect
+       style="opacity:1.0000000;fill:#5c5c5c;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="rect13756"
+       width="12.000000"
+       height="4.0000000"
+       x="18.000000"
+       y="0.0000000"
+       rx="0.98387533"
+       ry="0.98387533" />
+    <rect
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2265);stroke-width:1.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect15244"
+       width="29.014147"
+       height="34.040764"
+       x="9.5171413"
+       y="7.4665856"
+       rx="0"
+       ry="0" />
+    <rect
+       style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#c68827;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="rect15974"
+       width="37.085655"
+       height="39.092987"
+       x="5.4393425"
+       y="5.4307775"
+       rx="0.47879848"
+       ry="0.47879848" />
+    <rect
+       ry="1.3879364"
+       rx="1.3879377"
+       y="4.4722719"
+       x="14.791488"
+       height="7"
+       width="18.947376"
+       id="rect2208"
+       style="opacity:0.10795455;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       ry="1.3879364"
+       rx="1.3879377"
+       y="3.5000000"
+       x="14.526322"
+       height="7.0000000"
+       width="18.947376"
+       id="rect2285"
+       style="opacity:1.0000000;fill:url(#linearGradient15240);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#5c5c5c;stroke-width:1.0000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+    <rect
+       ry="0.32543635"
+       rx="0.32543635"
+       y="1.2086792"
+       x="19.151323"
+       height="3.5826404"
+       width="9.6973763"
+       id="rect2281"
+       style="opacity:1;fill:url(#linearGradient2283);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       style="opacity:1;fill:url(#linearGradient2287);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect13754"
+       width="18.093992"
+       height="6.1875"
+       x="14.953014"
+       y="3.9375"
+       rx="1.0129364"
+       ry="1.0129364" />
+    <path
+       style="opacity:0.48863636;color:#000000;fill:url(#linearGradient2222);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 39.018306,36.25 L 39.0625,42.0625 L 30.5625,42.018306 L 39.018306,36.25 z "
+       id="path2212"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient2230);fill-opacity:1.0;fill-rule:evenodd;stroke:#868a84;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 30.059082,42.086864 C 31.850223,42.254516 39.048809,37.717278 39.539922,33.698855 C 37.97666,36.121952 34.584971,35.667446 30.476213,35.826456 C 30.476213,35.826456 30.871582,41.586864 30.059082,42.086864 z "
+       id="path2210"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.31681817;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2245);stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 19.46875 1.46875 C 19.466654 1.4708456 19.470414 1.4975336 19.46875 1.5 C 19.46758 1.502776 19.438116 1.4969757 19.4375 1.5 L 19.4375 4.375 C 19.4375 4.3814229 19.46641 4.4006981 19.46875 4.40625 C 19.471216 4.4079135 19.465974 4.4363298 19.46875 4.4375 L 15.9375 4.4375 C 15.91974 4.4375 15.892285 4.4357551 15.875 4.4375 C 15.840968 4.4426713 15.781454 4.4572762 15.75 4.46875 C 15.611832 4.5269964 15.482328 4.6677699 15.4375 4.8125 C 15.426991 4.8535348 15.4375 4.9243489 15.4375 4.96875 L 15.4375 9.125 C 15.4375 9.1427605 15.435755 9.1702147 15.4375 9.1875 C 15.442671 9.2215321 15.457276 9.2810456 15.46875 9.3125 C 15.478458 9.3355281 15.487176 9.3851004 15.5 9.40625 C 15.5046 9.41307 15.526336 9.4309205 15.53125 9.4375 C 15.552124 9.4628138 15.599686 9.5103764 15.625 9.53125 C 15.638159 9.5410789 15.6734 9.5539504 15.6875 9.5625 C 15.702038 9.5703781 15.734648 9.5872782 15.75 9.59375 C 15.781454 9.6052238 15.840968 9.6198287 15.875 9.625 C 15.892285 9.6267449 15.91974 9.625 15.9375 9.625 L 32.0625 9.625 C 32.08026 9.625 32.107715 9.6267449 32.125 9.625 C 32.159032 9.6198287 32.218546 9.6052238 32.25 9.59375 C 32.265352 9.5872782 32.297962 9.5703781 32.3125 9.5625 C 32.3266 9.5539504 32.361841 9.5410789 32.375 9.53125 C 32.400314 9.5103764 32.447876 9.4628138 32.46875 9.4375 C 32.473664 9.4309205 32.4954 9.41307 32.5 9.40625 C 32.512824 9.3851004 32.521542 9.3355281 32.53125 9.3125 C 32.542724 9.2810456 32.557329 9.2215321 32.5625 9.1875 C 32.564245 9.1702147 32.5625 9.1427605 32.5625 9.125 L 32.5625 4.96875 C 32.5625 4.9243489 32.573009 4.8535348 32.5625 4.8125 C 32.517672 4.6677698 32.388168 4.5269964 32.25 4.46875 C 32.218546 4.4572762 32.159032 4.4426713 32.125 4.4375 C 32.107715 4.4357551 32.08026 4.4375 32.0625 4.4375 L 28.53125 4.4375 C 28.534026 4.4363298 28.528784 4.4079135 28.53125 4.40625 C 28.533591 4.4006981 28.5625 4.3814229 28.5625 4.375 L 28.5625 1.5 C 28.561884 1.4969757 28.53242 1.502776 28.53125 1.5 C 28.529586 1.4975336 28.533346 1.4708456 28.53125 1.46875 C 28.528474 1.4675798 28.503024 1.4693657 28.5 1.46875 L 19.5 1.46875 C 19.496976 1.4693657 19.471526 1.4675798 19.46875 1.46875 z "
+       id="rect2232" />
+    <path
+       sodipodi:nodetypes="cccc"
+       id="path2247"
+       d="M 31.509519,40.68705 C 32.879298,40.003221 36.038783,38.086016 37.338164,36.205012 C 35.545641,36.581496 34.347243,36.794585 31.610576,36.900494 C 31.610576,36.900494 31.697137,39.91208 31.509519,40.68705 z "
+       style="opacity:0.36931818;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2257);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <rect
+       style="opacity:0.17045455;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="rect2271"
+       width="21"
+       height="2"
+       x="14"
+       y="15" />
+    <rect
+       y="19"
+       x="14"
+       height="2"
+       width="20"
+       id="rect2273"
+       style="opacity:0.17045455;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <rect
+       style="opacity:0.17045455;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="rect2275"
+       width="18"
+       height="2"
+       x="14"
+       y="23" />
+    <rect
+       y="27"
+       x="14"
+       height="2"
+       width="21"
+       id="rect2277"
+       style="opacity:0.17045455;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <rect
+       style="opacity:0.17045455;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="rect2279"
+       width="13"
+       height="2"
+       x="14"
+       y="31" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..b441f5fb840135ad13cd25ed519f1e8cbae963e0
GIT binary patch
literal 8949
zc$@+CA`0D!P)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00006VoOIv0RI60
z0RN!9r;`8xAOJ~3K~#90?VWd+9L2frf7O#WOS{r4t+Xg3q6D@{;*e|*V97oPF6SDb
z>u{38v9Eo=O5kVx7$v~z*!NtU>l~ir1HKqzl0bk6LP!Wi5=clwT7}JdC-!uA-9Kig
zr)Rb&?#!;_yRS6r?yBml>iXXLzOO>JU;-1Ezyu~RfeB1t0{`E^G2Rt8Rj_s=ORiZ?
zbo+L~<6W1rgfiY0I8`78=SAG?S-X*i<6W1r!~_8>kT6fe%WF4s>3G*=tS~`<k*JsO
z#Oe)PJKhx;3rrBe9@Rqd=-Q2ZVZ19+ZcGp$Gn^8Bwq_$gY-#!HZKuE52OACQ>gzz5
zmtPHg_+?8A?s2SA*)Tx>8!Z3u*SPrNzeQ2vERg(t*u(Q{H!@{>YgT$p5Wog5R}~*R
z`x|`pny=t;#hXZSk%X7;_znxkw|1q)1OaRy5GcaQ;^teq_G5S8^|=yJ^BoR$uD+W~
z#<PB<!~_BCAOs)~!oj?mD_OZ>1GRP4iP(Cf@YL$N`S>{2uw<AZfDMG{0meu$z2P!G
zas7{&K67>=Nu^Nu)9MX;d7P?PGE5M_79yqufN-=AAsp0IFJ#4)TbMI<L4qC*A^7p>
zK1@7qD_%|r(*y_(wEl{rz+nUqsw<nh?(*+)*14BiMu~hi?Bap1e-GcdRd^JbAb>5B
z;?<2PhfX{|_rU826nvg3EWdC)7hU|x<S<e2DNmSZ{_Q>*#;L+ZV}bxS5EcRm1QN-y
z&L=qD^%NlRxF)f5$rrii>M!DSnN4`HOJ(QjHcXr#fF0r{Abt@igrKYcRgSj*1u$?s
zYnVU#6Wnm!o%kxfi96>z9K7(&ySZ>Ys$C2w2w(&2C;$=rB}mXa^fvDw|4(!yg4<cc
z%&E&+wPG`MlP4!`pQb2mKV62269lk>NHqb1R1ypaTiM_GYt-l<Zf7<1wP&&N+WVM3
zV@~3>(`J}BK>%B%ngDD_5LSD5ul1J%!|k}7)l^r^=K8DeVg7=16PcVA!^BgzV&e&6
z8iAw<7)b)qv;g~${g%PNAzaQXyq*TGy7W7ozx1k<VPeS5f3>vWwJB=cF+l(u2q9v!
zC)EU4sgWRuObiqI_uz6=;&xVX(fQxt(#vi|I7}Md6!x5&!^8;!*dlHMMDjdI0#Zx?
zLLj9<Yv&Uj>)eXdQGwG@$=M4&!$+_DA}*)7ns|vT!V7CQ(L5eclnE0Auz?VXW)VpZ
zkUlIFRzr~(Chq3&$v>hfE}V`E<~H5H4J+=V!skoedM1*cYc_Gg7(Y@*Oc1~p77K0}
z24*t_iR-?h_c+k{8>BRFIx3mg@L^Wou$kIP$zdXr=htrJ#xZ=LjF=#R4XiVPiI8MW
z22+rT7Xp9iIPbOo98LG*a#m7TJ)c$A-N%fX&4~;vB|N-l6JILxqvXT{0qkIz2{g%I
zCv00X#Nr}qKkpv>8NqNTE@u@L-bPkjwS~F!&P$ZyK=R`?o49LCo+$&;ss2}qmKK}=
z2XhpKg}_2ZumD&nVX}Za301^?l>nc<`Ij^{#02%`!S5lZjs!p=r4c(KK^pO6+O;K}
z5KhjRv5LB?g+#RghK#an@4xfro6nf_lkjt&%D=R<pp9j_z+Wi=ZhipA8Sk^yp>Ty1
zT!G|rpgQM`aol#xuV}147YV$1==(^iTZAm*;x|Ahg`F;VDJ2jK7YLdfuVqTz1w=JJ
zVDRq22YB)2-yn@xnF6-z4sO0@HNz!ukSzG?A%H}z+05S{`K*Lh0_w6Q_j)U-tgOZ7
zsl(&0#aA&2r^ADyI9Yo3t<=?=fdt+<^n;iNkVYO_z(^7#p2kX$8THGVG39ciS`d&N
zZ2dFapZ^)UZp3ru4e8*9dsfp{*0!?Xv?sv&yP2a4K8N6cz{oMS046ugpt<QoOl?@g
zq`GFRD`(<y*Wy%sD2glIdlQf(FC}jt`XN$kX{tVp7O>L>mh<|Wb7`J_BbputByC+g
z+4{`AM8c6op~n=-4I9_<PMMl)MEjhUxZ^v_Qyi=pa2w#V##K~SvSjhKG&fzwl*wmN
z>79lUirIs$0#2UEWY`D-=p=;<sj7aYkQ3U#Y6h$tqPnt~c{6V@^X(ftz?0j)&CuXr
zq6Py(@TtvfdA8K;mX6bo0C#+cc@8IcBDoE4Cc@orH|LynBa7#+ps{`#4u{8bmrOa6
zhK8yQqUj+tEr@1>(6kVSjGC!ryk~dy?@1EC5^f54g!&(82CQKT4dHV)u%PMFIN};8
z5Nc!Vb1igro=j9#74Q$6*74giHs|R>fR+~AAvbFTtOHExHq_7J;*b0T^O~;1<xKbU
zBvR@G!yN>|ZG_ccB5FUXHk9V9W$4K%sy$th1)6~oao}`Ru(0XVc-(bJX`n`jcy7nt
z967Qt`2d2uHm_wvx!U!#Ai%l}TrCAZl`t<6)-a`stCz2)Y1(oWCB*`uMu!*<9>X6x
zMljNeG&EBnvA;&LC))|xBt|UVNFhVIa5IkvMiNU(gQzx)riTzXSTy@KCe<tfz%Zh`
zviEzu_4W%^#r2?9<?mZsO8@neQ<?xREjUANHVC+#_@q@uMIF~%aR&>VZ%h%qVMH15
zzt2$M2w}A+O~CP^)sagPNScr>1hE(7NUf3R+1dO6H9ABv+)gAqfMG<<x(lIj=A6&d
z)cCP@h-B}(zhL+7hhkL%5Io_Ha7#-I{!+H_DNBHL8<=hg9)#G}Is|axvRk<HL$~90
zB~`tq2k0AmkD<UJbVE%Oa4HEBy*phCWEG^H`c5$e+5CW58M+Z>(0_=q+MD&6o2Rd2
z(d<u?5X<4?kMZ1dKS7HR6M=Uf2G?)6lh#tT^C?MyHJez9<RRk2y1JU_tXy#~)21XB
z(R4jR-_Sb@1P-Q7)Qsrmc0#t(0(NF#q=v}m2iT>FsD1Pe?Zc4yP4Z2fd=cl&`&U!D
zwRP`e>$WW^!$hfY{gyTC%a}<4IOV<)wq_I8A=wJCSFz{MyPTU>{(`!iGvX;E{loid
z?|G4s+D*()N^al)QqSXtG`Y=B+R$F6rnLzh87Fey7g77^9eO)HipUTC&<Xm6_t7}%
z!#ET-)s?eop0kV-ZM%p>!T_~M{`=ot#qJlM<!Ig+XTT{%fYlqgO~3<yM<DpvRqMIp
z;<Y%PvE5XWXg?>rpJO=K8t=i@MH@zt0A#A*NeW4%2rv-_BL$x=E;C`Gx}ToGH{x2P
zFoe}!I{IFwq4s>-t{QxvdKS#Pf}Z|&7#iwBfL97`yX+deUV4T-1s7n!DMNrYo48rP
zZvdx2u=4uNoW1ZS^EIuZzz4MVyo9cYNG!Vwp;$NYrjbC7&;pr+TX>wb6lfPG=^5CI
zZkTGjU}$=fj=r5tu09j5yB?>*#~E`jV_<kc0|Q+UbBb@c^lG9zp5et}%Q+<o5Z@f}
zAmCDjgPT_Ui22R&k90|cu7TI+8GJLIIxc*av`rd`SjgB@Qv`->n#@8?Pm|$(B*TFt
z1S6d}o;o*lBSKs6OH}!0QRSP7Lvb^A_7y~o4!XOJLhO;QzU(SyTyr^3Zr@J9>So;c
z1FYW6SrUE^I28mpt^9Y+Xu1*r!_YY1{R{)c2a?;btZ(gD1uq1dkS(r|H2FX`A`AtO
zmLx9#!%#WW{;=ssD2j`-7OukOHYY)mf{#X>OfM#XXYM5B!@u1}gHU+{r~z2<u@>gc
zx&kRBhM{tzYa8Kczs(MvQx`+QqXjvAxlmtw4oer@fe<le-PQL7PdvQ=RW(NyZ%YT)
zZCF>_3gWmC;N}N#xDN3kFc;wB4}XCr3qA#aA)_4Y+KQ?UKzxIyj5}^p#vD5d2ua#-
zFL9j;Gfs|-OHVTzXnL4H=)|b=NuY7^M>u!>*HA=EOeZ^c@Z`38iK_8QB*DwTjrXjk
zzt}RyjR12Gu@<-jVB!4Bx%9%X0U)K$@y@4+sC@_&5+b#F?NSmafmN_F8E-isY4bCM
zC8F{mLWVT{(6OStemgWz|2T_g-$ugRy?^v!wm<)K48z<z@W)^!xBcj=6z^#=P6SxJ
znX`n!od6Y;^;~<!-R4&8_TC+YBHaif%w7+~CRQxNyqM5a$Kr{}87v`Kt}=yXCrN%}
zky6KBqTWAu#wS?N^minl_PxUo@WM;K#=@=N_t*2e`~R6}hAi^Nm=mC-1$Wrs_rzE9
zR$aFluV)fKd@lbGAmY7T#Jjsi<=ag1#LiM@_>k$^!6to%Fk3T{g$NQ!Al#lZzh4{#
zi)Md@=IMzY<C53+{hU{K|0!9z<lCFq@ohvlX6BDE9|c6*d<8fU;QVt|GIQERvGC{s
zoxM9p2rSvFEz_@w`TE2kX^aqlx*15?cxeWw+Wq{rfE{rF{GsCownQp~aB%kAFPg%a
zQfKGuKS&Y2gu6Dcr=?WFhcVUwt2a|C4b}m8Jyk6K$n8L^QQLZ+N0(8{)@y08^|9WM
zY4?SV9X6$!<`|}tDLp+FB3RPfJB9XPYIFcKI+$N0*g#R-oHze}GIdhyyAryg^5X8z
z?0;`pB8h?E%Ujm+lcEdBfUz|JG2zz(TzUD|@wj9AHhTx(CKT>6RXs8}g=-}N(lUi>
z9k-7d0gPM;OoSs-(`EM!(#eq;o498<c&yNtFyVGqvuyD?YAa(~9n|O$PruN@@nZ)P
zNkRf{*|e5Ni!LM!#*6^#@1{wIuL4w8HL!SY>;oFQ7Nom>Pt4&n4ScfqL!#|v+%d!&
zn1(cATZkZ2gl`!(X4DcH$dN_}!-x_LcNEnoZdVN#ELu-ZWo)4<qW1ITv)`h<{ewi3
zL8-8E^BP_#s(?H&W&|)4z67y%<S)PUOXi-v?!mq2M$|IHmt5vak{}jhB|<vV1)mJd
z<PW3?Sf<D4B1a7V(21fZete!OT)6m7D!j1?ykNM4$G6=@Pj_3Qh#o_7!#(TRU2x_F
zU`z<m(t<k-p9k=It60!{JrG+l>l@mKDPU6zSV<5&OC>@kA84fDl8#~QToF#3&PrU)
zYTT|W6vd4qTsRaLisG^46T9bV=i^{#X(hzZrOr^`NWtw<<!j=?#q067V=s&j`j7DV
z)8Arnpf8c+xZ&j5dsg#a!I>9`F(E+M!_7#h0(@xMtvDUA*QI+0-@-7om}*a%;frg6
zxaVgjLVg+`DR_@-5>?(=cs&hxJq@^BH3^3z^?qybwv4&xu+b86M>801M>h)FrdL<B
zfMtu;;&N62(9^$<$DaN+p+F!};v0sO759FV;_OO+7!v|W$rlnLJ9ELRm@<_*{X_4P
zwD(r8KQ4Gv8zhMk%P;dNNFwohrczrupX!PxT+S-1OE=PyPjL$Eb4-%T`me!Y;830|
z5JN-ld7QuSb{ug{)6uhs$DiJan%wR4s^;eU@7_*NK^cz%WhcNlw=hHKu_@oCrZcIo
zm<7O~|4{7h7?J4VMqCrbe1TMLfQ1NPx06i>2a~E7F}eDzSTB#m6q*5Hb(mp)JN*O4
z85};rz+fAJKsUiqFRJP%92vxr8lSk~9;Q!Omg?=N_5MKU1W_%JcRNh0zl3w=eFYJp
z*Kcimj&0BUfT(7gmu+5^Pi|gU+D)IiP<8@1bXLf?#Fi|&(UjeQ|9wo`EYh7mMrZ?M
ziViUI7eZlj%~{mfo@<(xL<%)BOh?Z?T95AH$nhQY4IV+$a;xm**6*ZtNcmUl3=AL4
zyA7HeKgN>gFOYcngGV3Xx#$0nIj;{q7^vbin@2gXUku7l04Z6K*rhXj#$_NuH^TUX
z$74<(WFbMS-A}rPF;rK~VOsq~xSg>cF9B(2bo9K%JMTTp{sT`CiQ0Ck5O4%ID&UBe
z_z|25tOV=cfOyYO>;3)1@8xa#=gs^S^Jo1xGrzYE{EnSF|6pb*;HQV?^W_I`p>%7=
z1)!`1_@|%ZqL+^X)YR2eT{#ng;owmWshQ(?I}#+FJ*(#*yH<pgY4sP!U#5uf%Qd1L
zIsP0k@4BDP?)THH(t+e*2|ID{+6QylpWfhWHt~1J7y+!1X*wVfZeuvun#a=%7SH)C
zbEd6`-)->PTR&mXYmZqo->_+YY*B2yP*wue_p(gJH+#%I<D&TTF7Z{fw5eV&NdSqp
z|5!fOjh!xMHFKt|z~h=sV(PY|=XIWaVGC^?`>n-C5d5cN@SB4Rc%kqfCR5L)v<zFb
zLkI`w%>5G68<qoLNR1tPzRSLM%=sKCC12mNo*x!gr_!U`Ccyk`=FDjqn4|p!0RS5k
z#8agZAr|KIOkvKn8*n;eyM$G3kXK&&0k6LHkkym-Bl*4p|7+tqirko&=448VZbazp
zdlkb_v)-vFZq8ruZ%nCM3V^PMd2Z(h4jp_wkt8Z5pWm{c-xXK4(xR*ckQM?=uAK|S
z7CItoYy(RshcAT)#3Fs3dYY%-XbzzU{fGJUlV78&D>)A@;17zy?HlgIe8qP34<XT|
zN>~4@XnJ<9-|47i*`n1<s$LA(&g%!I<d!Y#c`RclV~p}@0Li%s5Dr0A<xD^lR(p{c
zrixF@@TCs_EY2SSm$QoIX&*O*-_`dTe|+R$2?kAp^h<@$ZC=BlOZ@<m=m4F4yK*{x
z9#<U~EM8A_#T)=ak#3%R_FHszm;~(?@bS&-*-_d$jt=D|fM78|bycnDsfX2Gth;+s
zr+P<TBOJ_bybg!Mi$v1Z_ZkoW=}Uwo=7?!8g1_CeX7q2#q(DkEJw#{UD>?V~S9lt^
z@XR~$c^U!m2T$<$wr|nbYg(Xosc`M)HN0KYI+g(C+Yk~P;nf3FR@IwZzEo|9gj1FJ
zI(2+whj|@)v9fW}Mff~Z0T>)U#2+8|iYa^nPirogZ(dtk;YYOqVYL@k8_M}kUtQG#
zE;@UYDg54nclp16`G!^aZyOFS+;R#EAIeC8)mx|`{^E(xTWwC_Xj(8aaKj{m<=RRF
zpQnL_x^rW_QS<YcZC@u83?+(qG3w%z_uWDM({XviA3T}Y%ba!9i&(a3ojI@H)%ON}
z+4?O)!Q{NYBKhc8e)OqOl+6UVqD<D}?;Tb65}!$xMD;*y;fLh7Ka=M_z5X(D=(zLs
z@6p+AZo7Kht8!z@y3z|jUrec6#(4|AfkTP?pVG%WUSjLE`_Q81zQ8AS7dLGw13^oP
zvJt>gs5J|5x=Ad+Nh9&S9f3$}-x6X35o#)$sq)PNB;EaQvgh?bC9(?|IybkpFjTI(
z=fd=c%Q$E5m(7<oJ~*+JZO{G~Bl#ZxBM~pRe*YVUGG=m$plk%t9YjUEJ&g4AdCN{;
z5=2O>`2a}Clt~xF;|-pF<@*>$A~kp2a~B5~C(NF<f-~oQHc?aFJNzIoy!5N&mTkeW
zyb=C!^SZJB>Sr-18v%q&sy;(cwuQOpM<(Cvm+?)Wi8!yPfhu1UAnEFRn`1}cO5Fb1
zq50!Cdp3X8&CHv5bNouOcVGN7E@lY#ZCS%NOSx;e+$ft9XeB^Y4Up*XisDW>eCA?{
z<@-B8UDZM}pS|z=A=#ROb>p*WA~>`83#Ra;)Y-ZB2Ug)r1Z%de<Brow_)ta-;86*L
zWBw6gbtt~xuf+BOTIT`G<=&)5sI8g@NYtpG{rjIwWVvJWTAnIbeKSE3PR^S5FHEn$
z6o}1azOZ`>2i|)nkwh2p&zsir^Rcd5DNr^I(9%LsKp#NBKV)v4bUG@rn+Hf}03jTB
z-BUn9Tjv|-dTj1pO8%o<b<KvQ3-2(6AJqapwf!!u@coM9+D+?DPvJwE-wcw1_W=e6
zI?UImyza>(=K;(&eGDqR(_;4mC)(afWaZc0rJm-^5B0UN<&03IhsU<vL2Ik|3Ev?_
zvU1~kp2>LgX@GLS8nz!Gs%Zqm9e~8^nw;_~SCR;^umk}>a_q$GiPLAwG2xRh0^trG
zeQGTo?dCp!E=6+X#`Qdx?Y`3iWhH=+>;p6*U|{G7Qi8`_hazI%$4w<d%nbP4Qvr#t
zMd|4^H+B^L4V-M%v;L%Ev(b>)mhC@3eh0lh=49Sc0n0b8=XJaEryI&^0(ABO!w8JF
z&bKu{3gM7d6*Fau=bs>gG|aXBh#D~W?+L*x8Hx~DeoBsCdioLQ>U)ESANwXlgXVty
zeTK^NP3t(Aq0G|`WnB&Q>bx9w(jkO!o@{%|%`#yKDU=#tvpy6!q9cVvh=f24MIuDv
zjUm;tmrqw|CE37s4V_QpXHBE)D9(6mNNI4Qb0<%2yBAe8R|2>79p$F`@5j%`j$^l7
z*={&^$_)|AssUPBP^IJr3^~x*bwFs*pe7ZEURS+P7bqbFL4*h*2}wi<2s;&@0mw)s
zn8-#yvX3rC_S{UpIo}?ivG;y(?0KGeYLh8^DcQRJeQv)0eu5eDvMVQ3-A*a3QTFcx
z2*Gnw(g}LBy=zZck&0g7or%}e5EjA_6ha9qiV{$SBOrtlbU1vP5Q?rF5km-~K;MH8
zVvxIGGYLAEDNq2#Fp_QY{()D~wb-!LF!--WpXR2Ae?>4$o_6IGay@Q@C_4cRg&h(G
z4Cp&>c&mm$6GG7&YR^MK2}(nR45`F5fD$qcRYNGc%T;X%Aygz`vNvQd4Um_QVCMwt
zI{*83|H0??ZAZ(IZ$26zo8ZTd5alL-xMwvdrNM5g$<`ysUq)2}Q6Yprb<%|%Asj)6
zPy#|x0s<u{Py&XoszNHd*Ii|xprR0*F#{LHX@I<)Kq*rjJF0T`y?1eYTg>?{rp(a@
zJ`-_Ej&cxSM8$Q3M-5#b)1#rmgGV197Q&&sT{X(&+NDk@lprV}5J3<jU8<@OitcsS
z8j8R$3_{nfVjB5rfLy&lvk6ENKnn%=r|-6~C6D_HvG>IazN};@B>^&4e9yD&H4NHx
zU4HP^{s$tup=sdIXEt0?EpP-CAp%NF3j_?Q1%*&_m#adrscJ;Pkh6jrnew(==hOQ$
znS(@wssTU$_`|#TL!Nn*OYIjDHY${Y0NEN<0Lu35=&H&K;fOrc-*;sAWc#i`MF`#J
zY4l8~TjoJJf=EY5pag^At|3r##i3}8jpqp@5s#NS6xQH{m;wb*v<Sh0K5qTdM*d_I
zpG)<ZTk!e(io$3<7F|#UCslBA>P!|12XbKeaP^V}H&qD5Nu_VPyQ}~8lf+(_&=tii
zr_`NWFN9(Y``cve$(>yS0xxgp6*4zcF%6j#|LV&e-t)4#xinWp=L#dodA{-a#MvG5
zMll2^hMnTjA@pSzp-DqlM~%L^sr8E;^^+F)oQlusa#lwBhYt4&p=eP(7-^jJ;ptLp
zdQ=O`1BV|QjA}B{dy?mSdojq~gG$+>3Ke{Myj@(OVfn;mJLW_o1Q>NA2KwoqdnU6K
zMQC09Z~4wza8s?z;guEM#;T#fv9@T`A2g&Mom{)9R#9Av%UPiuJn~355C|QgI+NbL
zyXds!SBTS93?VW-b9#8TYl;lZbR0JV6wAPr%6E6eg0l!X9kN<Dg05)P&+J*3RY@uJ
z>WZey-oXPW4BgONt{SDn(@-IVPzQ(GmG0gHof0W_zsOsR6k@SNDD+1G*CU=i&#-bH
zZIKTFaxt=?-&?OTc<u#wb=?RJ2H$l}pSsLfQ#Heh;-tdc=;|Lj*k<VA;G~*`4ThAe
zLvb00k8cY^L;7&T3{D>0hu@N4xy^yybEb!3bDk|MpSWU<`KC!hE&}8ddZ85+fan^g
z_lzcL3`DT4`z3vT^R?A3#f#fn<#IYI_1?kvJF2T@*Tr@R)fnyFd$hr!-tJ1T^zPZo
zA)9&>N`!3TcF&nfaQU2%$1zu&iEIQIEo(D2;!rn+x0=D~TIo@w8g1|0Gd!>P+DT4_
zTl2bVeNJbkHtg@}t@Jkdq#)vPRdKTGrBEPX3{7vs|NcIP$lb$BWeV(`eKb9PG{;h<
zHIaz`xdc1vG{-+cojL{0sTgWh@74Xm_TZdZm()l})a#z)QKNxD#o<;2istjwYaQKh
zMu&%c2AvLB(bdO^;l7jwqFld1$v~Fte4cT<1Y2mDtOOXXpmW}T_yD14GtsrE4ETe`
zg5hW|IH&2tDh#Q*JT-0%88Hk!s^AEFebZ>`dN~>lsr@q=@x8s5E=xK2YJ$=D0EM(m
zF~_k;GXi!5D7m1s#U0vDxUvRA4d{Wsz`Opap%2fRc7C-qL_`{fYDf{$btB^SPFAC8
zINCS-z7`G`p{X;G9~>ZH$-k6Du&Z}D1)Hz%@)2x7ak&Ukj@~~a?8H$b!iyH_G6J1L
z?+hqX?VCMgX|===(KH#38b(AKGF)BTZ1i*<3<g5oQ7NUU@ew_7!u+&aDTt7*{^b;G
zrZlCDvqdHXlv40{rSI)PJ9Z4U=Y$bB(Eet>!w7cIo^^f&(xK^w3`JEvEOkeyp?;A#
zdTdWXRl`x?G8~3L?e8|<!^@|<Tv{O0y>`c3ahcNC#o3{haklA8MSxNfhCl$>afIkI
zPwg8#bnry$vZWt(J6%4*P_?igH9|7#3{9JMo;-TuRlmP4sQRjLI1FTezxm2oA!S>M
zkW!BfVd*F~uH1R$UCt?^0qo+A966%z-o2;i+_RTTr?XO5RYx!s5<xBER4b|%YWw!>
z@JA!Mrb!g93kC<#3oOqHnd4}OV&e)$+434oAE2nbdV722Lk~SPFk{Ay=+voGJ({LT
zaO#!rdeJoFGWqLYZ0`yAH7%kby-pnAusJ-m%P)bnj{uIiPCw5^ihKw&+BiFugnZ>5
z1r!@MBF&B+JHk@R$o%>9eGZ315kg3x&*!@M;)^}cKfl}G-yPE9!p{af!KeQ+r5(*N
zS6rqv<&G<Q9-w4`&2dZ#d-vUUqg%Ib9h@^~jxl-iWUrzq((CoQF1ZV44c`C&0-i}k
zK~&_Diq_WFP<MBCCIV#Z@pfqoB|^41nIo={GBTyfH!eL*$!7wK5^Nr6O+=$nUV7=J
zP+MD@zqz^DRZ&sl@_0OsWy_XT`u+a!(W6JLU*^ap$i#In4UjJp?81sUmYXOe(&W1q
zP<Fu<ijyZ#8e6w+9gajIp~l8WM{RAb^PF?escLR+mb-TCvVPSum)g%1M_OFI=VNso
zZ5kl|)j;ccA%e~Ko}$Te@ZiDdQ%^nR4+H|CS+iz2=FOW|wS4(<@8IBI_~glx36qdX
zu;dY5i14lFqY>O_v_n4SnaHO%7NZGDeasbRo-bXx)OF>RS60oNH?N|-y*>2X-~M)}
zwY7D$|D$s$HA1$yQXca$5qYcQQrP`swMkxrw>f9ks#U%vOP2V$ySt;0Jn~4etE<bf
zOJ{>j4pb?KU>7!)W+MfK*yFM2)%glLz1|r~kO;frf(u;Xa9Fmsw(5SrKVyT~ARjW6
znh4qAN+x_L&LJBM0^~}UElsBQQXrGBFxvBS5+EyzeJ`Lao;{fxDpOc`db{{cPF^8(
z%9eMgx}>MgmZlU$$P|_p#eN`Sv<;e07`w1c@rkl?U0cJ_!;3{Rq_m4GrN59VEH9L*
z=N78gi*@pfxlTvE&z!3<vk5-eb)iDH3(KV~^Fpa@q&3fC?0UX}FT~!L!#w2*&qoVn
zIxi-yXq1Bhc6pa%SeM6juJBSJUow=F2qi(e8_KSnatS`$vyA3B3pE9HVTB6cdR}s&
zTQODy$X0H-?0vbOtyoi#>$)U1y-<u70n$+l!RPxdrE&tZr5TNbIHovN2w;bNg*=v8
zAe*4_(Ez#f7;~J;1jvT*a{kg$h&ebVak>(qP>l9DPaA<wU;-1EK>qlDd8ij53AgUL
P00000NkvXXu0mjf7+Nb%
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-redo.svg
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   sodipodi:docname="edit-redo.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective31" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2240">
+      <stop
+         style="stop-color:#99b00b;stop-opacity:1;"
+         offset="0"
+         id="stop2242" />
+      <stop
+         style="stop-color:#99b00b;stop-opacity:0;"
+         offset="1"
+         id="stop2244" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2232">
+      <stop
+         style="stop-color:#788600;stop-opacity:1;"
+         offset="0"
+         id="stop2234" />
+      <stop
+         style="stop-color:#788600;stop-opacity:0;"
+         offset="1"
+         id="stop2236" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4991">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop4993" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4995" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient8668"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-5.825329e-14,16.87306)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2187"
+       inkscape:collect="always">
+      <stop
+         id="stop2189"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop2191"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient1764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.813471e-16,-1.171926,1.171926,1.813471e-16,1.782801,54.10111)"
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4991"
+       id="radialGradient4997"
+       cx="16.563837"
+       cy="11.132236"
+       fx="16.563837"
+       fy="11.132236"
+       r="19.0625"
+       gradientTransform="matrix(-1.290127e-2,1.685197,1.713082,1.311475e-2,-1.041499,-10.11571)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2232"
+       id="linearGradient2238"
+       x1="33"
+       y1="35.75"
+       x2="31.5"
+       y2="42.5"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2240"
+       id="linearGradient2246"
+       x1="33"
+       y1="35.75"
+       x2="31.5"
+       y2="42.5"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#788600"
+     fill="#99b00b"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="12.500477"
+     inkscape:cy="33.008096"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="892"
+     inkscape:window-height="818"
+     inkscape:window-x="368"
+     inkscape:window-y="30" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Edit Redo</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>redo</rdf:li>
+            <rdf:li>again</rdf:li>
+            <rdf:li>reapply</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(1.489736,0.000000,0.000000,-1.001252,-12.64716,75.31260)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.14117647;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient2246);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient2238);stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 38.37476,45.034369 C -1.6510486,46.355509 4.6747954,12.29355 25.49479,12.49765 L 25.49479,3.1222396 L 42.143271,17.708819 L 25.49479,33.006349 C 25.49479,33.006349 25.49479,23.337969 25.49479,23.337969 C 11.43168,22.751999 7.3172614,44.770549 38.37476,45.034369 z "
+       id="path1432"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path2177"
+       d="M 16.92492,39.315519 C 5.2018204,33.235892 8.7371274,13.087489 26.5085,13.549959 L 26.5085,5.4508678 C 26.5085,5.4508678 40.556238,17.714589 40.556238,17.714589 L 26.5085,30.658617 C 26.5085,30.658617 26.5085,22.380979 26.5085,22.380979 C 11.66865,22.032709 12.34859,35.138579 16.92492,39.315519 z "
+       style="opacity:0.69886361;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1764);stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:0.49431817;color:#000000;fill:url(#radialGradient4997);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 26.036989,4.5686095 L 36.723727,14.798241 C 29.786227,14.79824 32.036989,23.735424 25.911989,26.610424 L 25.974489,22.943609 C 10.786989,22.881109 11.661989,38.443609 22.724489,42.693609 C 3.6363414,37.811681 6.2869904,13.381109 25.911989,12.88111 L 26.036989,4.5686095 z "
+       id="path4989"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..effa9bd26e522386d13c4825c0dcaeacbaf0220d
GIT binary patch
literal 8378
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
QzyJUM07*qoM6N<$f(NMqO#lD@
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/edit-undo.svg
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   sodipodi:docname="edit-undo.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective31" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2326">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2328" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2330" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2316">
+      <stop
+         style="stop-color:#c4a000;stop-opacity:1;"
+         offset="0"
+         id="stop2318" />
+      <stop
+         style="stop-color:#c4a000;stop-opacity:0;"
+         offset="1"
+         id="stop2320" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2308">
+      <stop
+         style="stop-color:#edd400;stop-opacity:1;"
+         offset="0"
+         id="stop2310" />
+      <stop
+         style="stop-color:#edd400;stop-opacity:0;"
+         offset="1"
+         id="stop2312" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient8668"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-6.227265e-14,16.87306)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient2187"
+       inkscape:collect="always">
+      <stop
+         id="stop2189"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop2191"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2187"
+       id="linearGradient1764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.813471e-16,-1.171926,-1.171926,1.813471e-16,46.17440,54.10111)"
+       x1="17.060806"
+       y1="11.39502"
+       x2="12.624337"
+       y2="12.583769" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2308"
+       id="linearGradient2314"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2316"
+       id="linearGradient2322"
+       x1="26.5"
+       y1="34.25"
+       x2="26.25"
+       y2="43.571831"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2326"
+       id="radialGradient2332"
+       cx="15.09403"
+       cy="13.282721"
+       fx="15.09403"
+       fy="13.282721"
+       r="10.16466"
+       gradientTransform="matrix(2.496031,-1.151905e-16,1.061756e-16,2.300689,-25.12402,-17.82636)"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#c4a000"
+     fill="#edd400"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.8284271"
+     inkscape:cx="-19.855325"
+     inkscape:cy="-15.183692"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="891"
+     inkscape:window-height="818"
+     inkscape:window-x="0"
+     inkscape:window-y="30" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Edit Undo</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>edit</rdf:li>
+            <rdf:li>undo</rdf:li>
+            <rdf:li>revert</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(-1.489736,0.000000,0.000000,-1.001252,60.60436,75.31260)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.14117647;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient2314);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient2322);stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 9.582441,45.034369 C 49.608249,46.355509 43.282405,12.29355 22.462411,12.49765 L 22.462411,3.1222396 L 5.8139298,17.708819 L 22.462411,33.006349 C 22.462411,33.006349 22.462411,23.337969 22.462411,23.337969 C 36.525521,22.751999 40.639939,44.770549 9.582441,45.034369 z "
+       id="path1432"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path2177"
+       d="M 31.032281,39.315519 C 42.75538,33.235892 39.220073,13.087489 21.448701,13.549959 L 21.448701,5.4508678 C 21.448701,5.4508678 7.4009628,17.714589 7.4009628,17.714589 L 21.448701,30.658617 C 21.448701,30.658617 21.448701,22.380979 21.448701,22.380979 C 36.288551,22.032709 35.608611,35.138579 31.032281,39.315519 z "
+       style="opacity:0.69886361;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1764);stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <path
+       style="opacity:0.51136364;color:#000000;fill:url(#radialGradient2332);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 6.6291261,17.682797 L 12.28598,23.074486 C 18.561553,22.897709 15.733126,16.710525 26.958446,13.616933 L 22.008699,12.998214 L 21.92031,4.3361562 L 6.6291261,17.682797 z "
+       id="path2324"
+       sodipodi:nodetypes="cccccc" />
+  </g>
+</svg>
deleted file mode 100644
index 8df8201ec9748822200f737fc52eb925382b0809..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 514bd97c273a2ab2f85222a0113d5aff45297b5b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 1b2e691c8a564d007b29d5d7af5a04098b4f56a5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 8906e80f7e2c57bfca05f524105a861fb278f127..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 6ed5fface345dc0330e25526d9b158792c15e5e6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 4828b63375b5067b8901ecf061bb65375cafe593..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index e3528f02c939db2a07723980076767c367605454..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index bbbac94c15b45ab65c0148ddd5169d196eada9bf..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 82db5055699c6c9e300a5bc6cc3e7dd936859a00..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 59ecc9ff3cbef7d3b2484b2389234c1f39edc8ab..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a3e5175b9098d3ccb097e5c633beb1f10fe22ca9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3946c5fae97c5573c79aca8f8a4b266fe82bf9b6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..ecc8b1c9f79c6d8c868e813ec312d4441c0b2eb6
GIT binary patch
literal 9714
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/folder-new.svg
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg97"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="folder-new.svg"
+   inkscape:export-filename="/home/jimmac/Desktop/horlander-style3.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective71" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient5029"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient5027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       id="linearGradient9766">
+      <stop
+         style="stop-color:#6194cb;stop-opacity:1;"
+         offset="0"
+         id="stop9768" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="1"
+         id="stop9770" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3096">
+      <stop
+         id="stop3098"
+         offset="0"
+         style="stop-color:#424242;stop-opacity:1;" />
+      <stop
+         id="stop3100"
+         offset="1.0000000"
+         style="stop-color:#777777;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient319"
+       inkscape:collect="always">
+      <stop
+         id="stop320"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop321"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1789">
+      <stop
+         style="stop-color:#202020;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop1790" />
+      <stop
+         style="stop-color:#b9b9b9;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop1791" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1789"
+       id="radialGradient238"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.055022,-2.734504e-2,0.177703,1.190929,-3.572177,-7.125301)"
+       cx="20.706017"
+       cy="37.517986"
+       fx="20.706017"
+       fy="37.517986"
+       r="30.905205" />
+    <linearGradient
+       id="linearGradient3983">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.87628865;"
+         offset="0.0000000"
+         id="stop3984" />
+      <stop
+         style="stop-color:#fffffe;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop3985" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3983"
+       id="linearGradient491"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.516844,0.000000,0.000000,0.708978,-0.879573,-1.318166)"
+       x1="6.2297964"
+       y1="13.773066"
+       x2="9.8980894"
+       y2="66.834053" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="46.689312"
+       x2="12.853771"
+       y1="32.567184"
+       x1="13.035696"
+       gradientTransform="matrix(1.317489,0.000000,0.000000,0.816256,-0.879573,-1.318166)"
+       id="linearGradient322"
+       xlink:href="#linearGradient319"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="6.1802502"
+       x2="15.514889"
+       y1="31.367750"
+       x1="18.112709"
+       id="linearGradient3104"
+       xlink:href="#linearGradient3096"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9766"
+       id="linearGradient9772"
+       x1="22.175976"
+       y1="36.987999"
+       x2="22.065331"
+       y2="32.050499"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient12512">
+      <stop
+         id="stop12513"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop12517"
+         offset="0.50000000"
+         style="stop-color:#fff520;stop-opacity:0.89108908;" />
+      <stop
+         id="stop12514"
+         offset="1.0000000"
+         style="stop-color:#fff300;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12512"
+       id="radialGradient1758"
+       gradientUnits="userSpaceOnUse"
+       cx="55.000000"
+       cy="125.00000"
+       fx="55.000000"
+       fy="125.00000"
+       r="14.375000" />
+  </defs>
+  <sodipodi:namedview
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.10196078"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-83.185817"
+     inkscape:cy="-7.2408029"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="872"
+     inkscape:window-height="659"
+     inkscape:window-x="898"
+     inkscape:window-y="342"
+     inkscape:showpageshadow="false"
+     stroke="#3465a4" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>New Folder</dc:title>
+        <dc:date />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>folder</rdf:li>
+            <rdf:li>directory</rdf:li>
+            <rdf:li>create</rdf:li>
+            <rdf:li>new</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Tuomas Kuosmanen</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Folder"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       id="g5022"
+       transform="matrix(2.165152e-2,0,0,1.903841e-2,42.41538,36.93372)">
+      <rect
+         y="-150.69685"
+         x="-1559.2523"
+         height="478.35718"
+         width="1339.6335"
+         id="rect4173"
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path5058"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         id="path5018"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       d="M 4.5217805,38.687417 C 4.5435766,39.103721 4.9816854,39.520026 5.3979900,39.520026 L 36.725011,39.520026 C 37.141313,39.520026 37.535823,39.103721 37.514027,38.687417 L 36.577584,11.460682 C 36.555788,11.044379 36.117687,10.628066 35.701383,10.628066 L 22.430510,10.628066 C 21.945453,10.628066 21.196037,10.312477 21.028866,9.5214338 L 20.417475,6.6283628 C 20.262006,5.8926895 19.535261,5.5904766 19.118957,5.5904766 L 4.3400975,5.5904766 C 3.9237847,5.5904766 3.5292767,6.0067807 3.5510726,6.4230849 L 4.5217805,38.687417 z "
+       id="path216"
+       style="fill:url(#radialGradient238);fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#linearGradient3104);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+       sodipodi:nodetypes="ccccccssssccc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9788"
+       d="M 5.2265927,22.5625 L 35.492173,22.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9784"
+       d="M 5.0421736,18.5625 L 35.489104,18.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.9806965,12.5625 L 35.488057,12.5625"
+       id="path9778"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.3861577,32.5625 L 35.494881,32.5625"
+       id="path9798"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9800"
+       d="M 5.5091398,34.5625 L 35.496893,34.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.0421736,16.5625 L 35.489104,16.5625"
+       id="path9782"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9780"
+       d="M 5.0114345,14.5625 L 35.48858,14.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9776"
+       d="M 4.9220969,10.5625 L 20.202912,10.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.8737534,8.5624999 L 19.657487,8.5624999"
+       id="path9774"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.3246666,28.5625 L 35.493876,28.5625"
+       id="path9794"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9792"
+       d="M 5.2880638,26.5625 L 35.493184,26.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.2265927,24.5625 L 35.492173,24.5625"
+       id="path9790"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.1958537,20.5625 L 35.491649,20.5625"
+       id="path9786"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9796"
+       d="M 5.3246666,30.5625 L 35.493876,30.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.5091398,36.5625 L 35.496893,36.5625"
+       id="path9802"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="color:#000000;fill:url(#linearGradient491);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.2138050;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible;opacity:0.45142857"
+       d="M 6.0683430,38.864023 C 6.0846856,39.176251 5.8874317,39.384402 5.5697582,39.280326 L 5.5697582,39.280326 C 5.2520766,39.176251 5.0330270,38.968099 5.0166756,38.655870 L 4.0689560,6.5913839 C 4.0526131,6.2791558 4.2341418,6.0906134 4.5463699,6.0906134 L 18.968420,6.0429196 C 19.280648,6.0429196 19.900363,6.3433923 20.101356,7.3651014 L 20.674845,10.180636 C 20.247791,9.7153790 20.255652,9.7010175 20.037287,9.0239299 L 19.631192,7.7647478 C 19.412142,7.0371009 18.932991,6.9328477 18.620763,6.9328477 L 5.7329889,6.9328477 C 5.4207613,6.9328477 5.2235075,7.1409999 5.2398583,7.4532364 L 6.1778636,38.968099 L 6.0683430,38.864023 z "
+       id="path219"
+       sodipodi:nodetypes="cccccccccscccccc" />
+    <g
+       style="stroke-miterlimit:4.0000000;stroke-width:0.99946535;stroke:none;fill-rule:nonzero;fill-opacity:0.75706214;fill:#ffffff"
+       id="g220"
+       transform="matrix(1.040764,0.000000,5.449252e-2,1.040764,-8.670199,2.670594)"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-ydpi="74.800003">
+      <path
+         style="fill-opacity:0.50847459;fill:#ffffff"
+         d="M 42.417183,8.5151772 C 42.422267,8.4180642 42.289022,8.2681890 42.182066,8.2681716 L 29.150665,8.2660527 C 29.150665,8.2660527 30.062379,8.8540072 31.352477,8.8622963 L 42.405974,8.9333167 C 42.417060,8.7215889 42.408695,8.6772845 42.417183,8.5151772 z "
+         id="path221"
+         sodipodi:nodetypes="cscscs" />
+    </g>
+    <path
+       style="color:#000000;fill:url(#linearGradient9772);fill-opacity:1.0;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:block"
+       d="M 39.783532,39.510620 C 40.927426,39.466556 41.746608,38.414321 41.830567,37.189615 C 42.622354,25.640928 43.489927,15.957666 43.489927,15.957666 C 43.562082,15.710182 43.322016,15.462699 43.009787,15.462699 L 8.6386304,15.462699 C 8.6386304,15.462699 6.7883113,37.329591 6.7883113,37.329591 C 6.6737562,38.311657 6.3223038,39.134309 5.2384755,39.513304 L 39.783532,39.510620 z "
+       id="path233"
+       sodipodi:nodetypes="cscccscc"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-ydpi="74.800003" />
+    <path
+       sodipodi:nodetypes="ccsscsc"
+       id="path304"
+       d="M 9.6202444,16.463921 L 42.411343,16.528735 L 40.837297,36.530714 C 40.752975,37.602225 40.386619,37.958929 38.964641,37.958929 C 37.093139,37.958929 10.286673,37.926522 7.569899,37.926522 C 7.8034973,37.605711 7.9036547,36.937899 7.9049953,36.92191 L 9.6202444,16.463921 z "
+       style="opacity:0.46590909;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient322);stroke-width:0.99999970px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1.0000000" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path323"
+       d="M 9.6202481,16.223182 L 8.4536014,31.866453 C 8.4536014,31.866453 16.749756,27.718375 27.119949,27.718375 C 37.490142,27.718375 42.675239,16.223182 42.675239,16.223182 L 9.6202481,16.223182 z "
+       style="fill:#ffffff;fill-opacity:0.089285679;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
+    <g
+       id="layer4"
+       inkscape:label="new"
+       style="display:inline"
+       transform="translate(-1.976491,1.981795)">
+      <path
+         sodipodi:type="arc"
+         style="color:#000000;fill:url(#radialGradient1758);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25000024;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block"
+         id="path12511"
+         sodipodi:cx="55"
+         sodipodi:cy="125"
+         sodipodi:rx="14.375"
+         sodipodi:ry="14.375"
+         d="M 69.375 125 A 14.375 14.375 0 1 1  40.625,125 A 14.375 14.375 0 1 1  69.375 125 z"
+         transform="matrix(0.783292,0,0,0.783292,-6.340883,-86.65168)"
+         inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/stock_new-16.png"
+         inkscape:export-xdpi="33.852203"
+         inkscape:export-ydpi="33.852203" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="pattern" />
+</svg>
index d1e4661482a5583579c56fbfd2649aedb1fe694c..84b7cccb8114eba278c7154a0c33e3ea658e475c
GIT binary patch
literal 5224
zc${@s`9IXpAAj#*tz%jDy4R7T9P7xDuvkI}iE?hql{0rFOY4XYp~%&um2(}r%C!iU
zvyU9PrL2-7Aqn5@5BR?3F*85RW9BvUd_14?dfv0PI)`8tVg&#IVP=Z6Wz2+s9S&oR
zy?R#%858W<`Exkn_+KM;Jj((AUQsigfn8+5hRbY~;yK6TOKwv$(HqZ4wO<ryzahR8
zWU}GKm0mDH{!-rTIs2RUrrjqZX{ms$%zXP^hJYD<vz_!7`l{U%hdZ$Z&kRCYXWlc)
z9lEY+HgZDyph0QgC1*70dnI+EExP7w*oOn>ugsPa4h{}(oo+EZ6Ao@+5V8LkoC>+V
z{Z$UNM_~7FgTQV}q`q%l@|_`6^md<s+wC9KKR(}yV*^c3R5`f8HlNLQK1LXTexH;7
z?BEvlh4SXg;!sB#1sb`WAkb-!i;Wi2d~Sy6KMGNO{C9FtxvSvGPRHC}@*@v)NiBdy
zB}T43_Nr@Zs~R`J4Y$|$xD24&@ucC;zB*GU3X_9^f(Q`{x0tiuKykl5cjGq)fFsWj
zYI;ML%>m#7n09oer{vbjj(5#%#_&@jC}E<3gDu~tM@BeIO1TyyR}gX(U@2mmr4FeC
zeGS5zYs;1^3}W(!Nn^9bMf(E*mW79K|A8#&?u7-h-QC^I*HY<AlQmAjW|afg*(^qF
z3?Tr%4v@3+c*chFH7y+lSY~!-n_VV{H<}MSI&{x&z2b@dyESkc^q;iZ9Tu9ClJd$`
zVipW7$!iQE^A}CR{lSasEd2hn2T4gu(~FA(``h#l)jNnHpm41Qq(!$jzj~%{#0OZC
zW^v9VSl$4D)?3>$MYn&Ng%qglHukFNH8NgGv4a5xA*S*VJOq>1prA)Skir1*z}WyN
z&H7~ct)i9xDCei==liy{>L&p)QTRV-=j`_{38CC;PP@uCS*uMC%rxiIXXvvY>l>be
z1tFvXcjxv<n`g&!+oSrich3L#(V3Jgj(*;(BEnIe-NQhYh^&!bt6UyFq|Pi-PUray
z``<r1THh6TcG5zA=M-=h^WnK3>2f8=It<dp512DsA));bO84?p3#p=d&D-aGXikL}
zt-kbcyRzEd4KgWxAi?AQO*6XdaT3(ZgiQ4?ghLGg3h&eGr2?G~0JS5&xyeKvfhN+n
zwp4mBL?jqE`u2iebYSzy<2dN>&rU_Jn!Y*%3VDw*-<)i21|Q7jMMOo1wc`l^AZ4D=
zCq;z*hQ`uTsRI32v54<;Ag&WY=Yz5@npEc(AMGY3e+_pn73AZ76=K+r|2}kZz10;_
zEKIn_Lr!?wMo6vRS8}gY{2?h-moD)kTv7f+Vy}dfYx{Im>~Qpdm$L&W{`zZJH#vhh
zXKmkV);hoVxqk`Ts${PUPC%kKlGe}ucFtRH&GyV0xA2`!FM*R(NG4M3Nk$ejJiNxm
z1Mq^Yv;0b5Qh%!Z=X~%>{1VCvq_avKanqjsdierDy9fN~Z$cmkRA6_zZ3CAiiv#1K
z!yBG?{LL~w3|baNeU&fJiJ<OWaY^W~sH6HYGc!jX?o2(PYd_5%ZFIdo7!=L~p&;;6
zXa|G96exApMeEF&p4q^z`_g7X%RNl&FvwG%6s<Ha=tfPkVk3s#veTm@6T_af8<{C>
zATsc}ft^&(c3vFMwl)D}kc_UaMgMog@^bOWiUqXFS(dx8MtF~&J^5;5w#CW!Z%L!^
zIyJygZFodegk$4CRH@^OBJB;IpC-uIhH!FaFaZ3BrNe*G>K{XA*Q!AL-Is=yrQ!x}
zc33>SxMI^M$VGNg#+v((s^n6TiOcu;!l9?f^A0S}*=)}>H*FAZ1ZWmsR66hU*ne+4
zJkWo1EZlWg=Nd`E@*<G<`%RPYl=G*08-)pgq_P6fw3SSA$Jr3yc{jf2YflqhDq(R}
z$2z@Ct*3vi@jJg>x#jPZrywLA^XnZzt2k3xa1H_*Vi5`Y0eQmzPs?LNrA$x96`TB;
zXD4@?^%nVCJGzoX|2STGgt)29O=|`<vS|&fGVblpslcti<SC~#+dP%p>|iX8AWv0!
z1098BUqnEe(%NA<G>QQJ<Cmw|G92j9kReYsdR?8dPxzk(f1TKY!`)~I-=ouPN<D7b
zwf@Tmqw~*^9~YzmcRwmionTwJJsZ<?$r~rIA@j}i52yNHS{me!wKWnt7M<5OjGGOd
zI^|L_DtMX9Yrk?S9ex`h?L3*Y5GgFT6d1F8N*rA6fVgZ<K*Lpa*%c_S@EA;-fWJ*Q
zjwtW-yJb)LnvB(ad51pNA!*@{M%|5zGF!jIJEI)x17kM&cNUMMr=Ax`#V5Z;#nG-!
zgnRKvFFygnTWRpA*nLjd!}xXW^QW;z^ed=D;Oh&Jt+}bZPFvi?qTKD+qw_hNYx{+l
zio6uzX4b+O_5(xtc)Mq@^Rp2Hzn4nefDDXG7j)^I5`E_<1TMk&b!plIp=bJ*m#<do
z25D8K9`3l^X4OA@5dt@&-+L{lTg<!MbwroV1K^5n{(_IV$#N;q(bb{DKU6>cvMql(
zU1-4GPoNFP`XX_;o(UgvSX-P&UCapzgALO1mtJOb`{c!kq^Vn~px7PrfjAUEqhTy0
zF@T_K``*^gMK32dn*sQueeJE3ynsN|^1Be0WWp9HKa{_$#buCz-;`^#rQX4}=OS3=
zzA1?`cWJYDbxS7}T7`lJ2`qgRz@X{e%vsmEAD;aq2~TWA55CnX%8SUKZ#{}mqI$Hx
zf_Qsb`!UDaf05;<@CIKIy6+<-!2to-4R=#tZ3O`nh5css`|GFzU;QOhAp1eL)co=2
zw#cm_VX3+oL%-<&&~_I}dgxXxN0g<>y!+-&lH~(=vq8sJKxfcTwROC#AV_ridmvhe
zvi17%2gU7akp@G_G;`r3c<xZ83}Fs|rMW;p&2aG=b7|2%tDSlqk5w@@e7v6RG6yX}
z{n!(%Gg8<=ti|ZYL=V4hDEXv<1rM6t=+#ZqJMU0K$Y#4zuzDjL-42_E@`9L@6GR<!
z)7p`%S_b|(z@W+R;48jNmOwvanYY1E2$63mgwMO;g6(g<23^G--Y1mEp(*Nj4VwA2
ziYAOXk|;cIpj8t*m1ut`<iW|7yV?Z9r)XRN{#8A>l%CsCc#V7zO#~#<_qw1(XH$b#
zhL)C~@92;WJx@*z{RCH%pKz^xJvrFOHO(GzLj&TRu==!69bBbnyv9;@CYeAQO=4M_
z;RMF3CjpRuH~jt0I9qe50lq9@V`JlSJ*brFRox8?VHpiW(M~M0!&b%MNYJ=pQDp4P
zLuQO72ii^_tmOmrU#2Eh-!%e;hVQ&99*IIHgHX~EC}24nI3=~hUFi|2-OPfiVnGsD
zHnie@HBW;5RX`Ns*7kb2v<#d_h;`&n7k4oAjHq}0>9y+!=>0(F<5E|fz77(WtPV{;
zGV1$Tv3$XnJm?iZmTVcWk8iEHI+@3WwH?^z>CLd*A&a?y+8NGY!t7vR`x0_}dd@K&
z`kf=|t+~e?5wa|6{pH`ZcCJY0bZ9^lP^ZV!i!u@!ur?pI46rjd;70dTX2dt_t<XRT
zz2I+>V1jkXe23CBG#3RPE9{(Fr+`8otk1z@%~UlF-g7|bg&#o-@Yv=1SXqUO2O6Qu
z*pr5y&fVRUaLnGrjAqo|hQrzzpv~w!BoeI9S8d&KP3B{{I#_Lx4URv6j)98J<rx)?
z;T-^q=BD*~w}t5@SUl?@G}KV%)*p_Xbs4<<`}yGJ4H*DPDPcG}*^i)XTe<2ua^Y1z
zfwgE*Au=;#E6YkuV9k}LKo9>J4yU08zg_4hUWHS#A0JS&PtsrBoBs5{(tTTBXpv2e
z#lgK6K?2$EdFno&qowQ!!@>66;A~qN)cYf$XSS>s-vK@e=DR4OZQp(*O~{r@mFn0L
zO-=44hoRx{mQqIcG8XSUQb2hO@ZvO5-Bc3!P!|XUe{Jr3QaqKQ#cJ_f<&9M_OI;Ti
zdA`dK{^?el!XQaB<DTjT8Y)vuZUyrBMwW{>FY=*Oae}q5Ff!E;c7;#l@i^clO-MWD
zF<eU*9_fS0QHHSABIn?DgUeel*B7=e)+4%oaRz{Y=9O*Gr~9&<$5(zdIIF7kuXdtF
zP&!*3SYT;_M3%mf#K0=niq(LGr@=P)0_`Tes%l#kKf!kreW#+j{A9rlHb;SQJNgiY
zoc*x!Ot-AL@#>~Sz4~i$XdLBgi+}NKGT4*!y50wTIdF$li<{wZ_Z}h<qRixMa6K~q
zt>-nZ<l<!PtM9Ykctz8^^QY*#*+gdE!eP5jO!;YAsH0GvU&5|<kTd~VvLg&Kmmfcs
z%i?RYiAk^{V#v{wsO)myNBpiY0@JU9i3hSb<k?Z?edeBWxlvXu<7=l?pykJc<kI+^
zV@Usvsq11-ZFYKC{_@V#97Ru6C7#?_3Nvbo8%}6cw~p1sESVDIQb-80KHn5k0|4Q3
zO{^=qUq31%e&~5L;h_CJN2pyX{w*wbWFPpG4h5${we<8x!o%N=wy$XcBian7k||9&
z`Pqp4u@C)DgSJY-Dh5@+4c|EyH6Dn9P8|Zz+o{R8uj7~A2A{xE@9KYxg?YEs*|M5*
zSR6?sEH|9PY|H&!)*H^6V_<Sj7TY~m&i4Q-n{Lg3xh0%*)7BI_1VZQuhCI7z*V3g6
zJ!dx}QNYKYWr4Rh4XSA0R9sU5jERr=*s#P69|Eg3*9Kf7!{hNyCWl!1E0UY4U{<Sw
zy%q}p^6}W|d3Ti_G-mjTF0V*@R5U0~3|ejijUXaJ^wU+3d8s5C8jeh$RArX79SUU9
zDDl~xMGreIiJ&1ZtS5pgYpww{X4GRYkF&X6cJE6hU=vd%lQ#H95*qIv%Kua{$N*`3
ztGG6qpdxokgK5{g?&&W(b%2Omb<?!ry&4hG5(*J710HUJ2>+SBJ6SmRpTwt2fB%f>
z0VTnekxVnkJ?;?>^0l0x)v{zwM0ZIZC&q$DP7*qSuu}bUzZDT*A0-!QzX#@6Y~2+u
z*?!8j<_^tcDTzXx3dcKxQ!4eZQdF`fc~dZoVhYPTx^LvqQg?el&v4S}GXF3$<oQb<
zqR#d6>^YMrPJ9M2u{bzRczR#Au!n6vv$kPRBIf`tx$Sx%X6<(XwKo6!&%!m#cQbGw
zxamjISNigbK4gFHxFx)Ht?1!*_inS2s0!oL5=0fp3TB{s8p`mpuWtH*jlB9^|NSD9
z2If(a^w2+-aVjdO^@L0TqWdjYSpLl`0d9t>$6`6&nUK@C*n5Kl&~j#y?i+ieWbJXG
z^ELTi5j>*uDR4v3t*e~SnpGIgehdiPpss*}eXZ~)lYUeAnBP?kGcs7V-ASeI7Adwk
z{0%A_-0>Y7yp@N*WmD|ikp_bizJ#Vc&OPp;l2fEpE01+IRa@fxBck5k;wKITL)1=i
zSX=deiwP3|;{Zd+k9mNxjh&|2u_XY&C1Ex%BBo*l_iQ<XXPc|p-d5~>4iE4F-lQ4<
zEN?;ku15r8D7<n-f?z7&7v|ln0o*GuIH|-;P+&eupp_pffdcHP>zRJzOjP*Sxe6`}
z?26!>-6?}x8e*j~SVAV$Dh}lWg#)i9w%}MCZZ+l4EPx}bTS~}$wph|qLSUIZ4SPnw
zvec-=yz5yxGVh0PTosJ#`!=Ft4u)r^#9x{{@AbKni^kt65oh}rNfzYpud2P9WOI23
zfHx)}Yii!yOo$(izj!?+tk6ly|L@u)ic+21<gFlWkOi>Y*9@FxVF&$kCa7XV9Y^8j
zJ;Bv8xcM`BxlYX&4d@*T?QbsrJW=Tg7p%=EY+dLK<e}-gC>IVh_7*pJgS~}m&h>Jv
zYC7fC>~=1i?2;=Ku%ZvqK6?Drik<0d(1Wn=Mse0*b?9~Fq{><GzkBRW3jW1=l32nm
z@DNwG3~jCp-18@*C5)#IG?z5vzD|BgKf&-vrlO^Cjos7)e`SNF#!RvqVZ>Pev?k{j
z=6iP>k(dhB)Sl?d^<8rJohIW6Xa?_-lIrs2v9Lgzt0N1ZIiaEdKQlnrAUiooq51*M
z;N>JFs?`AQb6X|TOCP8BtnAwisYkofm`U>j9>_)Z;KZl(lUpCATTr{lc$U<I_MRJ+
za{TN~U&JZameCv}u{@63?|I%;1uQ+=M?T^EOneYRHyPVz)@@EYdn)L_Q+wCQ+*0rM
z`jaC*S<7ON1DK7}#i^18g|-T{g^p;#wY}8e-wU@rz!0&RZy!&Nt}MeVc+)u2w%!c1
ztP?UW#Qq-Ml0A+fX1R2h{XO%}giyv;0hI48#vVuKD7zhHoG2ab8Z1g|Z_<xg<y<(x
zOL2Z(PP`Vpr@yej>lVXC>Go2t`MG{_AOJjLrOG5=+^xU=DXTX1SG`65f$aI8T8haZ
zy!4OSest{abOCgxIpU8`%;=#Aalh0|5dKH!!S@KS%)=2%;gdhU{AKAqs!GYPkHv2z
zki{7aFHRsuK>$PwtO7Fu$SA(x@V|GRjt`WNZ__(|+$Q}eKi#C>Way<fCZj%k7=6tG
zXbO29&VSmhv@+zZeUjL;kH)a&vPQzF(`2EyF#CT3limwh?;41&e}s0U#@1y~OK|7|
z?2<HBYf}f(rMFu|v;&k4&dIIa_lK_W1gzfVPKDQ*@|eDdUQRJK<i5{#{(a>lb>H##
z4Eg;`uP<ST%v3%bIN$M{1<zxkK4}%CGKaF_KsMbMm|l>j`4Ym4?`v8DZRv|91PaVe
z_>bdve`sAa>q`quq4Ws`&>H&pWqQnegQ~*k{fcKdx?+ZQYM+X2jDZ8BfUAh&*=dtS
n7arQbJiaaB_`S{l6PFRkoI`QquKf^q48RC8V=Elh5Fh_PVZ~|e
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/folder.svg
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg97"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/places"
+   sodipodi:docname="folder.svg"
+   inkscape:export-filename="/home/jimmac/Desktop/horlander-style3.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective68" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6719"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6717"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient6715"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient9806">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop9808" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop9810" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9766">
+      <stop
+         style="stop-color:#6194cb;stop-opacity:1;"
+         offset="0"
+         id="stop9768" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="1"
+         id="stop9770" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3096">
+      <stop
+         id="stop3098"
+         offset="0"
+         style="stop-color:#424242;stop-opacity:1;" />
+      <stop
+         id="stop3100"
+         offset="1.0000000"
+         style="stop-color:#777777;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient319"
+       inkscape:collect="always">
+      <stop
+         id="stop320"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop321"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1789">
+      <stop
+         style="stop-color:#202020;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop1790" />
+      <stop
+         style="stop-color:#b9b9b9;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop1791" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1789"
+       id="radialGradient238"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.055022,-2.734504e-2,0.177703,1.190929,-3.572177,-7.125301)"
+       cx="20.706017"
+       cy="37.517986"
+       fx="20.706017"
+       fy="37.517986"
+       r="30.905205" />
+    <linearGradient
+       id="linearGradient3983">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.87628865;"
+         offset="0.0000000"
+         id="stop3984" />
+      <stop
+         style="stop-color:#fffffe;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop3985" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3983"
+       id="linearGradient491"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.516844,0.000000,0.000000,0.708978,-0.879573,-1.318166)"
+       x1="6.2297964"
+       y1="13.773066"
+       x2="9.8980894"
+       y2="66.834053" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="46.689312"
+       x2="12.853771"
+       y1="32.567184"
+       x1="13.035696"
+       gradientTransform="matrix(1.317489,0.000000,0.000000,0.816256,-0.879573,-1.318166)"
+       id="linearGradient322"
+       xlink:href="#linearGradient319"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="6.1802502"
+       x2="15.514889"
+       y1="31.367750"
+       x1="18.112709"
+       id="linearGradient3104"
+       xlink:href="#linearGradient3096"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9766"
+       id="linearGradient9772"
+       x1="22.175976"
+       y1="36.987999"
+       x2="22.065331"
+       y2="32.050499"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9806"
+       id="radialGradient9812"
+       cx="24.35099"
+       cy="41.591846"
+       fx="24.35099"
+       fy="41.591846"
+       r="19.136078"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.242494,1.565588e-16,31.50606)"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.10196078"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="54.359127"
+     inkscape:cy="-13.803699"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1026"
+     inkscape:window-height="818"
+     inkscape:window-x="169"
+     inkscape:window-y="30"
+     inkscape:showpageshadow="false"
+     stroke="#3465a4" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Folder Icon</dc:title>
+        <dc:date />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>folder</rdf:li>
+            <rdf:li>directory</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Folder"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       transform="matrix(2.262383e-2,0,0,2.086758e-2,43.38343,36.36962)"
+       id="g6707">
+      <rect
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient6715);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect6709"
+         width="1339.6335"
+         height="478.35718"
+         x="-1559.2523"
+         y="-150.69685" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         id="path6711"
+         sodipodi:nodetypes="cccc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path6713"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    </g>
+    <path
+       d="M 4.5217805,38.687417 C 4.5435766,39.103721 4.9816854,39.520026 5.3979900,39.520026 L 36.725011,39.520026 C 37.141313,39.520026 37.535823,39.103721 37.514027,38.687417 L 36.577584,11.460682 C 36.555788,11.044379 36.117687,10.628066 35.701383,10.628066 L 22.430510,10.628066 C 21.945453,10.628066 21.196037,10.312477 21.028866,9.5214338 L 20.417475,6.6283628 C 20.262006,5.8926895 19.535261,5.5904766 19.118957,5.5904766 L 4.3400975,5.5904766 C 3.9237847,5.5904766 3.5292767,6.0067807 3.5510726,6.4230849 L 4.5217805,38.687417 z "
+       id="path216"
+       style="fill:url(#radialGradient238);fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#linearGradient3104);stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+       sodipodi:nodetypes="ccccccssssccc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9788"
+       d="M 5.2265927,22.5625 L 35.492173,22.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9784"
+       d="M 5.0421736,18.5625 L 35.489104,18.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.9806965,12.5625 L 35.488057,12.5625"
+       id="path9778"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.3861577,32.5625 L 35.494881,32.5625"
+       id="path9798"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9800"
+       d="M 5.5091398,34.5625 L 35.496893,34.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.0421736,16.5625 L 35.489104,16.5625"
+       id="path9782"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9780"
+       d="M 5.0114345,14.5625 L 35.48858,14.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9776"
+       d="M 4.9220969,10.5625 L 20.202912,10.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 4.8737534,8.5624999 L 19.657487,8.5624999"
+       id="path9774"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.3246666,28.5625 L 35.493876,28.5625"
+       id="path9794"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9792"
+       d="M 5.2880638,26.5625 L 35.493184,26.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.2265927,24.5625 L 35.492173,24.5625"
+       id="path9790"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.1958537,20.5625 L 35.491649,20.5625"
+       id="path9786"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path9796"
+       d="M 5.3246666,30.5625 L 35.493876,30.5625"
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.5091398,36.5625 L 35.496893,36.5625"
+       id="path9802"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="color:#000000;fill:url(#linearGradient491);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.2138050;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible;opacity:0.45142857"
+       d="M 6.0683430,38.864023 C 6.0846856,39.176251 5.8874317,39.384402 5.5697582,39.280326 L 5.5697582,39.280326 C 5.2520766,39.176251 5.0330270,38.968099 5.0166756,38.655870 L 4.0689560,6.5913839 C 4.0526131,6.2791558 4.2341418,6.0906134 4.5463699,6.0906134 L 18.968420,6.0429196 C 19.280648,6.0429196 19.900363,6.3433923 20.101356,7.3651014 L 20.674845,10.180636 C 20.247791,9.7153790 20.255652,9.7010175 20.037287,9.0239299 L 19.631192,7.7647478 C 19.412142,7.0371009 18.932991,6.9328477 18.620763,6.9328477 L 5.7329889,6.9328477 C 5.4207613,6.9328477 5.2235075,7.1409999 5.2398583,7.4532364 L 6.1778636,38.968099 L 6.0683430,38.864023 z "
+       id="path219"
+       sodipodi:nodetypes="cccccccccscccccc" />
+    <g
+       style="stroke-miterlimit:4.0000000;stroke-width:0.99946535;stroke:none;fill-rule:nonzero;fill-opacity:0.75706214;fill:#ffffff"
+       id="g220"
+       transform="matrix(1.040764,0.000000,5.449252e-2,1.040764,-8.670199,2.670594)"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-ydpi="74.800003">
+      <path
+         style="fill-opacity:0.50847459;fill:#ffffff"
+         d="M 42.417183,8.5151772 C 42.422267,8.4180642 42.289022,8.2681890 42.182066,8.2681716 L 29.150665,8.2660527 C 29.150665,8.2660527 30.062379,8.8540072 31.352477,8.8622963 L 42.405974,8.9333167 C 42.417060,8.7215889 42.408695,8.6772845 42.417183,8.5151772 z "
+         id="path221"
+         sodipodi:nodetypes="cscscs" />
+    </g>
+    <path
+       style="color:#000000;fill:url(#linearGradient9772);fill-opacity:1.0;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:block"
+       d="M 39.783532,39.510620 C 40.927426,39.466556 41.746608,38.414321 41.830567,37.189615 C 42.622354,25.640928 43.489927,15.957666 43.489927,15.957666 C 43.562082,15.710182 43.322016,15.462699 43.009787,15.462699 L 8.6386304,15.462699 C 8.6386304,15.462699 6.7883113,37.329591 6.7883113,37.329591 C 6.6737562,38.311657 6.3223038,39.134309 5.2384755,39.513304 L 39.783532,39.510620 z "
+       id="path233"
+       sodipodi:nodetypes="cscccscc"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-ydpi="74.800003" />
+    <path
+       sodipodi:nodetypes="ccsscsc"
+       id="path304"
+       d="M 9.6202444,16.463921 L 42.411343,16.528735 L 40.837297,36.530714 C 40.752975,37.602225 40.386619,37.958929 38.964641,37.958929 C 37.093139,37.958929 10.286673,37.926522 7.569899,37.926522 C 7.8034973,37.605711 7.9036547,36.937899 7.9049953,36.92191 L 9.6202444,16.463921 z "
+       style="opacity:0.46590909;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient322);stroke-width:0.99999970px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1.0000000" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path323"
+       d="M 9.6202481,16.223182 L 8.4536014,31.866453 C 8.4536014,31.866453 16.749756,27.718375 27.119949,27.718375 C 37.490142,27.718375 42.675239,16.223182 42.675239,16.223182 L 9.6202481,16.223182 z "
+       style="fill:#ffffff;fill-opacity:0.089285679;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="pattern" />
+</svg>
deleted file mode 100644
index 985088a8f92881b8715ebc3e3a5a566ffcdbe633..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index cf189f4696a1d30580c10e6850ce6e5d95a71ed0..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 85c6f85bc9a928eb1c971d096053f181efb916d7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..c5b99e5b24d1e7069fc62812f194476fac6e7a81
GIT binary patch
literal 8111
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/go-first.svg
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="go-first.svg"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg11300"
+   height="48px"
+   width="48px"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective24" />
+    <linearGradient
+       id="linearGradient2301">
+      <stop
+         id="stop2303"
+         offset="0"
+         style="stop-color:#73d216" />
+      <stop
+         id="stop2305"
+         offset="1.0000000"
+         style="stop-color:#4e9a06" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2301"
+       id="radialGradient1441"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.150574,1.757515e-16,3.460315e-16,1.223465,54.74191,-2.461415)"
+       cx="22.752287"
+       cy="29.900566"
+       fx="22.752287"
+       fy="29.900566"
+       r="16.956199" />
+    <linearGradient
+       id="linearGradient8662"
+       inkscape:collect="always">
+      <stop
+         id="stop8664"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop8666"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8650"
+       inkscape:collect="always">
+      <stop
+         id="stop8652"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop8654"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,4.441327e-15,16.87306)"
+       r="15.644737"
+       fy="36.421127"
+       fx="24.837126"
+       cy="36.421127"
+       cx="24.837126"
+       id="radialGradient8668"
+       xlink:href="#linearGradient8662"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8650"
+       id="radialGradient6058"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.046729,-3.749427e-16,2.853404e-16,1.557610,-19.71021,3.166594)"
+       cx="17.474981"
+       cy="1.4732735"
+       fx="17.474981"
+       fy="1.4732735"
+       r="17.171415" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="0"
+     inkscape:window-height="818"
+     inkscape:window-width="1280"
+     inkscape:showpageshadow="false"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer1"
+     inkscape:cy="25.355927"
+     inkscape:cx="12.917407"
+     inkscape:zoom="11.313708"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.25490196"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     fill="#4e9a06"
+     stroke="#4e9a06" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Go Previous</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>go</rdf:li>
+            <rdf:li>previous</rdf:li>
+            <rdf:li>left</rdf:li>
+            <rdf:li>arrow</rdf:li>
+            <rdf:li>pointer</rdf:li>
+            <rdf:li>&lt;</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1"
+     id="layer1">
+    <path
+       transform="matrix(-1.271186,0.000000,0.000000,1.271186,56.54869,-13.15725)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.29946522;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1441);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3a7304;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 2.5000002,6.4999998 L 8.4962092,6.4999998 L 8.4962092,21.625000 L 26.500000,6.5312498 L 26.562500,14.500000 L 39.500000,14.500000 L 39.500000,32.531250 L 26.562500,32.531250 L 26.562500,40.500000 L 8.4962092,25.125000 L 8.4962092,40.498104 L 2.5000002,40.498104 L 2.5000002,6.4999998 z "
+       id="path18242"
+       sodipodi:nodetypes="ccccccccccccc" />
+    <rect
+       style="opacity:0.48099998;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="rect2163"
+       width="32.011883"
+       height="4.0094671"
+       x="7.4881172"
+       y="3.4905324"
+       transform="matrix(0.000000,1.000000,1.000000,0.000000,0.000000,0.000000)" />
+    <path
+       style="opacity:0.48128340;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000004;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       d="M 38.519933,15.448055 L 38.519933,31.504148 L 25.526984,31.504148 L 25.526984,38.156896 L 8.5312502,23.936088 L 8.5319662,22.764585 L 25.570404,8.5000002 L 25.548307,15.507869 L 38.519933,15.448055 z "
+       id="path8658"
+       sodipodi:nodetypes="ccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path8645"
+       d="M 26.066367,7.5151738 L 26.035117,15.040398 L 38.946037,14.946648 L 39.008537,23.924861 C 22.258537,17.674861 18.250000,29.344573 3.0000000,23.094573 L 3.0165920,6.9965978 L 7.8456840,6.9611228 L 7.8622750,22.613148 L 26.066367,7.5151738 z "
+       style="opacity:0.50802141;color:#000000;fill:url(#radialGradient6058);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..9dd57533a269a2615f7fe22760f0fd075290b8c3
GIT binary patch
literal 7902
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%0AmI43l>B&b&8Bmacy>6Ht<x7Y1wcD(5h
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/go-last.svg
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="go-last.svg"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg11300"
+   height="48px"
+   width="48px"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective24" />
+    <linearGradient
+       id="linearGradient1428">
+      <stop
+         id="stop1430"
+         offset="0"
+         style="stop-color:#73d216" />
+      <stop
+         id="stop1432"
+         offset="1.0000000"
+         style="stop-color:#4e9a06" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1428"
+       id="radialGradient1441"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.843022,1.871885e-16,-2.265228e-16,1.020168,4.413860,0.606440)"
+       cx="22.588188"
+       cy="34.462799"
+       fx="22.588188"
+       fy="34.462799"
+       r="16.956199" />
+    <linearGradient
+       id="linearGradient8662"
+       inkscape:collect="always">
+      <stop
+         id="stop8664"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop8666"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8650"
+       inkscape:collect="always">
+      <stop
+         id="stop8652"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop8654"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.046729,-3.749427e-16,2.853404e-16,1.557610,-19.66321,2.389970)"
+       r="17.171415"
+       fy="3.0045178"
+       fx="18.968266"
+       cy="3.0045178"
+       cx="18.968266"
+       id="radialGradient8656"
+       xlink:href="#linearGradient8650"
+       inkscape:collect="always" />
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,1.246400e-15,16.87306)"
+       r="15.644737"
+       fy="36.421127"
+       fx="24.837126"
+       cy="36.421127"
+       cx="24.837126"
+       id="radialGradient8668"
+       xlink:href="#linearGradient8662"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="0"
+     inkscape:window-height="818"
+     inkscape:window-width="1280"
+     inkscape:showpageshadow="false"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer1"
+     inkscape:cy="21.636957"
+     inkscape:cx="37.866635"
+     inkscape:zoom="11.313708"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.25490196"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     fill="#4e9a06"
+     stroke="#4e9a06" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Go Next</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>go</rdf:li>
+            <rdf:li>next</rdf:li>
+            <rdf:li>right</rdf:li>
+            <rdf:li>arrow</rdf:li>
+            <rdf:li>pointer</rdf:li>
+            <rdf:li>&gt;</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1"
+     id="layer1">
+    <path
+       transform="matrix(1.271186,0.000000,0.000000,1.271186,-9.619376,-12.27857)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.29946522;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1441);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3a7304;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 45.500000,6.5000002 L 39.503791,6.5000002 L 39.503791,21.625000 L 21.500000,6.5312502 L 21.437500,14.500000 L 8.4999996,14.500000 L 8.4999996,32.468750 L 21.437500,32.468750 L 21.437500,40.500000 L 39.503791,25.125000 L 39.503791,40.498104 L 45.500000,40.498104 L 45.500000,6.5000002 z "
+       id="path18242"
+       sodipodi:nodetypes="ccccccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path8645"
+       d="M 21.81717,7.1863873 L 21.81717,15.149112 L 9,15.149112 L 9,24.033575 C 23.75,28.283575 28.133537,18.203287 44.883537,23.203287 L 44.866945,7.105312 L 40.037853,7.069837 L 40.021262,22.721862 L 21.81717,7.1863873 z "
+       style="opacity:0.50802141;color:#000000;fill:url(#radialGradient8656);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.48128340;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000004;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       d="M 9.5000002,15.448055 L 9.5000002,31.347898 L 22.492950,31.347898 L 22.492950,38.156896 L 39.519934,23.654838 L 39.487968,22.764585 L 22.449530,8.5000002 L 22.471627,15.320369 L 9.5000002,15.448055 z "
+       id="path8658"
+       sodipodi:nodetypes="ccccccccc" />
+    <rect
+       style="opacity:0.48099998;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="rect2163"
+       width="32.011883"
+       height="4.0094671"
+       x="7.5000000"
+       y="-44.509468"
+       transform="matrix(0.000000,1.000000,-1.000000,0.000000,0.000000,0.000000)" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..3e10732f97b9916b9af6276d1a9f170548141191
GIT binary patch
literal 6922
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/go-up.svg
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="go-up.svg"
+   sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg11300"
+   height="48px"
+   width="48px"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective23" />
+    <linearGradient
+       id="linearGradient2304">
+      <stop
+         id="stop2306"
+         offset="0"
+         style="stop-color:#73d216" />
+      <stop
+         id="stop2308"
+         offset="1.0000000"
+         style="stop-color:#4e9a06" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8662"
+       inkscape:collect="always">
+      <stop
+         id="stop8664"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop8666"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient8650"
+       inkscape:collect="always">
+      <stop
+         id="stop8652"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop8654"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8650"
+       id="radialGradient1438"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-3.749427e-16,-2.046729,1.557610,-2.853404e-16,2.767009,66.93275)"
+       cx="24.53788"
+       cy="0.40010813"
+       fx="24.53788"
+       fy="0.40010813"
+       r="17.171415" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2304"
+       id="radialGradient1441"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.871885e-16,-0.843022,1.020168,2.265228e-16,0.606436,42.58614)"
+       cx="11.319205"
+       cy="22.454971"
+       fx="11.319205"
+       fy="22.454971"
+       r="16.956199" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient1444"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,1.614716e-15,16.87306)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="30"
+     inkscape:window-x="0"
+     inkscape:window-height="818"
+     inkscape:window-width="1280"
+     inkscape:showpageshadow="false"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer1"
+     inkscape:cy="25.620377"
+     inkscape:cx="9.6380363"
+     inkscape:zoom="13.059378"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="0.25490196"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     fill="#73d216"
+     stroke="#73d216" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Go Up</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>go</rdf:li>
+            <rdf:li>higher</rdf:li>
+            <rdf:li>up</rdf:li>
+            <rdf:li>arrow</rdf:li>
+            <rdf:li>pointer</rdf:li>
+            <rdf:li>&gt;</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1"
+     id="layer1">
+    <path
+       transform="matrix(1.214466,0.000000,0.000000,0.595458,-6.163846,16.31275)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.29946521;color:#000000;fill:url(#radialGradient1444);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:nodetypes="cccccccc"
+       id="path8643"
+       d="M 14.491792,38.500000 L 32.469477,38.500000 L 32.469477,25.547437 L 40.500000,25.547437 L 23.374809,5.4992135 L 6.5285585,25.489471 L 14.497096,25.555762 L 14.491792,38.500000 z "
+       style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1441);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3a7304;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cccscc"
+       id="path8645"
+       d="M 7.5855237,25.03253 L 14.995821,25.03253 L 15.062422,31.594339 C 20.718034,20.593878 31.055517,22.749928 31.656768,15.966674 C 31.656768,15.966674 23.366938,6.4219692 23.366938,6.4219692 L 7.5855237,25.03253 z "
+       style="opacity:0.50802141;color:#000000;fill:url(#radialGradient1438);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="opacity:0.48128340;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000004;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       d="M 15.602735,37.500000 L 31.502578,37.500000 L 31.502578,24.507050 L 38.311576,24.507050 L 23.361206,7.0700896 L 8.6546798,24.550470 L 15.475049,24.528373 L 15.602735,37.500000 z "
+       id="path8658"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
deleted file mode 100644
index 913096e66e7847161f4c20044c0125feed55f7fe..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/libgui/src/icons/icons_license
+++ b/libgui/src/icons/icons_license
@@ -1,16 +1,50 @@
-========================================
-Icons created by the Octave developpers:
-========================================
+===========================================
+Icons taken from the Tango-Desktop-Project
+===========================================
+
+Tango-Desktop-Project:
+http://tango.freedesktop.org/Tango_Desktop_Project
+
+Archive with base icon set available at:
+http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz
+
+License
+===========================================
+
+The Tango base icon theme is released to the Public Domain.
+
+Icons used for octave
+===========================================
 
-bp_next.png
-bp_prev.png
-bp_rm_all.png
-bp_toggle.png
-db_cont.png
-db_step_in.png
-db_step_out.png
-db_step.png
-db_stop.png
+applications-system.svg
+document-new.svg
+document-open.svg
+document-print.svg
+document-save.svg
+document-save-as.svg
+edit-copy.svg
+edit-cut.svg
+edit-delete.svg
+edit-find.svg
+edit-find-replace.svg
+edit-paste.svg
+edit-redo.svg
+edit-undo.svg
+folder.svg
+folder-new.svg
+go-first.svg
+go-last.svg
+go-up.svg
+preferences-system.svg
+user-home.svg
+view-refresh.svg
+
+
+
+===========================================
+Icons created by the Octave developpers
+===========================================
+
 graphic_logo_DocumentationDockWidget.png
 graphic_logo_FileEditor.png
 graphic_logo_FilesDockWidget.png
@@ -31,369 +65,17 @@
 widget-close.png
 widget-dock.png
 widget-undock.png
-zoom-in.png
-zoom-out.png
 
-========================================
-Icons taken from the Crystal Project:
-========================================
-
-artsbuilderexecute.png
-configure.png
-editcopy.png
-editcut.png
-editdelete.png
-editpaste.png
-fileclose.png
-filenew.png
-fileopen.png
-fileprint.png
-filesaveas.png
-filesave.png
-findf.png
-find.png
-folder_documents.png
-folder_new.png
-folder.png
-gear.png
-home.png
-ok.png
-redled.png
-redo.png
-reload.png
-search.png
-undo.png
-up.png
-  derived icons from up.png:
-    arrow_down.png
-    arrow_left.png
-    arrow_right.png
-    arrow_up.png
-    bookmark.png
-warning.png
-
-
-License of the Crystal Project
-========================================
-
-by http://www.everaldo.com/ on 17.07.2011  (not more available)
-by http://www.softicons.com/free-icons/system-icons/crystal-project-icons-by-everaldo-coelho on 12.01.2014
-
-The Crystal Project are released under LGPL. GNU General Public License.
-
-This License Agreement applies to any software library or other program
-which contains a notice placed by the copyright holder or other
-authorized party saying it may be distributed under the terms of this
-Lesser General Public License (also called "this License"). Each
-licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-The "Library", below, refers to any such software library or work which
-has been distributed under these terms. A "work based on the Library"
-means either the Library or any derivative work under copyright law:
-that is to say, a work containing the Library or a portion of it, either
-verbatim or with modifications and/or translated straightforwardly into
-another language. (Hereinafter, translation is included without
-limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the
-source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and
-installation of the library.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of running
-a program using the Library is not restricted, and output from such a
-program is covered only if its contents constitute a work based on the
-Library (independent of the use of the Library in a tool for writing
-it). Whether that is true depends on what the Library does and what the
-program that uses the Library does.
-
-You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the notices
-that refer to this License and to the absence of any warranty; and
-distribute a copy of this License along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that
-you also meet all of these conditions:
-
-The modified work must itself be a software library. You must cause the
-files modified to carry prominent notices stating that you changed the
-files and the date of any change. You must cause the whole of the work
-to be licensed at no charge to all third parties under the terms of this
-License. If a facility in the modified Library refers to a function or a
-table of data to be supplied by an application program that uses the
-facility, other than as an argument passed when the facility is invoked,
-then you must make a good faith effort to ensure that, in the event an
-application does not supply such function or table, the facility still
-operates, and performs whatever part of its purpose remains meaningful.
-(For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function
-or table used by this function must be optional: if the application does
-not supply it, the square root function must still compute square
-roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library, and
-can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based on
-the Library, the distribution of the whole must be on the terms of this
-License, whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of a
-storage or distribution medium does not bring the other work under the
-scope of this License.
-
-You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so that
-they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in these
-notices.
-
-Once this change is made in a given copy, it is irreversible for that
-copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the
-Library into a program that is not a library.
-
-You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms
-of Sections 1 and 2 above provided that you accompany it with the
-complete corresponding machine-readable source code, which must be
-distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source
-code from the same place satisfies the requirement to distribute the
-source code, even though third parties are not compelled to copy the
-source along with the object code.
-
-A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with
-it, is called a "work that uses the Library". Such a work, in isolation,
-is not a derivative work of the Library, and therefore falls outside the
-scope of this License.
-
-However, linking a "work that uses the Library" with the Library creates
-an executable that is a derivative of the Library (because it contains
-portions of the Library), rather than a "work that uses the library".
-The executable is therefore covered by this License. Section 6 states
-terms for distribution of such executables. When a "work that uses the
-Library" uses material from a header file that is part of the Library,
-the object code for the work may be a derivative work of the Library
-even though the source code is not. Whether this is true is especially
-significant if the work can be linked without the Library, or if the
-work is itself a library. The threshold for this to be true is not
-precisely defined by law.
+Icons with elements from the Tango theme
+===========================================
 
-If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten
-lines or less in length), then the use of the object file is
-unrestricted, regardless of whether it is legally a derivative work.
-(Executables containing this object code plus portions of the Library
-will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6, whether
-or not they are linked directly with the Library itself.
-
-As an exception to the Sections above, you may also combine or link a
-"work that uses the Library" with the Library to produce a work
-containing portions of the Library, and distribute that work under terms
-of your choice, provided that the terms permit modification of the work
-for the customer's own use and reverse engineering for debugging such
-modifications.
-
-You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work during
-execution displays copyright notices, you must include the copyright
-notice for the Library among them, as well as a reference directing the
-user to the copy of this License. Also, you must do one of these things:
-
-Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the
-work (which must be distributed under Sections 1 and 2 above); and, if
-the work is an executable linked with the Library, with the complete
-machine-readable "work that uses the Library", as object code and/or
-source code, so that the user can modify the Library and then relink to
-produce a modified executable containing the modified Library. (It is
-understood that the user who changes the contents of definitions files
-in the Library will not necessarily be able to recompile the application
-to use the modified definitions.) . Use a suitable shared library
-mechanism for linking with the Library. A suitable mechanism is one that
-(1) uses at run time a copy of the library already present on the user's
-computer system, rather than copying library functions into the
-executable, and (2) will operate properly with a modified version of the
-library, if the user installs one, as long as the modified version is
-interface-compatible with the version that the work was made with.
-Accompany the work with a written offer, valid for at least three years,
-to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution. If
-distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place. Verify that the user has already received
-a copy of these materials or that you have already sent this user a
-copy. For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception, the
-materials to be distributed need not include anything that is normally
-distributed (in either source or binary form) with the major components
-(compiler, kernel, and so on) of the operating system on which the
-executable runs, unless that component itself accompanies the
-executable.
-
-It may happen that this requirement contradicts the license restrictions
-of other proprietary libraries that do not normally accompany the
-operating system. Such a contradiction means you cannot use both them
-and the Library together in an executable that you distribute.
-
-You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities
-not covered by this License, and distribute such a combined library,
-provided that the separate distribution of the work based on the Library
-and of the other library facilities is otherwise permitted, and provided
-that you do these two things:
-
-Accompany the combined library with a copy of the same work based on the
-Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-Give prominent notice with the combined library of the fact that part of
-it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense, link with, or distribute the
-Library is void, and will automatically terminate your rights under this
-License. However, parties who have received copies, or rights, from you
-under this License will not have their licenses terminated so long as
-such parties remain in full compliance.
-
-You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute
-the Library or its derivative works. These actions are prohibited by law
-if you do not accept this License. Therefore, by modifying or
-distributing the Library (or any work based on the Library), you
-indicate your acceptance of this License to do so, and all its terms and
-conditions for copying, distributing or modifying the Library or works
-based on it.
-
-Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot distribute
-so as to satisfy simultaneously your obligations under this License and
-any other pertinent obligations, then as a consequence you may not
-distribute the Library at all. For example, if a patent license would
-not permit royalty-free redistribution of the Library by all those who
-receive copies directly or indirectly through you, then the only way you
-could satisfy both it and this License would be to refrain entirely from
-distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is implemented
-by public license practices. Many people have made generous
-contributions to the wide range of software distributed through that
-system in reliance on consistent application of that system; it is up to
-the author/donor to decide if he or she is willing to distribute
-software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be
-a consequence of the rest of this License.
-
-If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an
-explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-The Free Software Foundation may publish revised and/or new versions of
-the Lesser General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in
-detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a license
-version number, you may choose any version ever published by the Free
-Software Foundation.
-
-If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the
-author to ask for permission. For software which is copyrighted by the
-Free Software Foundation, write to the Free Software Foundation; we
-sometimes make exceptions for this. Our decision will be guided by the
-two goals of preserving the free status of all derivatives of our free
-software and of promoting the sharing and reuse of software generally.
-
-No Warranty
-
-Because the library is licensed free of charge, there is no warranty for
-the library, to the extent permitted by applicable law. Except when
-otherwise stated in writing the copyright holders and/or other parties
-provide the library "as is" without warranty of any kind, either
-expressed or implied, including, but not limited to, the implied
-warranties of merchantability and fitness for a particular purpose. The
-entire risk as to the quality and performance of the library is with
-you. Should the library prove defective, you assume the cost of all
-necessary servicing, repair or correction.
-
-In no event unless required by applicable law or agreed to in writing
-will any copyright holder, or any other party who may modify and/or
-redistribute the library as permitted above, be liable to you for
-damages, including any general, special, incidental or consequential
-damages arising out of the use or inability to use the library
-(including but not limited to loss of data or data being rendered
-inaccurate or losses sustained by you or third parties or a failure of
-the library to operate with any other software), even if such holder or
-other party has been advised of the possibility of such damages.
+bp-next.svg
+bp-prev.svg
+bp-rm_all.svg
+bp-toggle.svg
+db-cont.svg
+db-step-in.svg
+db-step-out.svg
+db-step.svg
+db-stop.svg
+system-run.svg
deleted file mode 100755
index ab86df2f5872b0126a27b09d5e711db515d4e301..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..52df391997dc0f7275508ef4836cd438ac6e9246
GIT binary patch
literal 14434
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
Cg@`o(
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/preferences-system.svg
@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/categories"
+   sodipodi:docname="preferences-system.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective60" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2250">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2252" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2254" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2265">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2267" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2269" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2257">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2259" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2261" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3087">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop3089" />
+      <stop
+         id="stop3095"
+         offset="0"
+         style="stop-color:#9fbce1;stop-opacity:1;" />
+      <stop
+         style="stop-color:#6b95ca;stop-opacity:1;"
+         offset="0"
+         id="stop2242" />
+      <stop
+         id="stop2244"
+         offset="0.75"
+         style="stop-color:#3d6aa5;stop-opacity:1;" />
+      <stop
+         style="stop-color:#386eb4;stop-opacity:1;"
+         offset="1"
+         id="stop3091" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3077">
+      <stop
+         style="stop-color:#98a0a9;stop-opacity:1;"
+         offset="0"
+         id="stop3079" />
+      <stop
+         style="stop-color:#c3d0dd;stop-opacity:1;"
+         offset="1"
+         id="stop3081" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3061">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3063" />
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="1"
+         id="stop3065" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3049">
+      <stop
+         style="stop-color:#b6b6b6;stop-opacity:1;"
+         offset="0"
+         id="stop3051" />
+      <stop
+         id="stop2262"
+         offset="0.5"
+         style="stop-color:#f2f2f2;stop-opacity:1;" />
+      <stop
+         style="stop-color:#fafafa;stop-opacity:1;"
+         offset="0.67612958"
+         id="stop2264" />
+      <stop
+         id="stop2268"
+         offset="0.84051722"
+         style="stop-color:#d8d8d8;stop-opacity:1;" />
+      <stop
+         id="stop2266"
+         offset="0.875"
+         style="stop-color:#f2f2f2;stop-opacity:1;" />
+      <stop
+         style="stop-color:#dbdbdb;stop-opacity:1;"
+         offset="1"
+         id="stop3053" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3041">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3043" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3045" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3041"
+       id="radialGradient3047"
+       cx="24.8125"
+       cy="39.125"
+       fx="24.8125"
+       fy="39.125"
+       r="17.6875"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.374558,7.194333e-15,24.47041)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3049"
+       id="linearGradient3055"
+       x1="19.648342"
+       y1="42.253601"
+       x2="20.631224"
+       y2="6.7758031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.878270,0.000000,0.000000,0.878270,2.536988,4.967681)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3061"
+       id="linearGradient3067"
+       x1="50.152931"
+       y1="-3.6324477"
+       x2="25.291086"
+       y2="-4.3002653"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.878270,-1.375944e-15,1.375944e-15,0.878270,5.328299,1.650243)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3077"
+       id="linearGradient3083"
+       x1="38.227654"
+       y1="13.602527"
+       x2="37.53537"
+       y2="6.6285896"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.878270,0.000000,0.000000,0.878270,2.847503,5.588712)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3087"
+       id="linearGradient3093"
+       x1="9.7503242"
+       y1="32.28376"
+       x2="16.915297"
+       y2="39.443218"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.878270,0.000000,0.000000,0.878270,2.536988,4.967681)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2257"
+       id="linearGradient2263"
+       x1="12.004697"
+       y1="35.688461"
+       x2="10.650805"
+       y2="33.194965"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.007254,-2.636526e-2,2.636526e-2,1.007254,1.593411,7.919100e-2)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2265"
+       id="linearGradient2271"
+       x1="14.017542"
+       y1="36.942543"
+       x2="15.415793"
+       y2="38.268368"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.878099,-1.732370e-2,1.732370e-2,0.878099,2.163687,4.067899)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2250"
+       id="linearGradient2256"
+       x1="31.177404"
+       y1="19.821514"
+       x2="40.859177"
+       y2="9.6568537"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3041"
+       id="radialGradient2260"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.374558,7.272829e-15,24.47041)"
+       cx="24.8125"
+       cy="39.125"
+       fx="24.8125"
+       fy="39.125"
+       r="17.6875" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#204a87"
+     fill="#3465a4"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="19.425317"
+     inkscape:cy="26.37487"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="1034"
+     inkscape:window-height="818"
+     inkscape:window-x="400"
+     inkscape:window-y="30" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>Preferences System</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>preferences</rdf:li>
+            <rdf:li>settings</rdf:li>
+            <rdf:li>control panel</rdf:li>
+            <rdf:li>tweaks</rdf:li>
+            <rdf:li>system</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(0.751118,0.000000,0.000000,0.578703,17.04087,19.36341)"
+       d="M 42.5 39.125 A 17.6875 6.625 0 1 1  7.125,39.125 A 17.6875 6.625 0 1 1  42.5 39.125 z"
+       sodipodi:ry="6.625"
+       sodipodi:rx="17.6875"
+       sodipodi:cy="39.125"
+       sodipodi:cx="24.8125"
+       id="path2258"
+       style="opacity:0.19886367;color:#000000;fill:url(#radialGradient2260);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.3125;color:#000000;fill:url(#radialGradient3047);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path3039"
+       sodipodi:cx="24.8125"
+       sodipodi:cy="39.125"
+       sodipodi:rx="17.6875"
+       sodipodi:ry="6.625"
+       d="M 42.5 39.125 A 17.6875 6.625 0 1 1  7.125,39.125 A 17.6875 6.625 0 1 1  42.5 39.125 z"
+       transform="matrix(0.836071,0.000000,0.000000,0.685436,-7.959607,15.71781)" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient3055);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 17.906713,21.215676 L 36.899302,40.6474 C 37.667788,41.52567 40.102812,42.204461 41.729787,40.6474 C 43.300913,39.143787 42.937408,37.024536 41.400436,35.487563 L 23.176333,15.946056 C 25.426333,9.696056 20.872444,4.446488 14.997444,5.571488 L 13.73493,6.7242174 L 17.687145,10.456865 L 17.906713,13.750381 L 14.955871,16.443984 L 11.429472,16.05584 L 7.8066086,12.652544 C 7.8066086,12.652544 6.5364873,13.907448 6.5364873,13.907448 C 5.9457238,19.548765 11.844213,24.590676 17.906713,21.215676 z "
+       id="path2140"
+       sodipodi:nodetypes="cczcccccccccsc" />
+    <path
+       sodipodi:nodetypes="cczccccccccccc"
+       id="path3057"
+       d="M 18.117385,19.9401 L 37.320267,39.967712 C 37.915174,40.647605 39.800194,41.173077 41.059681,39.967712 C 42.275934,38.803723 41.994534,37.163152 40.804721,35.973338 L 22.313189,16.352183 C 23.813189,9.852183 20.454401,6.3475455 15.454401,6.4725455 L 15.18427,6.7459223 L 18.787193,9.982189 L 18.917359,14.163983 L 15.303442,17.462466 L 11.061136,17.004257 L 7.8845536,14.012776 L 7.5319165,14.442835 C 7.2194165,20.411585 14.023635,23.1276 18.117385,19.9401 z "
+       style="opacity:0.42613639;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.99999917;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <rect
+       style="opacity:0.17045456;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3067);stroke-width:0.9999972;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="rect3059"
+       width="23.268276"
+       height="2.0554912"
+       x="28.185335"
+       y="-2.6184492"
+       rx="0.88388073"
+       ry="0.88388073"
+       transform="matrix(0.697938,0.716158,-0.716158,0.697938,0.000000,0.000000)" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient3083);fill-opacity:1;fill-rule:nonzero;stroke:#878f9d;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 22.498794,30.12538 C 23.332335,29.410917 35.782628,16.676871 35.782628,16.676871 L 38.856573,16.457303 L 43.687058,9.7604906 L 39.662731,6.1752987 L 33.405057,11.554705 L 33.405057,14.628651 L 20.670142,27.857593 C 20.066332,28.461403 21.730308,30.784082 22.498794,30.12538 z "
+       id="path2144"
+       sodipodi:nodetypes="ccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path3085"
+       d="M 22.401987,29.085455 C 23.04876,28.531078 35.426388,15.855648 35.426388,15.855648 L 38.354971,15.607649 L 42.568887,9.945584 L 39.679156,7.3965946 L 34.202578,12.114067 L 34.357836,14.965022 L 21.681731,28.257345 C 21.213213,28.725863 21.805692,29.596565 22.401987,29.085455 z "
+       style="opacity:0.53977272;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2256);stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       style="color:#000000;fill:url(#linearGradient3093);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+       d="M 8.4653111,43.611561 C 9.7818986,45.07679 13.438996,45.739726 15.060755,42.901647 C 15.767862,41.664211 17.154698,38.198845 23.341883,32.630379 C 24.381029,31.696208 25.481792,29.559241 24.54863,28.406512 L 22.133387,25.991269 C 21.145334,24.893432 18.398973,25.40552 17.272212,26.942145 C 13.913455,31.538339 8.4261393,35.197025 7.1887023,35.638967 C 4.8207828,36.484652 5.0872917,39.975116 6.6538792,41.635454 L 8.4653111,43.611561 z "
+       id="path2142"
+       sodipodi:nodetypes="ccccccscc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a1a1a1;stroke-width:1.13860166;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path2146"
+       sodipodi:cx="41.875"
+       sodipodi:cy="37.5"
+       sodipodi:rx="1.375"
+       sodipodi:ry="1.375"
+       d="M 43.25 37.5 A 1.375 1.375 0 1 1  40.5,37.5 A 1.375 1.375 0 1 1  43.25 37.5 z"
+       transform="matrix(0.878270,0.000000,0.000000,0.878270,2.427204,5.077464)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.60227272;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path3101"
+       sodipodi:cx="19.003494"
+       sodipodi:cy="28.20101"
+       sodipodi:rx="1.767767"
+       sodipodi:ry="1.767767"
+       d="M 20.771261 28.20101 A 1.767767 1.767767 0 1 1  17.235727,28.20101 A 1.767767 1.767767 0 1 1  20.771261 28.20101 z"
+       transform="matrix(0.570876,0.000000,0.000000,0.570876,9.154848,11.25111)" />
+    <path
+       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2263);stroke-width:2.29450917;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 18.678905,29.624807 C 18.678905,29.624807 11.509014,36.92442 8.1502573,38.161857"
+       id="path3103"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="csccccscc"
+       id="path2270"
+       d="M 8.8060013,42.48669 C 10.247267,44.232307 13.405535,44.647919 14.397161,42.116101 C 15.078468,40.376589 17.730783,36.450314 22.594745,32.072748 C 23.411654,31.338363 24.277003,29.658419 23.543411,28.752218 L 21.644704,26.853511 C 20.867961,25.990463 18.708951,26.393033 17.823164,27.601028 C 15.182728,31.214257 9.3398194,35.940582 7.9274145,36.406654 C 5.7406198,37.128264 6.1504221,39.627953 7.3819713,40.933203 L 8.8060013,42.48669 z "
+       style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.99999946;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;opacity:0.19886364" />
+    <path
+       style="opacity:0.27840911;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2271);stroke-width:2.29450917;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 20.824602,31.261024 C 20.824602,31.261024 13.501839,37.878429 11.910849,42.121069"
+       id="path2247"
+       sodipodi:nodetypes="cc" />
+  </g>
+</svg>
deleted file mode 100644
index 35f0d82a780da790e185a88d8a17fc5121cf1f8d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fea4842cb2278d7d6efbc0daa3919598f2e179a3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 0b7754cdcb36186295ff86c50d1f3560a0cf0674..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 88c6eb1d5eb0279b63fc845f25d3a2ba3d811e2e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..25ab65af15ca34bd10976bed695cb9177248ffce
GIT binary patch
literal 17087
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/system-run.svg
@@ -0,0 +1,1334 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="48"
+   height="48"
+   id="svg53383"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="system-run.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview4628"
+     showgrid="false"
+     inkscape:zoom="8.022068"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg53383" />
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3264">
+      <stop
+         id="stop3266"
+         style="stop-color:#c9c9c9;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3276"
+         style="stop-color:#f8f8f8;stop-opacity:1"
+         offset="0.25" />
+      <stop
+         id="stop3272"
+         style="stop-color:#e2e2e2;stop-opacity:1"
+         offset="0.5" />
+      <stop
+         id="stop3274"
+         style="stop-color:#b0b0b0;stop-opacity:1"
+         offset="0.75" />
+      <stop
+         id="stop3268"
+         style="stop-color:#c9c9c9;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914"
+       id="linearGradient3281"
+       xlink:href="#linearGradient3264"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)" />
+    <linearGradient
+       id="linearGradient2300">
+      <stop
+         id="stop2302"
+         style="stop-color:#000000;stop-opacity:0.32673267"
+         offset="0" />
+      <stop
+         id="stop2304"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       x1="99.777298"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311"
+       id="aigrd1"
+       gradientUnits="userSpaceOnUse">
+      <stop
+         id="stop53300"
+         style="stop-color:#184375;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop53302"
+         style="stop-color:#c8bddc;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       x1="99.777298"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311"
+       id="linearGradient53551"
+       xlink:href="#aigrd1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.200685,0,0,0.200685,-0.585758,-1.050787)" />
+    <radialGradient
+       cx="14.287618"
+       cy="68.872971"
+       r="11.68987"
+       fx="14.287618"
+       fy="72.568001"
+       id="radialGradient2308"
+       xlink:href="#linearGradient2300"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.399258,-2.234445e-7,8.196178e-8,0.513264,4.365074,4.839285)" />
+    <linearGradient
+       x1="14.462892"
+       y1="12.284524"
+       x2="34.534348"
+       y2="39.684914"
+       id="linearGradient3760"
+       xlink:href="#linearGradient3264"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.241935,0,0,1.241935,-5.027508,-7.208988)" />
+    <linearGradient
+       x1="99.777298"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311"
+       id="linearGradient3773"
+       xlink:href="#aigrd1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.200685,0,0,0.200685,-54.33576,-1.050787)" />
+    <linearGradient
+       id="linearGradient3340">
+      <stop
+         id="stop3342"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075">
+      <stop
+         id="stop5077"
+         style="stop-color:#adb0a8;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5079"
+         style="stop-color:#464744;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584">
+      <stop
+         id="stop2586"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2684">
+      <stop
+         id="stop2686"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3111"
+       xlink:href="#linearGradient3340-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3109"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3107"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3105"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3103"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4019"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4017"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4015"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4013"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4011"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4009"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4007"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3998"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3996"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3993"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3989"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3987"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3983"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3980"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3875"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3873"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3871"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,0.8954059,-16.673875,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3869"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3867"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3865"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.77737532,0,0,1.0101799,-22.870326,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3863"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.68905195,0,0,1.0367194,14.333752,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3994"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3992"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3990"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3988"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3986"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3984"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3982"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3973"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3971"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3968"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3965"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3963"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3960"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3957"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3954"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3952"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3950"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3948"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3946"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3944"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3942"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3940"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3858"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3856"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3854"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3852"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3850"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3848"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3846"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3844"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3058"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3054"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3052"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.920697,0,0,0.99358,1.9279679,1.3227785)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3050"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1779658,0,0,2.1887027,-26.360604,-32.69736)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3047"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.150533,0,0,0.30361615,-4.5765,26.097687)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3044"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.1168515,0,0,2.1272874,-25.390527,-30.723638)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3040"
+       xlink:href="#linearGradient3340-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-64.167916,12.443583)" />
+    <linearGradient
+       id="linearGradient2684-4">
+      <stop
+         id="stop2686-6"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2688-6"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2584-3">
+      <stop
+         id="stop2586-5"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2588-7"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5075-2">
+      <stop
+         id="stop5077-8"
+         style="stop-color:#a1a49b;stop-opacity:1;"
+         offset="0" />
+      <stop
+         id="stop5079-6"
+         style="stop-color:#d5be00;stop-opacity:1;"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2691-4">
+      <stop
+         id="stop2693-2"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2695-6"
+         style="stop-color:#d3d7cf;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340-2">
+      <stop
+         id="stop3342-1"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-3"
+         style="stop-color:#ffffff;stop-opacity:0.62886596"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient2306-0"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-45.00042,-71.09425)" />
+    <radialGradient
+       cx="107.5884"
+       cy="83.990814"
+       r="12.551644"
+       fx="107.5884"
+       fy="83.990814"
+       id="radialGradient2314-7"
+       xlink:href="#linearGradient2691-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-151.9195,108.0768)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient2690-7"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.128181,0,0,1.128181,-53.99314,-83.36009)" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient3845"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <linearGradient
+       x1="21.702389"
+       y1="8.9115314"
+       x2="21.816015"
+       y2="35.546108"
+       id="linearGradient3843"
+       xlink:href="#linearGradient3837"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       cx="22.5"
+       cy="28.116049"
+       r="14.537862"
+       fx="22.5"
+       fy="28.116049"
+       id="radialGradient2263"
+       xlink:href="#linearGradient2257"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.365562,0,0,2.202845,-30.72517,-34.23996)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient1368"
+       xlink:href="#linearGradient3340-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.658819,0,0,2.080782,-62.4164,12.76204)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient2228"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+    <linearGradient
+       id="linearGradient8662">
+      <stop
+         id="stop8664"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop8666"
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3340-3">
+      <stop
+         id="stop3342-4"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3344-6"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2257">
+      <stop
+         id="stop2259"
+         style="stop-color:#ef2929;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop2261"
+         style="stop-color:#cc0000;stop-opacity:1"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         id="stop3839"
+         style="stop-color:#000000;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop3841"
+         style="stop-color:#ffffff;stop-opacity:0.78350514"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3838">
+      <stop
+         id="stop3840"
+         style="stop-color:#ffe71d;stop-opacity:1;"
+         offset="0" />
+      <stop
+         id="stop3842"
+         style="stop-color:#fffbdc;stop-opacity:1;"
+         offset="1" />
+    </linearGradient>
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3362"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1578206,0,-3.8271488)" />
+    <radialGradient
+       cx="21.929186"
+       cy="-3.2182934"
+       r="13"
+       fx="21.929186"
+       fy="-3.2182934"
+       id="radialGradient3395"
+       xlink:href="#linearGradient3340-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(4.1094029,0,0,2.3370305,-28.86026,-28.444851)" />
+    <radialGradient
+       cx="24.837126"
+       cy="36.421127"
+       r="15.644737"
+       fx="24.837126"
+       fy="36.421127"
+       id="radialGradient3402"
+       xlink:href="#linearGradient8662"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2922213,0,0,0.34100651,38.760643,-13.207928)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3410"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient3412"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.77737532,0,0,1.0101799,86.038647,-67.091915)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3414"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3416"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient3418"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,0.8954059,79.842196,-56.109009)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3420"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient3422"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.68905195,0,0,1.0367194,48.834569,4.1223502)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4212"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4215"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4218"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)" />
+    <linearGradient
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95"
+       id="linearGradient4220"
+       xlink:href="#linearGradient5075-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.0056752,-34.254145,-72.182713)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4223"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)" />
+    <radialGradient
+       cx="25.03499"
+       cy="24.25"
+       r="14.034989"
+       fx="25.03499"
+       fy="24.25"
+       id="radialGradient4226"
+       xlink:href="#linearGradient3838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)" />
+    <linearGradient
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729"
+       id="linearGradient4228"
+       xlink:href="#linearGradient2684-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.99423209,0,0,1.1345837,-42.179159,-84.518165)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4631"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4634"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4637"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5075-2"
+       id="linearGradient4639"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.0056752,-34.254145,-72.182713)"
+       x1="71.288956"
+       y1="124.11652"
+       x2="70.826942"
+       y2="95" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4642"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3838"
+       id="radialGradient4645"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.88127002,0,0,1.1643915,5.4033759,-4.5338561)"
+       cx="25.03499"
+       cy="24.25"
+       fx="25.03499"
+       fy="24.25"
+       r="14.034989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2684-4"
+       id="linearGradient4647"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.99423209,0,0,1.1345837,-42.179159,-84.518165)"
+       x1="70.913956"
+       y1="101.74152"
+       x2="70.951942"
+       y2="88.923729" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#aigrd1"
+       id="linearGradient4655"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.200685,0,0,0.200685,-54.33576,-1.050787)"
+       x1="99.777298"
+       y1="15.4238"
+       x2="153.0005"
+       y2="248.6311" />
+  </defs>
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz/</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>system</rdf:li>
+            <rdf:li>applications</rdf:li>
+            <rdf:li>group</rdf:li>
+            <rdf:li>category</rdf:li>
+            <rdf:li>admin</rdf:li>
+            <rdf:li>root</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer2">
+    <path
+       d="m 44.285715,38.714287 a 19.928572,9.837245 0 1 1 -39.8571433,0 19.928572,9.837245 0 1 1 39.8571433,0 z"
+       transform="matrix(1.18638,0,0,1.18638,-4.539687,-7.794678)"
+       id="path1538"
+       style="color:#000000;fill:url(#radialGradient2308);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.50000042;marker:none;visibility:visible;display:inline;overflow:visible" />
+  </g>
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;fill:url(#linearGradient4655);fill-opacity:1;fill-rule:nonzero;stroke:#3f4561;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3243"
+     d="M 22.699525,0.94746963 C 22.22635,0.97984519 21.766437,1.0531317 21.301673,1.1063165 l -0.03177,0 -1.111928,6.0679506 C 18.345621,7.5870046 16.640562,8.2874574 15.106644,9.2392765 L 10.118853,5.6493371 C 8.770521,6.6961412 7.543552,7.9170049 6.465374,9.2392765 l 3.462862,5.0513305 c -1.051422,1.606783 -1.842083,3.441487 -2.287395,5.369025 -7.6e-5,0.0091 -6.2e-5,0.03018 0,0.03177 l -6.036181,0.95308 c -0.110357,0.901369 -0.158847,1.832904 -0.158847,2.763936 0,0.761753 0.021033,1.513329 0.095308,2.255625 l 6.036182,1.080159 c 0.429297,2.096161 1.244809,4.053785 2.382703,5.782026 l -3.58994,4.924254 c 1.028135,1.276384 2.215105,2.43848 3.494632,3.462861 l 5.0831,-3.494631 c 1.776475,1.133244 3.759545,1.927892 5.909103,2.319165 l 0.953082,6.004411 c 0.677254,0.06165 1.371775,0.06354 2.065009,0.06354 0.978685,-10e-7 1.91352,-0.03709 2.859244,-0.158847 l 1.143697,-6.131489 c 2.040927,-0.507904 3.958179,-1.388998 5.62318,-2.573319 l 4.892483,3.55817 c 1.26877,-1.079445 2.428987,-2.320188 3.431093,-3.653479 l -3.55817,-5.146638 c 0.963606,-1.664197 1.631298,-3.500366 1.969701,-5.464333 l 6.004412,-0.953081 c 0.05266,-0.62659 0.06354,-1.234265 0.06354,-1.874393 0,-1.1124 -0.129295,-2.203101 -0.285924,-3.272246 l -6.09972,-1.111928 c -0.478008,-1.76508 -1.262312,-3.41188 -2.255625,-4.892484 L 41.25284,9.2075071 C 40.140075,7.8466524 38.870718,6.5895264 37.472284,5.5222596 l -5.178408,3.55817 C 30.805549,8.200202 29.203897,7.5248159 27.464931,7.1424978 L 26.51185,1.1063165 C 25.644369,1.0042729 24.769749,0.94746963 23.874992,0.94746963 c -0.241826,1e-8 -0.490706,-0.007609 -0.730696,0 -0.116995,0.003709 -0.232771,-0.006806 -0.349463,0 -0.0316,0.001843 -0.06376,-0.002158 -0.09531,0 z M 23.525529,16.387386 c 0.116063,-0.0059 0.231944,0 0.349463,0 3.760606,0 6.830416,3.06981 6.830416,6.830416 1e-6,3.760605 -3.069811,6.798646 -6.830416,6.798646 -3.760605,1e-6 -6.798646,-3.038041 -6.798646,-6.798646 10e-7,-3.643086 2.851212,-6.647839 6.449183,-6.830416 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.64772728;color:#000000;fill:none;stroke:#ffffff;stroke-width:0.99999899;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3283"
+     d="m 31.727052,23.203357 a 7.8480112,7.8480112 0 0 1 -15.696022,0 7.8480112,7.8480112 0 1 1 15.696022,0 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.34659089;color:#000000;fill:none;stroke:#ffffff;stroke-width:0.99999923;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3285"
+     d="m 21.995808,2.1484671 -0.892784,5.8750572 c -1.69877,0.3868703 -4.823582,1.5700792 -6.261367,2.4622467 L 10.091975,6.9406268 C 8.828145,7.9218257 8.741474,7.9883656 7.730867,9.2277688 l 3.434196,5.0932192 c -0.985526,1.506083 -2.169267,4.189994 -2.594285,6.107942 0,0 -6.01779,1.014425 -6.01779,1.014425 -0.103441,0.844879 -0.053728,2.653173 0.015892,3.348948 l 5.748217,1.035517 c 0.402393,1.96479 1.908227,5.127412 2.974807,6.747341 l -3.635002,4.802558 c 0.963699,1.196391 1.156572,1.30587 2.355908,2.266051 l 4.860631,-3.561037 c 1.66514,1.062221 4.970289,2.354376 6.98513,2.721127 l 0.797728,5.801092 c 0.63481,0.05778 2.38853,0.219875 3.274984,0.105749 l 0.892783,-6.03888 c 1.913018,-0.476072 5.218473,-1.832925 6.779125,-2.943023 l 4.855433,3.50816 c 1.189254,-1.011792 1.199909,-1.164249 2.139211,-2.41398 l -3.59802,-5.114311 c 0.903215,-1.5599 2.071087,-4.610599 2.388282,-6.45148 l 5.890949,-0.977443 c 0.04935,-0.58732 0.05176,-2.225166 -0.09506,-3.227305 L 39.182092,20.016922 C 38.73404,18.362463 37.196418,15.381153 36.265359,13.993342 L 40.080075,9.1907857 C 39.037052,7.915218 38.64924,7.7402002 37.338448,6.7398212 L 32.313994,10.337839 C 30.918941,9.5127782 28.137095,8.2550417 26.507114,7.8966842 L 25.619528,2.1484671 c -0.813114,-0.095648 -3.15904,-0.053175 -3.62372,0 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.5;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3767"
+     d="M 10.102903,6.2970655 C 8.7545689,7.3438694 8.1656464,7.9719226 7.0874684,9.2941942 l 3.4024586,4.9649588 c -1.0514198,1.598602 -2.1582995,4.166961 -2.3475411,5.728553 0,0 -6.0625,1.044194 -6.0625,1.044194 C 2.0109129,21.595256 1.90625,22.884803 1.90625,22.884803 l 0.1767767,1.5625 c 0.42773,0.08833 0.840155,0.170515 1.28125,0.21875 l 0.5,-1.53125 c 0.344041,0.02848 0.679653,0.0625 1.03125,0.0625 0.351208,0 0.718458,-0.03383 1.0625,-0.0625 l 0.46875,1.53125 c 0.441288,-0.04824 0.884772,-0.130415 1.3125,-0.21875 l 0,-1.5625 c 0.685757,-0.159623 1.332001,-0.387758 1.96875,-0.65625 l 0.9375003,1.28125 c 0.402351,-0.182094 0.775596,-0.375819 1.15625,-0.59375 l -0.5,-1.5 c 0.597233,-0.36225 1.161752,-0.795347 1.6875,-1.25 l 1.28125,0.9375 c 0.325635,-0.29658 0.641113,-0.611862 0.9375,-0.9375 l -0.9375,-1.25 c 0.454846,-0.525748 0.8565,-1.089882 1.21875,-1.6875 l 1.5,0.46875 c 0.217931,-0.380847 0.443294,-0.754094 0.625,-1.15625 l -1.28125,-0.9375 c 0.26849,-0.636749 0.464989,-1.282992 0.625,-1.96875 l 1.59375,0 c 0.08833,-0.427727 0.139459,-0.871212 0.1875,-1.3125 l -1.5,-0.46875 c 0.02886,-0.343848 0.0625,-0.711097 0.0625,-1.0625 -1e-6,-0.351403 -0.03402,-0.687014 -0.0625,-1.0312496 l 1.5,-0.46875 c -0.04555,-0.4198872 -0.105591,-0.8419986 -0.1875,-1.25 -1.147428,0.399301 -2.55266,1.1531195 -3.568512,1.7834709 L 10.102903,6.2970655 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.5;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3770"
+     d="m 37.236641,17.217754 c -0.383781,0.181376 -0.746638,0.385755 -1.113405,0.595541 l 0.56965,1.734841 c -0.697094,0.4223 -1.35473,0.919689 -1.967878,1.450015 l -1.475909,-1.087512 c -0.380086,0.345899 -0.741772,0.707584 -1.087511,1.087512 l 1.087511,1.475908 c -0.530326,0.613312 -1.027552,1.270943 -1.450015,1.967878 l -0.543756,-0.181252 c -0.04768,0.700283 -0.236379,1.361485 -0.517862,1.967878 l 0.103572,0.07768 c -0.313157,0.74268 -0.564548,1.530398 -0.750901,2.330382 l -1.475908,0 c -0.136283,0.08545 -0.270553,0.18506 -0.414291,0.258931 -0.07837,0.415267 -0.134912,0.817326 -0.181251,1.242871 l 1.760733,0.569648 c -0.03339,0.401276 -0.05179,0.807195 -0.05179,1.216978 -2e-6,0.409941 0.0184,0.815701 0.05179,1.216977 l -1.760733,0.569648 c 0.05602,0.514755 0.129991,1.02867 0.233038,1.527695 l 1.838412,-0.02589 c 0.128118,0.549987 0.303065,1.107439 0.49197,1.631267 0.744916,-0.28728 1.473833,-0.630185 2.149129,-1.035725 -0.411587,-1.216041 -0.647328,-2.529108 -0.647328,-3.883969 10e-7,-5.197933 3.292381,-9.636655 7.897405,-11.341191 l -1.087511,-0.181253 c -0.222788,-0.822662 -0.511324,-1.628591 -0.880367,-2.382167 -0.01085,-0.02216 -0.01492,-0.05558 -0.02589,-0.07768 l -0.05179,-0.05179 -0.699115,-0.673221 z" />
+  <g
+     style="fill:url(#radialGradient3362);fill-opacity:1;display:inline"
+     id="layer4-1"
+     transform="matrix(-0.68905195,0,0,0.8954059,93.73874,-31.255459)" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.15;color:#000000;fill:url(#radialGradient4645);fill-opacity:1;stroke:url(#linearGradient4647);stroke-width:4.27993584;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path2682-2"
+     d="m 15.978616,39.039184 0,-30.6730942 22.974692,14.9011692 -22.974692,15.771925 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;fill:url(#radialGradient4642);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path3375-6"
+     d="m 16.418775,37.341091 0,-27.9693214 21.241504,13.9846624 -21.241504,13.984659 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;fill:url(#radialGradient4637);fill-opacity:1;stroke:url(#linearGradient4639);stroke-width:2.499;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path2479-2"
+     d="m 16.418775,37.341091 0,-27.9693214 21.241504,13.9846624 -21.241504,13.984659 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;fill:url(#radialGradient4634);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible"
+     id="path2481-3"
+     d="m 16.85941,10.251218 0,26.210411 L 36.770605,23.356423 16.85941,10.251218 z m 0.88127,1.759932 17.239845,11.345273 -17.239845,11.345274 0,-22.690547 z" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.5;color:#000000;fill:url(#radialGradient4631);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:block;overflow:visible"
+     id="path2339-1"
+     d="m 17.686077,11.948807 0,11.75383 c 3.762316,-0.04504 8.076096,-0.347525 15.036669,-1.885641 L 17.686077,11.948807 z" />
+</svg>
deleted file mode 100644
index fcebab0bf03520ebbc1df2ff759fea1c720ca4dd..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 366c2cf3e4729324aece1a645a0ff297b13372d3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..622c4dba94096988ef10257f540724d75c734b4c
GIT binary patch
literal 6413
zc${^ac{J2t*ucMI1~X$~OsTQNkewJMAu(hdI}x%CL!@Mv-PreiLI^R|$dV;lvu{z^
zD%p1uqU^kW@89ox@45GR&bjA2=XuWgJoi4&xsf_rDi`1^Z~y=<;8hj%&L!!;1*JLP
z+hr~L&jpQ@x{4xj_TS8DDoh3dbQ@k#Uf(lw!^}8_$I$C^u(-rzZ>qVjp)hsZ^Vha4
zAtv@7g11tmO;t>u3+{!33h;}PT47ZSJ$kuYb64b+I8pE@j;iHe$ZN=gA}oZTo_A&j
zBIAjTh6Q&I-@My2FljHP&R(K5T0d&wu05IW)Ad$caMZ*8<m_<I6<(y9ryR?2%YNkl
zP`1OU#UAhO&&QWb#q9{Ft%~9WCZd~*1vr6Y9kqk<^5(-eIoX|oo5w|tE8eY&H2c47
z<$R*V{;`ov=x6<xLN_OBPXY_Gyw{F(r+aGXrHettU-8a<j2ysk%NW0tNWLs1={45+
zF-z8JFAkuzv~*_R<xM+rmIOVj)^DcQuas&3D0J+<!^`kp!o<Wx^7(Hz<vd2<r#$ok
zLXs2n?7Dqj15IE8#>U6LJe2@Z6uCoUJ~7FUe6W90zTR)&B0Ka<)P&F4H29T_7s?Vn
zm!E2`w;>mi4pOsh1K5FZF&Yfd>C_av?=;6X-zk^xSF-u=f0m^Gpab=yv<ict)kV*D
z$LD>qYu%9nJhyuJvMJiK2NbL~tD{2N4P2@#J!kIT%8{&xhX*}UN`0%!!K>e9r^*KS
zHaXeZo6J{PRTZRFm^aeeH#Ie70%|l}%x`>&{Q@QH9qOq$4US4v$VdeoRJRB4I@)!x
zIeNE)@3;Tpwu+*Vjm*q6e`h2A%*>fj|7Exa!{jTX!xHq`c4QDVU<6I@S5b2d(T5Tz
zhngE99|@$54F|V|No$V$U3nnD=2&^kI;{uLQ)2)^kkBB&$HxcSj%=T;&>zZ(ID6{j
z*HA3jGdI^6ZDe8s=2XN-J)|PH8c}1rZ~~)s%c%FN*RAW8Yee-xUfoNR!DLjEIYZe4
zy0_~k4tsK^`}1X9E$?r`dDQ^U5EZCAIxL55<>z-bMr_x+>8q&Or@~v1oo3Jb!Jn&y
zg+)b)STsPo2d!sltt)9vyG<v^9H^(<TxVmPLtfGfNf0|TEnA=HPkGmEU1vL#G45|`
zOZ!TT@3BzG{uX(2`9gdoiiDg4;gFC>N&0rI7+jN=aOxa*BY5j;zWRzsLk?MRb1|};
z-KSI?dXS6E{YH|s#&!(`obF_webk-0$8#;gHBQLzEy*?R<m5yxWIR<<(U18HA9G0G
zWg~O*uE9ZiBu|s<_55SES~Dhn2f0<W0+iiv_X~$f%HPN#zu&GF<-UKUa+2UW$+biK
zZ-!W0?9FO~ZtO=PI;v`M9Tjia{|i3FhN<?ZSIXlFTjm<V*{jT*a^Iz!+4YWs@IfdM
zmc#zY#)jGwojYnTuSBcKF{X%0D+<c=k*U!15{^{{XJll|WD;FnZ}!?QaAp*Ku3Ij%
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/user-home.svg
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48.000000px"
+   height="48.000000px"
+   id="svg97"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/places"
+   sodipodi:docname="user-home.svg"
+   inkscape:export-filename="/home/jimmac/Desktop/horlander-style3.png"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-ydpi="90.000000"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective80" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6719"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6717"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient6715"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient10997">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop10999" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop11001" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient127"
+       inkscape:collect="always">
+      <stop
+         id="stop128"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop129"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient9806">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop9808" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop9810" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9766">
+      <stop
+         style="stop-color:#6194cb;stop-opacity:1;"
+         offset="0"
+         id="stop9768" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="1"
+         id="stop9770" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3096">
+      <stop
+         id="stop3098"
+         offset="0"
+         style="stop-color:#424242;stop-opacity:1;" />
+      <stop
+         id="stop3100"
+         offset="1.0000000"
+         style="stop-color:#777777;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient319"
+       inkscape:collect="always">
+      <stop
+         id="stop320"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop321"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1789">
+      <stop
+         style="stop-color:#202020;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop1790" />
+      <stop
+         style="stop-color:#b9b9b9;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop1791" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1789"
+       id="radialGradient238"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.056008,1.513357e-2,0.142618,1.251599,-2.276279,-10.28106)"
+       cx="20.706017"
+       cy="37.517986"
+       fx="20.706017"
+       fy="37.517986"
+       r="30.905205" />
+    <linearGradient
+       id="linearGradient3983">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.87628865;"
+         offset="0.0000000"
+         id="stop3984" />
+      <stop
+         style="stop-color:#fffffe;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop3985" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3983"
+       id="linearGradient491"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.516844,0,0,0.708978,-0.879573,-1.318166)"
+       x1="6.2297964"
+       y1="13.773066"
+       x2="9.8980894"
+       y2="66.834053" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="46.689312"
+       x2="12.853771"
+       y1="32.567184"
+       x1="13.035696"
+       gradientTransform="matrix(1.317489,0,0,0.816256,-0.879573,-1.318166)"
+       id="linearGradient322"
+       xlink:href="#linearGradient319"
+       inkscape:collect="always" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="6.1802502"
+       x2="15.514889"
+       y1="31.367750"
+       x1="18.112709"
+       id="linearGradient3104"
+       xlink:href="#linearGradient3096"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9766"
+       id="linearGradient9772"
+       x1="22.175976"
+       y1="36.987999"
+       x2="22.065331"
+       y2="32.050499"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9806"
+       id="radialGradient9812"
+       cx="24.35099"
+       cy="41.591846"
+       fx="24.35099"
+       fy="41.591846"
+       r="19.136078"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.242494,-8.239935e-18,31.50606)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient10997"
+       id="linearGradient11003"
+       x1="19.489662"
+       y1="6.1438289"
+       x2="19.387241"
+       y2="8.1000004"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient127"
+       id="linearGradient2296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.207872,0,0,0.827902,-0.952004,-0.117547)"
+       x1="21.354231"
+       y1="26.383648"
+       x2="20.796143"
+       y2="50.770691" />
+  </defs>
+  <sodipodi:namedview
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.74901961"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.458333"
+     inkscape:cx="13.520215"
+     inkscape:cy="24"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1016"
+     inkscape:window-height="818"
+     inkscape:window-x="0"
+     inkscape:window-y="30"
+     inkscape:showpageshadow="false"
+     stroke="#3465a4"
+     showguides="true"
+     inkscape:guide-bbox="true">
+    <sodipodi:guide
+       orientation="horizontal"
+       position="51.881402"
+       id="guide3948" />
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#0000ff"
+       empcolor="#0000ff"
+       opacity="0.2"
+       empopacity="0.4"
+       empspacing="4" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Home Folder Icon</dc:title>
+        <dc:date />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>folder</rdf:li>
+            <rdf:li>directory</rdf:li>
+            <rdf:li>home</rdf:li>
+            <rdf:li>user</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Garrett LeSage</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Folder"
+     inkscape:groupmode="layer">
+    <g
+       style="display:inline"
+       transform="matrix(2.262383e-2,0,0,2.086758e-2,43.38343,36.36962)"
+       id="g6707">
+      <rect
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient6715);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect6709"
+         width="1339.6335"
+         height="478.35718"
+         x="-1559.2523"
+         y="-150.69685" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         id="path6711"
+         sodipodi:nodetypes="cccc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path6713"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    </g>
+    <path
+       d="M 4.5217805,38.687417 C 4.5435766,39.103721 4.9816854,39.520026 5.39799,39.520026 L 36.725011,39.520026 C 37.141313,39.520026 37.535823,39.103721 37.514027,38.687417 L 36.577584,11.460682 C 36.555788,11.044379 36.117687,10.628066 35.701383,10.628066 L 22.43051,10.628066 C 21.945453,10.628066 21.196037,10.312477 21.028866,9.5214338 L 20.417475,6.6283628 C 20.262006,5.8926895 19.535261,5.5904766 19.118957,5.5904766 L 4.3400975,5.5904766 C 3.9237847,5.5904766 3.5292767,6.0067807 3.5510726,6.4230849 L 4.5217805,38.687417 z "
+       id="path216"
+       style="fill:url(#radialGradient238);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3104);stroke-width:0.99844444;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       sodipodi:nodetypes="ccccccssssccc"
+       transform="matrix(1.00104,0,0,1.002076,-5.390137e-2,-0.102085)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       style="opacity:0.45142858;color:#000000;fill:url(#linearGradient491);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21380496;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 6.068343,38.864023 C 6.0846856,39.176251 5.8874317,39.384402 5.5697582,39.280326 L 5.5697582,39.280326 C 5.2520766,39.176251 5.033027,38.968099 5.0166756,38.65587 L 4.068956,6.5913839 C 4.0526131,6.2791558 4.2341418,6.0906134 4.5463699,6.0906134 L 18.96842,6.0429196 C 19.280648,6.0429196 19.900363,6.3433923 20.101356,7.3651014 L 20.674845,10.180636 C 20.247791,9.715379 20.255652,9.7010175 20.037287,9.0239299 L 19.631192,7.7647478 C 19.412142,7.0371009 18.932991,6.9328477 18.620763,6.9328477 L 5.7329889,6.9328477 C 5.4207613,6.9328477 5.2235075,7.1409999 5.2398583,7.4532364 L 6.1778636,38.968099 L 6.068343,38.864023 z "
+       id="path219"
+       sodipodi:nodetypes="cccccccccscccccc"
+       transform="matrix(0.993563,0,0,0.992049,-4.175005e-2,5.133802e-3)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <g
+       id="g3950">
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.0421736,18.5625 L 35.489104,18.5625"
+         id="path9784"
+         sodipodi:nodetypes="cc" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9778"
+         d="M 4.9806965,12.5625 L 35.488057,12.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.2265927,22.5625 L 35.492173,22.5625"
+         id="path9788"
+         sodipodi:nodetypes="cc" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9798"
+         d="M 5.3861577,32.5625 L 35.494881,32.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.5091398,34.5625 L 35.496893,34.5625"
+         id="path9800"
+         sodipodi:nodetypes="cc" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9782"
+         d="M 5.0421736,16.5625 L 35.489104,16.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9786"
+         d="M 5.1958537,20.5625 L 35.491649,20.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.0114345,14.5625 L 35.48858,14.5625"
+         id="path9780"
+         sodipodi:nodetypes="cc" />
+      <g
+         inkscape:r_cy="true"
+         inkscape:r_cx="true"
+         inkscape:export-ydpi="74.800003"
+         inkscape:export-xdpi="74.800003"
+         inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+         transform="matrix(1.053404,0,5.515434e-2,1.040068,-9.163336,2.458743)"
+         id="g220"
+         style="fill:#ffffff;fill-opacity:0.75706213;fill-rule:nonzero;stroke:none;stroke-width:0.99946535;stroke-miterlimit:4">
+        <path
+           inkscape:r_cy="true"
+           inkscape:r_cx="true"
+           sodipodi:nodetypes="cscscs"
+           id="path221"
+           d="M 42.417183,8.5151772 C 42.422267,8.4180642 42.289022,8.268189 42.182066,8.2681716 L 29.150665,8.2660527 C 29.150665,8.2660527 30.062379,8.8540072 31.352477,8.8622963 L 42.405974,8.9333167 C 42.41706,8.7215889 42.408695,8.6772845 42.417183,8.5151772 z "
+           style="fill:#ffffff;fill-opacity:0.50847461" />
+      </g>
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9790"
+         d="M 5.2265927,24.5625 L 35.492173,24.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.3246666,30.5625 L 35.493876,30.5625"
+         id="path9796"
+         sodipodi:nodetypes="cc" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9794"
+         d="M 5.3246666,28.5625 L 35.493876,28.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9802"
+         d="M 5.5091398,36.5625 L 35.496893,36.5625"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 5.2880638,26.5625 L 35.493184,26.5625"
+         id="path9792"
+         sodipodi:nodetypes="cc" />
+      <path
+         sodipodi:nodetypes="cc"
+         id="path9774"
+         d="M 4.8737534,8.5624999 L 19.657487,8.5624999"
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 4.9220969,10.5625 L 20.202912,10.5625"
+         id="path9776"
+         sodipodi:nodetypes="cc" />
+    </g>
+    <path
+       style="color:#000000;fill:url(#linearGradient9772);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.00452971;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block"
+       d="M 39.783532,39.51062 C 40.927426,39.466556 41.746608,38.414321 41.830567,37.189615 C 42.622354,25.640928 43.489927,15.957666 43.489927,15.957666 C 43.562082,15.710182 43.322016,15.462699 43.009787,15.462699 L 8.6386304,15.462699 C 8.6386304,15.462699 6.7883113,37.329591 6.7883113,37.329591 C 6.6737562,38.311657 6.3223038,39.134309 5.2384755,39.513304 L 39.783532,39.51062 z "
+       id="path233"
+       sodipodi:nodetypes="cscccscc"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-ydpi="74.800003"
+       transform="matrix(0.993091,0,0,0.997896,0.297717,6.983205e-2)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       sodipodi:nodetypes="ccsscsc"
+       id="path304"
+       d="M 9.6202444,16.463921 L 42.411343,16.528735 L 40.837297,36.530714 C 40.752975,37.602225 40.386619,37.958929 38.964641,37.958929 C 37.093139,37.958929 10.286673,37.926522 7.569899,37.926522 C 7.8034973,37.605711 7.9036547,36.937899 7.9049953,36.92191 L 9.6202444,16.463921 z "
+       style="opacity:0.46590911;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient322);stroke-width:1.00452948px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       transform="matrix(0.993091,0,0,0.997896,0.297717,6.983205e-2)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path323"
+       d="M 9.6202481,16.223182 L 8.4536014,31.866453 C 8.4536014,31.866453 16.749756,27.718375 27.119949,27.718375 C 37.490142,27.718375 42.675239,16.223182 42.675239,16.223182 L 9.6202481,16.223182 z "
+       style="fill:#ffffff;fill-opacity:0.0892857;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       transform="matrix(0.993091,0,0,0.997896,0.297717,6.983205e-2)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       d="M 16.569914,27.404847 L 15.862615,35 L 23.713868,35 L 24.285565,28.86095 L 28.558755,28.86095 L 27.987057,35 L 32.867565,35 L 33.574862,27.404847 L 36.245113,27.402613 L 25.834954,19.752712 L 14,27.402613 L 16.569914,27.404847 z "
+       style="fill:url(#linearGradient2296);fill-opacity:1;fill-rule:evenodd;stroke-width:3pt"
+       id="path892"
+       transform="matrix(0.988981,0,0,0.983782,1.154266,0.56763)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <g
+       inkscape:export-ydpi="74.800003"
+       inkscape:export-xdpi="74.800003"
+       inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+       style="opacity:0.41477272;fill:url(#linearGradient11003);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"
+       transform="matrix(1.040764,0.000000,5.449252e-2,1.365642,-8.358528,0.921788)"
+       id="g217" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="pattern" />
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..7ea89d188f848a6796dff966789cbed2eafa4089
GIT binary patch
literal 13038
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/view-refresh.svg
@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="view-refresh.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective58" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2690">
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:1;"
+         offset="0"
+         id="stop2692" />
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:0;"
+         offset="1"
+         id="stop2694" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2682">
+      <stop
+         style="stop-color:#3977c3;stop-opacity:1;"
+         offset="0"
+         id="stop2684" />
+      <stop
+         style="stop-color:#89aedc;stop-opacity:0;"
+         offset="1"
+         id="stop2686" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2402">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop2404" />
+      <stop
+         style="stop-color:#528ac5;stop-opacity:1;"
+         offset="1"
+         id="stop2406" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2380">
+      <stop
+         style="stop-color:#b9cfe7;stop-opacity:1"
+         offset="0"
+         id="stop2382" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop2384" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2871">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2873" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop2875" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2847">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2849" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0;"
+         offset="1"
+         id="stop2851" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2831">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2833" />
+      <stop
+         id="stop2855"
+         offset="0.33333334"
+         style="stop-color:#5b86be;stop-opacity:1;" />
+      <stop
+         style="stop-color:#83a8d8;stop-opacity:0;"
+         offset="1"
+         id="stop2835" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2797">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2799" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2801" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2831"
+       id="linearGradient1486"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.465413,-0.277593)"
+       x1="13.478554"
+       y1="10.612206"
+       x2="15.419417"
+       y2="19.115122" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2847"
+       id="linearGradient1488"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1,0,0,-1,47.52791,45.84741)"
+       x1="37.128052"
+       y1="29.729605"
+       x2="37.065414"
+       y2="26.194071" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1491"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1493"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2871"
+       id="linearGradient1501"
+       gradientUnits="userSpaceOnUse"
+       x1="46.834816"
+       y1="45.264122"
+       x2="45.380436"
+       y2="50.939667" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient1503"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.536723,-9.680928e-14,16.87306)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2380"
+       id="linearGradient2386"
+       x1="62.513836"
+       y1="36.061237"
+       x2="15.984863"
+       y2="20.60858"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2402"
+       id="linearGradient2408"
+       x1="18.935766"
+       y1="23.667896"
+       x2="53.588622"
+       y2="26.649362"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2682"
+       id="linearGradient2688"
+       x1="36.713837"
+       y1="31.455952"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2690"
+       id="linearGradient2696"
+       x1="32.647972"
+       y1="30.748846"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#3465a4"
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568542"
+     inkscape:cx="2.4438651"
+     inkscape:cy="18.153347"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="891"
+     inkscape:window-height="818"
+     inkscape:window-x="0"
+     inkscape:window-y="30" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+        <dc:title>View Refresh</dc:title>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>reload</rdf:li>
+            <rdf:li>refresh</rdf:li>
+            <rdf:li>view</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       transform="matrix(-1.489736,0,0,-1.001252,61.20865,75.2819)"
+       d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1  9.1923885,36.421127 A 15.644737 8.3968935 0 1 1  40.481863 36.421127 z"
+       sodipodi:ry="8.3968935"
+       sodipodi:rx="15.644737"
+       sodipodi:cy="36.421127"
+       sodipodi:cx="24.837126"
+       id="path8660"
+       style="opacity:0.38333333;color:#000000;fill:url(#radialGradient1503);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       style="color:#000000;fill:url(#linearGradient1486);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1488);stroke-width:0.99999958;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+       d="M 20.152913,10.409904 C 20.152913,10.409904 11.215413,9.784904 13.965413,20.284904 L 6.2779132,20.284904 C 6.2779132,20.284904 6.7779132,8.409904 20.152913,10.409904 z "
+       id="path2865"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="cccc" />
+    <g
+       id="g1878"
+       transform="matrix(-0.579051,-0.489228,-0.489228,0.579051,56.91585,13.37137)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       style="fill:url(#linearGradient2386);fill-opacity:1.0;stroke:#3465a4;stroke-opacity:1">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         id="path1880"
+         d="M 44.306783,50.229694 C 62.821497,35.818859 49.664587,13.411704 22.462411,12.49765 L 22.113843,3.1515478 L 7.6245439,20.496754 L 22.714328,33.219189 C 22.714328,33.219189 22.462411,23.337969 22.462411,23.337969 C 41.292171,24.336946 55.444038,37.409698 44.306783,50.229694 z "
+         style="opacity:1;color:#000000;fill:url(#linearGradient2386);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient1501);stroke-width:1.31916928;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+    </g>
+    <path
+       sodipodi:nodetypes="cccc"
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       id="path2839"
+       d="M 28.375,33.4375 C 28.375,33.4375 37.3125,34.0625 34.5625,23.5625 L 42.338388,23.5625 C 42.338388,25.065102 41.75,35.4375 28.375,33.4375 z "
+       style="color:#000000;fill:url(#linearGradient2696);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient2688);stroke-width:0.99999958;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+    <g
+       style="color:#000000;fill:url(#linearGradient2408);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient1501);stroke-width:1.31916928;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;opacity:1"
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       transform="matrix(0.579051,0.489228,0.489228,-0.579051,-7.921023,30.53599)"
+       id="g2779">
+      <path
+         inkscape:r_cy="true"
+         inkscape:r_cx="true"
+         style="opacity:1;color:#000000;fill:url(#linearGradient2408);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient1501);stroke-width:1.31916928;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+         d="M 44.306783,50.229694 C 62.821497,35.818859 49.664587,13.411704 22.462411,12.49765 L 22.399432,3.0690297 L 7.793943,20.424005 L 22.462411,33.006349 C 22.462411,33.006349 22.462411,23.337969 22.462411,23.337969 C 41.292171,24.336946 55.444038,37.409698 44.306783,50.229694 z "
+         id="path2781"
+         sodipodi:nodetypes="ccccccc" />
+    </g>
+    <path
+       style="opacity:0.27222224;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 7.0625,38.1875 L 7.125,23.3125 L 20.0625,22.9375 L 15.673627,28.116317 L 19.540852,30.489516 C 16.540852,32.739516 14.991304,32.911644 13.991304,35.474144 L 11.174446,33.363872 L 7.0625,38.1875 z "
+       id="path2791"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="cccccccc" />
+    <g
+       id="g2793"
+       transform="matrix(0.508536,0.429651,0.429651,-0.508536,-3.973188,30.54119)"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         id="path2795"
+         d="M 51.090265,45.943705 C 60.210465,30.723955 46.631614,12.20113 19.485058,11.948579 L 19.513464,3.7032834 L 6.5341979,19.296639 L 19.367661,30.26876 C 19.367661,30.26876 19.423281,21.261882 19.423281,21.261882 C 36.951096,21.037973 54.618466,31.365254 51.090265,45.943705 z "
+         style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1493);stroke-width:1.50208926;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+         inkscape:r_cx="true"
+         inkscape:r_cy="true" />
+    </g>
+    <g
+       style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       transform="matrix(-0.508536,-0.429651,-0.429651,0.508536,53.049,13.36548)"
+       id="g2805">
+      <path
+         inkscape:r_cy="true"
+         inkscape:r_cx="true"
+         style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1491);stroke-width:1.50208926;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+         d="M 51.389927,46.505946 C 60.510127,31.286196 47.050763,12.432359 19.628482,12.069755 L 19.342824,4.0507204 L 6.3413093,19.379475 L 19.809059,30.764589 C 19.809059,30.764589 19.627294,21.311346 19.627294,21.311346 C 37.872231,21.693318 54.411175,32.236592 51.389927,46.505946 z "
+         id="path2807"
+         sodipodi:nodetypes="ccccccc" />
+    </g>
+    <path
+       style="opacity:0.27222224;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 6.8125,16.5 C 10.405935,6.0587275 23.256282,10.355393 27,12 C 31.175307,12.211475 32.674736,9.164996 36,9 C 21.950264,-0.7899963 7.1875,2.5 6.8125,16.5 z "
+       id="path2811"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="cccc" />
+  </g>
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..a60559ff51f12c93f8ec1e20a1ff8dba5f3bc2cb
GIT binary patch
literal 804
zc%17D@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8ZhE>n
zhE&XXd&kf(+EJwSVIddSt~V`O%a;0u33ENNov?SKfOvz5=3UQ+=9ivuKK}kE?b*4x
zKkYlu-4H*=&!nly!hiu1cs<!Yt6y8M@!U1NWW&D2TAuq$Ke=CO{%RYhV(T-X*|Tcf
zzU5q==YQRwAb953bpgQ|gMSkQ=Sc2<&tWH7zk)-r=YBfNq`KH24U5A||1>Z3v;VMH
z_fL#X<o(&bORPPQx5`&czt6eljkdj&*RIX`ELTrdmZ<xaafCynK5Yqy#Qz>arG!7+
zRecQ~#a|gR9gAPN94P2z>vG_SbR|&G_@e~l<Md~mOvm((IJ5M`N1PTks8iK-JMd%b
zRuRU>(wT}($IR0t86TS;Qerxm?{k(zVt=41(8yy`dm28@)evNSY(3eS=~%gzJ4?^|
zJJW#D!q<U@&yAEkc>iVZ$LdW+Ovl~_9^;U>znVwTU|+d3P;Z=%pw8dJJhSAikNk*V
z!@uH5Hpj!XqmT2KeQzv}`d(ePs`Gz&1Fu<+Kg+#TiTNCRPFdIqR%|Z%bNyv6N7aU+
zKa2hL%gy>fxj3cZ?2nVbg&NbNkNMAQ=CC<sSobN$<$>q9kCUIPF!6i!%(pQY+_L7$
zkCWK~j@?;3^Y@4eZdvjS$Q5$r);Z=MH=9EzvTyz!2Ntm?3HzO`99dbJf1ao*typ;U
z<K){N3zkef?w_a9BxKVw|Be@nWu=t;&Y2uVA1vxzSfnfE?3J3dzZwA9+Fwn8B==X4
zxcC<vAer6+5;s=vl@~mia^&OUhsqL_e^y-O$okvZQOohL?BL^jP8|2kci;7XSiNet
z-7<N_mhY_m`*{^>w5tPCC&{`0IW<4}$J__Yzs_~75jrUF*j-$yV#~huEBKWpvi`jA
wVX5txR~6*3tTX9O==rFOlERoV)8M&3%*&tkha11}JObi+y85}Sb4q9e0EAFf{r~^~
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-close-light.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-close-light.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1217"
+     inkscape:window-height="737"
+     id="namedview7"
+     showgrid="true"
+     inkscape:zoom="13.632822"
+     inkscape:cx="17.746364"
+     inkscape:cy="1.4474508"
+     inkscape:window-x="-1"
+     inkscape:window-y="34"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2984"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <path
+     d="M 25,25 7,7"
+     id="path2989"
+     style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     sodipodi:nodetypes="cc"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     id="path2985"
+     d="M 25,7 7,25" />
+</svg>
old mode 100755
new mode 100644
index 2bc8d43e6508c29b4b28ea144834ee2dc231583a..a4ba5d3e5190c4336c125a58e30874bb2d26eeef
GIT binary patch
literal 1254
zc${^V|5MU;9LL|_M`5M`;z$$wpitIbQz3I&4rQT;mU`YSS9WRVbT+lpp*SG{^9xzX
z($;KV)@iLY(Y}e1IZPAHzFmHaoerFoY-%ErN?|bk1NMB~>-GHQdG~tU>xY*(A&%wh
zyxtiA;L46>CfZ%F+Gr>H?4_p-+0E&2EQ<+jt99wY?==8Gzp<H&Z@BeuC!R{&lZfR;
zeGuZ`Bj?nd8G3RkK6poe=g(zcvh?JTH3rbNez){mAG7!I$=G9;#q50nl>Jw#>hjXg
zQPb&)x_Of^+z{a7(6os^$@kc?ZPdZ{|1^GW_G6Q5wp6XJ%(<7cVT{9fvk)0Y2DsRO
zGJI;#SQ^!O@uT9BAgi~F#=@dLJ4Sx*ASrpFGoJrah)PO&@Q-3%{~}YI<zo9R;mjYL
zw&vzSg{+wHj>vG}=B%)f<Lb9rDO{)r*_pb+rs7g)R?7Df18HBIub)`AFQou)&Zakn
z8!XmWSiSQq!w!8nQqw*4ve@)trLEggGO=8jVL1T=e`YU@gvvFOFLyq>XV^-ozSqD{
zGj1Oh7PcwILgg2qW*kC=5d8Z}LC~K3b><9@@}EkFc21rc?|8n<yFm&zx7!+w@MBfW
z=*$}pCQ1n|JwYdKfRQNhU8MA*8S4W!lSRb-ifDx3EjrH=_H_cm<bf<+B@w7kk>o}n
zAy7s^p%RQ30!1w8tXY}>q?u4?HAd_RiXx>JvosY*SrDPWg6SZ*LvE+hDMZlZDZFCz
zF#=L6`o<ZICj_#XsmFN(6j13U95wnh0#Y3Gi>l%YQqYb|hGCiuc*sn6XqIMyb}c%_
z6Q->NOLzubw`&@q%q4Hm;RRyB+$NEm3PnaJ7kxK#c!BPq>sv_oyov~)b_54l3(MxE
z))xOeA#@KH&>@+O*{eb|B9!yK?O}9}wLk_77mYn!urQ6Q4Wzqc!HQQ;po{i)&krV6
zTYWxkhd}a6E7j#`TukTPNB1YzYgJ(;#EPLNOfKij$Cdah?e*83tF|@j>217q(NmB7
zEa|}l@6+K_Z{Z*)2(k8ML(@og-ilTwFAVM+ONXvrgmNuOU+E_*bk%#h%MO<H_?2hS
zktzCE#g?vl5&@5xo0|P_B}&Q%_q*yE`_Q-6rox5qY6*-E#GENucGh=*CcrK)oO5Fo
zAWn7(Z=Xcpawhfvb$^UJuu1T%JokWvR0R?{k7|!VgDB}kGrkH(@s5bm#ovgOW`iw~
z@SE<8vxufJYhMgB=qT+q<JaIQpGU;$;`6FWbs&#eayB1gLsFBuCWTzNK~QG&3ys2V
z2eI}*6=^>ps2X0oGit%s>hQshqDe$;pp{aA7C9xnG}nxf(S!)GE<RC0iUu32!`a(K
zqySg1^1lVHhgu2?3YM<lH6r%5j1CPC4_lNiuKsQI%a&*}k)60H#>Z~k<>uyaLA<{r
zgV(BI<&0b1r*>1{^KC<iZ*phqi<NI|B+0AU#YSwVvm1zb#R>2~rJSkwWcu;o^0+-x
zz=km69iM0;MIuL_XRQLo`f}ABZ*|Ff=l<f7xd-rtt63^PR^*Wj)49Vzt;;7CG_Z;u
ypTIfTFv8(uEySB&oFD2{$l?z->|*|pXeP`SlO>J1crnQSxBxpcjw$;(RrDW>L^UY@
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-close.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-close.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1217"
+     inkscape:window-height="737"
+     id="namedview7"
+     showgrid="true"
+     inkscape:zoom="13.632822"
+     inkscape:cx="17.746364"
+     inkscape:cy="17.927867"
+     inkscape:window-x="-1"
+     inkscape:window-y="34"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2984"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <path
+     d="M 25,25 7,7"
+     id="path2989"
+     style="fill:none;stroke:#141414;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     sodipodi:nodetypes="cc"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#141414;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     id="path2985"
+     d="M 25,7 7,25" />
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..38e7555e7384edf95cb304905768948073a4acd8
GIT binary patch
literal 657
zc%17D@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8+&o<z
zLn`LHy<?bn#X-XT<NpOq7AgtqhBF2hFsMjb@d@}jJ32GRG|b|9C#)3cq9B$U<gV?V
z_?Opu_xrzI;`5Jvn(SU?*s0<<34)e9zM|Fk<(~hf8qZHkCo_+pnL6#=>i^e6uiRGo
zIqOMk_S^iU2UaocQ?HCN^#1;7?bdI5k}foNDSFNmIeYQ1&Fj7U*GhzZW!n)sW9vzo
z=tF^7YuDD*h2}RbZT;~<JzTVbZwli9NrpKv;=rG}KAE_$$}cYb-zdLiW*y5*hq*lS
z>g_82O<LXh`ghd%DDUr^Z(Yz`@JMuP_swgYubuc^$lYMfV8KiSV#mehExt>?|4Y7~
zJ%jhvlnu#`H4~%GGCbg6ILGiHAfC}v?tL|*^)4AxiLas$A`jla!vv9{7LoUYQ*rP2
z)e}Geznb%U=D`cXPA1dTTMYKdTkg?nF!!tzKYJ;5z4*HQt0m%u9J1dgPx2StyyfY|
zLtkg5ha0MRR=ww+T;uUc>tyEDnB1ExKj%DIwDnu|+YO(RFIT-!ziM1wu&>~+#6G5V
n(b@Ii_Hw`?T*dR!l{`k#FY%?jxtjEVX^g?s)z4*}Q$iB}m;(=r
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-dock-light.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-dock-light.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1080"
+     inkscape:window-height="731"
+     id="namedview11"
+     showgrid="true"
+     inkscape:zoom="14.648618"
+     inkscape:cx="19.259858"
+     inkscape:cy="16.85961"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g3792">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2988"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <g
+     transform="translate(-7.7007624,-11.348432)"
+     id="g3792"
+     style="stroke-linecap:square;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke:#141414;stroke-opacity:1">
+    <rect
+       width="22.000002"
+       height="23.000002"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.700763"
+       y="15.616543"
+       id="rect3794"
+       style="color:#000000;fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="22"
+       height="2.0000005"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.700763"
+       y="15.616543"
+       id="rect3796"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+  <path
+     d="M 14,4.2681109 14,27.268111"
+     id="path3800"
+     style="fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     d="m 14,17.268111 13,0"
+     id="path3804"
+     style="fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+</svg>
index 64d296b71140fb05da3077395c01be5ce287c3bb..417c60ff01b7750fa61ba93e05fb21c6ea94acd6
GIT binary patch
literal 741
zc%17D@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8W_h|e
zhE&XXduL;paG=PskHtcssxBvWb++6%<yFIe|3H{d4a>zO#|@jJ1m-&lXlF~uA9B(;
z62u&SV}TOe%;eOC=N1?~e|P5B-}<MqKXxSkf0M#_gognJ4*Wm4xoz6%rw5ZZ?vNK0
z-(>c^z@XsYH<$d0XYSt5-+r5Y_F1*JrAt@>ymlt0^>6-Wprd3}zCSX%cGAY_q6aq4
z)HUArA>8h2)cM&rx7W6(aZcaZ@#9AMyLa+N-#*UXymZPe!zn@yyW`(j_jiOIv#VPA
z=cq3y!*X%P4rPWy7KJ{BBZ3VUOfz<LRNO3@&!Beh?)oiv)ENrXqxyFL4m|x=QLykv
zx!tweZ>C?Wj8bYPL~5UJy%uOEJLgvIx2vDNe&7&rXL!WnAcJZgwFI+&=_UpTd+oIT
zCcDf{i@~_s;v4I-Hg~v^Ik#pXa8HhZAb&U0R7ccd?bnch(h**nVhsH>aSW^A>Z`9d
zJpH$BS=oHe4?Pouyi(pIm~Xwdx4zznY1#YO(;wF`+*5h`KwR)+%>#FT<8Q%CGtNH`
zKl>*1m{{GjciVrRQ+^b5tj>$!_19m;*GspbeUp7m?%#{<-S<yRcvTAjaMpZU<PtOg
zY}#|9@^VqZ>%Y$3{d?5&zH0RK(&O*`t-1EA>dkHj1W<czo$)jG>gfV^P`YLCboFyt
I=akR{09`~f8~^|S
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-dock.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-dock.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1080"
+     inkscape:window-height="731"
+     id="namedview11"
+     showgrid="true"
+     inkscape:zoom="18.044858"
+     inkscape:cx="19.259858"
+     inkscape:cy="17.962102"
+     inkscape:window-x="126"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g3792">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2988"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <g
+     transform="translate(-7.7007624,-11.348432)"
+     id="g3792"
+     style="stroke-linecap:square;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke:#141414;stroke-opacity:1">
+    <rect
+       width="22.000002"
+       height="23.000002"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.700763"
+       y="15.736354"
+       id="rect3794"
+       style="color:#000000;fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="22"
+       height="2.0000005"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.700763"
+       y="15.736354"
+       id="rect3796"
+       style="color:#000000;fill:#141414;fill-opacity:1;stroke:#141414;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+  <path
+     d="M 14,4.3879221 14,27.387922"
+     id="path3800"
+     style="fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     d="m 14,17.387922 13,0"
+     id="path3804"
+     style="fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+</svg>
new file mode 100644
index 0000000000000000000000000000000000000000..849d80a4a13e3a1c80c3af0b584fb604c86565ec
GIT binary patch
literal 765
zc%17D@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8HhH=@
zhE&XXd)Gc&Bv7R7<M)o%4h_e(e^|uAGMTqEwXVJI;Gq~1c`KT8<Hz8L&TCo8noSGD
znj+Z#1iLtXh`6!q%`waJcXw*%$6Fq~yZK3?nzgmDHX{QJ-0-_t-Qb)0Ox4p|HFnCD
z%awED?7XUE1mCX`lTm6ob7%6GkV`Y~ZPq!!?|EJ6QRUI3#VjA3F2%jK6noOU<Zj0g
z)6#{)tcTA$Jk<5}efr!a%XJ>VVm4mTsBU;;dsxWz$dmo|HL4j*oEV;Q9FSq0q0CUs
zlF-L6?S1L#qn7*z2IrU)Hcj5kKI28$d&aa+E3O`LmS@r`YgEqo`OlICruvLvgC&!J
zJE{>#f-yHm9cS*;emU>oz5Vs;vhJF$|5?^|-LlPplAOzt&G(vfRz2yOb>`0WFB`J<
z>K0fl@vRceu5=9uWw@_0cWp$r_n#>xc1nF(V$u&MZCJ0ptzJK>-ekFo>^He2;m~S^
zb+`Ywuj&qSzrmakfNF8Vu4UifZ$DPq&}PBka5VdG4a2+p@jH&bU*vY-*WY3e2V;DW
z-+6Jq*uIRJmHWT*yw>@5dzIjqT?%da%!ZOMMgEMrci-9`u&UwGF!=QQxd0IXfk)8y
zJ<q8#iSrk|ZIbWF=&)|K(RnL=rhlnc!*tizJueP-y>*uPw~A?p*2~a~QHytOO#1ya
za`_K`RYsR1`JTU}o``QwFVJ}D_g>K~@Rz?=+B=V3dM`_!?rOH2^hHH!-xoO+czR+;
Zc+IbTp!dnyvkg5UuBWS?%Q~loCICWGLgWAd
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-undock-light.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-undock-light.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview5953"
+     showgrid="false"
+     inkscape:zoom="9.4204102"
+     inkscape:cx="16"
+     inkscape:cy="16"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g3792" />
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <g
+     transform="translate(-7.2158478,-11.926544)"
+     id="g3792"
+     style="stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+    <rect
+       width="15.999999"
+       height="15"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.215848"
+       y="24.291922"
+       id="rect3794"
+       style="color:#000000;fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="16"
+       height="1.9999998"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.215848"
+       y="24.291922"
+       id="rect3796"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="16"
+       height="1.9999998"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="18.215847"
+       y="16.291922"
+       id="rect2988"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+  <path
+     d="m 11,4.3653773 0,9.9999997"
+     id="path3800"
+     style="fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     d="m 21,19.365377 6,0 0,-14.9999997"
+     id="path3804"
+     style="fill:none;stroke:#ffffff;stroke-width:1.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+</svg>
old mode 100755
new mode 100644
index c594db71e2222fbd22f80832bf0797b34b4432b4..03e2a10dfe0a55348d75aea663ee3546229ae5f5
GIT binary patch
literal 833
zc%17D@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8zInPh
zhE&XXd)F{KI8dVf<M$ShZ5<20sB}Nju<B@D{XolN$1hG1D-OO#FCt#3yjT=}$g@OD
z++EyJmZfm_@+(#^f<EmEQFmVVY|fnOKlb}SvfbOG%D<O)uel*J0}Onq=h`a%BD=c!
zw-3j|G>*hq@1nPUUwQDZeXGE{rBm)bpLNrP;quEbUAy-iY!2R9F4-Wj*peN4eeWs5
zoGHm3neX;x@A<Jm=gjlZ$J5G`j&D$7GT6N1!H@Q>d4>XtE!~F4^exl23LW^#di?y_
z((c5WPbDsSF=(_f91(1=U=na=c*Nl#!^m_0_N2p{2|x6v%J?xnI<{3j;^Ny|+-puw
z4r-qLBR`?%;{OtxrB{ypTdno;b1@f8SBEk~A&WvEs!>RSJ95HVj!NjyzS;cv_jmQ3
z&-5zKmA|f-x9`s1&lx6FH%jlGzP0<y)TdpuZsu$&t~tHwh^W=+7J+vqvEMbW?>QJR
zXfpqNd9V0?^YZ(~o6p{={xVUOq5S`@2MhBppP9c%=`p+-x2Ru-u|?pVUd4-&zMs9f
zR_t|<-@}dWlCbbE|NdU$NGNrEe_y|s;mFi~H4N|W%kNmkxMa$_X>;sF43DKTKM=v=
z5uo7pU&~whqk0P0f8#qX;1KyeOMe5;a)g3^96BfNzQ2AiQIbg`qrSfWLq4-5E1~eg
zD;RT8+Bxc<K&t4{_dL5oE9}CKXeN|4|6=>Rf2wxF^_kDMym;L7*musqO)L|Fc4ejI
z7oEwv(93#Ue@$t3{gl_{2kx9HJF})U|4dwSN?Lig{zdl_mN`Z<b9#?Iey!MYc205h
sqj&fF`}*d|%gM=IxyK4mjtmN~)u-+&YrN$ekPYH`y85}Sb4q9e0DjwN&Hw-a
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/widget-undock.svg
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="32"
+   height="32"
+   id="svg2"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="widget-undock.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1105"
+     inkscape:window-height="720"
+     id="namedview3783"
+     showgrid="true"
+     inkscape:zoom="16.421381"
+     inkscape:cx="24.012447"
+     inkscape:cy="16.356858"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g3792">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3785"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <g
+     transform="translate(-7.2158478,-11.926544)"
+     id="g3792"
+     style="stroke:#141414;stroke-opacity:1;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none">
+    <rect
+       width="15.999999"
+       height="15"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.215848"
+       y="24.291922"
+       id="rect3794"
+       style="color:#000000;fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="16"
+       height="1.9999998"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="12.215848"
+       y="24.291922"
+       id="rect3796"
+       style="color:#000000;fill:#141414;fill-opacity:1;stroke:#141414;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       width="16"
+       height="1.9999998"
+       rx="0.2512264"
+       ry="0.0025005043"
+       x="18.215847"
+       y="16.291922"
+       id="rect2988"
+       style="color:#000000;fill:#141414;fill-opacity:1;stroke:#141414;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+  <path
+     d="m 11,4.3653773 0,9.9999997"
+     id="path3800"
+     style="fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     d="m 21,19.365377 6,0 0,-14.9999997"
+     id="path3804"
+     style="fill:none;stroke:#141414;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccc" />
+</svg>
index 3adcb6a687230ed181ed98ea767de37eed53681c..1ea0e712372cc41016e378d1fbe43a83d6014df6
GIT binary patch
literal 2646
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
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/zoom-in.svg
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg6431"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="list-add.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs6433">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective70" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2091">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2093" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2095" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7916">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop7918" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.34020618;"
+         offset="1.0000000"
+         id="stop7920" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient1503"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2847">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2849" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0;"
+         offset="1"
+         id="stop2851" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2847"
+       id="linearGradient1488"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)"
+       x1="37.128052"
+       y1="29.729605"
+       x2="37.065414"
+       y2="26.194071" />
+    <linearGradient
+       id="linearGradient2831">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2833" />
+      <stop
+         id="stop2855"
+         offset="0.33333334"
+         style="stop-color:#5b86be;stop-opacity:1;" />
+      <stop
+         style="stop-color:#83a8d8;stop-opacity:0;"
+         offset="1"
+         id="stop2835" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2831"
+       id="linearGradient1486"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.30498,-6.043298)"
+       x1="13.478554"
+       y1="10.612206"
+       x2="15.419417"
+       y2="19.115122" />
+    <linearGradient
+       id="linearGradient2380">
+      <stop
+         style="stop-color:#b9cfe7;stop-opacity:1"
+         offset="0"
+         id="stop2382" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop2384" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2682">
+      <stop
+         style="stop-color:#3977c3;stop-opacity:1;"
+         offset="0"
+         id="stop2684" />
+      <stop
+         style="stop-color:#89aedc;stop-opacity:0;"
+         offset="1"
+         id="stop2686" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2682"
+       id="linearGradient2688"
+       x1="36.713837"
+       y1="31.455952"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.77039,-5.765705)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2690">
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:1;"
+         offset="0"
+         id="stop2692" />
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:0;"
+         offset="1"
+         id="stop2694" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2690"
+       id="linearGradient2696"
+       x1="32.647972"
+       y1="30.748846"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.77039,-5.765705)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2871">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2873" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop2875" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2402">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop2404" />
+      <stop
+         style="stop-color:#528ac5;stop-opacity:1;"
+         offset="1"
+         id="stop2406" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1493"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2797">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2799" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2801" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1491"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient7179">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop7181" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop7183" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2316">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2318" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.65979379;"
+         offset="1"
+         id="stop2320" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1322">
+      <stop
+         id="stop1324"
+         offset="0.0000000"
+         style="stop-color:#729fcf" />
+      <stop
+         id="stop1326"
+         offset="1.0000000"
+         style="stop-color:#5187d6;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1322"
+       id="linearGradient4975"
+       x1="34.892849"
+       y1="36.422989"
+       x2="45.918697"
+       y2="48.547989"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-18.01785,-13.57119)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7179"
+       id="linearGradient7185"
+       x1="13.435029"
+       y1="13.604306"
+       x2="22.374878"
+       y2="23.554308"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7179"
+       id="linearGradient7189"
+       gradientUnits="userSpaceOnUse"
+       x1="13.435029"
+       y1="13.604306"
+       x2="22.374878"
+       y2="23.554308"
+       gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2380"
+       id="linearGradient7180"
+       gradientUnits="userSpaceOnUse"
+       x1="62.513836"
+       y1="36.061237"
+       x2="15.984863"
+       y2="20.60858" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2871"
+       id="linearGradient7182"
+       gradientUnits="userSpaceOnUse"
+       x1="46.834816"
+       y1="45.264122"
+       x2="45.380436"
+       y2="50.939667" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2402"
+       id="linearGradient7184"
+       gradientUnits="userSpaceOnUse"
+       x1="18.935766"
+       y1="23.667896"
+       x2="53.588622"
+       y2="26.649362" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2871"
+       id="linearGradient7186"
+       gradientUnits="userSpaceOnUse"
+       x1="46.834816"
+       y1="45.264122"
+       x2="45.380436"
+       y2="50.939667" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7916"
+       id="linearGradient7922"
+       x1="16.874998"
+       y1="22.851799"
+       x2="27.900846"
+       y2="34.976799"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2091"
+       id="radialGradient2097"
+       cx="23.070683"
+       cy="35.127438"
+       fx="23.070683"
+       fy="35.127438"
+       r="10.319340"
+       gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.15686275"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-123.56934"
+     inkscape:cy="0.031886897"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1280"
+     inkscape:window-height="818"
+     inkscape:window-x="0"
+     inkscape:window-y="30"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata6436">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Add</dc:title>
+        <dc:date>2006-01-04</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://tango-project.org</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>add</rdf:li>
+            <rdf:li>plus</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.10824742;fill:url(#radialGradient2097);fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path1361"
+       sodipodi:cx="22.958872"
+       sodipodi:cy="34.94062"
+       sodipodi:rx="10.31934"
+       sodipodi:ry="2.320194"
+       d="M 33.278212 34.94062 A 10.31934 2.320194 0 1 1  12.639532,34.94062 A 10.31934 2.320194 0 1 1  33.278212 34.94062 z"
+       transform="matrix(1.550487,0,0,1.978714,-12.4813,-32.49103)" />
+    <path
+       style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       d="M 27.514356,37.542682 L 27.514356,28.515722 L 37.492820,28.475543 L 37.492820,21.480219 L 27.523285,21.480219 L 27.514356,11.520049 L 20.498082,11.531210 L 20.502546,21.462362 L 10.512920,21.536022 L 10.477206,28.504561 L 20.511475,28.475543 L 20.518171,37.515896 L 27.514356,37.542682 z "
+       id="text1314"
+       sodipodi:nodetypes="ccccccccccccc" />
+    <path
+       style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       d="M 26.498702,36.533920 L 26.498702,27.499738 L 36.501304,27.499738 L 36.494607,22.475309 L 26.507630,22.475309 L 26.507630,12.480335 L 21.512796,12.498193 L 21.521725,22.475309 L 11.495536,22.493166 L 11.468750,27.466256 L 21.533143,27.475185 L 21.519750,36.502670 L 26.498702,36.533920 z "
+       id="path7076"
+       sodipodi:nodetypes="ccccccccccccc" />
+    <path
+       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796"
+       d="M 11.000000,25.000000 C 11.000000,26.937500 36.984375,24.031250 36.984375,24.968750 L 36.984375,21.968750 L 27.000000,22.000000 L 27.000000,12.034772 L 21.000000,12.034772 L 21.000000,22.000000 L 11.000000,22.000000 L 11.000000,25.000000 z "
+       id="path7914"
+       sodipodi:nodetypes="ccccccccc" />
+  </g>
+</svg>
index d7f25ebf82153faeac494b30124586d3c872d5c1..cb25c338c0d06b52a3c21585a9764d2d7626235e
GIT binary patch
literal 1387
zc$|%t{XY{39LFbdq8(}TuslZO`HZv9*vwfd;V@H~;>;_>lrfn}FYDo4l2&Iz=sdQ0
zC}G{)I8^6pG)pXOdg)poGI`k8*iQdJ-|y@5dB47&A3i^R^Fo9Df!Yvl0000C4Dbuv
z;nlCw(%kW0MC{-WG~<r@`vFv6w~|wL4*<}x2=qfmTrT@8=qNBjgI;}+M2zISK%-U;
zSak1?vOonK3---7J$-O?pPpSnaKA~9&N4vH(!>Jg<C6<CSZsO==cjAQBeP2%;xe4t
zw^V^r5*CY<y?J~b%i0b2#_8)z1<93Ee^@~<Yn*t0+fy;O5TcA>4><y7mg+>5*p`vh
zos<X{Zfz_pN&V1X+V!^UY<yx=l+fP)5g~zgoQ9ytoEov{g29M!NOC}o<oTVJ!G#w>
zOY=qB%^QX**5b5HDuttf&|MwtxZ$=+xgy*<lLYO2?c3rGcyRM0owC+F`L4kY255Fj
z4;3fZXBT5>9nm)TKx1VRTEq4NWcMfy00Sl#3ZpACbek@nDxC&14}v)IQjbo_@Bp@1
z?Rn|RZ8suUL!pi|Tyy4PfMHMRtj-Ip_UdBkuzO*;8J#tUF<aObEvm2;lg3k&Zke9D
z4ox!S;(j|BRivpm#r^Is(%WHOj2tnv6Y(3_`W?86KG;NsQEJVcWwyu2lh~mTlIa98
z<-ELJg*&Z*6J48YF(_IvwrFL=Aa#p)>01=mYmHHEo@+vFsw}}cMDPs%@U*bJex0lg
zD(@+=JFL<w#DgoVRW1mPzyItu2P*gi_7*48vLa{%&=RY2`Mn4VNl>X~&TN#aQ$<MI
z6o<Z1fTQtA17o#e9VMQ8o_6t^E~2_Y@IhyH*FX+<zfTkXtiFsONb9FTHC5;v6xsY4
zW1MRw^ExgqlY={oog34B<hbCT@iL13i#W0USJ^HUtQpMCX1?a$PGi3z^7FmIuYyW`
z@b)G*!3Yg)PE}JiIvlITu`NHzPs@)vj17A&9`0!aKRTTZE^ZMtQD=FW?{lY;bg>`>
z*2Duou$Nzo=E@^}cb)%$Ndk0prx+EacA__2INx05w!QLimwj#`rZ^HEy00PG&T>e$
zXrusRj!JGHe!7&{VRM9PHsO*nRXB`OK3pw(a&Fny<$g#l{%kA3puWgGjIW5E45JNr
zYgEIxwbyuGJhR;~LBfea!z~@eHD@P2b4IVEr0tfoI{A<I*`MiqltbzhHMz)fs=wIO
zU~83eC<ETtx_6BS4Yg_P*=#mVpn9=i`N^YopFLQ0;v&m)X|SH@&2YD|<(MST#{LW3
z^^!}e7m3(Sryu!lJ~I1yW3{EJcb_;JOF<t~>}xY`N|H~lm~rSKpKs}#msNZ`A)1yI
z0Gr2Zv#^n2By7PQnLplI99$$$WeHO{dhBwncWPE{@HBDBl052rp5rFv!aO>H@fNZK
zrB5-sFortGeqIr6DV(fjQv4@RCd?{h8&yYM$v+{r{s)sHC3XE}DvPxWm#h-Uk5qw}
z`w|EcHUnj`Qwvi=C_m>VjT9GMkuT<e4`8F)By;cMvrGyJMx>WeMiBXmaa9RA^M1rq
z+-Mc<KWAx^TP7}$c`(iDSgO}G-)^~8m=)+{y<^}hum^)Vdk>GO<o0ju4c#tG>B=da
z)sG4&x`VPAT)n&J*5I0+5mNMc1L`kusr9mp;~facwqGH&3fifcTGyrGW(2~s^+kuw
zY#QOvUZvS(*Qf>0A<maQkuFS*5`s(}h6sV3<(|^s-Yoc>@)1k(TOQL)&8qoIWV|5=
Rm0kPw4nzn0HTj;+{U5edkoEuo
new file mode 100644
--- /dev/null
+++ b/libgui/src/icons/zoom-out.svg
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg6431"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+   sodipodi:docname="list-remove.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs6433">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective69" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2091">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2093" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2095" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2091"
+       id="radialGradient2097"
+       cx="23.070683"
+       cy="35.127438"
+       fx="23.070683"
+       fy="35.127438"
+       r="10.319340"
+       gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient7916">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop7918" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.34020618;"
+         offset="1.0000000"
+         id="stop7920" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient8662">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop8664" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop8666" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8662"
+       id="radialGradient1503"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)"
+       cx="24.837126"
+       cy="36.421127"
+       fx="24.837126"
+       fy="36.421127"
+       r="15.644737" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2847">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2849" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:0;"
+         offset="1"
+         id="stop2851" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2847"
+       id="linearGradient1488"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)"
+       x1="37.128052"
+       y1="29.729605"
+       x2="37.065414"
+       y2="26.194071" />
+    <linearGradient
+       id="linearGradient2831">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2833" />
+      <stop
+         id="stop2855"
+         offset="0.33333334"
+         style="stop-color:#5b86be;stop-opacity:1;" />
+      <stop
+         style="stop-color:#83a8d8;stop-opacity:0;"
+         offset="1"
+         id="stop2835" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2831"
+       id="linearGradient1486"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.30498,-6.043298)"
+       x1="13.478554"
+       y1="10.612206"
+       x2="15.419417"
+       y2="19.115122" />
+    <linearGradient
+       id="linearGradient2380">
+      <stop
+         style="stop-color:#b9cfe7;stop-opacity:1"
+         offset="0"
+         id="stop2382" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop2384" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2682">
+      <stop
+         style="stop-color:#3977c3;stop-opacity:1;"
+         offset="0"
+         id="stop2684" />
+      <stop
+         style="stop-color:#89aedc;stop-opacity:0;"
+         offset="1"
+         id="stop2686" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2682"
+       id="linearGradient2688"
+       x1="36.713837"
+       y1="31.455952"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.77039,-5.765705)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2690">
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:1;"
+         offset="0"
+         id="stop2692" />
+      <stop
+         style="stop-color:#c4d7eb;stop-opacity:0;"
+         offset="1"
+         id="stop2694" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2690"
+       id="linearGradient2696"
+       x1="32.647972"
+       y1="30.748846"
+       x2="37.124462"
+       y2="24.842253"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-48.77039,-5.765705)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2871">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1;"
+         offset="0"
+         id="stop2873" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop2875" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2402">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop2404" />
+      <stop
+         style="stop-color:#528ac5;stop-opacity:1;"
+         offset="1"
+         id="stop2406" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1493"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2797">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop2799" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2801" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2797"
+       id="linearGradient1491"
+       gradientUnits="userSpaceOnUse"
+       x1="5.9649176"
+       y1="26.048164"
+       x2="52.854097"
+       y2="26.048164" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient7179">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop7181" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop7183" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2316">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2318" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.65979379;"
+         offset="1"
+         id="stop2320" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient1322">
+      <stop
+         id="stop1324"
+         offset="0.0000000"
+         style="stop-color:#729fcf" />
+      <stop
+         id="stop1326"
+         offset="1.0000000"
+         style="stop-color:#5187d6;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1322"
+       id="linearGradient4975"
+       x1="34.892849"
+       y1="36.422989"
+       x2="45.918697"
+       y2="48.547989"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-18.01785,-13.57119)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7179"
+       id="linearGradient7185"
+       x1="13.435029"
+       y1="13.604306"
+       x2="22.374878"
+       y2="23.554308"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7179"
+       id="linearGradient7189"
+       gradientUnits="userSpaceOnUse"
+       x1="13.435029"
+       y1="13.604306"
+       x2="22.374878"
+       y2="23.554308"
+       gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2380"
+       id="linearGradient7180"
+       gradientUnits="userSpaceOnUse"
+       x1="62.513836"
+       y1="36.061237"
+       x2="15.984863"
+       y2="20.60858" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2871"
+       id="linearGradient7182"
+       gradientUnits="userSpaceOnUse"
+       x1="46.834816"
+       y1="45.264122"
+       x2="45.380436"
+       y2="50.939667" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2402"
+       id="linearGradient7184"
+       gradientUnits="userSpaceOnUse"
+       x1="18.935766"
+       y1="23.667896"
+       x2="53.588622"
+       y2="26.649362" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2871"
+       id="linearGradient7186"
+       gradientUnits="userSpaceOnUse"
+       x1="46.834816"
+       y1="45.264122"
+       x2="45.380436"
+       y2="50.939667" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7916"
+       id="linearGradient7922"
+       x1="16.874998"
+       y1="22.851799"
+       x2="27.900846"
+       y2="34.976799"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.10980392"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="-123.27226"
+     inkscape:cy="26.474252"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1280"
+     inkscape:window-height="818"
+     inkscape:window-x="0"
+     inkscape:window-y="30"
+     inkscape:showpageshadow="false" />
+  <metadata
+     id="metadata6436">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Remove</dc:title>
+        <dc:date>2006-01-04</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://tango-project.org</dc:source>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>remove</rdf:li>
+            <rdf:li>delete</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/publicdomain/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       d="M 27.514356,28.359472 L 39.633445,28.475543 L 39.633445,21.480219 L 27.523285,21.480219 L 20.502546,21.462362 L 8.5441705,21.489147 L 8.5084565,28.457686 L 20.511475,28.475543 L 27.514356,28.359472 z "
+       id="text1314"
+       sodipodi:nodetypes="ccccccccc" />
+    <path
+       style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       d="M 38.579429,27.484113 L 38.588357,22.475309 L 9.5267863,22.493166 L 9.5000003,27.466256 L 38.579429,27.484113 z "
+       id="path7076"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796"
+       d="M 9.0000000,25.000000 C 9.0000000,26.937500 39.125000,24.062500 39.125000,25.000000 L 39.125000,22.000000 L 9.0000000,22.000000 L 9.0000000,25.000000 z "
+       id="path7914"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
--- a/libgui/src/m-editor/file-editor-interface.h
+++ b/libgui/src/m-editor/file-editor-interface.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -40,10 +40,11 @@
 
   virtual ~file_editor_interface () { }
 
-  virtual QMenu *get_mru_menu ( ) = 0;
+  virtual QMenu *get_mru_menu () = 0;
   virtual QMenu *debug_menu () = 0;
   virtual QToolBar *toolbar () = 0;
 
+  virtual void insert_new_open_actions (QAction*,QAction*,QAction*) = 0;
   virtual void handle_enter_debug_mode (void) = 0;
   virtual void handle_exit_debug_mode (void) = 0;
 
@@ -59,7 +60,11 @@
 
   virtual void handle_edit_file_request (const QString& file) = 0;
 
-  virtual void set_focus () = 0;
+  virtual bool check_closing (void) = 0;
+
+  virtual void empty_script (bool, bool) = 0;
+
+  virtual void enable_menu_shortcuts (bool enable) = 0;
 
 public slots:
   virtual void request_new_file (const QString& command = QString ()) = 0;
--- a/libgui/src/m-editor/file-editor-tab.cc
+++ b/libgui/src/m-editor/file-editor-tab.cc
@@ -1,6 +1,7 @@
+
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -47,61 +48,61 @@
 #include <QVBoxLayout>
 #include <QInputDialog>
 #include <QPrintDialog>
+#include <QDateTime>
 
 #include "file-editor-tab.h"
 #include "file-editor.h"
+#include "octave-txt-lexer.h"
 
 #include "file-ops.h"
 
 #include "debug.h"
 #include "octave-qt-link.h"
 #include "version.h"
+#include "utils.h"
+#include "defaults.h"
+#include <oct-map.h>
+
+bool file_editor_tab::_cancelled = false;
 
 // Make parent null for the file editor tab so that warning
 // WindowModal messages don't affect grandparents.
 file_editor_tab::file_editor_tab (const QString& directory_arg)
 {
-  QString directory = directory_arg;
   _lexer_apis = 0;
-  _app_closing = false;
+  _is_octave_file = true;
 
-  // Make sure there is a slash at the end of the directory name
-  // for identification when saved later.
-  if (directory.count () && directory.at (directory.count () - 1) != '/')
-    directory.append ("/");
+  _ced = directory_arg;
 
-  _file_name = directory;
+  _file_name = "";
   _file_system_watcher.setObjectName ("_qt_autotest_force_engine_poller");
 
   _edit_area = new octave_qscintilla (this);
-  // Connect signal for command execution to a slot of this tab which in turn
-  // emits a signal connected to the main window.
-  // Direct connection is not possible because tab's parent is null.
-  connect (_edit_area,
-           SIGNAL (execute_command_in_terminal_signal (const QString&)),
-           this,
-           SLOT (execute_command_in_terminal (const QString&)));
 
-  connect (_edit_area,
-           SIGNAL (cursorPositionChanged (int, int)),
-           this,
-           SLOT (handle_cursor_moved (int,int)));
+  connect (_edit_area, SIGNAL (cursorPositionChanged (int, int)),
+           this, SLOT (handle_cursor_moved (int,int)));
+
+  connect (_edit_area, SIGNAL (context_menu_edit_signal (const QString&)),
+           this, SLOT (handle_context_menu_edit (const QString&)));
 
   // create statusbar for row/col indicator and eol mode
   _status_bar = new QStatusBar (this);
 
   // eol mode
+  QLabel *eol_label = new QLabel (tr ("eol:"), this);
   _eol_indicator = new QLabel ("",this);
-  _eol_indicator->setMinimumSize (35,0);
+  QFontMetrics fm = eol_label->fontMetrics ();
+  _eol_indicator->setMinimumSize (5*fm.averageCharWidth (),0);
+  _status_bar->addPermanentWidget (eol_label, 0);
   _status_bar->addPermanentWidget (_eol_indicator, 0);
 
   // row- and col-indicator
   _row_indicator = new QLabel ("", this);
-  _row_indicator->setMinimumSize (30,0);
-  QLabel *row_label = new QLabel (tr ("Line:"), this);
+  _row_indicator->setMinimumSize (5*fm.averageCharWidth (),0);
+  QLabel *row_label = new QLabel (tr ("line:"), this);
   _col_indicator = new QLabel ("", this);
-  _col_indicator->setMinimumSize (25,0);
-  QLabel *col_label = new QLabel (tr ("Col:"), this);
+  _col_indicator->setMinimumSize (4*fm.averageCharWidth (),0);
+  QLabel *col_label = new QLabel (tr ("col:"), this);
   _status_bar->addPermanentWidget (row_label, 0);
   _status_bar->addPermanentWidget (_row_indicator, 0);
   _status_bar->addPermanentWidget (col_label, 0);
@@ -115,10 +116,11 @@
   _edit_area->setMarginType (1, QsciScintilla::SymbolMargin);
   _edit_area->setMarginSensitivity (1, true);
   _edit_area->markerDefine (QsciScintilla::RightTriangle, bookmark);
-  _edit_area->markerDefine (QPixmap (":/actions/icons/redled.png"),
-                            breakpoint);
-  _edit_area->markerDefine (QPixmap (":/actions/icons/bookmark.png"),
-                            debugger_position);
+  _edit_area->setMarkerBackgroundColor (QColor (0,0,232), bookmark);
+  _edit_area->markerDefine (QsciScintilla::Circle, breakpoint);
+  _edit_area->setMarkerBackgroundColor (QColor (192,0,0), breakpoint);
+  _edit_area->markerDefine (QsciScintilla::RightTriangle, debugger_position);
+  _edit_area->setMarkerBackgroundColor (QColor (255,255,0), debugger_position);
 
   connect (_edit_area, SIGNAL (marginClicked (int, int,
                                               Qt::KeyboardModifiers)),
@@ -130,10 +132,6 @@
   _edit_area->setMarginsBackgroundColor (QColor (232, 232, 220));
   _edit_area->setMarginType (2, QsciScintilla::TextMargin);
 
-  // code folding
-  _edit_area->setMarginType (3, QsciScintilla::SymbolMargin);
-  _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3);
-
   // other features
   _edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch);
   _edit_area->setAutoIndent (true);
@@ -143,8 +141,7 @@
   _edit_area->setUtf8 (true);
 
   // auto completion
-  _edit_area->autoCompleteFromAll ();
-  _edit_area->setAutoCompletionSource (QsciScintilla::AcsAll);
+  _edit_area->SendScintilla (QsciScintillaBase::SCI_AUTOCSETCANCELATSTART, false);
 
   QVBoxLayout *edit_area_layout = new QVBoxLayout ();
   edit_area_layout->addWidget (_edit_area);
@@ -164,7 +161,7 @@
 
   QSettings *settings = resource_manager::get_settings ();
   if (settings)
-    notice_settings (settings);
+    notice_settings (settings, true);
 }
 
 file_editor_tab::~file_editor_tab (void)
@@ -189,18 +186,136 @@
 void
 file_editor_tab::closeEvent (QCloseEvent *e)
 {
-  // ignore close event if file is not saved and user cancels
-  // closing this window
+  _cancelled = false;  // prevent unwanted interaction of previous
+                       // exits of octave which were canceled by the user
+
   if (check_file_modified () == QMessageBox::Cancel)
-    e->ignore ();
+    { // ignore close event if file is not saved and user cancels
+      // closing this window
+      e->ignore ();
+    }
   else
-    e->accept ();
+    {
+      e->accept ();
+      emit tab_remove_request ();
+    }
+}
+
+void
+file_editor_tab::set_current_directory (const QString& dir)
+{
+  _ced = dir;
 }
 
 void
-file_editor_tab::execute_command_in_terminal (const QString& command)
+file_editor_tab::handle_context_menu_edit (const QString& word_at_cursor)
 {
-  emit execute_command_in_terminal_signal (command); // connected to main window
+  // search for a subfunction in actual file (this is done at first because
+  // octave finds this function before other with same name in the search path
+  QRegExp rxfun1 ("^[\t ]*function[^=]+=[\t ]*"
+      + word_at_cursor + "[\t ]*\\([^\\)]*\\)[\t ]*$");
+  QRegExp rxfun2 ("^[\t ]*function[\t ]+"
+      + word_at_cursor + "[\t ]*\\([^\\)]*\\)[\t ]*$");
+  QRegExp rxfun3 ("^[\t ]*function[\t ]+"
+      + word_at_cursor + "[\t ]*$");
+  QRegExp rxfun4 ("^[\t ]*function[^=]+=[\t ]*"
+      + word_at_cursor + "[\t ]*$");
+
+  int pos_fct = -1;
+  QStringList lines = _edit_area->text ().split ("\n");
+
+  int line;
+  for (line = 0; line < lines.count (); line++)
+    {
+      if ((pos_fct = rxfun1.indexIn (lines.at (line))) != -1)
+        break;
+      if ((pos_fct = rxfun2.indexIn (lines.at (line))) != -1)
+        break;
+      if ((pos_fct = rxfun3.indexIn (lines.at (line))) != -1)
+        break;
+      if ((pos_fct = rxfun4.indexIn (lines.at (line))) != -1)
+        break;
+    }
+
+  if (pos_fct > -1)
+    { // reg expr. found: it is an internal function
+      _edit_area->setCursorPosition (line, pos_fct);
+      _edit_area->SendScintilla (2613, line); // SCI_SETFIRSTVISIBLELINE
+      return;
+    }
+
+  // Is it a regular function within the search path? (Call __which__)
+  octave_value_list fct = F__which__ (ovl (word_at_cursor.toStdString ()),0);
+  octave_map map = fct(0).map_value ();
+
+  QString type = QString::fromStdString (
+                         map.contents ("type").data ()[0].string_value ());
+  QString name = QString::fromStdString (
+                         map.contents ("name").data ()[0].string_value ());
+
+  QString message = QString ();
+  QString filename = QString ();
+
+  if (type == QString("built-in function"))
+    { // built in function: can't edit
+      message = tr ("%1 is a built-in function");
+    }
+  else if (type.isEmpty ())
+    {
+      // function not known to octave -> try directory of edited file
+      // get directory
+      QDir dir;
+      if (_file_name.isEmpty ())
+        dir = _ced;
+      else
+        dir = QDir (QFileInfo (_file_name).canonicalPath ());
+
+      // function not known to octave -> try directory of edited file
+      QFileInfo file = QFileInfo (dir, word_at_cursor + ".m");
+
+      if (file.exists ())
+        {
+          filename = file.canonicalFilePath (); // local file exists
+        }
+      else
+        { // local file does not exist -> try private directory
+          file = QFileInfo (_file_name);
+          file = QFileInfo (QDir (file.canonicalPath () + "/private"),
+                            word_at_cursor + ".m");
+
+          if (file.exists ())
+            {
+              filename = file.canonicalFilePath ();  // private function exists
+            }
+          else
+            {
+              message = tr ("Can not find function %1");  // no file found
+            }
+        }
+    }
+
+  if (! message.isEmpty ())
+    {
+      QMessageBox *msgBox
+          = new QMessageBox (QMessageBox::Critical,
+                             tr ("Octave Editor"),
+                             message.arg (name),
+                             QMessageBox::Ok, this);
+
+      msgBox->setWindowModality (Qt::NonModal);
+      msgBox->setAttribute (Qt::WA_DeleteOnClose);
+      msgBox->show ();
+      return;
+    }
+
+  if ( filename.isEmpty ())
+    filename = QString::fromStdString (
+                           map.contents ("file").data ()[0].string_value ());
+
+  if (! filename.endsWith (".m"))
+    filename.append (".m");
+
+  emit request_open_file (filename);
 }
 
 void
@@ -218,9 +333,9 @@
   update_lexer ();
 
   // update the file editor with current editing directory
-  emit editor_state_changed (_copy_available, _file_name);
+  emit editor_state_changed (_copy_available, _is_octave_file);
+
   // add the new file to the mru list
-
   emit mru_add_file (_file_name);
 }
 
@@ -229,13 +344,15 @@
 bool
 file_editor_tab::valid_file_name (const QString& file)
 {
-  QString file_name;
   if (file.isEmpty ())
-    file_name = _file_name;
-  else
-    file_name = file;
-  return (! file_name.isEmpty ()
-          && file_name.at (file_name.count () - 1) != '/');
+    {
+      if (_file_name.isEmpty ())
+        return false;
+      else
+        return true;
+    }
+
+  return true;
 }
 
 void
@@ -273,6 +390,8 @@
   delete lexer;
   lexer = 0;
 
+  _is_octave_file = false;
+
   if (_file_name.endsWith (".m")
       || _file_name.endsWith ("octaverc"))
     {
@@ -280,7 +399,10 @@
       lexer = new QsciLexerOctave ();
 #elif defined (HAVE_LEXER_MATLAB)
       lexer = new QsciLexerMatlab ();
+#else
+      lexer = new octave_txt_lexer ();
 #endif
+      _is_octave_file = true;
     }
 
   if (! lexer)
@@ -309,35 +431,99 @@
         {
           lexer = new QsciLexerDiff ();
         }
+      else if (_file_name.endsWith (".sh"))
+        {
+          lexer = new QsciLexerBash ();
+        }
       else if (! valid_file_name ())
         {
           // new, no yet named file: let us assume it is octave
 #if defined (HAVE_LEXER_OCTAVE)
           lexer = new QsciLexerOctave ();
+          _is_octave_file = true;
 #elif defined (HAVE_LEXER_MATLAB)
           lexer = new QsciLexerMatlab ();
+          _is_octave_file = true;
 #else
-          lexer = new QsciLexerBash ();
+          lexer = new octave_txt_lexer ();
 #endif
         }
       else
         {
           // other or no extension
-          lexer = new QsciLexerBash ();
+          lexer = new octave_txt_lexer ();
         }
     }
 
+  QSettings *settings = resource_manager::get_settings ();
+
+  // build information for auto completion (APIs)
   _lexer_apis = new QsciAPIs(lexer);
+
   if (_lexer_apis)
     {
+      bool update_apis_file = false;  // flag, whether update of apis files
+
       // get path to prepared api info
       QDesktopServices desktopServices;
       QString prep_apis_path
         = desktopServices.storageLocation (QDesktopServices::HomeLocation)
           + "/.config/octave/"  + QString(OCTAVE_VERSION) + "/qsci/";
-      _prep_apis_file = prep_apis_path + lexer->lexer () + ".pap";
+
+      // get settings which infos are used for octave
+      bool octave_builtins = settings->value (
+                  "editor/codeCompletion_octave_builtins", true).toBool ();
+      bool octave_functions = settings->value (
+                  "editor/codeCompletion_octave_functions", true).toBool ();
+
+      if (_is_octave_file)
+        {
+          // octave file: keywords are always used
+          _prep_apis_file = prep_apis_path + lexer->lexer () + "_k";
+
+          if (octave_builtins)
+            _prep_apis_file = _prep_apis_file + "b";  // use builtins, too
+
+          if (octave_functions)
+            _prep_apis_file = _prep_apis_file + "f";  // use keywords, too
+
+          _prep_apis_file = _prep_apis_file + ".pap"; // final name of apis file
+
+          // check whether the APIs info needs to be prepared and saved
+          QFileInfo apis_file = QFileInfo (_prep_apis_file);
+          update_apis_file = ! apis_file.exists ();  // flag whether apis file needs update
 
-      if (!_lexer_apis->loadPrepared (_prep_apis_file))
+          // function list depends on installed packages: check mod. date
+          if (! update_apis_file && octave_functions)
+            {
+              // check whether package file is newer than apis_file
+              QDateTime apis_date = apis_file.lastModified ();
+
+              // compare to local package list
+              // FIXME: How to get user chosen location?
+              QFileInfo local_pkg_list = QFileInfo (
+                desktopServices.storageLocation (QDesktopServices::HomeLocation)
+                + "/.octave_packages");
+              if (local_pkg_list.exists ()
+                  & (apis_date < local_pkg_list.lastModified ()) )
+                update_apis_file = true;
+
+              // compare to global package list
+              // FIXME: How to get user chosen location?
+              QFileInfo global_pkg_list = QFileInfo (
+                                        QString::fromStdString (Voctave_home)
+                                        + "/share/octave/octave_packages");
+               if (global_pkg_list.exists ()
+                   && (apis_date < global_pkg_list.lastModified ()) )
+                update_apis_file = true;
+            }
+          }
+        else  // no octave file, just add extension
+          {
+            _prep_apis_file = prep_apis_path + lexer->lexer () + ".pap";
+          }
+
+      if (update_apis_file || !_lexer_apis->loadPrepared (_prep_apis_file))
         {
           // no prepared info loaded, prepare and save if possible
 
@@ -345,12 +531,34 @@
           QString keyword;
           QStringList keyword_list;
           int i,j;
-          for (i=1; i<=3; i++) // test the first 5 keyword sets
+
+          if (_is_octave_file)
             {
-              keyword = QString(lexer->keywords (i));           // get list
-              keyword_list = keyword.split (QRegExp ("\\s+"));  // split
-              for (j = 0; j < keyword_list.size (); j++)        // add to API
-                _lexer_apis->add (keyword_list.at (j));
+              // octave: get keywords from internal informations depending on
+              //         user preferences
+
+              // keywords are always used
+              add_octave_apis (F__keywords__ ());       // add new entries
+
+              if (octave_builtins)
+                add_octave_apis (F__builtins__ ());       // add new entries
+
+              if (octave_functions)
+                add_octave_apis (F__list_functions__ ()); // add new entries
+
+            }
+          else
+            {
+
+              _prep_apis_file = prep_apis_path + lexer->lexer () + ".pap";
+
+              for (i=1; i<=3; i++) // test the first 5 keyword sets
+                {
+                  keyword = QString(lexer->keywords (i));           // get list
+                  keyword_list = keyword.split (QRegExp ("\\s+"));  // split
+                  for (j = 0; j < keyword_list.size (); j++)        // add to API
+                    _lexer_apis->add (keyword_list.at (j));
+                }
             }
 
           // dsiconnect slot for saving prepared info if already connected
@@ -366,11 +574,11 @@
         }
     }
 
-  QSettings *settings = resource_manager::get_settings ();
-  if (settings)
-    lexer->readSettings (*settings);
+  lexer->readSettings (*settings);
 
   _edit_area->setLexer (lexer);
+  _edit_area->setCaretForegroundColor (lexer->color (0));
+  _edit_area->setIndentationGuidesForegroundColor (lexer->color (0));
 
   // fix line number width with respect to the font size of the lexer
   if (settings->value ("editor/showLineNumbers", true).toBool ())
@@ -380,6 +588,17 @@
 
 }
 
+// function for adding entries to the octave lexer's APIs
+void
+file_editor_tab::add_octave_apis (octave_value_list key_ovl)
+{
+  octave_value keys = key_ovl(0);
+  Cell key_list = keys.cell_value ();
+
+  for (int idx = 0; idx < key_list.numel (); idx++)
+    _lexer_apis->add (QString (key_list.elem (idx).string_value ().data ()));
+}
+
 void
 file_editor_tab::save_apis_info ()
 {
@@ -411,51 +630,6 @@
 }
 
 void
-file_editor_tab::undo (const QWidget *ID)
-{
-  if (ID != this)
-    return;
-
-  _edit_area->undo ();
-}
-
-void
-file_editor_tab::redo (const QWidget *ID)
-{
-  if (ID != this)
-    return;
-
-  _edit_area->redo ();
-}
-
-void
-file_editor_tab::copy (const QWidget *ID)
-{
-  if (ID != this)
-    return;
-
-  _edit_area->copy ();
-}
-
-void
-file_editor_tab::cut (const QWidget *ID)
-{
-  if (ID != this)
-    return;
-
-  _edit_area->cut ();
-}
-
-void
-file_editor_tab::paste (const QWidget *ID)
-{
-  if (ID != this)
-    return;
-
-  _edit_area->paste ();
-}
-
-void
 file_editor_tab::context_help (const QWidget *ID, bool doc)
 {
   if (ID != this)
@@ -474,6 +648,16 @@
 }
 
 void
+file_editor_tab::check_modified_file (void)
+{
+  if (_cancelled)
+    return;
+
+  if (check_file_modified () == QMessageBox::Cancel)
+    _cancelled = true;
+}
+
+void
 file_editor_tab::save_file (const QWidget *ID)
 {
   if (ID != this)
@@ -481,8 +665,8 @@
 
   save_file (_file_name);
 }
+
 void
-
 file_editor_tab::save_file (const QWidget *ID, const QString& fileName,
                             bool remove_on_success)
 {
@@ -523,8 +707,12 @@
   if (ID != this)
     return;
 
-  if (_edit_area->isModified ())
-    save_file (_file_name);
+  if (_edit_area->isModified () | ! valid_file_name ())
+    {
+      save_file (_file_name);  // save file dialog
+      if (! valid_file_name ())
+        return;   // still invalid file name: "save as" was cancelled
+    }
 
   QFileInfo info (_file_name);
   emit run_file_signal (info);
@@ -734,6 +922,15 @@
 }
 
 void
+file_editor_tab::scintilla_command (const QWidget *ID, unsigned int sci_msg)
+{
+  if (ID != this)
+    return;
+
+  _edit_area->SendScintilla (sci_msg);
+}
+
+void
 file_editor_tab::comment_selected_text (const QWidget *ID)
 {
   if (ID != this)
@@ -752,6 +949,66 @@
 }
 
 void
+file_editor_tab::indent_selected_text (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  do_indent_selected_text (true);
+}
+
+void
+file_editor_tab::unindent_selected_text (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  do_indent_selected_text (false);
+}
+
+void
+file_editor_tab::convert_eol (const QWidget *ID, QsciScintilla::EolMode eol_mode)
+{
+  if (ID != this)
+    return;
+
+  _edit_area->convertEols (eol_mode);
+  _edit_area->setEolMode (eol_mode);
+  update_eol_indicator ();
+}
+
+void
+file_editor_tab::zoom_in (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  _edit_area->zoomIn (1);
+  auto_margin_width ();
+}
+
+void
+file_editor_tab::zoom_out (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  _edit_area->zoomOut (1);
+  auto_margin_width ();
+}
+
+void
+file_editor_tab::zoom_normal (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  _edit_area->zoomTo (0);
+  auto_margin_width ();
+}
+
+
+void
 file_editor_tab::handle_find_dialog_finished (int)
 {
   // Find dialog is going to hide.  Save location of window for
@@ -782,14 +1039,15 @@
       _find_dialog->setWindowModality (Qt::NonModal);
       _find_dialog_geometry = _find_dialog->geometry ();
     }
-
-  if (!_find_dialog->isVisible ())
+  else if (!_find_dialog->isVisible ())
     {
       _find_dialog->setGeometry (_find_dialog_geometry);
-      _find_dialog->show ();
-      _find_dialog_is_visible = true;
+      QPoint p = _find_dialog->pos ();
+      _find_dialog->move(p.x ()+10, p.y ()+10);
     }
 
+  _find_dialog->show ();
+  _find_dialog_is_visible = true;
   _find_dialog->activateWindow ();
   _find_dialog->init_search_text ();
 
@@ -819,6 +1077,81 @@
     _edit_area->setCursorPosition (line-1, 0);
 }
 
+void
+file_editor_tab::move_match_brace (const QWidget *ID, bool select)
+{
+  if (ID != this)
+    return;
+
+  if (select)
+    _edit_area->selectToMatchingBrace ();
+  else
+    _edit_area->moveToMatchingBrace ();
+}
+
+void
+file_editor_tab::show_auto_completion (const QWidget *ID)
+{
+  if (ID != this)
+    return;
+
+  QsciScintilla::AutoCompletionSource s = _edit_area->autoCompletionSource ();
+  switch (s)
+    {
+      case QsciScintilla::AcsAll:
+        _edit_area->autoCompleteFromAll ();
+        break;
+
+      case QsciScintilla::AcsAPIs:
+        _edit_area->autoCompleteFromAPIs ();
+        break;
+
+      case QsciScintilla::AcsDocument:
+        _edit_area->autoCompleteFromDocument ();
+        break;
+
+      case QsciScintilla::AcsNone:
+        break;
+    }
+}
+
+void
+file_editor_tab::do_indent_selected_text (bool indent)
+{
+  // TODO
+  _edit_area->beginUndoAction ();
+
+  if (_edit_area->hasSelectedText ())
+    {
+      int lineFrom, lineTo, colFrom, colTo;
+      _edit_area->getSelection (&lineFrom, &colFrom, &lineTo, &colTo);
+
+      if (colTo == 0)  // the beginning of last line is not selected
+        lineTo--;        // stop at line above
+
+      for (int i = lineFrom; i <= lineTo; i++)
+        {
+          if (indent)
+            _edit_area->indent (i);
+          else
+            _edit_area->unindent (i);
+        }
+      //set selection on (un)indented section
+      _edit_area->setSelection (lineFrom, 0, lineTo,
+                                _edit_area->text (lineTo).length ());
+    }
+  else
+    {
+      int cpline, col;
+      _edit_area->getCursorPosition (&cpline, &col);
+      if (indent)
+        _edit_area->indent (cpline);
+      else
+        _edit_area->unindent (cpline);
+    }
+
+  _edit_area->endUndoAction ();
+}
 
 void
 file_editor_tab::do_comment_selected_text (bool comment)
@@ -901,20 +1234,19 @@
 file_editor_tab::handle_copy_available (bool enableCopy)
 {
   _copy_available = enableCopy;
-  emit editor_state_changed (_copy_available, QDir::cleanPath (_file_name));
+  emit editor_state_changed (_copy_available, _is_octave_file);
 }
 
-// show_dialog: shows a modal or non modal dialog depeding on the closing
-//              of the app
+// show_dialog: shows a modal or non modal dialog depending on input arg
 void
-file_editor_tab::show_dialog (QDialog *dlg)
+file_editor_tab::show_dialog (QDialog *dlg, bool modal)
 {
   dlg->setAttribute (Qt::WA_DeleteOnClose);
-  if (_app_closing)
+  if (modal)
     dlg->exec ();
   else
     {
-      dlg->setWindowModality (Qt::WindowModal);
+      dlg->setWindowModality (Qt::NonModal);
       dlg->show ();
     }
 }
@@ -925,23 +1257,18 @@
   int decision = QMessageBox::Yes;
   if (_edit_area->isModified ())
     {
-      activateWindow ();
-      raise ();
       // File is modified but not saved, ask user what to do.  The file
       // editor tab can't be made parent because it may be deleted depending
       // upon the response.  Instead, change the _edit_area to read only.
       QMessageBox::StandardButtons buttons = QMessageBox::Save |
-                                             QMessageBox::Discard;
-      QString available_actions;
+                                             QMessageBox::Discard |
+                                             QMessageBox::Cancel;
 
-      if (_app_closing)
-        available_actions = tr ("Do you want to save or discard the changes?");
-      else
-        {
-          buttons = buttons | QMessageBox::Cancel;  // cancel is allowed
-          available_actions
-            = tr ("Do you want to cancel closing, save or discard the changes?");
-        }
+      // For now, just a warning message about closing a tab that has been
+      // modified seems sufficient.  Exit-condition-specific messages could
+      // be achieved by making 'available_actions' a function input string.
+      QString available_actions =
+          tr ("Do you want to cancel closing, save or discard the changes?");
 
       QString file;
       if (valid_file_name ())
@@ -951,9 +1278,9 @@
 
       QMessageBox* msgBox
         = new QMessageBox (QMessageBox::Warning, tr ("Octave Editor"),
-                           tr ("The file\n"
-                               "%1\n"
-                               "is about to be closed but has been modified.\n"
+                           tr ("The file\n\n"
+                               "  %1\n\n"
+                               "is about to be closed but has been modified.  "
                                "%2").
                            arg (file). arg (available_actions),
                            buttons, qobject_cast<QWidget *> (parent ()));
@@ -963,14 +1290,17 @@
       connect (msgBox, SIGNAL (finished (int)),
                this, SLOT (handle_file_modified_answer (int)));
 
-      show_dialog (msgBox);
+      show_dialog (msgBox, true);
 
-      return QMessageBox::Cancel;
+      if (_cancelled)
+        return QMessageBox::Cancel;
+      else
+        return decision;
     }
   else
     {
-      // Nothing was modified, just remove from editor.
-      emit tab_remove_request ();
+      // Nothing was modified.  Leave tab present in case user
+      // decides to cancel some point further along.
     }
 
   return decision;
@@ -981,18 +1311,18 @@
 {
   if (decision == QMessageBox::Save)
     {
-      // Save file, then remove from editor.
-      save_file (_file_name, true);
+      // Save file, but do not remove from editor.
+      save_file (_file_name, false);
     }
   else if (decision == QMessageBox::Discard)
     {
-      // User doesn't want to save, just remove from editor.
-      emit tab_remove_request ();
+      // User doesn't want to save, leave tab and remove subsequently.
     }
   else
     {
       // User canceled, allow editing again.
       _edit_area->setReadOnly (false);
+      _cancelled = true;
     }
 }
 
@@ -1017,6 +1347,7 @@
     return file.errorString ();
 
   QTextStream in (&file);
+  in.setCodec("UTF-8");
   QApplication::setOverrideCursor (Qt::WaitCursor);
   _edit_area->setText (in.readAll ());
   _edit_area->setEolMode (detect_eol_mode ());
@@ -1035,49 +1366,46 @@
 QsciScintilla::EolMode
 file_editor_tab::detect_eol_mode ()
 {
-  char *text = _edit_area->text ().toAscii ().data ();
-  int text_size = _edit_area->text ().length ();
+  QByteArray text = _edit_area->text ().toAscii ();
 
-  char eol_lf = 0x0a;
-  char eol_cr = 0x0d;
+  QByteArray eol_lf = QByteArray (1,0x0a);
+  QByteArray eol_cr = QByteArray (1,0x0d);
+  QByteArray eol_crlf = eol_cr;
+  eol_crlf.append (eol_lf);
+
+  int count_crlf = text.count (eol_crlf);
+  int count_lf = text.count (eol_lf) - count_crlf;  // isolated lf
+  int count_cr = text.count (eol_cr) - count_crlf;  // isolated cr;
 
-  int count_lf = 0;
-  int count_cr = 0;
-  int count_crlf = 0;
+  // get default from OS or from settings
+#if defined (Q_OS_WIN32)
+  int os_eol_mode = QsciScintilla::EolWindows;
+#elif defined (Q_OS_MAC)
+  int os_eol_mode = QsciScintilla::EolMac;
+#else
+  int os_eol_mode = QsciScintilla::EolUnix;
+#endif
+  QSettings *settings = resource_manager::get_settings ();
+  QsciScintilla::EolMode eol_mode = static_cast<QsciScintilla::EolMode> (
+        settings->value("editor/default_eol_mode",os_eol_mode).toInt ());
 
-  for (int i = 0; i < text_size; i++)
+  int count_max = 0;
+
+  if (count_crlf > count_max)
     {
-      if (text[i] == eol_lf)
-        {
-          count_lf++;
-        }
-      else
-        {
-          if (text[i] == eol_cr)
-            {
-              if ((i < text_size -1) && text[i+1] == eol_lf)
-                {
-                  count_crlf++;
-                  i++;
-                }
-              else
-                count_cr++;
-            }
-        }
+      eol_mode = QsciScintilla::EolWindows;
+      count_max = count_crlf;
     }
-
-  QsciScintilla::EolMode eol_mode = QsciScintilla::EolUnix;
-  int count_max = count_lf;
-
+  if (count_lf > count_max)
+    {
+      eol_mode = QsciScintilla::EolUnix;
+      count_max = count_lf;
+    }
   if (count_cr > count_max)
     {
       eol_mode = QsciScintilla::EolMac;
       count_max = count_cr;
     }
-  if (count_crlf > count_max)
-    {
-      eol_mode = QsciScintilla::EolWindows;
-    }
 
   return eol_mode;
 }
@@ -1103,9 +1431,28 @@
 file_editor_tab::new_file (const QString &commands)
 {
   update_window_title (false); // window title (no modification)
+
+  QSettings *settings = resource_manager::get_settings ();
+
+  // set the eol mode from the settings or depending on the OS if the entry is
+  // missing in the settings
+#if defined (Q_OS_WIN32)
+  int eol_mode = QsciScintilla::EolWindows;
+#elif defined (Q_OS_MAC)
+  int eol_mode = QsciScintilla::EolMac;
+#else
+  int eol_mode = QsciScintilla::EolUnix;
+#endif
+  _edit_area->setEolMode (
+    static_cast<QsciScintilla::EolMode> (
+      settings->value("editor/default_eol_mode",eol_mode).toInt ()));
+
+  update_eol_indicator ();
+
+  update_lexer ();
+
   _edit_area->setText (commands);
   _edit_area->setModified (false); // new file is not modified yet
-  update_eol_indicator ();
 }
 
 void
@@ -1147,13 +1494,14 @@
                            tr ("Could not open file %1 for write:\n%2.").
                            arg (file_to_save).arg (file.errorString ()),
                            QMessageBox::Ok, 0);
-      show_dialog (msgBox);
+      show_dialog (msgBox, false);
 
       return;
     }
 
   // save the contents into the file
   QTextStream out (&file);
+  out.setCodec("UTF-8");
   QApplication::setOverrideCursor (Qt::WaitCursor);
   out << _edit_area->text ();
   out.flush ();
@@ -1205,29 +1553,74 @@
   // it had/has no effect on Windows, though)
   fileDialog->setOption(QFileDialog::DontUseNativeDialog, true);
 
+  // get the dialog's layout for adding extra elements
+  QGridLayout *dialog_layout = dynamic_cast<QGridLayout*> (fileDialog->layout ());
+  int rows = dialog_layout->rowCount ();
+
+  // define a new grid layout with the extra elements
+  QGridLayout *extra = new QGridLayout (fileDialog);
+  QSpacerItem *spacer = new QSpacerItem (1,1,QSizePolicy::Expanding,
+                                             QSizePolicy::Fixed);
+  QFrame *separator = new QFrame (fileDialog);
+  separator->setFrameShape (QFrame::HLine);   // horizontal line as separator
+  separator->setFrameStyle (QFrame::Sunken);
+
+  // combo box for choosing new line ending chars
+  QLabel *label_eol = new QLabel (tr ("Line Endings:"));
+  QComboBox *combo_eol = new QComboBox ();
+  combo_eol->addItem ("Windows (CRLF)");  // ensure the same order as in
+  combo_eol->addItem ("Mac (CR)");        // the settings dialog
+  combo_eol->addItem ("Unix (LF)");
+  _save_as_desired_eol = _edit_area->eolMode ();      // init with current eol
+  combo_eol->setCurrentIndex (_save_as_desired_eol);
+
+  // track changes in the combo box
+  connect (combo_eol, SIGNAL (currentIndexChanged (int)),
+           this, SLOT (handle_combo_eol_current_index (int)));
+
+  // build the extra grid layout
+  extra->addWidget (separator,0,0,1,3);
+  extra->addWidget (label_eol,1,0);
+  extra->addWidget (combo_eol,1,1);
+  extra->addItem   (spacer,   1,2);
+
+  // and add the extra grid layout to the dialog's layout
+  dialog_layout->addLayout (extra,rows,0,1,dialog_layout->columnCount ());
+
+  // add the possible filters and the default suffix
+  QStringList filters;
+  filters << tr ("Octave Files (*.m)")
+          << tr ("All Files (*)");
+  fileDialog->setNameFilters (filters);
+  fileDialog->setDefaultSuffix ("m");
+
   if (valid_file_name ())
     {
       fileDialog->selectFile (_file_name);
+      QFileInfo file_info (_file_name);
+      if (file_info.suffix () != "m")
+        { // it is not an octave file
+          fileDialog->selectNameFilter (filters.at (1));  // "All Files"
+          fileDialog->setDefaultSuffix ("");              // no default suffix
+        }
     }
   else
     {
       fileDialog->selectFile ("");
+      fileDialog->setDirectory (_ced);
 
-      if (_file_name.isEmpty ())
-        fileDialog->setDirectory (QDir::currentPath ());
-      else
-        {
-          // The file name is actually the directory name from the
-          // constructor argument.
-          fileDialog->setDirectory (_file_name);
-        }
+      // propose a name corresponding to the function name
+      QString fname = get_function_name ();
+      if (! fname.isEmpty ())
+        fileDialog->selectFile (fname + ".m");
     }
 
-  fileDialog->setNameFilter (tr ("Octave Files (*.m);;All Files (*)"));
-  fileDialog->setDefaultSuffix ("m");
   fileDialog->setAcceptMode (QFileDialog::AcceptSave);
   fileDialog->setViewMode (QFileDialog::Detail);
 
+  connect (fileDialog, SIGNAL (filterSelected (const QString&)),
+           this, SLOT (handle_save_as_filter_selected (const QString&)));
+
   if (remove_on_success)
     {
       connect (fileDialog, SIGNAL (fileSelected (const QString&)),
@@ -1242,12 +1635,59 @@
                this, SLOT (handle_save_file_as_answer (const QString&)));
     }
 
-  show_dialog (fileDialog);
+  show_dialog (fileDialog, ! valid_file_name ());
+}
+
+void
+file_editor_tab::handle_combo_eol_current_index (int index)
+{
+  _save_as_desired_eol = static_cast<QsciScintilla::EolMode> (index);
+}
+
+void
+file_editor_tab::handle_save_as_filter_selected (const QString& filter)
+{
+  QFileDialog *file_dialog = qobject_cast<QFileDialog *> (sender ());
+
+  QRegExp rx ("\\*\\.([^ ^\\)]*)[ \\)]");   // regexp for suffix in filter
+  int index = rx.indexIn (filter,0);        // get first suffix in filter
+
+  if (index > -1)
+    file_dialog->setDefaultSuffix (rx.cap (1)); // found a suffix, set default
+  else
+    file_dialog->setDefaultSuffix ("");         // not found, clear default
+}
+
+bool
+file_editor_tab::check_valid_identifier (QString file_name)
+{
+  QFileInfo file = QFileInfo (file_name);
+  QString base_name = file.baseName ();
+
+  if ((file.suffix () == "m")
+      && (! valid_identifier (base_name.toStdString ())))
+    {
+      int ans = QMessageBox::question (0, tr ("Octave Editor"),
+         tr ("\"%1\"\n"
+             "is not a valid identifier.\n\n"
+             "If you keep this file name, you will not be able to\n"
+             "call your script using its name as an Octave command.\n\n"
+             "Do you want to choose another name?").arg (base_name),
+          QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+
+      if (ans == QMessageBox::Yes)
+        return true;
+    }
+
+  return false;
 }
 
 void
 file_editor_tab::handle_save_file_as_answer (const QString& saveFileName)
 {
+  if (_save_as_desired_eol != _edit_area->eolMode ())
+    convert_eol (this,_save_as_desired_eol);
+
   if (saveFileName == _file_name)
     {
       // same name as actual file, save it as "save" would do
@@ -1256,18 +1696,31 @@
   else
     {
       // Have editor check for conflict, do not delete tab after save.
-      emit editor_check_conflict_save (saveFileName, false);
+      if (check_valid_identifier (saveFileName))
+        save_file_as (false);
+      else
+        emit editor_check_conflict_save (saveFileName, false);
     }
 }
 
 void
 file_editor_tab::handle_save_file_as_answer_close (const QString& saveFileName)
 {
+  if (_save_as_desired_eol != _edit_area->eolMode ())
+    {
+      _edit_area->setReadOnly (false);  // was set to read-only in save_file_as
+      convert_eol (this,_save_as_desired_eol);
+      _edit_area->setReadOnly (true);   // restore read-only mode
+    }
+
   // saveFileName == _file_name can not happen, because we only can get here
   // when we close a tab and _file_name is not a valid file name yet
 
   // Have editor check for conflict, delete tab after save.
-  emit editor_check_conflict_save (saveFileName, true);
+  if (check_valid_identifier (saveFileName))
+    save_file_as (true);
+  else
+    emit editor_check_conflict_save (saveFileName, true);
 }
 
 void
@@ -1289,21 +1742,28 @@
 
   if (QFile::exists (_file_name))
     {
-      // Create a WindowModal message that blocks the edit area
-      // by making _edit_area parent.
-      QMessageBox* msgBox
-        = new QMessageBox (QMessageBox::Warning,
-                           tr ("Octave Editor"),
-                           tr ("It seems that \'%1\' has been modified by another application. Do you want to reload it?").
-                           arg (_file_name),
-                           QMessageBox::Yes | QMessageBox::No, this);
+      if (_always_reload_changed_files)
+
+              load_file (_file_name);
 
-      connect (msgBox, SIGNAL (finished (int)),
-               this, SLOT (handle_file_reload_answer (int)));
+      else
+        {
+          // Create a WindowModal message that blocks the edit area
+          // by making _edit_area parent.
+          QMessageBox* msgBox
+            = new QMessageBox (QMessageBox::Warning,
+                               tr ("Octave Editor"),
+                               tr ("It seems that \'%1\' has been modified by another application. Do you want to reload it?").
+                               arg (_file_name),
+                               QMessageBox::Yes | QMessageBox::No, this);
 
-      msgBox->setWindowModality (Qt::WindowModal);
-      msgBox->setAttribute (Qt::WA_DeleteOnClose);
-      msgBox->show ();
+          connect (msgBox, SIGNAL (finished (int)),
+                   this, SLOT (handle_file_reload_answer (int)));
+
+          msgBox->setWindowModality (Qt::WindowModal);
+          msgBox->setAttribute (Qt::WA_DeleteOnClose);
+          msgBox->show ();
+        }
     }
   else
     {
@@ -1334,11 +1794,29 @@
 }
 
 void
-file_editor_tab::notice_settings (const QSettings *settings)
+file_editor_tab::notice_settings (const QSettings *settings, bool init)
 {
   // QSettings pointer is checked before emitting.
 
-  update_lexer ();
+  if (! init)
+    update_lexer ();
+
+  // code folding
+  if (settings->value ("editor/code_folding",true).toBool ())
+    {
+      _edit_area->setMarginType (3, QsciScintilla::SymbolMargin);
+      _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3);
+    }
+  else
+    {
+      _edit_area->setFolding (QsciScintilla::NoFoldStyle, 3);
+    }
+
+  // status bar
+  if (settings->value ("editor/show_edit_status_bar",true).toBool ())
+    _status_bar->show ();
+  else
+    _status_bar->hide ();
 
   //highlight current line color
   QVariant default_var = QColor (240, 240, 240);
@@ -1348,30 +1826,29 @@
   _edit_area->setCaretLineVisible
     (settings->value ("editor/highlightCurrentLine", true).toBool ());
 
-  if (settings->value ("editor/codeCompletion", true).toBool ())  // auto compl.
-    {
-      bool match_keywords = settings->value
+  bool match_keywords = settings->value
                             ("editor/codeCompletion_keywords",true).toBool ();
-      bool match_document = settings->value
+  bool match_document = settings->value
                             ("editor/codeCompletion_document",true).toBool ();
 
-      QsciScintilla::AutoCompletionSource source = QsciScintilla::AcsNone;
-      if (match_keywords)
-        if (match_document)
-          source = QsciScintilla::AcsAll;
-        else
-          source = QsciScintilla::AcsAPIs;
-      else if (match_document)
-        source = QsciScintilla::AcsDocument;
-      _edit_area->setAutoCompletionSource (source);
+  QsciScintilla::AutoCompletionSource source = QsciScintilla::AcsNone;
+  if (match_keywords)
+    if (match_document)
+      source = QsciScintilla::AcsAll;
+    else
+      source = QsciScintilla::AcsAPIs;
+  else if (match_document)
+    source = QsciScintilla::AcsDocument;
+  _edit_area->setAutoCompletionSource (source);
 
-      _edit_area->setAutoCompletionReplaceWord
-        (settings->value ("editor/codeCompletion_replace",false).toBool ());
-      _edit_area->setAutoCompletionCaseSensitivity
-        (settings->value ("editor/codeCompletion_case",true).toBool ());
-      _edit_area->setAutoCompletionThreshold
-        (settings->value ("editor/codeCompletion_threshold",2).toInt ());
-    }
+  _edit_area->setAutoCompletionReplaceWord
+      (settings->value ("editor/codeCompletion_replace",false).toBool ());
+  _edit_area->setAutoCompletionCaseSensitivity
+      (settings->value ("editor/codeCompletion_case",true).toBool ());
+
+  if (settings->value ("editor/codeCompletion", true).toBool ())
+    _edit_area->setAutoCompletionThreshold
+      (settings->value ("editor/codeCompletion_threshold",2).toInt ());
   else
     _edit_area->setAutoCompletionThreshold (-1);
 
@@ -1383,6 +1860,9 @@
   else
     _edit_area->setWhitespaceVisibility (QsciScintilla::WsInvisible);
 
+  _edit_area->setEolVisibility (
+              settings->value("editor/show_eol_chars",false).toBool ());
+
   if (settings->value ("editor/showLineNumbers", true).toBool ())
     {
       _edit_area->setMarginLineNumbers (2, true);
@@ -1404,13 +1884,32 @@
         (settings->value ("editor/backspace_unindents_line",false).toBool ());
   _edit_area->setIndentationGuides
         (settings->value ("editor/show_indent_guides",false).toBool ());
+  _edit_area->setIndentationsUseTabs
+        (settings->value ("editor/indent_uses_tabs",false).toBool ());
+  _edit_area->setIndentationWidth
+        (settings->value ("editor/indent_width",2).toInt ());
 
   _edit_area->setTabWidth
         (settings->value ("editor/tab_width",2).toInt ());
 
+  _edit_area->SendScintilla (QsciScintillaBase::SCI_SETHSCROLLBAR,
+        settings->value ("editor/show_hscroll_bar",true).toBool ());
+  _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTH,-1);
+  _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTHTRACKING,true);
+
   _long_title = settings->value ("editor/longWindowTitle", false).toBool ();
   update_window_title (_edit_area->isModified ());
 
+  _edit_area->setEdgeColumn (
+              settings->value ("editor/long_line_column",80).toInt ());
+  if (settings->value ("editor/long_line_marker",true).toBool ())
+    _edit_area->setEdgeMode (QsciScintilla::EdgeLine);
+  else
+    _edit_area->setEdgeMode (QsciScintilla::EdgeNone);
+
+  // reload changed files
+  _always_reload_changed_files =
+        settings->value ("editor/always_reload_changed_files",false).toBool ();
 }
 
 void
@@ -1419,14 +1918,15 @@
   _edit_area->setMarginWidth (2, "1"+QString::number (_edit_area->lines ()));
 }
 
-void
-file_editor_tab::conditional_close (const QWidget *ID, bool app_closing)
+// the following close request was changed from a signal slot into a
+// normal function because we need the return value from close whether
+// the tab really was closed (for canceling exiting octave).
+// When emitting a signal, only the return value from the last slot
+// goes back to the sender
+bool
+file_editor_tab::conditional_close (void)
 {
-  if (ID != this)
-    return;
-
-  _app_closing = app_closing;
-  close ();
+  return close ();
 }
 
 void
@@ -1449,10 +1949,12 @@
   if (_find_dialog && _find_dialog_is_visible)
     {
       _find_dialog->setGeometry (_find_dialog_geometry);
+      QPoint p = _find_dialog->pos ();
+      _find_dialog->move(p.x ()+10, p.y ()+10);
       _find_dialog->show ();
     }
 
-  emit editor_state_changed (_copy_available, QDir::cleanPath (_file_name));
+  emit editor_state_changed (_copy_available, _is_octave_file);
 }
 
 void
@@ -1563,8 +2065,36 @@
 void
 file_editor_tab::handle_cursor_moved (int line, int col)
 {
+  if (_edit_area->SendScintilla (QsciScintillaBase::SCI_AUTOCACTIVE))
+    show_auto_completion (this);
+
   _row_indicator->setNum (line+1);
   _col_indicator->setNum (col+1);
 }
 
+QString
+file_editor_tab::get_function_name ()
+{
+  QRegExp rxfun1 ("^[\t ]*function[^=]+=([^\\(]+)\\([^\\)]*\\)[\t ]*$");
+  QRegExp rxfun2 ("^[\t ]*function[\t ]+([^\\(]+)\\([^\\)]*\\)[\t ]*$");
+  QRegExp rxfun3 ("^[\t ]*function[^=]+=[\t ]*([^\\s]+)[\t ]*$");
+  QRegExp rxfun4 ("^[\t ]*function[\t ]+([^\\s]+)[\t ]*$");
+
+  QStringList lines = _edit_area->text ().split ("\n");
+
+  for (int i = 0; i < lines.count (); i++)
+    {
+      if (rxfun1.indexIn (lines.at (i)) != -1)
+        return rxfun1.cap (1).remove (QRegExp("[ \t]*"));
+      else if (rxfun2.indexIn (lines.at (i)) != -1)
+        return rxfun2.cap (1).remove (QRegExp("[ \t]*"));
+      else if (rxfun3.indexIn (lines.at (i)) != -1)
+        return rxfun3.cap (1).remove (QRegExp("[ \t]*"));
+      else if (rxfun4.indexIn (lines.at (i)) != -1)
+        return rxfun4.cap (1).remove (QRegExp("[ \t]*"));
+    }
+
+  return QString ();
+}
+
 #endif
--- a/libgui/src/m-editor/file-editor-tab.h
+++ b/libgui/src/m-editor/file-editor-tab.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -31,9 +31,11 @@
 #include <Qsci/qsciapis.h>
 #include <QStatusBar>
 #include <QLabel>
+#include <QComboBox>
 
 #include "find-dialog.h"
 #include "octave-qscintilla.h"
+#include "builtin-defun-decls.h"
 
 class file_editor;
 
@@ -47,6 +49,14 @@
 
   ~file_editor_tab (void);
 
+  octave_qscintilla *qsci_edit_area () { return _edit_area; }
+
+  // Will initiate close if associated with the identifier tag.
+  bool conditional_close (void);
+
+  static void reset_cancel (void) {_cancelled = false;}
+  static bool was_cancelled (void) {return _cancelled;}
+
 public slots:
 
   void update_window_title (bool modified);
@@ -55,10 +65,7 @@
                               Qt::KeyboardModifiers state);
 
   // Tells the editor tab to react on changed settings.
-  void notice_settings (const QSettings *settings);
-
-  // Will initiate close if associated with the identifier tag.
-  void conditional_close (const QWidget *ID, bool app_closing = false);
+  void notice_settings (const QSettings *settings, bool init = false);
 
   // Change to a different editor tab by identifier tag.
   void change_editor_state (const QWidget *ID);
@@ -67,13 +74,10 @@
   void file_name_query (const QWidget *ID);
 
   void set_focus (const QWidget *ID);
-  void undo (const QWidget *ID);
-  void redo (const QWidget *ID);
-  void copy (const QWidget *ID);
-  void cut (const QWidget *ID);
-  void paste (const QWidget *ID);
+  void set_current_directory (const QString& dir);
   void context_help (const QWidget *ID, bool);
   void context_edit (const QWidget *ID);
+  void check_modified_file (void);
   void save_file (const QWidget *ID);
   void save_file (const QWidget *ID, const QString& fileName,
                   bool remove_on_success);
@@ -91,10 +95,23 @@
   void previous_breakpoint (const QWidget *ID);
   void remove_all_breakpoints (const QWidget *ID);
 
+  void scintilla_command (const QWidget *, unsigned int);
+
   void comment_selected_text (const QWidget *ID);
   void uncomment_selected_text (const QWidget *ID);
+
+  void indent_selected_text (const QWidget *ID);
+  void unindent_selected_text (const QWidget *ID);
+  void convert_eol (const QWidget *ID, QsciScintilla::EolMode);
+
+  void zoom_in (const QWidget *ID);
+  void zoom_out (const QWidget *ID);
+  void zoom_normal (const QWidget *ID);
+
   void find (const QWidget *ID);
   void goto_line (const QWidget *ID, int line = -1);
+  void move_match_brace (const QWidget *ID, bool select);
+  void show_auto_completion (const QWidget *ID);
 
   void insert_debugger_pointer (const QWidget *ID, int line = -1);
   void delete_debugger_pointer (const QWidget *ID, int line = -1);
@@ -108,19 +125,20 @@
 
   void file_has_changed (const QString& fileName);
 
-  void execute_command_in_terminal (const QString& command);
+  void handle_context_menu_edit (const QString&);
 
 signals:
 
   void file_name_changed (const QString& fileName, const QString& toolTip);
-  void editor_state_changed (bool copy_available, const QString& fileName);
+  void editor_state_changed (bool copy_available, bool is_octave_file);
   void tab_remove_request ();
   void add_filename_to_list (const QString&, QWidget *);
   void mru_add_file (const QString& file_name);
   void editor_check_conflict_save (const QString& saveFileName,
                                    bool remove_on_success);
   void run_file_signal (const QFileInfo& info);
-  void execute_command_in_terminal_signal (const QString&);
+  void set_global_edit_shortcuts_signal (bool);
+  void request_open_file (const QString&);
 
 protected:
 
@@ -145,6 +163,8 @@
   void handle_save_file_as_answer (const QString& fileName);
   void handle_save_file_as_answer_close (const QString& fileName);
   void handle_save_file_as_answer_cancel ();
+  void handle_save_as_filter_selected (const QString& filter);
+  void handle_combo_eol_current_index (int index);
 
   // When apis preparation has finished and is ready to save
   void save_apis_info ();
@@ -176,21 +196,26 @@
   bool valid_file_name (const QString& file=QString ());
   void save_file (const QString& saveFileName, bool remove_on_success = false);
   void save_file_as (bool remove_on_success = false);
+  bool check_valid_identifier (QString file_name);
 
   void update_lexer ();
   void request_add_breakpoint (int line);
   void request_remove_breakpoint (int line);
 
-  void show_dialog (QDialog *dlg);
+  void show_dialog (QDialog *dlg, bool modal);
   int check_file_modified ();
   void do_comment_selected_text (bool comment);
   QString comment_string (const QString&);
+  void do_indent_selected_text (bool indent);
 
   void add_breakpoint_callback (const bp_info& info);
   void remove_breakpoint_callback (const bp_info& info);
   void remove_all_breakpoints_callback (const bp_info& info);
   void center_current_line ();
 
+  void add_octave_apis (octave_value_list key_ovl);
+  QString get_function_name ();
+
   QsciScintilla::EolMode detect_eol_mode ();
   void update_eol_indicator ();
 
@@ -201,12 +226,16 @@
   QLabel *_col_indicator;
   QLabel *_eol_indicator;
 
+  QsciScintilla::EolMode _save_as_desired_eol;
+
   QString _file_name;
   QString _file_name_short;
+  QString _ced;
 
   bool _long_title;
   bool _copy_available;
-  bool _app_closing;
+  bool _is_octave_file;
+  bool _always_reload_changed_files;
 
   QFileSystemWatcher _file_system_watcher;
 
@@ -216,6 +245,8 @@
 
   QsciAPIs *_lexer_apis;
   QString _prep_apis_file;
+
+  static bool _cancelled;
 };
 
 #endif
--- a/libgui/src/m-editor/file-editor.cc
+++ b/libgui/src/m-editor/file-editor.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -28,6 +28,8 @@
 
 #include "file-editor.h"
 #include "resource-manager.h"
+#include "shortcut-manager.h"
+
 #include <QVBoxLayout>
 #include <QApplication>
 #include <QFile>
@@ -36,8 +38,10 @@
 #include <QMessageBox>
 #include <QStyle>
 #include <QTextStream>
+#include <QTabBar>
 #include <QProcess>
 #include <QInputDialog>
+#include <Qsci/qscicommandset.h>
 
 #include "octave-link.h"
 #include "utils.h"
@@ -53,10 +57,20 @@
   construct ();
 
   setVisible (false);
+
+  setAcceptDrops(true);
 }
 
 file_editor::~file_editor (void)
 {
+  if (_mru_file_menu)
+    delete _mru_file_menu;
+}
+
+bool
+file_editor::check_closing (void)
+{
+  // Save open files for restoring in next session; this only is possible
   QSettings *settings = resource_manager::get_settings ();
 
   // Have all file editor tabs signal what their file names are.
@@ -69,43 +83,48 @@
        p != editor_tab_map.end (); p++)
     {
       QString file_name = p->first;
-      if (!file_name.isEmpty () && file_name.at (file_name.size () - 1) != '/')
+      if (!file_name.isEmpty ())
         fetFileNames.append (p->first);  // do not append unnamed files
     }
 
   settings->setValue ("editor/savedSessionTabs", fetFileNames);
   settings->sync ();
 
-  for (int index = _tab_widget->count ()-1; index >= 0; index--)
+  // Save all tabs with confirmation.
+  file_editor_tab::reset_cancel ();
+  emit fetab_check_modified_file ();
+
+  // Close all tabs if there was no cancellation.
+  if (file_editor_tab::was_cancelled ())
+    return false;
+
+  for (int i = 0; i < _tab_widget->count (); i++)
     {
-      // true: app closing
-      emit fetab_close_request (_tab_widget->widget (index), true);
+      delete _tab_widget->widget (i);
+      _tab_widget->removeTab (i);
     }
 
-  if (_mru_file_menu)
-    delete _mru_file_menu;
+  return true;
 }
 
 void
 file_editor::focus (void)
 {
-  set_focus ();
-}
+  octave_dock_widget::focus ();
 
-// set focus to editor and its current tab
-void
-file_editor::set_focus (void)
-{
-  if (!isVisible ())
-    setVisible (true);
-  setFocus ();
-  activateWindow ();
-  raise ();
+  // set focus to current tab
   QWidget *fileEditorTab = _tab_widget->currentWidget ();
   if (fileEditorTab)
     emit fetab_set_focus (fileEditorTab);
 }
 
+void
+file_editor::update_octave_directory (const QString& dir)
+{
+  ced = dir;
+  emit fetab_set_directory (ced);  // for save dialog
+}
+
 QMenu *
 file_editor::debug_menu (void)
 {
@@ -122,12 +141,14 @@
 file_editor::handle_enter_debug_mode (void)
 {
   _run_action->setEnabled (false);
+  _run_action->setShortcut (QKeySequence ());
 }
 
 void
 file_editor::handle_exit_debug_mode (void)
 {
   _run_action->setEnabled (true);
+  shortcut_manager::set_shortcut (_run_action, "editor_run:run_file");
 }
 
 void
@@ -147,7 +168,7 @@
     {
       add_file_editor_tab (fileEditorTab, "");  // new tab with empty title
       fileEditorTab->new_file (commands);       // title is updated here
-      set_focus ();                             // focus editor and new tab
+      focus ();                                 // focus editor and new tab
     }
 }
 
@@ -211,10 +232,11 @@
 
   fileDialog->setAcceptMode (QFileDialog::AcceptOpen);
   fileDialog->setViewMode (QFileDialog::Detail);
+  fileDialog->setFileMode (QFileDialog::ExistingFiles);
   fileDialog->setDirectory (ced);
 
-  connect (fileDialog, SIGNAL (fileSelected (const QString&)),
-           this, SLOT (request_open_file (const QString&)));
+  connect (fileDialog, SIGNAL (filesSelected (const QStringList&)),
+           this, SLOT (request_open_files (const QStringList&)));
 
   fileDialog->setWindowModality (Qt::NonModal);
   fileDialog->setAttribute (Qt::WA_DeleteOnClose);
@@ -248,13 +270,30 @@
   // Check if the user wants to use a custom file editor.
   QSettings *settings = resource_manager::get_settings ();
 
-  if (settings->value ("useCustomFileEditor").toBool ())
+  if (settings->value ("useCustomFileEditor",false).toBool ())
     {
+      if (line > -1)  // check for a specific line (debugging)
+        return true;  // yes: do ont open a file in external editor
+
       QString editor = settings->value ("customFileEditor").toString ();
       editor.replace ("%f", file_name);
       editor.replace ("%l", QString::number (line));
 
-      QProcess::startDetached (editor);
+      bool started_ok = QProcess::startDetached (editor);
+
+      if (started_ok != true)
+        {
+          QMessageBox *msgBox
+            = new QMessageBox (QMessageBox::Critical,
+                               tr ("Octave Editor"),
+                               tr ("Could not start custom file editor\n%1").
+                               arg (editor),
+                               QMessageBox::Ok, this);
+
+           msgBox->setWindowModality (Qt::NonModal);
+           msgBox->setAttribute (Qt::WA_DeleteOnClose);
+           msgBox->show ();
+        }
 
       if (line < 0 && ! file_name.isEmpty ())
         handle_mru_add_file (QFileInfo (file_name).canonicalFilePath ());
@@ -283,6 +322,13 @@
 }
 
 void
+file_editor::request_open_files (const QStringList& open_file_names)
+{
+  for (int i = 0; i < open_file_names.count (); i++)
+    request_open_file (open_file_names.at (i));
+}
+
+void
 file_editor::request_open_file (const QString& openFileName, int line,
                                 bool debug_pointer,
                                 bool breakpoint_marker, bool insert)
@@ -323,7 +369,7 @@
           if (! ((breakpoint_marker || debug_pointer) && is_editor_console_tabbed ()))
             {
               emit fetab_set_focus (tab);
-              set_focus ();
+              focus ();
             }
         }
       else
@@ -375,28 +421,32 @@
                     }
                   else
                     {
-                      // File does not exist, should it be crated?
+                      // File does not exist, should it be created?
+                      bool create_file = true;
                       QMessageBox *msgBox;
-                      int answer;
                       QSettings *settings = resource_manager::get_settings ();
-                      if (settings->value ("editor/create_new_file", false).toBool ())
-                        {
-                          answer = QMessageBox::Yes;
-                        }
-                      else
+
+                      if (!settings->value ("editor/create_new_file", false).toBool ())
                         {
                           msgBox = new QMessageBox (QMessageBox::Question,
                                                     tr ("Octave Editor"),
                                                     tr ("File\n%1\ndoes not exist. "
                                                         "Do you want to create it?").arg (openFileName),
-                                                    QMessageBox::Yes
-                                                    | QMessageBox::No, 0);
+                                                    QMessageBox::NoButton,0);
+                          QPushButton *create_button =
+                            msgBox->addButton (tr ("Create"), QMessageBox::YesRole);
+                          msgBox->addButton (tr ("Cancel"), QMessageBox::RejectRole);
+                          msgBox->setDefaultButton (create_button);
+                          msgBox->exec ();
 
-                          msgBox->setAttribute (Qt::WA_DeleteOnClose);
-                          answer = msgBox->exec ();
+                          QAbstractButton *clicked_button = msgBox->clickedButton ();
+                          if (clicked_button != create_button)
+                            create_file = false;
+
+                          delete msgBox;
                         }
 
-                      if (answer == QMessageBox::Yes)
+                      if (create_file)
                         {
                           // create the file and call the editor again
                           QFile file (openFileName);
@@ -426,7 +476,7 @@
           if (! ((breakpoint_marker || debug_pointer) && is_editor_console_tabbed ()))
             {
               // really show editor and the current editor tab
-              set_focus ();
+              focus ();
               emit file_loaded_signal ();
             }
         }
@@ -556,33 +606,45 @@
 }
 
 void
-file_editor::request_undo (void)
+file_editor::request_undo (bool)
 {
-  emit fetab_undo (_tab_widget->currentWidget ());
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_UNDO);
 }
 
 void
-file_editor::request_redo (void)
+file_editor::request_redo (bool)
 {
-  emit fetab_redo (_tab_widget->currentWidget ());
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_REDO);
 }
 
 void
-file_editor::request_copy (void)
+file_editor::request_copy (bool)
 {
-  emit fetab_copy (_tab_widget->currentWidget ());
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_COPY);
 }
 
 void
-file_editor::request_cut (void)
+file_editor::request_cut (bool)
 {
-  emit fetab_cut (_tab_widget->currentWidget ());
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_CUT);
 }
 
 void
-file_editor::request_paste (void)
+file_editor::request_paste (bool)
 {
-  emit fetab_paste (_tab_widget->currentWidget ());
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_PASTE);
+}
+
+void
+file_editor::request_selectall (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_SELECTALL);
 }
 
 void
@@ -603,26 +665,26 @@
 }
 
 void
-file_editor::request_save_file (void)
+file_editor::request_save_file (bool)
 {
   emit fetab_save_file (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_save_file_as (void)
+file_editor::request_save_file_as (bool)
 {
   emit fetab_save_file_as (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_print_file (void)
+file_editor::request_print_file (bool)
 {
   emit fetab_print_file (_tab_widget->currentWidget ());
 }
 
 
 void
-file_editor::request_run_file (void)
+file_editor::request_run_file (bool)
 {
   emit fetab_run_file (_tab_widget->currentWidget ());
 }
@@ -634,83 +696,203 @@
 }
 
 void
-file_editor::request_toggle_bookmark (void)
+file_editor::request_toggle_bookmark (bool)
 {
   emit fetab_toggle_bookmark (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_next_bookmark (void)
+file_editor::request_next_bookmark (bool)
 {
   emit fetab_next_bookmark (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_previous_bookmark (void)
+file_editor::request_previous_bookmark (bool)
 {
   emit fetab_previous_bookmark (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_remove_bookmark (void)
+file_editor::request_remove_bookmark (bool)
 {
   emit fetab_remove_bookmark (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_toggle_breakpoint (void)
+file_editor::request_toggle_breakpoint (bool)
 {
   emit fetab_toggle_breakpoint (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_next_breakpoint (void)
+file_editor::request_next_breakpoint (bool)
 {
   emit fetab_next_breakpoint (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_previous_breakpoint (void)
+file_editor::request_previous_breakpoint (bool)
 {
   emit fetab_previous_breakpoint (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_remove_breakpoint (void)
+file_editor::request_remove_breakpoint (bool)
 {
   emit fetab_remove_all_breakpoints (_tab_widget->currentWidget ());
 }
 
+// slots for Edit->Commands actions
 void
-file_editor::request_comment_selected_text (void)
+file_editor::request_delete_start_word (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_DELWORDLEFT);
+}
+void
+file_editor::request_delete_end_word (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_DELWORDRIGHT);
+}
+void
+file_editor::request_delete_start_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_DELLINELEFT);
+}
+void
+file_editor::request_delete_end_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_DELLINERIGHT);
+}
+void
+file_editor::request_delete_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_LINEDELETE);
+}
+void
+file_editor::request_copy_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_LINECOPY);
+}
+void
+file_editor::request_cut_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_LINECUT);
+}
+void
+file_editor::request_duplicate_selection (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_SELECTIONDUPLICATE);
+}
+void
+file_editor::request_transpose_line (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_LINETRANSPOSE);
+}
+void
+file_editor::request_comment_selected_text (bool)
 {
   emit fetab_comment_selected_text (_tab_widget->currentWidget ());
 }
-
 void
-file_editor::request_uncomment_selected_text (void)
+file_editor::request_uncomment_selected_text (bool)
 {
   emit fetab_uncomment_selected_text (_tab_widget->currentWidget ());
 }
 
+// slots for Edit->Format actions
 void
-file_editor::request_find (void)
+file_editor::request_upper_case (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_UPPERCASE);
+}
+void
+file_editor::request_lower_case (bool)
+{
+  emit fetab_scintilla_command (_tab_widget->currentWidget (),
+                                QsciScintillaBase::SCI_LOWERCASE);
+}
+void
+file_editor::request_indent_selected_text (bool)
+{
+  emit fetab_indent_selected_text (_tab_widget->currentWidget ());
+}
+
+void
+file_editor::request_unindent_selected_text (bool)
+{
+  emit fetab_unindent_selected_text (_tab_widget->currentWidget ());
+}
+
+void
+file_editor::request_conv_eol_windows (bool)
+{
+  emit fetab_convert_eol (_tab_widget->currentWidget (),
+                          QsciScintilla::EolWindows);
+}
+void
+file_editor::request_conv_eol_unix (bool)
+{
+  emit fetab_convert_eol (_tab_widget->currentWidget (),
+                          QsciScintilla::EolUnix);
+}
+void
+file_editor::request_conv_eol_mac (bool)
+{
+  emit fetab_convert_eol (_tab_widget->currentWidget (),
+                          QsciScintilla::EolMac);
+}
+
+
+void
+file_editor::request_find (bool)
 {
   emit fetab_find (_tab_widget->currentWidget ());
 }
 
 void
-file_editor::request_goto_line (void)
+file_editor::request_goto_line (bool)
 {
   emit fetab_goto_line (_tab_widget->currentWidget ());
 }
 
+void
+file_editor::request_move_match_brace (bool)
+{
+  emit fetab_move_match_brace (_tab_widget->currentWidget (), false);
+}
+
+void
+file_editor::request_sel_match_brace (bool)
+{
+  emit fetab_move_match_brace (_tab_widget->currentWidget (), true);
+}
+
+void
+file_editor::request_completion (bool)
+{
+  emit fetab_completion (_tab_widget->currentWidget ());
+}
 
 void
 file_editor::handle_mru_add_file (const QString& file_name)
 {
+  if (_mru_files.count () && _mru_files.at (0) == file_name)
+    return;  // the first entry is already the actual file name
+
   _mru_files.removeAll (file_name);
   _mru_files.prepend (file_name);
+
   mru_menu_update ();
 }
 
@@ -766,26 +948,39 @@
 void
 file_editor::request_close_file (bool)
 {
-  emit fetab_close_request (_tab_widget->currentWidget ());
+  file_editor_tab *editor_tab =
+      static_cast<file_editor_tab *> (_tab_widget->currentWidget ());
+  editor_tab->conditional_close ();
 }
 
 void
 file_editor::request_close_all_files (bool)
 {
+  file_editor_tab *editor_tab;
+
   // loop over all tabs starting from last one otherwise deletion changes index
   for (int index = _tab_widget->count ()-1; index >= 0; index--)
-    emit fetab_close_request (_tab_widget->widget (index));
+    {
+      editor_tab = static_cast<file_editor_tab *> (_tab_widget->widget (index));
+      editor_tab->conditional_close ();
+    }
 }
 
 void
 file_editor::request_close_other_files (bool)
 {
+  file_editor_tab *editor_tab;
   QWidget *tabID = _tab_widget->currentWidget ();
+
   // loop over all tabs starting from last one otherwise deletion changes index
   for (int index = _tab_widget->count ()-1; index >= 0; index--)
     {
       if (tabID != _tab_widget->widget (index))
-        emit fetab_close_request (_tab_widget->widget (index));
+        {
+          editor_tab =
+              static_cast<file_editor_tab *> (_tab_widget->widget (index));
+          editor_tab->conditional_close ();
+        }
     }
 }
 
@@ -793,12 +988,9 @@
 void
 file_editor::handle_tab_close_request (int index)
 {
-  // Signal to the tabs a request to close whomever matches the identifying
-  // tag (i.e., unique widget pointer).  The reason for this indirection is
-  // that it will enable a file editor widget to toss up a non-static
-  // dialog box and later signal that it wants to be removed.
-  QWidget *tabID = _tab_widget->widget (index);
-  emit fetab_close_request (tabID);
+  file_editor_tab *editor_tab =
+       static_cast<file_editor_tab *> (_tab_widget->widget (index));
+  editor_tab->conditional_close ();
 }
 
 void
@@ -812,6 +1004,8 @@
           if (_tab_widget->widget (i) == fileEditorTab)
             {
               _tab_widget->removeTab (i);
+              // Deleting sender is dodgy, but works because the signal
+              // is the last item in the sender's routines.
               delete fileEditorTab;
               break;
             }
@@ -828,15 +1022,98 @@
   editor_tab_map[fileName] = ID;
 }
 
+// context menu of edit area
 void
 file_editor::active_tab_changed (int index)
 {
   emit fetab_change_request (_tab_widget->widget (index));
 }
 
+void file_editor::create_context_menu (QMenu *menu)
+{
+  // remove all standard actions from scintilla
+  QList<QAction *> all_actions = menu->actions ();
+  QAction* a;
+
+  foreach (a, all_actions)
+    menu->removeAction (a);
+
+  // add editor's actions with icons and customized shortcuts
+  menu->addAction (_undo_action);
+  menu->addAction (_redo_action);
+  menu->addSeparator ();
+  menu->addAction (_cut_action);
+  menu->addAction (_copy_action);
+  menu->addAction (_paste_action);
+  menu->addSeparator ();
+  menu->addAction (_selectall_action);
+  menu->addSeparator ();
+  menu->addAction (_run_selection_action);
+}
+
+void
+file_editor::toggle_preference (const QString& preference, bool def)
+{
+  QSettings *settings = resource_manager::get_settings ();
+  bool old = settings->value (preference,def).toBool ();
+  settings->setValue (preference,!old);
+  notice_settings (settings);
+}
+
+void
+file_editor::show_line_numbers (bool)
+{
+  toggle_preference ("editor/showLineNumbers",true);
+}
+void
+file_editor::show_white_space (bool)
+{
+  toggle_preference ("editor/show_white_space",false);
+}
+void
+file_editor::show_eol_chars (bool)
+{
+  toggle_preference ("editor/show_eol_chars",false);
+}
+void
+file_editor::show_indent_guides (bool)
+{
+  toggle_preference ("editor/show_indent_guides",false);
+}
+void
+file_editor::show_long_line (bool)
+{
+  toggle_preference ("editor/long_line_marker",true);
+}
+
+void
+file_editor::zoom_in (bool)
+{
+  emit fetab_zoom_in (_tab_widget->currentWidget ());
+}
+
+void
+file_editor::zoom_out (bool)
+{
+  emit fetab_zoom_out (_tab_widget->currentWidget ());
+}
+
+void
+file_editor::zoom_normal (bool)
+{
+  emit fetab_zoom_normal (_tab_widget->currentWidget ());
+}
+
+void
+file_editor::edit_status_update (bool undo, bool redo)
+{
+  _undo_action->setEnabled (undo);
+  _redo_action->setEnabled (redo);
+}
+
 void
 file_editor::handle_editor_state_changed (bool copy_available,
-                                          const QString& file_name)
+                                          bool is_octave_file)
 {
   // In case there is some scenario where traffic could be coming from
   // all the file editor tabs, just process info from the current active tab.
@@ -844,18 +1121,8 @@
     {
       _copy_action->setEnabled (copy_available);
       _cut_action->setEnabled (copy_available);
-      _context_run_action->setEnabled (copy_available);
-
-      if (!file_name.isEmpty ())
-        {
-          ced = QDir::cleanPath (file_name);
-          int lastslash = ced.lastIndexOf ('/');
-
-          // Test against > 0 because if somehow the directory is "/" the
-          // slash should be retained.  Otherwise, last slash is removed.
-          if (lastslash > 0 && lastslash != ced.count ())
-            ced = ced.left (lastslash);
-        }
+      _run_selection_action->setEnabled (copy_available);
+      _run_action->setEnabled (is_octave_file);
 
       setFocusProxy (_tab_widget->currentWidget ());
     }
@@ -864,8 +1131,49 @@
 void
 file_editor::notice_settings (const QSettings *settings)
 {
-  int icon_size = settings->value ("toolbar_icon_size", 16).toInt ();
-  _tool_bar->setIconSize (QSize (icon_size, icon_size));
+  int icon_size_settings = settings->value ("toolbar_icon_size",0).toInt ();
+  QStyle *st = style ();
+  int icon_size = st->pixelMetric (QStyle::PM_ToolBarIconSize);
+
+  if (icon_size_settings == 1)
+    icon_size = st->pixelMetric (QStyle::PM_LargeIconSize);
+  else if (icon_size_settings == -1)
+    icon_size = st->pixelMetric (QStyle::PM_SmallIconSize);
+
+  _tool_bar->setIconSize (QSize (icon_size,icon_size));
+
+  int tab_width_min = settings->value ("editor/notebook_tab_width_min", 160)
+                                      .toInt ();
+  int tab_width_max = settings->value ("editor/notebook_tab_width_max", 300)
+                                      .toInt ();
+
+  if (settings->value ("editor/longWindowTitle", false).toBool ())
+    {
+      QString style_sheet = QString ("QTabBar::tab "
+                                     "{min-width: %1px; max-width: %2px;}")
+                             .arg (tab_width_min).arg (tab_width_max);
+      _tab_widget->setElideMode (Qt::ElideLeft);
+      _tab_widget->setStyleSheet (style_sheet);
+    }
+  else
+    _tab_widget->setElideMode (Qt::ElideNone);
+
+  _tab_widget->setUsesScrollButtons (true);
+
+  bool show_it;
+  show_it = settings->value ("editor/showLineNumbers",true).toBool ();
+  _show_linenum_action->setChecked (show_it);
+  show_it = settings->value ("editor/show_white_space",false).toBool ();
+  _show_whitespace_action->setChecked (show_it);
+  show_it = settings->value ("editor/show_eol_chars",false).toBool ();
+  _show_eol_action->setChecked (show_it);
+  show_it = settings->value ("editor/show_indent_guides",false).toBool ();
+  _show_indguide_action->setChecked (show_it);
+  show_it = settings->value ("editor/long_line_marker",true).toBool ();
+  _show_longline_action->setChecked (show_it);
+
+  set_shortcuts ();
+
   // Relay signal to file editor tabs.
   emit fetab_settings_changed (settings);
 }
@@ -883,6 +1191,59 @@
 }
 
 void
+file_editor::insert_new_open_actions (QAction *new_action,
+                                      QAction *new_fcn_action,
+                                      QAction *open_action)
+{
+  _fileMenu->insertAction (_mru_file_menu->menuAction (), open_action);
+  _fileMenu->insertAction (open_action, new_fcn_action);
+  _fileMenu->insertAction (new_fcn_action, new_action);
+  _tool_bar->insertAction (_save_action, open_action);
+  _tool_bar->insertAction (open_action, new_action);
+}
+
+QAction*
+file_editor::add_action (QMenu *menu, const QIcon &icon, const QString &text,
+                         const char *member)
+{
+  QAction *a = menu->addAction (icon, text, this, member);
+  addAction (a);  // important for shortcut context
+  a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
+  return a;
+}
+
+void
+file_editor::enable_menu_shortcuts (bool enable)
+{
+  QHash<QMenu*, QStringList>::const_iterator i = _hash_menu_text.constBegin();
+
+ while (i != _hash_menu_text.constEnd())
+   {
+     i.key ()->setTitle (i.value ().at (! enable));
+     ++i;
+   }
+}
+
+QMenu*
+file_editor::m_add_menu (QMenuBar *p, QString name)
+{
+  QMenu *menu = p->addMenu (name);
+
+  QString base_name = name;  // get a copy
+  // replace intended '&' ("&&") by a temp. string
+  base_name.replace ("&&","___octave_amp_replacement___");
+  // remove single '&' (shortcut)
+  base_name.remove ("&");
+  // restore intended '&'
+  base_name.replace ("___octave_amp_replacement___","&&");
+
+  // remember names with and without shortcut
+  _hash_menu_text[menu] = QStringList () << name << base_name;
+
+  return menu;
+}
+
+void
 file_editor::construct (void)
 {
   QWidget *editor_widget = new QWidget (this);
@@ -897,79 +1258,13 @@
   _tool_bar->setMovable (true);
   _tab_widget = new QTabWidget (editor_widget);
   _tab_widget->setTabsClosable (true);
-
-  QAction *new_action = new QAction (QIcon (":/actions/icons/filenew.png"),
-                                     tr ("&New File"), _tool_bar);
-
-  QAction *open_action = new QAction (QIcon (":/actions/icons/folder_documents.png"),
-                                      tr ("&Open File..."), _tool_bar);
-
-  _save_action = new QAction (QIcon (":/actions/icons/filesave.png"),
-                              tr ("&Save File"), _tool_bar);
-
-  _save_as_action = new QAction (QIcon (":/actions/icons/filesaveas.png"),
-                                 tr ("Save File &As..."), _tool_bar);
-
-  _print_action = new QAction ( QIcon (":/actions/icons/fileprint.png"),
-                                tr ("Print..."), _tool_bar);
-
-  _undo_action = new QAction (QIcon (":/actions/icons/undo.png"),
-                              tr ("&Undo"), _tool_bar);
-
-  _redo_action = new QAction (QIcon (":/actions/icons/redo.png"),
-                              tr ("&Redo"), _tool_bar);
-
-  _copy_action = new QAction (QIcon (":/actions/icons/editcopy.png"),
-                              tr ("&Copy"), _tool_bar);
-  _copy_action->setEnabled (false);
-
-  _cut_action = new QAction (QIcon (":/actions/icons/editcut.png"),
-                             tr ("Cu&t"), _tool_bar);
-  _cut_action->setEnabled (false);
-
-  _paste_action
-    = new QAction (QIcon (":/actions/icons/editpaste.png"),
-                   tr ("Paste"), _tool_bar);
+#ifdef HAVE_QTABWIDGET_SETMOVABLE
+  _tab_widget->setMovable (true);
+#endif
 
-  _next_bookmark_action = new QAction (tr ("&Next Bookmark"), _tool_bar);
-
-  _previous_bookmark_action = new QAction (tr ("Pre&vious Bookmark"),
-                                           _tool_bar);
-
-  _toggle_bookmark_action = new QAction (tr ("Toggle &Bookmark"), _tool_bar);
-
-  _remove_bookmark_action
-    = new QAction (tr ("&Remove All Bookmarks"), _tool_bar);
-
-  QAction *next_breakpoint_action
-    = new QAction (QIcon (":/actions/icons/bp_next.png"),
-                   tr ("&Next Breakpoint"), _tool_bar);
-  QAction *previous_breakpoint_action
-    = new QAction (QIcon (":/actions/icons/bp_prev.png"),
-                   tr ("Pre&vious Breakpoint"), _tool_bar);
-  QAction *toggle_breakpoint_action
-    = new QAction (QIcon (":/actions/icons/bp_toggle.png"),
-                   tr ("Toggle &Breakpoint"), _tool_bar);
-  QAction *remove_all_breakpoints_action
-    = new QAction (QIcon (":/actions/icons/bp_rm_all.png"),
-                   tr ("&Remove All Breakpoints"), _tool_bar);
-
-  _comment_selection_action
-    = new QAction (tr ("&Comment"), _tool_bar);
-  _uncomment_selection_action
-    = new QAction (tr ("&Uncomment"), _tool_bar);
-
-  _find_action = new QAction (QIcon (":/actions/icons/find.png"),
-                              tr ("&Find and Replace..."), _tool_bar);
-
-  _run_action = new QAction (QIcon (":/actions/icons/artsbuilderexecute.png"),
-                             tr ("Save File and Run"), _tool_bar);
-
-  _goto_line_action = new QAction (tr ("Go &to Line..."), _tool_bar);
 
   // the mru-list and an empty array of actions
   QSettings *settings = resource_manager::get_settings ();
-  // FIXME: what should happen if settings is 0?
   _mru_files = settings->value ("editor/mru_file_list").toStringList ();
   for (int i = 0; i < MaxMRUFiles; ++i)
     {
@@ -977,27 +1272,253 @@
       _mru_file_actions[i]->setVisible (false);
     }
 
-  // some actions are disabled from the beginning
+  // menu bar
+
+  // file menu
+
+  _fileMenu = m_add_menu (_menu_bar, tr ("&File"));
+
+  // new and open menus are inserted later by the main window
+  _mru_file_menu = new QMenu (tr ("&Recent Editor Files"), _fileMenu);
+  for (int i = 0; i < MaxMRUFiles; ++i)
+    _mru_file_menu->addAction (_mru_file_actions[i]);
+  _fileMenu->addMenu (_mru_file_menu);
+
+  _fileMenu->addSeparator ();
+
+  _edit_function_action = add_action (_fileMenu, QIcon (),
+          tr ("&Edit Function"), SLOT (request_context_edit (bool)));
+
+  _fileMenu->addSeparator ();
+
+  _save_action = add_action (_fileMenu, resource_manager::icon ("document-save"),
+          tr ("&Save File"), SLOT (request_save_file (bool)));
+  _save_as_action = add_action (_fileMenu, resource_manager::icon ("document-save-as"),
+          tr ("Save File &As..."), SLOT (request_save_file_as (bool)));
+
+  _fileMenu->addSeparator ();
+
+  _close_action = add_action (_fileMenu, resource_manager::icon ("window-close",false),
+          tr ("&Close"), SLOT (request_close_file (bool)));
+  _close_all_action = add_action (_fileMenu, resource_manager::icon ("window-close",false),
+          tr ("Close All"), SLOT (request_close_all_files (bool)));
+  _close_others_action = add_action (_fileMenu, resource_manager::icon ("window-close",false),
+          tr ("Close Other Files"), SLOT (request_close_other_files (bool)));
+
+  _fileMenu->addSeparator ();
+
+  _print_action = add_action (_fileMenu, resource_manager::icon ("document-print"),
+          tr ("Print..."), SLOT (request_print_file (bool)));
+
+  // edit menu
+
+  QMenu *editMenu = m_add_menu (_menu_bar, tr ("&Edit"));
+
+  _undo_action = add_action (editMenu, resource_manager::icon ("edit-undo"),
+          tr ("&Undo"), SLOT (request_undo (bool)));
+  _undo_action->setEnabled (false);
+  _redo_action = add_action (editMenu, resource_manager::icon ("edit-redo"),
+          tr ("&Redo"), SLOT (request_redo (bool)));
+  _redo_action->setEnabled (false);
+
+  editMenu->addSeparator ();
+
+  _copy_action = add_action (editMenu, resource_manager::icon ("edit-copy"),
+          tr ("&Copy"), SLOT (request_copy (bool)));
   _copy_action->setEnabled (false);
+  _cut_action = add_action (editMenu, resource_manager::icon ("edit-cut"),
+          tr ("Cu&t"), SLOT (request_cut (bool)));
   _cut_action->setEnabled (false);
+  _paste_action = add_action (editMenu, resource_manager::icon ("edit-paste"),
+          tr ("Paste"), SLOT (request_paste (bool)));
 
-  _run_action->setShortcutContext (Qt::WindowShortcut);
-  _save_action->setShortcutContext (Qt::WindowShortcut);
-  _save_as_action->setShortcutContext (Qt::WindowShortcut);
+  editMenu->addSeparator ();
+
+  _selectall_action = add_action (editMenu, QIcon (), tr ("Select All"),
+          SLOT (request_selectall (bool)));
+
+  editMenu->addSeparator ();
+
+  _find_action = add_action (editMenu, resource_manager::icon ("edit-find-replace"),
+          tr ("&Find and Replace..."), SLOT (request_find (bool)));
+
+  editMenu->addSeparator ();
+
+  _edit_cmd_menu = editMenu->addMenu (tr ("&Commands"));
+
+  _delete_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Delete Line"), SLOT (request_delete_line (bool)));
+  _copy_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Copy Line"), SLOT (request_copy_line (bool)));
+  _cut_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Cut Line"), SLOT (request_cut_line (bool)));
+
+  _edit_cmd_menu->addSeparator ();
+
+  _delete_start_word_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Delete to Start of Word"), SLOT (request_delete_start_word (bool)));
+  _delete_end_word_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Delete to End of Word"), SLOT (request_delete_end_word (bool)));
+  _delete_start_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Delete to Start of Line"), SLOT (request_delete_start_line (bool)));
+  _delete_end_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Delete to End of Line"), SLOT (request_delete_end_line (bool)));
+
+  _edit_cmd_menu->addSeparator ();
+
+  _duplicate_selection_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Duplicate Selection/Line"), SLOT (request_duplicate_selection (bool)));
+  _transpose_line_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("Transpose Line"), SLOT (request_transpose_line (bool)));
+
+  _edit_cmd_menu->addSeparator ();
+
+  _completion_action = add_action (_edit_cmd_menu, QIcon (),
+          tr ("&Show Completion List"), SLOT (request_completion (bool)));
+
+  _edit_fmt_menu = editMenu->addMenu (tr ("&Format"));
+
+  _upper_case_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Uppercase Selection"), SLOT (request_upper_case (bool)));
+  _lower_case_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Lowercase Selection"), SLOT (request_lower_case (bool)));
+
+  _edit_fmt_menu->addSeparator ();
+
+  _comment_selection_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Comment"), SLOT (request_comment_selected_text (bool)));
+  _uncomment_selection_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Uncomment"), SLOT (request_uncomment_selected_text (bool)));
+
+  _edit_fmt_menu->addSeparator ();
 
-  _print_action->setShortcutContext (Qt::WindowShortcut);
+  _indent_selection_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Indent"), SLOT (request_indent_selected_text (bool)));
+  _unindent_selection_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("&Unindent"), SLOT (request_unindent_selected_text (bool)));
+
+  _edit_fmt_menu->addSeparator ();
+
+  _conv_eol_windows_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("Convert Line Endings to &Windows (CRLF)"),
+          SLOT (request_conv_eol_windows (bool)));
+  _conv_eol_unix_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("Convert Line Endings to &Unix (LF)"),
+          SLOT (request_conv_eol_unix (bool)));
+  _conv_eol_mac_action = add_action (_edit_fmt_menu, QIcon (),
+          tr ("Convert Line Endings to &Mac (CR)"),
+          SLOT (request_conv_eol_mac (bool)));
+
+  _edit_nav_menu = editMenu->addMenu (tr ("Navi&gation"));
+
+  _goto_line_action = add_action (_edit_nav_menu, QIcon (),
+          tr ("Go &to Line..."), SLOT (request_goto_line (bool)));
+
+  _edit_cmd_menu->addSeparator ();
+
+  _move_to_matching_brace  = add_action (_edit_nav_menu, QIcon (),
+          tr ("Move to Matching Brace"), SLOT (request_move_match_brace (bool)));
+  _sel_to_matching_brace  = add_action (_edit_nav_menu, QIcon (),
+          tr ("Select to Matching Brace"), SLOT (request_sel_match_brace (bool)));
+
+  _edit_nav_menu->addSeparator ();
+
+  _previous_bookmark_action =  add_action (_edit_nav_menu, QIcon (),
+          tr ("Pre&vious Bookmark"), SLOT (request_previous_bookmark (bool)));
+  _next_bookmark_action =  add_action (_edit_nav_menu, QIcon (),
+          tr ("&Next Bookmark"), SLOT (request_next_bookmark (bool)));
+  _toggle_bookmark_action =  add_action (_edit_nav_menu, QIcon (),
+          tr ("Toggle &Bookmark"), SLOT (request_toggle_bookmark (bool)));
+  _remove_bookmark_action = add_action (_edit_nav_menu, QIcon (),
+          tr ("&Remove All Bookmarks"), SLOT (request_remove_bookmark (bool)));
+
+  editMenu->addSeparator ();
+
+  _preferences_action = add_action (editMenu, resource_manager::icon ("preferences-system"),
+          tr ("&Preferences..."), SLOT (request_preferences (bool)));
+  _styles_preferences_action = add_action (editMenu,  resource_manager::icon ("preferences-system"),
+          tr ("&Styles Preferences..."), SLOT (request_styles_preferences (bool)));
+
+  // view menu
+
+  QMenu *view_menu = m_add_menu (_menu_bar, tr ("&View"));
+
+  _view_editor_menu = view_menu->addMenu (tr ("&Editor"));
+
+  _show_linenum_action = add_action (_view_editor_menu, QIcon (),
+          tr ("Show &Line Numbers"), SLOT (show_line_numbers (bool)));
+  _show_linenum_action->setCheckable (true);
+
+  _show_whitespace_action = add_action (_view_editor_menu, QIcon (),
+          tr ("Show &Whitespace Characters"), SLOT (show_white_space (bool)));
+  _show_whitespace_action->setCheckable (true);
 
-  _next_bookmark_action->setShortcutContext (Qt::WindowShortcut);
-  _previous_bookmark_action->setShortcutContext (Qt::WindowShortcut);
-  _toggle_bookmark_action->setShortcutContext (Qt::WindowShortcut);
-  _comment_selection_action->setShortcutContext (Qt::WindowShortcut);
-  _uncomment_selection_action->setShortcutContext (Qt::WindowShortcut);
-  _find_action->setShortcutContext (Qt::WindowShortcut);
-  _goto_line_action->setShortcutContext (Qt::WindowShortcut);
+  _show_eol_action = add_action (_view_editor_menu, QIcon (),
+          tr ("Show Line &Endings"), SLOT (show_eol_chars (bool)));
+  _show_eol_action->setCheckable (true);
+
+  _show_indguide_action = add_action (_view_editor_menu, QIcon (),
+          tr ("Show &Indentation Guides"), SLOT (show_indent_guides (bool)));
+  _show_indguide_action->setCheckable (true);
+
+  _show_longline_action = add_action (_view_editor_menu, QIcon (),
+          tr ("Show Long Line &Marker"), SLOT (show_long_line (bool)));
+  _show_longline_action->setCheckable (true);
+
+  view_menu->addSeparator ();
+
+  _zoom_in_action = add_action (view_menu, resource_manager::icon ("zoom-in"),
+          tr ("Zoom &In"), SLOT (zoom_in (bool)));
+  _zoom_out_action = add_action (view_menu, resource_manager::icon ("zoom-out"),
+          tr ("Zoom &Out"), SLOT (zoom_out (bool)));
+  _zoom_normal_action = add_action (view_menu,  QIcon (),
+          tr ("&Normal Size"), SLOT (zoom_normal (bool)));
+
+  _menu_bar->addMenu (view_menu);
+
+  // debug menu
+
+  _debug_menu = m_add_menu (_menu_bar, tr ("&Debug"));
+
+  _toggle_breakpoint_action = add_action (_debug_menu,
+          resource_manager::icon ("bp-toggle"), tr ("Toggle &Breakpoint"),
+          SLOT (request_toggle_breakpoint (bool)));
+  _next_breakpoint_action = add_action (_debug_menu,
+          resource_manager::icon ("bp-next"), tr ("&Next Breakpoint"),
+          SLOT (request_next_breakpoint (bool)));
+  _previous_breakpoint_action = add_action (_debug_menu,
+          resource_manager::icon ("bp-prev"), tr ("Pre&vious Breakpoint"),
+          SLOT (request_previous_breakpoint (bool)));
+  _remove_all_breakpoints_action = add_action (_debug_menu,
+          resource_manager::icon ("bp-rm-all"), tr ("&Remove All Breakpoints"),
+          SLOT (request_remove_breakpoint (bool)));
+
+  _debug_menu->addSeparator ();
+
+  // The other debug actions will be added by the main window.
+
+  // run menu
+
+  QMenu *_run_menu = m_add_menu (_menu_bar, tr ("&Run"));
+
+  _run_action = add_action (_run_menu,  resource_manager::icon ("system-run"),
+          tr ("Save File and Run"), SLOT (request_run_file (bool)));
+  _run_selection_action = add_action (_run_menu, QIcon (),
+          tr ("Run &Selection"), SLOT (request_context_run (bool)));
+  _run_selection_action->setEnabled (false);
+
+  // help menu
+
+  QMenu *_help_menu = m_add_menu (_menu_bar, tr ("&Help"));
+
+  _context_help_action = add_action (_help_menu, QIcon (),
+          tr ("&Help on Keyword"), SLOT (request_context_help (bool)));
+  _context_doc_action = add_action (_help_menu, QIcon (),
+          tr ("&Documentation on Keyword"), SLOT (request_context_doc (bool)));
 
   // toolbar
-  _tool_bar->addAction (new_action);
-  _tool_bar->addAction (open_action);
+
+  // new and open actions are inserted later from main window
   _tool_bar->addAction (_save_action);
   _tool_bar->addAction (_save_as_action);
   _tool_bar->addSeparator ();
@@ -1012,111 +1533,10 @@
   _tool_bar->addAction (_find_action);
   _tool_bar->addAction (_run_action);
   _tool_bar->addSeparator ();
-  _tool_bar->addAction (toggle_breakpoint_action);
-  _tool_bar->addAction (next_breakpoint_action);
-  _tool_bar->addAction (previous_breakpoint_action);
-  _tool_bar->addAction (remove_all_breakpoints_action);
-
-  // menu bar
-  QMenu *fileMenu = new QMenu (tr ("&File"), _menu_bar);
-
-  _mru_file_menu = new QMenu (tr ("&Recent Editor Files"), fileMenu);
-  for (int i = 0; i < MaxMRUFiles; ++i)
-    _mru_file_menu->addAction (_mru_file_actions[i]);
-
-  fileMenu->addAction (new_action);
-  fileMenu->addAction (QIcon (), tr ("New &Function..."),
-                      this, SLOT (request_new_function (bool)));
-  fileMenu->addAction (open_action);
-  fileMenu->addMenu (_mru_file_menu);
-  fileMenu->addSeparator ();
-  _context_edit_action =
-    fileMenu->addAction (QIcon (), tr ("&Edit Function"),
-                         this, SLOT (request_context_edit (bool)));
-  fileMenu->addSeparator ();
-  fileMenu->addAction (_save_action);
-  fileMenu->addAction (_save_as_action);
-
-  fileMenu->addSeparator ();
-  _close_action =
-    fileMenu->addAction (QIcon::fromTheme("window-close",
-                                          QIcon (":/actions/icons/fileclose.png")),
-                         tr ("&Close"), this, SLOT (request_close_file (bool)));
-  _close_all_action =
-    fileMenu->addAction (QIcon::fromTheme("window-close",
-                                          QIcon (":/actions/icons/fileclose.png")),
-                         tr ("Close All"),
-                         this, SLOT (request_close_all_files (bool)));
-  _close_others_action =
-    fileMenu->addAction (QIcon::fromTheme("window-close",
-                                          QIcon (":/actions/icons/fileclose.png")),
-                         tr ("Close Other Files"),
-                         this, SLOT (request_close_other_files (bool)));
-
-  fileMenu->addSeparator ();
-  fileMenu->addAction (_print_action);
-
-  _menu_bar->addMenu (fileMenu);
-
-
-  QMenu *editMenu = new QMenu (tr ("&Edit"), _menu_bar);
-  editMenu->addAction (_undo_action);
-  editMenu->addAction (_redo_action);
-  editMenu->addSeparator ();
-  editMenu->addAction (_copy_action);
-  editMenu->addAction (_cut_action);
-  editMenu->addAction (_paste_action);
-  editMenu->addSeparator ();
-  editMenu->addAction (_find_action);
-  editMenu->addSeparator ();
-  editMenu->addAction (_comment_selection_action);
-  editMenu->addAction (_uncomment_selection_action);
-  editMenu->addSeparator ();
-  editMenu->addAction (_toggle_bookmark_action);
-  editMenu->addAction (_next_bookmark_action);
-  editMenu->addAction (_previous_bookmark_action);
-  editMenu->addAction (_remove_bookmark_action);
-  editMenu->addSeparator ();
-  editMenu->addAction (_goto_line_action);
-  editMenu->addSeparator ();
-  _preferences_action =
-    editMenu->addAction (QIcon (":/actions/icons/configure.png"),
-                         tr ("&Preferences..."),
-                         this, SLOT (request_preferences (bool)));
-  _styles_preferences_action =
-    editMenu->addAction (QIcon (":/actions/icons/configure.png"),
-                         tr ("&Styles Preferences..."),
-                         this, SLOT (request_styles_preferences (bool)));
-  _menu_bar->addMenu (editMenu);
-
-  _debug_menu = new QMenu (tr ("&Debug"), _menu_bar);
-  _debug_menu->addAction (toggle_breakpoint_action);
-  _debug_menu->addAction (next_breakpoint_action);
-  _debug_menu->addAction (previous_breakpoint_action);
-  _debug_menu->addAction (remove_all_breakpoints_action);
-  _debug_menu->addSeparator ();
-  // The other debug actions will be added by the main window.
-  _menu_bar->addMenu (_debug_menu);
-
-  QMenu *_run_menu = new QMenu (tr ("&Run"), _menu_bar);
-  _run_menu->addAction (_run_action);
-  _context_run_action =
-    _run_menu->addAction (QIcon (), tr ("Run &Selection"),
-                          this, SLOT (request_context_run (bool)));
-  _context_run_action->setEnabled (false);
-  _menu_bar->addMenu (_run_menu);
-
-  QMenu *_help_menu = new QMenu (tr ("&Help"), _menu_bar);
-  _context_help_action =
-    _help_menu->addAction (QIcon (), tr ("&Help on Keyword"),
-                           this, SLOT (request_context_help (bool)));
-  _context_doc_action =
-    _help_menu->addAction (QIcon (), tr ("&Documentation on Keyword"),
-                           this, SLOT (request_context_doc (bool)));
-  _menu_bar->addMenu (_help_menu);
-
-  // shortcuts
-  set_shortcuts (true);
+  _tool_bar->addAction (_toggle_breakpoint_action);
+  _tool_bar->addAction (_previous_breakpoint_action);
+  _tool_bar->addAction (_next_breakpoint_action);
+  _tool_bar->addAction (_remove_all_breakpoints_action);
 
   // layout
   QVBoxLayout *vbox_layout = new QVBoxLayout ();
@@ -1138,75 +1558,6 @@
   connect (main_win (), SIGNAL (open_file_signal (const QString&)),
            this, SLOT (request_open_file (const QString&)));
 
-  connect (new_action, SIGNAL (triggered ()),
-           this, SLOT (request_new_file ()));
-
-  connect (open_action, SIGNAL (triggered ()),
-           this, SLOT (request_open_file ()));
-
-  connect (_undo_action, SIGNAL (triggered ()),
-           this, SLOT (request_undo ()));
-
-  connect (_redo_action, SIGNAL (triggered ()),
-           this, SLOT (request_redo ()));
-
-  connect (_copy_action, SIGNAL (triggered ()),
-           this, SLOT (request_copy ()));
-
-  connect (_cut_action, SIGNAL (triggered ()),
-           this, SLOT (request_cut ()));
-
-  connect (_paste_action, SIGNAL (triggered ()),
-           this, SLOT (request_paste ()));
-
-  connect (_save_action, SIGNAL (triggered ()),
-           this, SLOT (request_save_file ()));
-
-  connect (_save_as_action, SIGNAL (triggered ()),
-           this, SLOT (request_save_file_as ()));
-
-  connect (_print_action, SIGNAL (triggered ()),
-           this, SLOT (request_print_file ()));
-
-  connect (_run_action, SIGNAL (triggered ()),
-           this, SLOT (request_run_file ()));
-
-  connect (_toggle_bookmark_action, SIGNAL (triggered ()),
-           this, SLOT (request_toggle_bookmark ()));
-
-  connect (_next_bookmark_action, SIGNAL (triggered ()),
-           this, SLOT (request_next_bookmark ()));
-
-  connect (_previous_bookmark_action, SIGNAL (triggered ()),
-           this, SLOT (request_previous_bookmark ()));
-
-  connect (_remove_bookmark_action, SIGNAL (triggered ()),
-           this, SLOT (request_remove_bookmark ()));
-
-  connect (toggle_breakpoint_action, SIGNAL (triggered ()),
-           this, SLOT (request_toggle_breakpoint ()));
-
-  connect (next_breakpoint_action, SIGNAL (triggered ()),
-           this, SLOT (request_next_breakpoint ()));
-
-  connect (previous_breakpoint_action, SIGNAL (triggered ()),
-           this, SLOT (request_previous_breakpoint ()));
-
-  connect (remove_all_breakpoints_action, SIGNAL (triggered ()),
-           this, SLOT (request_remove_breakpoint ()));
-
-  connect (_comment_selection_action, SIGNAL (triggered ()),
-           this, SLOT (request_comment_selected_text ()));
-
-  connect (_uncomment_selection_action, SIGNAL (triggered ()),
-           this, SLOT (request_uncomment_selected_text ()));
-
-  connect (_find_action, SIGNAL (triggered ()),
-           this, SLOT (request_find ()));
-
-  connect (_goto_line_action, SIGNAL (triggered ()),
-           this, SLOT (request_goto_line ()));
-
   connect (_mru_file_menu, SIGNAL (triggered (QAction *)),
            this, SLOT (request_mru_open_file (QAction *)));
 
@@ -1223,7 +1574,7 @@
 
   resize (500, 400);
   setWindowIcon (QIcon (":/actions/icons/logo.png"));
-  set_title ("Editor");
+  set_title (tr ("Editor"));
 
   //restore previous session
   if (settings->value ("editor/restoreSession", true).toBool ())
@@ -1233,7 +1584,11 @@
                            QStringList ()).toStringList ();
 
       for (int n = 0; n < sessionFileNames.count (); ++n)
-        request_open_file (sessionFileNames.at (n));
+        {
+          QFileInfo file = QFileInfo (sessionFileNames.at (n));
+          if (file.exists ())
+            request_open_file (sessionFileNames.at (n));
+        }
     }
 
   check_actions ();
@@ -1244,13 +1599,26 @@
 {
   _tab_widget->addTab (f, fn);
 
+  // signals from the qscintilla edit area
+  connect (f->qsci_edit_area (), SIGNAL (status_update (bool, bool)),
+           this, SLOT (edit_status_update (bool, bool)));
+
+  connect (f->qsci_edit_area (), SIGNAL (show_doc_signal (const QString&)),
+           main_win (), SLOT (handle_show_doc (const QString&)));
+
+  connect (f->qsci_edit_area (), SIGNAL (create_context_menu_signal (QMenu *)),
+           this, SLOT (create_context_menu (QMenu *)));
+
+  connect (f->qsci_edit_area (), SIGNAL (execute_command_in_terminal_signal (const QString&)),
+           main_win (), SLOT (execute_command_in_terminal (const QString&)));
+
   // Signals from the file editor_tab
   connect (f, SIGNAL (file_name_changed (const QString&, const QString&)),
            this, SLOT (handle_file_name_changed (const QString&,
                                                  const QString&)));
 
-  connect (f, SIGNAL (editor_state_changed (bool, const QString&)),
-           this, SLOT (handle_editor_state_changed (bool, const QString&)));
+  connect (f, SIGNAL (editor_state_changed (bool, bool)),
+           this, SLOT (handle_editor_state_changed (bool, bool)));
 
   connect (f, SIGNAL (tab_remove_request ()),
            this, SLOT (handle_tab_remove_request ()));
@@ -1267,16 +1635,16 @@
   connect (f, SIGNAL (run_file_signal (const QFileInfo&)),
            main_win (), SLOT (run_file_in_terminal (const QFileInfo&)));
 
-  connect (f, SIGNAL (execute_command_in_terminal_signal (const QString&)),
-           main_win (), SLOT (execute_command_in_terminal (const QString&)));
+  connect (f, SIGNAL (request_open_file (const QString&)),
+           this, SLOT (request_open_file (const QString&)));
+
+  connect (f, SIGNAL (set_global_edit_shortcuts_signal (bool)),
+           main_win (), SLOT (set_global_edit_shortcuts (bool)));
 
   // Signals from the file_editor non-trivial operations
   connect (this, SIGNAL (fetab_settings_changed (const QSettings *)),
            f, SLOT (notice_settings (const QSettings *)));
 
-  connect (this, SIGNAL (fetab_close_request (const QWidget*,bool)),
-           f, SLOT (conditional_close (const QWidget*,bool)));
-
   connect (this, SIGNAL (fetab_change_request (const QWidget*)),
            f, SLOT (change_editor_state (const QWidget*)));
 
@@ -1287,21 +1655,19 @@
                                           bool)),
            f, SLOT (save_file (const QWidget*, const QString&, bool)));
 
+  connect (this, SIGNAL (fetab_check_modified_file (void)),
+           f, SLOT (check_modified_file (void)));
+
   // Signals from the file_editor trivial operations
-  connect (this, SIGNAL (fetab_undo (const QWidget*)),
-           f, SLOT (undo (const QWidget*)));
-
-  connect (this, SIGNAL (fetab_redo (const QWidget*)),
-           f, SLOT (redo (const QWidget*)));
+  connect (this, SIGNAL (fetab_set_directory (const QString&)),
+           f, SLOT (set_current_directory (const QString&)));
 
-  connect (this, SIGNAL (fetab_copy (const QWidget*)),
-           f, SLOT (copy (const QWidget*)));
-
-  connect (this, SIGNAL (fetab_cut (const QWidget*)),
-           f, SLOT (cut (const QWidget*)));
-
-  connect (this, SIGNAL (fetab_paste (const QWidget*)),
-           f, SLOT (paste (const QWidget*)));
+  connect (this, SIGNAL (fetab_zoom_in (const QWidget*)),
+           f, SLOT (zoom_in (const QWidget*)));
+  connect (this, SIGNAL (fetab_zoom_out (const QWidget*)),
+           f, SLOT (zoom_out (const QWidget*)));
+  connect (this, SIGNAL (fetab_zoom_normal (const QWidget*)),
+           f, SLOT (zoom_normal (const QWidget*)));
 
   connect (this, SIGNAL (fetab_context_help (const QWidget*, bool)),
            f, SLOT (context_help (const QWidget*, bool)));
@@ -1348,18 +1714,36 @@
   connect (this, SIGNAL (fetab_remove_all_breakpoints (const QWidget*)),
            f, SLOT (remove_all_breakpoints (const QWidget*)));
 
+  connect (this, SIGNAL (fetab_scintilla_command (const QWidget *, unsigned int)),
+           f, SLOT (scintilla_command (const QWidget *, unsigned int)));
+
   connect (this, SIGNAL (fetab_comment_selected_text (const QWidget*)),
            f, SLOT (comment_selected_text (const QWidget*)));
 
   connect (this, SIGNAL (fetab_uncomment_selected_text (const QWidget*)),
            f, SLOT (uncomment_selected_text (const QWidget*)));
 
+  connect (this, SIGNAL (fetab_indent_selected_text (const QWidget*)),
+           f, SLOT (indent_selected_text (const QWidget*)));
+
+  connect (this, SIGNAL (fetab_unindent_selected_text (const QWidget*)),
+           f, SLOT (unindent_selected_text (const QWidget*)));
+
+  connect (this, SIGNAL (fetab_convert_eol (const QWidget*, QsciScintilla::EolMode)),
+           f, SLOT (convert_eol (const QWidget*, QsciScintilla::EolMode)));
+
   connect (this, SIGNAL (fetab_find (const QWidget*)),
            f, SLOT (find (const QWidget*)));
 
   connect (this, SIGNAL (fetab_goto_line (const QWidget*, int)),
            f, SLOT (goto_line (const QWidget*, int)));
 
+  connect (this, SIGNAL (fetab_move_match_brace (const QWidget*, bool)),
+           f, SLOT (move_match_brace (const QWidget*, bool)));
+
+  connect (this, SIGNAL (fetab_completion (const QWidget*)),
+           f, SLOT (show_auto_completion (const QWidget*)));
+
   connect (this, SIGNAL (fetab_set_focus (const QWidget*)),
            f, SLOT (set_focus (const QWidget*)));
 
@@ -1378,93 +1762,117 @@
   check_actions ();
 }
 
+bool
+file_editor::editor_tab_has_focus ()
+{
+  QWidget * foc_w = focusWidget ();
+  if (foc_w && foc_w->inherits ("octave_qscintilla"))
+    return true;
+  return false;
+}
+
 void
 file_editor::copyClipboard ()
 {
-  QWidget * foc_w = focusWidget ();
-
-  if (foc_w && foc_w->inherits ("octave_qscintilla"))
-    {
-      request_copy ();
-    }
+  if (editor_tab_has_focus ())
+    request_copy (true);
 }
 void
 file_editor::pasteClipboard ()
 {
-  QWidget * foc_w = focusWidget ();
+  if (editor_tab_has_focus ())
+    request_paste (true);
+}
+void
+file_editor::selectAll ()
+{
+  if (editor_tab_has_focus ())
+    request_selectall (true);
+}
 
-  if (foc_w && foc_w->inherits ("octave_qscintilla"))
-    {
-      request_paste ();
-    }
+void
+file_editor::do_undo ()
+{
+  if (editor_tab_has_focus ())
+    request_undo (true);
 }
 
 void
-file_editor::set_shortcuts (bool set)
+file_editor::set_shortcuts ()
 {
-  if (set)
-    {
-      _comment_selection_action->setShortcut (Qt::ControlModifier + Qt::Key_R);
-      _uncomment_selection_action->setShortcut (Qt::SHIFT
-                                                + Qt::ControlModifier
-                                                + Qt::Key_R);
-
-      _copy_action->setShortcut (QKeySequence::Copy);
-      _cut_action->setShortcut (QKeySequence::Cut);
-      _paste_action->setShortcut (QKeySequence::Paste);
-      _context_help_action->setShortcut (QKeySequence::HelpContents);
-      _context_doc_action->setShortcut (Qt::SHIFT + Qt::Key_F1);
+  // File menu
+  shortcut_manager::set_shortcut (_edit_function_action, "editor_file:edit_function");
+  shortcut_manager::set_shortcut (_save_action, "editor_file:save");
+  shortcut_manager::set_shortcut (_save_as_action, "editor_file:save_as");
+  shortcut_manager::set_shortcut (_close_action, "editor_file:close");
+  shortcut_manager::set_shortcut (_close_all_action, "editor_file:close_all");
+  shortcut_manager::set_shortcut (_close_others_action, "editor_file:close_other");
+  shortcut_manager::set_shortcut (_print_action, "editor_file:print");
 
-      _find_action->setShortcut (QKeySequence::Find);
-      _goto_line_action->setShortcut (Qt::ControlModifier+ Qt::Key_G);
-
-      _next_bookmark_action->setShortcut (Qt::Key_F2);
-      _previous_bookmark_action->setShortcut (Qt::SHIFT + Qt::Key_F2);
-      _toggle_bookmark_action->setShortcut (Qt::Key_F7);
+  // Edit menu
+  shortcut_manager::set_shortcut (_undo_action, "editor_edit:undo");
+  shortcut_manager::set_shortcut (_redo_action, "editor_edit:redo");
+  shortcut_manager::set_shortcut (_copy_action, "editor_edit:copy");
+  shortcut_manager::set_shortcut (_cut_action, "editor_edit:cut");
+  shortcut_manager::set_shortcut (_paste_action, "editor_edit:paste");
+  shortcut_manager::set_shortcut (_selectall_action, "editor_edit:select_all");
+  shortcut_manager::set_shortcut (_find_action, "editor_edit:find_replace");
 
-      _print_action->setShortcut (QKeySequence::Print);
-      _run_action->setShortcut (Qt::Key_F5);
-      _context_run_action->setShortcut (Qt::Key_F9);
-
-      _context_edit_action->setShortcut (Qt::ControlModifier + Qt::Key_E);
-      _save_action->setShortcut (QKeySequence::Save);
-      _save_as_action->setShortcut (QKeySequence::SaveAs);
-      _close_action->setShortcut (QKeySequence::Close);
+  shortcut_manager::set_shortcut (_delete_start_word_action, "editor_edit:delete_start_word");
+  shortcut_manager::set_shortcut (_delete_end_word_action, "editor_edit:delete_end_word");
+  shortcut_manager::set_shortcut (_delete_start_line_action, "editor_edit:delete_start_line");
+  shortcut_manager::set_shortcut (_delete_end_line_action, "editor_edit:delete_end_line");
+  shortcut_manager::set_shortcut (_delete_line_action, "editor_edit:delete_line");
+  shortcut_manager::set_shortcut (_copy_line_action, "editor_edit:copy_line");
+  shortcut_manager::set_shortcut (_cut_line_action, "editor_edit:cut_line");
+  shortcut_manager::set_shortcut (_duplicate_selection_action, "editor_edit:duplicate_selection");
+  shortcut_manager::set_shortcut (_transpose_line_action, "editor_edit:transpose_line");
+  shortcut_manager::set_shortcut (_comment_selection_action, "editor_edit:comment_selection");
+  shortcut_manager::set_shortcut (_uncomment_selection_action, "editor_edit:uncomment_selection");
 
-      _redo_action->setShortcut (QKeySequence::Redo);
-      _undo_action->setShortcut (QKeySequence::Undo);
-    }
-  else
-    {
-      QKeySequence no_key = QKeySequence ();
+  shortcut_manager::set_shortcut (_upper_case_action, "editor_edit:upper_case");
+  shortcut_manager::set_shortcut (_lower_case_action, "editor_edit:lower_case");
+  shortcut_manager::set_shortcut (_indent_selection_action, "editor_edit:indent_selection");
+  shortcut_manager::set_shortcut (_unindent_selection_action, "editor_edit:unindent_selection");
+  shortcut_manager::set_shortcut (_completion_action, "editor_edit:completion_list");
+  shortcut_manager::set_shortcut (_goto_line_action, "editor_edit:goto_line");
+  shortcut_manager::set_shortcut (_move_to_matching_brace, "editor_edit:move_to_brace");
+  shortcut_manager::set_shortcut (_sel_to_matching_brace, "editor_edit:select_to_brace");
+  shortcut_manager::set_shortcut (_toggle_bookmark_action, "editor_edit:toggle_bookmark");
+  shortcut_manager::set_shortcut (_next_bookmark_action, "editor_edit:next_bookmark");
+  shortcut_manager::set_shortcut (_previous_bookmark_action, "editor_edit:previous_bookmark");
+  shortcut_manager::set_shortcut (_remove_bookmark_action, "editor_edit:remove_bookmark");
+  shortcut_manager::set_shortcut (_preferences_action, "editor_edit:preferences");
+  shortcut_manager::set_shortcut (_styles_preferences_action, "editor_edit:styles_preferences");
 
-      _comment_selection_action->setShortcut (no_key);
-      _uncomment_selection_action->setShortcut (no_key);
-
-      _copy_action->setShortcut (no_key);
-      _cut_action->setShortcut (no_key);
-      _paste_action->setShortcut (no_key);
-      _context_help_action->setShortcut (no_key);
+  shortcut_manager::set_shortcut (_conv_eol_windows_action, "editor_edit:conv_eol_winows");
+  shortcut_manager::set_shortcut (_conv_eol_unix_action,    "editor_edit:conv_eol_unix");
+  shortcut_manager::set_shortcut (_conv_eol_mac_action,     "editor_edit:conv_eol_mac");
 
-      _find_action->setShortcut (no_key);
-      _goto_line_action->setShortcut (no_key);
-
-      _next_bookmark_action->setShortcut (no_key);
-      _previous_bookmark_action->setShortcut (no_key);
-      _toggle_bookmark_action->setShortcut (no_key);
+  // View menu
+  shortcut_manager::set_shortcut (_show_linenum_action, "editor_view:show_line_numbers");
+  shortcut_manager::set_shortcut (_show_whitespace_action, "editor_view:show_white_spaces");
+  shortcut_manager::set_shortcut (_show_eol_action, "editor_view:show_eol_chars");
+  shortcut_manager::set_shortcut (_show_indguide_action, "editor_view:show_ind_guides");
+  shortcut_manager::set_shortcut (_show_longline_action, "editor_view:show_long_line");
+  shortcut_manager::set_shortcut (_zoom_in_action, "editor_view:zoom_in");
+  shortcut_manager::set_shortcut (_zoom_out_action, "editor_view:zoom_out");
+  shortcut_manager::set_shortcut (_zoom_normal_action, "editor_view:zoom_normal");
 
-      _print_action->setShortcut (no_key);
-      _run_action->setShortcut (no_key);
-      _context_run_action->setShortcut (no_key);
+  // Debug menu
+  shortcut_manager::set_shortcut (_toggle_breakpoint_action, "editor_debug:toggle_breakpoint");
+  shortcut_manager::set_shortcut (_next_breakpoint_action, "editor_debug:next_breakpoint");
+  shortcut_manager::set_shortcut (_previous_breakpoint_action, "editor_debug:previous_breakpoint");
+  shortcut_manager::set_shortcut (_remove_all_breakpoints_action, "editor_debug:remove_breakpoints");
 
-      _context_edit_action->setShortcut (no_key);
-      _save_action->setShortcut (no_key);
-      _save_as_action->setShortcut (no_key);
-      _close_action->setShortcut (no_key);
+  // Run menu
+  shortcut_manager::set_shortcut (_run_action, "editor_run:run_file");
+  shortcut_manager::set_shortcut (_run_selection_action, "editor_run:run_selection");
 
-      _redo_action->setShortcut (no_key);
-      _undo_action->setShortcut (no_key);
-    }
+  // Help menu
+  shortcut_manager::set_shortcut (_context_help_action, "editor_help:help_keyword");
+  shortcut_manager::set_shortcut (_context_doc_action,  "editor_help:doc_keyword");
+
 }
 
 void
@@ -1472,34 +1880,124 @@
 {
   bool  have_tabs = _tab_widget->count () > 0;
 
+  _edit_cmd_menu->setEnabled (have_tabs);
+  _edit_fmt_menu->setEnabled (have_tabs);
+  _edit_nav_menu->setEnabled (have_tabs);
+
   _comment_selection_action->setEnabled (have_tabs);
   _uncomment_selection_action->setEnabled (have_tabs);
+  _indent_selection_action->setEnabled (have_tabs);
+  _unindent_selection_action->setEnabled (have_tabs);
 
   _paste_action->setEnabled (have_tabs);
   _context_help_action->setEnabled (have_tabs);
   _context_doc_action->setEnabled (have_tabs);
 
-  _find_action->setEnabled (have_tabs);
-  _goto_line_action->setEnabled (have_tabs);
+  _view_editor_menu->setEnabled (have_tabs);
+  _zoom_in_action->setEnabled (have_tabs);
+  _zoom_out_action->setEnabled (have_tabs);
+  _zoom_normal_action->setEnabled (have_tabs);
 
-  _next_bookmark_action->setEnabled (have_tabs);
-  _previous_bookmark_action->setEnabled (have_tabs);
-  _toggle_bookmark_action->setEnabled (have_tabs);
-  _remove_bookmark_action->setEnabled (have_tabs);
-
+  _find_action->setEnabled (have_tabs);
   _print_action->setEnabled (have_tabs);
   _run_action->setEnabled (have_tabs);
 
-  _context_edit_action->setEnabled (have_tabs);
+  _edit_function_action->setEnabled (have_tabs);
   _save_action->setEnabled (have_tabs);
   _save_as_action->setEnabled (have_tabs);
   _close_action->setEnabled (have_tabs);
   _close_all_action->setEnabled (have_tabs);
   _close_others_action->setEnabled (have_tabs && _tab_widget->count () > 1);
 
-  _undo_action->setEnabled (have_tabs);
-  _redo_action->setEnabled (have_tabs);
+  _selectall_action->setEnabled (have_tabs);
 }
 
+// empty_script determines whether we have to create an empty script
+// 1. At startup, when the editor has to be (really) visible
+//    (Here we can not use the visibility changed signal)
+// 2. When the editor becomes visible when octave is running
+void
+file_editor::empty_script (bool startup, bool visible)
+{
+  QSettings *settings = resource_manager::get_settings ();
+  if (settings->value ("useCustomFileEditor",false).toBool ())
+    return;  // do not open an empty script in the external editor
+
+  bool real_visible;
+
+  if (startup)
+    real_visible = isVisible ();
+  else
+    real_visible = visible;
+
+  if (! real_visible || _tab_widget->count () > 0)
+    return;
+
+  if (startup && ! isFloating ())
+    {
+      // check is editor is really visible or hidden between tabbed widgets
+      QList<QTabBar *> tab_list = main_win ()->findChildren<QTabBar *>();
+
+      bool in_tab = false;
+      int i = 0;
+      while ((i < tab_list.count ()) && (! in_tab))
+        {
+          QTabBar *tab = tab_list.at (i);
+          i++;
+
+          int j = 0;
+          while ((j < tab->count ()) && (! in_tab))
+            {
+              // check all tabs for the editor
+              if (tab->tabText (j) == windowTitle ())
+                {
+                  // editor is in this tab widget
+                  in_tab = true;
+                  int top = tab->currentIndex ();
+                  if (top > -1 && tab->tabText (top) == windowTitle ())
+                    real_visible = true;  // and is the current tab
+                  else
+                    return; // not current tab -> not visible
+                }
+              j++;
+            }
+        }
+    }
+
+  request_new_file ("");
+}
+
+// This slot is a reimplementation of the virtual slot in octave_dock_widget.
+// We need this for creating an empty script when the editor has no open files
+// and is made visible
+void
+file_editor::handle_visibility (bool visible)
+  {
+    empty_script (false, visible);
+
+    if (visible && ! isFloating ())
+      focus ();
+  }
+
+void
+file_editor::dragEnterEvent (QDragEnterEvent *e)
+  {
+    if (e->mimeData ()->hasUrls ())
+      {
+        e->acceptProposedAction();
+      }
+  }
+
+void
+file_editor::dropEvent (QDropEvent *e)
+  {
+    if (e->mimeData ()->hasUrls ())
+      {
+        foreach (QUrl url, e->mimeData ()->urls ())
+        {
+          request_open_file (url.toLocalFile ());
+        }
+      }
+  }
 
 #endif
--- a/libgui/src/m-editor/file-editor.h
+++ b/libgui/src/m-editor/file-editor.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -29,6 +29,10 @@
 #include <QStatusBar>
 #include <QCloseEvent>
 #include <QTabWidget>
+#include <QStackedWidget>
+
+#include <QDragEnterEvent>
+#include <QDropEvent>
 
 #include <map>
 
@@ -52,16 +56,17 @@
   QMenu *get_mru_menu (void) { return _mru_file_menu; }
   QMenu *debug_menu (void);
   QToolBar *toolbar (void);
+  void insert_new_open_actions (QAction*,QAction*,QAction*);
 
-  void set_focus (void);
   void handle_enter_debug_mode (void);
   void handle_exit_debug_mode (void);
 
   void check_actions (void);
+  void empty_script (bool startup, bool visible);
+
 signals:
 
   void fetab_settings_changed (const QSettings *settings);
-  void fetab_close_request (const QWidget* ID, bool app_closing = false);
   void fetab_change_request (const QWidget* ID);
   void fetab_file_name_query (const QWidget* ID);
   // Save is a ping-pong type of communication
@@ -69,13 +74,9 @@
                         bool remove_on_success);
   // No fetab_open, functionality in editor
   // No fetab_new, functionality in editor
-  void fetab_undo (const QWidget* ID);
-  void fetab_redo (const QWidget* ID);
-  void fetab_copy (const QWidget* ID);
-  void fetab_cut (const QWidget* ID);
-  void fetab_paste (const QWidget* ID);
   void fetab_context_help (const QWidget* ID, bool);
   void fetab_context_edit (const QWidget* ID);
+  void fetab_check_modified_file (void);
   void fetab_save_file (const QWidget* ID);
   void fetab_save_file_as (const QWidget* ID);
   void fetab_print_file (const QWidget* ID);
@@ -91,19 +92,35 @@
   void fetab_remove_all_breakpoints (const QWidget* ID);
   void fetab_comment_selected_text (const QWidget* ID);
   void fetab_uncomment_selected_text (const QWidget* ID);
+  void fetab_indent_selected_text (const QWidget* ID);
+  void fetab_unindent_selected_text (const QWidget* ID);
+  void fetab_convert_eol (const QWidget* ID, QsciScintilla::EolMode eol_mode);
   void fetab_find (const QWidget* ID);
   void fetab_goto_line (const QWidget* ID, int line = -1);
+  void fetab_move_match_brace (const QWidget* ID, bool select);
+  void fetab_completion (const QWidget*);
   void fetab_insert_debugger_pointer (const QWidget* ID, int line = -1);
   void fetab_delete_debugger_pointer (const QWidget* ID, int line = -1);
   void fetab_do_breakpoint_marker (bool insert, const QWidget* ID,
                                    int line = -1);
   void fetab_set_focus (const QWidget* ID);
+  void fetab_scintilla_command (const QWidget* ID, unsigned int sci_msg);
+
+  void fetab_zoom_in (const QWidget* ID);
+  void fetab_zoom_out (const QWidget* ID);
+  void fetab_zoom_normal (const QWidget* ID);
+
+  void fetab_set_directory (const QString& dir);
+
   void request_settings_dialog (const QString&);
   void execute_command_in_terminal_signal (const QString&);
   void file_loaded_signal ();
 
 public slots:
+
   void focus (void);
+  void enable_menu_shortcuts (bool);
+  bool check_closing (void);
 
   void request_new_file (const QString& commands);
   void request_new_script (const QString& commands);
@@ -113,35 +130,58 @@
   void request_close_all_files (bool);
   void request_close_other_files (bool);
   void request_mru_open_file (QAction *action);
-  void request_print_file (void);
+  void request_print_file (bool);
 
-  void request_undo (void);
-  void request_redo (void);
-  void request_copy (void);
-  void request_cut (void);
-  void request_paste (void);
+  void request_undo (bool);
+  void request_redo (bool);
+  void request_copy (bool);
+  void request_cut (bool);
+  void request_paste (bool);
+  void request_selectall (bool);
   void request_context_help (bool);
   void request_context_doc (bool);
   void request_context_edit (bool);
-  void request_save_file (void);
-  void request_save_file_as (void);
-  void request_run_file (void);
+  void request_save_file (bool);
+  void request_save_file_as (bool);
+  void request_run_file (bool);
   void request_context_run (bool);
-  void request_toggle_bookmark (void);
-  void request_next_bookmark (void);
-  void request_previous_bookmark (void);
-  void request_remove_bookmark (void);
+  void request_toggle_bookmark (bool);
+  void request_next_bookmark (bool);
+  void request_previous_bookmark (bool);
+  void request_remove_bookmark (bool);
+
+  void request_move_match_brace (bool);
+  void request_sel_match_brace (bool);
+  void request_toggle_breakpoint (bool);
+  void request_next_breakpoint (bool);
+  void request_previous_breakpoint (bool);
+  void request_remove_breakpoint (bool);
 
-  void request_toggle_breakpoint (void);
-  void request_next_breakpoint (void);
-  void request_previous_breakpoint (void);
-  void request_remove_breakpoint (void);
+  void request_delete_start_word (bool);
+  void request_delete_end_word (bool);
+  void request_delete_start_line (bool);
+  void request_delete_end_line (bool);
+  void request_delete_line (bool);
+  void request_copy_line (bool);
+  void request_cut_line (bool);
+  void request_duplicate_selection (bool);
+  void request_transpose_line (bool);
+
+  void request_comment_selected_text (bool);
+  void request_uncomment_selected_text (bool);
 
-  void request_comment_selected_text (void);
-  void request_uncomment_selected_text (void);
-  void request_find (void);
+  void request_upper_case (bool);
+  void request_lower_case (bool);
+  void request_indent_selected_text (bool);
+  void request_unindent_selected_text (bool);
+  void request_conv_eol_windows (bool);
+  void request_conv_eol_unix (bool);
+  void request_conv_eol_mac (bool);
 
-  void request_goto_line (void);
+  void request_find (bool);
+
+  void request_goto_line (bool);
+  void request_completion (bool);
 
   void handle_file_name_changed (const QString& fileName,
                                  const QString& toolTip);
@@ -149,7 +189,7 @@
   void handle_tab_remove_request (void);
   void handle_add_filename_to_list (const QString& fileName, QWidget *ID);
   void active_tab_changed (int index);
-  void handle_editor_state_changed (bool enableCopy, const QString& fileName);
+  void handle_editor_state_changed (bool enableCopy, bool is_octave_file);
   void handle_mru_add_file (const QString& file_name);
   void check_conflict_save (const QString& fileName, bool remove_on_success);
 
@@ -163,16 +203,21 @@
   // Tells the editor to react on changed settings.
   void notice_settings (const QSettings *settings);
 
-  // Tells the ditor to dis- or enable some shortcuts
-  void set_shortcuts (bool set_shortcuts);
+  void set_shortcuts ();
 
+  void handle_visibility (bool visible);
+
+  void update_octave_directory (const QString& dir);
 
 protected slots:
   void copyClipboard ();
   void pasteClipboard ();
+  void selectAll ();
+  void do_undo ();
 
 private slots:
 
+  void request_open_files (const QStringList&);
   void request_open_file (const QString& fileName, int line = -1,
                           bool debug_pointer = false,
                           bool breakpoint_marker = false, bool insert = true);
@@ -180,6 +225,23 @@
   void request_styles_preferences (bool);
   void restore_create_file_setting ();
 
+  void show_line_numbers (bool);
+  void show_white_space (bool);
+  void show_eol_chars (bool);
+  void show_indent_guides (bool);
+  void show_long_line (bool);
+  void zoom_in (bool);
+  void zoom_out (bool);
+  void zoom_normal (bool);
+
+  void create_context_menu (QMenu *);
+  void edit_status_update (bool, bool);
+
+protected:
+
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+
 private:
 
   bool is_editor_console_tabbed ();
@@ -189,9 +251,18 @@
   void mru_menu_update (void);
   bool call_custom_editor (const QString& file_name = QString (), int line = -1);
 
+  void toggle_preference (const QString& preference, bool def);
+
+  bool editor_tab_has_focus ();
+
   QWidget *find_tab_widget (const QString& openFileName) const;
+  QAction *add_action (QMenu *menu, const QIcon &icon, const QString &text,
+                       const char *member);
+
+  QMenu* m_add_menu (QMenuBar *p, QString text);
 
   std::map<QString, QWidget *> editor_tab_map;
+  QHash<QMenu*, QStringList> _hash_menu_text;
 
   QString ced;
 
@@ -199,18 +270,52 @@
   QToolBar *_tool_bar;
   QMenu *_debug_menu;
 
+  QAction *_new_action;
+  QAction *_new_function_action;
+  QAction *_open_action;
+
+  QAction *_upper_case_action;
+  QAction *_lower_case_action;
   QAction *_comment_selection_action;
   QAction *_uncomment_selection_action;
+  QAction *_indent_selection_action;
+  QAction *_unindent_selection_action;
+  QAction *_conv_eol_windows_action;
+  QAction *_conv_eol_unix_action;
+  QAction *_conv_eol_mac_action;
 
   QAction *_copy_action;
   QAction *_cut_action;
   QAction *_paste_action;
+  QAction *_selectall_action;
   QAction *_context_help_action;
   QAction *_context_doc_action;
 
+  QAction *_show_linenum_action;
+  QAction *_show_whitespace_action;
+  QAction *_show_eol_action;
+  QAction *_show_indguide_action;
+  QAction *_show_longline_action;
+  QAction *_zoom_in_action;
+  QAction *_zoom_out_action;
+  QAction *_zoom_normal_action;
+
+  QAction *_delete_start_word_action;
+  QAction *_delete_end_word_action;
+  QAction *_delete_start_line_action;
+  QAction *_delete_end_line_action;
+  QAction *_delete_line_action;
+  QAction *_copy_line_action;
+  QAction *_cut_line_action;
+  QAction *_duplicate_selection_action;
+  QAction *_transpose_line_action;
+
   QAction *_find_action;
   QAction *_goto_line_action;
+  QAction *_completion_action;
 
+  QAction *_move_to_matching_brace;
+  QAction *_sel_to_matching_brace;
   QAction *_next_bookmark_action;
   QAction *_previous_bookmark_action;
   QAction *_toggle_bookmark_action;
@@ -218,9 +323,9 @@
 
   QAction *_print_action;
   QAction *_run_action;
-  QAction *_context_run_action;
+  QAction *_run_selection_action;
 
-  QAction *_context_edit_action;
+  QAction *_edit_function_action;
   QAction *_save_action;
   QAction *_save_as_action;
   QAction *_close_action;
@@ -233,6 +338,17 @@
   QAction *_preferences_action;
   QAction *_styles_preferences_action;
 
+  QAction *_toggle_breakpoint_action;
+  QAction *_next_breakpoint_action;
+  QAction *_previous_breakpoint_action;
+  QAction *_remove_all_breakpoints_action;
+
+  QMenu *_edit_cmd_menu;
+  QMenu *_edit_fmt_menu;
+  QMenu *_edit_nav_menu;
+  QMenu *_fileMenu;
+  QMenu *_view_editor_menu;
+
   QTabWidget *_tab_widget;
 
   int _marker_breakpoint;
@@ -241,7 +357,6 @@
   QMenu *_mru_file_menu;
   QAction *_mru_file_actions[MaxMRUFiles];
   QStringList _mru_files;
-
 };
 
 #endif // FILEEDITORMDISUBWINDOW_H
--- a/libgui/src/m-editor/find-dialog.cc
+++ b/libgui/src/m-editor/find-dialog.cc
@@ -2,7 +2,7 @@
 
 Find dialog derived from an example from Qt Toolkit (license below (**))
 
-Copyright (C) 2012-2013 Torsten <ttl@justmail.de>
+Copyright (C) 2012-2015 Torsten <ttl@justmail.de>
 Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
  All rights reserved.
  Contact: Nokia Corporation (qt-info@nokia.com)
@@ -71,7 +71,7 @@
 find_dialog::find_dialog (QsciScintilla* edit_area, QWidget *p)
   : QDialog (p)
 {
-  setWindowTitle ("Find and Replace");
+  setWindowTitle (tr ("Find and Replace"));
   setWindowIcon (QIcon(":/actions/icons/find.png"));
 
   _search_label = new QLabel (tr ("Find &what:"));
@@ -107,8 +107,13 @@
   _regex_check_box = new QCheckBox (tr ("Regular E&xpressions"));
   _backward_check_box = new QCheckBox (tr ("Search &backward"));
   _search_selection_check_box = new QCheckBox (tr ("Search se&lection"));
-  _search_selection_check_box->setCheckable (false); // TODO: Not implemented.
+#ifdef HAVE_QSCI_FINDSELECTION
+  _search_selection_check_box->setCheckable (true);
+  _search_selection_check_box->setEnabled (edit_area->hasSelectedText ());
+#else
+  _search_selection_check_box->setCheckable (false);
   _search_selection_check_box->setEnabled (false);
+#endif
 
   _edit_area = edit_area;
   connect (_find_next_button,   SIGNAL (clicked ()),
@@ -125,6 +130,15 @@
            this,                SLOT (handle_backward_search_changed (int)));
   connect (_button_box,         SIGNAL (rejected ()),
            this,                SLOT (close ()));
+  connect (_search_line_edit,   SIGNAL (textChanged (QString)),
+           this,                SLOT (handle_search_text_changed (QString)));
+
+#ifdef HAVE_QSCI_FINDSELECTION
+  connect (_edit_area, SIGNAL (copyAvailable (bool)),
+           this,       SLOT (handle_selection_changed (bool)));
+  connect (_search_selection_check_box, SIGNAL (stateChanged (int)),
+           this,                        SLOT (handle_sel_search_changed (int)));
+#endif
 
   QVBoxLayout *extension_layout = new QVBoxLayout ();
   extension_layout->setMargin (0);
@@ -157,16 +171,15 @@
   _extension->hide ();
   _find_next_button->setDefault (true);
   _find_result_available = false;
+  _rep_all = 0;
+  _rep_active = false;
 
   // move dialog to side of the parent if there is room on the desktop to do so.
-  QWidget * desktop = QApplication::desktop ();
-  int xp = p->x () + p->frameGeometry ().width ();
-  int yp=  p->y ();
-  if (desktop != 0 && sizeHint ().isValid ())
-    {
-      if (xp + sizeHint ().width () > desktop->width ())
-        xp = desktop->width () - sizeHint ().width ();
-    }
+  int xp = p->x () +20;
+  int yp = p->y () + p->frameGeometry ().height () - sizeHint ().height () -20;
+
+  if (yp < 0)
+    yp = 0;
 
   move (xp, yp);
 
@@ -182,6 +195,35 @@
     _from_start_check_box->setText (tr ("Search from start"));
 }
 
+// search text has changed: reset the search
+void
+find_dialog::handle_search_text_changed (QString)
+{
+  if (_search_selection_check_box->isChecked ())
+    _find_result_available = false;
+}
+
+#ifdef HAVE_QSCI_FINDSELECTION
+void
+find_dialog::handle_sel_search_changed (int selected)
+{
+  _from_start_check_box->setEnabled (! selected);
+  _find_result_available = false;
+}
+
+void
+find_dialog::handle_selection_changed (bool has_selected)
+{
+  if (_rep_active)
+    return;
+
+  _search_selection_check_box->setEnabled (has_selected);
+  _find_result_available = false;
+  if (! has_selected)
+    _search_selection_check_box->setChecked (false);
+}
+#endif
+
 // initialize search text with selected text if this is in one single line
 void
 find_dialog::init_search_text ()
@@ -210,102 +252,162 @@
 void
 find_dialog::find (bool forward)
 {
-  int line = -1, col = -1;
+  int line, col;
+  line = col = -1;
   bool do_wrap = _wrap_check_box->isChecked ();
-  bool do_forward = true;
+  bool do_forward = forward;
 
-  if (_find_result_available)
+  if (_rep_all)
     {
-      // we found a match last time, cursor is at the end of the match
-      if (!forward)
+      if (_rep_all == 1)
+        {
+          line = 0;
+          col = 0;
+        }
+      do_wrap = false;
+      // The following line is a workaround for the issue that when replacing
+      // a text with a new one with different size within the selection,
+      // the selection is not updated leading to missing or extra replacements.
+      // This does not happen, when the selection is search backwards
+      do_forward = ! _search_selection_check_box->isChecked ();
+    }
+  else
+    {
+      if (_from_start_check_box->isChecked ())
         {
-          // backward: go back one position or we will find the same again
-          do_forward = false;
-          _edit_area->getCursorPosition (&line,&col);
-          if (col > 0)
-            _edit_area->setCursorPosition (line,--col);
+          if (do_forward)
+            {
+              line = 0;
+              col = 0;
+            }
+          else
+            {
+              line = _edit_area->lines () - 1;
+              col  = _edit_area->text (line).length () - 1;
+              if (col == -1)
+                col = 0;
+            }
         }
-    }
-
-  _find_result_available = false;
-
-  if (_from_start_check_box->isChecked ())
-    {
-      line = 0;
-      col  = 0;
-      if (_backward_check_box->isChecked ())
-        do_wrap = true;
+      else if (! do_forward)
+        {
+           // search from position before search characters text length
+           // if search backward on existing results,
+           _edit_area->getCursorPosition (&line,&col);
+           if (_find_result_available && _edit_area->hasSelectedText ())
+             {
+               int currpos = _edit_area->positionFromLineIndex(line,col);
+               currpos -= (_search_line_edit->text ().length ());
+               if (currpos < 0) 
+                 currpos = 0;
+               _edit_area->lineIndexFromPosition(currpos, &line,&col);
+             }
+        }
     }
 
   if (_edit_area)
     {
-      _find_result_available
-        = _edit_area->findFirst (_search_line_edit->text (),
-                                _regex_check_box->isChecked (),
-                                _case_check_box->isChecked (),
-                                _whole_words_check_box->isChecked (),
-                                do_wrap,
-                                do_forward,
-                                line,col,
-                                true
+      if (_edit_area->hasSelectedText ()
+          && _search_selection_check_box->isChecked ())
+        {
+#ifdef HAVE_QSCI_FINDSELECTION
+           if (_find_result_available)
+             _find_result_available = _edit_area->findNext ();
+           else
+            _find_result_available
+              = _edit_area->findFirstInSelection (
+                                      _search_line_edit->text (),
+                                      _regex_check_box->isChecked (),
+                                      _case_check_box->isChecked (),
+                                      _whole_words_check_box->isChecked (),
+                                      do_forward,
+                                      true
 #ifdef HAVE_QSCI_VERSION_2_6_0
-                                , true
+                                      , true
+#endif
+                                      );
 #endif
-                                );
+        }
+      else
+        {
+          _find_result_available
+            = _edit_area->findFirst (_search_line_edit->text (),
+                                    _regex_check_box->isChecked (),
+                                    _case_check_box->isChecked (),
+                                    _whole_words_check_box->isChecked (),
+                                    do_wrap,
+                                    do_forward,
+                                    line,col,
+                                    true
+#ifdef HAVE_QSCI_VERSION_2_6_0
+                                    , true
+#endif
+                                    );
+        }
     }
+
   if (_find_result_available)
     _from_start_check_box->setChecked (0);
-  else
+  else if (! _rep_all)
     no_matches_message ();
 }
 
+void
+find_dialog::do_replace ()
+{
+  _rep_active = true;  // changes in selection not made by the user
+  _edit_area->replace (_replace_line_edit->text ());
+  _rep_active = false;
+}
 
 void
 find_dialog::replace ()
 {
   if (_edit_area)
     {
-      _edit_area->replace (_replace_line_edit->text ());
-      if (!_edit_area->findNext())
-        no_matches_message ();
+      // The following line is a workaround for the issue that when replacing
+      // a text with a new one with different size within the selection,
+      // the selection is not updated leading to missing or extra replacements.
+      // This does not happen, when the selection is search backwards
+      if (_search_selection_check_box->isChecked ())
+        _backward_check_box->setChecked (true);
+
+      // do the replace if we have selected text
+      if (_find_result_available && _edit_area->hasSelectedText ())
+        do_replace ();
+
+      find_next ();
     }
 }
 
 void
 find_dialog::replace_all ()
 {
-  int count = 0;
+  int line, col;
 
-  // check whether find & replace srings are different (avoid endless loop!)
-  int strDiff;
-  Qt::CaseSensitivity cs;
-  if (_case_check_box->isChecked())
+  if (_edit_area)
     {
-      cs = Qt::CaseSensitive;
-    }
-  else
-    {
-      cs = Qt::CaseInsensitive;
-    }
-  strDiff = QString::compare (_search_line_edit->text(),
-                              _replace_line_edit->text(), cs);
+      _edit_area->getCursorPosition (&line,&col);
 
-  // replace all if strings are different
-  if (_edit_area && strDiff )
-    {
-      find (!_backward_check_box->isChecked ());  // find first occurence
+      _rep_all = 1;
+      find_next ();  // find first occurence (forward)
       while (_find_result_available)   // while search string is found
         {
-          _edit_area->replace (_replace_line_edit->text ());   // replace
-          count++;                                             // inc counter
-          _find_result_available = _edit_area->findNext();     // and find next
+          do_replace ();
+          _rep_all++;                                          // inc counter
+          find_next ();                                        // find next
         }
+
       QMessageBox msg_box (QMessageBox::Information, tr ("Replace Result"),
-                           tr ("%1 items replaced").arg(count),
+                           tr ("%1 items replaced").arg(_rep_all-1),
                            QMessageBox::Ok, this);
       msg_box.exec ();
+
+      _rep_all = 0;
+      _find_result_available = false;
+
+      if (! _search_selection_check_box->isChecked ())
+        _edit_area->setCursorPosition (line,col);
     }
-  // TODO: Show number of replaced strings
 }
 
 void
--- a/libgui/src/m-editor/find-dialog.h
+++ b/libgui/src/m-editor/find-dialog.h
@@ -2,7 +2,7 @@
 
 Find dialog derived from an example from Qt Toolkit (license below (**))
 
-Copyright (C) 2012-2013 Torsten <ttl@justmail.de>
+Copyright (C) 2012-2015 Torsten <ttl@justmail.de>
 Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
  All rights reserved.
  Contact: Nokia Corporation (qt-info@nokia.com)
@@ -79,7 +79,13 @@
   void init_search_text ();
 
 private slots:
+#ifdef HAVE_QSCI_FINDSELECTION
+  void handle_sel_search_changed (int);
+  void handle_selection_changed (bool has_selected);
+#endif
   void handle_backward_search_changed (int);
+  void handle_search_text_changed (QString new_search_text);
+
   void find (bool forward = true);
   void find_next ();
   void find_prev ();
@@ -87,7 +93,10 @@
   void replace_all ();
 
 private:
+
   void no_matches_message ();
+  void do_replace ();
+
   QLabel            *_search_label;
   QLineEdit         *_search_line_edit;
   QLabel            *_replace_label;
@@ -108,6 +117,8 @@
   QWidget           *_extension;
   QsciScintilla     *_edit_area;
   bool               _find_result_available;
+  int                _rep_all;
+  bool               _rep_active;
 };
 
 #endif // FIND_DIALOG_H
--- a/libgui/src/m-editor/octave-qscintilla.cc
+++ b/libgui/src/m-editor/octave-qscintilla.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Torsten
+Copyright (C) 2013-2015 Torsten
 
 This file is part of Octave.
 
@@ -29,13 +29,107 @@
 #ifdef HAVE_QSCINTILLA
 
 #include <Qsci/qscilexer.h>
+#include <Qsci/qscicommandset.h>
+#include <QShortcut>
+#include <QMessageBox>
 
 #include "octave-qscintilla.h"
 #include "file-editor-tab.h"
+#include "shortcut-manager.h"
 
 octave_qscintilla::octave_qscintilla (QWidget *p)
   : QsciScintilla (p)
-{ }
+{
+  connect (this, SIGNAL (textChanged ()), this, SLOT (text_changed ()));
+
+  // clear scintilla edit shortcuts that are handled by the editor
+  QsciCommandSet *cmd_set = standardCommands ();
+
+#ifdef HAVE_QSCI_VERSION_2_6_0
+  // find () was added in QScintilla 2.6
+  cmd_set->find (QsciCommand::SelectionCopy)->setKey (0);
+  cmd_set->find (QsciCommand::SelectionCut)->setKey (0);
+  cmd_set->find (QsciCommand::Paste)->setKey (0);
+  cmd_set->find (QsciCommand::SelectAll)->setKey (0);
+  cmd_set->find (QsciCommand::SelectionDuplicate)->setKey (0);
+  cmd_set->find (QsciCommand::LineTranspose)->setKey (0);
+  cmd_set->find (QsciCommand::Undo)->setKey (0);
+  cmd_set->find (QsciCommand::Redo)->setKey (0);
+  cmd_set->find (QsciCommand::SelectionUpperCase)->setKey (0);
+  cmd_set->find (QsciCommand::SelectionLowerCase)->setKey (0);
+  cmd_set->find (QsciCommand::ZoomIn)->setKey (0);
+  cmd_set->find (QsciCommand::ZoomOut)->setKey (0);
+  cmd_set->find (QsciCommand::DeleteWordLeft)->setKey (0);
+  cmd_set->find (QsciCommand::DeleteWordRight)->setKey (0);
+  cmd_set->find (QsciCommand::DeleteLineLeft)->setKey (0);
+  cmd_set->find (QsciCommand::DeleteLineRight)->setKey (0);
+  cmd_set->find (QsciCommand::LineDelete)->setKey (0);
+  cmd_set->find (QsciCommand::LineCut)->setKey (0);
+  cmd_set->find (QsciCommand::LineCopy)->setKey (0);
+#else
+  // find commands via its default key (tricky way without find ())
+  QList< QsciCommand * > cmd_list = cmd_set->commands ();
+  for (int i = 0; i < cmd_list.length (); i++)
+    {
+      int cmd_key = cmd_list.at (i)->key ();
+      switch (cmd_key)
+        {
+          case Qt::Key_C | Qt::CTRL :               // SelectionCopy
+          case Qt::Key_X | Qt::CTRL :               // SelectionCut
+          case Qt::Key_V | Qt::CTRL :               // Paste
+          case Qt::Key_A | Qt::CTRL :               // SelectAll
+          case Qt::Key_D | Qt::CTRL :               // SelectionDuplicate
+          case Qt::Key_T | Qt::CTRL :               // LineTranspose
+          case Qt::Key_Z | Qt::CTRL :               // Undo
+          case Qt::Key_Y | Qt::CTRL :               // Redo
+          case Qt::Key_Z | Qt::CTRL | Qt::SHIFT :   // Redo
+          case Qt::Key_U | Qt::CTRL :               // SelectionLowerCase
+          case Qt::Key_U | Qt::CTRL | Qt::SHIFT :   // SelectionUpperCase
+          case Qt::Key_Plus | Qt::CTRL :            // ZoomIn
+          case Qt::Key_Minus | Qt::CTRL :           // ZoomOut
+          case Qt::Key_Backspace | Qt::CTRL | Qt::SHIFT :   // DeleteLineLeft
+          case Qt::Key_Delete | Qt::CTRL | Qt::SHIFT :      // DeleteLineRight
+          case Qt::Key_K | Qt::META :                       // DeleteLineRight
+          case Qt::Key_Backspace | Qt::CTRL :       // DeleteWordLeft
+          case Qt::Key_Delete | Qt::CTRL :          // DeleteWordRight
+          case Qt::Key_L | Qt::CTRL | Qt::SHIFT :   // LineDelete
+          case Qt::Key_L | Qt::CTRL :               // LineCut
+          case Qt::Key_T | Qt::CTRL | Qt::SHIFT :   // LineCopy
+            cmd_list.at (i)->setKey (0);
+        }
+    }
+#endif
+
+#if defined (Q_OS_MAC)
+  // Octave interprets Cmd key as Meta whereas Qscintilla interprets it
+  // as Ctrl. We thus invert Meta/Ctrl in Qscintilla's shortcuts list.
+  QList< QsciCommand * > cmd_list_mac = cmd_set->commands ();
+  for (int i = 0; i < cmd_list_mac.length (); i++)
+    {
+      // Primary key
+      int key = cmd_list_mac.at (i)->key ();
+
+      if (static_cast<int> (key | Qt::META) == key &&
+          static_cast<int> (key | Qt::CTRL) != key)
+        key = (key ^ Qt::META) | Qt::CTRL;
+      else if (static_cast<int> (key | Qt::CTRL) == key)
+        key = (key ^ Qt::CTRL) | Qt::META;
+
+      cmd_list_mac.at (i)->setKey (key);
+
+      // Alternate key
+      key = cmd_list_mac.at (i)->alternateKey ();
+
+      if (static_cast<int> (key | Qt::META) == key &&
+          static_cast<int> (key | Qt::CTRL) != key)
+        key = (key ^ Qt::META) | Qt::CTRL;
+      else if (static_cast<int> (key | Qt::CTRL) == key)
+        key = (key ^ Qt::CTRL) | Qt::META;
+
+      cmd_list_mac.at (i)->setAlternateKey (key);
+    }
+#endif
+}
 
 octave_qscintilla::~octave_qscintilla ()
 { }
@@ -44,11 +138,11 @@
 octave_qscintilla::get_global_textcursor_pos (QPoint *global_pos,
                                               QPoint *local_pos)
 {
-  long position = SendScintilla (QsciScintillaBase::SCI_GETCURRENTPOS);
+  long position = SendScintilla (SCI_GETCURRENTPOS);
   long point_x  = SendScintilla
-                    (QsciScintillaBase::SCI_POINTXFROMPOSITION,0,position);
+                    (SCI_POINTXFROMPOSITION,0,position);
   long point_y  = SendScintilla
-                    (QsciScintillaBase::SCI_POINTYFROMPOSITION,0,position);
+                    (SCI_POINTYFROMPOSITION,0,position);
   *local_pos = QPoint (point_x,point_y);  // local cursor position
   *global_pos = mapToGlobal (*local_pos); // global position of cursor
 }
@@ -94,11 +188,13 @@
 void
 octave_qscintilla::contextMenuEvent (QContextMenuEvent *e)
 {
-  QMenu *context_menu = createStandardContextMenu ( );  // standard menu
+  QPoint global_pos, local_pos;                         // the menu's position
+  QMenu *context_menu = createStandardContextMenu ();  // standard menu
 
-  // the menu's position
-  QPoint global_pos, local_pos;
+  // fill context menu with editor's standard actions
+  emit create_context_menu_signal (context_menu);
 
+  // determine position depending on mouse or keyboard event
   if (e->reason () == QContextMenuEvent::Mouse)
     {
       // context menu by mouse
@@ -135,10 +231,6 @@
           context_menu->addAction (tr ("Edit") + " " + _word_at_cursor,
                                    this, SLOT (contextmenu_edit (bool)));
         }
-      context_menu->addSeparator ();   // separator before custom entries
-      if (hasSelectedText ())
-        context_menu->addAction (tr ("&Run Selection"),
-                                 this, SLOT (contextmenu_run (bool)));
     }
 
   // finaly show the menu
@@ -163,18 +255,16 @@
 void
 octave_qscintilla::contextmenu_help_doc (bool documentation)
 {
-  QString command;
   if (documentation)
-    command = "doc ";
+    emit show_doc_signal (_word_at_cursor);
   else
-    command = "help ";
-  emit execute_command_in_terminal_signal (command + _word_at_cursor);
+    emit execute_command_in_terminal_signal ("help " + _word_at_cursor);
 }
 
 void
 octave_qscintilla::contextmenu_edit (bool)
 {
-  emit execute_command_in_terminal_signal (QString("edit ") + _word_at_cursor);
+  emit context_menu_edit_signal (_word_at_cursor);
 }
 
 void
@@ -182,8 +272,14 @@
 {
   QStringList commands = selectedText ().split (QRegExp("[\r\n]"),
                                                 QString::SkipEmptyParts);
-  for (int i = 0; i < commands.size (); i++ )
+  for (int i = 0; i < commands.size (); i++)
     emit execute_command_in_terminal_signal (commands.at (i));
 }
 
+void
+octave_qscintilla::text_changed ()
+{
+  emit status_update (isUndoAvailable (), isRedoAvailable ());
+}
+
 #endif
--- a/libgui/src/m-editor/octave-qscintilla.h
+++ b/libgui/src/m-editor/octave-qscintilla.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Torsten
+Copyright (C) 2013-2015 Torsten
 
 This file is part of Octave.
 
@@ -50,6 +50,11 @@
 signals:
 
   void execute_command_in_terminal_signal (const QString&);
+  void create_context_menu_signal (QMenu*);
+  void context_menu_edit_signal (const QString&);
+  void qsci_has_focus_signal (bool);
+  void status_update (bool,bool);
+  void show_doc_signal (const QString&);
 
 private slots:
 
@@ -59,6 +64,10 @@
   void contextmenu_edit (bool);
   void contextmenu_run (bool);
 
+  void text_changed (void);
+
+protected:
+
 private:
 
   QString _word_at_cursor;
new file mode 100644
--- /dev/null
+++ b/libgui/src/m-editor/octave-txt-lexer.cc
@@ -0,0 +1,59 @@
+/*
+
+Copyright (C) 2014-2015 Torsten
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+// Author: Torsten <ttl@justmail.de>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_QSCINTILLA
+
+#include <Qsci/qscilexer.h>
+
+#include "octave-txt-lexer.h"
+
+QString
+octave_txt_lexer::description (int style) const
+{
+  if (style == 0)
+    return tr ("Default");
+  else
+    return QString ();
+};
+
+
+const char*
+octave_txt_lexer::language () const
+{
+  return "Text";
+}
+
+
+const char*
+octave_txt_lexer::lexer () const
+{
+  return "text";
+}
+
+
+#endif
new file mode 100644
--- /dev/null
+++ b/libgui/src/m-editor/octave-txt-lexer.h
@@ -0,0 +1,44 @@
+/*
+
+Copyright (C) 2013-2015 Torsten
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+// Author: Torsten <ttl@justmail.de>
+
+#if !defined (octave_txt_lexer_h)
+#define octave_txt_lexer_h 1
+
+#include <Qsci/qsciscintilla.h>
+#include <Qsci/qscilexer.h>
+
+
+class octave_txt_lexer : public QsciLexer
+{
+  Q_OBJECT
+
+public:
+
+  virtual const char *language () const;
+  virtual const char *lexer () const;
+  virtual QString description (int style) const;
+
+};
+
+#endif
\ No newline at end of file
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -51,6 +51,7 @@
 #endif
 #include "main-window.h"
 #include "settings-dialog.h"
+#include "shortcut-manager.h"
 
 #include "Array.h"
 #include "cmd-edit.h"
@@ -60,6 +61,7 @@
 #include "defaults.h"
 #include "symtab.h"
 #include "version.h"
+#include "utils.h"
 
 static file_editor_interface *
 create_default_editor (QWidget *p)
@@ -71,33 +73,38 @@
 #endif
 }
 
-main_window::main_window (QWidget *p)
+main_window::main_window (QWidget *p, bool start_gui)
   : QMainWindow (p),
-    _workspace_model (new workspace_model ()),
-    status_bar (new QStatusBar ()),
-    command_window (new terminal_dock_widget (this)),
-    history_window (new history_dock_widget (this)),
-    file_browser_window (new files_dock_widget (this)),
-    doc_browser_window (new documentation_dock_widget (this)),
-    editor_window (create_default_editor (this)),
-    workspace_window (new workspace_view (this)),
+    _workspace_model (start_gui ? new workspace_model () : 0),
+    status_bar (start_gui ? new QStatusBar () : 0),
+    command_window (start_gui ? new terminal_dock_widget (this) : 0),
+    history_window (start_gui ? new history_dock_widget (this) : 0),
+    file_browser_window (start_gui ? new files_dock_widget (this) : 0),
+    doc_browser_window (start_gui ? new documentation_dock_widget (this) : 0),
+    editor_window (start_gui ? create_default_editor (this) : 0),
+    workspace_window (start_gui ? new workspace_view (this) : 0),
+    _settings_dlg (0),
     find_files_dlg (0),
     release_notes_window (0),
     community_news_window (0),
     _octave_qt_link (0),
     _clipboard (QApplication::clipboard ()),
-    _cmd_queue (new QStringList ()),  // no command pending
+    _cmd_queue (QList<octave_cmd *> ()),  // no command pending
     _cmd_processing (1),
     _cmd_queue_mutex (),
     _dbg_queue (new QStringList ()),  // no debug pending
     _dbg_processing (1),
-    _dbg_queue_mutex ()
+    _dbg_queue_mutex (),
+    _prevent_readline_conflicts (true),
+    _suppress_dbg_location (true),
+    _start_gui (start_gui)
 {
   QSettings *settings = resource_manager::get_settings ();
 
   bool connect_to_web = true;
   QDateTime last_checked;
   int serial = 0;
+  _active_dock = 0;
 
   if (settings)
     {
@@ -113,7 +120,7 @@
   QDateTime current = QDateTime::currentDateTime ();
   QDateTime one_day_ago = current.addDays (-1);
 
-  if (connect_to_web
+  if (start_gui && connect_to_web
       && (! last_checked.isValid () || one_day_ago > last_checked))
     load_and_display_community_news (serial);
 
@@ -144,13 +151,70 @@
       delete release_notes_window;
       release_notes_window = 0;
     }
+  if (_settings_dlg)
+    {
+      delete _settings_dlg;
+      _settings_dlg = 0;
+    }
   if (community_news_window)
     {
       delete community_news_window;
       community_news_window = 0;
     }
   delete _octave_qt_link;
-  delete _cmd_queue;
+}
+
+// catch focus changes and determine the active dock widget
+void
+main_window::focus_changed (QWidget *, QWidget *new_widget)
+{
+  octave_dock_widget* dock = 0;
+  QWidget *w_new = new_widget;  // get a copy of new focus widget
+  QWidget *start = w_new;       // Save it as start of our search
+  int count = 0;                // fallback to prevent endless loop
+
+  while (w_new && w_new != _main_tool_bar && count < 100)
+    {
+      dock = qobject_cast <octave_dock_widget *> (w_new);
+      if (dock)
+        break; // it is a QDockWidget ==> exit loop
+
+#ifdef HAVE_QSCINTILLA
+      if (qobject_cast <octave_qscintilla *> (w_new))
+        {
+          dock = static_cast<octave_dock_widget *> (editor_window);
+          break; // it is the editor window ==> exit loop
+        }
+#endif
+
+      w_new = qobject_cast <QWidget *> (w_new->previousInFocusChain ());
+      if (w_new == start)
+        break; // we have arrived where we began ==> exit loop
+
+      count++;
+    }
+
+  // editor needs extra handling
+  octave_dock_widget *edit_dock_widget =
+                        static_cast<octave_dock_widget *> (editor_window);
+  // if new dock has focus, emit signal and store active focus
+  // except editor changes to a dialog (dock=0)
+  if ((dock || _active_dock != edit_dock_widget) && (dock != _active_dock))
+    {
+      // signal to all dock widgets for updating the style
+      emit active_dock_changed (_active_dock, dock);
+
+      QList<QDockWidget *> tabbed = tabifiedDockWidgets (dock);
+      if (tabbed.contains (_active_dock))
+        dock->set_predecessor_widget (_active_dock);
+
+      if (edit_dock_widget == dock)
+        emit editor_focus_changed (true);
+      else if (edit_dock_widget == _active_dock)
+        emit editor_focus_changed (false);
+
+      _active_dock = dock;
+    }
 }
 
 bool
@@ -229,7 +293,10 @@
 void
 main_window::handle_undo_request (void)
 {
-  octave_link::post_event (this, &main_window::command_window_undo_callback);
+  if (command_window_has_focus ())
+    octave_link::post_event (this, &main_window::command_window_undo_callback);
+  else
+    emit undo_signal ();
 }
 
 void
@@ -244,35 +311,42 @@
   octave_link::post_event (this, &main_window::clear_history_callback);
 }
 
+bool
+main_window::focus_console_after_command ()
+{
+  QSettings *settings = resource_manager::get_settings ();
+  return settings->value ("terminal/focus_after_command",false).toBool ();
+}
+
 void
 main_window::execute_command_in_terminal (const QString& command)
 {
-  queue_command (command);
-  focus_command_window ();
+  octave_cmd_exec *cmd = new octave_cmd_exec (command);
+  queue_command (cmd);
+  if (focus_console_after_command ())
+    focus_command_window ();
 }
 
 void
 main_window::run_file_in_terminal (const QFileInfo& info)
 {
   octave_link::post_event (this, &main_window::run_file_callback, info);
+  if (focus_console_after_command ())
+    focus_command_window ();
 }
 
 void
 main_window::run_file_callback (const QFileInfo& info)
 {
-  QString dir = info.absolutePath ();
-  QString function_name = info.fileName ();
-  function_name.chop (info.suffix ().length () + 1);
-  if (octave_qt_link::file_in_path (info.absoluteFilePath ().toStdString (),
-                                    dir.toStdString ()))
-    queue_command (function_name);
+  octave_cmd_eval *cmd = new octave_cmd_eval (info);
+  queue_command (cmd);
 }
 
 void
-main_window::queue_command (QString command)
+main_window::queue_command (octave_cmd* cmd)
 {
   _cmd_queue_mutex.lock ();
-  _cmd_queue->append (command);   // queue command
+  _cmd_queue.append (cmd);     // queue command and type
   _cmd_queue_mutex.unlock ();
 
   if (_cmd_processing.tryAcquire ())  // if callback not processing, post event
@@ -331,14 +405,17 @@
       release_notes_window->setWindowTitle (tr ("Octave Release Notes"));
 
       browser->document()->adjustSize ();
-      QSize doc_size = browser->document()->size().toSize ();
-      doc_size.rwidth () += 45;
-      int h = QApplication::desktop ()->height ();
-      if (h > 800)
-        h = 800;
-      doc_size.rheight () = h;
-
-      release_notes_window->resize (doc_size);
+
+      // center the window on the screen where octave is running
+      QDesktopWidget *m_desktop = QApplication::desktop ();
+      int screen = m_desktop->screenNumber (this);  // screen of the main window
+      QRect screen_geo = m_desktop->availableGeometry (screen);
+      int win_x = screen_geo.width ();        // width of the screen
+      int win_y = screen_geo.height ();       // height of the screen
+      int reln_x = std::min (620, win_x-80);  // desired width of release notes
+      int reln_y = std::min (640, win_y-80);  // desired height of release notes
+      release_notes_window->resize (reln_x, reln_y);  // set size
+      release_notes_window->move (20, 0);     // move to the top left corner
     }
 
   if (! release_notes_window->isVisible ())
@@ -518,9 +595,16 @@
 
       community_news_window->setLayout (vlayout);
       community_news_window->setWindowTitle (tr ("Octave Community News"));
-      community_news_window->resize (640, 480);
-      int win_x = QApplication::desktop ()->width ();
-      int win_y = QApplication::desktop ()->height ();
+
+      // center the window on the screen where octave is running
+      QDesktopWidget *m_desktop = QApplication::desktop ();
+      int screen = m_desktop->screenNumber (this);  // screen of the main window
+      QRect screen_geo = m_desktop->availableGeometry (screen);
+      int win_x = screen_geo.width ();        // width of the screen
+      int win_y = screen_geo.height ();       // height of the screen
+      int news_x = std::min (640, win_x-80);  // desired width of news window
+      int news_y = std::min (480, win_y-80);  // desired height of news window
+      community_news_window->resize (news_x, news_y);  // set size and center
       community_news_window->move ((win_x - community_news_window->width ())/2,
                                    (win_y - community_news_window->height ())/2);
     }
@@ -570,18 +654,50 @@
 void
 main_window::process_settings_dialog_request (const QString& desired_tab)
 {
-  settings_dialog *settingsDialog = new settings_dialog (this, desired_tab);
-  int change_settings = settingsDialog->exec ();
-  if (change_settings == QDialog::Accepted)
+  if (_settings_dlg)  // _settings_dlg is a guarded pointer!
+    {                 // here the dialog is still open and called once again
+      if (! desired_tab.isEmpty ())
+        _settings_dlg->show_tab (desired_tab);
+      return;
+    }
+
+  _settings_dlg = new settings_dialog (this, desired_tab);
+
+  connect (_settings_dlg, SIGNAL (apply_new_settings ()),
+           this, SLOT (request_reload_settings ()));
+
+  _settings_dlg->setModal (false);
+  _settings_dlg->setAttribute (Qt::WA_DeleteOnClose);
+  _settings_dlg->show ();
+}
+
+void
+main_window::copy_image_to_clipboard (const QString& file, bool remove_file)
+{
+  QClipboard *clipboard = QApplication::clipboard ();
+
+  QImage img (file);
+
+  if (img.isNull ())
     {
-      settingsDialog->write_changed_settings ();
-      QSettings *settings = resource_manager::get_settings ();
-      if (settings)
-        emit settings_changed (settings);
+      // Report error?
+      return;
     }
-  delete settingsDialog;
+
+  clipboard->setImage (img);
+
+  if (remove_file)
+    QFile::remove (file);
 }
 
+void
+main_window::request_reload_settings ()
+{
+  QSettings *settings = resource_manager::get_settings ();
+
+  if (settings)
+    emit settings_changed (settings);
+}
 
 void
 main_window::notice_settings (const QSettings *settings)
@@ -641,12 +757,73 @@
   else
     _release_notes_icon = ":/actions/icons/logo.png";
 
-  int icon_size = settings->value ("toolbar_icon_size",16).toInt ();
+  int icon_size_settings = settings->value ("toolbar_icon_size",0).toInt ();
+  QStyle *st = style ();
+  int icon_size = st->pixelMetric (QStyle::PM_ToolBarIconSize);
+
+  if (icon_size_settings == 1)
+    icon_size = st->pixelMetric (QStyle::PM_LargeIconSize);
+  else if (icon_size_settings == -1)
+    icon_size = st->pixelMetric (QStyle::PM_SmallIconSize);
+
   _main_tool_bar->setIconSize (QSize (icon_size,icon_size));
 
+  if (settings->value ("show_status_bar",true).toBool ())
+    status_bar->show ();
+  else
+    status_bar->hide ();
+
+  _prevent_readline_conflicts =
+    settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ();
+
+  _suppress_dbg_location =
+        ! settings->value ("terminal/print_debug_location", false).toBool ();
+
   resource_manager::update_network_settings ();
+
+  emit active_dock_changed (0, _active_dock); // update dock widget styles
+
+  configure_shortcuts ();
+  set_global_shortcuts (_active_dock == command_window);
+  set_global_edit_shortcuts (_active_dock == editor_window);
 }
 
+void
+main_window::confirm_shutdown_octave (void)
+{
+  bool closenow = true;
+
+  if (_start_gui)
+    {
+      QSettings *settings = resource_manager::get_settings ();
+
+      if (settings->value ("prompt_to_exit", false).toBool ())
+        {
+          int ans = QMessageBox::question (this, tr ("Octave"),
+                                           tr ("Are you sure you want to exit Octave?"),
+                                           QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
+
+          if (ans !=  QMessageBox::Ok)
+            closenow = false;
+        }
+
+#ifdef HAVE_QSCINTILLA
+      if (closenow)
+        closenow = editor_window->check_closing ();
+#endif
+    }
+
+  // Wait for link thread to go to sleep state.
+  _octave_qt_link->mutex.lock ();
+
+  _octave_qt_link->shutdown_confirmation (closenow);
+
+  _octave_qt_link->mutex.unlock ();
+
+  // Awake the worker thread so that it continues shutting down (or not).
+  _octave_qt_link->waitcondition.wakeAll ();
+
+}
 
 void
 main_window::prepare_to_exit (void)
@@ -655,7 +832,7 @@
 }
 
 void
-main_window::exit (int status)
+main_window::exit_app (int status)
 {
   qApp->exit (status);
 }
@@ -683,8 +860,6 @@
 
   _current_directory_combo_box->insertItem (0, dir);
   _current_directory_combo_box->setCurrentIndex (0);
-
-  file_browser_window->update_octave_directory (dir);
 }
 
 void
@@ -855,7 +1030,8 @@
 main_window::closeEvent (QCloseEvent *e)
 {
   e->ignore ();
-  octave_link::post_event (this, &main_window::exit_callback);
+  octave_cmd_exec *cmd = new octave_cmd_exec ("exit");
+  queue_command (cmd);
 }
 
 void
@@ -882,6 +1058,12 @@
 }
 
 void
+main_window::init_terminal_size (void)
+{
+  emit init_terminal_size_signal ();
+}
+
+void
 main_window::set_window_layout (QSettings *settings)
 {
 #if ! defined (Q_OS_WIN32)
@@ -965,6 +1147,10 @@
 {
   foreach (octave_dock_widget *widget, dock_widget_list ())
     widget->connect_visibility_changed ();
+
+#ifdef HAVE_QSCINTILLA
+  editor_window->enable_menu_shortcuts (false);
+#endif
 }
 
 void
@@ -1000,13 +1186,29 @@
     emit pasteClipboard_signal ();
 }
 
+void
+main_window::selectAll (void)
+{
+  if (_current_directory_combo_box->hasFocus ())
+    {
+      QLineEdit * edit = _current_directory_combo_box->lineEdit ();
+      if (edit)
+        {
+          edit->selectAll ();
+        }
+    }
+  else
+    emit selectAll_signal ();
+}
+
+
 // Connect the signals emitted when the Octave thread wants to create
 // a dialog box of some sort.  Perhaps a better place for this would be
 // as part of the QUIWidgetCreator class.  However, mainWindow currently
 // is not a global variable and not accessible for connecting.
 
 void
-main_window::connect_uiwidget_links ()
+main_window::connect_uiwidget_links (void)
 {
   connect (&uiwidget_creator,
            SIGNAL (create_dialog (const QString&, const QString&,
@@ -1125,11 +1327,6 @@
 main_window::construct (void)
 {
   _closing = false;   // flag for editor files when closed
-  setWindowIcon (QIcon (":/actions/icons/logo.png"));
-
-  workspace_window->setModel (_workspace_model);
-  connect (_workspace_model, SIGNAL (model_changed (void)),
-           workspace_window, SLOT (handle_model_changed (void)));
 
   // Create and set the central widget.  QMainWindow takes ownership of
   // the widget (pointer) so there is no need to delete the object upon
@@ -1142,177 +1339,249 @@
   dummyWidget->hide ();
   setCentralWidget (dummyWidget);
 
-  construct_menu_bar ();
-
-  construct_tool_bar ();
-
-  construct_warning_bar ();
-
-  connect (qApp, SIGNAL (aboutToQuit ()),
-           this, SLOT (prepare_to_exit ()));
-
-  connect (this, SIGNAL (settings_changed (const QSettings *)),
-           this, SLOT (notice_settings (const QSettings *)));
-
-  connect (file_browser_window, SIGNAL (load_file_signal (const QString&)),
-           this, SLOT (handle_load_workspace_request (const QString&)));
-
-  connect (file_browser_window, SIGNAL (find_files_signal (const QString&)),
-           this, SLOT (find_files (const QString&)));
-
-  connect (this, SIGNAL (set_widget_shortcuts_signal (bool)),
-           editor_window, SLOT (set_shortcuts (bool)));
-
   connect_uiwidget_links ();
 
-  setWindowTitle ("Octave");
-
-  setDockOptions (QMainWindow::AnimatedDocks
-                  | QMainWindow::AllowNestedDocks
-                  | QMainWindow::AllowTabbedDocks);
-
-  addDockWidget (Qt::RightDockWidgetArea, command_window);
-  addDockWidget (Qt::RightDockWidgetArea, doc_browser_window);
-  tabifyDockWidget (command_window, doc_browser_window);
+  construct_octave_qt_link ();
+
+  if (_start_gui)
+    {
+      setWindowIcon (QIcon (":/actions/icons/logo.png"));
+
+      workspace_window->setModel (_workspace_model);
+      connect (_workspace_model, SIGNAL (model_changed (void)),
+               workspace_window, SLOT (handle_model_changed (void)));
+
+      construct_menu_bar ();
+
+      construct_tool_bar ();
+
+      connect (qApp, SIGNAL (aboutToQuit ()),
+               this, SLOT (prepare_to_exit ()));
+
+      connect (qApp, SIGNAL (focusChanged (QWidget*, QWidget*)),
+               this, SLOT(focus_changed (QWidget*, QWidget*)));
+
+      connect (this, SIGNAL (settings_changed (const QSettings *)),
+               this, SLOT (notice_settings (const QSettings *)));
+
+      connect (this, SIGNAL (editor_focus_changed (bool)),
+               this, SLOT (set_global_edit_shortcuts (bool)));
+
+      connect (this, SIGNAL (editor_focus_changed (bool)),
+               editor_window, SLOT (enable_menu_shortcuts (bool)));
+
+      connect (file_browser_window, SIGNAL (load_file_signal (const QString&)),
+               this, SLOT (handle_load_workspace_request (const QString&)));
+
+      connect (file_browser_window, SIGNAL (find_files_signal (const QString&)),
+               this, SLOT (find_files (const QString&)));
+
+      setWindowTitle ("Octave");
+
+      setDockOptions (QMainWindow::AnimatedDocks
+                      | QMainWindow::AllowNestedDocks
+                      | QMainWindow::AllowTabbedDocks);
+
+      addDockWidget (Qt::RightDockWidgetArea, command_window);
+      addDockWidget (Qt::RightDockWidgetArea, doc_browser_window);
+      tabifyDockWidget (command_window, doc_browser_window);
+
+#ifdef HAVE_QSCINTILLA
+      addDockWidget (Qt::RightDockWidgetArea, editor_window);
+      tabifyDockWidget (command_window, editor_window);
+#endif
+
+      addDockWidget (Qt::LeftDockWidgetArea, file_browser_window);
+      addDockWidget (Qt::LeftDockWidgetArea, workspace_window);
+      addDockWidget (Qt::LeftDockWidgetArea, history_window);
+
+      int win_x = QApplication::desktop ()->width ();
+      int win_y = QApplication::desktop ()->height ();
+
+      if (win_x > 960)
+        win_x = 960;
+
+      if (win_y > 720)
+        win_y = 720;
+
+      setGeometry (0, 0, win_x, win_y);
+
+      setStatusBar (status_bar);
 
 #ifdef HAVE_QSCINTILLA
-  addDockWidget (Qt::RightDockWidgetArea, editor_window);
-  tabifyDockWidget (command_window, editor_window);
+      connect (this,
+               SIGNAL (insert_debugger_pointer_signal (const QString&, int)),
+               editor_window,
+               SLOT (handle_insert_debugger_pointer_request (const QString&, int)));
+
+      connect (this,
+               SIGNAL (delete_debugger_pointer_signal (const QString&, int)),
+               editor_window,
+               SLOT (handle_delete_debugger_pointer_request (const QString&, int)));
+
+      connect (this,
+               SIGNAL (update_breakpoint_marker_signal (bool, const QString&, int)),
+               editor_window,
+               SLOT (handle_update_breakpoint_marker_request (bool,
+                                                              const QString&,
+                                                              int)));
 #endif
 
-  addDockWidget (Qt::LeftDockWidgetArea, file_browser_window);
-  addDockWidget (Qt::LeftDockWidgetArea, workspace_window);
-  addDockWidget (Qt::LeftDockWidgetArea, history_window);
-
-  int win_x = QApplication::desktop ()->width ();
-  int win_y = QApplication::desktop ()->height ();
-
-  if (win_x > 960)
-    win_x = 960;
-
-  if (win_y > 720)
-    win_y = 720;
-
-  setGeometry (0, 0, win_x, win_y);
-
-  setStatusBar (status_bar);
-
-  construct_octave_qt_link ();
-
+      octave_link::post_event (this, &main_window::resize_command_window_callback);
+
+      configure_shortcuts ();
+    }
+}
+
+
+void
+main_window::handle_octave_ready ()
+{
+  // actions after the startup files are executed
+  QSettings *settings = resource_manager::get_settings ();
+
+  QDir startup_dir = QDir ();    // current octave dir after startup
+
+  if (settings)
+    {
+      if (settings->value ("restore_octave_dir").toBool ())
+        {
+          // restore last dir from previous session
+          QStringList curr_dirs
+            = settings->value ("MainWindow/current_directory_list").toStringList ();
+          startup_dir = QDir (curr_dirs.at (0));  // last dir in previous session
+        }
+      else if (! settings->value ("octave_startup_dir").toString ().isEmpty ())
+        {
+          // do not restore but there is a startup dir configured
+          startup_dir = QDir (settings->value ("octave_startup_dir").toString ());
+        }
+    }
+
+  if (! startup_dir.exists ())
+    {
+      // the configured startup dir does not exist, take actual one
+      startup_dir = QDir ();
+    }
+
+  set_current_working_directory (startup_dir.absolutePath ());
+
+  if (editor_window)
+    {
 #ifdef HAVE_QSCINTILLA
-  connect (this,
-           SIGNAL (insert_debugger_pointer_signal (const QString&, int)),
-           editor_window,
-           SLOT (handle_insert_debugger_pointer_request (const QString&, int)));
-
-  connect (this,
-           SIGNAL (delete_debugger_pointer_signal (const QString&, int)),
-           editor_window,
-           SLOT (handle_delete_debugger_pointer_request (const QString&, int)));
-
-  connect (this,
-           SIGNAL (update_breakpoint_marker_signal (bool, const QString&, int)),
-           editor_window,
-           SLOT (handle_update_breakpoint_marker_request (bool,
-                                                          const QString&,
-                                                          int)));
+      // Octave ready, determine whether to create an empty script.
+      // This can not be done when the editor is created because all functions
+      // must be known for the lexer's auto completion informations
+      editor_window->empty_script (true, false);
 #endif
-
-  QDir curr_dir;
-  set_current_working_directory (curr_dir.absolutePath ());
-
-  octave_link::post_event (this, &main_window::resize_command_window_callback);
-
-  set_global_shortcuts (true);
+    }
+
+  if (_start_gui)
+    focus_command_window ();  // make sure that the command window has focus
 
 }
 
+
 void
 main_window::construct_octave_qt_link (void)
 {
-  _octave_qt_link = new octave_qt_link ();
-
-  connect (_octave_qt_link, SIGNAL (exit_signal (int)),
-           this, SLOT (exit (int)));
-
-  connect (_octave_qt_link,
-           SIGNAL (set_workspace_signal
-                   (bool, const QString&, const QStringList&,
-                    const QStringList&, const QStringList&,
-                    const QStringList&, const QIntList&)),
-           _workspace_model,
-           SLOT (set_workspace
-                 (bool, const QString&, const QStringList&,
-                  const QStringList&, const QStringList&,
-                  const QStringList&, const QIntList&)));
-
-  connect (_octave_qt_link, SIGNAL (clear_workspace_signal ()),
-           _workspace_model, SLOT (clear_workspace ()));
-
-  connect (_octave_qt_link, SIGNAL (change_directory_signal (QString)),
-           this, SLOT (change_directory (QString)));
-
-  connect (_octave_qt_link,
-           SIGNAL (execute_command_in_terminal_signal (QString)),
-           this, SLOT (execute_command_in_terminal (QString)));
-
-  connect (_octave_qt_link,
-           SIGNAL (set_history_signal (const QStringList&)),
-           history_window, SLOT (set_history (const QStringList&)));
-
-  connect (_octave_qt_link,
-           SIGNAL (append_history_signal (const QString&)),
-           history_window, SLOT (append_history (const QString&)));
-
-  connect (_octave_qt_link,
-           SIGNAL (clear_history_signal (void)),
-           history_window, SLOT (clear_history (void)));
-
-  connect (_octave_qt_link, SIGNAL (enter_debugger_signal ()),
-           this, SLOT (handle_enter_debugger ()));
-
-  connect (_octave_qt_link, SIGNAL (exit_debugger_signal ()),
-           this, SLOT (handle_exit_debugger ()));
-
-  connect (_octave_qt_link,
-           SIGNAL (show_preferences_signal (void)),
-           this, SLOT (process_settings_dialog_request ()));
+  _octave_qt_link = new octave_qt_link (this);
+
+  connect (_octave_qt_link, SIGNAL (exit_app_signal (int)),
+           this, SLOT (exit_app (int)));
+
+  connect (_octave_qt_link, SIGNAL (confirm_shutdown_signal ()),
+           this, SLOT (confirm_shutdown_octave ()));
+
+  if (_start_gui)
+    {
+      connect (_octave_qt_link,
+               SIGNAL (set_workspace_signal
+                       (bool, bool, const QString&, const QStringList&,
+                        const QStringList&, const QStringList&,
+                        const QStringList&, const QIntList&)),
+               _workspace_model,
+               SLOT (set_workspace
+                     (bool, bool, const QString&, const QStringList&,
+                      const QStringList&, const QStringList&,
+                      const QStringList&, const QIntList&)));
+
+      connect (_octave_qt_link, SIGNAL (clear_workspace_signal ()),
+               _workspace_model, SLOT (clear_workspace ()));
+
+      connect (_octave_qt_link, SIGNAL (change_directory_signal (QString)),
+               this, SLOT (change_directory (QString)));
+      connect (_octave_qt_link, SIGNAL (change_directory_signal (QString)),
+               file_browser_window, SLOT (update_octave_directory (QString)));
+      connect (_octave_qt_link, SIGNAL (change_directory_signal (QString)),
+               editor_window, SLOT (update_octave_directory (QString)));
+
+      connect (_octave_qt_link,
+               SIGNAL (execute_command_in_terminal_signal (QString)),
+               this, SLOT (execute_command_in_terminal (QString)));
+
+      connect (_octave_qt_link,
+               SIGNAL (set_history_signal (const QStringList&)),
+               history_window, SLOT (set_history (const QStringList&)));
+
+      connect (_octave_qt_link,
+               SIGNAL (append_history_signal (const QString&)),
+               history_window, SLOT (append_history (const QString&)));
+
+      connect (_octave_qt_link,
+               SIGNAL (clear_history_signal (void)),
+               history_window, SLOT (clear_history (void)));
+
+      connect (_octave_qt_link, SIGNAL (enter_debugger_signal ()),
+               this, SLOT (handle_enter_debugger ()));
+
+      connect (_octave_qt_link, SIGNAL (exit_debugger_signal ()),
+               this, SLOT (handle_exit_debugger ()));
+
+      connect (_octave_qt_link,
+               SIGNAL (show_preferences_signal (void)),
+               this, SLOT (process_settings_dialog_request ()));
+
+      connect (_octave_qt_link,
+               SIGNAL (copy_image_to_clipboard_signal (const QString&, bool)),
+               this, SLOT (copy_image_to_clipboard (const QString&, bool)));
 
 #ifdef HAVE_QSCINTILLA
-  connect (_octave_qt_link,
-           SIGNAL (edit_file_signal (const QString&)),
-           editor_window,
-           SLOT (handle_edit_file_request (const QString&)));
+      connect (_octave_qt_link,
+               SIGNAL (edit_file_signal (const QString&)),
+               editor_window,
+               SLOT (handle_edit_file_request (const QString&)));
 #endif
 
-  connect (_octave_qt_link,
-           SIGNAL (insert_debugger_pointer_signal (const QString&, int)),
-           this,
-           SLOT (handle_insert_debugger_pointer_request (const QString&, int)));
-
-  connect (_octave_qt_link,
-           SIGNAL (delete_debugger_pointer_signal (const QString&, int)),
-           this,
-           SLOT (handle_delete_debugger_pointer_request (const QString&, int)));
-
-  connect (_octave_qt_link,
-           SIGNAL (update_breakpoint_marker_signal (bool, const QString&, int)),
-           this,
-           SLOT (handle_update_breakpoint_marker_request (bool, const QString&,
-                                                          int)));
-
-  connect (_octave_qt_link,
-           SIGNAL (show_doc_signal (const QString &)),
-           this, SLOT (handle_show_doc (const QString &)));
-
-  connect (_workspace_model,
-           SIGNAL (rename_variable (const QString&, const QString&)),
-           this,
-           SLOT (handle_rename_variable_request (const QString&,
-                                                 const QString&)));
-
-  connect (command_window, SIGNAL (interrupt_signal (void)),
-           _octave_qt_link, SLOT (terminal_interrupt (void)));
+      connect (_octave_qt_link,
+               SIGNAL (insert_debugger_pointer_signal (const QString&, int)),
+               this,
+               SLOT (handle_insert_debugger_pointer_request (const QString&, int)));
+
+      connect (_octave_qt_link,
+               SIGNAL (delete_debugger_pointer_signal (const QString&, int)),
+               this,
+               SLOT (handle_delete_debugger_pointer_request (const QString&, int)));
+
+      connect (_octave_qt_link,
+               SIGNAL (update_breakpoint_marker_signal (bool, const QString&, int)),
+               this,
+               SLOT (handle_update_breakpoint_marker_request (bool, const QString&,
+                                                              int)));
+
+      connect (_octave_qt_link,
+               SIGNAL (show_doc_signal (const QString &)),
+               this, SLOT (handle_show_doc (const QString &)));
+
+      connect (_workspace_model,
+               SIGNAL (rename_variable (const QString&, const QString&)),
+               this,
+               SLOT (handle_rename_variable_request (const QString&,
+                                                     const QString&)));
+
+      connect (command_window, SIGNAL (interrupt_signal (void)),
+               _octave_qt_link, SLOT (terminal_interrupt (void)));
+    }
 
   _octave_qt_link->execute_interpreter ();
 
@@ -1337,54 +1606,96 @@
   construct_news_menu (menu_bar);
 }
 
+QAction*
+main_window::add_action (QMenu *menu, const QIcon &icon, const QString &text,
+                         const char *member, const QWidget *receiver)
+{
+  QAction *a;
+
+  if (receiver)
+    a = menu->addAction (icon, text, receiver, member);
+  else
+    a = menu->addAction (icon, text, this, member);
+
+  addAction (a);  // important for shortcut context
+  a->setShortcutContext (Qt::ApplicationShortcut);
+  return a;
+}
+
+void
+main_window::enable_menu_shortcuts (bool enable)
+{
+  QHash<QMenu*, QStringList>::const_iterator i = _hash_menu_text.constBegin();
+
+  while (i != _hash_menu_text.constEnd())
+    {
+      i.key ()->setTitle (i.value ().at (! enable));
+      ++i;
+    }
+}
+
+QMenu*
+main_window::m_add_menu (QMenuBar *p, QString name)
+{
+  QMenu *menu = p->addMenu (name);
+
+  QString base_name = name;  // get a copy
+  // replace intended '&' ("&&") by a temp. string
+  base_name.replace ("&&","___octave_amp_replacement___");
+  // remove single '&' (shortcut)
+  base_name.remove ("&");
+  // restore intended '&'
+  base_name.replace ("___octave_amp_replacement___","&&");
+
+  // remember names with and without shortcut
+  _hash_menu_text[menu] = QStringList () << name << base_name;
+
+  return menu;
+}
+
 void
 main_window::construct_file_menu (QMenuBar *p)
 {
-  QMenu *file_menu = p->addMenu (tr ("&File"));
+  QMenu *file_menu = m_add_menu (p, tr ("&File"));
 
   construct_new_menu (file_menu);
 
   _open_action
-    = file_menu->addAction (QIcon (":/actions/icons/folder_documents.png"),
+    = file_menu->addAction (resource_manager::icon ("document-open"),
                             tr ("Open..."));
   _open_action->setShortcutContext (Qt::ApplicationShortcut);
-
+  _open_action->setToolTip (tr ("Open an existing file in editor"));
 
 #ifdef HAVE_QSCINTILLA
+  editor_window->insert_new_open_actions (_new_script_action,
+                                          _new_function_action,
+                                          _open_action);
+
   file_menu->addMenu (editor_window->get_mru_menu ());
 #endif
 
   file_menu->addSeparator ();
 
-  QAction *load_workspace_action
+  _load_workspace_action
     = file_menu->addAction (tr ("Load Workspace..."));
 
-  QAction *save_workspace_action
+  _save_workspace_action
     = file_menu->addAction (tr ("Save Workspace As..."));
 
   file_menu->addSeparator ();
 
-  QAction *preferences_action
-    = file_menu->addAction (QIcon (":/actions/icons/configure.png"),
-                            tr ("Preferences..."));
-
-  file_menu->addSeparator ();
-
   _exit_action = file_menu->addAction (tr ("Exit"));
   _exit_action->setShortcutContext (Qt::ApplicationShortcut);
 
-  connect (preferences_action, SIGNAL (triggered ()),
-           this, SLOT (process_settings_dialog_request ()));
-
 #ifdef HAVE_QSCINTILLA
   connect (_open_action, SIGNAL (triggered ()),
            editor_window, SLOT (request_open_file ()));
 #endif
 
-  connect (load_workspace_action, SIGNAL (triggered ()),
+  connect (_load_workspace_action, SIGNAL (triggered ()),
            this, SLOT (handle_load_workspace_request ()));
 
-  connect (save_workspace_action, SIGNAL (triggered ()),
+  connect (_save_workspace_action, SIGNAL (triggered ()),
            this, SLOT (handle_save_workspace_request ()));
 
   connect (_exit_action, SIGNAL (triggered ()),
@@ -1397,16 +1708,16 @@
   QMenu *new_menu = p->addMenu (tr ("New"));
 
   _new_script_action
-    = new_menu->addAction (QIcon (":/actions/icons/filenew.png"),
-                           tr ("Script"));
+    = new_menu->addAction (resource_manager::icon ("document-new"),
+                           tr ("New Script"));
   _new_script_action->setShortcutContext (Qt::ApplicationShortcut);
 
-  _new_function_action = new_menu->addAction (tr ("Function..."));
+  _new_function_action = new_menu->addAction (tr ("New Function..."));
   _new_function_action->setEnabled (true);
   _new_function_action->setShortcutContext (Qt::ApplicationShortcut);
 
-  QAction *new_figure_action = new_menu->addAction (tr ("Figure"));
-  new_figure_action->setEnabled (true);
+  _new_figure_action = new_menu->addAction (tr ("New Figure"));
+  _new_figure_action->setEnabled (true);
 
 #ifdef HAVE_QSCINTILLA
   connect (_new_script_action, SIGNAL (triggered ()),
@@ -1416,33 +1727,32 @@
            editor_window, SLOT (request_new_function ()));
 #endif
 
-  connect (new_figure_action, SIGNAL (triggered ()),
+  connect (_new_figure_action, SIGNAL (triggered ()),
            this, SLOT (handle_new_figure_request ()));
 }
 
 void
 main_window::construct_edit_menu (QMenuBar *p)
 {
-  QMenu *edit_menu = p->addMenu (tr ("&Edit"));
+  QMenu *edit_menu = m_add_menu (p, tr ("&Edit"));
 
   QKeySequence ctrl_shift = Qt::ControlModifier + Qt::ShiftModifier;
 
   _undo_action
-    = edit_menu->addAction (QIcon (":/actions/icons/undo.png"), tr ("Undo"));
-  _undo_action->setShortcut (QKeySequence::Undo);
+    = edit_menu->addAction (resource_manager::icon ("edit-undo"), tr ("Undo"));
 
   edit_menu->addSeparator ();
 
   _copy_action
-    = edit_menu->addAction (QIcon (":/actions/icons/editcopy.png"),
+    = edit_menu->addAction (resource_manager::icon ("edit-copy"),
                             tr ("Copy"), this, SLOT (copyClipboard ()));
-  _copy_action->setShortcut (QKeySequence::Copy);
-
 
   _paste_action
-    = edit_menu->addAction (QIcon (":/actions/icons/editpaste.png"),
+    = edit_menu->addAction (resource_manager::icon ("edit-paste"),
                             tr ("Paste"), this, SLOT (pasteClipboard ()));
-  _paste_action->setShortcut (QKeySequence::Paste);
+
+  _select_all_action
+    = edit_menu->addAction (tr ("Select All"), this, SLOT (selectAll ()));
 
   _clear_clipboard_action
     = edit_menu->addAction (tr ("Clear Clipboard"), this,
@@ -1450,45 +1760,56 @@
 
   edit_menu->addSeparator ();
 
-  _find_files_action = edit_menu->addAction (tr ("Find Files..."));
+  _find_files_action 
+    = edit_menu->addAction (resource_manager::icon ("edit-find"),
+                             tr ("Find Files..."));
 
   edit_menu->addSeparator ();
 
-  QAction *clear_command_window_action
+  _clear_command_window_action
     = edit_menu->addAction (tr ("Clear Command Window"));
 
-  QAction *clear_command_history
+  _clear_command_history_action
     = edit_menu->addAction (tr ("Clear Command History"));
 
-  QAction *clear_workspace_action
+  _clear_workspace_action
     = edit_menu->addAction (tr ("Clear Workspace"));
 
+  edit_menu->addSeparator ();
+
+  _preferences_action
+    = edit_menu->addAction (resource_manager::icon ("preferences-system"),
+                            tr ("Preferences..."));
+
   connect (_find_files_action, SIGNAL (triggered ()),
            this, SLOT (find_files ()));
 
-  connect (clear_command_window_action, SIGNAL (triggered ()),
+  connect (_clear_command_window_action, SIGNAL (triggered ()),
            this, SLOT (handle_clear_command_window_request ()));
 
-  connect (clear_command_history, SIGNAL (triggered ()),
+  connect (_clear_command_history_action, SIGNAL (triggered ()),
            this, SLOT (handle_clear_history_request ()));
 
-  connect (clear_workspace_action, SIGNAL (triggered ()),
+  connect (_clear_workspace_action, SIGNAL (triggered ()),
            this, SLOT (handle_clear_workspace_request ()));
 
   connect (_clipboard, SIGNAL (changed (QClipboard::Mode)),
            this, SLOT (clipboard_has_changed (QClipboard::Mode)));
   clipboard_has_changed (QClipboard::Clipboard);
+
+  connect (_preferences_action, SIGNAL (triggered ()),
+           this, SLOT (process_settings_dialog_request ()));
 }
 
 QAction *
-main_window::construct_debug_menu_item (const char *icon_file,
-                                        const QString& item,
-                                        const QKeySequence& key)
+main_window::construct_debug_menu_item (const char *icon, const QString& item,
+                                        const char *member)
 {
-  QAction *action = _debug_menu->addAction (QIcon (icon_file), item);
+  QAction *action = add_action (_debug_menu, 
+                                  resource_manager::icon (QString (icon)), 
+                                item, member);
 
   action->setEnabled (false);
-  action->setShortcut (key);
 
 #ifdef HAVE_QSCINTILLA
   editor_window->debug_menu ()->addAction (action);
@@ -1501,445 +1822,172 @@
 void
 main_window::construct_debug_menu (QMenuBar *p)
 {
-  _debug_menu = p->addMenu (tr ("De&bug"));
-
-  _debug_step_over = construct_debug_menu_item
-                       (":/actions/icons/db_step.png", tr ("Step"),
-                        Qt::Key_F10);
-
-  _debug_step_into = construct_debug_menu_item
-                       (":/actions/icons/db_step_in.png", tr ("Step In"),
-                        Qt::Key_F11);
-
-  _debug_step_out = construct_debug_menu_item
-                      (":/actions/icons/db_step_out.png", tr ("Step Out"),
-                       Qt::ShiftModifier + Qt::Key_F11);
-
-  _debug_continue = construct_debug_menu_item
-                      (":/actions/icons/db_cont.png", tr ("Continue"),
-                       Qt::Key_F5);
+  _debug_menu = m_add_menu (p, tr ("De&bug"));
+
+  _debug_step_over = construct_debug_menu_item (
+                      "db-step", tr ("Step"),
+                       SLOT (debug_step_over ()));
+
+  _debug_step_into = construct_debug_menu_item (
+                      "db-step-in", tr ("Step In"),
+                       SLOT (debug_step_into ()));
+
+  _debug_step_out = construct_debug_menu_item (
+                      "db-step-out", tr ("Step Out"),
+                       SLOT (debug_step_out ()));
+
+  _debug_continue = construct_debug_menu_item (
+                      "db-cont", tr ("Continue"),
+                       SLOT (debug_continue ()));
 
   _debug_menu->addSeparator ();
 #ifdef HAVE_QSCINTILLA
   editor_window->debug_menu ()->addSeparator ();
 #endif
 
-  _debug_quit = construct_debug_menu_item
-                (":/actions/icons/db_stop.png", tr ("Exit Debug Mode"),
-                 Qt::ShiftModifier + Qt::Key_F5);
-
-  connect (_debug_step_over, SIGNAL (triggered ()),
-           this, SLOT (debug_step_over ()));
-
-  connect (_debug_step_into, SIGNAL (triggered ()),
-           this, SLOT (debug_step_into ()));
-
-  connect (_debug_step_out, SIGNAL (triggered ()),
-           this, SLOT (debug_step_out ()));
-
-  connect (_debug_continue, SIGNAL (triggered ()),
-           this, SLOT (debug_continue ()));
-
-  connect (_debug_quit, SIGNAL (triggered ()),
-           this, SLOT (debug_quit ()));
+  _debug_quit = construct_debug_menu_item (
+                      "db-stop", tr ("Quit Debug Mode"),
+                       SLOT (debug_quit ()));
 }
 
 QAction *
 main_window::construct_window_menu_item (QMenu *p, const QString& item,
-                                         bool checkable,
-                                         const QKeySequence& key)
+                                         bool checkable, QWidget *widget)
 {
-  QAction *action = p->addAction (item);
-
+  QAction *action = p->addAction (QIcon (), item);
+
+  addAction (action);  // important for shortcut context
   action->setCheckable (checkable);
-  action->setShortcut (key);
   action->setShortcutContext (Qt::ApplicationShortcut);
 
+  if (widget)  // might be zero for editor_window
+    {
+      if (checkable)
+        {
+          // action for visibilty of dock widget
+          connect (action, SIGNAL (toggled (bool)),
+                   widget, SLOT (setVisible (bool)));
+
+          connect (widget, SIGNAL (active_changed (bool)),
+                   action, SLOT (setChecked (bool)));
+        }
+      else
+        {
+          // action for focus of dock widget
+          connect (action, SIGNAL (triggered ()), widget, SLOT (focus ()));
+        }
+    }
+
   return action;
 }
 
 void
 main_window::construct_window_menu (QMenuBar *p)
 {
-  QMenu *window_menu = p->addMenu (tr ("&Window"));
-
-  QKeySequence ctrl = Qt::ControlModifier;
-  QKeySequence ctrl_shift = Qt::ControlModifier + Qt::ShiftModifier;
-
-  QAction *show_command_window_action = construct_window_menu_item
-                                        (window_menu,
-                                         tr ("Show Command Window"), true,
-                                         ctrl_shift + Qt::Key_0);
-
-  QAction *show_history_action = construct_window_menu_item
-                                 (window_menu, tr ("Show Command History"),
-                                  true, ctrl_shift + Qt::Key_1);
-
-  QAction *show_file_browser_action =  construct_window_menu_item
-                                       (window_menu, tr ("Show File Browser"),
-                                        true, ctrl_shift + Qt::Key_2);
-
-  QAction *show_workspace_action = construct_window_menu_item
-                                   (window_menu, tr ("Show Workspace"), true,
-                                    ctrl_shift + Qt::Key_3);
-
-  QAction *show_editor_action = construct_window_menu_item
-                                (window_menu, tr ("Show Editor"), true,
-                                 ctrl_shift + Qt::Key_4);
-
-  QAction *show_documentation_action = construct_window_menu_item
-                                       (window_menu, tr ("Show Documentation"),
-                                        true, ctrl_shift + Qt::Key_5);
-
-  window_menu->addSeparator ();
-
-  QAction *command_window_action = construct_window_menu_item
-                                   (window_menu, tr ("Command Window"), false,
-                                    ctrl + Qt::Key_0);
-
-  QAction *history_action = construct_window_menu_item
-                            (window_menu, tr ("Command History"), false,
-                             ctrl + Qt::Key_1);
-
-  QAction *file_browser_action = construct_window_menu_item
-                                 (window_menu, tr ("File Browser"), false,
-                                  ctrl + Qt::Key_2);
-
-  QAction *workspace_action = construct_window_menu_item
-                              (window_menu, tr ("Workspace"), false,
-                               ctrl + Qt::Key_3);
-
-  QAction *editor_action = construct_window_menu_item
-                           (window_menu, tr ("Editor"), false,
-                            ctrl + Qt::Key_4);
-
-  QAction *documentation_action = construct_window_menu_item
-                                  (window_menu, tr ("Documentation"), false,
-                                   ctrl + Qt::Key_5);
+  QMenu *window_menu = m_add_menu (p, tr ("&Window"));
+
+  _show_command_window_action = construct_window_menu_item
+            (window_menu, tr ("Show Command Window"), true, command_window);
+
+  _show_history_action = construct_window_menu_item
+            (window_menu, tr ("Show Command History"), true, history_window);
+
+  _show_file_browser_action = construct_window_menu_item
+            (window_menu, tr ("Show File Browser"), true, file_browser_window);
+
+  _show_workspace_action = construct_window_menu_item
+            (window_menu, tr ("Show Workspace"), true, workspace_window);
+
+  _show_editor_action = construct_window_menu_item
+            (window_menu, tr ("Show Editor"), true, editor_window);
+
+  _show_documentation_action = construct_window_menu_item
+            (window_menu, tr ("Show Documentation"), true, doc_browser_window);
 
   window_menu->addSeparator ();
 
-  QAction *reset_windows_action
-    = window_menu->addAction (tr ("Reset Default Window Layout"));
-
-  connect (show_command_window_action, SIGNAL (toggled (bool)),
-           command_window, SLOT (setVisible (bool)));
-
-  connect (command_window, SIGNAL (active_changed (bool)),
-           show_command_window_action, SLOT (setChecked (bool)));
-
-  connect (show_workspace_action, SIGNAL (toggled (bool)),
-           workspace_window, SLOT (setVisible (bool)));
-
-  connect (workspace_window, SIGNAL (active_changed (bool)),
-           show_workspace_action, SLOT (setChecked (bool)));
-
-  connect (show_history_action, SIGNAL (toggled (bool)),
-           history_window, SLOT (setVisible (bool)));
-
-  connect (history_window, SIGNAL (active_changed (bool)),
-           show_history_action, SLOT (setChecked (bool)));
-
-  connect (show_file_browser_action, SIGNAL (toggled (bool)),
-           file_browser_window, SLOT (setVisible (bool)));
-
-  connect (file_browser_window, SIGNAL (active_changed (bool)),
-           show_file_browser_action, SLOT (setChecked (bool)));
-
-#ifdef HAVE_QSCINTILLA
-  connect (show_editor_action, SIGNAL (toggled (bool)),
-           editor_window, SLOT (setVisible (bool)));
-
-  connect (editor_window, SIGNAL (active_changed (bool)),
-           show_editor_action, SLOT (setChecked (bool)));
-#endif
-
-  connect (show_documentation_action, SIGNAL (toggled (bool)),
-           doc_browser_window, SLOT (setVisible (bool)));
-
-  connect (doc_browser_window, SIGNAL (active_changed (bool)),
-           show_documentation_action, SLOT (setChecked (bool)));
-
-  connect (command_window_action, SIGNAL (triggered ()),
-           command_window, SLOT (focus ()));
-
-  connect (workspace_action, SIGNAL (triggered ()),
-           workspace_window, SLOT (focus ()));
-
-  connect (history_action, SIGNAL (triggered ()),
-           history_window, SLOT (focus ()));
-
-  connect (file_browser_action, SIGNAL (triggered ()),
-           file_browser_window, SLOT (focus ()));
-
-#ifdef HAVE_QSCINTILLA
-  connect (editor_action, SIGNAL (triggered ()),
-           editor_window, SLOT (focus ()));
-#endif
-
-  connect (documentation_action, SIGNAL (triggered ()),
-           doc_browser_window, SLOT (focus ()));
-
-  connect (reset_windows_action, SIGNAL (triggered ()),
-           this, SLOT (reset_windows ()));
+  _command_window_action = construct_window_menu_item
+            (window_menu, tr ("Command Window"), false, command_window);
+
+  _history_action = construct_window_menu_item
+            (window_menu, tr ("Command History"), false, history_window);
+
+  _file_browser_action = construct_window_menu_item
+            (window_menu, tr ("File Browser"), false, file_browser_window);
+
+  _workspace_action = construct_window_menu_item
+            (window_menu, tr ("Workspace"), false, workspace_window);
+
+  _editor_action = construct_window_menu_item
+            (window_menu, tr ("Editor"), false, editor_window);
+
+  _documentation_action = construct_window_menu_item
+            (window_menu, tr ("Documentation"), false, doc_browser_window);
+
+  window_menu->addSeparator ();
+
+  _reset_windows_action = add_action (window_menu, QIcon (),
+              tr ("Reset Default Window Layout"), SLOT (reset_windows ()));
 }
 
 void
 main_window::construct_help_menu (QMenuBar *p)
 {
-  QMenu *help_menu = p->addMenu (tr ("&Help"));
+  QMenu *help_menu = m_add_menu (p, tr ("&Help"));
 
   construct_documentation_menu (help_menu);
 
   help_menu->addSeparator ();
 
-  QAction *report_bug_action
-    = help_menu->addAction (tr ("Report Bug"));
-
-  QAction *octave_packages_action
-    = help_menu->addAction (tr ("Octave Packages"));
-
-  QAction *agora_action
-    = help_menu->addAction (tr ("Share Code"));
-
-  QAction *contribute_action
-    = help_menu->addAction (tr ("Contribute to Octave"));
-
-  QAction *developer_action
-    = help_menu->addAction (tr ("Octave Developer Resources"));
+  _report_bug_action = add_action (help_menu, QIcon (),
+            tr ("Report Bug"), SLOT (open_bug_tracker_page ()));
+
+  _octave_packages_action =  add_action (help_menu, QIcon (),
+            tr ("Octave Packages"), SLOT (open_octave_packages_page ()));
+
+  _agora_action = add_action (help_menu, QIcon (),
+            tr ("Share Code"), SLOT (open_agora_page ()));
+
+  _contribute_action = add_action (help_menu, QIcon (),
+            tr ("Contribute to Octave"), SLOT (open_contribute_page ()));
+
+  _developer_action = add_action (help_menu, QIcon (),
+            tr ("Octave Developer Resources"), SLOT (open_developer_page ()));
 
   help_menu->addSeparator ();
 
-  QAction *about_octave_action
-    = help_menu->addAction (tr ("About Octave"));
-
-  connect (report_bug_action, SIGNAL (triggered ()),
-           this, SLOT (open_bug_tracker_page ()));
-
-  connect (octave_packages_action, SIGNAL (triggered ()),
-           this, SLOT (open_octave_packages_page ()));
-
-  connect (agora_action, SIGNAL (triggered ()),
-           this, SLOT (open_agora_page ()));
-
-  connect (contribute_action, SIGNAL (triggered ()),
-           this, SLOT (open_contribute_page ()));
-
-  connect (developer_action, SIGNAL (triggered ()),
-           this, SLOT (open_developer_page ()));
-
-  connect (about_octave_action, SIGNAL (triggered ()),
-           this, SLOT (show_about_octave ()));
+  _about_octave_action = add_action (help_menu, QIcon (),
+            tr ("About Octave"), SLOT (show_about_octave ()));
 }
 
 void
 main_window::construct_documentation_menu (QMenu *p)
 {
-  QMenu *documentation_menu = p->addMenu (tr ("Documentation"));
-
-  QAction *ondisk_documentation_action
-    = documentation_menu->addAction (tr ("On Disk"));
-
-  QAction *online_documentation_action
-    = documentation_menu->addAction (tr ("Online"));
-
-  connect (ondisk_documentation_action, SIGNAL (triggered ()),
-           doc_browser_window, SLOT (focus ()));
-
-  connect (online_documentation_action, SIGNAL (triggered ()),
-           this, SLOT (open_online_documentation_page ()));
+  QMenu *doc_menu = p->addMenu (tr ("Documentation"));
+
+  _ondisk_doc_action = add_action (doc_menu, QIcon (),
+                     tr ("On Disk"), SLOT (focus ()), doc_browser_window);
+
+  _online_doc_action = add_action (doc_menu, QIcon (),
+                     tr ("Online"), SLOT (open_online_documentation_page ()));
 }
 
 void
 main_window::construct_news_menu (QMenuBar *p)
 {
-  QMenu *news_menu = p->addMenu (tr ("&News"));
-
-  QAction *release_notes_action
-    = news_menu->addAction (tr ("Release Notes"));
-
-  QAction *current_news_action
-    = news_menu->addAction (tr ("Community News"));
-
-  connect (release_notes_action, SIGNAL (triggered ()),
-           this, SLOT (display_release_notes ()));
-
-  connect (current_news_action, SIGNAL (triggered ()),
-           this, SLOT (load_and_display_community_news ()));
-}
-
-void
-main_window::construct_warning_bar (void)
-{
-  QSettings *settings = resource_manager::get_settings ();
-
-  if (settings
-      && settings->value ("General/hide_new_gui_warning", false).toBool ())
-    {
-      construct_gui_info_button ();
-
-      return;
-    }
-
-  _warning_bar = new QDockWidget (this);
-  _warning_bar->setAttribute (Qt::WA_DeleteOnClose);
-
-  QFrame *box = new QFrame (_warning_bar);
-
-  QLabel *icon = new QLabel (box);
-  QIcon warning_icon
-    = QIcon::fromTheme ("dialog-warning",
-                        QIcon (":/actions/icons/warning.png"));
-  QPixmap icon_pixmap = warning_icon.pixmap (QSize (32, 32));
-  icon->setPixmap (icon_pixmap);
-
-  QTextBrowser *msg = new QTextBrowser (box);
-  msg->setOpenExternalLinks (true);
-  msg->setText
-    (tr ("<strong>You are using a release candidate of Octave's experimental GUI.</strong>  "
-         "Octave is under continuous improvement and the GUI will be the "
-         "default interface for the 4.0 release.  For more information, "
-         "select the \"Release Notes\" item in the \"News\" menu of the GUI, "
-         "or visit <a href=\"http://octave.org\">http://octave.org</a>."));
-
-  msg->setStyleSheet ("background-color: #ffd97f; color: black; margin 4px;");
-  msg->setMinimumWidth (100);
-  msg->setMinimumHeight (60);
-  msg->setMaximumHeight (80);
-  msg->setSizePolicy (QSizePolicy (QSizePolicy::Expanding,
-                                   QSizePolicy::Minimum));
-
-  QPushButton *info_button = new QPushButton (tr ("More Info"), box);
-  QPushButton *hide_button = new QPushButton (tr ("Hide"), box);
-
-  connect (info_button, SIGNAL (clicked ()),
-           this, SLOT (show_gui_info ()));
-
-  connect (hide_button, SIGNAL (clicked ()),
-           this, SLOT (hide_warning_bar ()));
-
-  QVBoxLayout *button_layout = new QVBoxLayout;
-
-  button_layout->addWidget (info_button);
-  button_layout->addWidget (hide_button);
-
-  QHBoxLayout *icon_and_message = new QHBoxLayout;
-
-  icon_and_message->addWidget (icon);
-  icon_and_message->addSpacing (10);
-  icon_and_message->addWidget (msg);
-  icon_and_message->addSpacing (10);
-  icon_and_message->addLayout (button_layout);
-
-  icon_and_message->setAlignment (hide_button, Qt::AlignTop);
-
-  box->setFrameStyle (QFrame::Box);
-  box->setLineWidth (2);
-  box->setMaximumWidth (1000);
-  box->adjustSize ();
-  box->setLayout (icon_and_message);
-
-  _warning_bar->setFeatures (QDockWidget::NoDockWidgetFeatures);
-  _warning_bar->setObjectName ("WarningToolBar");
-  _warning_bar->setWidget (box);
-
-  setCorner (Qt::TopLeftCorner, Qt::TopDockWidgetArea);
-  setCorner (Qt::TopRightCorner, Qt::TopDockWidgetArea);
-
-  addDockWidget (Qt::TopDockWidgetArea, _warning_bar);
-};
-
-void
-main_window::construct_gui_info_button (void)
-{
-  QIcon warning_icon
-    = QIcon::fromTheme ("dialog-warning",
-                        QIcon (":/actions/icons/warning.png"));
-
-  _gui_info_button
-    = new QPushButton (warning_icon, tr ("Experimental GUI Info"));
-
-  _main_tool_bar->addWidget (_gui_info_button);
-
-  connect (_gui_info_button, SIGNAL (clicked ()),
-           this, SLOT (show_gui_info ()));
-}
-
-void
-main_window::hide_warning_bar (void)
-{
-  QSettings *settings = resource_manager::get_settings ();
-
-  if (settings)
-    {
-      settings->setValue ("General/hide_new_gui_warning", true);
-
-      settings->sync ();
-    }
-
-  removeDockWidget (_warning_bar);
-
-  construct_gui_info_button ();
-}
-
-void
-main_window::show_gui_info (void)
-{
-  QString gui_info
-    ( QObject::tr ("<p><strong>A Note about Octave's New GUI</strong></p>"
-         "<p>One of the biggest new features for Octave 3.8 is a graphical "
-         "user interface.  It is the one thing that users have requested "
-         "most often over the last few years and now it is almost ready.  "
-         "But because it is not quite as polished as we would like, we "
-         "have decided to wait until the 4.0.x release series before "
-         "making the GUI the default interface.</p>"
-         "<p>Given the length of time and the number of bug fixes and "
-         "improvements since the last major release, we also "
-         "decided against delaying the release of all these new "
-         "improvements any longer just to perfect the GUI.  So please "
-         "enjoy the 3.8 release of Octave and the preview of the new GUI.  "
-         "We believe it is working reasonably well, but we also know that "
-         "there are some obvious rough spots and many things that could be "
-         "improved.</p>"
-         "<p><strong>We Need Your Help</strong></p>"
-         "<p>There are many ways that you can help us fix the remaining "
-         "problems, complete the GUI, and improve the overall user "
-         "experience for both novices and experts alike (links will open "
-         "an external browser):</p>"
-         "<p><ul><li>If you are a skilled software developer, you can "
-         "help by contributing your time to help "
-         "<a href=\"http://octave.org/get-involved.html\">develop "
-         "Octave</a>.</li>"
-         "<li>If Octave does not work properly, you are encouraged to "
-         "<a href=\"http://octave.org/bugs.html\">report problems </a> "
-         "that you find.</li>"
-         "<li>Whether you are a user or developer, you can "
-         "<a href=\"http://octave.org/donate.html\">help to fund the "
-         "project</a>.  "
-         "Octave development takes a lot of time and expertise.  "
-         "Your contributions help to ensure that Octave will continue "
-         "to improve.</li></ul></p>"
-         "<p>We hope you find Octave to be useful.  Please help us make "
-         "it even better for the future!</p>"));
-
-  QMessageBox gui_info_dialog (QMessageBox::Warning,
-                               tr ("Experimental GUI Info"),
-                               QString (gui_info.length (),' '), QMessageBox::Close);
-  QGridLayout *box_layout
-      = qobject_cast<QGridLayout *>(gui_info_dialog.layout());
-  if (box_layout)
-    {
-      QTextEdit *text = new QTextEdit(gui_info);
-      text->setReadOnly(true);
-      box_layout->addWidget(text, 0, 1);
-    }
-  gui_info_dialog.exec ();
+  QMenu *news_menu = m_add_menu (p, tr ("&News"));
+
+  _release_notes_action = add_action (news_menu, QIcon (),
+            tr ("Release Notes"), SLOT (display_release_notes ()));
+
+  _current_news_action = add_action (news_menu, QIcon (),
+            tr ("Community News"), SLOT (load_and_display_community_news ()));
 }
 
 void
 main_window::construct_tool_bar (void)
 {
-  _main_tool_bar = addToolBar ("Main");
+  _main_tool_bar = addToolBar (tr ("Toolbar"));
 
   _main_tool_bar->setObjectName ("MainToolBar");
   _main_tool_bar->addAction (_new_script_action);
@@ -1949,19 +1997,19 @@
 
   _main_tool_bar->addAction (_copy_action);
   _main_tool_bar->addAction (_paste_action);
-  _main_tool_bar->addAction (_undo_action);
 
   _main_tool_bar->addSeparator ();
 
   _current_directory_combo_box = new QComboBox (this);
-  _current_directory_combo_box->setFixedWidth (current_directory_width);
+  QFontMetrics fm = _current_directory_combo_box->fontMetrics ();
+  _current_directory_combo_box->setFixedWidth (48*fm.averageCharWidth ());
   _current_directory_combo_box->setEditable (true);
   _current_directory_combo_box->setInsertPolicy (QComboBox::NoInsert);
   _current_directory_combo_box->setToolTip (tr ("Enter directory name"));
   _current_directory_combo_box->setMaxVisibleItems (
     current_directory_max_visible);
   _current_directory_combo_box->setMaxCount (current_directory_max_count);
-  QSizePolicy sizePol (QSizePolicy::Expanding, QSizePolicy::Preferred);
+  QSizePolicy sizePol (QSizePolicy::Preferred, QSizePolicy::Preferred);
   _current_directory_combo_box->setSizePolicy (sizePol);
 
   // addWidget takes ownership of the objects so there is no
@@ -1969,10 +2017,10 @@
   _main_tool_bar->addWidget (new QLabel (tr ("Current Directory: ")));
   _main_tool_bar->addWidget (_current_directory_combo_box);
   QAction *current_dir_up = _main_tool_bar->addAction (
-                              QIcon (":/actions/icons/up.png"),
+                              resource_manager::icon ("go-up"),
                               tr ("One directory up"));
   QAction *current_dir_search = _main_tool_bar->addAction (
-                                  QIcon (":/actions/icons/folder.png"),
+                              resource_manager::icon ("folder"),
                                   tr ("Browse directories"));
 
   connect (_current_directory_combo_box, SIGNAL (activated (QString)),
@@ -2033,8 +2081,8 @@
 void
 main_window::clear_command_window_callback (void)
 {
-  Fclc ();
-  command_editor::interrupt (true);
+  command_editor::kill_full_line ();
+  command_editor::clear_screen ();
 }
 
 void
@@ -2044,6 +2092,12 @@
 }
 
 void
+main_window::set_screen_size_callback (const int_pair& sz)
+{
+  command_editor::set_screen_size (sz.first, sz.second);
+}
+
+void
 main_window::clear_history_callback (void)
 {
   Fhistory (ovl ("-c"));
@@ -2054,25 +2108,21 @@
 {
   bool repost = false;          // flag for reposting event for this callback
 
-  if (!_cmd_queue->isEmpty ())  // list can not be empty here, just to make sure
+  if (! _cmd_queue.isEmpty ())  // list can not be empty here, just to make sure
     {
-      std::string pending_input = command_editor::get_current_line ();
-      command_editor::set_initial_input (pending_input);
-
       _cmd_queue_mutex.lock (); // critical path
-      std::string command = _cmd_queue->takeFirst ().toStdString ();
-      if (_cmd_queue->isEmpty ())
+
+      octave_cmd *cmd = _cmd_queue.takeFirst ();
+
+      if (_cmd_queue.isEmpty ())
         _cmd_processing.release ();  // cmd queue empty, processing will stop
       else
         repost = true;          // not empty, repost at end
       _cmd_queue_mutex.unlock ();
 
-      command_editor::replace_line (command);
-
-      command_editor::redisplay ();
-      // We are executing inside the command editor event loop.  Force
-      // the current line to be returned for processing.
-      command_editor::interrupt ();
+      cmd->execute ();
+
+      delete cmd;
     }
 
   if (repost)  // queue not empty, so repost event for further processing
@@ -2091,6 +2141,7 @@
 main_window::change_directory_callback (const std::string& directory)
 {
   Fcd (ovl (directory));
+  _octave_qt_link->update_directory ();
 }
 
 // The next callbacks are invoked by GUI buttons.  Those buttons
@@ -2127,13 +2178,22 @@
       _dbg_queue_mutex.unlock ();
 
       if (debug == "step")
-        Fdbstep ();
+        {
+          F__db_next_breakpoint_quiet__ (ovl (_suppress_dbg_location));
+          Fdbstep ();
+        }
       else if (debug == "cont")
-        Fdbcont ();
+        {
+          F__db_next_breakpoint_quiet__ (ovl (_suppress_dbg_location));
+          Fdbcont ();
+        }
       else if (debug == "quit")
         Fdbquit ();
       else
-        Fdbstep (ovl (debug.toStdString ()));
+        {
+          F__db_next_breakpoint_quiet__ (ovl (_suppress_dbg_location));
+          Fdbstep (ovl (debug.toStdString ()));
+        }
 
       command_editor::interrupt (true);
     }
@@ -2144,12 +2204,6 @@
 }
 
 void
-main_window::exit_callback (void)
-{
-  Fquit ();
-}
-
-void
 main_window::find_files (const QString &start_dir)
 {
 
@@ -2188,40 +2242,167 @@
 }
 
 void
-main_window::set_global_shortcuts (bool set_shortcuts)
+main_window::set_global_edit_shortcuts (bool editor_has_focus)
 {
-  if (set_shortcuts)
+  // this slot is called when editor gets/loses focus
+  if (editor_has_focus)
     {
-
-      _open_action->setShortcut (QKeySequence::Open);
-      _new_script_action->setShortcut (QKeySequence::New);
-      _new_function_action->setShortcut (Qt::ControlModifier
-                                       + Qt::ShiftModifier
-                                       + Qt::Key_N);
-
-      _exit_action->setShortcut (QKeySequence::Quit);
-
-      _find_files_action->setShortcut (Qt::ControlModifier
-                                       + Qt::ShiftModifier
-                                       + Qt::Key_F);
-
+      // disable shortcuts that are also provided by the editor itself
+      QKeySequence no_key = QKeySequence ();
+      _copy_action->setShortcut (no_key);
+      _paste_action->setShortcut (no_key);
+      _undo_action->setShortcut (no_key);
+      _select_all_action->setShortcut (no_key);
     }
   else
     {
-
+      // editor loses focus, set the global shortcuts
+      shortcut_manager::set_shortcut (_copy_action, "main_edit:copy");
+      shortcut_manager::set_shortcut (_paste_action, "main_edit:paste");
+      shortcut_manager::set_shortcut (_undo_action, "main_edit:undo");
+      shortcut_manager::set_shortcut (_select_all_action, "main_edit:select_all");
+    }
+
+  // dis-/enable global menu depending on editor's focus
+  enable_menu_shortcuts (! editor_has_focus);
+}
+
+void
+main_window::configure_shortcuts ()
+{
+  // file menu
+  shortcut_manager::set_shortcut (_open_action, "main_file:open_file");
+  shortcut_manager::set_shortcut (_new_script_action, "main_file:new_file");
+  shortcut_manager::set_shortcut (_new_function_action, "main_file:new_function");
+  shortcut_manager::set_shortcut (_new_function_action, "main_file:new_figure");
+  shortcut_manager::set_shortcut (_load_workspace_action,
+                                  "main_file:load_workspace");
+  shortcut_manager::set_shortcut (_save_workspace_action,
+                                  "main_file:save_workspace");
+  shortcut_manager::set_shortcut (_preferences_action, "main_file:preferences");
+  shortcut_manager::set_shortcut (_exit_action,"main_file:exit");
+
+  // edit menu
+  shortcut_manager::set_shortcut (_copy_action, "main_edit:copy");
+  shortcut_manager::set_shortcut (_paste_action, "main_edit:paste");
+  shortcut_manager::set_shortcut (_undo_action, "main_edit:undo");
+  shortcut_manager::set_shortcut (_select_all_action, "main_edit:select_all");
+  shortcut_manager::set_shortcut (_clear_clipboard_action,
+                                  "main_edit:clear_clipboard");
+  shortcut_manager::set_shortcut (_find_files_action, "main_edit:find_in_files");
+  shortcut_manager::set_shortcut (_clear_command_history_action,
+                                  "main_edit:clear_history");
+  shortcut_manager::set_shortcut (_clear_command_window_action,
+                                  "main_edit:clear_command_window");
+  shortcut_manager::set_shortcut (_clear_workspace_action,
+                                  "main_edit:clear_workspace");
+
+  // debug menu
+  shortcut_manager::set_shortcut (_debug_step_over, "main_debug:step_over");
+  shortcut_manager::set_shortcut (_debug_step_into, "main_debug:step_into");
+  shortcut_manager::set_shortcut (_debug_step_out,  "main_debug:step_out");
+  shortcut_manager::set_shortcut (_debug_continue,  "main_debug:continue");
+  shortcut_manager::set_shortcut (_debug_quit,  "main_debug:quit");
+
+  // window menu
+  shortcut_manager::set_shortcut (_show_command_window_action,
+                                  "main_window:show_command");
+  shortcut_manager::set_shortcut (_show_history_action,
+                                  "main_window:show_history");
+  shortcut_manager::set_shortcut (_show_workspace_action,
+                                  "main_window:show_workspace");
+  shortcut_manager::set_shortcut (_show_file_browser_action,
+                                  "main_window:show_file_browser");
+  shortcut_manager::set_shortcut (_show_editor_action, "main_window:show_editor");
+  shortcut_manager::set_shortcut (_show_documentation_action,
+                                  "main_window:show_doc");
+  shortcut_manager::set_shortcut (_command_window_action, "main_window:command");
+  shortcut_manager::set_shortcut (_history_action, "main_window:history");
+  shortcut_manager::set_shortcut (_workspace_action,  "main_window:workspace");
+  shortcut_manager::set_shortcut (_file_browser_action,
+                                  "main_window:file_browser");
+  shortcut_manager::set_shortcut (_editor_action, "main_window:editor");
+  shortcut_manager::set_shortcut (_documentation_action, "main_window:doc");
+  shortcut_manager::set_shortcut (_reset_windows_action, "main_window:reset");
+
+  // help menu
+  shortcut_manager::set_shortcut (_ondisk_doc_action, "main_help:ondisk_doc");
+  shortcut_manager::set_shortcut (_online_doc_action, "main_help:online_doc");
+  shortcut_manager::set_shortcut (_report_bug_action, "main_help:report_bug");
+  shortcut_manager::set_shortcut (_octave_packages_action, "main_help:packages");
+  shortcut_manager::set_shortcut (_agora_action, "main_help:agora");
+  shortcut_manager::set_shortcut (_contribute_action, "main_help:contribute");
+  shortcut_manager::set_shortcut (_developer_action, "main_help:developer");
+  shortcut_manager::set_shortcut (_about_octave_action, "main_help:about");
+
+  // news menu
+  shortcut_manager::set_shortcut (_release_notes_action,
+                                  "main_news:release_notes");
+  shortcut_manager::set_shortcut (_current_news_action,
+                                  "main_news:community_news");
+}
+
+void
+main_window::set_global_shortcuts (bool set_shortcuts)
+{
+  // this slot is called when the terminal gets/loses focus
+
+  // return if the user don't want to use readline shortcuts
+  if (! _prevent_readline_conflicts)
+    return;
+
+  if (set_shortcuts)
+    {
+      // terminal loses focus: set the global shortcuts
+      configure_shortcuts ();
+    }
+  else
+    {
+      // terminal gets focus: disable some shortcuts
       QKeySequence no_key = QKeySequence ();
 
+      // file menu
       _open_action->setShortcut (no_key);
       _new_script_action->setShortcut (no_key);
       _new_function_action->setShortcut (no_key);
-
+      _new_function_action->setShortcut (no_key);
+      _load_workspace_action->setShortcut (no_key);
+      _save_workspace_action->setShortcut (no_key);
+      _preferences_action->setShortcut (no_key);
       _exit_action->setShortcut (no_key);
 
+      // edit menu
+      _select_all_action->setShortcut (no_key);
+      _clear_clipboard_action->setShortcut (no_key);
       _find_files_action->setShortcut (no_key);
-
+      _clear_command_history_action->setShortcut (no_key);
+      _clear_command_window_action->setShortcut (no_key);
+      _clear_workspace_action->setShortcut (no_key);
+
+      // window menu
+      _reset_windows_action->setShortcut (no_key);
+
+      // help menu
+      _ondisk_doc_action->setShortcut (no_key);
+      _online_doc_action->setShortcut (no_key);
+      _report_bug_action->setShortcut (no_key);
+      _octave_packages_action->setShortcut (no_key);
+      _agora_action->setShortcut (no_key);
+      _contribute_action->setShortcut (no_key);
+      _developer_action->setShortcut (no_key);
+      _about_octave_action->setShortcut (no_key);
+
+      // news menu
+      _release_notes_action->setShortcut (no_key);
+      _current_news_action->setShortcut (no_key);
     }
-
-  emit set_widget_shortcuts_signal (set_shortcuts);
+}
+
+void
+main_window::set_screen_size (int ht, int wd)
+{
+  octave_link::post_event (this, &main_window::set_screen_size_callback,
+                           int_pair (ht, wd));
 }
 
 void
@@ -2254,3 +2435,4 @@
 {
   _clipboard->clear (QClipboard::Clipboard);
 }
+
--- a/libgui/src/main-window.h
+++ b/libgui/src/main-window.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -37,6 +37,7 @@
 #include <QToolButton>
 #include <QComboBox>
 #include <QSemaphore>
+#include <QPointer>
 
 // Editor includes
 #include "file-editor-interface.h"
@@ -56,9 +57,12 @@
 #include "octave-qt-link.h"
 #include "octave-dock-widget.h"
 #include "find-files-dialog.h"
+#include "octave-cmd.h"
+
+class settings_dialog;
 
 /**
- * \class MainWindow
+ * @class MainWindow
  *
  * Represents the main window.
  */
@@ -69,8 +73,9 @@
 public:
 
   typedef std::pair <std::string, std::string> name_pair;
+  typedef std::pair <int, int> int_pair;
 
-  main_window (QWidget *parent = 0);
+  main_window (QWidget *parent = 0, bool start_gui = true);
 
   ~main_window (void);
 
@@ -79,7 +84,12 @@
   void focus_command_window (void);
 
 signals:
+
+  void active_dock_changed (octave_dock_widget *, octave_dock_widget *);
+  void editor_focus_changed (bool);
+
   void settings_changed (const QSettings *);
+  void init_terminal_size_signal (void);
   void new_file_signal (const QString&);
   void open_file_signal (const QString&);
 
@@ -92,10 +102,14 @@
 
   void copyClipboard_signal (void);
   void pasteClipboard_signal (void);
-
-  void set_widget_shortcuts_signal (bool);
+  void selectAll_signal (void);
+  void undo_signal (void);
 
 public slots:
+
+  void focus_changed (QWidget *w_old, QWidget *w_new);
+  void request_reload_settings ();
+
   void report_status_message (const QString& statusMessage);
   void handle_save_workspace_request (void);
   void handle_load_workspace_request (const QString& file = QString ());
@@ -118,15 +132,16 @@
   void open_developer_page (void);
   void process_settings_dialog_request (const QString& desired_tab
                                                          = QString ());
+
+  void copy_image_to_clipboard (const QString& file, bool remove_file);
+
   void show_about_octave (void);
   void notice_settings (const QSettings *settings);
+  void confirm_shutdown_octave (void);
   void prepare_to_exit (void);
-  void exit (int status);
+  void exit_app (int status);
   void reset_windows (void);
 
-  void hide_warning_bar (void);
-  void show_gui_info (void);
-
   void change_directory (const QString& dir);
   void browse_for_directory (void);
   void set_current_working_directory (const QString& dir);
@@ -152,14 +167,16 @@
                                                 const QString& file, int line);
 
   void read_settings (void);
+  void init_terminal_size (void);
   void set_window_layout (QSettings *settings);
   void write_settings (void);
   void connect_visibility_changed (void);
 
   void copyClipboard (void);
   void pasteClipboard (void);
+  void selectAll (void);
 
-  void connect_uiwidget_links ();
+  void connect_uiwidget_links (void);
 
   void handle_create_dialog (const QString& message, const QString& title,
                              const QString& icon, const QStringList& button,
@@ -185,12 +202,17 @@
 
   void handle_show_doc (const QString &file);
 
+  void handle_octave_ready ();
+
   // find files dialog
   void find_files (const QString &startdir=QDir::currentPath ());
   void find_files_finished (int);
 
   // setting global shortcuts
   void set_global_shortcuts (bool enable);
+  void set_global_edit_shortcuts (bool enable);
+
+  void set_screen_size (int ht, int wd);
 
   // handling the clipboard
   void clipboard_has_changed (QClipboard::Mode);
@@ -209,28 +231,26 @@
 
   void construct_octave_qt_link (void);
 
+  QAction *add_action (QMenu *menu, const QIcon &icon, const QString &text,
+                       const char *member, const QWidget *receiver = 0);
+
+  void enable_menu_shortcuts (bool enable);
+  QMenu* m_add_menu (QMenuBar *p, QString text);
   void construct_menu_bar (void);
   void construct_file_menu (QMenuBar *p);
   void construct_new_menu (QMenu *p);
   void construct_edit_menu (QMenuBar *p);
-  void construct_debug_menu_item (QMenu *p, const QString& item,
-                                  const QKeySequence& key);
-  QAction *construct_debug_menu_item (const char *icon_file,
-                                      const QString& item,
-                                      const QKeySequence& key);
+  QAction *construct_debug_menu_item (const char *icon, const QString& item,
+                                      const char* member);
   void construct_debug_menu (QMenuBar *p);
   QAction *construct_window_menu_item (QMenu *p, const QString& item,
-                                       bool checkable,
-                                       const QKeySequence& key);
+                                       bool checkable, QWidget*);
   void construct_window_menu (QMenuBar *p);
   void construct_help_menu (QMenuBar *p);
   void construct_documentation_menu (QMenu *p);
 
   void construct_news_menu (QMenuBar *p);
 
-  void construct_warning_bar (void);
-  void construct_gui_info_button (void);
-
   void construct_tool_bar (void);
 
   void establish_octave_link (void);
@@ -247,27 +267,33 @@
 
   void resize_command_window_callback (void);
 
+  void set_screen_size_callback (const int_pair&);
+
   void clear_workspace_callback (void);
 
   void clear_history_callback (void);
 
   void execute_command_callback ();
   void run_file_callback (const QFileInfo& info);
+  bool focus_console_after_command ();
 
   void new_figure_callback (void);
 
   void change_directory_callback (const std::string& directory);
 
-  void exit_callback (void);
-
-  void queue_command (QString command);
+  void queue_command (octave_cmd *cmd);
 
   void queue_debug (QString command);
 
   void execute_debug_callback ();
 
+  void configure_shortcuts ();
+
   workspace_model *_workspace_model;
 
+  QHash<QMenu*, QStringList> _hash_menu_text;
+
+
   // Toolbars.
   QStatusBar *status_bar;
 
@@ -291,14 +317,12 @@
     list.append (static_cast<octave_dock_widget *> (workspace_window));
     return list;
   }
+  octave_dock_widget *_active_dock;
 
   QString _release_notes_icon;
 
   QToolBar *_main_tool_bar;
 
-  QDockWidget *_warning_bar;
-  QPushButton *_gui_info_button;
-
   QMenu *_debug_menu;
 
   QAction *_debug_continue;
@@ -310,22 +334,57 @@
   QAction *_new_script_action;
   QAction *_new_function_action;
   QAction *_open_action;
+  QAction *_new_figure_action;
+  QAction *_load_workspace_action;
+  QAction *_save_workspace_action;
+  QAction *_preferences_action;
+  QAction *_exit_action;
 
   QAction *_copy_action;
   QAction *_paste_action;
   QAction *_clear_clipboard_action;
   QAction *_undo_action;
-
+  QAction *_clear_command_window_action;
+  QAction *_clear_command_history_action;
+  QAction *_clear_workspace_action;
   QAction *_find_files_action;
-  QAction *_exit_action;
+  QAction *_select_all_action;
+
+  QAction *_show_command_window_action;
+  QAction *_show_history_action;
+  QAction *_show_workspace_action;
+  QAction *_show_file_browser_action;
+  QAction *_show_editor_action;
+  QAction *_show_documentation_action;
+  QAction *_command_window_action;
+  QAction *_history_action;
+  QAction *_workspace_action;
+  QAction *_file_browser_action;
+  QAction *_editor_action;
+  QAction *_documentation_action;
+  QAction *_reset_windows_action;
+
+  QAction *_ondisk_doc_action;
+  QAction *_online_doc_action;
+  QAction *_report_bug_action;
+  QAction *_octave_packages_action;
+  QAction *_agora_action;
+  QAction *_contribute_action;
+  QAction *_developer_action;
+  QAction *_about_octave_action;
+
+  QAction *_release_notes_action;
+  QAction *_current_news_action;
 
   // Toolbars.
   QComboBox *_current_directory_combo_box;
-  static const int current_directory_width = 300;
   static const int current_directory_max_visible = 16;
   static const int current_directory_max_count = 16;
   QLineEdit *_current_directory_line_edit;
 
+  // settings dialog as guarded pointer (set to 0 when deleted)
+  QPointer<settings_dialog> _settings_dlg;
+
   // Find files dialog
   find_files_dialog * find_files_dlg;
 
@@ -341,8 +400,12 @@
   // Flag for closing whole application.
   bool _closing;
 
-  // semaphore to synchronize execution signals and related callback
-  QStringList *_cmd_queue;
+  // command queue and semaphore to synchronize execution signals
+  // and related callback
+
+  // the queue for the command structures
+  QList<octave_cmd *> _cmd_queue;
+  // semaphores used for handling the queue
   QSemaphore   _cmd_processing;
   QMutex       _cmd_queue_mutex;
 
@@ -350,6 +413,10 @@
   QStringList *_dbg_queue;
   QSemaphore   _dbg_processing;
   QMutex       _dbg_queue_mutex;
+
+  bool _prevent_readline_conflicts;
+  bool _suppress_dbg_location;
+  bool _start_gui;
 };
 
 class news_reader : public QObject
--- a/libgui/src/module.mk
+++ b/libgui/src/module.mk
@@ -5,38 +5,34 @@
   $(octave_gui_ICONS)
 
 octave_gui_ICONS = \
-  src/icons/arrow_right.png \
-  src/icons/arrow_left.png \
-  src/icons/arrow_up.png \
-  src/icons/arrow_down.png \
-  src/icons/artsbuilderexecute.png \
-  src/icons/bookmark.png \
-  src/icons/bp_next.png \
-  src/icons/bp_prev.png \
-  src/icons/bp_rm_all.png \
-  src/icons/bp_toggle.png \
-  src/icons/configure.png \
-  src/icons/db_cont.png \
-  src/icons/db_step_in.png \
-  src/icons/db_step_out.png \
-  src/icons/db_step.png \
-  src/icons/db_stop.png \
-  src/icons/editcopy.png \
-  src/icons/editcut.png \
-  src/icons/editdelete.png \
-  src/icons/editpaste.png \
-  src/icons/fileclose.png \
-  src/icons/filenew.png \
-  src/icons/fileopen.png \
-  src/icons/fileprint.png \
-  src/icons/filesaveas.png \
-  src/icons/filesave.png \
-  src/icons/find.png \
-  src/icons/findf.png \
-  src/icons/gear.png \
-  src/icons/folder_documents.png \
-  src/icons/folder_new.png \
+  src/icons/applications-system.png \
+  src/icons/bp-next.png \
+  src/icons/bp-prev.png \
+  src/icons/bp-rm-all.png \
+  src/icons/bp-toggle.png \
+  src/icons/db-cont.png \
+  src/icons/db-step-in.png \
+  src/icons/db-step-out.png \
+  src/icons/db-step.png \
+  src/icons/db-stop.png \
+  src/icons/document-new.png \
+  src/icons/document-open.png \
+  src/icons/document-print.png \
+  src/icons/document-save.png \
+  src/icons/document-save-as.png \
+  src/icons/edit-copy.png \
+  src/icons/edit-cut.png \
+  src/icons/edit-delete.png \
+  src/icons/edit-find.png \
+  src/icons/edit-find-replace.png \
+  src/icons/edit-paste.png \
+  src/icons/edit-redo.png \
+  src/icons/edit-undo.png \
   src/icons/folder.png \
+  src/icons/folder-new.png \
+  src/icons/go-first.png \
+  src/icons/go-last.png \
+  src/icons/go-up.png \
   src/icons/graphic_logo_DocumentationDockWidget.png \
   src/icons/graphic_logo_FileEditor.png \
   src/icons/graphic_logo_FilesDockWidget.png \
@@ -45,7 +41,6 @@
   src/icons/graphic_logo_TerminalDockWidget.png \
   src/icons/graphic_logo_WorkspaceView.png \
   src/icons/graphic_logo_ReleaseWidget.png \
-  src/icons/home.png \
   src/icons/icons_license \
   src/icons/letter_logo_DocumentationDockWidget.png \
   src/icons/letter_logo_FileEditor.png \
@@ -56,17 +51,16 @@
   src/icons/letter_logo_WorkspaceView.png \
   src/icons/letter_logo_ReleaseWidget.png \
   src/icons/logo.png \
-  src/icons/ok.png \
-  src/icons/redled.png \
-  src/icons/redo.png \
-  src/icons/reload.png \
-  src/icons/search.png \
-  src/icons/undo.png \
-  src/icons/up.png \
-  src/icons/warning.png \
+  src/icons/preferences-system.png \
+  src/icons/system-run.png \
+  src/icons/user-home.png \
+  src/icons/view-refresh.png \
   src/icons/widget-close.png \
   src/icons/widget-dock.png \
   src/icons/widget-undock.png \
+  src/icons/widget-close-light.png \
+  src/icons/widget-dock-light.png \
+  src/icons/widget-undock-light.png \
   src/icons/zoom-in.png \
   src/icons/zoom-out.png
 
@@ -78,7 +72,8 @@
   src/m-editor/moc-file-editor-tab.cc \
   src/m-editor/moc-file-editor.cc \
   src/m-editor/moc-find-dialog.cc \
-  src/m-editor/moc-octave-qscintilla.cc
+  src/m-editor/moc-octave-qscintilla.cc \
+  src/m-editor/moc-octave-txt-lexer.cc
 endif
 
 octave_gui_MOC += \
@@ -93,6 +88,7 @@
   src/moc-terminal-dock-widget.cc \
   src/moc-color-picker.cc \
   src/moc-resource-manager.cc \
+  src/moc-shortcut-manager.cc \
   src/moc-welcome-wizard.cc \
   src/moc-workspace-model.cc \
   src/moc-workspace-view.cc \
@@ -122,14 +118,17 @@
   src/m-editor/file-editor.h \
   src/m-editor/find-dialog.h \
   src/m-editor/octave-qscintilla.h \
+  src/m-editor/octave-txt-lexer.h \
   src/main-window.h \
   src/octave-gui.h \
+  src/octave-cmd.h \
   src/octave-interpreter.h \
   src/octave-qt-link.h \
   src/qtinfo/parser.h \
   src/qtinfo/webinfo.h \
   src/resource-manager.h \
   src/settings-dialog.h \
+  src/shortcut-manager.h \
   src/thread-manager.h \
   src/terminal-dock-widget.h \
   src/color-picker.h \
@@ -148,7 +147,9 @@
   src/m-editor/file-editor.cc \
   src/m-editor/find-dialog.cc \
   src/m-editor/octave-qscintilla.cc \
+  src/m-editor/octave-txt-lexer.cc \
   src/main-window.cc \
+  src/octave-cmd.cc \
   src/octave-dock-widget.cc \
   src/octave-gui.cc \
   src/octave-interpreter.cc \
@@ -157,6 +158,7 @@
   src/qtinfo/webinfo.cc \
   src/resource-manager.cc \
   src/settings-dialog.cc \
+  src/shortcut-manager.cc \
   src/thread-manager.cc \
   src/terminal-dock-widget.cc \
   src/color-picker.cc \
@@ -170,12 +172,15 @@
 
 src_libgui_src_la_CPPFLAGS = \
   $(AM_CPPFLAGS) \
+  $(FT2_CPPFLAGS) \
+  $(FONTCONFIG_CPPFLAGS) \
   @OCTGUI_DLL_DEFS@ \
   @QT_CPPFLAGS@ \
   -I$(srcdir)/qterminal/libqterminal \
   -Isrc -I$(srcdir)/src \
   -I$(srcdir)/src/m-editor \
   -I$(srcdir)/src/qtinfo \
+  -I$(srcdir)/graphics \
   -I$(top_srcdir)/liboctave/cruft/misc \
   -I$(top_srcdir)/liboctave/array \
   -I$(top_builddir)/liboctave/numeric -I$(top_srcdir)/liboctave/numeric \
new file mode 100644
--- /dev/null
+++ b/libgui/src/octave-cmd.cc
@@ -0,0 +1,82 @@
+/*
+
+Copyright (C) 2014 Torsten
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+// Author: Torsten <ttl@justmail.de>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "octave-cmd.h"
+
+#include "octave-qt-link.h"
+#include "cmd-edit.h"
+#include "builtin-defun-decls.h"
+#include "utils.h"
+
+
+// ---------------------------------------------------------------------
+//  class octave_cmd_exec: executing a command
+
+void
+octave_cmd_exec::execute ()
+{
+  std::string pending_input = command_editor::get_current_line ();
+
+  command_editor::set_initial_input (pending_input);
+  command_editor::replace_line (_cmd.toStdString ());
+  command_editor::redisplay ();
+  command_editor::accept_line ();
+}
+
+
+// ---------------------------------------------------------------------
+//  class octave_cmd_eval: running a file
+
+void
+octave_cmd_eval::execute ()
+{
+  QString function_name = _info.fileName ();
+  function_name.chop (_info.suffix ().length () + 1);
+  std::string file_path = _info.absoluteFilePath ().toStdString ();
+
+  std::string pending_input = command_editor::get_current_line ();
+
+  if (valid_identifier (function_name.toStdString ()))
+    {
+      // valid identifier: call as function with possibility to debug
+      std::string path = _info.absolutePath ().toStdString ();
+      if (octave_qt_link::file_in_path (file_path, path))
+        command_editor::replace_line (function_name.toStdString ());
+    }
+  else
+    {
+      // no valid identifier: use Fsource (), no debug possible
+      Fsource (ovl (file_path));
+      command_editor::replace_line ("");
+    }
+
+  command_editor::set_initial_input (pending_input);
+  command_editor::redisplay ();
+
+  command_editor::interrupt ();
+}
new file mode 100644
--- /dev/null
+++ b/libgui/src/octave-cmd.h
@@ -0,0 +1,72 @@
+/*
+
+Copyright (C) 2014 Torsten
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+// Author: Torsten <ttl@justmail.de>
+
+#if !defined (octave_cmd_h)
+#define octave_cmd_h 1
+
+#include <QString>
+#include <QFileInfo>
+
+class octave_cmd
+{
+public:
+
+  octave_cmd () { };
+  virtual ~octave_cmd () { };
+
+  virtual void execute () { };
+};
+
+
+// ---------------------------------------------------------------------
+//  class octave_cmd_exec
+
+class octave_cmd_exec : public octave_cmd
+{
+public:
+
+  octave_cmd_exec (const QString& cmd) : octave_cmd () { _cmd = cmd; };
+  void execute ();
+
+private:
+
+  QString _cmd;
+};
+
+
+// ---------------------------------------------------------------------
+//  class octave_cmd_eval
+
+class octave_cmd_eval : public octave_cmd
+{
+public:
+
+  octave_cmd_eval (const QFileInfo& info) : octave_cmd () { _info = info; };
+  void execute ();
+
+private:
+
+  QFileInfo _info;
+};
+#endif
--- a/libgui/src/octave-dock-widget.cc
+++ b/libgui/src/octave-dock-widget.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2012-2013 Richard Crozier
-Copyright (C) 2013 Torsten <ttl@justmail.de>
+Copyright (C) 2012-2015 Richard Crozier
+Copyright (C) 2013-2015 Torsten <ttl@justmail.de>
 
 This file is part of Octave.
 
@@ -27,11 +27,11 @@
 
 #include <QApplication>
 #include <QToolBar>
-#include <QToolButton>
 #include <QAction>
 #include <QHBoxLayout>
 #include <QLabel>
 #include <QSettings>
+#include <QStyle>
 
 #include "resource-manager.h"
 #include "octave-dock-widget.h"
@@ -43,12 +43,19 @@
 
   _parent = static_cast<QMainWindow *> (p);     // store main window
   _floating = false;
+  _predecessor_widget = 0;
 
   connect (this, SIGNAL (visibilityChanged (bool)),
            this, SLOT (handle_visibility_changed (bool)));
 
   connect (p, SIGNAL (settings_changed (const QSettings*)),
-           this, SLOT (notice_settings (const QSettings*)));
+           this, SLOT (handle_settings (const QSettings*)));
+
+  connect (p, SIGNAL (active_dock_changed (octave_dock_widget*, octave_dock_widget*)),
+           this, SLOT (handle_active_dock_changed (octave_dock_widget*, octave_dock_widget*)));
+
+  QStyle *st = style ();
+  _icon_size = 0.75*st->pixelMetric (QStyle::PM_SmallIconSize);
 
 #if defined (Q_OS_WIN32)
   // windows: add an extra title bar that persists when floating
@@ -61,31 +68,34 @@
   _dock_action-> setToolTip (tr ("Undock widget"));
   connect (_dock_action, SIGNAL (triggered (bool)),
            this, SLOT (change_floating (bool)));
-  QToolButton *dock_button = new QToolButton (this);
-  dock_button->setDefaultAction (_dock_action);
-  dock_button->setFocusPolicy (Qt::NoFocus);
-  dock_button->setIconSize (QSize (12,12));
+  _dock_button = new QToolButton (this);
+  _dock_button->setDefaultAction (_dock_action);
+  _dock_button->setFocusPolicy (Qt::NoFocus);
+  _dock_button->setIconSize (QSize (_icon_size,_icon_size));
 
-  QAction *close_action = new QAction
-                   (QIcon (":/actions/icons/widget-close.png"), "", this );
-  close_action-> setToolTip (tr ("Hide widget"));
-  connect (close_action, SIGNAL (triggered (bool)),
+  _close_action = new QAction
+                   (QIcon (":/actions/icons/widget-close.png"), "", this);
+  _close_action-> setToolTip (tr ("Hide widget"));
+  connect (_close_action, SIGNAL (triggered (bool)),
            this, SLOT (change_visibility (bool)));
-  QToolButton *close_button = new QToolButton (this);
-  close_button->setDefaultAction (close_action);
-  close_button->setFocusPolicy (Qt::NoFocus);
-  close_button->setIconSize (QSize (12,12));
+  _close_button = new QToolButton (this);
+  _close_button->setDefaultAction (_close_action);
+  _close_button->setFocusPolicy (Qt::NoFocus);
+  _close_button->setIconSize (QSize (_icon_size,_icon_size));
+
+  _icon_color = "";
+  _title_3d = 50;
 
   QHBoxLayout *h_layout = new QHBoxLayout ();
   h_layout->addStretch (100);
-  h_layout->addWidget (dock_button);
-  h_layout->addWidget (close_button);
+  h_layout->addWidget (_dock_button);
+  h_layout->addWidget (_close_button);
   h_layout->setSpacing (0);
-  h_layout->setContentsMargins (6,0,0,0);
+  h_layout->setContentsMargins (5,2,2,2);
 
-  QWidget *title_widget = new QWidget ();
-  title_widget->setLayout (h_layout);
-  setTitleBarWidget (title_widget);
+  _title_widget = new QWidget ();
+  _title_widget->setLayout (h_layout);
+  setTitleBarWidget (_title_widget);
 
 #else
 
@@ -104,6 +114,13 @@
            this, SLOT (copyClipboard ()));
   connect (p, SIGNAL (pasteClipboard_signal ()),
            this, SLOT (pasteClipboard ()));
+  connect (p, SIGNAL (selectAll_signal ()),
+           this, SLOT (selectAll ()));
+  // undo handling
+  connect (p, SIGNAL (undo_signal ()), this, SLOT (do_undo ()));
+
+  installEventFilter (this);
+
 }
 
 octave_dock_widget::~octave_dock_widget ()
@@ -139,6 +156,13 @@
 }
 
 
+// set the widget which previously had focus when tabified
+void
+octave_dock_widget::set_predecessor_widget (octave_dock_widget *prev_widget)
+{
+  _predecessor_widget = prev_widget;
+}
+
 // set the title in the dockwidgets title bar
 void
 octave_dock_widget::set_title (const QString& title)
@@ -147,11 +171,22 @@
   QHBoxLayout* h_layout =
     static_cast<QHBoxLayout *> (titleBarWidget ()->layout ());
   QLabel *label = new QLabel (title);
+  label->setStyleSheet ("background: transparent;");
   h_layout->insertWidget (0,label);
 #endif
   setWindowTitle (title);
 }
 
+// set focus to previously active widget in tabbed widget stack
+void
+octave_dock_widget::set_focus_predecessor ()
+{
+  if (_predecessor_widget)    // only != 0 if widget was tabbed
+    _predecessor_widget->focus ();
+
+  _predecessor_widget = 0;
+}
+
 // make the widget floating
 void
 octave_dock_widget::make_window ()
@@ -171,10 +206,10 @@
 
   // remove parent and adjust the (un)dock icon
   setParent (0, Qt::Window);
-  _dock_action->setIcon (QIcon (":/actions/icons/widget-dock.png"));
+  _dock_action->setIcon (QIcon (":/actions/icons/widget-dock"+_icon_color+".png"));
   _dock_action->setToolTip (tr ("Dock widget"));
 
-  // restore the last geometry( when floating
+  // restore the last geometry when floating
   setGeometry (settings->value ("DockWidgets/" + objectName ()
                        + "_floating_geometry",QRect(50,100,480,480)).toRect ());
 
@@ -183,18 +218,25 @@
   // non windows: Just set the appripriate window flag
   setWindowFlags (Qt::Window);
 
+  QString css = styleSheet ();
+  css.replace ("widget-undock","widget-dock");
+  setStyleSheet (css);
+
 #endif
 
   _floating = true;
+
+  set_focus_predecessor ();  // set focus previously active widget if tabbed
 }
 
+
 // dock the widget
 void
 octave_dock_widget::make_widget (bool dock)
 {
 #if defined (Q_OS_WIN32)
 
-  // windows: Since floating widget has no parent, we have to readd it
+  // windows: Since floating widget has no parent, we have to read it
 
   QSettings *settings = resource_manager::get_settings ();
 
@@ -220,14 +262,21 @@
     setParent (_parent);
 
   // adjust the (un)dock icon
-  _dock_action->setIcon (QIcon (":/actions/icons/widget-undock.png"));
+  _dock_action->setIcon (QIcon (":/actions/icons/widget-undock"+_icon_color+".png"));
   _dock_action->setToolTip (tr ("Undock widget"));
 
 #else
 
   // non windows: just say we are a docked widget again
+
+  Q_UNUSED (dock);
+
   setWindowFlags (Qt::Widget);
 
+  QString css = styleSheet ();
+  css.replace ("widget-dock","widget-undock");
+  setStyleSheet (css);
+
 #endif
 
   _floating = false;
@@ -262,3 +311,178 @@
   if (w && w->focusProxy ()) w = w->focusProxy ();
   return w;
 }
+
+void
+octave_dock_widget::set_style (bool active)
+{
+  QString css;
+  QString css_button;
+  QString dock_icon;
+
+  QString icon_col = _icon_color;
+
+  if (_floating)
+    dock_icon = "widget-dock";
+  else
+    dock_icon = "widget-undock";
+
+  if (_custom_style)
+    {
+
+      QColor bg_col, fg_col;
+
+      if (active)
+        {
+          bg_col = _bg_color_active;
+          fg_col = _fg_color_active;
+          icon_col = _icon_color_active;
+        }
+      else
+        {
+          bg_col = _bg_color;
+          fg_col = _fg_color;
+          icon_col = _icon_color;
+        }
+
+      QColor bg_col_top, bg_col_bottom;
+      if (_title_3d > 0)
+        {
+          bg_col_top = bg_col.lighter (100 + _title_3d);
+          bg_col_bottom = bg_col.darker (100 + _title_3d);
+        }
+      else
+        {
+          bg_col_top = bg_col.darker (100 - _title_3d);
+          bg_col_bottom = bg_col.lighter (100 - _title_3d);
+        }
+
+      QString background =
+        QString ("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
+                 "            stop: 0 %1, stop: 0.60 %2, stop: 0.95 %2 stop: 1.0 %3);").
+        arg (bg_col_top.name ()).
+        arg (bg_col.name ()).
+        arg (bg_col_bottom.name ());
+
+#if defined (Q_OS_WIN32)
+      css = background + QString (" color: %1 ;").arg (fg_col.name ());
+#else
+      css = QString ("QDockWidget::title { " + background +
+                     "                     text-align: center left;"
+                     "                     padding: 0px 0px 0px 4px;}\n"
+                     "QDockWidget { color: %1 ; "
+                     "  titlebar-close-icon: url(:/actions/icons/widget-close%2.png);"
+                     "  titlebar-normal-icon: url(:/actions/icons/"+dock_icon+"%2); }"
+                     "QDockWidget::close-button,"
+                     "QDockWidget::float-button { border: 0px; icon-size: %3px; width: %3px}"
+                     ).
+                     arg (fg_col.name ()).arg (icon_col).arg (_icon_size);
+#endif
+    }
+  else
+    {
+#if defined (Q_OS_WIN32)
+      css = QString ("");
+#else
+      css = QString ("QDockWidget::title { text-align: center left;"
+                     "                     padding: 0px 0px 0px 4px;}"
+                     "QDockWidget {"
+                     "  titlebar-close-icon: url(:/actions/icons/widget-close.png);"
+                     "  titlebar-normal-icon: url(:/actions/icons/"+dock_icon+"); }"
+                     "QDockWidget::close-button,"
+                     "QDockWidget::float-button { border: 0px; icon-size: %1px; width: %1px}"
+                    ).arg (_icon_size);
+#endif
+    }
+
+#if defined (Q_OS_WIN32)
+  _title_widget->setStyleSheet (css);
+  css_button = QString ("background: transparent; border: 0px;");
+  _dock_button->setStyleSheet (css_button);
+  _close_button->setStyleSheet (css_button);
+  _dock_action->setIcon (QIcon (":/actions/icons/" + dock_icon + icon_col +
+                                ".png"));
+  _close_action->setIcon (QIcon (":/actions/icons/widget-close" + icon_col +
+                                 ".png"));
+#else
+  setStyleSheet (css);
+#endif
+}
+
+void
+octave_dock_widget::handle_settings (const QSettings *settings)
+{
+  _custom_style =
+    settings->value ("DockWidgets/widget_title_custom_style",false).toBool ();
+
+  _title_3d =
+    settings->value ("DockWidgets/widget_title_3d",50).toInt ();
+
+  QColor default_var = QColor (0,0,0);
+  _fg_color = settings->value ("Dockwidgets/title_fg_color",
+                               default_var).value<QColor> ();
+  default_var = QColor (0,0,0);
+  _fg_color_active = settings->value ("Dockwidgets/title_fg_color_active",
+                                      default_var).value<QColor> ();
+
+  default_var = QColor (255,255,255);
+  _bg_color = settings->value ("Dockwidgets/title_bg_color",
+                               default_var).value<QColor> ();
+  default_var = QColor (192,192,192);
+  _bg_color_active = settings->value ("Dockwidgets/title_bg_color_active",
+                                      default_var).value<QColor> ();
+
+  int r, g, b;
+  _bg_color.getRgb (&r, &g, &b);
+  if (r+g+b < 400)
+    _icon_color = "-light";
+  else
+    _icon_color = "";
+
+  _bg_color_active.getRgb (&r, &g, &b);
+  if (r+g+b < 400)
+    _icon_color_active = "-light";
+  else
+    _icon_color_active = "";
+
+  notice_settings (settings);  // call individual handler
+
+  set_style (false);
+}
+
+bool octave_dock_widget::eventFilter(QObject *obj, QEvent *e)
+{
+  if (e->type () == QEvent::NonClientAreaMouseButtonDblClick)
+    {
+      e->ignore (); // ignore double clicks into window decoration elements
+      return true;
+    }
+
+  return QDockWidget::eventFilter (obj,e);
+}
+
+void
+octave_dock_widget::handle_active_dock_changed (octave_dock_widget *w_old,
+                                                octave_dock_widget *w_new)
+{
+  if (_custom_style && this == w_old)
+    {
+      set_style (false);
+      update ();
+    }
+
+  if (_custom_style && this == w_new)
+    {
+      set_style (true);
+      update ();
+    }
+}
+
+
+// close event
+void
+octave_dock_widget::closeEvent (QCloseEvent *e)
+{
+  emit active_changed (false);
+  set_focus_predecessor ();
+  QDockWidget::closeEvent (e);
+}
--- a/libgui/src/octave-dock-widget.h
+++ b/libgui/src/octave-dock-widget.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Richard Crozier
+Copyright (C) 2012-2015 Richard Crozier
 
 This file is part of Octave.
 
@@ -27,6 +27,7 @@
 #include <QSettings>
 #include <QIcon>
 #include <QMainWindow>
+#include <QToolButton>
 #include <QMouseEvent>
 
 class octave_dock_widget : public QDockWidget
@@ -42,7 +43,7 @@
   void make_window (void);
   void make_widget (bool dock=true);
   void set_title (const QString&);
-
+  void set_predecessor_widget (octave_dock_widget *prev_widget);
 signals:
 
   /** Custom signal that tells whether a user has clicked away
@@ -52,11 +53,7 @@
 
 protected:
 
-  virtual void closeEvent (QCloseEvent *e)
-  {
-    emit active_changed (false);
-    QDockWidget::closeEvent (e);
-  }
+  virtual void closeEvent (QCloseEvent *e);
 
   QWidget * focusWidget ();
 
@@ -81,6 +78,9 @@
   virtual void notice_settings (const QSettings*)
   {
   }
+  void handle_settings (const QSettings*);
+
+  void handle_active_dock_changed (octave_dock_widget*, octave_dock_widget*);
 
   QMainWindow *main_win () { return _parent; }
 
@@ -93,12 +93,14 @@
       emit active_changed (true);
   }
   /** slots to handle copy & paste */
-  virtual void copyClipboard ()
-  {
-  }
-  virtual void pasteClipboard ()
-  {
-  }
+  virtual void copyClipboard () {  }
+  virtual void pasteClipboard () {  }
+  virtual void selectAll () {  }
+  /** slots to handle undo */
+  virtual void do_undo () {  }
+
+  // event filter for double clicks into the window decoration elements
+  bool eventFilter(QObject *obj, QEvent *e);
 
 private slots:
 
@@ -107,9 +109,29 @@
 
 private:
 
+  void set_style (bool active);
+  void set_focus_predecessor ();
+
   QMainWindow *_parent;  // store the parent since we are reparenting to 0
+  bool _floating;
+  bool _custom_style;
+  int _title_3d;
+  int _icon_size;
+  QColor _bg_color;
+  QColor _bg_color_active;
+  QColor _fg_color;
+  QColor _fg_color_active;
+  QString _icon_color;
+  QString _icon_color_active;
+  octave_dock_widget *_predecessor_widget;
+
+#if defined (Q_OS_WIN32)
+  QWidget *_title_widget;
+  QToolButton *_dock_button;
+  QToolButton *_close_button;
   QAction *_dock_action;
-  bool _floating;
+  QAction *_close_action;
+#endif
 
 };
 
--- a/libgui/src/octave-gui.cc
+++ b/libgui/src/octave-gui.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -48,10 +48,14 @@
 
 #include "welcome-wizard.h"
 #include "resource-manager.h"
+#include "shortcut-manager.h"
 #include "main-window.h"
 #include "octave-gui.h"
 #include "thread-manager.h"
 
+#include "builtin-defun-decls.h"
+#include "__init_qt__.h"
+
 // Allow the Octave interpreter to start as in CLI mode with a
 // QApplication context so that it can use Qt for things like plotting
 // and UI widgets.
@@ -88,7 +92,7 @@
 // Disable all Qt messages by default.
 
 static void
-message_handler (QtMsgType type, const char *msg)
+message_handler (QtMsgType, const char *)
 {
 }
 
@@ -106,18 +110,25 @@
   if (show_gui_msgs.empty ())
     qInstallMsgHandler (message_handler);
 
+  install___init_qt___functions ();
+
+  Fregister_graphics_toolkit (ovl ("qt"));
+
+  QApplication application (argc, argv);
+  QTranslator gui_tr, qt_tr, qsci_tr;
+
+  // Set the codec for all strings (before wizard)
+#if ! defined (Q_OS_WIN32)
+  QTextCodec::setCodecForCStrings (QTextCodec::codecForName ("UTF-8"));
+#endif
+
   if (start_gui)
     {
-      QApplication application (argc, argv);
-      QTranslator gui_tr, qt_tr, qsci_tr;
-
-      // Set the codec for all strings (before wizard)
-      QTextCodec::setCodecForCStrings (QTextCodec::codecForName ("UTF-8"));
-
       // show wizard if this is the first run
       if (resource_manager::is_first_run ())
         {
-          resource_manager::config_translators (&qt_tr, &qsci_tr, &gui_tr); // before wizard
+          // before wizard
+          resource_manager::config_translators (&qt_tr, &qsci_tr, &gui_tr);
           application.installTranslator (&qt_tr);
           application.installTranslator (&qsci_tr);
           application.installTranslator (&gui_tr);
@@ -133,7 +144,8 @@
         {
           resource_manager::reload_settings ();  // get settings file
 
-          resource_manager::config_translators (&qt_tr, &qsci_tr, &gui_tr); // after settings
+          // after settings
+          resource_manager::config_translators (&qt_tr, &qsci_tr, &gui_tr);
           application.installTranslator (&qt_tr);
           application.installTranslator (&qsci_tr);
           application.installTranslator (&gui_tr);
@@ -158,31 +170,29 @@
         octave_env::putenv ("TERM", "cygwin");
 #endif
 
-      // Create and show main window.
+      // shortcut manager
+      shortcut_manager::init_data ();
+    }
 
-      main_window w;
+  // Create and show main window.
 
-      w.read_settings ();
+  main_window w (0, start_gui);
+
+  w.read_settings ();
 
-      w.focus_command_window ();
+  if (start_gui)
+    {
+      w.init_terminal_size ();
 
       // Connect signals for changes in visibility not before w
       // is shown.
 
       w.connect_visibility_changed ();
 
-      return application.exec ();
+      w.focus_command_window ();
     }
   else
-    {
-      QApplication application (argc, argv);
-
-      octave_cli_thread main_thread (argc, argv);
+    application.setQuitOnLastWindowClosed (false);
 
-      application.setQuitOnLastWindowClosed (false);
-
-      main_thread.start ();
-
-      return application.exec ();
-    }
+  return application.exec ();
 }
--- a/libgui/src/octave-gui.h
+++ b/libgui/src/octave-gui.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libgui/src/octave-interpreter.cc
+++ b/libgui/src/octave-interpreter.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -43,6 +43,8 @@
   octave_initialize_interpreter (octave_cmdline_argc, octave_cmdline_argv,
                                  octave_embedded);
 
+  emit octave_ready_signal ();
+
   octave_execute_interpreter ();
 }
 
--- a/libgui/src/octave-interpreter.h
+++ b/libgui/src/octave-interpreter.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -38,6 +38,10 @@
 
   octave_interpreter (void) : QObject (), thread_manager () { }
 
+signals:
+
+  void octave_ready_signal ();
+
 public slots:
 
   // Initialize and execute the octave interpreter.
--- a/libgui/src/octave-qt-link.cc
+++ b/libgui/src/octave-qt-link.cc
@@ -1,8 +1,8 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
-Copyright (C) 2011-2013 John P. Swensen
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
+Copyright (C) 2011-2015 John P. Swensen
 
 This file is part of Octave.
 
@@ -43,13 +43,19 @@
 
 #include "resource-manager.h"
 
-octave_qt_link::octave_qt_link (void)
+octave_qt_link::octave_qt_link (QWidget *p)
   : octave_link (), main_thread (new QThread ()),
     command_interpreter (new octave_interpreter ())
 {
+  _current_directory = "";
+  _new_dir = true;
+
   connect (this, SIGNAL (execute_interpreter_signal (void)),
            command_interpreter, SLOT (execute (void)));
 
+  connect (command_interpreter, SIGNAL (octave_ready_signal ()),
+           p, SLOT (handle_octave_ready ()));
+
   command_interpreter->moveToThread (main_thread);
 
   main_thread->start ();
@@ -64,9 +70,37 @@
 }
 
 bool
+octave_qt_link::do_confirm_shutdown (void)
+{
+  // Lock the mutex before emitting signal.
+  mutex.lock ();
+
+  emit confirm_shutdown_signal ();
+
+  // Wait while the GUI shuts down.
+  waitcondition.wait (&mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
+
+  mutex.unlock ();
+
+  return _shutdown_confirm_result;
+}
+
+bool
 octave_qt_link::do_exit (int status)
 {
-  emit exit_signal (status);
+  emit exit_app_signal (status);
+
+  // Could wait for a while and then timeout, but for now just
+  // assume the GUI application exit will be without problems.
+  return true;
+}
+
+bool
+octave_qt_link::do_copy_image_to_clipboard (const std::string& file)
+{
+  emit copy_image_to_clipboard_signal (QString::fromStdString (file), true);
 
   return true;
 }
@@ -90,21 +124,28 @@
   QFileInfo file_info (QString::fromStdString (file));
   QStringList btn;
   QStringList role;
-  role << "AcceptRole" << "AcceptRole";
-  btn << tr ("Yes") << tr ("No");
+  role << "YesRole" << "RejectRole";
+  btn << tr ("Create") << tr ("Cancel");
+
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
 
   uiwidget_creator.signal_dialog (
     tr ("File\n%1\ndoes not exist. Do you want to create it?").
     arg (QDir::currentPath () + QDir::separator ()
          + QString::fromStdString (file)),
-    tr ("Octave Editor"), "quest", btn, tr ("Yes"), role );
+    tr ("Octave Editor"), "quest", btn, tr ("Create"), role );
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
-  // The GUI has sent a signal and the process has been awakened.
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
+
   QString answer = uiwidget_creator.get_dialog_button ();
 
-  return (answer == tr ("Yes"));
+  uiwidget_creator.mutex.unlock ();
+
+  return (answer == tr ("Create"));
 }
 
 int
@@ -112,6 +153,9 @@
                                    const std::string& msg,
                                    const std::string& title)
 {
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_dialog (QString::fromStdString (msg),
                                   QString::fromStdString (title),
                                   QString::fromStdString (dlg),
@@ -119,10 +163,15 @@
                                   QStringList ());
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
 
-  // The GUI has sent a signal and the process has been awakened.
-  return uiwidget_creator.get_dialog_result ();
+  int answer = uiwidget_creator.get_dialog_result ();
+
+  uiwidget_creator.mutex.unlock ();
+
+  return answer;
 }
 
 std::string
@@ -143,6 +192,9 @@
     btn << QString::fromStdString (btn2);
   btn << QString::fromStdString (btn3);
 
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_dialog (QString::fromStdString (msg),
                                   QString::fromStdString (title),
                                   "quest",
@@ -151,10 +203,15 @@
                                   role);
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
 
-  // The GUI has sent a signal and the process has been awakened.
-  return uiwidget_creator.get_dialog_button ().toStdString ();
+  std::string answer = uiwidget_creator.get_dialog_button ().toStdString ();
+
+  uiwidget_creator.mutex.unlock ();
+
+  return answer;
 }
 
 static QStringList
@@ -215,6 +272,9 @@
                                 const std::string& ok_string,
                                 const std::string& cancel_string)
 {
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_listview (make_qstring_list (list),
                                     QString::fromStdString (mode),
                                     width, height,
@@ -225,12 +285,15 @@
                                     QString::fromStdString (cancel_string));
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
 
-  // The GUI has sent a signal and the process has been awakened.
+  // The GUI has sent a signal and the thread has been awakened.
+
   const QIntList *selected = uiwidget_creator.get_list_index ();
   int ok = uiwidget_creator.get_dialog_result ();
 
+  uiwidget_creator.mutex.unlock ();
+
   return std::pair<std::list<int>, int> (selected->toStdList (), ok);
 }
 
@@ -243,6 +306,9 @@
 {
   std::list<std::string> retval;
 
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_inputlayout (make_qstring_list (prompt),
                                        QString::fromStdString (title),
                                        QFloatList::fromStdList (nr),
@@ -250,11 +316,14 @@
                                        make_qstring_list (defaults));
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
 
-  // The GUI has sent a signal and the process has been awakened.
   const QStringList *inputLine = uiwidget_creator.get_string_list ();
 
+  uiwidget_creator.mutex.unlock ();
+
   for (QStringList::const_iterator it = inputLine->begin ();
        it != inputLine->end (); it++)
     {
@@ -273,6 +342,9 @@
 {
   std::list<std::string> retval;
 
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_filedialog (make_filter_list (filter),
                                       QString::fromStdString (title),
                                       QString::fromStdString (filename),
@@ -280,7 +352,9 @@
                                       QString::fromStdString (multimode));
 
   // Wait while the user is responding to dialog.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
 
   // Add all the file dialog results to a string list.
   const QStringList *inputLine = uiwidget_creator.get_string_list ();
@@ -293,6 +367,8 @@
   retval.push_back ((QString ("%1").arg (
                        uiwidget_creator.get_dialog_result ())).toStdString ());
 
+  uiwidget_creator.mutex.unlock ();
+
   return retval;
 }
 
@@ -308,8 +384,8 @@
 
   QString msg
     = (addpath_option
-       ? tr ("The file %1 does not exist in the load path.  To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.").arg (qfile).arg (qdir)
-       : tr ("The file %1 is shadowed by a file with the same name in the load path.  To debug the function you are editing, change to the directory %2.").arg (qfile).arg (qdir));
+       ? tr ("The file %1 does not exist in the load path.  To run or debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.").arg (qfile).arg (qdir)
+       : tr ("The file %1 is shadowed by a file with the same name in the load path. To run or debug the function you are editing, change to the directory %2.").arg (qfile).arg (qdir));
 
   QString title = tr ("Change Directory or Add Directory to Load Path");
 
@@ -329,13 +405,20 @@
   btn << cancel_txt;
   role << "AcceptRole";
 
+  // Lock mutex before signaling.
+  uiwidget_creator.mutex.lock ();
+
   uiwidget_creator.signal_dialog (msg, title, "quest", btn, cancel_txt, role);
 
   // Wait while the user is responding to message box.
-  uiwidget_creator.wait ();
+  uiwidget_creator.waitcondition.wait (&uiwidget_creator.mutex);
+
+  // The GUI has sent a signal and the thread has been awakened.
 
   QString result = uiwidget_creator.get_dialog_button ();
 
+  uiwidget_creator.mutex.unlock ();
+
   if (result == cd_txt)
     retval = 1;
   else if (result == addpath_txt)
@@ -347,7 +430,15 @@
 void
 octave_qt_link::do_change_directory (const std::string& dir)
 {
-  emit change_directory_signal (QString::fromStdString (dir));
+  _current_directory = QString::fromStdString (dir);
+  _new_dir = true;
+}
+
+void
+octave_qt_link::update_directory ()
+{
+   emit change_directory_signal (_current_directory);
+  _new_dir = false;
 }
 
 void
@@ -357,9 +448,15 @@
 }
 
 void
-octave_qt_link::do_set_workspace (bool top_level,
+octave_qt_link::do_set_workspace (bool top_level, bool debug, 
                                   const std::list<workspace_element>& ws)
 {
+  if (! top_level && ! debug)
+    return;
+
+  if (_new_dir)
+    update_directory ();
+
   QString scopes;
   QStringList symbols;
   QStringList class_names;
@@ -378,7 +475,7 @@
       complex_flags.append (it->complex_flag ());
     }
 
-  emit set_workspace_signal (top_level, scopes, symbols, class_names,
+  emit set_workspace_signal (top_level, debug, scopes, symbols, class_names,
                              dimensions, values, complex_flags);
 }
 
--- a/libgui/src/octave-qt-link.h
+++ b/libgui/src/octave-qt-link.h
@@ -1,8 +1,8 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
-Copyright (C) 2011-2013 John P. Swensen
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
+Copyright (C) 2011-2015 John P. Swensen
 
 This file is part of Octave.
 
@@ -32,6 +32,8 @@
 #include <QObject>
 #include <QString>
 #include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
 
 #include "octave-link.h"
 #include "octave-interpreter.h"
@@ -39,9 +41,9 @@
 // Defined for purposes of sending QList<int> as part of signal.
 typedef QList<int> QIntList;
 
-// \class OctaveLink
-// \brief Provides threadsafe access to octave.
-// \author Jacob Dawid
+// @class OctaveLink
+// @brief Provides threadsafe access to octave.
+// @author Jacob Dawid
 //
 // This class is a wrapper around octave and provides thread safety by
 // buffering access operations to octave and executing them in the
@@ -53,14 +55,17 @@
 
 public:
 
-  octave_qt_link (void);
+  octave_qt_link (QWidget *p);
 
   ~octave_qt_link (void);
 
   void execute_interpreter (void);
 
+  bool do_confirm_shutdown (void);
   bool do_exit (int status);
 
+  bool do_copy_image_to_clipboard (const std::string& file);
+
   bool do_edit_file (const std::string& file);
   bool do_prompt_new_edit_file (const std::string& file);
 
@@ -103,7 +108,7 @@
 
   void do_execute_command_in_terminal (const std::string& command);
 
-  void do_set_workspace (bool top_level,
+  void do_set_workspace (bool top_level, bool debug, 
                          const std::list<workspace_element>& ws);
 
   void do_clear_workspace (void);
@@ -130,9 +135,15 @@
 
   void do_show_doc (const std::string& file);
 
+  QMutex mutex;
+  QWaitCondition waitcondition;
+  void shutdown_confirmation (bool sd) {_shutdown_confirm_result = sd;}
+
+  void update_directory (void);
+
 private:
 
-  // No copying!
+  bool _shutdown_confirm_result;
 
   octave_qt_link (const octave_qt_link&);
 
@@ -146,11 +157,14 @@
 
   octave_interpreter *command_interpreter;
 
+  QString _current_directory;
+  bool    _new_dir;
+
 signals:
 
   void execute_interpreter_signal (void);
 
-  void exit_signal (int status);
+  void copy_image_to_clipboard_signal (const QString& file, bool remove_file);
 
   void edit_file_signal (const QString& file);
 
@@ -159,6 +173,7 @@
   void execute_command_in_terminal_signal (const QString& command);
 
   void set_workspace_signal (bool top_level,
+                             bool debug,
                              const QString& scopes,
                              const QStringList& symbols,
                              const QStringList& class_names,
@@ -185,6 +200,9 @@
 
   void show_doc_signal (const QString &file);
 
+  void confirm_shutdown_signal (void);
+  void exit_app_signal (int status);
+
 public slots:
 
   void terminal_interrupt (void);
--- a/libgui/src/qtinfo/parser.cc
+++ b/libgui/src/qtinfo/parser.cc
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2009 P. L. Lucas
-Copyright (C) 2012-2013 Jacob Dawid
+Copyright (C) 2012-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -22,19 +22,19 @@
 */
 
 // Author: P. L. Lucas
-// Author: Jacob Dawid <jacob.dawid@gmail.com>
+// Author: Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
 #include "parser.h"
+#include "procstream.h"
 #include <QFileInfo>
 #include <QDir>
 #include <QFile>
 #include <QUrl>
 #include <QRegExp>
-#include <QProcess>
 #include <QBuffer>
 
 parser::parser(QObject *p)
@@ -47,7 +47,7 @@
   _compressors_map.insert ("Z",    "gunzip -c \"%1\"");
 }
 
-void
+bool
 parser::set_info_path (const QString& infoPath)
 {
   this->_info_path = infoPath;
@@ -56,15 +56,32 @@
 
   QFileInfo info (infoPath);
 
-  QString path = info.absolutePath ();
-  QString fileName = info.fileName ();
+  bool info_file_exists = info.exists ();
+  QHash<QString, QString>::iterator it;
+  for (it = _compressors_map.begin (); it != _compressors_map.end (); it++)
+    {
+      if (info_file_exists)
+        break;
+      info_file_exists = QFileInfo (info.absoluteFilePath () + "." + it.key ()).exists ();
+    }
 
-  QDir infoDir (path);
-  QStringList filter;
-  filter.append (fileName + "*");
+  if (info_file_exists)
+    {
+      QString path = info.absolutePath ();
+      QString fileName = info.fileName ();
+
+      QDir infoDir (path);
+      QStringList filter;
+      filter.append (fileName + "*");
 
-  _info_files = infoDir.entryInfoList (filter, QDir::Files);
-  parse_info_map ();
+      _info_files = infoDir.entryInfoList (filter, QDir::Files);
+
+      parse_info_map ();
+
+      return true;
+    }
+  else
+    return false;
 }
 
 QString
@@ -77,15 +94,22 @@
 parser::open_file (QFileInfo & file_info)
 {
   QIODevice *iodevice = 0;
-  if ( _compressors_map.contains(file_info.suffix ()))
+  if (_compressors_map.contains (file_info.suffix ()))
     {
-      QProcess gzip;
-      gzip.start (_compressors_map.value (file_info.suffix ()).arg (file_info.absoluteFilePath ()));
+      QString command = _compressors_map.value (file_info.suffix ()).arg (file_info.absoluteFilePath ());
+      iprocstream ips (command.toStdString ());
 
-      if (!gzip.waitForFinished ())
+      if (ips.bad ())
         return 0;
 
-      QByteArray result = gzip.readAll ();
+      QByteArray result;
+      char buffer[1024];
+
+      while (! ips.eof ())
+        {
+          ips.read (buffer, sizeof (buffer));
+          result.append (buffer, ips.gcount ());
+        }
 
       QBuffer *io = new QBuffer (this);
       io->setData (result);
@@ -115,6 +139,10 @@
 
       return ref.pos-_node_map [ref._node_name].pos;
     }
+  if (_node_map.contains (node))
+    {
+      return 0;  // node: show from the beginning
+    }
   return -1;
 }
 
@@ -277,7 +305,7 @@
   QRegExp re ("(\\*[N|n]ote|\n\\*)([ |\n]+)([^:]+):([^:\\.,]*)([:,\\.]+)");
   int i = 0, f;
 
-  while ( (i = re.indexIn (text,i)) != -1)
+  while ((i = re.indexIn (text,i)) != -1)
     {
       QString type     = re.cap (1);
       QString note     = re.cap (3);
@@ -317,7 +345,7 @@
       url_link.replace ("</b>","");
       url_link = QUrl::toPercentEncoding (url_link, "", "'");
 
-      href += "<img src=':/actions/icons/bookmark.png' width=10/>";
+      href += "<font style=\"color:DarkGray; font-weight:bold;\">&raquo;</font>";
       href +=  "&nbsp;<a href='" + url_link + "'>" + note + "</a>" + term;
       f = re.matchedLength ();
       text.replace (i,f,href);
@@ -330,7 +358,7 @@
 {
   QRegExp re ("`([^']+)'");
   int i = 0, f;
-  while ( (i = re.indexIn (text, i)) != -1)
+  while ((i = re.indexIn (text, i)) != -1)
     {
       QString t = re.cap (1);
       QString bold = "<font style=\"color:SteelBlue;font-weight:bold\">" + t +
@@ -380,7 +408,7 @@
       info_to_html (text2);
 
       text = text1 + "<a name='" + anchor
-             + "'/><img src=':/actions/icons/arrow_down.png'><br>&nbsp;"
+             + "'/><font style=\"color:DarkBlue; font: bold monospace large;\">&diams;</font><br>&nbsp;"
              + text2;
     }
   else
@@ -392,9 +420,9 @@
 
   QString navigationLinks = QString (
         "<b>Section:</b> <font style=\"color:DarkRed\">%1</font><br>"
-        "<img src=':/actions/icons/arrow_left.png'/> <b>Previous Section:</b> <a href='%2'>%3</a><br>"
-        "<img src=':/actions/icons/arrow_right.png'/> <b>Next Section:</b> <a href='%4'>%5</a><br>"
-        "<img src=':/actions/icons/arrow_up.png'/> <b>Up:</b> <a href='%6'>%7</a><br>\n"
+        "<b>Previous Section:</b> <a href='%2'>%3</a><br>"
+        "<b>Next Section:</b> <a href='%4'>%5</a><br>"
+        "<b>Up:</b> <a href='%6'>%7</a><br>\n"
         )
       .arg (nodeName)
       .arg (QString (QUrl::toPercentEncoding (nodePrev, "", "'")))
@@ -436,7 +464,7 @@
       while (! (nodeText=get_next_node (io)).isEmpty () && foundCount < 2)
         {
           QString first_line = get_first_line (nodeText);
-          if (first_line.startsWith ("Tag") )
+          if (first_line.startsWith ("Tag"))
             {
               foundCount++;
               int pos = 0;
@@ -471,7 +499,7 @@
               foundCount++;
               int pos = 0;
 
-              while ( (pos = re_files.indexIn (nodeText, pos)) != -1)
+              while ((pos = re_files.indexIn (nodeText, pos)) != -1)
                 {
                   QString fileCap = re_files.cap (1).trimmed ();
                   int index = re_files.cap (2).toInt ();
@@ -501,7 +529,8 @@
 void
 parser::real_position (int pos, QFileInfo & file_info, int & real_pos)
 {
-  int header = -1, sum = 0;
+  int header = -1;
+  int sum = 0;
   for (int i = 0; i < _info_file_real_size_list.size (); i++)
     {
       info_file_item item = _info_file_real_size_list.at (i);
@@ -538,7 +567,7 @@
 {
   int pos = 0;
 
-  while ( (pos = re.indexIn (text, pos)) != -1)
+  while ((pos = re.indexIn (text, pos)) != -1)
     {
       QString cap = text.mid (pos,re.matchedLength ());
       QString a (after);
@@ -578,7 +607,7 @@
         }
 
       QString node_text;
-      while ( !(node_text = get_next_node (io)).isEmpty ())
+      while (! (node_text = get_next_node (io)).isEmpty ())
         {
           QString firstLine = get_first_line (node_text);
           QString node = get_node_name (node_text);
@@ -616,7 +645,7 @@
               if (founds == 0)
                 {
                   results.append(
-                    "<br>\n<img src=':/actions/icons/bookmark.png' width=10> <a href='"
+                    "<br>\n<font style=\"color:DarkGray; font-weight:bold;\">&raquo;</font> <a href='"
                     + QString(QUrl::toPercentEncoding(node,"","'")) +
                     "'>");
                   results.append (node);
@@ -653,8 +682,25 @@
         {
           // found ref, so return its name
           text = "XREF" + ref_name;
+          break;
         }
     }
+
+  if (text.isEmpty ())  // try the statement-nodes
+    {
+      QHash<QString, node_map_item>::iterator itn;
+      for (itn=_node_map.begin (); itn!=_node_map.end (); ++itn)
+        {
+          QString k = itn.key ();
+          if (k == "The " + ref_name + " Statement")
+            {
+              // found ref, so return its name
+              text = k;
+              break;
+            }
+        }
+    }
+
   return text;
 }
 
--- a/libgui/src/qtinfo/parser.h
+++ b/libgui/src/qtinfo/parser.h
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2009 P.L. Lucas
-Copyright (C) 2012-2013 Jacob Dawid
+Copyright (C) 2012-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -22,7 +22,7 @@
 */
 
 // Author: P. L. Lucas
-// Author: Jacob Dawid <jacob.dawid@gmail.com>
+// Author: Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
 #include <QStringList>
 #include <QIODevice>
@@ -30,7 +30,7 @@
 #include <QHash>
 
 /**
- * \class parser
+ * @class parser
  * This class gets nodes and searchs inside of 'info files'.
  * <p>Each info file has nodes. Every node has the documentation.
  * Info files contains a map with position of each node.</p>
@@ -53,7 +53,7 @@
 
 public:
   parser (QObject *parent = 0);
-  void set_info_path (const QString& _info_path);
+  bool set_info_path (const QString& _info_path);
   QString get_info_path ();
   QString search_node (const QString& node);
   QString global_search (const QString& text, int maxFounds);
@@ -103,9 +103,9 @@
   QIODevice *open_file(QFileInfo & fileInfo);
 
   /** Calculates real position of nodes.
-    * \param pos position from info file.
-    * \param fileInfo returns file what contains that position.
-    * \param realPos returns real position inside of fileInfo.
+    * @param pos position from info file.
+    * @param fileInfo returns file what contains that position.
+    * @param realPos returns real position inside of fileInfo.
     */
   void real_position (int pos, QFileInfo & file_info, int & real_pos);
 
--- a/libgui/src/qtinfo/webinfo.cc
+++ b/libgui/src/qtinfo/webinfo.cc
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2009 P. L. Lucas
-Copyright (C) 2012-2013 Jacob Dawid
+Copyright (C) 2012-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -22,7 +22,7 @@
 */
 
 // Author: P. L. Lucas
-// Author: Jacob Dawid <jacob.dawid@gmail.com>
+// Author: Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -37,6 +37,7 @@
 #include "file-ops.h"
 #include "help.h"
 #include "defaults.h"
+#include "resource-manager.h"
 
 
 webinfo::webinfo (QWidget *p)
@@ -57,15 +58,17 @@
   _tab_bar->setSizePolicy (QSizePolicy::Preferred,QSizePolicy::Preferred);
   _tab_bar->setExpanding (false);
   _tab_bar->setTabsClosable (true);
+#ifdef HAVE_QTABWIDGET_SETMOVABLE
   _tab_bar->setMovable (true);
+#endif
   hbox_layout->addWidget (_tab_bar);
 
   _zoom_in_button = new QToolButton (this);
-  _zoom_in_button->setIcon (QIcon (":/actions/icons/zoom-in.png"));
+  _zoom_in_button->setIcon (resource_manager::icon ("zoom-in"));
   hbox_layout->addWidget (_zoom_in_button);
 
   _zoom_out_button = new QToolButton (this);
-  _zoom_out_button->setIcon (QIcon (":/actions/icons/zoom-out.png"));
+  _zoom_out_button->setIcon (resource_manager::icon ("zoom-out"));
   hbox_layout->addWidget (_zoom_out_button);
 
   _stacked_widget = new QStackedWidget (this);
@@ -94,15 +97,30 @@
 
   resize (500, 300);
 
-  set_info_path (QString::fromStdString (Vinfo_file));
+  if (! set_info_path (QString::fromStdString (Vinfo_file)))
+    { // Info file does not exist
+      _search_check_box->setEnabled (false);
+      _search_line_edit->setEnabled (false);
 
+      QTextBrowser *msg = addNewTab (tr ("Error"));
+      QString msg_text = QString (
+          "<html><body><br><br><center><b>%1</b></center></body></html>").
+          arg (tr ("The info file<p>%1<p>or compressed versions do not exist").
+          arg(QString::fromStdString (Vinfo_file)));
+      msg->setHtml (msg_text);
+    }
 }
 
-void
+bool
 webinfo::set_info_path (const QString& info_path)
 {
-  _parser.set_info_path (info_path);
-  load_node ("Top");
+  if (_parser.set_info_path (info_path))
+    {
+      load_node ("Top");
+      return true;
+    }
+  else
+    return false;
 }
 
 void
@@ -165,7 +183,7 @@
   _text_browser->show ();
 
   connect (_text_browser, SIGNAL (anchorClicked (const QUrl &)), this,
-           SLOT (link_clicked (const QUrl &)) );
+           SLOT (link_clicked (const QUrl &)));
   disconnect(_tab_bar, SIGNAL (currentChanged(int)), this,
              SLOT (current_tab_changed (int)));
 
@@ -267,6 +285,20 @@
 }
 
 void
+webinfo::selectAll ()
+{
+  if (_search_line_edit->hasFocus ())
+    {
+      _search_line_edit->selectAll ();
+    }
+  if (_text_browser->hasFocus ())
+    {
+      _text_browser->selectAll ();
+    }
+}
+
+
+void
 webinfo::pasteClipboard ()
 {
   if (_search_line_edit->hasFocus ())
--- a/libgui/src/qtinfo/webinfo.h
+++ b/libgui/src/qtinfo/webinfo.h
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2009 P. L. Lucas
-Copyright (C) 2012-2013 Jacob Dawid
+Copyright (C) 2012-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -22,7 +22,7 @@
 */
 
 // Author: P. L. Lucas
-// Author: 2012 Jacob Dawid <jacob.dawid@gmail.com>
+// Author: 2012 Jacob Dawid <jacob.dawid@cybercatalyst.com>
 
 #include <QTextBrowser>
 #include "parser.h"
@@ -38,7 +38,7 @@
   Q_OBJECT
 public:
   webinfo (QWidget *parent = 0);
-  void set_info_path (const QString& info_path);
+  bool set_info_path (const QString& info_path);
   void load_node (const QString& node_name);
 
   void load_ref (const QString &ref_name);
@@ -53,6 +53,7 @@
 
   void copyClipboard ();
   void pasteClipboard ();
+  void selectAll ();
 
 private:
   QTextBrowser        *_text_browser;
--- a/libgui/src/resource-manager.cc
+++ b/libgui/src/resource-manager.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -191,7 +191,7 @@
       QString settings_text = in.readAll ();
       qt_settings.close ();
 
-      // Get the default monospaced font and replace placeholder
+      // Get the default monospaced font
 #if defined (HAVE_QFONT_MONOSPACE)
       QFont fixed_font;
       fixed_font.setStyleHint (QFont::Monospace);
@@ -203,6 +203,16 @@
 #else
       QString default_family = "courier";
 #endif
+
+      // Get the default custom editor
+#if defined (Q_OS_WIN32)
+      QString custom_editor = "notepad++ -n%l %f";
+#else
+      QString custom_editor = "emacs +%l %f";
+#endif
+
+      // Replace placeholders
+      settings_text.replace ("__default_custom_editor__", custom_editor);
       settings_text.replace ("__default_font__", default_family);
       settings_text.replace ("__default_font_size__", "10");
 
@@ -232,10 +242,11 @@
          && settings->isWritable ()
          && settings->status () ==  QSettings::NoError))
     {
-      QString msg = QString (QT_TR_NOOP ("The settings file\n%1\n"
-              "does not exist and can not be created.\n"
-              "Make sure you have read and write permissions to\n%2\n\n"
-              "Octave GUI must be closed now."));
+      QString msg = QString (QT_TR_NOOP (
+        "The settings file\n%1\n"
+        "does not exist and can not be created.\n"
+        "Make sure you have read and write permissions to\n%2\n\n"
+        "Octave GUI must be closed now."));
       QMessageBox::critical (0, QString (QT_TR_NOOP ("Octave Critical Error")),
           msg.arg (do_get_settings_file ()).arg (do_get_settings_directory ()));
       exit (1);
@@ -304,3 +315,13 @@
 {
   return QTerminal::default_colors ();
 }
+
+QIcon
+resource_manager::do_icon (const QString& icon_name, bool fallback)
+{
+  if (fallback)
+    return QIcon::fromTheme (icon_name,
+                             QIcon (":/actions/icons/" + icon_name + ".png"));
+  else
+    return QIcon::fromTheme (icon_name);
+}
--- a/libgui/src/resource-manager.h
+++ b/libgui/src/resource-manager.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -46,6 +46,14 @@
     return instance_ok () ? instance->do_get_settings () : 0;
   }
 
+  static QIcon icon (const QString& icon_name, bool fallback = true)
+  {
+    if (instance_ok ())
+      return instance->do_icon (icon_name, fallback);
+
+    return QIcon ();
+  }
+
   static QSettings *get_default_settings (void)
   {
     return instance_ok () ? instance->do_get_default_settings () : 0;
@@ -129,6 +137,8 @@
 
   bool do_is_first_run (void) const;
 
+  QIcon do_icon (const QString& icon, bool fallback);
+
 };
 
 #endif // RESOURCEMANAGER_H
--- a/libgui/src/resource.qrc
+++ b/libgui/src/resource.qrc
@@ -1,48 +1,41 @@
 <RCC>
     <qresource prefix="/actions">
-        <file>icons/artsbuilderexecute.png</file>
-        <file>icons/editcopy.png</file>
-        <file>icons/editcut.png</file>
-        <file>icons/editdelete.png</file>
-        <file>icons/editpaste.png</file>
-        <file>icons/fileclose.png</file>
-        <file>icons/filenew.png</file>
-        <file>icons/fileopen.png</file>
-        <file>icons/filesave.png</file>
-        <file>icons/fileprint.png</file>
+        <file>icons/applications-system.png</file>
+        <file>icons/bp-toggle.png</file>
+        <file>icons/bp-rm-all.png</file>
+        <file>icons/bp-prev.png</file>
+        <file>icons/bp-next.png</file>
+        <file>icons/db-cont.png</file>
+        <file>icons/db-step.png</file>
+        <file>icons/db-step-in.png</file>
+        <file>icons/db-step-out.png</file>
+        <file>icons/db-stop.png</file>
+        <file>icons/document-new.png</file>
+        <file>icons/document-open.png</file>
+        <file>icons/document-print.png</file>
+        <file>icons/document-save.png</file>
+        <file>icons/document-save-as.png</file>
+        <file>icons/edit-copy.png</file>
+        <file>icons/edit-cut.png</file>
+        <file>icons/edit-delete.png</file>
+        <file>icons/edit-find.png</file>
+        <file>icons/edit-find-replace.png</file>
+        <file>icons/edit-paste.png</file>
+        <file>icons/edit-redo.png</file>
+        <file>icons/edit-undo.png</file>
         <file>icons/folder.png</file>
-        <file>icons/folder_documents.png</file>
-        <file>icons/folder_new.png</file>
-        <file>icons/home.png</file>
-        <file>icons/ok.png</file>
-        <file>icons/redo.png</file>
-        <file>icons/reload.png</file>
-        <file>icons/search.png</file>
-        <file>icons/undo.png</file>
-        <file>icons/up.png</file>
-        <file>icons/configure.png</file>
-        <file>icons/filesaveas.png</file>
-        <file>icons/redled.png</file>
-        <file>icons/arrow_right.png</file>
-        <file>icons/arrow_left.png</file>
-        <file>icons/arrow_up.png</file>
-        <file>icons/arrow_down.png</file>
-        <file>icons/bookmark.png</file>
-        <file>icons/zoom-in.png</file>
-        <file>icons/zoom-out.png</file>
-        <file>icons/find.png</file>
-        <file>icons/findf.png</file>
-        <file>icons/gear.png</file>
-        <file>icons/logo.png</file>
-        <file>icons/bp_toggle.png</file>
-        <file>icons/bp_rm_all.png</file>
-        <file>icons/bp_prev.png</file>
-        <file>icons/bp_next.png</file>
-        <file>icons/db_cont.png</file>
-        <file>icons/db_step.png</file>
-        <file>icons/db_step_in.png</file>
-        <file>icons/db_step_out.png</file>
-        <file>icons/db_stop.png</file>
+        <file>icons/folder-new.png</file>
+        <file>icons/go-first.png</file>
+        <file>icons/go-last.png</file>
+        <file>icons/go-up.png</file>
+        <file>icons/graphic_logo_FilesDockWidget.png</file>
+        <file>icons/graphic_logo_FileEditor.png</file>
+        <file>icons/graphic_logo_NewsDockWidget.png</file>
+        <file>icons/graphic_logo_TerminalDockWidget.png</file>
+        <file>icons/graphic_logo_HistoryDockWidget.png</file>
+        <file>icons/graphic_logo_WorkspaceView.png</file>
+        <file>icons/graphic_logo_DocumentationDockWidget.png</file>
+        <file>icons/graphic_logo_ReleaseWidget.png</file>
         <file>icons/letter_logo_FilesDockWidget.png</file>
         <file>icons/letter_logo_FileEditor.png</file>
         <file>icons/letter_logo_NewsDockWidget.png</file>
@@ -51,17 +44,18 @@
         <file>icons/letter_logo_WorkspaceView.png</file>
         <file>icons/letter_logo_DocumentationDockWidget.png</file>
         <file>icons/letter_logo_ReleaseWidget.png</file>
-        <file>icons/graphic_logo_FilesDockWidget.png</file>
-        <file>icons/graphic_logo_FileEditor.png</file>
-        <file>icons/graphic_logo_NewsDockWidget.png</file>
-        <file>icons/graphic_logo_TerminalDockWidget.png</file>
-        <file>icons/graphic_logo_HistoryDockWidget.png</file>
-        <file>icons/graphic_logo_WorkspaceView.png</file>
-        <file>icons/graphic_logo_DocumentationDockWidget.png</file>
-        <file>icons/graphic_logo_ReleaseWidget.png</file>
-        <file>icons/warning.png</file>
+        <file>icons/logo.png</file>
+        <file>icons/preferences-system.png</file>
+        <file>icons/system-run.png</file>
+        <file>icons/user-home.png</file>
+        <file>icons/view-refresh.png</file>
         <file>icons/widget-close.png</file>
         <file>icons/widget-dock.png</file>
         <file>icons/widget-undock.png</file>
+        <file>icons/widget-close-light.png</file>
+        <file>icons/widget-dock-light.png</file>
+        <file>icons/widget-undock-light.png</file>
+        <file>icons/zoom-in.png</file>
+        <file>icons/zoom-out.png</file>
     </qresource>
 </RCC>
--- a/libgui/src/settings-dialog.cc
+++ b/libgui/src/settings-dialog.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -25,15 +25,19 @@
 #endif
 
 #include "resource-manager.h"
+#include "shortcut-manager.h"
 #include "workspace-model.h"
 #include "settings-dialog.h"
 #include "ui-settings-dialog.h"
 #include <QDir>
 #include <QFileInfo>
+#include <QFileDialog>
 #include <QVector>
 #include <QHash>
 
 #ifdef HAVE_QSCINTILLA
+#include "octave-qscintilla.h"
+#include "octave-txt-lexer.h"
 #include <QScrollArea>
 
 #if defined (HAVE_QSCI_QSCILEXEROCTAVE_H)
@@ -57,7 +61,9 @@
   ui->setupUi (this);
 
   QSettings *settings = resource_manager::get_settings ();
-  // FIXME: what should happen if settings is 0?
+
+  // restore last geometry
+  restoreGeometry (settings->value("settings/geometry").toByteArray ());
 
   // look for available language files and the actual settings
   QString qm_dir_name = resource_manager::get_gui_translation_dir ();
@@ -79,10 +85,21 @@
   else
     ui->comboBox_language->setCurrentIndex (0);  // System is default
 
-  ui->toolbar_icon_size->setValue (settings->value ("toolbar_icon_size",
-                                                    16).toInt ());
+  // icon size
+  QButtonGroup *icon_size_group = new QButtonGroup (this);
+  icon_size_group->addButton (ui->icon_size_small);
+  icon_size_group->addButton (ui->icon_size_normal);
+  icon_size_group->addButton (ui->icon_size_large);
+  int icon_size = settings->value ("toolbar_icon_size", 0).toInt ();
+  ui->icon_size_normal->setChecked (true);  // the default
+  ui->icon_size_small->setChecked (icon_size == -1);
+  ui->icon_size_large->setChecked (icon_size == 1);
 
   // which icon has to be selected
+  QButtonGroup *icon_group = new QButtonGroup (this);
+  icon_group->addButton (ui->general_icon_octave);
+  icon_group->addButton (ui->general_icon_graphic);
+  icon_group->addButton (ui->general_icon_letter);
   QString widget_icon_set =
     settings->value ("DockWidgets/widget_icon_set","NONE").toString ();
   ui->general_icon_octave-> setChecked (true);  // the default (if invalid set)
@@ -90,14 +107,73 @@
   ui->general_icon_graphic-> setChecked (widget_icon_set == "GRAPHIC");
   ui->general_icon_letter-> setChecked (widget_icon_set == "LETTER");
 
+  // custom title bar of dock widget
+  QVariant default_var = QColor (255,255,255);
+  QColor bg_color = settings->value ("Dockwidgets/title_bg_color",
+                                     default_var).value<QColor> ();
+  _widget_title_bg_color = new color_picker (bg_color);
+  _widget_title_bg_color->setEnabled (false);
+  ui->layout_widget_bgtitle->addWidget (_widget_title_bg_color,0);
+  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
+           _widget_title_bg_color, SLOT (setEnabled (bool)));
+
+  default_var = QColor (192,192,192);
+  QColor bg_color_active = settings->value ("Dockwidgets/title_bg_color_active",
+                                      default_var).value<QColor> ();
+  _widget_title_bg_color_active = new color_picker (bg_color_active);
+  _widget_title_bg_color_active->setEnabled (false);
+  ui->layout_widget_bgtitle_active->addWidget (_widget_title_bg_color_active,0);
+  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
+           _widget_title_bg_color_active, SLOT (setEnabled (bool)));
+
+  default_var = QColor (0,0,0);
+  QColor fg_color = settings->value ("Dockwidgets/title_fg_color",
+                                     default_var).value<QColor> ();
+  _widget_title_fg_color = new color_picker (fg_color);
+  _widget_title_fg_color->setEnabled (false);
+  ui->layout_widget_fgtitle->addWidget (_widget_title_fg_color,0);
+  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
+           _widget_title_fg_color, SLOT (setEnabled (bool)));
+
+  default_var = QColor (0,0,0);
+  QColor fg_color_active = settings->value ("Dockwidgets/title_fg_color_active",
+                                      default_var).value<QColor> ();
+  _widget_title_fg_color_active = new color_picker (fg_color_active);
+  _widget_title_fg_color_active->setEnabled (false);
+  ui->layout_widget_fgtitle_active->addWidget (_widget_title_fg_color_active,0);
+  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
+           _widget_title_fg_color_active, SLOT (setEnabled (bool)));
+
+  ui->sb_3d_title->setValue (
+    settings->value ("DockWidgets/widget_title_3d", 50).toInt ());
+  ui->cb_widget_custom_style->setChecked (
+    settings->value ("DockWidgets/widget_title_custom_style",false).toBool ());
+
+  // prompt on exit
+  ui->cb_prompt_to_exit->setChecked (
+    settings->value ("prompt_to_exit",false).toBool ());
+
+  // Main status bar
+  ui->cb_status_bar->setChecked (
+    settings->value ("show_status_bar",true).toBool ());
+
+  // Octave startup
+  ui->cb_restore_octave_dir->setChecked (
+    settings->value ("restore_octave_dir",false).toBool ());
+  ui->le_octave_dir->setText (
+    settings->value ("octave_startup_dir").toString ());
+  connect (ui->pb_octave_dir, SIGNAL (pressed ()),
+           this, SLOT (get_octave_dir ()));
+
+  // editor
   ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor",
                                                         false).toBool ());
   ui->customFileEditor->setText (
     settings->value ("customFileEditor").toString ());
   ui->editor_showLineNumbers->setChecked (
-    settings->value ("editor/showLineNumbers",true).toBool () );
+    settings->value ("editor/showLineNumbers",true).toBool ());
 
-  QVariant default_var = QColor (240, 240, 240);
+  default_var = QColor (240, 240, 240);
   QColor setting_color = settings->value ("editor/highlight_current_line_color",
                                           default_var).value<QColor> ();
   _editor_current_line_color = new color_picker (setting_color);
@@ -107,14 +183,30 @@
   connect (ui->editor_highlightCurrentLine, SIGNAL (toggled (bool)),
            _editor_current_line_color, SLOT (setEnabled (bool)));
   ui->editor_highlightCurrentLine->setChecked (
-    settings->value ("editor/highlightCurrentLine",true).toBool () );
+    settings->value ("editor/highlightCurrentLine",true).toBool ());
+  ui->editor_long_line_marker->setChecked (
+    settings->value ("editor/long_line_marker",true).toBool ());
+  ui->editor_long_line_column->setValue (
+    settings->value ("editor/long_line_column",80).toInt ());
+  ui->cb_edit_status_bar->setChecked (
+    settings->value ("editor/show_edit_status_bar",true).toBool ());
+  ui->cb_code_folding->setChecked (
+    settings->value ("editor/code_folding",true).toBool ());
 
   ui->editor_codeCompletion->setChecked (
-    settings->value ("editor/codeCompletion", true).toBool () );
+    settings->value ("editor/codeCompletion", true).toBool ());
   ui->editor_spinbox_ac_threshold->setValue (
     settings->value ("editor/codeCompletion_threshold",2).toInt ());
   ui->editor_checkbox_ac_keywords->setChecked (
     settings->value ("editor/codeCompletion_keywords",true).toBool ());
+  ui->editor_checkbox_ac_builtins->setEnabled (
+    ui->editor_checkbox_ac_keywords->isChecked ());
+  ui->editor_checkbox_ac_functions->setEnabled (
+    ui->editor_checkbox_ac_keywords->isChecked ());
+  ui->editor_checkbox_ac_builtins->setChecked (
+    settings->value ("editor/codeCompletion_octave_builtins",true).toBool ());
+  ui->editor_checkbox_ac_functions->setChecked (
+    settings->value ("editor/codeCompletion_octave_functions",true).toBool ());
   ui->editor_checkbox_ac_document->setChecked (
     settings->value ("editor/codeCompletion_document",false).toBool ());
   ui->editor_checkbox_ac_case->setChecked (
@@ -125,6 +217,24 @@
     settings->value ("editor/show_white_space", false).toBool ());
   ui->editor_ws_indent_checkbox->setChecked (
     settings->value ("editor/show_white_space_indent",false).toBool ());
+  ui->cb_show_eol->setChecked (
+    settings->value ("editor/show_eol_chars",false).toBool () );
+  ui->cb_show_hscrollbar->setChecked (
+    settings->value ("editor/show_hscroll_bar",true).toBool ());
+
+#ifdef HAVE_QSCINTILLA
+#if defined (Q_OS_WIN32)
+  int eol_mode = QsciScintilla::EolWindows;
+#elif defined (Q_OS_MAC)
+  int eol_mode = QsciScintilla::EolMac;
+#else
+  int eol_mode = QsciScintilla::EolUnix;
+#endif
+#else
+  int eol_mode = 2;
+#endif
+  ui->combo_eol_mode->setCurrentIndex (
+    settings->value ("editor/default_eol_mode",eol_mode).toInt () );
   ui->editor_auto_ind_checkbox->setChecked (
     settings->value ("editor/auto_indent", true).toBool ());
   ui->editor_tab_ind_checkbox->setChecked (
@@ -135,39 +245,38 @@
     settings->value ("editor/show_indent_guides",false).toBool ());
   ui->editor_ind_width_spinbox->setValue (
     settings->value ("editor/indent_width", 2).toInt ());
+  ui->editor_ind_uses_tabs_checkbox->setChecked (
+    settings->value ("editor/indent_uses_tabs", false).toBool ());
   ui->editor_tab_width_spinbox->setValue (
     settings->value ("editor/tab_width", 2).toInt ());
   ui->editor_longWindowTitle->setChecked (
     settings->value ("editor/longWindowTitle",false).toBool ());
+  ui->editor_notebook_tab_width_min->setValue (
+    settings->value ("editor/notebook_tab_width_min", 160).toInt ());
+  ui->editor_notebook_tab_width_max->setValue (
+    settings->value ("editor/notebook_tab_width_max", 300).toInt ());
   ui->editor_restoreSession->setChecked (
     settings->value ("editor/restoreSession", true).toBool ());
   ui->editor_create_new_file->setChecked (
     settings->value ("editor/create_new_file",false).toBool ());
+  ui->editor_reload_changed_files->setChecked (
+    settings->value ("editor/always_reload_changed_files",false).toBool ());
+
+  // terminal
   ui->terminal_fontName->setCurrentFont (QFont (
-    settings->value ("terminal/fontName","Courier New").toString ()) );
+      settings->value ("terminal/fontName","Courier New").toString ()));
   ui->terminal_fontSize->setValue (
     settings->value ("terminal/fontSize", 10).toInt ());
-  ui->showFileSize->setChecked (
-    settings->value ("filesdockwidget/showFileSize", false).toBool ());
-  ui->showFileType->setChecked (
-    settings->value ("filesdockwidget/showFileType", false).toBool ());
-  ui->showLastModified->setChecked (
-    settings->value ("filesdockwidget/showLastModified",false).toBool ());
-  ui->showHiddenFiles->setChecked (
-    settings->value ("filesdockwidget/showHiddenFiles",false).toBool ());
-  ui->useAlternatingRowColors->setChecked (
-    settings->value ("filesdockwidget/useAlternatingRowColors",true).toBool ());
-  ui->sync_octave_directory->setChecked (
-    settings->value ("filesdockwidget/sync_octave_directory",true).toBool ());
-  ui->checkbox_allow_web_connect->setChecked (
-    settings->value ("news/allow_web_connection",false).toBool ());
-  ui->useProxyServer->setChecked (
-    settings->value ("useProxyServer", false).toBool ());
-  ui->proxyHostName->setText (settings->value ("proxyHostName").toString ());
+  ui->terminal_history_buffer->setValue (
+    settings->value ("terminal/history_buffer",1000).toInt ());
   ui->terminal_cursorBlinking->setChecked (
     settings->value ("terminal/cursorBlinking",true).toBool ());
   ui->terminal_cursorUseForegroundColor->setChecked (
     settings->value ("terminal/cursorUseForegroundColor",true).toBool ());
+  ui->terminal_focus_command->setChecked (
+    settings->value ("terminal/focus_after_command",false).toBool ());
+  ui->terminal_print_dbg_location->setChecked (
+    settings->value ("terminal/print_debug_location",false).toBool ());
 
   QString cursorType
     = settings->value ("terminal/cursorType", "ibeam").toString ();
@@ -186,10 +295,38 @@
   else if (cursorType == "underline")
     ui->terminal_cursorType->setCurrentIndex (2);
 
+  // file browser
+  ui->showFileSize->setChecked (
+    settings->value ("filesdockwidget/showFileSize", false).toBool ());
+  ui->showFileType->setChecked (
+    settings->value ("filesdockwidget/showFileType", false).toBool ());
+  ui->showLastModified->setChecked (
+    settings->value ("filesdockwidget/showLastModified",false).toBool ());
+  ui->showHiddenFiles->setChecked (
+    settings->value ("filesdockwidget/showHiddenFiles",false).toBool ());
+  ui->useAlternatingRowColors->setChecked (
+    settings->value ("filesdockwidget/useAlternatingRowColors",true).toBool ());
+  connect (ui->sync_octave_directory, SIGNAL (toggled (bool)),
+           this, SLOT (set_disabled_pref_file_browser_dir (bool)));
+  ui->sync_octave_directory->setChecked (
+    settings->value ("filesdockwidget/sync_octave_directory",true).toBool ());
+  ui->cb_restore_file_browser_dir->setChecked (
+    settings->value ("filesdockwidget/restore_last_dir",false).toBool ());
+  ui->le_file_browser_dir->setText (
+    settings->value ("filesdockwidget/startup_dir").toString ());
+  connect (ui->pb_file_browser_dir, SIGNAL (pressed ()),
+           this, SLOT (get_file_browser_dir ()));
+
+  ui->checkbox_allow_web_connect->setChecked (
+    settings->value ("news/allow_web_connection",false).toBool ());
+  ui->useProxyServer->setChecked (
+    settings->value ("useProxyServer", false).toBool ());
+  ui->proxyHostName->setText (settings->value ("proxyHostName").toString ());
+
   int currentIndex = 0;
   QString proxyTypeString = settings->value ("proxyType").toString ();
-  while ( (currentIndex < ui->proxyType->count ())
-          && (ui->proxyType->currentText () != proxyTypeString))
+  while ((currentIndex < ui->proxyType->count ())
+         && (ui->proxyType->currentText () != proxyTypeString))
     {
       currentIndex++;
       ui->proxyType->setCurrentIndex (currentIndex);
@@ -199,12 +336,38 @@
   ui->proxyUserName->setText (settings->value ("proxyUserName").toString ());
   ui->proxyPassword->setText (settings->value ("proxyPassword").toString ());
 
-  // qorkspace colors
+  // Workspace
+  // colors
   read_workspace_colors (settings);
+  // hide tool tips
+  ui->cb_hide_tool_tips->setChecked (
+    settings->value ("workspaceview/hide_tool_tips",false).toBool ());
 
   // terminal colors
   read_terminal_colors (settings);
 
+  // shortcuts
+
+  ui->cb_prevent_readline_conflicts->setChecked (
+    settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ());
+  int set = settings->value ("shortcuts/set",0).toInt ();
+  ui->rb_sc_set1->setChecked (set == 0);
+  ui->rb_sc_set2->setChecked (set == 1);
+
+  // initialize the tree view with all shortcut data
+  shortcut_manager::fill_treewidget (ui->shortcuts_treewidget);
+
+  // connect the buttons for import/export of the shortcut sets
+  connect (ui->btn_import_shortcut_set1, SIGNAL (clicked ()),
+           this, SLOT (import_shortcut_set1 ()));
+  connect (ui->btn_export_shortcut_set1, SIGNAL (clicked ()),
+           this, SLOT (export_shortcut_set1 ()));
+  connect (ui->btn_import_shortcut_set2, SIGNAL (clicked ()),
+           this, SLOT (import_shortcut_set2 ()));
+  connect (ui->btn_export_shortcut_set2, SIGNAL (clicked ()),
+           this, SLOT (export_shortcut_set2 ()));
+
+
 #ifdef HAVE_QSCINTILLA
   // editor styles: create lexer, read settings, and create dialog elements
   QsciLexer *lexer;
@@ -232,22 +395,17 @@
   lexer = new QsciLexerBash ();
   read_lexer_settings (lexer,settings);
   delete lexer;
+  lexer = new octave_txt_lexer ();
+  read_lexer_settings (lexer,settings);
+  delete lexer;
 #endif
 
   // which tab is the desired one?
-  if (desired_tab.isEmpty ())
-    ui->tabWidget->setCurrentIndex (settings->value ("settings/last_tab",
-                                    0).toInt ());
-  else
-    {
-      QHash <QString, QWidget*> tab_hash;
-      tab_hash["editor"] = ui->tab_editor;
-      tab_hash["editor_styles"] = ui->tab_editor_styles;
-      ui->tabWidget->setCurrentIndex (
-        ui->tabWidget->indexOf (tab_hash.value (desired_tab)));
-    }
+  show_tab (desired_tab);
 
-
+  // connect button box signal
+  connect (ui->button_box, SIGNAL (clicked (QAbstractButton *)),
+           this,           SLOT (button_clicked (QAbstractButton *)));
 }
 
 settings_dialog::~settings_dialog ()
@@ -255,6 +413,24 @@
   delete ui;
 }
 
+void
+settings_dialog::show_tab (const QString& tab)
+{
+  if (tab.isEmpty ())
+    {
+      QSettings *settings = resource_manager::get_settings ();
+      ui->tabWidget->setCurrentIndex (settings->value ("settings/last_tab",
+                                      0).toInt ());
+    }
+  else
+    {
+      QHash <QString, QWidget*> tab_hash;
+      tab_hash["editor"] = ui->tab_editor;
+      tab_hash["editor_styles"] = ui->tab_editor_styles;
+      ui->tabWidget->setCurrentIndex (
+        ui->tabWidget->indexOf (tab_hash.value (tab)));
+    }
+}
 
 #ifdef HAVE_QSCINTILLA
 int
@@ -287,6 +463,7 @@
   QVector<color_picker*> bg_color (max_style);
   int default_size = 10;
   QFont default_font = QFont ();
+  int label_width;
   QColor default_color = QColor ();
   QColor dummy_color = QColor (255,0,255);
 
@@ -296,12 +473,13 @@
       QFont   actual_font = lexer->font (styles[i]);
       description[i] = new QLabel (actual_name);
       description[i]->setWordWrap (true);
-      description[i]->setMaximumSize (160,QWIDGETSIZE_MAX);
-      description[i]->setMinimumSize (160,1);
+      label_width = 24*description[i]->fontMetrics ().averageCharWidth ();
+      description[i]->setMaximumSize (label_width,QWIDGETSIZE_MAX);
+      description[i]->setMinimumSize (label_width,1);
       select_font[i] = new QFontComboBox ();
       select_font[i]->setObjectName (actual_name+"_font");
-      select_font[i]->setMaximumSize (180,QWIDGETSIZE_MAX);
-      select_font[i]->setMinimumSize (180,1);
+      select_font[i]->setMaximumSize (label_width,QWIDGETSIZE_MAX);
+      select_font[i]->setMinimumSize (label_width,1);
       font_size[i] = new QSpinBox ();
       font_size[i]->setObjectName (actual_name+"_size");
       if (styles[i] == 0) // the default
@@ -446,7 +624,7 @@
 }
 
 void
-settings_dialog::write_changed_settings ()
+settings_dialog::write_changed_settings (bool closing)
 {
   QSettings *settings = resource_manager::get_settings ();
   // FIXME: what should happen if settings is 0?
@@ -465,8 +643,40 @@
     language = "SYSTEM";
   settings->setValue ("language", language);
 
-  // other settings
-  settings->setValue ("toolbar_icon_size", ui->toolbar_icon_size->value ());
+  // dock widget title bar
+  settings->setValue ("DockWidgets/widget_title_custom_style",
+                      ui->cb_widget_custom_style->isChecked ());
+  settings->setValue ("DockWidgets/widget_title_3d",
+                      ui->sb_3d_title->value ( ));
+  settings->setValue ("Dockwidgets/title_bg_color",
+                      _widget_title_bg_color->color ());
+  settings->setValue ("Dockwidgets/title_bg_color_active",
+                      _widget_title_bg_color_active->color ());
+  settings->setValue ("Dockwidgets/title_fg_color",
+                      _widget_title_fg_color->color ());
+  settings->setValue ("Dockwidgets/title_fg_color_active",
+                      _widget_title_fg_color_active->color ());
+
+  // icon size
+  int icon_size = 0;
+  if (ui->icon_size_small->isChecked ())
+    icon_size = -1;
+  else if (ui->icon_size_large->isChecked ())
+    icon_size = 1;
+  settings->setValue ("toolbar_icon_size", icon_size);
+
+  // promp to exit
+  settings->setValue ("prompt_to_exit", ui->cb_prompt_to_exit->isChecked ());
+
+  // status bar
+  settings->setValue ( "show_status_bar", ui->cb_status_bar->isChecked ());
+
+  // Octave startup
+  settings->setValue ("restore_octave_dir",
+                      ui->cb_restore_octave_dir->isChecked ());
+  settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ());
+
+  //editor
   settings->setValue ("useCustomFileEditor",
                       ui->useCustomFileEditor->isChecked ());
   settings->setValue ("customFileEditor", ui->customFileEditor->text ());
@@ -476,12 +686,24 @@
                       ui->editor_highlightCurrentLine->isChecked ());
   settings->setValue ("editor/highlight_current_line_color",
                       _editor_current_line_color->color ());
+  settings->setValue ("editor/long_line_marker",
+                      ui->editor_long_line_marker->isChecked ());
+  settings->setValue ("editor/long_line_column",
+                      ui->editor_long_line_column->value ());
+  settings->setValue ("editor/code_folding",
+                      ui->cb_code_folding->isChecked ());
+  settings->setValue ("editor/show_edit_status_bar",
+                      ui->cb_edit_status_bar->isChecked ());
   settings->setValue ("editor/codeCompletion",
                       ui->editor_codeCompletion->isChecked ());
   settings->setValue ("editor/codeCompletion_threshold",
                       ui->editor_spinbox_ac_threshold->value ());
   settings->setValue ("editor/codeCompletion_keywords",
                       ui->editor_checkbox_ac_keywords->isChecked ());
+  settings->setValue ("editor/codeCompletion_octave_builtins",
+                      ui->editor_checkbox_ac_builtins->isChecked ());
+  settings->setValue ("editor/codeCompletion_octave_functions",
+                      ui->editor_checkbox_ac_functions->isChecked ());
   settings->setValue ("editor/codeCompletion_document",
                       ui->editor_checkbox_ac_document->isChecked ());
   settings->setValue ("editor/codeCompletion_case",
@@ -492,6 +714,12 @@
                       ui->editor_ws_checkbox->isChecked ());
   settings->setValue ("editor/show_white_space_indent",
                       ui->editor_ws_indent_checkbox->isChecked ());
+  settings->setValue ("editor/show_eol_chars",
+                      ui->cb_show_eol->isChecked ());
+  settings->setValue ("editor/show_hscroll_bar",
+                      ui->cb_show_hscrollbar->isChecked ());
+  settings->setValue ("editor/default_eol_mode",
+                      ui->combo_eol_mode->currentIndex ());
   settings->setValue ("editor/auto_indent",
                       ui->editor_auto_ind_checkbox->isChecked ());
   settings->setValue ("editor/tab_indents_line",
@@ -502,17 +730,26 @@
                       ui->editor_ind_guides_checkbox->isChecked ());
   settings->setValue ("editor/indent_width",
                       ui->editor_ind_width_spinbox->value ());
+  settings->setValue ("editor/indent_uses_tabs",
+                      ui->editor_ind_uses_tabs_checkbox->isChecked ());
   settings->setValue ("editor/tab_width",
                       ui->editor_tab_width_spinbox->value ());
   settings->setValue ("editor/longWindowTitle",
                       ui->editor_longWindowTitle->isChecked ());
+  settings->setValue ("editor/notebook_tab_width_min",
+                      ui->editor_notebook_tab_width_min->value ());
+  settings->setValue ("editor/notebook_tab_width_max",
+                      ui->editor_notebook_tab_width_max->value ());
   settings->setValue ("editor/restoreSession",
                       ui->editor_restoreSession->isChecked ());
   settings->setValue ("editor/create_new_file",
                       ui->editor_create_new_file->isChecked ());
+  settings->setValue ("editor/always_reload_changed_files",
+                      ui->editor_reload_changed_files->isChecked ());
   settings->setValue ("terminal/fontSize", ui->terminal_fontSize->value ());
   settings->setValue ("terminal/fontName",
                       ui->terminal_fontName->currentFont ().family ());
+
   settings->setValue ("filesdockwidget/showFileSize",
                       ui->showFileSize->isChecked ());
   settings->setValue ("filesdockwidget/showFileType",
@@ -525,6 +762,12 @@
                       ui->useAlternatingRowColors->isChecked ());
   settings->setValue ("filesdockwidget/sync_octave_directory",
                       ui->sync_octave_directory->isChecked ());
+  settings->setValue ("filesdockwidget/restore_last_dir",
+                      ui->cb_restore_file_browser_dir->isChecked ());
+  settings->setValue ("filesdockwidget/startup_dir",
+                      ui->le_file_browser_dir->text ());
+
+
   settings->setValue ("news/allow_web_connection",
                       ui->checkbox_allow_web_connect->isChecked ());
   settings->setValue ("useProxyServer", ui->useProxyServer->isChecked ());
@@ -537,6 +780,12 @@
                       ui->terminal_cursorBlinking->isChecked ());
   settings->setValue ("terminal/cursorUseForegroundColor",
                       ui->terminal_cursorUseForegroundColor->isChecked ());
+  settings->setValue ("terminal/focus_after_command",
+                      ui->terminal_focus_command->isChecked ());
+  settings->setValue ("terminal/print_debug_location",
+                      ui->terminal_print_dbg_location->isChecked ());
+  settings->setValue ("terminal/history_buffer",
+                      ui->terminal_history_buffer->value ());
 
   // the cursor
   QString cursorType;
@@ -547,7 +796,6 @@
     case 2: cursorType = "underline";  break;
     }
   settings->setValue ("terminal/cursorType", cursorType);
-  settings->sync ();
 
 #ifdef HAVE_QSCINTILLA
   // editor styles: create lexer, get dialog contents, and write settings
@@ -576,13 +824,34 @@
   lexer = new QsciLexerBash ();
   write_lexer_settings (lexer,settings);
   delete lexer;
+  lexer = new octave_txt_lexer ();
+  write_lexer_settings (lexer,settings);
+  delete lexer;
 #endif
 
+  // Workspace
   write_workspace_colors (settings);
+  // hide tool tips
+  settings->setValue ("workspaceview/hide_tool_tips",
+                      ui->cb_hide_tool_tips->isChecked ());
 
+  // Terminal
   write_terminal_colors (settings);
 
+  // shortcuts
+  settings->setValue ("shortcuts/prevent_readline_conflicts",
+                      ui->cb_prevent_readline_conflicts->isChecked ());
+  int set = 0;
+  if (ui->rb_sc_set2->isChecked ())
+    set = 1;
+  settings->setValue ("shortcuts/set",set);
+  shortcut_manager::write_shortcuts (0, settings, closing); // 0: write both sets
+
+  // settings dialog's geometry
   settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ());
+  settings->setValue ("settings/geometry",saveGeometry ());
+
+  settings->sync ();
 }
 
 #ifdef HAVE_QSCINTILLA
@@ -666,6 +935,7 @@
 
   settings->setValue (
     "settings/last_editor_styles_tab",ui->tabs_editor_lexers->currentIndex ());
+  settings->sync ();
 }
 #endif
 
@@ -703,3 +973,88 @@
     }
   settings->sync ();
 }
+
+
+// internal slots
+
+void
+settings_dialog::button_clicked (QAbstractButton *button)
+{
+  QDialogButtonBox::ButtonRole button_role = ui->button_box->buttonRole (button);
+
+  if (button_role == QDialogButtonBox::ApplyRole ||
+      button_role == QDialogButtonBox::AcceptRole)
+    {
+      write_changed_settings (button_role == QDialogButtonBox::AcceptRole);
+      emit apply_new_settings ();
+    }
+
+  if (button_role == QDialogButtonBox::RejectRole ||
+      button_role == QDialogButtonBox::AcceptRole)
+    close ();
+}
+
+void
+settings_dialog::get_dir (QLineEdit *line_edit, const QString& title)
+{
+  QString dir = QFileDialog::getExistingDirectory(this,
+                title, line_edit->text (),
+                QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
+  line_edit->setText (dir);
+}
+
+void
+settings_dialog::get_octave_dir ()
+{
+  get_dir (ui->le_octave_dir, tr ("Set Octave Startup Directory"));
+}
+
+void
+settings_dialog::get_file_browser_dir ()
+{
+  get_dir (ui->le_file_browser_dir, tr ("Set File Browser Startup Directory"));
+}
+
+void
+settings_dialog::set_disabled_pref_file_browser_dir (bool disable)
+{
+  ui->cb_restore_file_browser_dir->setDisabled (disable);
+
+  if (! disable)
+    {
+      ui->le_file_browser_dir->setDisabled (
+        ui->cb_restore_file_browser_dir->isChecked ());
+      ui->pb_file_browser_dir->setDisabled (
+        ui->cb_restore_file_browser_dir->isChecked ());
+    }
+  else
+    {
+      ui->le_file_browser_dir->setDisabled (disable);
+      ui->pb_file_browser_dir->setDisabled (disable);
+    }
+}
+
+// slots for import/export of shortcut sets
+void
+settings_dialog::import_shortcut_set1 ()
+{
+  shortcut_manager::import_export (true,1);
+}
+
+void
+settings_dialog::export_shortcut_set1 ()
+{
+  shortcut_manager::import_export (false,1);
+}
+
+void
+settings_dialog::import_shortcut_set2 ()
+{
+  shortcut_manager::import_export (true,2);
+}
+
+void
+settings_dialog::export_shortcut_set2 ()
+{
+  shortcut_manager::import_export (false,2);
+}
--- a/libgui/src/settings-dialog.h
+++ b/libgui/src/settings-dialog.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -25,6 +25,7 @@
 
 #include <QDialog>
 #include <QSettings>
+#include <QLineEdit>
 
 #include "color-picker.h"
 
@@ -43,7 +44,25 @@
   explicit settings_dialog (QWidget * parent,
                             const QString& desired_tab = QString ());
   ~settings_dialog ();
-  void write_changed_settings ();
+  void show_tab (const QString&);
+
+signals:
+  void apply_new_settings ();
+
+private slots:
+  void get_octave_dir ();
+  void get_file_browser_dir ();
+  void get_dir (QLineEdit*, const QString&);
+  void set_disabled_pref_file_browser_dir (bool disable);
+
+  // slots for dialog's buttons
+  void button_clicked (QAbstractButton *button);
+
+  // slots for import/export-buttons of shortcut sets
+  void import_shortcut_set1 ();
+  void export_shortcut_set1 ();
+  void import_shortcut_set2 ();
+  void export_shortcut_set2 ();
 
 private:
   Ui::settings_dialog * ui;
@@ -55,12 +74,18 @@
          MaxStyleNumber = 128 };
 #endif
 
+  void write_changed_settings (bool closing);
+
   void read_workspace_colors (QSettings *settings);
   void write_workspace_colors (QSettings *settings);
 
   void read_terminal_colors (QSettings *settings);
   void write_terminal_colors (QSettings *settings);
 
+  color_picker *_widget_title_bg_color;
+  color_picker *_widget_title_bg_color_active;
+  color_picker *_widget_title_fg_color;
+  color_picker *_widget_title_fg_color_active;
   color_picker *_editor_current_line_color;
 };
 
--- a/libgui/src/settings-dialog.ui
+++ b/libgui/src/settings-dialog.ui
@@ -9,20 +9,14 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>700</width>
+    <width>720</width>
     <height>480</height>
    </rect>
   </property>
   <property name="minimumSize">
    <size>
-    <width>700</width>
-    <height>480</height>
-   </size>
-  </property>
-  <property name="maximumSize">
-   <size>
-    <width>700</width>
-    <height>480</height>
+    <width>400</width>
+    <height>400</height>
    </size>
   </property>
   <property name="windowTitle">
@@ -31,8 +25,14 @@
   <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
     <widget class="QTabWidget" name="tabWidget">
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
      <property name="currentIndex">
-      <number>6</number>
+      <number>1</number>
      </property>
      <widget class="QWidget" name="tab_general">
       <property name="enabled">
@@ -41,154 +41,448 @@
       <attribute name="title">
        <string>General</string>
       </attribute>
-      <widget class="QWidget" name="verticalLayoutWidget">
-       <property name="geometry">
-        <rect>
-         <x>9</x>
-         <y>10</y>
-         <width>651</width>
-         <height>371</height>
-        </rect>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_7">
-        <item>
-         <layout class="QGridLayout" name="gridLayout">
-          <item row="3" column="0">
-           <widget class="QLabel" name="label_9">
-            <property name="text">
-             <string>Icon set for dock widgets</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0">
-           <widget class="QLabel" name="label_2">
-            <property name="text">
-             <string>Language (requires restart)</string>
-            </property>
-           </widget>
-          </item>
-          <item row="2" column="0">
-           <widget class="QLabel" name="label_8">
-            <property name="text">
-             <string>Icon size</string>
-            </property>
-           </widget>
-          </item>
-          <item row="2" column="2">
-           <layout class="QHBoxLayout" name="horizontalLayout_6">
-            <item>
-             <widget class="QSpinBox" name="toolbar_icon_size">
-              <property name="minimum">
-               <number>16</number>
-              </property>
-              <property name="maximum">
-               <number>32</number>
-              </property>
-              <property name="singleStep">
-               <number>4</number>
-              </property>
-              <property name="value">
-               <number>24</number>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="horizontalSpacer_4">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-           </layout>
-          </item>
-          <item row="1" column="2">
-           <layout class="QHBoxLayout" name="horizontalLayout_8">
-            <item>
-             <widget class="QComboBox" name="comboBox_language">
-              <property name="insertPolicy">
-               <enum>QComboBox::InsertAtBottom</enum>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="horizontalSpacer_3">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-           </layout>
-          </item>
-          <item row="3" column="2">
-           <layout class="QHBoxLayout" name="horizontalLayout_9">
-            <item>
-             <widget class="QRadioButton" name="general_icon_octave">
-              <property name="text">
-               <string>Octave logo only</string>
-              </property>
-              <property name="checked">
-               <bool>true</bool>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QRadioButton" name="general_icon_letter">
-              <property name="text">
-               <string>Letter icons</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QRadioButton" name="general_icon_graphic">
-              <property name="text">
-               <string>Graphic icons</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="horizontalSpacer_6">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <spacer name="verticalSpacer_4">
-          <property name="orientation">
-           <enum>Qt::Vertical</enum>
+      <layout class="QVBoxLayout" name="verticalLayout_10">
+       <item>
+        <widget class="QScrollArea" name="scrollArea_2">
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_2">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>-4</y>
+            <width>662</width>
+            <height>382</height>
+           </rect>
           </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>40</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
-      </widget>
+          <layout class="QVBoxLayout" name="verticalLayout_17">
+           <item>
+            <widget class="QGroupBox" name="groupBox">
+             <property name="title">
+              <string>Interface</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_21">
+              <item>
+               <layout class="QGridLayout" name="gridLayout">
+                <item row="4" column="0">
+                 <widget class="QLabel" name="label_15">
+                  <property name="text">
+                   <string>Dock widget title bar</string>
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <layout class="QHBoxLayout" name="horizontalLayout_8">
+                  <item>
+                   <widget class="QComboBox" name="comboBox_language">
+                    <property name="insertPolicy">
+                     <enum>QComboBox::InsertAtBottom</enum>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_3">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QLabel" name="label_8">
+                  <property name="text">
+                   <string>Icon size</string>
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="6" column="0">
+                 <widget class="QCheckBox" name="cb_prompt_to_exit">
+                  <property name="text">
+                   <string>Confirm before exiting</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="1">
+                 <layout class="QHBoxLayout" name="horizontalLayout_6">
+                  <item>
+                   <widget class="QRadioButton" name="icon_size_small">
+                    <property name="text">
+                     <string>Small</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QRadioButton" name="icon_size_normal">
+                    <property name="text">
+                     <string>Normal</string>
+                    </property>
+                    <property name="checked">
+                     <bool>true</bool>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QRadioButton" name="icon_size_large">
+                    <property name="text">
+                     <string>Large</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_4">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QLabel" name="label_2">
+                  <property name="text">
+                   <string>Language (requires restart)</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="3" column="1">
+                 <layout class="QHBoxLayout" name="horizontalLayout_9">
+                  <item>
+                   <widget class="QRadioButton" name="general_icon_octave">
+                    <property name="text">
+                     <string>Octave logo only</string>
+                    </property>
+                    <property name="checked">
+                     <bool>true</bool>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QRadioButton" name="general_icon_letter">
+                    <property name="text">
+                     <string>Letter icons</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QRadioButton" name="general_icon_graphic">
+                    <property name="text">
+                     <string>Graphic icons</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_6">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="3" column="0">
+                 <widget class="QLabel" name="label_9">
+                  <property name="text">
+                   <string>Icon set for dock widgets</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="5" column="0">
+                 <widget class="QCheckBox" name="cb_status_bar">
+                  <property name="text">
+                   <string>Show status bar</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="4" column="1">
+                 <layout class="QHBoxLayout" name="horizontalLayout_4">
+                  <item>
+                   <layout class="QGridLayout" name="gridLayout_13">
+                    <property name="rightMargin">
+                     <number>0</number>
+                    </property>
+                    <item row="0" column="9">
+                     <widget class="QLabel" name="label_bgtitle_active">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="text">
+                       <string>Active</string>
+                      </property>
+                      <property name="alignment">
+                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="1" column="4">
+                     <layout class="QHBoxLayout" name="layout_widget_fgtitle"/>
+                    </item>
+                    <item row="0" column="1">
+                     <spacer name="horizontalSpacer_22">
+                      <property name="orientation">
+                       <enum>Qt::Horizontal</enum>
+                      </property>
+                      <property name="sizeType">
+                       <enum>QSizePolicy::Fixed</enum>
+                      </property>
+                      <property name="sizeHint" stdset="0">
+                       <size>
+                        <width>40</width>
+                        <height>20</height>
+                       </size>
+                      </property>
+                     </spacer>
+                    </item>
+                    <item row="1" column="2">
+                     <widget class="QLabel" name="label_fgtitle">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="text">
+                       <string>Text inactive</string>
+                      </property>
+                      <property name="alignment">
+                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="1" column="9">
+                     <widget class="QLabel" name="label_fgtitle_active">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="text">
+                       <string>Active</string>
+                      </property>
+                      <property name="alignment">
+                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="7">
+                     <spacer name="horizontalSpacer_23">
+                      <property name="orientation">
+                       <enum>Qt::Horizontal</enum>
+                      </property>
+                      <property name="sizeType">
+                       <enum>QSizePolicy::Fixed</enum>
+                      </property>
+                      <property name="sizeHint" stdset="0">
+                       <size>
+                        <width>12</width>
+                        <height>20</height>
+                       </size>
+                      </property>
+                     </spacer>
+                    </item>
+                    <item row="0" column="0">
+                     <widget class="QCheckBox" name="cb_widget_custom_style">
+                      <property name="text">
+                       <string>Custom style</string>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="4">
+                     <layout class="QHBoxLayout" name="layout_widget_bgtitle"/>
+                    </item>
+                    <item row="0" column="2">
+                     <widget class="QLabel" name="label_bgtitle">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="text">
+                       <string>Background inactive</string>
+                      </property>
+                      <property name="alignment">
+                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="0" column="10">
+                     <layout class="QHBoxLayout" name="layout_widget_bgtitle_active"/>
+                    </item>
+                    <item row="1" column="10">
+                     <layout class="QHBoxLayout" name="layout_widget_fgtitle_active"/>
+                    </item>
+                    <item row="1" column="0">
+                     <widget class="QLabel" name="label_3d_title">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="text">
+                       <string>3D</string>
+                      </property>
+                      <property name="alignment">
+                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                      </property>
+                     </widget>
+                    </item>
+                    <item row="1" column="1">
+                     <widget class="QSpinBox" name="sb_3d_title">
+                      <property name="enabled">
+                       <bool>false</bool>
+                      </property>
+                      <property name="sizePolicy">
+                       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                        <horstretch>0</horstretch>
+                        <verstretch>0</verstretch>
+                       </sizepolicy>
+                      </property>
+                      <property name="minimum">
+                       <number>-80</number>
+                      </property>
+                      <property name="maximum">
+                       <number>80</number>
+                      </property>
+                      <property name="value">
+                       <number>50</number>
+                      </property>
+                     </widget>
+                    </item>
+                   </layout>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_21">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox_2">
+             <property name="title">
+              <string>Octave Startup</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_22">
+              <item>
+               <widget class="QLabel" name="label_18">
+                <property name="text">
+                 <string>These preferences are applied after any .octaverc startup files.</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <layout class="QGridLayout" name="gridLayout_9">
+                <item row="0" column="5">
+                 <spacer name="horizontalSpacer">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="1" column="5">
+                 <spacer name="horizontalSpacer_5">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label_17">
+                  <property name="text">
+                   <string>Startup path</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="3">
+                 <widget class="QPushButton" name="pb_octave_dir">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Browse</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QCheckBox" name="cb_restore_octave_dir">
+                  <property name="text">
+                   <string>Restore working directory of previous session</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QLineEdit" name="le_octave_dir"/>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="verticalSpacer">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+      </layout>
      </widget>
      <widget class="QWidget" name="tab_editor">
       <attribute name="title">
@@ -196,961 +490,1758 @@
       </attribute>
       <layout class="QVBoxLayout" name="verticalLayout_6">
        <item>
-        <layout class="QVBoxLayout" name="verticalLayout_9">
-         <property name="spacing">
-          <number>4</number>
+        <widget class="QScrollArea" name="scrollArea">
+         <property name="widgetResizable">
+          <bool>true</bool>
          </property>
-         <item>
-          <layout class="QGridLayout" name="editor_common_settings_grid">
-           <property name="spacing">
-            <number>6</number>
-           </property>
-           <item row="2" column="0">
-            <widget class="QCheckBox" name="editor_ws_checkbox">
-             <property name="text">
-              <string>Show whitespace</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QCheckBox" name="editor_showLineNumbers">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>Show line numbers</string>
+         <widget class="QWidget" name="scrollAreaWidgetContents">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>662</width>
+            <height>751</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_16">
+           <item>
+            <widget class="QGroupBox" name="groupBox_5">
+             <property name="title">
+              <string>General</string>
              </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QCheckBox" name="editor_longWindowTitle">
-             <property name="text">
-              <string>Show complete path in window title</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QCheckBox" name="editor_ws_indent_checkbox">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Do not show whitespace used for indentation</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="0">
-            <widget class="QCheckBox" name="editor_highlightCurrentLine">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>Highlight current line</string>
-             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_13">
+              <item>
+               <layout class="QGridLayout" name="editor_common_settings_grid">
+                <item row="5" column="0">
+                 <widget class="QCheckBox" name="editor_highlightCurrentLine">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Highlight current line</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="6" column="2">
+                 <layout class="QHBoxLayout" name="horizontalLayout_3">
+                  <item>
+                   <widget class="QLabel" name="editor_long_line_column_text">
+                    <property name="text">
+                     <string>After Column</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QSpinBox" name="editor_long_line_column">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                    <property name="minimum">
+                     <number>2</number>
+                    </property>
+                    <property name="maximum">
+                     <number>256</number>
+                    </property>
+                    <property name="value">
+                     <number>80</number>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_7">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="3" column="0">
+                 <widget class="QCheckBox" name="editor_ws_checkbox">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show whitespace</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QCheckBox" name="editor_showLineNumbers">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show line numbers</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QCheckBox" name="editor_longWindowTitle">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show complete path in window title</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="3" column="2">
+                 <widget class="QCheckBox" name="editor_ws_indent_checkbox">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="text">
+                   <string>Do not show whitespace used for indentation</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="5" column="2">
+                 <layout class="QGridLayout" name="editor_grid_current_line" rowstretch="0" columnstretch="0,0,0,0,0">
+                  <property name="horizontalSpacing">
+                   <number>12</number>
+                  </property>
+                  <property name="verticalSpacing">
+                   <number>0</number>
+                  </property>
+                  <item row="0" column="1">
+                   <widget class="QLabel" name="editor_label_cl_color">
+                    <property name="enabled">
+                     <bool>false</bool>
+                    </property>
+                    <property name="text">
+                     <string>Color</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="3">
+                   <spacer name="horizontalSpacer_11">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                     <enum>QSizePolicy::Fixed</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>80</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                  <item row="0" column="4">
+                   <spacer name="horizontalSpacer_9">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="1" column="2">
+                 <layout class="QGridLayout" name="gridLayout_6">
+                  <item row="0" column="0">
+                   <widget class="QLabel" name="editor_lbl_min_tab_width">
+                    <property name="text">
+                     <string>Tab width min.</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="3">
+                   <widget class="QSpinBox" name="editor_notebook_tab_width_min">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                    <property name="minimum">
+                     <number>80</number>
+                    </property>
+                    <property name="maximum">
+                     <number>600</number>
+                    </property>
+                    <property name="singleStep">
+                     <number>20</number>
+                    </property>
+                    <property name="value">
+                     <number>160</number>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="6">
+                   <spacer name="horizontalSpacer_25">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                  <item row="0" column="5">
+                   <widget class="QSpinBox" name="editor_notebook_tab_width_max">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                    <property name="minimum">
+                     <number>180</number>
+                    </property>
+                    <property name="maximum">
+                     <number>600</number>
+                    </property>
+                    <property name="singleStep">
+                     <number>20</number>
+                    </property>
+                    <property name="value">
+                     <number>300</number>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="4">
+                   <widget class="QLabel" name="editor_lbl_max_tab_width">
+                    <property name="text">
+                     <string>max.</string>
+                    </property>
+                   </widget>
+                  </item>
+                 </layout>
+                </item>
+                <item row="1" column="1">
+                 <spacer name="horizontalSpacer_24">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Fixed</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>10</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="6" column="0">
+                 <widget class="QCheckBox" name="editor_long_line_marker">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="toolTip">
+                   <string>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</string>
+                  </property>
+                  <property name="text">
+                   <string>Draw a long line marker</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="7" column="0">
+                 <widget class="QCheckBox" name="cb_code_folding">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Enable Code Folding</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="8" column="0">
+                 <widget class="QCheckBox" name="cb_edit_status_bar">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show status bar</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="4" column="0">
+                 <widget class="QCheckBox" name="cb_show_eol">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show EOL characters</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="4" column="2">
+                 <layout class="QHBoxLayout" name="horizontalLayout_17">
+                  <item>
+                   <widget class="QLabel" name="label_22">
+                    <property name="text">
+                     <string>Default EOL mode</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QComboBox" name="combo_eol_mode">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                    <property name="sizeAdjustPolicy">
+                     <enum>QComboBox::AdjustToContents</enum>
+                    </property>
+                    <property name="minimumContentsLength">
+                     <number>7</number>
+                    </property>
+                    <item>
+                     <property name="text">
+                      <string>Windows (CRLF)</string>
+                     </property>
+                    </item>
+                    <item>
+                     <property name="text">
+                      <string>Mac (CR)</string>
+                     </property>
+                    </item>
+                    <item>
+                     <property name="text">
+                      <string>Unix (LF)</string>
+                     </property>
+                    </item>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_17">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+                <item row="9" column="0">
+                 <widget class="QCheckBox" name="cb_show_hscrollbar">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Show horizontal scroll bar</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <layout class="QHBoxLayout" name="horizontalLayout">
+                <item>
+                 <widget class="QCheckBox" name="useCustomFileEditor">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Use custom file editor</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QLabel" name="customEditorLabel">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="text">
+                   <string>command line (%f=file, %l=line):</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QLineEdit" name="customFileEditor">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="text">
+                   <string/>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <spacer name="horizontalSpacer_12">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </item>
+             </layout>
             </widget>
            </item>
-           <item row="3" column="1">
-            <layout class="QGridLayout" name="editor_grid_current_line" rowstretch="0" columnstretch="0,0,0,0,0">
-             <property name="horizontalSpacing">
-              <number>12</number>
+           <item>
+            <widget class="QGroupBox" name="groupBox_6">
+             <property name="title">
+              <string>Indentation</string>
              </property>
-             <property name="verticalSpacing">
-              <number>0</number>
+             <layout class="QVBoxLayout" name="verticalLayout_28">
+              <item>
+               <layout class="QGridLayout" name="gridLayout_4">
+                <item row="0" column="5">
+                 <spacer name="horizontalSpacer_14">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Fixed</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>10</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label_13">
+                  <property name="text">
+                   <string>Indent width</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="4">
+                 <widget class="QCheckBox" name="editor_tab_ind_checkbox">
+                  <property name="text">
+                   <string>Tab indents line</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="4">
+                 <widget class="QCheckBox" name="editor_auto_ind_checkbox">
+                  <property name="text">
+                   <string>Auto indentation</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="2">
+                 <widget class="QSpinBox" name="editor_ind_width_spinbox">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="minimum">
+                   <number>1</number>
+                  </property>
+                  <property name="maximum">
+                   <number>32</number>
+                  </property>
+                  <property name="value">
+                   <number>2</number>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QLabel" name="label_14">
+                  <property name="text">
+                   <string>Tab width</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="6">
+                 <widget class="QCheckBox" name="editor_ind_guides_checkbox">
+                  <property name="text">
+                   <string>Show indentation guides</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="2">
+                 <widget class="QSpinBox" name="editor_tab_width_spinbox">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="minimum">
+                   <number>1</number>
+                  </property>
+                  <property name="maximum">
+                   <number>32</number>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="6">
+                 <widget class="QCheckBox" name="editor_bs_unind_checkbox">
+                  <property name="text">
+                   <string>Backspace unindents line</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="3">
+                 <spacer name="horizontalSpacer_10">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Fixed</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>10</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="3" column="4">
+                 <widget class="QCheckBox" name="editor_ind_uses_tabs_checkbox">
+                  <property name="text">
+                   <string>Indentation uses tabs</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="10">
+                 <spacer name="horizontalSpacer_20">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="10">
+                 <spacer name="horizontalSpacer_13">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox_7">
+             <property name="title">
+              <string>Auto completion</string>
              </property>
-             <item row="0" column="1">
-              <widget class="QLabel" name="editor_label_cl_color">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string>Color</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="3">
-              <spacer name="horizontalSpacer_11">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeType">
-                <enum>QSizePolicy::Fixed</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>80</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item row="0" column="4">
-              <spacer name="horizontalSpacer_9">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-            </layout>
+             <layout class="QVBoxLayout" name="verticalLayout_29">
+              <item>
+               <layout class="QGridLayout" name="gridLayout_3">
+                <item row="0" column="1">
+                 <spacer name="horizontalSpacer_15">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Fixed</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>10</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QCheckBox" name="editor_checkbox_ac_keywords">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="text">
+                   <string>Match keywords</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QCheckBox" name="editor_checkbox_ac_case">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="text">
+                   <string>Case sensitive</string>
+                  </property>
+                  <property name="checked">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QCheckBox" name="editor_checkbox_ac_document">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="text">
+                   <string>Match words in document</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="2">
+                 <widget class="QCheckBox" name="editor_checkbox_ac_replace">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="text">
+                   <string>Replace word by suggested one</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="3">
+                 <spacer name="horizontalSpacer_8">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="2" column="3">
+                 <spacer name="horizontalSpacer_19">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="2">
+                 <layout class="QHBoxLayout" name="horizontalLayout_14">
+                  <item>
+                   <widget class="QCheckBox" name="editor_checkbox_ac_builtins">
+                    <property name="enabled">
+                     <bool>false</bool>
+                    </property>
+                    <property name="text">
+                     <string>With Octave builtins</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QCheckBox" name="editor_checkbox_ac_functions">
+                    <property name="enabled">
+                     <bool>false</bool>
+                    </property>
+                    <property name="text">
+                     <string>With Octave functions</string>
+                    </property>
+                   </widget>
+                  </item>
+                 </layout>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <layout class="QGridLayout" name="gridLayout_10">
+                <item row="0" column="2">
+                 <widget class="QLabel" name="editor_label_ac_threshold">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="text">
+                   <string>Number of characters before list is shown: </string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="3">
+                 <widget class="QSpinBox" name="editor_spinbox_ac_threshold">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="toolTip">
+                   <string/>
+                  </property>
+                  <property name="whatsThis">
+                   <string/>
+                  </property>
+                  <property name="suffix">
+                   <string/>
+                  </property>
+                  <property name="minimum">
+                   <number>1</number>
+                  </property>
+                  <property name="maximum">
+                   <number>6</number>
+                  </property>
+                  <property name="value">
+                   <number>2</number>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="4">
+                 <spacer name="horizontalSpacer_2">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QCheckBox" name="editor_codeCompletion">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="text">
+                   <string>Show completion list automatically</string>
+                  </property>
+                  <property name="checked">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <spacer name="horizontalSpacer_31">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Fixed</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>10</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
            </item>
-           <item row="0" column="2">
-            <spacer name="horizontalSpacer_12">
+           <item>
+            <widget class="QGroupBox" name="groupBox_8">
+             <property name="title">
+              <string>File handling</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_30">
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_11">
+                <property name="topMargin">
+                 <number>0</number>
+                </property>
+                <property name="bottomMargin">
+                 <number>0</number>
+                </property>
+                <item>
+                 <widget class="QCheckBox" name="editor_restoreSession">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Restore editor tabs from previous session on startup</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="editor_create_new file">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string>Create nonexistent files without prompting</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="editor_reload_changed_files">
+                  <property name="text">
+                   <string>Reload externally changed files without prompt</string>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="verticalSpacer_7">
              <property name="orientation">
-              <enum>Qt::Horizontal</enum>
+              <enum>Qt::Vertical</enum>
              </property>
              <property name="sizeHint" stdset="0">
               <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="1" column="2">
-            <spacer name="horizontalSpacer_16">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="2" column="2">
-            <spacer name="horizontalSpacer_17">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="3" column="2">
-            <spacer name="horizontalSpacer_18">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
+               <width>20</width>
+               <height>40</height>
               </size>
              </property>
             </spacer>
            </item>
           </layout>
-         </item>
+         </widget>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_editor_styles">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <attribute name="title">
+       <string>Editor Styles</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_12">
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_5">
          <item>
-          <widget class="Line" name="line">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+          <widget class="QLabel" name="label_10">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="frameShape">
+            <enum>QFrame::NoFrame</enum>
+           </property>
+           <property name="text">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="scaledContents">
+            <bool>false</bool>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+           <property name="margin">
+            <number>4</number>
            </property>
           </widget>
          </item>
          <item>
-          <layout class="QGridLayout" name="gridLayout_4">
-           <property name="verticalSpacing">
-            <number>0</number>
-           </property>
-           <item row="0" column="3">
-            <spacer name="horizontalSpacer_10">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeType">
-              <enum>QSizePolicy::Fixed</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>10</width>
-               <height>0</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="0" column="0">
-            <widget class="QLabel" name="label_13">
-             <property name="text">
-              <string>Indent width</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="4">
-            <widget class="QCheckBox" name="editor_tab_ind_checkbox">
-             <property name="text">
-              <string>Tab indents line</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="4">
-            <widget class="QCheckBox" name="editor_auto_ind_checkbox">
-             <property name="text">
-              <string>Auto indentation</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QSpinBox" name="editor_ind_width_spinbox">
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>32</number>
-             </property>
-             <property name="value">
-              <number>2</number>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="0">
-            <widget class="QLabel" name="label_14">
-             <property name="text">
-              <string>Tab width</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="6">
-            <widget class="QCheckBox" name="editor_ind_guides_checkbox">
-             <property name="text">
-              <string>Show indentation guides</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="2">
-            <widget class="QSpinBox" name="editor_tab_width_spinbox">
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>32</number>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="6">
-            <widget class="QCheckBox" name="editor_bs_unind_checkbox">
-             <property name="text">
-              <string>Backspace unindents line</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="10">
-            <spacer name="horizontalSpacer_13">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="0" column="5">
-            <spacer name="horizontalSpacer_14">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeType">
-              <enum>QSizePolicy::Fixed</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>10</width>
-               <height>0</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="2" column="10">
-            <spacer name="horizontalSpacer_20">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <widget class="Line" name="line_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+          <widget class="QTabWidget" name="tabs_editor_lexers">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
           </widget>
          </item>
-         <item>
-          <layout class="QGridLayout" name="gridLayout_2">
-           <property name="verticalSpacing">
-            <number>0</number>
-           </property>
-           <item row="0" column="0">
-            <widget class="QCheckBox" name="editor_codeCompletion">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>Code completion</string>
-             </property>
-             <property name="checked">
-              <bool>false</bool>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <layout class="QHBoxLayout" name="horizontalLayout_2">
-             <property name="spacing">
-              <number>6</number>
-             </property>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_terminal">
+      <attribute name="title">
+       <string>Terminal</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_14">
+       <item>
+        <widget class="QScrollArea" name="scrollArea_3">
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_4">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>678</width>
+            <height>378</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_7">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_8">
              <item>
-              <widget class="QLabel" name="editor_label_ac_threshold">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string># of characters typed before completion list displayed</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QSpinBox" name="editor_spinbox_ac_threshold">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="toolTip">
-                <string/>
-               </property>
-               <property name="whatsThis">
-                <string/>
-               </property>
-               <property name="suffix">
-                <string/>
-               </property>
-               <property name="minimum">
-                <number>1</number>
-               </property>
-               <property name="maximum">
-                <number>6</number>
-               </property>
-               <property name="value">
-                <number>2</number>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_2">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
+              <layout class="QGridLayout" name="gridLayout_7">
                <property name="sizeHint" stdset="0">
                 <size>
                  <width>40</width>
                  <height>20</height>
                 </size>
                </property>
-              </spacer>
+               <item row="1" column="2">
+                <layout class="QHBoxLayout" name="horizontalLayout_13">
+                 <item>
+                  <widget class="QCheckBox" name="terminal_cursorUseForegroundColor">
+                   <property name="text">
+                    <string>Use foreground color</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QCheckBox" name="terminal_cursorBlinking">
+                   <property name="text">
+                    <string>Cursor blinking</string>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </item>
+               <item row="1" column="0">
+                <layout class="QHBoxLayout" name="horizontalLayout_7">
+                 <item>
+                  <widget class="QLabel" name="label">
+                   <property name="text">
+                    <string>Cursor type:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QComboBox" name="terminal_cursorType"/>
+                 </item>
+                </layout>
+               </item>
+               <item row="0" column="0">
+                <layout class="QHBoxLayout" name="horizontalLayout_11">
+                 <item>
+                  <widget class="QLabel" name="label_11">
+                   <property name="text">
+                    <string>Font</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QFontComboBox" name="terminal_fontName">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="editable">
+                    <bool>false</bool>
+                   </property>
+                   <property name="fontFilters">
+                    <set>QFontComboBox::MonospacedFonts</set>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </item>
+               <item row="0" column="2">
+                <layout class="QHBoxLayout" name="horizontalLayout_12">
+                 <item>
+                  <widget class="QLabel" name="label_12">
+                   <property name="text">
+                    <string>Font size</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QSpinBox" name="terminal_fontSize">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimum">
+                    <number>2</number>
+                   </property>
+                   <property name="maximum">
+                    <number>96</number>
+                   </property>
+                   <property name="value">
+                    <number>10</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <spacer name="horizontalSpacer_27">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>40</width>
+                     <height>20</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                </layout>
+               </item>
+               <item row="2" column="2">
+                <layout class="QHBoxLayout" name="horizontalLayout_5">
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                 <item>
+                  <widget class="QSpinBox" name="terminal_history_buffer">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimum">
+                    <number>0</number>
+                   </property>
+                   <property name="maximum">
+                    <number>5000</number>
+                   </property>
+                   <property name="singleStep">
+                    <number>20</number>
+                   </property>
+                   <property name="value">
+                    <number>1000</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QLabel" name="label_20">
+                   <property name="text">
+                    <string>(Changing buffer size clears history)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <spacer name="horizontalSpacer_16">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>40</width>
+                     <height>20</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                </layout>
+               </item>
+               <item row="2" column="0">
+                <widget class="QLabel" name="label_19">
+                 <property name="minimumSize">
+                  <size>
+                   <width>100</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                 <property name="text">
+                  <string>History buffer Size</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <spacer name="horizontalSpacer_28">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeType">
+                  <enum>QSizePolicy::Fixed</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>20</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
              </item>
-            </layout>
-           </item>
-           <item row="1" column="2">
-            <layout class="QGridLayout" name="gridLayout_3">
-             <property name="verticalSpacing">
-              <number>0</number>
-             </property>
-             <item row="0" column="1">
-              <spacer name="horizontalSpacer_15">
+             <item>
+              <layout class="QGridLayout" name="gridLayout_15">
+               <item row="0" column="0">
+                <widget class="QCheckBox" name="terminal_focus_command">
+                 <property name="text">
+                  <string>Set focus to terminal when running a command from within another widget</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QCheckBox" name="terminal_print_dbg_location">
+                 <property name="text">
+                  <string>Print debug location in terminal window in addition to the marker in the editor</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="Line" name="line_7">
                <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
-               <property name="sizeType">
-                <enum>QSizePolicy::Fixed</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>10</width>
-                 <height>0</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item row="0" column="0">
-              <widget class="QCheckBox" name="editor_checkbox_ac_keywords">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string>Match keywords</string>
-               </property>
-               <property name="checked">
-                <bool>true</bool>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0">
-              <widget class="QCheckBox" name="editor_checkbox_ac_case">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string>Case sensitive</string>
-               </property>
-               <property name="checked">
-                <bool>true</bool>
-               </property>
               </widget>
              </item>
-             <item row="1" column="2">
-              <widget class="QCheckBox" name="editor_checkbox_ac_replace">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string>Replace word by suggested one</string>
+             <item>
+              <widget class="QGroupBox" name="terminal_colors_box">
+               <property name="title">
+                <string>Terminal Colors</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="3">
-              <spacer name="horizontalSpacer_8">
+             <item>
+              <widget class="Line" name="line_5">
+               <property name="minimumSize">
+                <size>
+                 <width>0</width>
+                 <height>0</height>
+                </size>
+               </property>
                <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item row="0" column="2">
-              <widget class="QCheckBox" name="editor_checkbox_ac_document">
-               <property name="enabled">
-                <bool>false</bool>
-               </property>
-               <property name="text">
-                <string>Match words in document</string>
-               </property>
               </widget>
              </item>
-             <item row="1" column="3">
-              <spacer name="horizontalSpacer_19">
+             <item>
+              <widget class="Line" name="line_6">
                <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
+              </widget>
              </item>
             </layout>
            </item>
-           <item row="0" column="1">
-            <spacer name="horizontalSpacer_7">
+           <item>
+            <spacer name="verticalSpacer_3">
              <property name="orientation">
-              <enum>Qt::Horizontal</enum>
+              <enum>Qt::Vertical</enum>
              </property>
              <property name="sizeType">
-              <enum>QSizePolicy::Fixed</enum>
+              <enum>QSizePolicy::Expanding</enum>
              </property>
              <property name="sizeHint" stdset="0">
               <size>
-               <width>10</width>
-               <height>0</height>
+               <width>20</width>
+               <height>40</height>
               </size>
              </property>
             </spacer>
            </item>
           </layout>
-         </item>
-         <item>
-          <widget class="Line" name="line_3">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <layout class="QVBoxLayout" name="verticalLayout_11">
-           <property name="topMargin">
-            <number>0</number>
-           </property>
-           <property name="bottomMargin">
-            <number>0</number>
-           </property>
-           <item>
-            <widget class="QCheckBox" name="editor_restoreSession">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>Restore editor tabs from previous session on startup</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="editor_create_new file">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>Create nonexistent files without prompting</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="Line" name="line_4">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
+         </widget>
         </widget>
        </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_10">
-         <property name="topMargin">
-          <number>0</number>
-         </property>
-         <property name="bottomMargin">
-          <number>0</number>
-         </property>
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout">
-           <item>
-            <widget class="QCheckBox" name="useCustomFileEditor">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>Use custom file editor</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="customEditorLabel">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>command line (%f=file, %l=line):</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLineEdit" name="customFileEditor">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>emacs</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="tab_editor_styles">
-      <attribute name="title">
-       <string>Editor Styles</string>
-      </attribute>
-      <widget class="QWidget" name="verticalLayoutWidget_4">
-       <property name="geometry">
-        <rect>
-         <x>0</x>
-         <y>0</y>
-         <width>651</width>
-         <height>401</height>
-        </rect>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_5">
-        <item>
-         <widget class="QLabel" name="label_10">
-          <property name="maximumSize">
-           <size>
-            <width>676</width>
-            <height>16777215</height>
-           </size>
-          </property>
-          <property name="frameShape">
-           <enum>QFrame::NoFrame</enum>
-          </property>
-          <property name="text">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="scaledContents">
-           <bool>false</bool>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>4</number>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QTabWidget" name="tabs_editor_lexers">
-          <property name="maximumSize">
-           <size>
-            <width>676</width>
-            <height>351</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-     <widget class="QWidget" name="tab_terminal">
-      <attribute name="title">
-       <string>Terminal</string>
-      </attribute>
-      <widget class="QWidget" name="horizontalLayoutWidget">
-       <property name="geometry">
-        <rect>
-         <x>10</x>
-         <y>50</y>
-         <width>631</width>
-         <height>31</height>
-        </rect>
-       </property>
-       <layout class="QHBoxLayout" name="horizontalLayout_3">
-        <item>
-         <widget class="QLabel" name="label">
-          <property name="text">
-           <string>Cursor type:</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="terminal_cursorType"/>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>40</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item>
-         <widget class="QCheckBox" name="terminal_cursorBlinking">
-          <property name="text">
-           <string>Cursor blinking</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QCheckBox" name="terminal_cursorUseForegroundColor">
-          <property name="text">
-           <string>Use foreground color</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="verticalLayoutWidget_3">
-       <property name="geometry">
-        <rect>
-         <x>10</x>
-         <y>90</y>
-         <width>631</width>
-         <height>291</height>
-        </rect>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_8">
-        <item>
-         <widget class="Line" name="line_6">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QGroupBox" name="terminal_colors_box">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>81</height>
-           </size>
-          </property>
-          <property name="title">
-           <string>Terminal Colors</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="Line" name="line_5">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>0</height>
-           </size>
-          </property>
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="verticalSpacer_3">
-          <property name="orientation">
-           <enum>Qt::Vertical</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>40</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="layoutWidget">
-       <property name="geometry">
-        <rect>
-         <x>10</x>
-         <y>10</y>
-         <width>631</width>
-         <height>31</height>
-        </rect>
-       </property>
-       <layout class="QHBoxLayout" name="horizontalLayout_5">
-        <item>
-         <widget class="QLabel" name="label_11">
-          <property name="text">
-           <string>Font</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QFontComboBox" name="terminal_fontName">
-          <property name="editable">
-           <bool>false</bool>
-          </property>
-          <property name="fontFilters">
-           <set>QFontComboBox::MonospacedFonts</set>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="label_12">
-          <property name="text">
-           <string>Font size</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QSpinBox" name="terminal_fontSize">
-          <property name="minimum">
-           <number>2</number>
-          </property>
-          <property name="maximum">
-           <number>96</number>
-          </property>
-          <property name="value">
-           <number>10</number>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer_5">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>40</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
-      </widget>
-     </widget>
      <widget class="QWidget" name="tab_file_browser">
       <attribute name="title">
        <string>File Browser</string>
       </attribute>
       <layout class="QVBoxLayout" name="verticalLayout_3">
        <item>
-        <widget class="QCheckBox" name="showFileSize">
-         <property name="text">
-          <string>Show file size</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="showFileType">
-         <property name="text">
-          <string>Show file type</string>
+        <widget class="QScrollArea" name="scrollArea_4">
+         <property name="widgetResizable">
+          <bool>true</bool>
          </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="showLastModified">
-         <property name="text">
-          <string>Show date of last modification</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="showHiddenFiles">
-         <property name="text">
-          <string>Show hidden files</string>
-         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_5">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>678</width>
+            <height>378</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_18">
+           <item>
+            <widget class="QGroupBox" name="groupBox_3">
+             <property name="title">
+              <string>Display</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_23">
+              <item>
+               <layout class="QGridLayout" name="gridLayout_11">
+                <property name="topMargin">
+                 <number>0</number>
+                </property>
+                <item row="1" column="0">
+                 <widget class="QCheckBox" name="showFileType">
+                  <property name="text">
+                   <string>Show file type</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="3" column="0">
+                 <widget class="QCheckBox" name="showHiddenFiles">
+                  <property name="text">
+                   <string>Show hidden files</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QCheckBox" name="showFileSize">
+                  <property name="text">
+                   <string>Show file size</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="QCheckBox" name="showLastModified">
+                  <property name="text">
+                   <string>Show date of last modification</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="4" column="0">
+                 <widget class="QCheckBox" name="useAlternatingRowColors">
+                  <property name="text">
+                   <string>Alternating row colors</string>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox_4">
+             <property name="title">
+              <string>Behavior</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_24">
+              <item>
+               <layout class="QGridLayout" name="gridLayout_8">
+                <item row="4" column="0">
+                 <widget class="QCheckBox" name="sync_octave_directory">
+                  <property name="text">
+                   <string>Synchronize Octave working directory with file browser</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="5" column="0">
+                 <layout class="QGridLayout" name="lo_file_browser_startup">
+                  <item row="0" column="0">
+                   <widget class="QLabel" name="lbl_file_browser_dir">
+                    <property name="text">
+                     <string>Startup path</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="1">
+                   <widget class="QLineEdit" name="le_file_browser_dir">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="1">
+                   <widget class="QCheckBox" name="cb_restore_file_browser_dir">
+                    <property name="text">
+                     <string>Restore last directory of previous session</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="2">
+                   <widget class="QPushButton" name="pb_file_browser_dir">
+                    <property name="sizePolicy">
+                     <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                      <horstretch>0</horstretch>
+                      <verstretch>0</verstretch>
+                     </sizepolicy>
+                    </property>
+                    <property name="text">
+                     <string>Browse</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="3">
+                   <spacer name="horizontalSpacer_29">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                  <item row="1" column="3">
+                   <spacer name="horizontalSpacer_30">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="verticalSpacer_2">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>360</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
         </widget>
        </item>
-       <item>
-        <widget class="QCheckBox" name="sync_octave_directory">
-         <property name="text">
-          <string>Synchronize Octave working directory with file browser</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="useAlternatingRowColors">
-         <property name="text">
-          <string>Alternating row colors</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_2">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>360</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_workspace">
       <attribute name="title">
        <string>Workspace</string>
       </attribute>
-      <widget class="QWidget" name="verticalLayoutWidget_6">
-       <property name="geometry">
-        <rect>
-         <x>10</x>
-         <y>8</y>
-         <width>631</width>
-         <height>381</height>
-        </rect>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_13">
-        <item>
-         <widget class="QGroupBox" name="workspace_colors_box">
-          <property name="enabled">
-           <bool>true</bool>
+      <layout class="QVBoxLayout" name="verticalLayout_15">
+       <item>
+        <widget class="QScrollArea" name="scrollArea_5">
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_6">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>678</width>
+            <height>378</height>
+           </rect>
           </property>
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>81</height>
-           </size>
-          </property>
-          <property name="title">
-           <string>Storage Class Colors</string>
+          <layout class="QVBoxLayout" name="verticalLayout_19">
+           <item>
+            <layout class="QGridLayout" name="gridLayout_14">
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <item row="0" column="0">
+              <widget class="QGroupBox" name="workspace_colors_box">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="title">
+                <string>Colors for variable attributes </string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QCheckBox" name="cb_hide_tool_tips">
+               <property name="text">
+                <string>Hide tool tips</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <spacer name="verticalSpacer_6">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_shortcuts">
+      <attribute name="title">
+       <string>Shortcuts</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_27">
+       <item>
+        <widget class="QScrollArea" name="scrollArea_7">
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_8">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>678</width>
+            <height>378</height>
+           </rect>
           </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="Line" name="line_8">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>1</height>
-           </size>
-          </property>
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_25">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_26">
+             <property name="sizeConstraint">
+              <enum>QLayout::SetDefaultConstraint</enum>
+             </property>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_15">
+               <item>
+                <widget class="QCheckBox" name="cb_prevent_readline_conflicts">
+                 <property name="toolTip">
+                  <string>Select this option to prevent conflicts with readline shortcuts</string>
+                 </property>
+                 <property name="text">
+                  <string>Disable global shortcuts when terminal window has focus</string>
+                 </property>
+                 <property name="checked">
+                  <bool>true</bool>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="Line" name="line_9">
+               <property name="orientation">
+                <enum>Qt::Horizontal</enum>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <layout class="QGridLayout" name="gridLayout_12">
+               <property name="topMargin">
+                <number>10</number>
+               </property>
+               <item row="3" column="0">
+                <layout class="QHBoxLayout" name="horizontalLayout_16">
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                </layout>
+               </item>
+               <item row="1" column="2">
+                <widget class="QRadioButton" name="rb_sc_set2">
+                 <property name="text">
+                  <string>Use this set</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="0">
+                <widget class="QLabel" name="label_23">
+                 <property name="text">
+                  <string>Set 1:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="4">
+                <widget class="QPushButton" name="btn_export_shortcut_set2">
+                 <property name="text">
+                  <string>Export</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="3">
+                <widget class="QPushButton" name="btn_import_shortcut_set2">
+                 <property name="text">
+                  <string>Import</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="2">
+                <widget class="QRadioButton" name="rb_sc_set1">
+                 <property name="text">
+                  <string>Use this set</string>
+                 </property>
+                 <property name="checked">
+                  <bool>true</bool>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="5">
+                <spacer name="horizontalSpacer_26">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+               <item row="0" column="4">
+                <widget class="QPushButton" name="btn_export_shortcut_set1">
+                 <property name="text">
+                  <string>Export</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="3">
+                <widget class="QPushButton" name="btn_import_shortcut_set1">
+                 <property name="text">
+                  <string>Import</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_24">
+                 <property name="text">
+                  <string>Set 2:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <spacer name="horizontalSpacer_33">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeType">
+                  <enum>QSizePolicy::Fixed</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>20</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="QLabel" name="label_21">
+               <property name="text">
+                <string>Edit a shortcut by double-clicking in a cell</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_10">
+               <property name="topMargin">
+                <number>0</number>
+               </property>
+               <item>
+                <widget class="QTreeWidget" name="shortcuts_treewidget">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
+                 </property>
+                 <property name="sizeIncrement">
+                  <size>
+                   <width>0</width>
+                   <height>0</height>
+                  </size>
+                 </property>
+                 <property name="baseSize">
+                  <size>
+                   <width>0</width>
+                   <height>0</height>
+                  </size>
+                 </property>
+                 <property name="alternatingRowColors">
+                  <bool>true</bool>
+                 </property>
+                 <property name="animated">
+                  <bool>false</bool>
+                 </property>
+                 <property name="allColumnsShowFocus">
+                  <bool>false</bool>
+                 </property>
+                 <property name="headerHidden">
+                  <bool>false</bool>
+                 </property>
+                 <property name="columnCount">
+                  <number>5</number>
+                 </property>
+                 <attribute name="headerCascadingSectionResizes">
+                  <bool>false</bool>
+                 </attribute>
+                 <attribute name="headerDefaultSectionSize">
+                  <number>120</number>
+                 </attribute>
+                 <attribute name="headerHighlightSections">
+                  <bool>false</bool>
+                 </attribute>
+                 <attribute name="headerMinimumSectionSize">
+                  <number>64</number>
+                 </attribute>
+                 <attribute name="headerStretchLastSection">
+                  <bool>true</bool>
+                 </attribute>
+                 <column>
+                  <property name="text">
+                   <string>Action</string>
+                  </property>
+                  <property name="font">
+                   <font>
+                    <italic>false</italic>
+                   </font>
+                  </property>
+                 </column>
+                 <column>
+                  <property name="text">
+                   <string>Set 1 Default</string>
+                  </property>
+                 </column>
+                 <column>
+                  <property name="text">
+                   <string>Set 1 Actual</string>
+                  </property>
+                 </column>
+                 <column>
+                  <property name="text">
+                   <string>Set 2 Default</string>
+                  </property>
+                  <property name="font">
+                   <font>
+                    <italic>false</italic>
+                   </font>
+                  </property>
+                 </column>
+                 <column>
+                  <property name="text">
+                   <string>Set 2 Actual</string>
+                  </property>
+                 </column>
+                </widget>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </item>
+          </layout>
          </widget>
-        </item>
-        <item>
-         <spacer name="verticalSpacer_6">
-          <property name="orientation">
-           <enum>Qt::Vertical</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>40</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
-      </widget>
+        </widget>
+       </item>
+      </layout>
      </widget>
      <widget class="QWidget" name="tab_network">
       <attribute name="title">
@@ -1158,146 +2249,165 @@
       </attribute>
       <layout class="QVBoxLayout" name="verticalLayout_4">
        <item>
-        <layout class="QVBoxLayout" name="verticalLayout">
-         <item>
-          <widget class="QCheckBox" name="checkbox_allow_web_connect">
-           <property name="text">
-            <string>Allow Octave to connect to the Octave web site to display current news and information</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <layout class="QGridLayout" name="gridLayout_5">
-           <item row="1" column="1">
-            <widget class="QLabel" name="label_4">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Hostname:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QComboBox" name="proxyType">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
+        <widget class="QScrollArea" name="scrollArea_6">
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents_7">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>678</width>
+            <height>378</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_20">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout">
              <item>
-              <property name="text">
-               <string>HttpProxy</string>
-              </property>
+              <widget class="QCheckBox" name="checkbox_allow_web_connect">
+               <property name="text">
+                <string>Allow Octave to connect to the Octave web site to display current news and information</string>
+               </property>
+              </widget>
              </item>
              <item>
-              <property name="text">
-               <string>Socks5Proxy</string>
-              </property>
+              <layout class="QGridLayout" name="gridLayout_5">
+               <item row="1" column="1">
+                <widget class="QLabel" name="label_4">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Hostname:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="2">
+                <widget class="QComboBox" name="proxyType">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <item>
+                  <property name="text">
+                   <string>HttpProxy</string>
+                  </property>
+                 </item>
+                 <item>
+                  <property name="text">
+                   <string>Socks5Proxy</string>
+                  </property>
+                 </item>
+                </widget>
+               </item>
+               <item row="3" column="1">
+                <widget class="QLabel" name="label_6">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Username:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="0">
+                <widget class="QCheckBox" name="useProxyServer">
+                 <property name="text">
+                  <string>Use proxy server</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="QLabel" name="label_3">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Proxy type:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="2" column="1">
+                <widget class="QLabel" name="label_5">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Port:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="4" column="1">
+                <widget class="QLabel" name="label_7">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Password:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="2">
+                <widget class="QLineEdit" name="proxyHostName">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+               <item row="2" column="2">
+                <widget class="QLineEdit" name="proxyPort">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+               <item row="3" column="2">
+                <widget class="QLineEdit" name="proxyUserName">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                </widget>
+               </item>
+               <item row="4" column="2">
+                <widget class="QLineEdit" name="proxyPassword">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="echoMode">
+                  <enum>QLineEdit::Password</enum>
+                 </property>
+                </widget>
+               </item>
+              </layout>
              </item>
-            </widget>
-           </item>
-           <item row="3" column="1">
-            <widget class="QLabel" name="label_6">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Username:</string>
-             </property>
-            </widget>
+            </layout>
            </item>
-           <item row="0" column="0">
-            <widget class="QCheckBox" name="useProxyServer">
-             <property name="text">
-              <string>Use proxy server</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QLabel" name="label_3">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Proxy type:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QLabel" name="label_5">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Port:</string>
+           <item>
+            <spacer name="verticalSpacer_5">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
              </property>
-            </widget>
-           </item>
-           <item row="4" column="1">
-            <widget class="QLabel" name="label_7">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Password:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="2">
-            <widget class="QLineEdit" name="proxyHostName">
-             <property name="enabled">
-              <bool>false</bool>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
              </property>
-            </widget>
-           </item>
-           <item row="2" column="2">
-            <widget class="QLineEdit" name="proxyPort">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="2">
-            <widget class="QLineEdit" name="proxyUserName">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-            </widget>
-           </item>
-           <item row="4" column="2">
-            <widget class="QLineEdit" name="proxyPassword">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="echoMode">
-              <enum>QLineEdit::Password</enum>
-             </property>
-            </widget>
+            </spacer>
            </item>
           </layout>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_5">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
+         </widget>
+        </widget>
        </item>
       </layout>
      </widget>
     </widget>
    </item>
    <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
+    <widget class="QDialogButtonBox" name="button_box">
      <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+      <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
      </property>
     </widget>
    </item>
@@ -1482,38 +2592,6 @@
    </hints>
   </connection>
   <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>settings_dialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>299</x>
-     <y>366</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>299</x>
-     <y>199</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>settings_dialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>299</x>
-     <y>366</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>299</x>
-     <y>199</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
    <sender>useCustomFileEditor</sender>
    <signal>toggled(bool)</signal>
    <receiver>customEditorLabel</receiver>
@@ -1562,54 +2640,6 @@
    </hints>
   </connection>
   <connection>
-   <sender>editor_codeCompletion</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>editor_checkbox_ac_keywords</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>83</x>
-     <y>170</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>238</x>
-     <y>201</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>editor_codeCompletion</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>editor_checkbox_ac_document</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>83</x>
-     <y>170</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>390</x>
-     <y>201</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>editor_codeCompletion</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>editor_checkbox_ac_replace</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>83</x>
-     <y>170</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>427</x>
-     <y>229</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
    <sender>editor_highlightCurrentLine</sender>
    <signal>toggled(bool)</signal>
    <receiver>editor_label_cl_color</receiver>
@@ -1626,22 +2656,6 @@
    </hints>
   </connection>
   <connection>
-   <sender>editor_codeCompletion</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>editor_checkbox_ac_case</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>83</x>
-     <y>172</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>525</x>
-     <y>203</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
    <sender>editor_ws_checkbox</sender>
    <signal>toggled(bool)</signal>
    <receiver>editor_ws_indent_checkbox</receiver>
@@ -1657,5 +2671,293 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_bgtitle</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>228</x>
+     <y>156</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>380</x>
+     <y>156</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_fgtitle</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>228</x>
+     <y>156</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>496</x>
+     <y>156</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_restore_octave_dir</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>le_octave_dir</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>270</x>
+     <y>255</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>270</x>
+     <y>285</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_restore_octave_dir</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>pb_octave_dir</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>270</x>
+     <y>255</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>467</x>
+     <y>285</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_restore_file_browser_dir</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>le_file_browser_dir</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>250</x>
+     <y>294</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>250</x>
+     <y>324</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_restore_file_browser_dir</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>pb_file_browser_dir</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>250</x>
+     <y>294</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>426</x>
+     <y>324</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_longWindowTitle</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_lbl_min_tab_width</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>72</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>343</x>
+     <y>72</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_longWindowTitle</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_notebook_tab_width_max</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>72</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>437</x>
+     <y>72</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_longWindowTitle</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_lbl_max_tab_width</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>72</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>439</x>
+     <y>72</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_longWindowTitle</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_notebook_tab_width_min</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>72</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>393</x>
+     <y>72</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_long_line_marker</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_long_line_column</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>187</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>355</x>
+     <y>187</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_long_line_marker</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_long_line_column_text</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>187</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>302</x>
+     <y>187</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_checkbox_ac_keywords</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_checkbox_ac_builtins</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>118</x>
+     <y>231</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>296</x>
+     <y>231</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>editor_checkbox_ac_keywords</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>editor_checkbox_ac_functions</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>118</x>
+     <y>231</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>446</x>
+     <y>231</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_bgtitle_active</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>260</x>
+     <y>190</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>525</x>
+     <y>190</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_fgtitle_active</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>260</x>
+     <y>190</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>533</x>
+     <y>214</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>label_3d_title</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>260</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>419</x>
+     <y>236</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_widget_custom_style</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>sb_3d_title</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>260</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>507</x>
+     <y>236</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
new file mode 100644
--- /dev/null
+++ b/libgui/src/shortcut-manager.cc
@@ -0,0 +1,749 @@
+/*
+
+Copyright (C) 2014-2015 Torsten <ttl@justmail.de>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <QtCore>
+#include <QMessageBox>
+#include <QDebug>
+#include <QGridLayout>
+#include <QVBoxLayout>
+#include <QDialogButtonBox>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QHeaderView>
+#include <QAction>
+#include <QFileDialog>
+
+#include "error.h"
+#include "resource-manager.h"
+#include "shortcut-manager.h"
+#include "singleton-cleanup.h"
+
+shortcut_manager *shortcut_manager::instance = 0;
+
+shortcut_manager::shortcut_manager ()
+{
+  setObjectName ("Shortcut_Manager");
+
+  // Mac: don't let Qt interpret CMD key ("Meta" in Qt terminology) as Ctrl
+#if defined (Q_OS_MAC)
+  QCoreApplication::setAttribute (Qt::AA_MacDontSwapCtrlAndMeta, true);
+#endif
+
+  _settings = resource_manager::get_settings ();
+}
+
+shortcut_manager::~shortcut_manager ()
+{
+}
+
+bool
+shortcut_manager::instance_ok (void)
+{
+  bool retval = true;
+
+  if (! instance)
+    {
+      instance = new shortcut_manager ();
+
+      if (instance)
+        singleton_cleanup_list::add (cleanup_instance);
+    }
+
+  if (! instance)
+    {
+      ::error ("unable to create shortcut_manager object!");
+
+      retval = false;
+    }
+
+  return retval;
+}
+
+void
+shortcut_manager::do_init_data ()
+{
+  QKeySequence ctrl;
+  int prefix;
+#if defined (Q_OS_MAC)
+  // Use CMD key as an equivalent of Ctrl key on other platforms
+  ctrl =  Qt::MetaModifier;
+  // Some of octave default shortcuts on windows/linux are already defined
+  // as system wide shortcuts on Mac Os X (almost all Function keys).
+  // Prefix those with Option (Alt) modifier to avoid conflicts.
+  prefix = Qt::AltModifier;
+#else
+  ctrl = Qt::ControlModifier;
+  prefix = Qt::NoModifier;
+#endif
+
+  QKeySequence ctrl_shift = ctrl + Qt::ShiftModifier;
+  QKeySequence ctrl_alt = ctrl + Qt::AltModifier;
+
+  // actions of the main window
+
+  // file
+  init (tr ("New File"), "main_file:new_file", QKeySequence::New);
+  init (tr ("New Function"), "main_file:new_function",
+        QKeySequence (ctrl_shift + Qt::Key_N));
+  init (tr ("New Figure"), "main_file:new_figure", QKeySequence ());
+  init (tr ("Open File"), "main_file:open_file", QKeySequence::Open);
+  init (tr ("Load Workspace"), "main_file:load_workspace", QKeySequence ());
+  init (tr ("Save Workspace As"), "main_file:save_workspace", QKeySequence ());
+  init (tr ("Exit Octave"), "main_file:exit", QKeySequence::Quit);
+
+  // edit
+  init (tr ("Copy"), "main_edit:copy", QKeySequence::Copy);
+  init (tr ("Paste"), "main_edit:paste", QKeySequence::Paste);
+  init (tr ("Undo"), "main_edit:undo", QKeySequence::Undo);
+  init (tr ("Select All"), "main_edit:select_all", QKeySequence ());
+  init (tr ("Clear Clipboard"), "main_edit:clear_clipboard", QKeySequence ());
+  init (tr ("Find in Files"), "main_edit:find_in_files",
+        QKeySequence (ctrl_shift + Qt::Key_F));
+  init (tr ("Clear Command Window"), "main_edit:clear_command_window",
+        QKeySequence ());
+  init (tr ("Clear Command History"), "main_edit:clear_history",
+        QKeySequence ());
+  init (tr ("Clear Workspace"), "main_edit:clear_workspace", QKeySequence ());
+  init (tr ("Preferences"), "main_edit:preferences", QKeySequence ());
+
+  // debug
+  init (tr ("Step"), "main_debug:step_over",
+        QKeySequence (prefix + Qt::Key_F10));
+  init (tr ("Step Into"), "main_debug:step_into",
+        QKeySequence (prefix + Qt::Key_F11));
+  init (tr ("Step Out"), "main_debug:step_out",
+        QKeySequence (prefix + Qt::ShiftModifier + Qt::Key_F11));
+  init (tr ("Continue"), "main_debug:continue",
+        QKeySequence (prefix + Qt::Key_F5));
+  init (tr ("Quit Debug Mode"), "main_debug:quit",
+        QKeySequence (prefix + Qt::ShiftModifier + Qt::Key_F5));
+
+  // window
+  init (tr ("Show Command Window"), "main_window:show_command",
+        prefix + ctrl_shift + Qt::Key_0);
+  init (tr ("Show Command History"), "main_window:show_history",
+        prefix + ctrl_shift + Qt::Key_1);
+  init (tr ("Show File Browser"), "main_window:show_file_browser",
+        prefix + ctrl_shift + Qt::Key_2);
+  init (tr ("Show Workspace"), "main_window:show_workspace",
+        prefix + ctrl_shift + Qt::Key_3);
+  init (tr ("Show Editor"), "main_window:show_editor",
+        prefix + ctrl_shift + Qt::Key_4);
+  init (tr ("Show Documentation"), "main_window:show_doc",
+        prefix + ctrl_shift + Qt::Key_5);
+  init (tr ("Command Window"), "main_window:command",
+        prefix + ctrl + Qt::Key_0);
+  init (tr ("Command History"), "main_window:history",
+        prefix + ctrl + Qt::Key_1);
+  init (tr ("File Browser"), "main_window:file_browser",
+        prefix + ctrl + Qt::Key_2);
+  init (tr ("Workspace"), "main_window:workspace",
+        prefix + ctrl + Qt::Key_3);
+  init (tr ("Editor"), "main_window:editor",
+        prefix + ctrl + Qt::Key_4);
+  init (tr ("Documentation"), "main_window:doc",
+        prefix + ctrl + Qt::Key_5);
+  init (tr ("Reset Default Window Layout"), "main_window:reset", QKeySequence ());
+
+  // help
+  init (tr ("Show Ondisk Documentation"), "main_help:ondisk_doc",
+        QKeySequence ());
+  init (tr ("Show Online Documentation"), "main_help:online_doc",
+        QKeySequence ());
+  init (tr ("Report Bug"), "main_help:report_bug", QKeySequence ());
+  init (tr ("Octave Packages"), "main_help:packages", QKeySequence ());
+  init (tr ("Share Code"), "main_help:agora", QKeySequence ());
+  init (tr ("Contribute to Octave"), "main_help:contribute", QKeySequence ());
+  init (tr ("Octave Developer Resources"), "main_help:developer",
+        QKeySequence ());
+  init (tr ("About Octave"), "main_help:about", QKeySequence ());
+
+  // news
+  init (tr ("Release Notes"), "main_news:release_notes", QKeySequence ());
+  init (tr ("Community News"), "main_news:community_news", QKeySequence ());
+
+  // actions of the editor
+
+  // file
+  init (tr ("Edit Function"), "editor_file:edit_function",
+        QKeySequence (ctrl + Qt::Key_E));
+  init (tr ("Save File"), "editor_file:save", QKeySequence::Save);
+  init (tr ("Save File As"), "editor_file:save_as", QKeySequence::SaveAs);
+  init (tr ("Close"), "editor_file:close", QKeySequence::Close);
+  init (tr ("Close All"), "editor_file:close_all", QKeySequence ());
+  init (tr ("Close Other Files"), "editor_file:close_other", QKeySequence ());
+  init (tr ("Print"), "editor_file:print", QKeySequence::Print);
+
+  // edit
+  init (tr ("Undo"), "editor_edit:undo", QKeySequence::Undo);
+  init (tr ("Redo"), "editor_edit:redo", QKeySequence::Redo);
+  init (tr ("Copy"), "editor_edit:copy", QKeySequence::Copy);
+  init (tr ("Cut"), "editor_edit:cut", QKeySequence::Cut);
+  init (tr ("Paste"), "editor_edit:paste", QKeySequence::Paste);
+  init (tr ("Select All"), "editor_edit:select_all", QKeySequence::SelectAll);
+  init (tr ("Find and Replace"), "editor_edit:find_replace",
+        QKeySequence::Find);
+  init (tr ("Delete to Start of Word"), "editor_edit:delete_start_word",
+        QKeySequence::DeleteStartOfWord);
+  init (tr ("Delete to End of Word"), "editor_edit:delete_end_word",
+        QKeySequence::DeleteEndOfWord);
+  init (tr ("Delete to Start of Line"), "editor_edit:delete_start_line",
+        QKeySequence (ctrl_shift + Qt::Key_Backspace));
+  init (tr ("Delete to End of Line"), "editor_edit:delete_end_line",
+        QKeySequence (ctrl_shift + Qt::Key_Delete));
+  init (tr ("Delete Line"), "editor_edit:delete_line",
+        QKeySequence (ctrl_shift + Qt::Key_L));
+  init (tr ("Copy Line"), "editor_edit:copy_line",
+        QKeySequence (ctrl_shift + Qt::Key_C));
+  init (tr ("Cut Line"), "editor_edit:cut_line",
+        QKeySequence (ctrl_shift + Qt::Key_X));
+  init (tr ("Duplicate Selection/Line"), "editor_edit:duplicate_selection",
+        QKeySequence (ctrl + Qt::Key_D));
+  init (tr ("Transpose Line"), "editor_edit:transpose_line",
+        QKeySequence (ctrl + Qt::Key_T));
+  init (tr ("Show Completion List"), "editor_edit:completion_list",
+        QKeySequence (ctrl + Qt::Key_Space));
+
+  init (tr ("Comment Selection"), "editor_edit:comment_selection",
+        QKeySequence (ctrl + Qt::Key_R));
+  init (tr ("Uncomment Selection"), "editor_edit:uncomment_selection",
+        QKeySequence (ctrl_shift + Qt::Key_R));
+  init (tr ("Uppercase Selection"), "editor_edit:upper_case",
+        QKeySequence (ctrl + Qt::Key_U));
+  init (tr ("Lowercase Selection"), "editor_edit:lower_case",
+        QKeySequence (ctrl_alt + Qt::Key_U));
+
+#if defined (Q_OS_MAC)
+  init (tr ("Indent Selection"), "editor_edit:indent_selection",
+        QKeySequence (prefix + Qt::Key_Tab));
+  init (tr ("Unindent Selection"), "editor_edit:unindent_selection",
+        QKeySequence (prefix + Qt::ShiftModifier + Qt::Key_Tab));
+#else
+  init (tr ("Indent Selection"), "editor_edit:indent_selection",
+        QKeySequence (ctrl + Qt::Key_Tab));
+  init (tr ("Unindent Selection"), "editor_edit:unindent_selection",
+        QKeySequence (ctrl_shift + Qt::Key_Tab));
+#endif
+
+  init (tr ("Convert Line Endings to Windows"), "editor_edit:conv_eol_winows",
+        QKeySequence ());
+  init (tr ("Convert Line Endings to Unix"), "editor_edit:conv_eol_unix",
+        QKeySequence ());
+  init (tr ("Convert Line Endings to Mac"), "editor_edit:conv_eol_mac",
+        QKeySequence ());
+
+  init (tr ("Goto Line"), "editor_edit:goto_line",
+        QKeySequence (ctrl + Qt::Key_G));
+  init (tr ("Move to Matching Brace"), "editor_edit:move_to_brace",
+        QKeySequence (ctrl + Qt::Key_M));
+  init (tr ("Select to Matching Brace"), "editor_edit:select_to_brace",
+        QKeySequence (ctrl_shift + Qt::Key_M));
+  init (tr ("Toggle Bookmark"), "editor_edit:toggle_bookmark",
+        QKeySequence (prefix + Qt::Key_F7));
+  init (tr ("Next Bookmark"), "editor_edit:next_bookmark",
+        QKeySequence (prefix + Qt::Key_F2));
+  init (tr ("Previous Bookmark"), "editor_edit:previous_bookmark",
+        QKeySequence (prefix + Qt::SHIFT + Qt::Key_F2));
+  init (tr ("Remove All Bookmark"), "editor_edit:remove_bookmark",
+        QKeySequence ());
+
+  init (tr ("Preferences"), "editor_edit:preferences", QKeySequence ());
+  init (tr ("Styles Preferences"), "editor_edit:styles_preferences",
+        QKeySequence ());
+
+  // view
+  init (tr ("Show Line Numbers"), "editor_view:show_line_numbers",
+        QKeySequence ());
+  init (tr ("Show Whitespace Characters"), "editor_view:show_white_spaces",
+        QKeySequence ());
+  init (tr ("Show Line Endings"), "editor_view:show_eol_chars", QKeySequence ());
+  init (tr ("Show Indentation Guides"), "editor_view:show_ind_guides",
+        QKeySequence ());
+  init (tr ("Show Long Line Marker"), "editor_view:show_long_line",
+        QKeySequence ());
+  init (tr ("Zoom In"), "editor_view:zoom_in", QKeySequence::ZoomIn);
+  init (tr ("Zoom Out"), "editor_view:zoom_out", QKeySequence::ZoomOut);
+#if defined (Q_OS_MAC)
+  init (tr ("Zoom Normal"), "editor_view:zoom_normal",
+        QKeySequence (ctrl + Qt::Key_Underscore));
+#else
+  init (tr ("Zoom Normal"), "editor_view:zoom_normal",
+        QKeySequence (ctrl + Qt::Key_Period));
+#endif
+
+  // debug
+  init (tr ("Toggle Breakpoint"), "editor_debug:toggle_breakpoint",
+        QKeySequence ());
+  init (tr ("Next Breakpoint"), "editor_debug:next_breakpoint",
+        QKeySequence ());
+  init (tr ("Previous Breakpoint"), "editor_debug:previous_breakpoint",
+        QKeySequence ());
+  init (tr ("Remove All Breakpoints"), "editor_debug:remove_breakpoints",
+        QKeySequence ());
+
+  // run
+  init (tr ("Run File"), "editor_run:run_file",
+        QKeySequence (prefix + Qt::Key_F5) );
+  init (tr ("Run Selection"), "editor_run:run_selection",
+        QKeySequence (prefix + Qt::Key_F9) );
+
+  // help
+  init (tr ("Help on Keyword"), "editor_help:help_keyword",
+        QKeySequence::HelpContents);
+  init (tr ("Document on Keyword"), "editor_help:doc_keyword",
+        QKeySequence (Qt::SHIFT + Qt::Key_F1));
+}
+
+void
+shortcut_manager::init (QString description, QString key, QKeySequence def_sc)
+{
+  QKeySequence actual_0
+    = QKeySequence (_settings->value ("shortcuts/"+key, def_sc).toString ());
+  QKeySequence actual_1
+    = QKeySequence (_settings->value ("shortcuts/"+key+"_1", def_sc).toString ());
+
+  // append the new shortcut to the list
+  shortcut_t shortcut_info;
+  shortcut_info.description = description;
+  shortcut_info.settings_key = key;
+  shortcut_info.actual_sc [0] = actual_0;
+  shortcut_info.actual_sc [1] = actual_1;
+  shortcut_info.default_sc [0] = def_sc;
+  shortcut_info.default_sc [1] = def_sc;  // TODO: Different defaults
+  _sc << shortcut_info;
+
+  // insert shortcut prepended by widget in order check for duplicates later
+  QString widget = key.section ('_',0,0);  // get widget that uses the shortcut
+  if (! actual_0.isEmpty ())
+    _shortcut_hash[widget + ":" + actual_0.toString ()] =
+      _sc.count ();  // offset of 1 to avoid 0
+  if (! actual_1.isEmpty ())
+    _shortcut_hash[widget + "_1:" + actual_1.toString ()] =
+      _sc.count ();  // offset of 1 to avoid 0
+  _action_hash[key] = _sc.count ();  // offset of 1 to avoid 0
+}
+
+void
+shortcut_manager::do_fill_treewidget (QTreeWidget *tree_view)
+{
+  _dialog = 0;
+  _level_hash.clear ();
+
+  tree_view->header ()->setResizeMode (QHeaderView::ResizeToContents);
+
+  QTreeWidgetItem *main = new QTreeWidgetItem (tree_view);
+  main->setText (0, tr ("Main"));
+  main->setExpanded (true);
+  QTreeWidgetItem *main_file = new QTreeWidgetItem (main);
+  main_file->setText (0, tr ("File"));
+  QTreeWidgetItem *main_edit = new QTreeWidgetItem (main);
+  main_edit->setText (0, tr ("Edit"));
+  QTreeWidgetItem *main_debug = new QTreeWidgetItem (main);
+  main_debug->setText (0, tr ("Debug"));
+  QTreeWidgetItem *main_window = new QTreeWidgetItem (main);
+  main_window->setText (0, tr ("Window"));
+  QTreeWidgetItem *main_help = new QTreeWidgetItem (main);
+  main_help->setText (0, tr ("Help"));
+  QTreeWidgetItem *main_news = new QTreeWidgetItem (main);
+  main_news->setText (0, tr ("News"));
+
+  _level_hash["main_file"]   = main_file;
+  _level_hash["main_edit"]   = main_edit;
+  _level_hash["main_debug"]   = main_debug;
+  _level_hash["main_window"]   = main_window;
+  _level_hash["main_help"]   = main_help;
+  _level_hash["main_news"]   = main_news;
+
+  QTreeWidgetItem *editor = new QTreeWidgetItem (tree_view);
+  editor->setText (0, tr ("Editor"));
+  editor->setExpanded (true);
+  QTreeWidgetItem *editor_file = new QTreeWidgetItem (editor);
+  editor_file->setText (0, tr ("File"));
+  QTreeWidgetItem *editor_edit = new QTreeWidgetItem (editor);
+  editor_edit->setText (0, tr ("Edit"));
+  QTreeWidgetItem *editor_view = new QTreeWidgetItem (editor);
+  editor_view->setText (0, tr ("View"));
+  QTreeWidgetItem *editor_debug = new QTreeWidgetItem (editor);
+  editor_debug->setText (0, tr ("Debug"));
+  QTreeWidgetItem *editor_run = new QTreeWidgetItem (editor);
+  editor_run->setText (0, tr ("Run"));
+  QTreeWidgetItem *editor_help = new QTreeWidgetItem (editor);
+  editor_help->setText (0, tr ("Help"));
+
+  _level_hash["editor_file"] = editor_file;
+  _level_hash["editor_edit"] = editor_edit;
+  _level_hash["editor_view"] = editor_view;
+  _level_hash["editor_debug"] = editor_debug;
+  _level_hash["editor_run"] = editor_run;
+  _level_hash["editor_help"] = editor_help;
+
+  connect (tree_view, SIGNAL (itemDoubleClicked (QTreeWidgetItem*, int)),
+           this, SLOT (handle_double_clicked (QTreeWidgetItem*, int)));
+
+  for (int i = 0; i < _sc.count (); i++)
+    {
+      shortcut_t sc = _sc.at (i);
+
+      QTreeWidgetItem* section = _level_hash[sc.settings_key.section(':',0,0)];
+      QTreeWidgetItem* tree_item = new QTreeWidgetItem (section);
+
+      // set a slightly transparent foreground for default columns
+      QColor fg = QColor (tree_item->foreground (1).color ());
+      fg.setAlpha (128);
+      tree_item->setForeground (1, QBrush (fg));
+      tree_item->setForeground (3, QBrush (fg));
+
+      // write the shortcuts
+      tree_item->setText (0, sc.description);
+      tree_item->setText (1, sc.default_sc [0]);
+      tree_item->setText (2, sc.actual_sc [0]);
+      tree_item->setText (3, sc.default_sc [1]);
+      tree_item->setText (4, sc.actual_sc [1]);
+
+      _item_index_hash[tree_item] = i + 1; // index+1 to avoid 0
+      _index_item_hash[i] = tree_item;
+    }
+
+}
+
+// write one or all actual shortcut set(s) into a settings file
+void
+shortcut_manager::do_write_shortcuts (int set, QSettings* settings,
+                                      bool closing)
+{
+  if (set)
+    {
+      // set is not zero, only write the desired set (index = set-1)
+      // into the settings file that the user has selected for this export
+      for (int i = 0; i < _sc.count (); i++)  // loop over all shortcuts
+        {
+          settings->setValue("shortcuts/"+_sc.at (i).settings_key,
+                             _sc.at (i).actual_sc[set-1].toString ());
+        }
+    }
+  else
+    {
+      // set is zero, write all sets into the normal octave settings file
+      // (this is only the case when called from the closing settings dialog)
+      for (int i = 0; i < _sc.count (); i++)  // loop over all shortcuts
+        {
+          settings->setValue("shortcuts/"+_sc.at (i).settings_key,
+                             _sc.at (i).actual_sc[0].toString ());
+          settings->setValue("shortcuts/"+_sc.at (i).settings_key+"_1",
+                             _sc.at (i).actual_sc[1].toString ());
+        }
+
+      if (closing)
+        {
+          delete _dialog;  // the dialog for key sequences can be removed now
+          _dialog = 0;     // make sure it is zero again
+        }
+    }
+
+  settings->sync ();    // sync the settings file
+}
+
+void
+shortcut_manager::do_set_shortcut (QAction* action, const QString& key)
+{
+  int set = _settings->value ("shortcuts/set",0).toInt ();
+  int index;
+
+  index = _action_hash[key] - 1;
+
+  QString key_set = key;
+  if (set == 1)
+    key_set = key+"_1";
+
+  if (index > -1 && index < _sc.count ())
+    action->setShortcut (QKeySequence (
+      _settings->value ("shortcuts/" + key_set, _sc.at (index).default_sc[set]).toString ()));
+  else
+    qDebug () << "Key: " << key_set << " not found in _action_hash";
+}
+
+void
+shortcut_manager::handle_double_clicked (QTreeWidgetItem* item, int col)
+{
+  switch (col)
+    {
+    case 2:
+    case 4:
+      _selected_set = col/2 - 1;
+      break;
+
+    default:
+      return;
+    }
+
+  int i = _item_index_hash[item];
+  if (i == 0)
+    return;  // top-level-item clicked
+
+  shortcut_dialog (i-1); // correct to index starting at 0
+}
+
+void
+shortcut_manager::shortcut_dialog (int index)
+{
+  if (! _dialog)
+    {
+      _dialog = new QDialog (this);
+
+      _dialog->setWindowTitle (tr ("Enter new Shortcut for Set %1")
+                               .arg (_selected_set + 1));
+
+      QVBoxLayout *box = new QVBoxLayout(_dialog);
+
+      QLabel *help = new QLabel (tr ("Apply the desired shortcut or click "
+                                     "on the right button to reset the "
+                                     "shortcut to its default."));
+      help->setWordWrap (true);
+      box->addWidget (help);
+
+      QCheckBox *direct = new QCheckBox (
+        tr ("Enter shortcut directly by performing it"));
+      direct->setCheckState (Qt::Checked);
+      box->addWidget (direct);
+
+      QGridLayout *grid = new QGridLayout();
+
+      QLabel *actual = new QLabel (tr ("Actual shortcut"));
+      _edit_actual = new enter_shortcut (_dialog);
+      _edit_actual->setAlignment (Qt::AlignHCenter);
+      grid->addWidget (actual, 0, 0);
+      grid->addWidget (_edit_actual, 0, 1);
+
+      QLabel *def = new QLabel (tr ("Default shortcut"));
+      _label_default = new QLabel (_dialog);
+      _label_default->setAlignment (Qt::AlignHCenter);
+      grid->addWidget (def, 1, 0);
+      grid->addWidget (_label_default, 1, 1);
+
+      QPushButton *set_default = new QPushButton (tr ("Set to default"));
+      grid->addWidget (set_default, 0, 2);
+      connect (set_default, SIGNAL (clicked ()),
+               this, SLOT (shortcut_dialog_set_default ()));
+
+      box->addLayout (grid);
+
+      QDialogButtonBox *button_box = new QDialogButtonBox (QDialogButtonBox::Ok
+                                                   | QDialogButtonBox::Cancel);
+      QList<QAbstractButton *> buttons = button_box->buttons ();
+      for (int i = 0; i < buttons.count (); i++)
+        buttons.at (i)->setShortcut (QKeySequence ());
+      connect(button_box, SIGNAL (accepted ()), _dialog, SLOT (accept ()));
+      connect(button_box, SIGNAL (rejected ()), _dialog, SLOT (reject ()));
+      box->addWidget (button_box);
+
+      _dialog->setLayout (box);
+
+      connect (direct, SIGNAL (stateChanged (int)),
+               _edit_actual, SLOT (handle_direct_shortcut (int)));
+      connect (_dialog, SIGNAL (finished (int)),
+               this, SLOT (shortcut_dialog_finished (int)));
+
+    }
+
+  _edit_actual->setText (_sc.at (index).actual_sc[_selected_set]);
+  _label_default->setText (_sc.at (index).default_sc[_selected_set]);
+  _handled_index = index;
+
+  _edit_actual->setFocus ();
+  _dialog->setFocusProxy (_edit_actual);
+  _dialog->exec ();
+}
+
+void
+shortcut_manager::shortcut_dialog_finished (int result)
+{
+  if (result == QDialog::Rejected)
+    return;
+
+  // check for duplicate
+
+  // get the widget for which this shortcut is defined
+  QString widget = _sc.at (_handled_index).settings_key.section ('_',0,0);
+  // and look for shortcut
+  QString sep = ":";
+  if (_selected_set)
+    sep = "_1:";
+
+  int double_index = _shortcut_hash[widget + sep + _edit_actual->text()] - 1;
+
+  if (double_index >= 0 && double_index != _handled_index)
+    {
+      int ret = QMessageBox::warning(this, tr("Double Shortcut"),
+                  tr ("The chosen shortcut\n  \"%1\"\n"
+                      "is already used for the action\n  \"%2\".\n"
+                      "Do you want to use the shortcut anyhow removing it "
+                      "from the previous action?")
+                     .arg (_edit_actual->text())
+                     .arg (_sc.at (double_index).description),
+                  QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+
+      if (ret == QMessageBox::Yes)
+        {
+          shortcut_t double_shortcut = _sc.at (double_index);
+          double_shortcut.actual_sc[_selected_set] = QKeySequence ();
+          _sc.replace (double_index, double_shortcut);
+          _index_item_hash[double_index]->setText ((_selected_set + 1)*2, QKeySequence ());
+        }
+      else
+        return;
+    }
+
+  shortcut_t shortcut = _sc.at (_handled_index);
+  if (! shortcut.actual_sc[_selected_set].isEmpty ())
+    _shortcut_hash.remove (widget + sep +
+                           shortcut.actual_sc[_selected_set].toString ());
+  shortcut.actual_sc[_selected_set] = _edit_actual->text();
+  _sc.replace (_handled_index, shortcut);
+
+  _index_item_hash[_handled_index]->setText ((_selected_set + 1)*2,
+                                             shortcut.actual_sc[_selected_set]);
+
+  if (! shortcut.actual_sc[_selected_set].isEmpty ())
+    _shortcut_hash[widget + sep + shortcut.actual_sc[_selected_set].toString ()] =
+      _handled_index + 1;
+}
+
+void
+shortcut_manager::shortcut_dialog_set_default ()
+{
+  _edit_actual->setText (_label_default->text ());
+}
+
+// import a shortcut set from a given settings file and refresh the tree view
+void
+shortcut_manager::import_shortcuts (int set, QSettings *settings)
+{
+  for (int i = 0; i < _sc.count (); i++)
+    {
+      // update the list of all shortcuts
+      shortcut_t sc = _sc.at (i);           // make a copy
+      sc.actual_sc[set-1] = QKeySequence (  // get new shortcut from settings
+        settings->value ("shortcuts/"+sc.settings_key,sc.actual_sc[set-1]).
+                        toString ());       // and use the old one as default
+      _sc.replace (i,sc);                   // replace the old with the new one
+
+      // update the tree view
+      QTreeWidgetItem* tree_item = _index_item_hash[i]; // get related tree item
+      tree_item->setText (2*set, sc.actual_sc [set-1]); // display new shortcut
+    }
+}
+
+// import or export of shortcut sets,
+// called from settings dialog when related buttons are clicked
+void
+shortcut_manager::do_import_export (bool import, int set)
+{
+  QString file;
+
+  // get the file name to read or write the shortcuts,
+  // the default extension is .osc (octave shortcuts)
+  if (import)
+    {
+      file = QFileDialog::getOpenFileName (this,
+              tr ("Import shortcut set %1 from file ...").arg (set), QString (),
+              tr ("Octave Shortcut Files (*.osc);;All Files (*)"));
+    }
+  else
+    {
+      file = QFileDialog::getSaveFileName (this,
+              tr ("Export shortcut set %1 into file ...").arg (set), QString (),
+              tr ("Octave Shortcut Files (*.osc);;All Files (*)"));
+    }
+
+  // create a settings object related to this file
+  QSettings *osc_settings = new QSettings (file, QSettings::IniFormat);
+  if (osc_settings)
+    {
+      // the settings object was successfully created: carry on
+      if (import)
+        import_shortcuts (set, osc_settings);   // import (special action)
+      else
+        do_write_shortcuts (set, osc_settings, false); // export, (saving settings)
+    }
+  else
+    qWarning () << tr ("Failed to open %1 as octave shortcut file"). arg (file);
+
+}
+
+
+// enter_shortcut:
+// class derived from QLineEdit for directly entering key sequences which
+enter_shortcut::enter_shortcut (QWidget *p) : QLineEdit (p)
+{
+  _direct_shortcut = true;      // the shortcut is directly entered
+}
+
+enter_shortcut::~enter_shortcut ()
+{
+}
+
+// slot for checkbox whether the shortcut is directly entered or not
+void
+enter_shortcut::handle_direct_shortcut (int state)
+{
+  if (state)
+    _direct_shortcut = true;  // the shortcut is directly entered
+  else
+    _direct_shortcut = false; // the shortcut has to be written as text
+}
+
+// new keyPressEvent
+void
+enter_shortcut::keyPressEvent (QKeyEvent *e)
+{
+  if (! _direct_shortcut)
+    {
+      QLineEdit::keyPressEvent (e);
+      return;
+    }
+
+  if (e->type () == QEvent::KeyPress)
+    {
+      int key = e->key ();
+
+      if (key == Qt::Key_unknown || key == 0)
+        return;
+
+      Qt::KeyboardModifiers modifiers = e->modifiers ();
+
+      if (modifiers & Qt::ShiftModifier)
+        key += Qt::SHIFT;
+      if (modifiers & Qt::ControlModifier)
+        key += Qt::CTRL;
+      if (modifiers & Qt::AltModifier)
+        key += Qt::ALT;
+      if (modifiers & Qt::MetaModifier)
+        key += Qt::META;
+
+      setText (QKeySequence(key));
+    }
+}
new file mode 100644
--- /dev/null
+++ b/libgui/src/shortcut-manager.h
@@ -0,0 +1,202 @@
+/*
+
+Copyright (C) 2014-2015 Torsten <ttl@justmail.de>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef SHORTCUT_MANAGER_H
+#define SHORTCUT_MANAGER_H
+
+#include <QWidget>
+#include <QTreeWidget>
+#include <QLineEdit>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QSettings>
+
+class enter_shortcut : public QLineEdit
+{
+  Q_OBJECT
+
+public:
+  enter_shortcut (QWidget *p = 0);
+  ~enter_shortcut ();
+
+  virtual void  keyPressEvent (QKeyEvent *e);
+
+public slots:
+  void handle_direct_shortcut (int);
+
+private:
+  bool _direct_shortcut;
+
+};
+
+
+class shortcut_manager : public QWidget
+{
+  Q_OBJECT
+
+public:
+  shortcut_manager ();
+  ~shortcut_manager ();
+
+  static void init_data ()
+  {
+    if (instance_ok ())
+      instance->do_init_data ();
+  }
+
+  static void write_shortcuts (int set, QSettings *settings, bool closing)
+  {
+    if (instance_ok ())
+      instance->do_write_shortcuts (set, settings, closing);
+  }
+
+  static void set_shortcut (QAction *action, const QString& key)
+  {
+    if (instance_ok ())
+      instance->do_set_shortcut (action, key);
+  }
+
+  static void fill_treewidget (QTreeWidget *tree_view)
+  {
+    if (instance_ok ())
+      instance->do_fill_treewidget (tree_view);
+  }
+
+  static void import_export (bool import, int set)
+  {
+    if (instance_ok ())
+      instance->do_import_export (import, set);
+  }
+
+public slots:
+
+signals:
+
+protected:
+
+protected slots:
+
+  void handle_double_clicked (QTreeWidgetItem*, int);
+  void shortcut_dialog_finished (int);
+  void shortcut_dialog_set_default ();
+
+private:
+
+  static shortcut_manager *instance;
+  static void cleanup_instance (void) { delete instance; instance = 0; }
+
+  // No copying!
+
+  shortcut_manager (const shortcut_manager&);
+  shortcut_manager& operator = (const shortcut_manager&);
+
+  static bool instance_ok (void);
+
+  void init (QString, QString, QKeySequence);
+  void do_init_data ();
+  void do_write_shortcuts (int set, QSettings *settings, bool closing);
+  void do_set_shortcut (QAction *action, const QString& key);
+  void do_fill_treewidget (QTreeWidget *tree_view);
+  void do_import_export (bool import, int set);
+  void shortcut_dialog (int);
+  void import_shortcuts (int set, QSettings *settings);
+
+  class shortcut_t
+  {
+  public:
+
+    shortcut_t (void)
+      : tree_item (0), description (), settings_key (),
+        actual_sc (new QKeySequence[2]), default_sc (new QKeySequence[2])
+    {
+      actual_sc[0] = QKeySequence ();
+      actual_sc[1] = QKeySequence ();
+
+      default_sc[0] = QKeySequence ();
+      default_sc[1] = QKeySequence ();
+    }
+
+    shortcut_t (const shortcut_t& x)
+      : tree_item (x.tree_item), description (x.description),
+        settings_key (x.settings_key), 
+        actual_sc (new QKeySequence[2]), default_sc (new QKeySequence[2])
+    {
+      actual_sc[0] = x.actual_sc[0];
+      actual_sc[1] = x.actual_sc[1];
+
+      default_sc[0] = x.default_sc[0];
+      default_sc[1] = x.default_sc[1];
+    }
+
+    shortcut_t& operator = (const shortcut_t& x)
+    {
+      if (&x != this)
+        {
+          tree_item = x.tree_item;
+          description = x.description;
+          settings_key = x.settings_key;
+
+          actual_sc = new QKeySequence[2];
+          default_sc = new QKeySequence[2];
+
+          actual_sc[0] = x.actual_sc[0];
+          actual_sc[1] = x.actual_sc[1];
+
+          default_sc[0] = x.default_sc[0];
+          default_sc[1] = x.default_sc[1];
+        }
+
+      return *this;
+    }
+
+    ~shortcut_t (void)
+    {
+      delete [] actual_sc;
+      delete [] default_sc;
+    }
+
+    QTreeWidgetItem *tree_item;
+    QString description;
+    QString settings_key;
+    QKeySequence *actual_sc;
+    QKeySequence *default_sc;
+  };
+
+  QList<shortcut_t> _sc;
+  QHash<QString, int> _shortcut_hash;
+  QHash<QString, int> _action_hash;
+  QHash <QString, QTreeWidgetItem*> _level_hash;
+  QHash<int, QTreeWidgetItem*> _index_item_hash;
+  QHash<QTreeWidgetItem*, int> _item_index_hash;
+
+  QDialog *_dialog;
+  enter_shortcut *_edit_actual;
+  QLabel *_label_default;
+  int _handled_index;
+
+  QSettings *_settings;
+  int _selected_set;
+
+};
+
+
+#endif // SHORTCUT_MANAGER_H
--- a/libgui/src/terminal-dock-widget.cc
+++ b/libgui/src/terminal-dock-widget.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
--- a/libgui/src/terminal-dock-widget.h
+++ b/libgui/src/terminal-dock-widget.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
--- a/libgui/src/thread-manager.cc
+++ b/libgui/src/thread-manager.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libgui/src/thread-manager.h
+++ b/libgui/src/thread-manager.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libgui/src/welcome-wizard.cc
+++ b/libgui/src/welcome-wizard.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -30,6 +30,11 @@
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 
+#ifdef __WIN32__
+  #define WIN32_LEAN_AND_MEAN
+  #include <windows.h>
+#endif
+
 #include "welcome-wizard.h"
 #include "resource-manager.h"
 
@@ -45,224 +50,224 @@
 
 
 initial_page::initial_page (welcome_wizard *wizard)
-    : QWidget (wizard),
-      title (new QLabel (tr ("Welcome to Octave!"), this)),
-      message (new QLabel (this)),
-      logo (make_octave_logo (this)),
-      next (new QPushButton (tr ("Next"), this)),
-      cancel (new QPushButton (tr ("Cancel"), this))
-  {
-    QFont ft;
-    ft.setPointSize (20);
-    title->setFont (ft);
+  : QWidget (wizard),
+    title (new QLabel (tr ("Welcome to Octave!"), this)),
+    message (new QLabel (this)),
+    logo (make_octave_logo (this)),
+    next (new QPushButton (tr ("Next"), this)),
+    cancel (new QPushButton (tr ("Cancel"), this))
+{
+  QFont ft;
+  ft.setPointSize (20);
+  title->setFont (ft);
 
-    message->setText
-      (tr ("<html><body>\n"
-           "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
-           "Click 'Next' to create a configuration file and launch Octave.</p>\n"
-           "<p>The configuration file is stored in<br>%1.</p>\n"
-           "</body></html>").
-           arg (resource_manager::get_settings_file ()));
-    message->setWordWrap (true);
-    message->setMinimumWidth (400);
+  message->setText
+  (tr ("<html><body>\n"
+       "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
+       "Click 'Next' to create a configuration file and launch Octave.</p>\n"
+       "<p>The configuration file is stored in<br>%1.</p>\n"
+       "</body></html>").
+   arg (resource_manager::get_settings_file ()));
+  message->setWordWrap (true);
+  message->setMinimumWidth (400);
 
-    QVBoxLayout *message_layout = new QVBoxLayout;
+  QVBoxLayout *message_layout = new QVBoxLayout;
 
-    message_layout->addWidget (title);
-    message_layout->addWidget (message);
+  message_layout->addWidget (title);
+  message_layout->addWidget (message);
 
-    QHBoxLayout *message_and_logo = new QHBoxLayout;
+  QHBoxLayout *message_and_logo = new QHBoxLayout;
 
-    message_and_logo->addLayout (message_layout);
-    message_and_logo->addStretch (10);
-    message_and_logo->addWidget (logo, 0, Qt::AlignTop);
+  message_and_logo->addLayout (message_layout);
+  message_and_logo->addStretch (10);
+  message_and_logo->addWidget (logo, 0, Qt::AlignTop);
 
-    QHBoxLayout *button_bar = new QHBoxLayout;
+  QHBoxLayout *button_bar = new QHBoxLayout;
 
-    button_bar->addStretch (10);
-    button_bar->addWidget (next);
-    button_bar->addWidget (cancel);
+  button_bar->addStretch (10);
+  button_bar->addWidget (next);
+  button_bar->addWidget (cancel);
 
-    QVBoxLayout *page_layout = new QVBoxLayout (this);
-    setLayout (page_layout);
+  QVBoxLayout *page_layout = new QVBoxLayout (this);
+  setLayout (page_layout);
 
-    page_layout->addLayout (message_and_logo);
-    page_layout->addStretch (10);
-    page_layout->addLayout (button_bar);
+  page_layout->addLayout (message_and_logo);
+  page_layout->addStretch (10);
+  page_layout->addLayout (button_bar);
 
-    next->setDefault (true);
-    next->setFocus ();
+  next->setDefault (true);
+  next->setFocus ();
 
-    connect (next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
-    connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
-  }
+  connect (next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
+  connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
+}
 
 
 
 setup_community_news::setup_community_news (welcome_wizard *wizard)
-    : QWidget (wizard),
-      title (new QLabel (tr ("Community News"), this)),
-      message (new QLabel (this)),
-      checkbox (new QCheckBox (this)),
-      checkbox_message (new QLabel (this)),
-      logo (make_octave_logo (this)),
-      previous (new QPushButton (tr ("Previous"), this)),
-      next (new QPushButton (tr ("Next"), this)),
-      cancel (new QPushButton (tr ("Cancel"), this))
-  {
-    QFont ft;
-    ft.setPointSize (20);
-    title->setFont (ft);
+  : QWidget (wizard),
+    title (new QLabel (tr ("Community News"), this)),
+    message (new QLabel (this)),
+    checkbox (new QCheckBox (this)),
+    checkbox_message (new QLabel (this)),
+    logo (make_octave_logo (this)),
+    previous (new QPushButton (tr ("Previous"), this)),
+    next (new QPushButton (tr ("Next"), this)),
+    cancel (new QPushButton (tr ("Cancel"), this))
+{
+  QFont ft;
+  ft.setPointSize (20);
+  title->setFont (ft);
 
-    message->setText
-      (tr ("<html><body>\n"
-           "<p>When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.\n"
-           "The check will happen at most once each day and news will only be displayed if there is something new since the last time you viewed the news.</p>\n"
-           "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu in the GUI, or by visiting\n"
-           "<a href=\"http://octave.org/community-news.html\">http://octave.org/community-news.html</a>.</p>\n"
-           "</body></html>"));
-    message->setWordWrap (true);
-    message->setMinimumWidth (400);
-    message->setOpenExternalLinks (true);
+  message->setText
+  (tr ("<html><body>\n"
+       "<p>When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.\n"
+       "The check will happen at most once each day and news will only be displayed if there is something new since the last time you viewed the news.</p>\n"
+       "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu in the GUI, or by visiting\n"
+       "<a href=\"http://octave.org/community-news.html\">http://octave.org/community-news.html</a>.</p>\n"
+       "</body></html>"));
+  message->setWordWrap (true);
+  message->setMinimumWidth (400);
+  message->setOpenExternalLinks (true);
 
-    QVBoxLayout *message_layout = new QVBoxLayout;
+  QVBoxLayout *message_layout = new QVBoxLayout;
 
-    message_layout->addWidget (title);
-    message_layout->addWidget (message);
+  message_layout->addWidget (title);
+  message_layout->addWidget (message);
 
-    QHBoxLayout *message_and_logo = new QHBoxLayout;
+  QHBoxLayout *message_and_logo = new QHBoxLayout;
 
-    message_and_logo->addLayout (message_layout);
-    message_and_logo->addStretch (10);
-    message_and_logo->addWidget (logo, 0, Qt::AlignTop);
+  message_and_logo->addLayout (message_layout);
+  message_and_logo->addStretch (10);
+  message_and_logo->addWidget (logo, 0, Qt::AlignTop);
 
-    QHBoxLayout *checkbox_layout = new QHBoxLayout;
+  QHBoxLayout *checkbox_layout = new QHBoxLayout;
 
-    checkbox->setCheckState (Qt::Checked);
+  checkbox->setCheckState (Qt::Checked);
 
-    checkbox_message->setText
-      (tr ("<html><head>\n"
-           "<style>\n"
-           "a:link { text-decoration: underline; color: #0000ff; }\n"
-           "</style>\n"
-           "<head/><body>\n"
-           "<p>Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.</p>\n"
-           "</body></html>"));
-    checkbox_message->setWordWrap (true);
-    checkbox_message->setOpenExternalLinks (true);
-    checkbox_message->setMinimumWidth (500);
+  checkbox_message->setText
+  (tr ("<html><head>\n"
+       "<style>\n"
+       "a:link { text-decoration: underline; color: #0000ff; }\n"
+       "</style>\n"
+       "<head/><body>\n"
+       "<p>Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.</p>\n"
+       "</body></html>"));
+  checkbox_message->setWordWrap (true);
+  checkbox_message->setOpenExternalLinks (true);
+  checkbox_message->setMinimumWidth (500);
 
-    checkbox_layout->addWidget (checkbox, 0, Qt::AlignTop);
-    checkbox_layout->addSpacing (20);
-    checkbox_layout->addWidget (checkbox_message, 0, Qt::AlignTop);
-    checkbox_layout->addStretch (10);
+  checkbox_layout->addWidget (checkbox, 0, Qt::AlignTop);
+  checkbox_layout->addSpacing (20);
+  checkbox_layout->addWidget (checkbox_message, 0, Qt::AlignTop);
+  checkbox_layout->addStretch (10);
 
-    QVBoxLayout *message_logo_and_checkbox = new QVBoxLayout;
+  QVBoxLayout *message_logo_and_checkbox = new QVBoxLayout;
 
-    message_logo_and_checkbox->addLayout (message_and_logo);
-    message_logo_and_checkbox->addSpacing (20);
-    message_logo_and_checkbox->addLayout (checkbox_layout);
+  message_logo_and_checkbox->addLayout (message_and_logo);
+  message_logo_and_checkbox->addSpacing (20);
+  message_logo_and_checkbox->addLayout (checkbox_layout);
 
-    QHBoxLayout *button_bar = new QHBoxLayout;
+  QHBoxLayout *button_bar = new QHBoxLayout;
 
-    button_bar->addStretch (10);
-    button_bar->addWidget (previous);
-    button_bar->addWidget (next);
-    button_bar->addWidget (cancel);
+  button_bar->addStretch (10);
+  button_bar->addWidget (previous);
+  button_bar->addWidget (next);
+  button_bar->addWidget (cancel);
 
-    QVBoxLayout *page_layout = new QVBoxLayout (this);
-    setLayout (page_layout);
+  QVBoxLayout *page_layout = new QVBoxLayout (this);
+  setLayout (page_layout);
 
-    page_layout->addLayout (message_logo_and_checkbox);
-    page_layout->addStretch (10);
-    page_layout->addLayout (button_bar);
+  page_layout->addLayout (message_logo_and_checkbox);
+  page_layout->addStretch (10);
+  page_layout->addLayout (button_bar);
 
-    next->setDefault (true);
-    next->setFocus ();
+  next->setDefault (true);
+  next->setFocus ();
 
-    connect (checkbox, SIGNAL (stateChanged (int)),
-             wizard, SLOT (handle_web_connect_option (int)));
+  connect (checkbox, SIGNAL (stateChanged (int)),
+           wizard, SLOT (handle_web_connect_option (int)));
 
-    connect (previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
-    connect (next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
-    connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
-  }
+  connect (previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
+  connect (next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
+  connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
+}
 
 
 final_page::final_page (welcome_wizard *wizard)
-    : QWidget (wizard),
-      title (new QLabel (tr ("Enjoy!"), this)),
-      message (new QLabel (this)),
-      logo (make_octave_logo (this)),
-      links (new QLabel (this)),
-      previous (new QPushButton (tr ("Previous"), this)),
-      finish (new QPushButton (tr ("Finish"), this)),
-      cancel (new QPushButton (tr ("Cancel"), this))
-  {
-    QFont ft;
-    ft.setPointSize (20);
-    title->setFont (ft);
+  : QWidget (wizard),
+    title (new QLabel (tr ("Enjoy!"), this)),
+    message (new QLabel (this)),
+    logo (make_octave_logo (this)),
+    links (new QLabel (this)),
+    previous (new QPushButton (tr ("Previous"), this)),
+    finish (new QPushButton (tr ("Finish"), this)),
+    cancel (new QPushButton (tr ("Cancel"), this))
+{
+  QFont ft;
+  ft.setPointSize (20);
+  title->setFont (ft);
 
-    message->setText
-      (tr ("<html><body>\n"
-           "<p>We hope you find Octave to be a useful tool.</p>\n"
-           "<p>If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other commnity-based support channels.\n"
-           "You can find more information about each of these by visiting <a href=\"http://octave.org/support.html\">http://octave.org/support.html</a> (opens in external browser).</p>\n"
-           "</body></html>"));
-    message->setWordWrap (true);
-    message->setMinimumWidth (400);
-    message->setOpenExternalLinks (true);
+  message->setText
+  (tr ("<html><body>\n"
+       "<p>We hope you find Octave to be a useful tool.</p>\n"
+       "<p>If you encounter problems, there are a number of ways to get help, including commercial support options, a mailing list, a wiki, and other community-based support channels.\n"
+       "You can find more information about each of these by visiting <a href=\"http://octave.org/support.html\">http://octave.org/support.html</a> (opens in external browser).</p>\n"
+       "</body></html>"));
+  message->setWordWrap (true);
+  message->setMinimumWidth (400);
+  message->setOpenExternalLinks (true);
 
-    QVBoxLayout *message_layout = new QVBoxLayout;
+  QVBoxLayout *message_layout = new QVBoxLayout;
 
-    message_layout->addWidget (title);
-    message_layout->addWidget (message);
+  message_layout->addWidget (title);
+  message_layout->addWidget (message);
 
-    QHBoxLayout *message_and_logo = new QHBoxLayout;
+  QHBoxLayout *message_and_logo = new QHBoxLayout;
 
-    message_and_logo->addLayout (message_layout);
-    message_and_logo->addStretch (10);
-    message_and_logo->addWidget (logo, 0, Qt::AlignTop);
+  message_and_logo->addLayout (message_layout);
+  message_and_logo->addStretch (10);
+  message_and_logo->addWidget (logo, 0, Qt::AlignTop);
 
-    links->setText
-      (tr ("<html><head>\n"
-           "<style>\n"
-           "a:link { text-decoration: underline; color: #0000ff; }\n"
-           "</style>\n"
-           "<head/><body>\n"
-           "<p>For more information about Octave:</p>\n"
-           "<ul>\n"
-           "<li>Visit <a href=\"http://octave.org\">http://octave.org</a> (opens in external browser)</li>\n"
-           "<li>Get the documentation online as <a href=\"http://www.gnu.org/software/octave/doc/interpreter/index.html\">html</a>- or <a href=\"http://www.gnu.org/software/octave/octave.pdf\">pdf</span></a>-document (opens in external browser)</li>\n"
-           "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
-           "</ul>\n"
-           "</body></html>"));
-    links->setWordWrap (true);
-    links->setOpenExternalLinks (true);
+  links->setText
+  (tr ("<html><head>\n"
+       "<style>\n"
+       "a:link { text-decoration: underline; color: #0000ff; }\n"
+       "</style>\n"
+       "<head/><body>\n"
+       "<p>For more information about Octave:</p>\n"
+       "<ul>\n"
+       "<li>Visit <a href=\"http://octave.org\">http://octave.org</a> (opens in external browser)</li>\n"
+       "<li>Get the documentation online as <a href=\"http://www.gnu.org/software/octave/doc/interpreter/index.html\">html</a>- or <a href=\"http://www.gnu.org/software/octave/octave.pdf\">pdf</span></a>-document (opens in external browser)</li>\n"
+       "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
+       "</ul>\n"
+       "</body></html>"));
+  links->setWordWrap (true);
+  links->setOpenExternalLinks (true);
 
-    QHBoxLayout *button_bar = new QHBoxLayout;
+  QHBoxLayout *button_bar = new QHBoxLayout;
 
-    button_bar->addStretch (10);
-    button_bar->addWidget (previous);
-    button_bar->addWidget (finish);
-    button_bar->addWidget (cancel);
+  button_bar->addStretch (10);
+  button_bar->addWidget (previous);
+  button_bar->addWidget (finish);
+  button_bar->addWidget (cancel);
 
-    QVBoxLayout *page_layout = new QVBoxLayout (this);
-    setLayout (page_layout);
+  QVBoxLayout *page_layout = new QVBoxLayout (this);
+  setLayout (page_layout);
 
-    page_layout->addLayout (message_and_logo);
-    page_layout->addSpacing (20);
-    page_layout->addWidget (links);
-    page_layout->addStretch (10);
-    page_layout->addLayout (button_bar);
+  page_layout->addLayout (message_and_logo);
+  page_layout->addSpacing (20);
+  page_layout->addWidget (links);
+  page_layout->addStretch (10);
+  page_layout->addLayout (button_bar);
 
-    finish->setDefault (true);
-    finish->setFocus ();
+  finish->setDefault (true);
+  finish->setFocus ();
 
-    connect (previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
-    connect (finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
-    connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
-  }
+  connect (previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
+  connect (finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
+  connect (cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
+}
 
 
 welcome_wizard::welcome_wizard (QWidget *p)
@@ -283,6 +288,11 @@
   setMinimumSize (QSize (600, 480));
 
   show_page ();
+
+#ifdef __WIN32__
+  // HACK to forceshow of dialog if started minimized
+  ShowWindow((HWND)winId(), SW_SHOWNORMAL);
+#endif
 }
 
 void
--- a/libgui/src/welcome-wizard.h
+++ b/libgui/src/welcome-wizard.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
--- a/libgui/src/workspace-model.cc
+++ b/libgui/src/workspace-model.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -39,7 +39,7 @@
   _columnNames.append (tr ("Class"));
   _columnNames.append (tr ("Dimension"));
   _columnNames.append (tr ("Value"));
-  _columnNames.append (tr ("Storage Class"));
+  _columnNames.append (tr ("Attribute"));
 
   for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++)
     _storage_class_colors.append (QColor (Qt::white));
@@ -141,7 +141,7 @@
 
       if (role == Qt::DisplayRole
           || (idx.column () == 0 && role == Qt::EditRole)
-          || (idx.column () == 0 && role == Qt::ToolTipRole) )
+          || (idx.column () == 0 && role == Qt::ToolTipRole))
         {
           switch (idx.column ())
             {
@@ -228,6 +228,7 @@
 
 void
 workspace_model::set_workspace (bool top_level,
+                                bool /* debug */,
                                 const QString& scopes,
                                 const QStringList& symbols,
                                 const QStringList& class_names,
@@ -244,8 +245,6 @@
   _complex_flags = complex_flags;
 
   update_table ();
-
-  emit model_changed ();
 }
 
 void
@@ -253,8 +252,6 @@
 {
   clear_data ();
   update_table ();
-
-  emit model_changed ();
 }
 
 void
--- a/libgui/src/workspace-model.h
+++ b/libgui/src/workspace-model.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -73,6 +73,7 @@
 public slots:
 
   void set_workspace (bool top_level,
+                      bool debug,
                       const QString& scopes,
                       const QStringList& symbols,
                       const QStringList& class_names,
--- a/libgui/src/workspace-view.cc
+++ b/libgui/src/workspace-view.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -35,9 +35,12 @@
 #include <QVBoxLayout>
 #include <QPushButton>
 #include <QMenu>
+#include <QLabel>
+#include <QCompleter>
 
 #include "workspace-view.h"
 #include "resource-manager.h"
+#include "symtab.h"
 
 workspace_view::workspace_view (QWidget *p)
   : octave_dock_widget (p), view (new QTableView (this))
@@ -47,8 +50,26 @@
   set_title (tr ("Workspace"));
   setStatusTip (tr ("View the variables in the active workspace."));
 
+  _filter = new QComboBox (this);
+  _filter->setToolTip (tr ("Enter text to filter the workspace"));
+  _filter->setEditable (true);
+  _filter->setMaxCount (MaxFilterHistory);
+  _filter->setInsertPolicy (QComboBox::NoInsert);
+  _filter->setSizeAdjustPolicy (
+    QComboBox::AdjustToMinimumContentsLengthWithIcon);
+  QSizePolicy sizePol (QSizePolicy::Expanding, QSizePolicy::Preferred);
+  _filter->setSizePolicy (sizePol);
+  _filter->completer ()->setCaseSensitivity (Qt::CaseSensitive);
+
+  QLabel *filter_label = new QLabel (tr ("Filter"));
+
+  _filter_checkbox = new QCheckBox ();
+
   view->setWordWrap (false);
   view->setContextMenuPolicy (Qt::CustomContextMenu);
+  view->setShowGrid (false);
+  (view->verticalHeader) ()->hide ();
+  view->setAlternatingRowColors (true);
   view_previous_row_count = 0;
 
   // Set an empty widget, so we can assign a layout to it.
@@ -56,6 +77,11 @@
 
   // Create a new layout and add widgets to it.
   QVBoxLayout *vbox_layout = new QVBoxLayout ();
+  QHBoxLayout *hbox_layout = new QHBoxLayout ();
+  hbox_layout->addWidget (filter_label);
+  hbox_layout->addWidget (_filter_checkbox);
+  hbox_layout->addWidget (_filter);
+  vbox_layout->addLayout (hbox_layout);
   vbox_layout->addWidget (view);
   vbox_layout->setMargin (2);
 
@@ -66,13 +92,34 @@
 
   QSettings *settings = resource_manager::get_settings ();
 
+  //enable sorting as previously configured
+  view->setSortingEnabled (true);
+  view->sortByColumn (
+    settings->value ("workspaceview/sort_by_column",0).toInt (),
+    static_cast<Qt::SortOrder>
+    (settings->value ("workspaceview/sort_order", Qt::AscendingOrder).toUInt ())
+  );
   // Initialize column order and width of the workspace
-
   view->horizontalHeader ()->restoreState (
     settings->value ("workspaceview/column_state").toByteArray ());
 
+  // Init state of the filter
+  _filter->addItems (settings->value ("workspaceview/mru_list").toStringList ());
+
+  bool filter_state =
+    settings->value ("workspaceview/filter_active", false).toBool ();
+  _filter_checkbox->setChecked (filter_state);
+  filter_activate (filter_state);
+
   // Connect signals and slots.
 
+  connect (_filter, SIGNAL (editTextChanged (const QString&)),
+           this, SLOT (filter_update (const QString&)));
+  connect (_filter_checkbox, SIGNAL (toggled (bool)),
+           this, SLOT (filter_activate (bool)));
+  connect (_filter->lineEdit (), SIGNAL (editingFinished ()),
+           this, SLOT (update_filter_history ()));
+
   connect (view, SIGNAL (customContextMenuRequested (const QPoint&)),
            this, SLOT (contextmenu_requested (const QPoint&)));
 
@@ -88,12 +135,29 @@
   settings->setValue ("workspaceview/column_state",
                       view->horizontalHeader ()->saveState ());
 
+  int sort_column = view->horizontalHeader ()->sortIndicatorSection ();
+  Qt::SortOrder sort_order = view->horizontalHeader ()->sortIndicatorOrder ();
+  settings->setValue ("workspaceview/sort_by_column", sort_column);
+  settings->setValue ("workspaceview/sort_order", sort_order);
+
+  settings->setValue ("workspaceview/filter_active",
+                      _filter_checkbox->isChecked ());
+
+  QStringList mru;
+  for (int i = 0; i < _filter->count (); i++)
+    mru.append (_filter->itemText (i));
+  settings->setValue ("workspaceview/mru_list", mru);
+
   settings->sync ();
 }
 
 void workspace_view::setModel (workspace_model *model)
 {
-  view->setModel (model);
+  _filter_model.setSourceModel (model);
+  _filter_model.setFilterKeyColumn(0);
+
+  view->setModel (&_filter_model);
+
   _model = model;
 }
 
@@ -105,28 +169,69 @@
 }
 
 void
+workspace_view::filter_update (const QString& expression)
+{
+  _filter_model.setFilterWildcard (expression);
+  handle_model_changed ();
+}
+
+void
+workspace_view::filter_activate (bool state)
+{
+  _filter->setEnabled (state);
+  _filter_model.setDynamicSortFilter (state);
+
+  if (state)
+    filter_update (_filter->currentText ());
+  else
+    filter_update (QString ());
+}
+
+void
+workspace_view::update_filter_history ()
+{
+  QString text = _filter->currentText ();   // get current text
+  int index = _filter->findText (text);     // and its actual index
+
+  if (index > -1)
+    _filter->removeItem (index);    // remove if already existing
+
+  _filter->insertItem (0, text);    // (re)insert at beginning
+  _filter->setCurrentIndex (0);
+}
+
+QString
+workspace_view::get_var_name (QModelIndex index)
+{
+  index = index.sibling (index.row (), 0);
+  QAbstractItemModel *m = view->model ();
+  QMap<int, QVariant> item_data = m->itemData (index);
+
+  return item_data[0].toString ();
+}
+
+void
 workspace_view::contextmenu_requested (const QPoint& qpos)
 {
   QMenu menu (this);
 
   QModelIndex index = view->indexAt (qpos);
-  QAbstractItemModel *m = view->model ();
 
   // if it isnt Local, Glocal etc, allow the ctx menu
   if (index.isValid () && index.column () == 0)
     {
-      index = index.sibling (index.row (), 0);
-
-      QMap<int, QVariant> item_data = m->itemData (index);
+      QString var_name = get_var_name (index);
 
-      QString var_name = item_data[0].toString ();
+      menu.addAction (tr ("Copy name"), this,
+                      SLOT (handle_contextmenu_copy ()));
 
-      menu.addAction (tr ("Copy"), this,
-                      SLOT (handle_contextmenu_copy ()));
+      menu.addAction (tr ("Copy value"), this,
+                      SLOT (handle_contextmenu_copy_value ()));
 
       QAction *rename = menu.addAction (tr ("Rename"), this,
                                         SLOT (handle_contextmenu_rename ()));
 
+      QAbstractItemModel *m = view->model ();
       const workspace_model *wm = static_cast<const workspace_model *> (m);
 
       if (! wm->is_top_level ())
@@ -157,13 +262,7 @@
 
   if (index.isValid ())
     {
-      index = index.sibling (index.row (), 0);
-
-      QAbstractItemModel *m = view->model ();
-
-      QMap<int, QVariant> item_data = m->itemData (index);
-
-      QString var_name = item_data[0].toString ();
+      QString var_name = get_var_name (index);
 
       QClipboard *clipboard = QApplication::clipboard ();
 
@@ -172,19 +271,31 @@
 }
 
 void
+workspace_view::handle_contextmenu_copy_value (void)
+{
+  QModelIndex index = view->currentIndex ();
+
+  if (index.isValid ())
+    {
+      QString var_name = get_var_name (index);
+
+      octave_value val = symbol_table::varval (var_name.toStdString ());
+      std::ostringstream buf;
+      val.print_raw (buf, true);
+
+      QClipboard *clipboard = QApplication::clipboard ();
+      clipboard->setText (QString::fromStdString (buf.str ()));
+    }
+}
+
+void
 workspace_view::handle_contextmenu_rename (void)
 {
   QModelIndex index = view->currentIndex ();
 
   if (index.isValid ())
     {
-      index = index.sibling (index.row (), 0);
-
-      QAbstractItemModel *m = view->model ();
-
-      QMap<int, QVariant> item_data = m->itemData (index);
-
-      QString var_name = item_data[0].toString ();
+      QString var_name = get_var_name (index);
 
       QInputDialog* inputDialog = new QInputDialog ();
 
@@ -197,7 +308,10 @@
                                  QLineEdit::Normal, var_name, &ok);
 
       if (ok && ! new_name.isEmpty ())
-        m->setData (index, new_name, Qt::EditRole);
+        {
+          QAbstractItemModel *m = view->model ();
+          m->setData (index, new_name, Qt::EditRole);
+        }
     }
 }
 
@@ -226,13 +340,7 @@
 
   if (index.isValid ())
     {
-      index = index.sibling (index.row (), 0);
-
-      QAbstractItemModel *m = view->model ();
-
-      QMap<int, QVariant> item_data = m->itemData (index);
-
-      QString var_name = item_data[0].toString ();
+      QString var_name = get_var_name (index);
 
       emit command_requested (cmdname + " (" + var_name + ");");
     }
@@ -241,11 +349,12 @@
 void
 workspace_view::handle_model_changed (void)
 {
+//  view->resizeRowsToContents ();
   // Just modify those rows that have been added rather than go through
   // the whole list.  For-loop test will handle when number of rows reduced.
   QFontMetrics fm = view->fontMetrics ();
   int row_height =  fm.height ();
-  int new_row_count = view->model ()->rowCount ();
+  int new_row_count = _filter_model.rowCount ();
   for (int i = view_previous_row_count; i < new_row_count; i++)
     view->setRowHeight (i, row_height);
   view_previous_row_count = new_row_count;
@@ -257,16 +366,22 @@
   _model->notice_settings (settings); // update colors of model first
 
   QString tool_tip;
-  tool_tip  = QString (tr ("View the variables in the active workspace.<br>"));
-  tool_tip += QString (tr ("Colors for the storage class:"));
-  for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++)
+
+  if (!settings->value ("workspaceview/hide_tool_tips",false).toBool ())
     {
-      tool_tip +=
-        QString ("<div style=\"background-color:%1;color:#000000\">%2</div>")
-        .arg (_model->storage_class_color (i).name ())
-        .arg (resource_manager::storage_class_names ().at (i));
+      tool_tip  = QString (tr ("View the variables in the active workspace.<br>"));
+      tool_tip += QString (tr ("Colors for variable attributes:"));
+      for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++)
+        {
+          tool_tip +=
+            QString ("<div style=\"background-color:%1;color:#000000\">%2</div>")
+            .arg (_model->storage_class_color (i).name ())
+            .arg (resource_manager::storage_class_names ().at (i));
+        }
     }
+
   setToolTip (tool_tip);
+
 }
 
 void
@@ -276,3 +391,10 @@
     handle_contextmenu_copy ();
 }
 
+void
+workspace_view::selectAll ()
+{
+  if (view->hasFocus ())
+    view->selectAll ();
+}
+
--- a/libgui/src/workspace-view.h
+++ b/libgui/src/workspace-view.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
 
 This file is part of Octave.
 
@@ -27,6 +27,9 @@
 #include <QItemDelegate>
 #include <QTableView>
 #include <QSemaphore>
+#include <QComboBox>
+#include <QSortFilterProxyModel>
+#include <QCheckBox>
 
 #include "octave-dock-widget.h"
 #include "workspace-model.h"
@@ -62,6 +65,7 @@
 
   // context menu slots
   void handle_contextmenu_copy (void);
+  void handle_contextmenu_copy_value (void);
   void handle_contextmenu_rename (void);
   void handle_contextmenu_disp (void);
   void handle_contextmenu_plot (void);
@@ -70,14 +74,25 @@
   void handle_model_changed (void);
 
   void copyClipboard ();
+  void selectAll ();
+
+  void filter_update (const QString& expression);
+  void filter_activate (bool enable);
+  void update_filter_history ();
 
 private:
 
   void relay_contextmenu_command (const QString& cmdname);
 
+  QString get_var_name (QModelIndex index);
   QTableView *view;
   int view_previous_row_count;
   workspace_model *_model;
+
+  QSortFilterProxyModel _filter_model;
+  QCheckBox *_filter_checkbox;
+  QComboBox *_filter;
+  enum { MaxFilterHistory = 10 };
 };
 
 #endif
--- a/libinterp/Makefile.am
+++ b/libinterp/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's libinterp directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -32,7 +32,8 @@
   -I$(srcdir)/operators \
   -Iparse-tree -I$(srcdir)/parse-tree \
   -Icorefcn -I$(srcdir)/corefcn \
-  -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu
+  -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu \
+  $(HDF5_CPPFLAGS)
 
 AM_CFLAGS += $(WARN_CFLAGS)
 
@@ -40,35 +41,48 @@
 
 octlib_LTLIBRARIES = liboctinterp.la
 
-## Order matters here.  Leave builtins.cc last, because it depends on
-## $(DEF_FILES), and building those requires all the sources
-## (except builtins.cc) to be available.
-BUILT_SOURCES = \
-  corefcn/mxarray.h \
-  corefcn/oct-errno.cc \
+## This is the subset of $(BUILT_SOURCES) that may be included by source
+## files that are preprocessed to make $(DEF_FILES).  This ensures that
+## files in $(BUILT_SOURCES) are built in the right dependency order.
+GENERATED_MAKE_BUILTINS_INCS = \
   corefcn/defaults.h \
   corefcn/graphics-props.cc \
   corefcn/graphics.h \
+  corefcn/mxarray.h \
+  oct-conf-features.h \
+  oct-conf.h \
+  parse-tree/oct-gperf.h \
+  parse-tree/oct-parse.h \
+  version.h
+
+BUILT_SOURCES = \
+  $(GENERATED_MAKE_BUILTINS_INCS) \
+  builtin-defun-decls.h \
+  builtins.cc \
+  corefcn/oct-errno.cc \
   corefcn/oct-tex-lexer.cc \
   corefcn/oct-tex-parser.cc \
   corefcn/oct-tex-symbols.cc \
   operators/ops.cc \
   parse-tree/lex.cc \
-  parse-tree/oct-gperf.h \
-  parse-tree/oct-parse.cc \
-  oct-conf.h \
-  oct-conf-features.h \
-  version.h \
-  builtin-defun-decls.h \
-  builtins.cc
+  parse-tree/oct-parse.cc
+
+ULT_PARSER_SRC := \
+  corefcn/oct-tex-lexer.in.ll \
+  corefcn/oct-tex-parser.in.yy \
+  parse-tree/oct-parse.in.yy
+
+GENERATED_PARSER_FILES := \
+  corefcn/oct-tex-lexer.ll \
+  corefcn/oct-tex-parser.yy \
+  parse-tree/oct-parse.yy
 
 BUILT_DISTFILES = \
-  corefcn/oct-tex-lexer.ll \
+  $(GENERATED_PARSER_FILES) \
   corefcn/oct-tex-parser.h \
   corefcn/oct-tex-symbols.cc \
   parse-tree/oct-gperf.h \
-  parse-tree/oct-parse.h \
-  parse-tree/oct-parse.yy
+  parse-tree/oct-parse.h
 
 ## Files that are created during build process and installed,
 ## BUT not distributed in tarball.
@@ -146,11 +160,9 @@
 
 if AMCOND_ENABLE_DYNAMIC_LINKING
   OCT_FILES = $(DLDFCN_LIBS:.la=.oct)
-  OCT_STAMP_FILES = $(subst dldfcn/,dldfcn/$(am__leading_dot),$(DLDFCN_LIBS:.la=.oct-stamp))
   DLD_LIBOCTINTERP_LIBADD = liboctinterp.la
 else
   OCT_FILES =
-  OCT_STAMP_FILES =
   DLD_LIBOCTINTERP_LIBADD =
 endif
 
@@ -187,7 +199,7 @@
   $(LIBOCTINTERP_LINK_DEPS)
 
 # Increment these as needed and according to the rules in the libtool manual:
-liboctinterp_current = 2
+liboctinterp_current = 3
 liboctinterp_revision = 0
 liboctinterp_age = 0
 
@@ -202,7 +214,7 @@
 ## Section for defining and creating DEF_FILES
 
 ULT_DIST_SRC := \
-  $(filter-out corefcn/oct-tex-lexer.ll parse-tree/oct-parse.yy, $(DIST_SRC)) corefcn/oct-tex-lexer.in.ll parse-tree/oct-parse.in.yy
+  $(filter-out $(GENERATED_PARSER_FILES), $(DIST_SRC)) $(ULT_PARSER_SRC)
 
 SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(ULT_DIST_SRC))
 
@@ -230,13 +242,15 @@
 ## Rule to build a DEF file from a .cc file
 ## See also module.mk files for overrides when speciall CPPFLAGS are needed.
 ## FIXME: Shouldn't the build stop if CPP fails here?  Yes (10/31/2013)
-%.df: %.cc
+%.df: %.cc $(GENERATED_MAKE_BUILTINS_INCS)
+	$(AM_V_GEN)rm -f $@-t $@-t1 $@ && \
 	$(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	  $(AM_CPPFLAGS) $(LLVM_CPPFLAGS) $(CPPFLAGS) \
 	  $(AM_CXXFLAGS) $(CXXFLAGS) \
-	  -DMAKE_BUILTINS $< > $@-t
-	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@
-	rm $@-t
+	  -DMAKE_BUILTINS $< > $@-t1 && \
+	$(srcdir)/mkdefs $(srcdir) $< < $@-t1 > $@-t && \
+	mv $@-t $@ && \
+	rm -f $@-t1
 
 ## Rules to build test files
 
@@ -262,13 +276,15 @@
 ## However, calling configure will also regenerate the Makefiles from
 ## Makefile.am and trigger the rules below.
 oct-conf.h: oct-conf.in.h Makefile
-	@$(do_subst_config_vals)
+	$(AM_V_GEN)$(do_subst_config_vals)
 
 oct-conf-features.h: $(top_builddir)/config.h config-features.sh
-	$(srcdir)/config-features.sh $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/config-features.sh $< > $@-t && \
 	mv $@-t $@
 
 version.h: version.in.h Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(SED) < $< \
 	  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
 	  -e "s|%OCTAVE_API_VERSION%|\"${OCTAVE_API_VERSION}\"|" \
@@ -277,39 +293,43 @@
           -e "s|%OCTAVE_MINOR_VERSION%|${OCTAVE_MINOR_VERSION}|" \
           -e "s|%OCTAVE_PATCH_VERSION%|${OCTAVE_PATCH_VERSION}|" \
 	  -e "s|%OCTAVE_RELEASE_DATE%|\"${OCTAVE_RELEASE_DATE}\"|" \
-	  -e "s|%OCTAVE_VERSION%|\"${OCTAVE_VERSION}\"|" > $@-t
+	  -e "s|%OCTAVE_VERSION%|\"${OCTAVE_VERSION}\"|" > $@-t && \
 	mv $@-t $@
 
 builtins.cc: $(DEF_FILES) mkbuiltins
-	$(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t && \
 	mv $@-t $@
 
 builtin-defun-decls.h: $(SRC_DEF_FILES) mkbuiltins
-	$(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t && \
 	mv $@-t $@
 
 if AMCOND_ENABLE_DYNAMIC_LINKING
 DLDFCN_PKG_ADD_FILE = dldfcn/PKG_ADD
 
 dldfcn/PKG_ADD: $(DLDFCN_DEF_FILES) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(DLDFCN_DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(DLDFCN_DEF_FILES) > $@-t && \
 	mv $@-t $@
 endif
 
 if AMCOND_BUILD_DOCS
 .DOCSTRINGS: $(ALL_DEF_FILES) gendoc.pl
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
 		cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
 		touch -r $(srcdir)/DOCSTRINGS DOCSTRINGS; \
-	fi
-	@echo "creating .DOCSTRINGS from .cc source files"
-	@$(PERL) $(srcdir)/gendoc.pl $(ALL_DEF_FILES) > $@
-	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS
+	fi && \
+	$(PERL) $(srcdir)/gendoc.pl $(ALL_DEF_FILES) > $@-t && \
+	mv $@-t $@ && \
+	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS && \
 	touch $@
 
-all-local: $(OCT_STAMP_FILES) $(DLDFCN_PKG_ADD_FILE) .DOCSTRINGS
+all-local: $(OCT_FILES) $(DLDFCN_PKG_ADD_FILE) .DOCSTRINGS
 else
-all-local: $(OCT_STAMP_FILES) $(DLDFCN_PKG_ADD_FILE)
+all-local: $(OCT_FILES) $(DLDFCN_PKG_ADD_FILE)
 endif
 
 if AMCOND_BUILD_DOCS
@@ -371,7 +391,6 @@
   DOCSTRINGS \
   $(BUILT_NODISTFILES) \
   $(OCT_FILES) \
-  $(OCT_STAMP_FILES) \
   $(TST_FILES)
 
 MAINTAINERCLEANFILES = \
--- a/libinterp/builtins.h
+++ b/libinterp/builtins.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/Cell.cc
+++ b/libinterp/corefcn/Cell.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -212,6 +212,12 @@
   return retval;
 }
 
+/*
+%!test
+%! a = {"foo", "bar"};
+%! assert (a(), a)
+*/
+
 void
 Cell::assign (const octave_value_list& idx_arg, const Cell& rhs,
               const octave_value& fill_val)
@@ -248,6 +254,12 @@
   return -1;
 }
 
+/*
+%!error <wrong type argument 'cell array'> nnz ({0, 1, 2})
+%!error <wrong type argument 'cell array'> nnz (cell ())
+%!error <wrong type argument 'cell array'> nnz ({"foo", "bar"})
+*/
+
 Cell
 Cell::column (octave_idx_type i) const
 {
--- a/libinterp/corefcn/Cell.h
+++ b/libinterp/corefcn/Cell.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -27,7 +27,6 @@
 #include <string>
 
 #include "Array.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 #include "ov.h"
 
--- a/libinterp/corefcn/__contourc__.cc
+++ b/libinterp/corefcn/__contourc__.cc
@@ -1,6 +1,6 @@
 /* Contour lines for function evaluated on a grid.
 
-Copyright (C) 2007-2013 Kai Habel
+Copyright (C) 2007-2015 Kai Habel
 Copyright (C) 2004, 2007 Shai Ayal
 
 Adapted to an oct file from the stand alone contourl by Victro Munoz
@@ -307,10 +307,10 @@
 
   if (args.length () == 4)
     {
-      RowVector X = args (0).row_vector_value ();
-      RowVector Y = args (1).row_vector_value ();
-      Matrix Z = args (2).matrix_value ();
-      RowVector L = args (3).row_vector_value ();
+      RowVector X = args(0).row_vector_value ();
+      RowVector Y = args(1).row_vector_value ();
+      Matrix Z = args(2).matrix_value ();
+      RowVector L = args(3).row_vector_value ();
 
       if (! error_state)
         {
--- a/libinterp/corefcn/__dispatch__.cc
+++ b/libinterp/corefcn/__dispatch__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 John W. Eaton and Paul Kienzle
+Copyright (C) 2001-2015 John W. Eaton and Paul Kienzle
 
 This file is part of Octave.
 
rename from libinterp/dldfcn/__dsearchn__.cc
rename to libinterp/corefcn/__dsearchn__.cc
--- a/libinterp/dldfcn/__dsearchn__.cc
+++ b/libinterp/corefcn/__dsearchn__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 
 This file is part of Octave.
 
@@ -30,13 +30,13 @@
 
 #include "lo-math.h"
 
-#include "defun-dld.h"
+#include "defun.h"
 #include "error.h"
 #include "oct-obj.h"
 
-DEFUN_DLD (__dsearchn__, args, ,
-           "-*- texinfo -*-\n\
-@deftypefn {Loadable Function} {[@var{idx}, @var{d}] =} dsearch (@var{x}, @var{xi})\n\
+DEFUN (__dsearchn__, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {[@var{idx}, @var{d}] =} dsearch (@var{x}, @var{xi})\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/__ichol__.cc
@@ -0,0 +1,519 @@
+/*
+
+Copyright (C) 2014-2015 Eduardo Ramos Fernández <eduradical951@gmail.com>
+Copyright (C) 2013-2015 Kai T. Ohlhus <k.ohlhus@gmail.com>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "oct-locbuf.h"
+
+#include "defun.h"
+#include "error.h"
+#include "parse.h"
+
+// Secondary functions for complex and real case used in ichol algorithms.
+Complex ichol_mult_complex (Complex a, Complex b)
+{
+#if defined (HAVE_CXX_COMPLEX_SETTERS)
+  b.imag (-std::imag (b));
+#elif defined (HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS)
+  b.imag () = -std::imag (b);
+#else
+  b = std::conj (b);
+#endif
+  return a * b;
+}
+
+double ichol_mult_real (double a, double b)
+{
+  return a * b;
+}
+
+bool ichol_checkpivot_complex (Complex pivot)
+{
+  if (pivot.imag () != 0)
+    {
+      error ("ichol: non-real pivot encountered.  The matrix must be hermitian.");
+      return false;
+    }
+  else if (pivot.real () < 0)
+    {
+      error ("ichol: negative pivot encountered");
+      return false;
+    }
+  return true;
+}
+
+bool ichol_checkpivot_real (double pivot)
+{
+  if (pivot < 0)
+    {
+      error ("ichol: negative pivot encountered");
+      return false;
+    }
+  return true;
+}
+
+template <typename octave_matrix_t, typename T, T (*ichol_mult) (T, T),
+          bool (*ichol_checkpivot) (T)>
+void ichol_0 (octave_matrix_t& sm, const std::string michol = "off")
+{
+
+  const octave_idx_type n = sm.cols ();
+  octave_idx_type j1, jend, j2, jrow, jjrow, j, jw, i, k, jj, r;
+  T tl;
+  char opt;
+  enum {OFF, ON};
+  if (michol == "on")
+    opt = ON;
+  else
+    opt = OFF;
+
+  // Input matrix pointers
+  octave_idx_type* cidx = sm.cidx ();
+  octave_idx_type* ridx = sm.ridx ();
+  T* data = sm.data ();
+
+  // Working arrays
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Lfirst, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Llist, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, iw, n);
+  OCTAVE_LOCAL_BUFFER (T, dropsums, n);
+
+  // Initialize working arrays
+  for (i = 0; i < n; i++)
+    {
+      iw[i] = -1;
+      Llist[i] = -1;
+      Lfirst[i] = -1;
+      dropsums[i] = 0;
+    }
+
+  // Main loop
+  for (k = 0; k < n; k++)
+    {
+      j1 = cidx[k];
+      j2 = cidx[k+1];
+      for (j = j1; j < j2; j++)
+        iw[ridx[j]] = j;
+
+      jrow = Llist [k];
+      // Iterate over each non-zero element in the actual row.
+      while (jrow != -1)
+        {
+          jjrow = Lfirst[jrow];
+          jend = cidx[jrow+1];
+          for (jj = jjrow; jj < jend; jj++)
+            {
+              r = ridx[jj];
+              jw = iw[r];
+              tl = ichol_mult (data[jj], data[jjrow]);
+              if (jw != -1)
+                data[jw] -= tl;
+              else
+                // Because of the symmetry of the matrix, we know
+                // the drops in the column r are also in the column k.
+                if (opt == ON)
+                  {
+                    dropsums[r] -= tl;
+                    dropsums[k] -= tl;
+                  }
+            }
+          // Update the linked list and the first entry of the actual column.
+          if ((jjrow + 1) < jend)
+            {
+              Lfirst[jrow]++;
+              j = jrow;
+              jrow = Llist[jrow];
+              Llist[j] = Llist[ridx[Lfirst[j]]];
+              Llist[ridx[Lfirst[j]]] = j;
+            }
+          else
+            jrow = Llist[jrow];
+        }
+
+      if (opt == ON)
+        data[j1] += dropsums[k];
+
+      if (ridx[j1] != k)
+        {
+          error ("ichol: encountered a pivot equal to 0");
+          break;
+        }
+
+      if (! ichol_checkpivot (data[j1]))
+        break;
+
+      data[cidx[k]] = std::sqrt (data[j1]);
+
+      // Update Llist and Lfirst with the k-column information.  Also,
+      // scale the column elements by the pivot and reset the working array iw.
+      if (k < (n - 1))
+        {
+          iw[ridx[j1]] = -1;
+          for (i = j1 + 1; i < j2; i++)
+            {
+              iw[ridx[i]] = -1;
+              data[i] /= data[j1];
+            }
+          Lfirst[k] = j1;
+          if ((Lfirst[k] + 1) < j2)
+            {
+              Lfirst[k]++;
+              jjrow = ridx[Lfirst[k]];
+              Llist[k] = Llist[jjrow];
+              Llist[jjrow] = k;
+            }
+        }
+    }
+}
+
+DEFUN (__ichol0__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{L} =} __ichol0__ (@var{A})\n\
+@deftypefnx {Built-in Function} {@var{L} =} __ichol0__ (@var{A}, @var{michol})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+  std::string michol = "off";
+
+  if (nargout > 1 || nargin < 1 || nargin > 2)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  if (nargin == 2)
+    michol = args(1).string_value ();
+
+  // In ICHOL0 algorithm the zero-pattern of the input matrix is preserved
+  // so it's structure does not change during the algorithm.  The same input
+  // matrix is used to build the output matrix due to that fact.
+  octave_value_list param_list;
+  if (!args(0).is_complex_type ())
+    {
+      SparseMatrix sm = args(0).sparse_matrix_value ();
+      param_list.append (sm);
+      sm = feval ("tril", param_list)(0).sparse_matrix_value ();
+      ichol_0 <SparseMatrix, double, ichol_mult_real,
+               ichol_checkpivot_real> (sm, michol);
+      if (! error_state)
+        retval(0) = sm;
+    }
+  else
+    {
+      SparseComplexMatrix sm = args(0).sparse_complex_matrix_value ();
+      param_list.append (sm);
+      sm = feval ("tril", param_list)(0).sparse_complex_matrix_value ();
+      ichol_0 <SparseComplexMatrix, Complex, ichol_mult_complex,
+               ichol_checkpivot_complex> (sm, michol);
+      if (! error_state)
+        retval(0) = sm;
+    }
+
+  return retval;
+}
+
+template <typename octave_matrix_t, typename T,  T (*ichol_mult) (T, T),
+          bool (*ichol_checkpivot) (T)>
+void ichol_t (const octave_matrix_t& sm, octave_matrix_t& L, const T* cols_norm,
+              const T droptol, const std::string michol = "off")
+
+{
+
+  const octave_idx_type n = sm.cols ();
+  octave_idx_type j, jrow, jend, jjrow, i, k, jj, total_len,
+                  w_len, max_len, ind;
+  char opt;
+  enum {OFF, ON};
+  if (michol == "on")
+    opt = ON;
+  else
+    opt = OFF;
+
+  // Input matrix pointers
+  octave_idx_type* cidx = sm.cidx ();
+  octave_idx_type* ridx = sm.ridx ();
+  T* data = sm.data ();
+
+  // Output matrix data structures.  Because the final zero pattern pattern of
+  // the output matrix is not known due to fill-in elements, a heuristic
+  // approach has been adopted for memory allocation.  The size of ridx_out_l
+  // and data_out_l is incremented 10% of their actual size (nnz (A) in the
+  // beginning).  If that amount is less than n, their size is just incremented
+  // in n elements.  This way the number of reallocations decreases throughout
+  // the process, obtaining a good performance.
+  max_len = sm.nnz ();
+  max_len += (0.1 * max_len) > n ? 0.1 * max_len : n;
+  Array <octave_idx_type> cidx_out_l (dim_vector (n + 1, 1));
+  octave_idx_type* cidx_l = cidx_out_l.fortran_vec ();
+  Array <octave_idx_type> ridx_out_l (dim_vector (max_len ,1));
+  octave_idx_type* ridx_l = ridx_out_l.fortran_vec ();
+  Array <T> data_out_l (dim_vector (max_len, 1));
+  T* data_l = data_out_l.fortran_vec ();
+
+  // Working arrays
+  OCTAVE_LOCAL_BUFFER (T, w_data, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Lfirst, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Llist, n);
+  OCTAVE_LOCAL_BUFFER (T, col_drops, n);
+  std::vector <octave_idx_type> vec;
+  vec.resize (n);
+
+  T zero = T (0);
+  cidx_l[0] = cidx[0];
+  for (i = 0; i < n; i++)
+    {
+      Llist[i] = -1;
+      Lfirst[i] = -1;
+      w_data[i] = 0;
+      col_drops[i] = zero;
+      vec[i] = 0;
+    }
+
+  total_len = 0;
+  for (k = 0; k < n; k++)
+    {
+      ind = 0;
+      for (j = cidx[k]; j < cidx[k+1]; j++)
+        {
+          w_data[ridx[j]] = data[j];
+          if (ridx[j] != k)
+            {
+              vec[ind] = ridx[j];
+              ind++;
+            }
+        }
+      jrow = Llist[k];
+      while (jrow != -1)
+        {
+          jjrow = Lfirst[jrow];
+          jend = cidx_l[jrow+1];
+          for (jj = jjrow; jj < jend; jj++)
+            {
+              j = ridx_l[jj];
+              // If the element in the j position of the row is zero,
+              // then it will become non-zero, so we add it to the
+              // vector that tracks non-zero elements in the working row.
+              if (w_data[j] == zero)
+                {
+                  vec[ind] = j;
+                  ind++;
+                }
+              w_data[j] -=  ichol_mult (data_l[jj], data_l[jjrow]);
+            }
+          // Update the actual column first element and
+          // update the linked list of the jrow row.
+          if ((jjrow + 1) < jend)
+            {
+              Lfirst[jrow]++;
+              j = jrow;
+              jrow = Llist[jrow];
+              Llist[j] = Llist[ridx_l[Lfirst[j]]];
+              Llist[ridx_l[Lfirst[j]]] = j;
+            }
+          else
+            jrow = Llist[jrow];
+        }
+
+      // Resizing output arrays
+      if ((max_len - total_len) < n)
+        {
+          max_len += (0.1 * max_len) > n ? 0.1 * max_len : n;
+          data_out_l.resize (dim_vector (max_len, 1));
+          data_l = data_out_l.fortran_vec ();
+          ridx_out_l.resize (dim_vector (max_len, 1));
+          ridx_l = ridx_out_l.fortran_vec ();
+        }
+
+      // The sorting of the non-zero elements of the working column can be
+      // handled in a couple of ways.  The most efficient two I found, are
+      // keeping the elements in an ordered binary search tree dynamically or
+      // keep them unsorted in a vector and at the end of the outer iteration
+      // order them.  The last approach exhibits lower execution times.
+      std::sort (vec.begin (), vec.begin () + ind);
+
+      data_l[total_len] = w_data[k];
+      ridx_l[total_len] = k;
+      w_len = 1;
+
+      // Extract the non-zero elements of working column and
+      // drop the elements that are lower than droptol * cols_norm[k].
+      for (i = 0; i < ind ; i++)
+        {
+          jrow = vec[i];
+          if (w_data[jrow] != zero)
+            {
+              if (std::abs (w_data[jrow]) < (droptol * cols_norm[k]))
+                {
+                  if (opt == ON)
+                    {
+                      col_drops[k] += w_data[jrow];
+                      col_drops[jrow] += w_data[jrow];
+                    }
+                }
+              else
+                {
+                  data_l[total_len + w_len] = w_data[jrow];
+                  ridx_l[total_len + w_len] = jrow;
+                  w_len++;
+                }
+              vec[i] = 0;
+            }
+          w_data[jrow] = zero;
+        }
+
+      // Compensate column sums --> michol option
+      if (opt == ON)
+        data_l[total_len] += col_drops[k];
+
+      if (data_l[total_len] == zero)
+        {
+          error ("ichol: encountered a pivot equal to 0");
+          break;
+        }
+      else if (! ichol_checkpivot (data_l[total_len]))
+        break;
+
+      // Once elements are dropped and compensation of column sums are done,
+      // scale the elements by the pivot.
+      data_l[total_len] = std::sqrt (data_l[total_len]);
+      for (jj = total_len + 1; jj < (total_len + w_len); jj++)
+        data_l[jj] /=  data_l[total_len];
+      total_len += w_len;
+      // Check if there are too many elements to be indexed with
+      // octave_idx_type type due to fill-in during the process.
+      if (total_len < 0)
+        {
+          error ("ichol: integer overflow.  Too many fill-in elements in L");
+          break;
+        }
+      cidx_l[k+1] = cidx_l[k] - cidx_l[0] + w_len;
+
+      // Update Llist and Lfirst with the k-column information.
+      if (k < (n - 1))
+        {
+          Lfirst[k] = cidx_l[k];
+          if ((Lfirst[k] + 1) < cidx_l[k+1])
+            {
+              Lfirst[k]++;
+              jjrow = ridx_l[Lfirst[k]];
+              Llist[k] = Llist[jjrow];
+              Llist[jjrow] = k;
+            }
+        }
+    }
+
+  if (! error_state)
+    {
+      // Build the output matrices
+      L = octave_matrix_t (n, n, total_len);
+      for (i = 0; i <= n; i++)
+        L.cidx (i) = cidx_l[i];
+      for (i = 0; i < total_len; i++)
+        {
+          L.ridx (i) = ridx_l[i];
+          L.data (i) = data_l[i];
+        }
+    }
+}
+
+DEFUN (__icholt__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{L} =} __icholt__ (@var{A})\n\
+@deftypefnx {Built-in Function} {@var{L} =} __icholt__ (@var{A}, @var{droptol})\n\
+@deftypefnx {Built-in Function} {@var{L} =} __icholt__ (@var{A}, @var{droptol}, @var{michol})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+  int nargin = args.length ();
+  // Default values of parameters
+  std::string michol = "off";
+  double droptol = 0;
+
+  if (nargout > 1 || nargin < 1 || nargin > 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  // Don't repeat input validation of arguments done in ichol.m
+
+  if (nargin >= 2)
+    droptol = args(1).double_value ();
+
+  if (nargin == 3)
+    michol = args(2).string_value ();
+
+  octave_value_list param_list;
+  if (! args(0).is_complex_type ())
+    {
+      Array <double> cols_norm;
+      SparseMatrix L;
+      param_list.append (args(0).sparse_matrix_value ());
+      SparseMatrix sm_l =
+        feval ("tril", param_list)(0).sparse_matrix_value ();
+      param_list(0) = sm_l;
+      param_list(1) = 1;
+      param_list(2) = "cols";
+      cols_norm = feval ("norm", param_list)(0).vector_value ();
+      param_list.clear ();
+      ichol_t <SparseMatrix,
+               double, ichol_mult_real, ichol_checkpivot_real>
+               (sm_l, L, cols_norm.fortran_vec (), droptol, michol);
+      if (! error_state)
+        retval(0) = L;
+    }
+  else
+    {
+      Array <Complex> cols_norm;
+      SparseComplexMatrix L;
+      param_list.append (args(0).sparse_complex_matrix_value ());
+      SparseComplexMatrix sm_l =
+        feval ("tril", param_list)(0).sparse_complex_matrix_value ();
+      param_list(0) = sm_l;
+      param_list(1) = 1;
+      param_list(2) = "cols";
+      cols_norm = feval ("norm", param_list)(0).complex_vector_value ();
+      param_list.clear ();
+      ichol_t <SparseComplexMatrix,
+               Complex, ichol_mult_complex, ichol_checkpivot_complex>
+               (sm_l, L, cols_norm.fortran_vec (),
+                Complex (droptol), michol);
+      if (! error_state)
+        retval(0) = L;
+    }
+
+  return retval;
+}
+
+/*
+## No test needed for internal helper function.
+%!assert (1)
+*/
+
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/__ilu__.cc
@@ -0,0 +1,1108 @@
+/*
+
+Copyright (C) 2014-2015 Eduardo Ramos Fernández <eduradical951@gmail.com>
+Copyright (C) 2013-2015 Kai T. Ohlhus <k.ohlhus@gmail.com>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "oct-locbuf.h"
+
+#include "defun.h"
+#include "error.h"
+#include "parse.h"
+
+// That function implements the IKJ and JKI variants of Gaussian elimination to
+// perform the ILUTP decomposition.  The behaviour is controlled by milu
+// parameter.  If milu = ['off'|'col'] the JKI version is performed taking
+// advantage of CCS format of the input matrix.  If milu = 'row' the input
+// matrix has to be transposed to obtain the equivalent CRS structure so we can
+// work efficiently with rows.  In this case IKJ version is used.
+template <typename octave_matrix_t, typename T>
+void ilu_0 (octave_matrix_t& sm, const std::string milu = "off")
+{
+
+  const octave_idx_type n = sm.cols ();
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, iw, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, uptr, n);
+  octave_idx_type j1, j2, jrow, jw, i, k, jj;
+  T tl, r;
+
+  enum {OFF, ROW, COL};
+  char opt;
+  if (milu == "row")
+    {
+      opt = ROW;
+      sm = sm.transpose ();
+    }
+  else if (milu == "col")
+    opt = COL;
+  else
+    opt = OFF;
+
+  octave_idx_type* cidx = sm.cidx ();
+  octave_idx_type* ridx = sm.ridx ();
+  T* data = sm.data ();
+  for (i = 0; i < n; i++)
+    iw[i] = -1;
+  for (k = 0; k < n; k++)
+    {
+      j1 = cidx[k];
+      j2 = cidx[k+1] - 1;
+      octave_idx_type j;
+      for (j = j1; j <= j2; j++)
+        {
+          iw[ridx[j]] = j;
+        }
+      r = 0;
+      j = j1;
+      jrow = ridx[j];
+      while ((jrow < k) && (j <= j2))
+        {
+          if (opt == ROW)
+            {
+              tl = data[j] / data[uptr[jrow]];
+              data[j] = tl;
+            }
+          for (jj = uptr[jrow] + 1; jj < cidx[jrow+1]; jj++)
+            {
+              jw = iw[ridx[jj]];
+              if (jw != -1)
+                if (opt == ROW)
+                  data[jw] -= tl * data[jj];
+                else
+                  data[jw] -= data[j] * data[jj];
+
+              else
+                // That is for the milu='row'
+                if (opt == ROW)
+                  r += tl * data[jj];
+                else if (opt == COL)
+                  r += data[j] * data[jj];
+            }
+          j++;
+          jrow = ridx[j];
+        }
+      uptr[k] = j;
+      if (opt != OFF)
+        data[uptr[k]] -= r;
+      if (opt != ROW)
+        for (jj = uptr[k] + 1; jj < cidx[k+1]; jj++)
+          data[jj] /=  data[uptr[k]];
+      if (k != jrow)
+        {
+          error ("ilu: A has a zero on the diagonal");
+          break;
+        }
+
+      if (data[j] == T(0))
+        {
+          error ("ilu: encountered a pivot equal to 0");
+          break;
+        }
+      for (i = j1; i <= j2; i++)
+        iw[ridx[i]] = -1;
+    }
+  if (opt == ROW)
+    sm = sm.transpose ();
+}
+
+DEFUN (__ilu0__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {[@var{L}, @var{U}] =} __ilu0__ (@var{A})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __ilu0__ (@var{A}, @var{milu})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}] =} __ilu0__ (@var{A}, @dots{})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+  std::string milu;
+
+  if (nargout > 2 || nargin < 1 || nargin > 2)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  // In ILU0 algorithm the zero-pattern of the input matrix is preserved so
+  // it's structure does not change during the algorithm.  The same input
+  // matrix is used to build the output matrix due to that fact.
+  octave_value_list param_list;
+  if (! args(0).is_complex_type ())
+    {
+      SparseMatrix sm = args(0).sparse_matrix_value ();
+      ilu_0 <SparseMatrix, double> (sm, milu);
+      if (!error_state)
+        {
+          param_list.append (sm);
+          retval(1) = feval ("triu", param_list)(0).sparse_matrix_value ();
+          SparseMatrix eye =
+            feval ("speye", octave_value_list (
+                     octave_value (sm.cols ())))(0).sparse_matrix_value ();
+          param_list.append (-1);
+          retval(0) = eye +
+                      feval ("tril", param_list)(0).sparse_matrix_value ();
+        }
+    }
+  else
+    {
+      SparseComplexMatrix sm = args(0).sparse_complex_matrix_value ();
+      ilu_0 <SparseComplexMatrix, Complex> (sm, milu);
+      if (! error_state)
+        {
+          param_list.append (sm);
+          retval(1) =
+            feval ("triu", param_list)(0).sparse_complex_matrix_value ();
+          SparseComplexMatrix eye =
+            feval ("speye", octave_value_list (
+                     octave_value (sm.cols ())))(0).sparse_complex_matrix_value ();
+          param_list.append (-1);
+          retval(0) =
+            eye + feval ("tril", param_list)(0).sparse_complex_matrix_value ();
+        }
+    }
+
+  return retval;
+}
+
+template <typename octave_matrix_t, typename T>
+void ilu_crout (octave_matrix_t& sm_l, octave_matrix_t& sm_u,
+                octave_matrix_t& L, octave_matrix_t& U, T* cols_norm,
+                T* rows_norm, const T droptol = 0,
+                const std::string milu = "off")
+{
+
+  // Map the strings into chars for faster comparing inside loops
+  char opt;
+  enum {OFF, ROW, COL};
+  if (milu == "row")
+    opt = ROW;
+  else if (milu == "col")
+    opt = COL;
+  else
+    opt = OFF;
+
+  octave_idx_type jrow, i, j, k, jj, total_len_l, total_len_u, max_len_u,
+                  max_len_l, w_len_u, w_len_l, cols_list_len, rows_list_len;
+
+  const octave_idx_type n = sm_u.cols ();
+  sm_u = sm_u.transpose ();
+
+  max_len_u = sm_u.nnz ();
+  max_len_u += (0.1 * max_len_u) > n ? 0.1 * max_len_u : n;
+  max_len_l = sm_l.nnz ();
+  max_len_l += (0.1 * max_len_l) > n ? 0.1 * max_len_l : n;
+  // Extract pointers to the arrays for faster access inside loops
+  octave_idx_type* cidx_in_u = sm_u.cidx ();
+  octave_idx_type* ridx_in_u = sm_u.ridx ();
+  T* data_in_u = sm_u.data ();
+  octave_idx_type* cidx_in_l = sm_l.cidx ();
+  octave_idx_type* ridx_in_l = sm_l.ridx ();
+  T* data_in_l = sm_l.data ();
+
+  // L output arrays
+  Array <octave_idx_type> ridx_out_l (dim_vector (max_len_l, 1));
+  octave_idx_type* ridx_l = ridx_out_l.fortran_vec ();
+  Array <T> data_out_l (dim_vector (max_len_l, 1));
+  T* data_l = data_out_l.fortran_vec ();
+
+  // U output arrays
+  Array <octave_idx_type> ridx_out_u (dim_vector (max_len_u, 1));
+  octave_idx_type* ridx_u = ridx_out_u.fortran_vec ();
+  Array <T> data_out_u (dim_vector (max_len_u, 1));
+  T* data_u = data_out_u.fortran_vec ();
+
+  // Working arrays
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, cidx_l, n + 1);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, cidx_u, n + 1);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, cols_list, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, rows_list, n);
+  OCTAVE_LOCAL_BUFFER (T, w_data_l, n);
+  OCTAVE_LOCAL_BUFFER (T, w_data_u, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Ufirst, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, Lfirst, n);
+  OCTAVE_LOCAL_BUFFER (T, cr_sum, n);
+
+  T zero = T (0);
+
+  cidx_u[0] = cidx_in_u[0];
+  cidx_l[0] = cidx_in_l[0];
+  for (i = 0; i < n; i++)
+    {
+      w_data_u[i] = zero;
+      w_data_l[i] = zero;
+      cr_sum[i] = zero;
+    }
+
+  total_len_u = 0;
+  total_len_l = 0;
+  cols_list_len = 0;
+  rows_list_len = 0;
+
+  for (k = 0; k < n; k++)
+    {
+      // Load the working column and working row
+      for (i = cidx_in_l[k]; i < cidx_in_l[k+1]; i++)
+        w_data_l[ridx_in_l[i]] = data_in_l[i];
+
+      for (i = cidx_in_u[k]; i < cidx_in_u[k+1]; i++)
+        w_data_u[ridx_in_u[i]] = data_in_u[i];
+
+      // Update U working row
+      for (j = 0; j < rows_list_len; j++)
+        {
+          if ((Ufirst[rows_list[j]] != -1))
+            for (jj = Ufirst[rows_list[j]]; jj < cidx_u[rows_list[j]+1]; jj++)
+              {
+                jrow = ridx_u[jj];
+                w_data_u[jrow] -= data_u[jj] * data_l[Lfirst[rows_list[j]]];
+              }
+        }
+      // Update L working column
+      for (j = 0; j < cols_list_len; j++)
+        {
+          if (Lfirst[cols_list[j]] != -1)
+            for (jj = Lfirst[cols_list[j]]; jj < cidx_l[cols_list[j]+1]; jj++)
+              {
+                jrow = ridx_l[jj];
+                w_data_l[jrow] -= data_l[jj] * data_u[Ufirst[cols_list[j]]];
+              }
+        }
+
+      if ((max_len_u - total_len_u) < n)
+        {
+          max_len_u += (0.1 * max_len_u) > n ? 0.1 * max_len_u : n;
+          data_out_u.resize (dim_vector (max_len_u, 1));
+          data_u = data_out_u.fortran_vec ();
+          ridx_out_u.resize (dim_vector (max_len_u, 1));
+          ridx_u = ridx_out_u.fortran_vec ();
+        }
+
+      if ((max_len_l - total_len_l) < n)
+        {
+          max_len_l += (0.1 * max_len_l) > n ? 0.1 * max_len_l : n;
+          data_out_l.resize (dim_vector (max_len_l, 1));
+          data_l = data_out_l.fortran_vec ();
+          ridx_out_l.resize (dim_vector (max_len_l, 1));
+          ridx_l = ridx_out_l.fortran_vec ();
+        }
+
+      // Expand the working row into the U output data structures
+      w_len_l = 0;
+      data_u[total_len_u] = w_data_u[k];
+      ridx_u[total_len_u] = k;
+      w_len_u = 1;
+      for (i = k + 1; i < n; i++)
+        {
+          if (w_data_u[i] != zero)
+            {
+              if (std::abs (w_data_u[i]) < (droptol * rows_norm[k]))
+                {
+                  if (opt == ROW)
+                    cr_sum[k] += w_data_u[i];
+                  else if (opt == COL)
+                    cr_sum[i] += w_data_u[i];
+                }
+              else
+                {
+                  data_u[total_len_u + w_len_u] = w_data_u[i];
+                  ridx_u[total_len_u + w_len_u] = i;
+                  w_len_u++;
+                }
+            }
+
+          // Expand the working column into the L output data structures
+          if (w_data_l[i] != zero)
+            {
+              if (std::abs (w_data_l[i]) < (droptol * cols_norm[k]))
+                {
+                  if (opt == COL)
+                    cr_sum[k] += w_data_l[i];
+                  else if (opt == ROW)
+                    cr_sum[i] += w_data_l[i];
+                }
+              else
+                {
+                  data_l[total_len_l + w_len_l] = w_data_l[i];
+                  ridx_l[total_len_l + w_len_l] = i;
+                  w_len_l++;
+                }
+            }
+          w_data_u[i] = zero;
+          w_data_l[i] = zero;
+        }
+
+      // Compensate row and column sums --> milu option
+      if (opt == COL || opt == ROW)
+        data_u[total_len_u] += cr_sum[k];
+
+      // Check if the pivot is zero
+      if (data_u[total_len_u] == zero)
+        {
+          error ("ilu: encountered a pivot equal to 0");
+          break;
+        }
+
+      // Scale the elements in L by the pivot
+      for (i = total_len_l ; i < (total_len_l + w_len_l); i++)
+        data_l[i] /= data_u[total_len_u];
+
+
+      total_len_u += w_len_u;
+      total_len_l += w_len_l;
+      // Check if there are too many elements to be indexed with
+      // octave_idx_type type due to fill-in during the process.
+      if (total_len_l < 0 || total_len_u < 0)
+        {
+          error ("ilu: integer overflow.  Too many fill-in elements in L or U");
+          break;
+        }
+      cidx_u[k+1] = cidx_u[k] - cidx_u[0] + w_len_u;
+      cidx_l[k+1] = cidx_l[k] - cidx_l[0] + w_len_l;
+
+      // The tricky part of the algorithm.  The arrays pointing to the first
+      // working element of each column in the next iteration (Lfirst) or
+      // the first working element of each row (Ufirst) are updated.  Also the
+      // arrays working as lists cols_list and rows_list are filled with
+      // indices pointing to Ufirst and Lfirst respectively.
+      // TODO: Maybe the -1 indicating in Ufirst and Lfirst, that no elements
+      // have to be considered in a certain column or row in next iteration,
+      // can be removed.  It feels safer to me using such an indicator.
+      if (k < (n - 1))
+        {
+          if (w_len_u > 0)
+            Ufirst[k] = cidx_u[k];
+          else
+            Ufirst[k] = -1;
+          if (w_len_l > 0)
+            Lfirst[k] = cidx_l[k];
+          else
+            Lfirst[k] = -1;
+          cols_list_len = 0;
+          rows_list_len = 0;
+          for (i = 0; i <= k; i++)
+            {
+              if (Ufirst[i] != -1)
+                {
+                  jj = ridx_u[Ufirst[i]];
+                  if (jj < (k + 1))
+                    {
+                      if (Ufirst[i] < (cidx_u[i+1]))
+                        {
+                          Ufirst[i]++;
+                          if (Ufirst[i] == cidx_u[i+1])
+                            Ufirst[i] = -1;
+                          else
+                            jj = ridx_u[Ufirst[i]];
+                        }
+                    }
+                  if (jj == (k + 1))
+                    {
+                      cols_list[cols_list_len] = i;
+                      cols_list_len++;
+                    }
+                }
+
+              if (Lfirst[i] != -1)
+                {
+                  jj = ridx_l[Lfirst[i]];
+                  if (jj < (k + 1))
+                    if (Lfirst[i] < (cidx_l[i+1]))
+                      {
+                        Lfirst[i]++;
+                        if (Lfirst[i] == cidx_l[i+1])
+                          Lfirst[i] = -1;
+                        else
+                          jj = ridx_l[Lfirst[i]];
+                      }
+                  if (jj == (k + 1))
+                    {
+                      rows_list[rows_list_len] = i;
+                      rows_list_len++;
+                    }
+                }
+            }
+        }
+    }
+
+  if (! error_state)
+    {
+      // Build the output matrices
+      L = octave_matrix_t (n, n, total_len_l);
+      U = octave_matrix_t (n, n, total_len_u);
+      for (i = 0; i <= n; i++)
+        L.cidx (i) = cidx_l[i];
+      for (i = 0; i < total_len_l; i++)
+        {
+          L.ridx (i) = ridx_l[i];
+          L.data (i) = data_l[i];
+        }
+      for (i = 0; i <= n; i++)
+        U.cidx (i) = cidx_u[i];
+      for (i = 0; i < total_len_u; i++)
+        {
+          U.ridx (i) = ridx_u[i];
+          U.data (i) = data_u[i];
+        }
+      U = U.transpose ();
+    }
+}
+
+DEFUN (__iluc__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {[@var{L}, @var{U}] =} __iluc__ (@var{A})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __iluc__ (@var{A}, @var{droptol}) \n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __iluc__ (@var{A}, @var{droptol}, @var{milu})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}] =} __iluc__ (@var{A}, @dots{})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+  int nargin = args.length ();
+  std::string milu = "off";
+  double droptol = 0;
+
+  if (nargout != 2 || nargin < 1 || nargin > 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  // Don't repeat input validation of arguments done in ilu.m
+  if (nargin >= 2)
+    droptol = args(1).double_value ();
+
+  if (nargin == 3)
+    milu = args(2).string_value ();
+
+  octave_value_list param_list;
+  if (! args(0).is_complex_type ())
+    {
+      Array<double> cols_norm, rows_norm;
+      param_list.append (args(0).sparse_matrix_value ());
+      SparseMatrix sm_u = feval ("triu", param_list)(0).sparse_matrix_value ();
+      param_list.append (-1);
+      SparseMatrix sm_l = feval ("tril", param_list)(0).sparse_matrix_value ();
+      param_list(1) = "rows";
+      rows_norm = feval ("norm", param_list)(0).vector_value ();
+      param_list(1) = "cols";
+      cols_norm = feval ("norm", param_list)(0).vector_value ();
+      param_list.clear ();
+      SparseMatrix U;
+      SparseMatrix L;
+      ilu_crout <SparseMatrix, double> (sm_l, sm_u, L, U,
+                                        cols_norm.fortran_vec (),
+                                        rows_norm.fortran_vec (),
+                                        droptol, milu);
+      if (! error_state)
+        {
+          param_list.append (octave_value (L.cols ()));
+          SparseMatrix eye =
+            feval ("speye", param_list)(0).sparse_matrix_value ();
+          retval(1) = U;
+          retval(0) = L + eye;
+        }
+    }
+  else
+    {
+      Array<Complex> cols_norm, rows_norm;
+      param_list.append (args(0).sparse_complex_matrix_value ());
+      SparseComplexMatrix sm_u =
+        feval("triu", param_list)(0).sparse_complex_matrix_value ();
+      param_list.append (-1);
+      SparseComplexMatrix sm_l =
+        feval("tril", param_list)(0).sparse_complex_matrix_value ();
+      param_list(1) = "rows";
+      rows_norm = feval ("norm", param_list)(0).complex_vector_value ();
+      param_list(1) = "cols";
+      cols_norm = feval ("norm", param_list)(0).complex_vector_value ();
+      param_list.clear ();
+      SparseComplexMatrix U;
+      SparseComplexMatrix L;
+      ilu_crout < SparseComplexMatrix, Complex >
+                (sm_l, sm_u, L, U, cols_norm.fortran_vec () ,
+                 rows_norm.fortran_vec (), Complex (droptol), milu);
+      if (! error_state)
+        {
+          param_list.append (octave_value (L.cols ()));
+          SparseComplexMatrix eye =
+            feval ("speye", param_list)(0).sparse_complex_matrix_value ();
+          retval(1) = U;
+          retval(0) = L + eye;
+        }
+    }
+
+  return retval;
+}
+
+// That function implements the IKJ and JKI variants of gaussian elimination
+// to perform the ILUTP decomposition.  The behaviour is controlled by milu
+// parameter.  If milu = ['off'|'col'] the JKI version is performed taking
+// advantage of CCS format of the input matrix.  Row pivoting is performed.
+// If milu = 'row' the input matrix has to be transposed to obtain the
+// equivalent CRS structure so we can work efficiently with rows.  In that
+// case IKJ version is used and column pivoting is performed.
+
+template <typename octave_matrix_t, typename T>
+void ilu_tp (octave_matrix_t& sm, octave_matrix_t& L, octave_matrix_t& U,
+             octave_idx_type nnz_u, octave_idx_type nnz_l, T* cols_norm,
+             Array <octave_idx_type>& perm_vec, const T droptol = T(0),
+             const T thresh = T(0), const  std::string milu = "off",
+             const double udiag = 0)
+{
+  char opt;
+  enum {OFF, ROW, COL};
+  if (milu == "row")
+    opt = ROW;
+  else if (milu == "col")
+    opt = COL;
+  else
+    opt = OFF;
+
+  const octave_idx_type n = sm.cols ();
+
+  // That is necessary for the JKI (milu = "row") variant.
+  if (opt == ROW)
+    sm = sm.transpose();
+
+  // Extract pointers to the arrays for faster access inside loops
+  octave_idx_type* cidx_in = sm.cidx ();
+  octave_idx_type* ridx_in = sm.ridx ();
+  T* data_in = sm.data ();
+  octave_idx_type jrow, i, j, k, jj, c, total_len_l, total_len_u, p_perm,
+                  max_ind, max_len_l, max_len_u;
+  T zero = T(0);
+
+  T tl = zero, aux, maximum;
+
+  max_len_u = nnz_u;
+  max_len_u += (0.1 * max_len_u) > n ? 0.1 * max_len_u : n;
+  max_len_l = nnz_l;
+  max_len_l += (0.1 * max_len_l) > n ? 0.1 * max_len_l : n;
+
+  Array <octave_idx_type> cidx_out_l (dim_vector (n + 1, 1));
+  octave_idx_type* cidx_l = cidx_out_l.fortran_vec ();
+  Array <octave_idx_type> ridx_out_l (dim_vector (max_len_l, 1));
+  octave_idx_type* ridx_l = ridx_out_l.fortran_vec ();
+  Array <T> data_out_l (dim_vector (max_len_l ,1));
+  T* data_l = data_out_l.fortran_vec ();
+  // Data for U
+  Array <octave_idx_type> cidx_out_u (dim_vector (n + 1, 1));
+  octave_idx_type* cidx_u = cidx_out_u.fortran_vec ();
+  Array <octave_idx_type> ridx_out_u (dim_vector (max_len_u, 1));
+  octave_idx_type* ridx_u = ridx_out_u.fortran_vec ();
+  Array <T> data_out_u (dim_vector (max_len_u, 1));
+  T* data_u = data_out_u.fortran_vec();
+
+  // Working arrays and permutation arrays
+  octave_idx_type w_len_u, w_len_l;
+  T total_sum, partial_col_sum = zero, partial_row_sum = zero;
+  std::set <octave_idx_type> iw_l;
+  std::set <octave_idx_type> iw_u;
+  std::set <octave_idx_type>::iterator it, it2;
+  OCTAVE_LOCAL_BUFFER (T, w_data, n);
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, iperm, n);
+  octave_idx_type* perm = perm_vec.fortran_vec ();
+  OCTAVE_LOCAL_BUFFER (octave_idx_type, uptr, n);
+
+
+  cidx_l[0] = cidx_in[0];
+  cidx_u[0] = cidx_in[0];
+  for (i = 0; i < n; i++)
+    {
+      w_data[i] = 0;
+      perm[i] = i;
+      iperm[i] = i;
+    }
+  total_len_u = 0;
+  total_len_l = 0;
+
+  for (k = 0; k < n; k++)
+    {
+
+      for (j = cidx_in[k]; j < cidx_in[k+1]; j++)
+        {
+          p_perm = iperm[ridx_in[j]];
+          w_data[iperm[ridx_in[j]]] = data_in[j];
+          if (p_perm > k)
+            iw_l.insert (ridx_in[j]);
+          else
+            iw_u.insert (p_perm);
+        }
+
+      it = iw_u.begin ();
+      jrow = *it;
+      total_sum = zero;
+      while ((jrow < k) && (it != iw_u.end ()))
+        {
+          if (opt == COL)
+            partial_col_sum = w_data[jrow];
+          if (w_data[jrow] != zero)
+            {
+              if (opt == ROW)
+                {
+                  partial_row_sum = w_data[jrow];
+                  tl = w_data[jrow] / data_u[uptr[jrow]];
+                }
+              for (jj = cidx_l[jrow]; jj < cidx_l[jrow+1]; jj++)
+                {
+                  p_perm = iperm[ridx_l[jj]];
+                  aux = w_data[p_perm];
+                  if (opt == ROW)
+                    {
+                      w_data[p_perm] -= tl * data_l[jj];
+                      partial_row_sum += tl * data_l[jj];
+                    }
+                  else
+                    {
+                      tl = data_l[jj] * w_data[jrow];
+                      w_data[p_perm] -= tl;
+                      if (opt == COL)
+                        partial_col_sum += tl;
+                    }
+
+                  if ((aux == zero) && (w_data[p_perm] != zero))
+                    {
+                      if (p_perm > k)
+                        iw_l.insert (ridx_l[jj]);
+                      else
+                        iw_u.insert (p_perm);
+                    }
+                }
+
+              // Drop element from the U part in IKJ and L part in JKI
+              // variant (milu = [col|off])
+              if ((std::abs (w_data[jrow]) < (droptol * cols_norm[k]))
+                  && (w_data[jrow] != zero))
+                {
+                  if (opt == COL)
+                    total_sum += partial_col_sum;
+                  else if (opt == ROW)
+                    total_sum += partial_row_sum;
+                  w_data[jrow] = zero;
+                  it2 = it;
+                  it++;
+                  iw_u.erase (it2);
+                  jrow = *it;
+                  continue;
+                }
+              else
+                // This is the element scaled by the pivot
+                // in the actual iteration
+                if (opt == ROW)
+                  w_data[jrow] = tl;
+            }
+          jrow = *(++it);
+        }
+
+      // Search for the pivot and update iw_l and iw_u if the pivot is not the
+      // diagonal element
+      if ((thresh > zero) && (k < (n - 1)))
+        {
+          maximum = std::abs (w_data[k]) / thresh;
+          max_ind = perm[k];
+          for (it = iw_l.begin (); it != iw_l.end (); ++it)
+            {
+              p_perm = iperm[*it];
+              if (std::abs (w_data[p_perm]) > maximum)
+                {
+                  maximum = std::abs (w_data[p_perm]);
+                  max_ind = *it;
+                  it2 = it;
+                }
+            }
+          // If the pivot is not the diagonal element update all.
+          p_perm = iperm[max_ind];
+          if (max_ind != perm[k])
+            {
+              iw_l.erase (it2);
+              if (w_data[k] != zero)
+                iw_l.insert (perm[k]);
+              else
+                iw_u.insert (k);
+              // Swap data and update permutation vectors
+              aux = w_data[k];
+              iperm[perm[p_perm]] = k;
+              iperm[perm[k]] = p_perm;
+              c = perm[k];
+              perm[k] = perm[p_perm];
+              perm[p_perm] = c;
+              w_data[k] = w_data[p_perm];
+              w_data[p_perm] = aux;
+            }
+
+        }
+
+      // Drop elements in the L part in the IKJ and from the U part in the JKI
+      // version.
+      it = iw_l.begin ();
+      while (it != iw_l.end ())
+        {
+          p_perm = iperm[*it];
+          if (droptol > zero)
+            if (std::abs (w_data[p_perm]) < (droptol * cols_norm[k]))
+              {
+                if (opt != OFF)
+                  total_sum += w_data[p_perm];
+                w_data[p_perm] = zero;
+                it2 = it;
+                it++;
+                iw_l.erase (it2);
+                continue;
+              }
+
+          it++;
+        }
+
+      // If milu == [row|col] summation is preserved.
+      // Compensate diagonal element.
+      if (opt != OFF)
+        {
+          if ((total_sum > zero) && (w_data[k] == zero))
+            iw_u.insert (k);
+          w_data[k] += total_sum;
+        }
+
+
+
+      // Check if the pivot is zero and if udiag is active.
+      // NOTE: If the pivot == 0 and udiag is active, then if milu = [col|row]
+      //       will not preserve the row sum for that column/row.
+      if (w_data[k] == zero)
+        {
+          if (udiag == 1)
+            {
+              w_data[k] = droptol;
+              iw_u.insert (k);
+            }
+          else
+            {
+              error ("ilu: encountered a pivot equal to 0");
+              break;
+            }
+        }
+
+      // Scale the elements on the L part for IKJ version (milu = [col|off])
+      if (opt != ROW)
+        for (it = iw_l.begin (); it != iw_l.end (); ++it)
+          {
+            p_perm = iperm[*it];
+            w_data[p_perm] = w_data[p_perm] / w_data[k];
+          }
+
+
+      if ((max_len_u - total_len_u) < n)
+        {
+          max_len_u += (0.1 * max_len_u) > n ? 0.1 * max_len_u : n;
+          data_out_u.resize (dim_vector (max_len_u, 1));
+          data_u = data_out_u.fortran_vec ();
+          ridx_out_u.resize (dim_vector (max_len_u, 1));
+          ridx_u = ridx_out_u.fortran_vec ();
+        }
+
+      if ((max_len_l - total_len_l) < n)
+        {
+          max_len_l += (0.1 * max_len_l) > n ? 0.1 * max_len_l : n;
+          data_out_l.resize (dim_vector (max_len_l, 1));
+          data_l = data_out_l.fortran_vec ();
+          ridx_out_l.resize (dim_vector (max_len_l, 1));
+          ridx_l = ridx_out_l.fortran_vec ();
+        }
+
+      // Expand working vector into U.
+      w_len_u = 0;
+      for (it = iw_u.begin (); it != iw_u.end (); ++it)
+        {
+          if (w_data[*it] != zero)
+            {
+              data_u[total_len_u + w_len_u] = w_data[*it];
+              ridx_u[total_len_u + w_len_u] = *it;
+              w_len_u++;
+            }
+          w_data[*it] = 0;
+        }
+      // Expand working vector into L.
+      w_len_l = 0;
+      for (it = iw_l.begin (); it != iw_l.end (); ++it)
+        {
+          p_perm = iperm[*it];
+          if (w_data[p_perm] != zero)
+            {
+              data_l[total_len_l + w_len_l] = w_data[p_perm];
+              ridx_l[total_len_l + w_len_l] = *it;
+              w_len_l++;
+            }
+          w_data[p_perm] = 0;
+        }
+      total_len_u += w_len_u;
+      total_len_l += w_len_l;
+      // Check if there are too many elements to be indexed with
+      // octave_idx_type type due to fill-in during the process.
+      if (total_len_l < 0 || total_len_u < 0)
+        {
+          error ("ilu: Integer overflow.  Too many fill-in elements in L or U");
+          break;
+        }
+      if (opt == ROW)
+        uptr[k] = total_len_u - 1;
+      cidx_u[k+1] = cidx_u[k] - cidx_u[0] + w_len_u;
+      cidx_l[k+1] = cidx_l[k] - cidx_l[0] + w_len_l;
+
+      iw_l.clear ();
+      iw_u.clear ();
+    }
+
+  if (! error_state)
+    {
+      octave_matrix_t *L_ptr;
+      octave_matrix_t *U_ptr;
+      octave_matrix_t diag (n, n, n);
+
+      // L and U are interchanged if milu = 'row'.  It is a matter
+      // of nomenclature to re-use code with both IKJ and JKI
+      // versions of the algorithm.
+      if (opt == ROW)
+        {
+          L_ptr = &U;
+          U_ptr = &L;
+          L = octave_matrix_t (n, n, total_len_u - n);
+          U = octave_matrix_t (n, n, total_len_l);
+        }
+      else
+        {
+          L_ptr = &L;
+          U_ptr = &U;
+          L = octave_matrix_t (n, n, total_len_l);
+          U = octave_matrix_t (n, n, total_len_u);
+        }
+
+      for (i = 0; i <= n; i++)
+        {
+          L_ptr->cidx (i) = cidx_l[i];
+          U_ptr->cidx (i) = cidx_u[i];
+          if (opt == ROW)
+            U_ptr->cidx (i) -= i;
+        }
+
+      for (i = 0; i < n; i++)
+        {
+          if (opt == ROW)
+            diag.elem (i,i) = data_u[uptr[i]];
+          j = cidx_l[i];
+
+          while (j < cidx_l[i+1])
+            {
+              L_ptr->ridx (j) = ridx_l[j];
+              L_ptr->data (j) = data_l[j];
+              j++;
+            }
+          j = cidx_u[i];
+
+          while (j < cidx_u[i+1])
+            {
+              c = j;
+              if (opt == ROW)
+                {
+                  // The diagonal is removed from L if milu = 'row'.
+                  // That is because is convenient to have it inside
+                  // the L part to carry out the process.
+                  if (ridx_u[j] == i)
+                    {
+                      j++;
+                      continue;
+                    }
+                  else
+                    c -= i;
+                }
+              U_ptr->data (c) = data_u[j];
+              U_ptr->ridx (c) = ridx_u[j];
+              j++;
+            }
+        }
+
+      if (opt == ROW)
+        {
+          U = U.transpose ();
+          // The diagonal, conveniently permuted is added to U
+          U += diag.index (idx_vector::colon, perm_vec);
+          L = L.transpose ();
+        }
+    }
+}
+
+DEFUN (__ilutp__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {[@var{L}, @var{U}] =} __ilutp__ (@var{A})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __ilutp__ (@var{A}, @var{droptol})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __ilutp__ (@var{A}, @var{droptol}, @var{thresh})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __ilutp__ (@var{A}, @var{droptol}, @var{thresh}, @var{milu})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}] =} __ilutp__ (@var{A}, @var{droptol}, @var{thresh}, @var{milu}, @var{udiag})\n\
+@deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}] =} __ilutp__ (@var{A}, @dots{})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+  std::string milu = "";
+  double droptol = 0, thresh = 1;
+  double udiag = 0;
+
+  if (nargout < 2 || nargout > 3 || nargin < 1 || nargin > 5)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  // Don't repeat input validation of arguments done in ilu.m
+  if (nargin >= 2)
+    droptol = args(1).double_value ();
+
+  if (nargin >= 3)
+    thresh = args(2).double_value ();
+
+  if (nargin >= 4)
+    milu = args(3).string_value ();
+
+  if (nargin == 5)
+    udiag = args(4).double_value ();
+
+  octave_value_list param_list;
+  octave_idx_type nnz_u, nnz_l;
+  if (! args(0).is_complex_type ())
+    {
+      Array <double> rc_norm;
+      SparseMatrix sm = args(0).sparse_matrix_value ();
+      param_list.append (sm);
+      nnz_u =  (feval ("triu", param_list)(0).sparse_matrix_value ()).nnz ();
+      param_list.append (-1);
+      nnz_l =  (feval ("tril", param_list)(0).sparse_matrix_value ()).nnz ();
+      if (milu == "row")
+        param_list (1) = "rows";
+      else
+        param_list (1) = "cols";
+      rc_norm = feval ("norm", param_list)(0).vector_value ();
+      param_list.clear ();
+      Array <octave_idx_type> perm (dim_vector (sm.cols (), 1));
+      SparseMatrix U;
+      SparseMatrix L;
+      ilu_tp <SparseMatrix, double> (sm, L, U, nnz_u, nnz_l,
+                                     rc_norm.fortran_vec (),
+                                     perm, droptol, thresh, milu, udiag);
+      if (! error_state)
+        {
+          param_list.append (octave_value (L.cols ()));
+          SparseMatrix eye =
+            feval ("speye", param_list)(0).sparse_matrix_value ();
+          if (milu == "row")
+            {
+              if (nargout == 3)
+                {
+                  retval(2) = eye.index (idx_vector::colon, perm);
+                  retval(1) = U.index (idx_vector::colon, perm);
+                }
+              else if (nargout == 2)
+                retval(1) = U;
+              retval(0) = L + eye;
+            }
+          else
+            {
+              if (nargout == 3)
+                {
+                  retval(2) = eye.index (perm, idx_vector::colon);
+                  retval(1) = U;
+                  retval(0) = L.index (perm, idx_vector::colon) + eye;
+                }
+              else
+                {
+                  retval(1) = U;
+                  retval(0) = L + eye.index (perm, idx_vector::colon);
+                }
+            }
+        }
+    }
+  else
+    {
+      Array <Complex> rc_norm;
+      SparseComplexMatrix sm = args(0).sparse_complex_matrix_value ();
+      param_list.append (sm);
+      nnz_u =
+        feval ("triu", param_list)(0).sparse_complex_matrix_value ().nnz ();
+      param_list.append (-1);
+      nnz_l =
+        feval ("tril", param_list)(0).sparse_complex_matrix_value ().nnz ();
+      if (milu == "row")
+        param_list(1) = "rows";
+      else
+        param_list(1) = "cols";
+      rc_norm = feval ("norm", param_list)(0).complex_vector_value ();
+      Array <octave_idx_type> perm (dim_vector (sm.cols (), 1));
+      param_list.clear ();
+      SparseComplexMatrix U;
+      SparseComplexMatrix L;
+      ilu_tp < SparseComplexMatrix, Complex>
+              (sm, L, U, nnz_u, nnz_l, rc_norm.fortran_vec (), perm,
+               Complex (droptol), Complex (thresh), milu, udiag);
+
+      if (! error_state)
+        {
+          param_list.append (octave_value (L.cols ()));
+          SparseComplexMatrix eye =
+            feval ("speye", param_list)(0).sparse_complex_matrix_value ();
+          if (milu == "row")
+            {
+              if (nargout == 3)
+                {
+                  retval(2) = eye.index (idx_vector::colon, perm);
+                  retval(1) = U.index (idx_vector::colon, perm);
+                }
+              else if (nargout == 2)
+                retval(1) = U;
+              retval(0) = L + eye;
+            }
+          else
+            {
+              if (nargout == 3)
+                {
+                  retval(2) = eye.index (perm, idx_vector::colon);
+                  retval(1) = U;
+                  retval(0) = L.index (perm, idx_vector::colon) + eye;
+                }
+              else
+                {
+                  retval(1) = U;
+                  retval(0) = L + eye.index (perm, idx_vector::colon);
+                }
+            }
+        }
+    }
+
+  return retval;
+}
+
+/*
+## No test needed for internal helper function.
+%!assert (1)
+*/
+
--- a/libinterp/corefcn/__lin_interpn__.cc
+++ b/libinterp/corefcn/__lin_interpn__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 Alexander Barth
+Copyright (C) 2007-2015 Alexander Barth
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/__pchip_deriv__.cc
+++ b/libinterp/corefcn/__pchip_deriv__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 Kai Habel
+Copyright (C) 2002-2015 Kai Habel
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
@@ -59,7 +59,7 @@
   octave_value retval;
   const int nargin = args.length ();
 
-  bool rows = (nargin == 3 && args (2).uint_value () == 2);
+  bool rows = (nargin == 3 && args(2).uint_value () == 2);
 
   if (nargin >= 2)
     {
@@ -85,25 +85,25 @@
               return retval;
             }
 
-          const float *yvec = ymat.data ();
           FloatMatrix dmat (nyr, nyc);
-          float *dvec = dmat.fortran_vec ();
 
           octave_idx_type ierr;
           const octave_idx_type incfd = rows ? nyr : 1;
-          const octave_idx_type inc = rows ? 1 : nyr;
+          volatile const octave_idx_type inc = rows ? 1 : nyr;
+          volatile octave_idx_type k = 0;
 
-          for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
+          for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
             {
               F77_XFCN (pchim, PCHIM, (nx, xvec.data (),
-                                       yvec, dvec, incfd, &ierr));
+                                       ymat.data () + k * inc,
+                                       dmat.fortran_vec () + k * inc,
+                                       incfd, &ierr));
 
-              yvec += inc;
-              dvec += inc;
+              k++;
 
               if (ierr < 0)
                 {
-                  error ("PCHIM: error: %i\n", ierr);
+                  error ("__pchip_deriv__: PCHIM failed with ierr = %i", ierr);
                   return retval;
                 }
             }
@@ -132,25 +132,24 @@
               return retval;
             }
 
-          const double *yvec = ymat.data ();
           Matrix dmat (nyr, nyc);
-          double *dvec = dmat.fortran_vec ();
 
           octave_idx_type ierr;
           const octave_idx_type incfd = rows ? nyr : 1;
-          const octave_idx_type inc = rows ? 1 : nyr;
+          volatile const octave_idx_type inc = rows ? 1 : nyr;
+          volatile octave_idx_type k = 0;
 
-          for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
+          for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
             {
               F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (),
-                                         yvec, dvec, incfd, &ierr));
-
-              yvec += inc;
-              dvec += inc;
+                                         ymat.data () + k * inc,
+                                         dmat.fortran_vec () + k * inc,
+                                         incfd, &ierr));
+              k++;
 
               if (ierr < 0)
                 {
-                  error ("DPCHIM: error: %i\n", ierr);
+                  error ("__pchip_deriv__: DPCHIM failed with ierr = %i", ierr);
                   return retval;
                 }
             }
--- a/libinterp/corefcn/__qp__.cc
+++ b/libinterp/corefcn/__qp__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 Gabriele Pannocchia
+Copyright (C) 2000-2015 Gabriele Pannocchia
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/balance.cc
+++ b/libinterp/corefcn/balance.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
@@ -68,7 +68,7 @@
 \n\
 If four output values are requested, compute @code{@var{AA} =\n\
 @var{CC}*@var{A}*@var{DD}} and @code{@var{BB} = @var{CC}*@var{B}*@var{DD}},\n\
-in which @var{AA} and @var{BB} have non-zero elements of approximately the\n\
+in which @var{AA} and @var{BB} have nonzero elements of approximately the\n\
 same magnitude and @var{CC} and @var{DD} are permuted diagonal matrices as\n\
 in @var{DD} for the algebraic eigenvalue problem.\n\
 \n\
@@ -144,7 +144,8 @@
   if (AEPcase)
     {
       // Algebraic eigenvalue problem.
-      bool noperm = false, noscal = false;
+      bool noperm = false;
+      bool noscal = false;
       if (nargin > 1)
         {
           std::string a1s = args(1).string_value ();
--- a/libinterp/corefcn/besselj.cc
+++ b/libinterp/corefcn/besselj.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 John W. Eaton
+Copyright (C) 1997-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -94,7 +94,30 @@
 
   if (nargin == 2 || nargin == 3)
     {
-      bool scaled = (nargin == 3);
+      bool scaled = false;
+      if (nargin == 3)
+        {
+          octave_value opt_arg = args(2);
+          bool rpt_error = false;
+
+          if (! opt_arg.is_scalar_type ())
+            rpt_error = true;
+          else if (opt_arg.is_numeric_type ())
+            {
+              double opt_val = opt_arg.double_value ();
+              if (opt_val != 0.0 && opt_val != 1.0)
+                rpt_error = true;
+              scaled = (opt_val == 1.0);
+            }
+          else if (opt_arg.is_bool_type ())
+            scaled = opt_arg.bool_value ();
+
+          if (rpt_error)
+            {
+              error ("%s: OPT must be 0 (or false) or 1 (or true)", fn);
+              return retval;
+            }
+        }
 
       octave_value alpha_arg = args(0);
       octave_value x_arg = args(1);
@@ -389,26 +412,26 @@
 \n\
 @table @code\n\
 @item besselj\n\
-Bessel functions of the first kind.  If the argument @var{opt} is supplied,\n\
-the result is multiplied by @code{exp (-abs (imag (@var{x})))}.\n\
+Bessel functions of the first kind.  If the argument @var{opt} is 1 or true,\n\
+the result is multiplied by @w{@code{exp (-abs (imag (@var{x})))}}.\n\
 \n\
 @item bessely\n\
-Bessel functions of the second kind.  If the argument @var{opt} is supplied,\n\
+Bessel functions of the second kind.  If the argument @var{opt} is 1 or true,\n\
 the result is multiplied by @code{exp (-abs (imag (@var{x})))}.\n\
 \n\
 @item besseli\n\
 \n\
-Modified Bessel functions of the first kind.  If the argument @var{opt} is\n\
-supplied, the result is multiplied by @code{exp (-abs (real (@var{x})))}.\n\
+Modified Bessel functions of the first kind.  If the argument @var{opt} is 1\n\
+or true, the result is multiplied by @code{exp (-abs (real (@var{x})))}.\n\
 \n\
 @item besselk\n\
 \n\
-Modified Bessel functions of the second kind.  If the argument @var{opt} is\n\
-supplied, the result is multiplied by @code{exp (@var{x})}.\n\
+Modified Bessel functions of the second kind.  If the argument @var{opt} is 1\n\
+or true, the result is multiplied by @code{exp (@var{x})}.\n\
 \n\
 @item besselh\n\
 Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}\n\
-= 2) kind.  If the argument @var{opt} is supplied, the result is multiplied\n\
+= 2) kind.  If the argument @var{opt} is 1 or true, the result is multiplied\n\
 by @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for\n\
 @var{k} = 2.\n\
 @end table\n\
@@ -598,7 +621,7 @@
         {
           int idx = nargin == 1 ? 0 : 1;
 
-          if (args (idx).is_single_type ())
+          if (args(idx).is_single_type ())
             {
               FloatComplexNDArray z = args(idx).float_complex_array_value ();
 
--- a/libinterp/corefcn/betainc.cc
+++ b/libinterp/corefcn/betainc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 John W. Eaton
+Copyright (C) 1997-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,8 +32,6 @@
 #include "oct-obj.h"
 #include "utils.h"
 
-// FIXME: These functions do not need to be dynamically loaded.  They should
-//        be placed elsewhere in the Octave code hierarchy.
 
 DEFUN (betainc, args, ,
        "-*- texinfo -*-\n\
@@ -76,8 +74,8 @@
       octave_value b_arg = args(2);
 
       // FIXME: Can we make a template version of the duplicated code below
-      if (x_arg.is_single_type () || a_arg.is_single_type () ||
-          b_arg.is_single_type ())
+      if (x_arg.is_single_type () || a_arg.is_single_type ()
+          || b_arg.is_single_type ())
         {
           if (x_arg.is_scalar_type ())
             {
@@ -453,8 +451,8 @@
       // accepted float inputs and returned float outputs.  As it is, we do
       // extra work to calculate betaincinv to double precision and then throw
       // that precision away.
-      if (x_arg.is_single_type () || a_arg.is_single_type () ||
-          b_arg.is_single_type ())
+      if (x_arg.is_single_type () || a_arg.is_single_type ()
+          || b_arg.is_single_type ())
         {
           retval = Array<float> (retval.array_value ());
         }
--- a/libinterp/corefcn/bitfcns.cc
+++ b/libinterp/corefcn/bitfcns.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -131,6 +131,26 @@
   return bitopxx (std::bit_xor<T>(), fname, x, y);
 }
 
+static inline int
+bitop_arg_is_int (const octave_value& arg)
+{
+  return (arg.class_name () != octave_scalar::static_class_name ()
+          && arg.class_name () != octave_float_scalar::static_class_name ()
+          && arg.class_name () != octave_bool::static_class_name ());
+}
+
+static inline int
+bitop_arg_is_bool (const octave_value& arg)
+{
+  return arg.class_name () == octave_bool::static_class_name ();
+}
+
+static inline int
+bitop_arg_is_float (const octave_value& arg)
+{
+  return arg.class_name () == octave_float_scalar::static_class_name ();
+}
+
 octave_value
 bitop (const std::string& fname, const octave_value_list& args)
 {
@@ -140,38 +160,30 @@
 
   if (nargin == 2)
     {
-      if ((args(0).class_name () == octave_scalar::static_class_name ())
-          || (args(0).class_name () == octave_float_scalar::static_class_name ())
-          || (args(0).class_name () == octave_bool::static_class_name ())
-          || (args(1).class_name () == octave_scalar::static_class_name ())
-          || (args(1).class_name () == octave_float_scalar::static_class_name ())
-          || (args(1).class_name () == octave_bool::static_class_name ()))
+      if (args(0).class_name () == octave_scalar::static_class_name ()
+          || args(0).class_name () == octave_float_scalar::static_class_name ()
+          || args(0).class_name () == octave_bool::static_class_name ()
+          || args(1).class_name () == octave_scalar::static_class_name ()
+          || args(1).class_name () == octave_float_scalar::static_class_name ()
+          || args(1).class_name () == octave_bool::static_class_name ())
         {
-          bool arg0_is_int = (args(0).class_name () !=
-                              octave_scalar::static_class_name () &&
-                              args(0).class_name () !=
-                              octave_float_scalar::static_class_name () &&
-                              args(0).class_name () !=
-                              octave_bool::static_class_name ());
-          bool arg1_is_int = (args(1).class_name () !=
-                              octave_scalar::static_class_name () &&
-                              args(1).class_name () !=
-                              octave_float_scalar::static_class_name () &&
-                              args(1).class_name () !=
-                              octave_bool::static_class_name ());
-          bool arg0_is_float = args(0).class_name () ==
-                               octave_float_scalar::static_class_name ();
-          bool arg1_is_float = args(1).class_name () ==
-                               octave_float_scalar::static_class_name ();
+          bool arg0_is_int = bitop_arg_is_int (args(0));
+          bool arg1_is_int = bitop_arg_is_int (args(1));
+
+          bool arg0_is_bool = bitop_arg_is_bool (args(0));
+          bool arg1_is_bool = bitop_arg_is_bool (args(1));
+
+          bool arg0_is_float = bitop_arg_is_float (args(0));
+          bool arg1_is_float = bitop_arg_is_float (args(1));
 
           if (! (arg0_is_int || arg1_is_int))
             {
-              if (! (arg0_is_float || arg1_is_float))
+              if (arg0_is_bool && arg1_is_bool)
                 {
-                  uint64NDArray x (args(0).array_value ());
-                  uint64NDArray y (args(1).array_value ());
+                  boolNDArray x (args(0).bool_array_value ());
+                  boolNDArray y (args(1).bool_array_value ());
                   if (! error_state)
-                    retval = bitopx (fname, x, y).array_value ();
+                    retval = bitopx (fname, x, y).bool_array_value ();
                 }
               else if (arg0_is_float && arg1_is_float)
                 {
@@ -180,6 +192,13 @@
                   if (! error_state)
                     retval = bitopx (fname, x, y).float_array_value ();
                 }
+              else if (! (arg0_is_float || arg1_is_float))
+                {
+                  uint64NDArray x (args(0).array_value ());
+                  uint64NDArray y (args(1).array_value ());
+                  if (! error_state)
+                    retval = bitopx (fname, x, y).array_value ();
+                }
               else
                 {
                   int p = (arg0_is_float ? 1 : 0);
@@ -377,6 +396,27 @@
   return bitop ("bitxor", args);
 }
 
+/*
+%!assert (bitand (true, false), false)
+%!assert (bitor  (true, false), true)
+%!assert (bitxor (true, false), true)
+
+%!assert (bitand (true, true), true)
+%!assert (bitor  (true, true), true)
+%!assert (bitxor (true, true), false)
+
+%!assert (bitand (true, 5), 1)
+
+%!assert (bitand (true, false), false)
+%!assert (bitand (true, true), true)
+%!assert (bitand (true, false), false)
+%!assert (bitand (true, false), false)
+
+## Test idx_arg.length () == 0
+%!error <size of X and Y must match> bitand ([0 0 0], [1 0])
+%!error <size of X and Y must match> bitand ([0; 0; 0], [0 0 0])
+*/
+
 template <typename T>
 static int64_t
 max_mantissa_value ()
@@ -595,7 +635,7 @@
           int bits_in_type = sizeof (double)
                              * std::numeric_limits<unsigned char>::digits;
           NDArray m = m_arg.array_value ();
-          DO_BITSHIFT ( );
+          DO_BITSHIFT ();
         }
       else if (cname == "single")
         {
@@ -621,6 +661,19 @@
   return retval;
 }
 
+/*
+%!assert (bitshift (uint8  (16), 1),  uint8 ( 32))
+%!assert (bitshift (uint16 (16), 2), uint16 ( 64))
+%!assert (bitshift (uint32 (16), 3), uint32 (128))
+%!assert (bitshift (uint64 (16), 4), uint64 (256))
+%!assert (bitshift (uint8 (255), 1), uint8 (254))
+
+%!error <expecting integer as second argument> bitshift (16, 1.5)
+%!error bitshift (16, {1})
+%!error <N must be a scalar integer> bitshift (10, [-2 -1 0 1 2], [1 1 1 1 1])
+%!error <N must be positive> bitshift (10, [-2 -1 0 1 2], -1)
+*/
+
 DEFUN (bitmax, args, ,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} bitmax ()\n\
--- a/libinterp/corefcn/bsxfun.cc
+++ b/libinterp/corefcn/bsxfun.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -201,7 +201,8 @@
   bsxfun_builtin_op op = bsxfun_builtin_lookup (name);
   if (op != bsxfun_builtin_unknown)
     {
-      builtin_type_t btyp_a = a.builtin_type (), btyp_b = b.builtin_type ();
+      builtin_type_t btyp_a = a.builtin_type ();
+      builtin_type_t btyp_b = b.builtin_type ();
 
       // Simplify single/double combinations.
       if (btyp_a == btyp_float && btyp_b == btyp_double)
@@ -286,7 +287,7 @@
   if (i == 0)
     {
       for (octave_idx_type j = nd - 1; j > 0; j--)
-        idx(j) = octave_value (static_cast<double>(1));
+        idx(j) = octave_value (1.0);
       idx(0) = octave_value (':');
     }
   else
@@ -351,14 +352,14 @@
                || args(0).is_inline_function ()))
         error ("bsxfun: F must be a string or function handle");
 
-      const octave_value A = args (1);
-      const octave_value B = args (2);
+      const octave_value A = args(1);
+      const octave_value B = args(2);
 
       if (func.is_builtin_function ()
           || (func.is_function_handle ()
               && ! A.is_object () && ! B.is_object ()))
         {
-          // This may break if the default behavior is overriden.  But if you
+          // This may break if the default behavior is overridden.  But if you
           // override arithmetic operators for builtin classes, you should
           // expect mayhem anyway (constant folding etc).  Querying
           // is_overloaded() may not be exactly what we need here.
@@ -535,8 +536,8 @@
                         {
                           update_index (ra_idx, dvc, i);
 
-                          if (have_FloatNDArray ||
-                              have_FloatComplexNDArray)
+                          if (have_FloatNDArray
+                              || have_FloatComplexNDArray)
                             {
                               if (! tmp(0).is_float_type ())
                                 {
@@ -554,8 +555,8 @@
                                 }
                               else if (tmp(0).is_double_type ())
                                 {
-                                  if (tmp(0).is_complex_type () &&
-                                      have_FloatNDArray)
+                                  if (tmp(0).is_complex_type ()
+                                      && have_FloatNDArray)
                                     {
                                       result_ComplexNDArray =
                                         ComplexNDArray (result_FloatNDArray);
--- a/libinterp/corefcn/c-file-ptr-stream.cc
+++ b/libinterp/corefcn/c-file-ptr-stream.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/c-file-ptr-stream.h
+++ b/libinterp/corefcn/c-file-ptr-stream.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -25,7 +25,7 @@
 
 #include <cstdio>
 
-#include <iosfwd>
+#include <streambuf>
 
 class
 c_file_ptr_buf : public std::streambuf
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/cdisplay.c
@@ -0,0 +1,164 @@
+/*
+
+Copyright (C) 2009-2014 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#if defined (OCTAVE_USE_WINDOWS_API)
+#include <windows.h>
+#elif defined (HAVE_FRAMEWORK_CARBON)
+#include <Carbon/Carbon.h>
+#elif defined (HAVE_X_WINDOWS)
+#include <X11/Xlib.h>
+#endif
+
+#include "cdisplay.h"
+
+const char *
+octave_get_display_info (int *ht, int *wd, int *dp, double *rx, double *ry,
+                         int *dpy_avail)
+{
+  const char *msg = 0;
+
+  *dpy_avail = 0;
+
+#if defined (OCTAVE_USE_WINDOWS_API)
+
+  HDC hdc = GetDC (0);
+
+  if (hdc)
+    {
+      *dp = GetDeviceCaps (hdc, BITSPIXEL);
+
+      *ht = GetDeviceCaps (hdc, VERTRES);
+      *wd = GetDeviceCaps (hdc, HORZRES);
+
+      double ht_mm = GetDeviceCaps (hdc, VERTSIZE);
+      double wd_mm = GetDeviceCaps (hdc, HORZSIZE);
+
+      *rx = *wd * 25.4 / wd_mm;
+      *ry = *ht * 25.4 / ht_mm;
+
+      *dpy_avail = 1;
+    }
+  else
+    msg = "no graphical display found";
+
+#elif defined (HAVE_FRAMEWORK_CARBON)
+
+  CGDirectDisplayID display = CGMainDisplayID ();
+
+  if (display)
+    {
+#if defined (HAVE_CARBON_CGDISPLAYBITSPERPIXEL)
+
+      *dp = CGDisplayBitsPerPixel (display);
+
+#else
+
+      /* FIXME: This will only work for MacOS > 10.5. For earlier versions
+         this code is not needed (use CGDisplayBitsPerPixel instead).  */
+
+      CGDisplayModeRef mode = CGDisplayCopyDisplayMode (display);
+      CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding (mode);
+
+      if (CFStringCompare (pixelEncoding, CFSTR (IO32BitDirectPixels), 0) == 0)
+        *dp = 32;
+      else if (CFStringCompare (pixelEncoding,
+                                CFSTR (IO16BitDirectPixels), 0) == 0)
+        *dp = 16;
+      else
+        *dp = 8;
+
+#endif
+
+      *ht = CGDisplayPixelsHigh (display);
+      *wd = CGDisplayPixelsWide (display);
+
+      CGSize sz_mm = CGDisplayScreenSize (display);
+
+      /* For MacOS >= 10.6, CGSize is a struct keeping 2 CGFloat
+         values, but the CGFloat typedef is not present on older
+         systems, so use double instead.  */
+
+      double ht_mm = sz_mm.height;
+      double wd_mm = sz_mm.width;
+
+      *rx = *wd * 25.4 / wd_mm;
+      *ry = *ht * 25.4 / ht_mm;
+
+      *dpy_avail = 1;
+    }
+  else
+    msg = "no graphical display found";
+
+#elif defined (HAVE_X_WINDOWS)
+
+  const char *display_name = getenv ("DISPLAY");
+
+  if (display_name && *display_name)
+    {
+      Display *display = XOpenDisplay (display_name);
+
+      if (display)
+        {
+          Screen *screen = DefaultScreenOfDisplay (display);
+
+          if (screen)
+            {
+              *dp = DefaultDepthOfScreen (screen);
+
+              *ht = HeightOfScreen (screen);
+              *wd = WidthOfScreen (screen);
+
+              int screen_number = XScreenNumberOfScreen (screen);
+
+              double ht_mm = DisplayHeightMM (display, screen_number);
+              double wd_mm = DisplayWidthMM (display, screen_number);
+
+              *rx = *wd * 25.4 / wd_mm;
+              *ry = *ht * 25.4 / ht_mm;
+            }
+          else
+            msg = "X11 display has no default screen";
+
+          XCloseDisplay (display);
+
+          *dpy_avail = 1;
+        }
+      else
+        msg = "unable to open X11 DISPLAY";
+    }
+  else
+    msg = "X11 DISPLAY environment variable not set";
+
+#else
+
+  msg = "no graphical display found";
+
+#endif
+
+  return msg;
+}
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/cdisplay.h
@@ -0,0 +1,38 @@
+/*
+
+Copyright (C) 2014-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_cdisplay_h)
+#define octave_cdisplay_h 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+OCTINTERP_API extern const char *
+octave_get_display_info (int *ht, int *wd, int *dp, double *rx, double *ry,
+                         int *dpy_avail);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- a/libinterp/corefcn/cellfun.cc
+++ b/libinterp/corefcn/cellfun.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2005-2013 Mohamed Kamoun
-Copyright (C) 2006-2013 Bill Denney
+Copyright (C) 2005-2015 Mohamed Kamoun
+Copyright (C) 2006-2015 Bill Denney
 Copyright (C) 2009 Jaroslav Hajek
 Copyright (C) 2010 VZLU Prague
 
@@ -319,9 +319,9 @@
 \n\
 Additionally, @code{cellfun} accepts an arbitrary function @var{func}\n\
 in the form of an inline function, function handle, or the name of a\n\
-function (in a character string). The function can take one or more arguments,\n\
-with the inputs arguments given by @var{C}, @var{D}, etc.  Equally the\n\
-function can return one or more output arguments.  For example:\n\
+function (in a character string).  The function can take one or more\n\
+arguments, with the inputs arguments given by @var{C}, @var{D}, etc.  \n\
+Equally the function can return one or more output arguments.  For example:\n\
 \n\
 @example\n\
 @group\n\
@@ -440,7 +440,7 @@
 
       if (! valid_identifier (name))
         {
-          std::string fcn_name = unique_symbol_name ("__cellfun_fcn_");
+          std::string fcn_name = unique_symbol_name ("__cellfun_fcn__");
           std::string fname = "function y = " + fcn_name + "(x) y = ";
 
           octave_function *ptr_func
@@ -1193,7 +1193,7 @@
 
       if (! valid_identifier (name))
         {
-          std::string fcn_name = unique_symbol_name ("__arrayfun_fcn_");
+          std::string fcn_name = unique_symbol_name ("__arrayfun_fcn__");
           std::string fname = "function y = " + fcn_name + "(x) y = ";
 
           octave_function *ptr_func
@@ -1227,7 +1227,7 @@
       // fewer polymorphic function calls as the function gets called
       // for each value of the array.
 
-      if (! symbol_table_lookup )
+      if (! symbol_table_lookup)
         {
           if (func.is_function_handle ())
             {
@@ -1240,8 +1240,9 @@
               if (f -> is_overloaded ())
                 goto nevermind;
             }
-          octave_value f = symbol_table::find_function (func.function_value ()
-                                                         -> name ());
+          octave_value f
+            = symbol_table::find_function (func.function_value () -> name ());
+
           if (f.is_defined ())
             func = f;
         }
@@ -1783,7 +1784,8 @@
 
       NDA parray = array.permute (perm);
 
-      octave_idx_type nela = arraydv.numel (), nelc = celldv.numel ();
+      octave_idx_type nela = arraydv.numel ();
+      octave_idx_type nelc = celldv.numel ();
       parray = parray.reshape (dim_vector (nela, nelc));
 
       Cell retval (celldv);
@@ -1901,7 +1903,7 @@
       octave_value array = args(0);
       Array<int> dimv;
       if (nargin > 1)
-        dimv = args (1).int_vector_value (true);
+        dimv = args(1).int_vector_value (true);
 
       if (error_state)
         ;
@@ -2036,7 +2038,8 @@
   if (ivec >= 0)
     {
       // Vector split. Use 1D indexing.
-      octave_idx_type l = 0, nidx = (ivec == 0 ? nridx : ncidx);
+      octave_idx_type l = 0;
+      octave_idx_type nidx = (ivec == 0 ? nridx : ncidx);
       for (octave_idx_type i = 0; i < nidx; i++)
         {
           octave_idx_type u = l + d[ivec](i);
--- a/libinterp/corefcn/colloc.cc
+++ b/libinterp/corefcn/colloc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -38,8 +38,8 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {[@var{r}, @var{amat}, @var{bmat}, @var{q}] =} colloc (@var{n}, \"left\", \"right\")\n\
 Compute derivative and integral weight matrices for orthogonal\n\
-collocation using the subroutines given in J. Villadsen and\n\
-M. L. Michelsen, @cite{Solution of Differential Equation Models by\n\
+collocation using the subroutines given in @nospell{J. Villadsen} and\n\
+@nospell{M. L. Michelsen}, @cite{Solution of Differential Equation Models by\n\
 Polynomial Approximation}.\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/comment-list.cc
+++ b/libinterp/corefcn/comment-list.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/comment-list.h
+++ b/libinterp/corefcn/comment-list.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/conv2.cc
+++ b/libinterp/corefcn/conv2.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 Andy Adler
+Copyright (C) 1999-2015 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/libinterp/corefcn/cutils.c
+++ b/libinterp/corefcn/cutils.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -53,8 +53,3 @@
   nanosleep (&delay, &remaining);
 }
 
-int
-octave_raw_vsnprintf (char *buf, size_t n, const char *fmt, va_list args)
-{
-  return vsnprintf (buf, n, fmt, args);
-}
--- a/libinterp/corefcn/cutils.h
+++ b/libinterp/corefcn/cutils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,9 +33,6 @@
 
 OCTINTERP_API void octave_usleep (unsigned int useconds);
 
-OCTINTERP_API int
-octave_raw_vsnprintf (char *buf, size_t n, const char *fmt, va_list args);
-
 #ifdef __cplusplus
 }
 #endif
--- a/libinterp/corefcn/daspk.cc
+++ b/libinterp/corefcn/daspk.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/dasrt.cc
+++ b/libinterp/corefcn/dasrt.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/dassl.cc
+++ b/libinterp/corefcn/dassl.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/data.cc
+++ b/libinterp/corefcn/data.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague
 Copyright (C) 2012 Carlo de Falco
@@ -112,15 +112,15 @@
 @deftypefn  {Built-in Function} {} all (@var{x})\n\
 @deftypefnx {Built-in Function} {} all (@var{x}, @var{dim})\n\
 For a vector argument, return true (logical 1) if all elements of the vector\n\
-are non-zero.\n\
+are nonzero.\n\
 \n\
 For a matrix argument, return a row vector of logical ones and\n\
 zeros with each element indicating whether all of the elements of the\n\
-corresponding column of the matrix are non-zero.  For example:\n\
+corresponding column of the matrix are nonzero.  For example:\n\
 \n\
 @example\n\
 @group\n\
-all ([2, 3; 1, 0]))\n\
+all ([2, 3; 1, 0])\n\
     @result{} [ 1, 0 ]\n\
 @end group\n\
 @end example\n\
@@ -159,11 +159,11 @@
 @deftypefn  {Built-in Function} {} any (@var{x})\n\
 @deftypefnx {Built-in Function} {} any (@var{x}, @var{dim})\n\
 For a vector argument, return true (logical 1) if any element of the vector\n\
-is non-zero.\n\
+is nonzero.\n\
 \n\
 For a matrix argument, return a row vector of logical ones and\n\
 zeros with each element indicating whether any of the elements of the\n\
-corresponding column of the matrix are non-zero.  For example:\n\
+corresponding column of the matrix are nonzero.  For example:\n\
 \n\
 @example\n\
 @group\n\
@@ -333,7 +333,8 @@
 {
   octave_value retval;
 
-  octave_value arg0 = x, arg1 = y;
+  octave_value arg0 = x;
+  octave_value arg1 = y;
   if (! arg0.is_numeric_type ())
     gripe_wrong_type_arg ("hypot", arg0);
   else if (! arg1.is_numeric_type ())
@@ -575,8 +576,7 @@
 
 DEFUN (rem, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Mapping Function} {} rem (@var{x}, @var{y})\n\
-@deftypefnx {Mapping Function} {} fmod (@var{x}, @var{y})\n\
+@deftypefn {Mapping Function} {} rem (@var{x}, @var{y})\n\
 Return the remainder of the division @code{@var{x} / @var{y}}, computed\n\
 using the expression\n\
 \n\
@@ -621,7 +621,7 @@
                     X##NDArray a1 = args(1).X##_array_value (); \
                     retval = binmap<octave_##X,octave_##X,octave_##X> (a0, a1, rem, "rem"); \
                     } \
-                  break
+                  break;
                 MAKE_INT_BRANCH (int8);
                 MAKE_INT_BRANCH (int16);
                 MAKE_INT_BRANCH (int32);
@@ -676,11 +676,11 @@
 }
 
 /*
-%!assert (size (fmod (zeros (0, 2), zeros (0, 2))), [0, 2])
-%!assert (size (fmod (rand (2, 3, 4), zeros (2, 3, 4))), [2, 3, 4])
-%!assert (size (fmod (rand (2, 3, 4), 1)), [2, 3, 4])
-%!assert (size (fmod (1, rand (2, 3, 4))), [2, 3, 4])
-%!assert (size (fmod (1, 2)), [1, 1])
+%!assert (size (rem (zeros (0, 2), zeros (0, 2))), [0, 2])
+%!assert (size (rem (rand (2, 3, 4), zeros (2, 3, 4))), [2, 3, 4])
+%!assert (size (rem (rand (2, 3, 4), 1)), [2, 3, 4])
+%!assert (size (rem (1, rand (2, 3, 4))), [2, 3, 4])
+%!assert (size (rem (1, 2)), [1, 1])
 
 %!assert (rem ([1, 2, 3; -1, -2, -3], 2), [1, 0, 1; -1, 0, -1])
 %!assert (rem ([1, 2, 3; -1, -2, -3], 2 * ones (2, 3)),[1, 0, 1; -1, 0, -1])
@@ -726,8 +726,6 @@
 %!assert (rem (0.94, 0.01), 0.0);
 */
 
-DEFALIAS (fmod, rem)
-
 DEFUN (mod, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} mod (@var{x}, @var{y})\n\
@@ -780,7 +778,7 @@
                     X##NDArray a1 = args(1).X##_array_value (); \
                     retval = binmap<octave_##X,octave_##X,octave_##X> (a0, a1, mod, "mod"); \
                     } \
-                  break
+                  break;
                 MAKE_INT_BRANCH (int8);
                 MAKE_INT_BRANCH (int16);
                 MAKE_INT_BRANCH (int32);
@@ -906,16 +904,13 @@
     { \
       std::string str = args(nargin - 1).string_value (); \
       \
-      if (! error_state) \
-        { \
-          if (str == "native") \
-            isnative = true; \
-          else if (str == "double") \
-            isdouble = true; \
-          else \
-            error ("sum: unrecognized string argument"); \
-          nargin --; \
-        } \
+      if (str == "native") \
+        isnative = true; \
+      else if (str == "double") \
+        isdouble = true; \
+      else \
+        error ("sum: unrecognized string argument"); \
+      nargin --; \
     } \
   \
   if (nargin == 1 || nargin == 2) \
@@ -1200,16 +1195,13 @@
     {
       std::string str = args(nargin - 1).string_value ();
 
-      if (! error_state)
-        {
-          if (str == "native")
-            isnative = true;
-          else if (str == "double")
-            isdouble = true;
-          else
-            error ("sum: unrecognized string argument");
-          nargin --;
-        }
+      if (str == "native")
+        isnative = true;
+      else if (str == "double")
+        isdouble = true;
+      else
+        error ("cumsum: unrecognized string argument");
+      nargin --;
     }
 
   if (error_state)
@@ -1262,7 +1254,7 @@
                 retval = arg.X ## _array_value ().cumsum (dim); \
               else \
                 retval = arg.array_value ().cumsum (dim); \
-              break
+              break;
             MAKE_INT_BRANCH (int8);
             MAKE_INT_BRANCH (int16);
             MAKE_INT_BRANCH (int32);
@@ -1332,8 +1324,8 @@
 @deftypefnx {Built-in Function} {@var{v} =} diag (@var{M}, @var{k})\n\
 Return a diagonal matrix with vector @var{v} on diagonal @var{k}.  The\n\
 second argument is optional.  If it is positive, the vector is placed on\n\
-the @var{k}-th super-diagonal.  If it is negative, it is placed on the\n\
-@var{-k}-th sub-diagonal.  The default value of @var{k} is 0, and the\n\
+the @var{k}-th superdiagonal.  If it is negative, it is placed on the\n\
+@var{-k}-th subdiagonal.  The default value of @var{k} is 0, and the\n\
 vector is placed on the main diagonal.  For example:\n\
 \n\
 @example\n\
@@ -1438,6 +1430,11 @@
 %!assert (diag ({1}, 2, 3), {1,[],[]; [],[],[]});
 %!assert (diag ({1,2}, 3, 4), {1,[],[],[]; [],2,[],[]; [],[],[],[]});
 
+## Test out-of-range diagonals
+%!assert (diag (ones (3,3), 4), zeros (0, 1))
+%!assert (diag (cell (3,3), 4), cell (0, 1))
+%!assert (diag (sparse (ones (3,3)), 4), sparse (zeros (0, 1)))
+
 %% Test input validation
 %!error <Invalid call to diag> diag ()
 %!error <Invalid call to diag> diag (1,2,3,4)
@@ -1458,12 +1455,141 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} prod (@var{x})\n\
 @deftypefnx {Built-in Function} {} prod (@var{x}, @var{dim})\n\
-Product of elements along dimension @var{dim}.  If @var{dim} is\n\
-omitted, it defaults to the first non-singleton dimension.\n\
+@deftypefnx {Built-in Function} {} prod (@dots{}, \"native\")\n\
+@deftypefnx {Built-in Function} {} prod (@dots{}, \"double\")\n\
+Product of elements along dimension @var{dim}.\n\
+\n\
+If @var{dim} is omitted, it defaults to the first non-singleton dimension.\n\
+\n\
+The optional @qcode{\"type\"} input determines the class of the variable\n\
+used for calculations.  If the argument @qcode{\"native\"} is given, then\n\
+the operation is performed in the same type as the original argument, rather\n\
+than the default double type.\n\
+\n\
+For example:\n\
+\n\
+@example\n\
+@group\n\
+prod ([true, true])\n\
+   @result{} 1\n\
+prod ([true, true], \"native\")\n\
+   @result{} true\n\
+@end group\n\
+@end example\n\
+\n\
+On the contrary, if @qcode{\"double\"} is given, the operation is performed\n\
+in double precision even for single precision inputs.\n\
 @seealso{cumprod, sum}\n\
 @end deftypefn")
 {
-  DATA_REDUCTION (prod);
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  bool isnative = false;
+  bool isdouble = false;
+
+  if (nargin > 1 && args(nargin - 1).is_string ())
+    {
+      std::string str = args(nargin - 1).string_value ();
+
+      if (str == "native")
+        isnative = true;
+      else if (str == "double")
+        isdouble = true;
+      else
+        error ("prod: unrecognized type argument '%s'", str.c_str ());
+      nargin --;
+    }
+
+  if (error_state)
+    return retval;
+
+  if (nargin == 1 || nargin == 2)
+    {
+      octave_value arg = args(0);
+
+      int dim = -1;
+      if (nargin == 2)
+        {
+          dim = args(1).int_value () - 1;
+          if (dim < 0)
+            error ("prod: invalid dimension DIM = %d", dim + 1);
+        }
+
+      if (! error_state)
+        {
+          switch (arg.builtin_type ())
+            {
+            case btyp_double:
+              if (arg.is_sparse_type ())
+                retval = arg.sparse_matrix_value ().prod (dim);
+              else
+                retval = arg.array_value ().prod (dim);
+              break;
+            case btyp_complex:
+              if (arg.is_sparse_type ())
+                retval = arg.sparse_complex_matrix_value ().prod (dim);
+              else
+                retval = arg.complex_array_value ().prod (dim);
+              break;
+            case btyp_float:
+              if (isdouble)
+                retval = arg.float_array_value ().dprod (dim);
+              else
+                retval = arg.float_array_value ().prod (dim);
+              break;
+            case btyp_float_complex:
+              if (isdouble)
+                retval = arg.float_complex_array_value ().dprod (dim);
+              else
+                retval = arg.float_complex_array_value ().prod (dim);
+              break;
+
+#define MAKE_INT_BRANCH(X) \
+            case btyp_ ## X: \
+              if (isnative) \
+                retval = arg.X ## _array_value ().prod (dim); \
+              else \
+                retval = arg.array_value ().prod (dim); \
+              break;
+            MAKE_INT_BRANCH (int8);
+            MAKE_INT_BRANCH (int16);
+            MAKE_INT_BRANCH (int32);
+            MAKE_INT_BRANCH (int64);
+            MAKE_INT_BRANCH (uint8);
+            MAKE_INT_BRANCH (uint16);
+            MAKE_INT_BRANCH (uint32);
+            MAKE_INT_BRANCH (uint64);
+#undef MAKE_INT_BRANCH
+
+            // GAGME: Accursed Matlab compatibility...
+            case btyp_char:
+              retval = arg.array_value (true).prod (dim);
+              break;
+            case btyp_bool:
+              if (arg.is_sparse_type ())
+                {
+                  if (isnative)
+                    retval = arg.sparse_bool_matrix_value ().all (dim);
+                  else
+                    retval = arg.sparse_matrix_value ().prod (dim);
+                }
+              else if (isnative)
+                retval = arg.bool_array_value ().all (dim);
+              else
+                retval = NDArray (arg.bool_array_value ().all (dim));
+              break;
+
+            default:
+              gripe_wrong_type_arg ("prod", arg);
+            }
+        }
+    }
+  else
+    print_usage ();
+
+  return retval;
 }
 
 /*
@@ -1477,6 +1603,13 @@
 %!assert (prod (single ([i, 2+i, -3+2i, 4])), single (-4 - 32i))
 %!assert (prod (single ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i])), single ([-1+i, -8+8i, -27+27i]))
 
+%% Test sparse
+%!assert (prod (sparse ([1, 2, 3])), sparse (6))
+%!assert (prod (sparse ([-1; -2; -3])), sparse (-6))
+## Commented out until bug #42290 is fixed
+#%!assert (prod (sparse ([i, 2+i, -3+2i, 4])), sparse (-4 - 32i))
+#%!assert (prod (sparse ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i])), sparse ([-1+i, -8+8i, -27+27i]))
+
 %!assert (prod ([1, 2; 3, 4], 1), [3, 8])
 %!assert (prod ([1, 2; 3, 4], 2), [2; 12])
 %!assert (prod (zeros (1, 0)), 1)
@@ -1507,7 +1640,24 @@
 %!assert (prod (zeros (0, 2, "single"), 1), single ([1, 1]))
 %!assert (prod (zeros (0, 2, "single"), 2), zeros (0, 1, "single"))
 
+%% Test "double" type argument
+%!assert (prod (single ([1, 2, 3]), "double"), 6)
+%!assert (prod (single ([-1; -2; -3]), "double"), -6)
+%!assert (prod (single ([i, 2+i, -3+2i, 4]), "double"), -4 - 32i)
+%!assert (prod (single ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i]), "double"), [-1+i, -8+8i, -27+27i])
+
+%% Test "native" type argument
+%!assert (prod (uint8 ([1, 2, 3]), "native"), uint8 (6))
+%!assert (prod (uint8 ([-1; -2; -3]), "native"), uint8 (0))
+%!assert (prod (int8 ([1, 2, 3]), "native"), int8 (6))
+%!assert (prod (int8 ([-1; -2; -3]), "native"), int8 (-6))
+%!assert (prod ([true false; true true], "native"), [true false])
+%!assert (prod ([true false; true true], 2, "native"), [false; true])
+
+%% Test input validation
 %!error prod ()
+%!error prod (1,2,3)
+%!error <unrecognized type argument 'foobar'> prod (1, "foobar")
 */
 
 static bool
@@ -1928,7 +2078,7 @@
           // and then directly resize. However, for some types there might
           // be some additional setup needed, and so this should be avoided.
 
-          octave_value tmp = args (0);
+          octave_value tmp = args(0);
           tmp = tmp.resize (dim_vector (0,0)).resize (dv);
 
           if (error_state)
@@ -1942,12 +2092,12 @@
               // Can't fast return here to skip empty matrices as something
               // like cat (1,[],single ([])) must return an empty matrix of
               // the right type.
-              tmp = do_cat_op (tmp, args (j), ra_idx);
+              tmp = do_cat_op (tmp, args(j), ra_idx);
 
               if (error_state)
                 return retval;
 
-              dim_vector dv_tmp = args (j).dims ();
+              dim_vector dv_tmp = args(j).dims ();
 
               if (dim >= dv_len)
                 {
@@ -2406,8 +2556,8 @@
 %!assert (cat (3, [], [], [1,2;3,4]), [1,2;3,4])
 %!assert (cat (4, [], [], [1,2;3,4]), [1,2;3,4])
 
-%!assert ([zeros(3,2,2); ones(1,2,2)], repmat ([0;0;0;1],[1,2,2]) )
-%!assert ([zeros(3,2,2); ones(1,2,2)], vertcat (zeros (3,2,2), ones (1,2,2)) )
+%!assert ([zeros(3,2,2); ones(1,2,2)], repmat ([0;0;0;1],[1,2,2]))
+%!assert ([zeros(3,2,2); ones(1,2,2)], vertcat (zeros (3,2,2), ones (1,2,2)))
 
 %!error <dimension mismatch> cat (3, cat (3, [], []), [1,2;3,4])
 %!error <dimension mismatch> cat (3, zeros (0, 0, 2), [1,2;3,4])
@@ -2447,6 +2597,27 @@
 Return the generalized transpose for an N-D array object @var{A}.\n\
 The permutation vector @var{perm} must contain the elements\n\
 @code{1:ndims (A)} (in any order, but each element must appear only once).\n\
+\n\
+The @var{N}th dimension of @var{A} gets remapped to dimension \n\
+@code{@var{PERM}(@var{N})}.  For example:\n\
+\n\
+@example\n\
+@group\n\
+@var{x} = zeros ([2, 3, 5, 7]);\n\
+size (@var{x})\n\
+   @result{}  2   3   5   7\n\
+\n\
+size (permute (@var{x}, [2, 1, 3, 4]))\n\
+   @result{}  3   2   5   7\n\
+\n\
+size (permute (@var{x}, [1, 3, 4, 2]))\n\
+   @result{}  2   5   7   3\n\
+\n\
+## The identity permutation\n\
+size (permute (@var{x}, [1, 2, 3, 4]))\n\
+   @result{}  2   3   5   7\n\
+@end group\n\
+@end example\n\
 @seealso{ipermute}\n\
 @end deftypefn")
 {
@@ -2693,7 +2864,7 @@
 DEFUN (nnz, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {@var{n} =} nnz (@var{a})\n\
-Return the number of non-zero elements in @var{a}.\n\
+Return the number of nonzero elements in @var{a}.\n\
 @seealso{nzmax, nonzeros, find}\n\
 @end deftypefn")
 {
@@ -2769,12 +2940,16 @@
 @deftypefnx {Built-in Function} {} sum (@dots{}, \"native\")\n\
 @deftypefnx {Built-in Function} {} sum (@dots{}, \"double\")\n\
 @deftypefnx {Built-in Function} {} sum (@dots{}, \"extra\")\n\
-Sum of elements along dimension @var{dim}.  If @var{dim} is\n\
-omitted, it defaults to the first non-singleton dimension.\n\
-\n\
-If the optional argument @qcode{\"native\"} is given, then the sum is\n\
-performed in the same type as the original argument, rather than in the\n\
-default double type.  For example:\n\
+Sum of elements along dimension @var{dim}.\n\
+\n\
+If @var{dim} is omitted, it defaults to the first non-singleton dimension.\n\
+\n\
+The optional @qcode{\"type\"} input determines the class of the variable\n\
+used for calculations.  If the argument @qcode{\"native\"} is given, then\n\
+the operation is performed in the same type as the original argument, rather\n\
+than the default double type.\n\
+\n\
+For example:\n\
 \n\
 @example\n\
 @group\n\
@@ -2788,8 +2963,8 @@
 On the contrary, if @qcode{\"double\"} is given, the sum is performed in\n\
 double precision even for single precision inputs.\n\
 \n\
-For double precision inputs, @qcode{\"extra\"} indicates that a more accurate\n\
-algorithm than straightforward summation is to be used.  For single precision\n\
+For double precision inputs, the @qcode{\"extra\"} option will use a more\n\
+accurate algorithm than straightforward summation.  For single precision\n\
 inputs, @qcode{\"extra\"} is the same as @qcode{\"double\"}.  Otherwise,\n\
 @qcode{\"extra\"} has no effect.\n\
 @seealso{cumsum, sumsq, prod}\n\
@@ -2807,18 +2982,15 @@
     {
       std::string str = args(nargin - 1).string_value ();
 
-      if (! error_state)
-        {
-          if (str == "native")
-            isnative = true;
-          else if (str == "double")
-            isdouble = true;
-          else if (str == "extra")
-            isextra = true;
-          else
-            error ("sum: unrecognized string argument");
-          nargin --;
-        }
+      if (str == "native")
+        isnative = true;
+      else if (str == "double")
+        isdouble = true;
+      else if (str == "extra")
+        isextra = true;
+      else
+        error ("sum: unrecognized type argument '%s'", str.c_str ());
+      nargin --;
     }
 
   if (error_state)
@@ -2883,7 +3055,7 @@
                 retval = arg.X ## _array_value ().sum (dim); \
               else \
                 retval = arg.X ## _array_value ().dsum (dim); \
-              break
+              break;
             MAKE_INT_BRANCH (int8);
             MAKE_INT_BRANCH (int16);
             MAKE_INT_BRANCH (int32);
@@ -2893,7 +3065,8 @@
             MAKE_INT_BRANCH (uint32);
             MAKE_INT_BRANCH (uint64);
 #undef MAKE_INT_BRANCH
-              // GAGME: Accursed Matlab compatibility...
+
+            // GAGME: Accursed Matlab compatibility...
             case btyp_char:
               if (isextra)
                 retval = arg.array_value (true).xsum (dim);
@@ -2926,11 +3099,6 @@
 }
 
 /*
-%!assert (sum ([true,true]), 2)
-%!assert (sum ([true,true],"native"), true)
-%!assert (sum (int8 ([127,10,-20])), 117)
-%!assert (sum (int8 ([127,10,-20]),'native'), int8 (107))
-
 %!assert (sum ([1, 2, 3]), 6)
 %!assert (sum ([-1; -2; -3]), -6)
 %!assert (sum ([i, 2+i, -3+2i, 4]), 3+4i)
@@ -2981,10 +3149,18 @@
 %!assert (sum (zeros (2, 2, 0, 3, "single"), 4), zeros (2, 2, 0, "single"))
 %!assert (sum (zeros (2, 2, 0, 3, "single"), 7), zeros (2, 2, 0, 3, "single"))
 
+## Test "native"
+%!assert (sum ([true,true]), 2)
+%!assert (sum ([true,true], "native"), true)
+%!assert (sum (int8 ([127,10,-20])), 117)
+%!assert (sum (int8 ([127,10,-20]), "native"), int8 (107))
+
 ;-)
 %!assert (sum ("Octave") + "8", sumsq (primes (17)))
 
 %!error sum ()
+%!error sum (1,2,3)
+%!error <unrecognized type argument 'foobar'> sum (1, "foobar")
 */
 
 DEFUN (sumsq, args, ,
@@ -3495,25 +3671,98 @@
 %!assert (isnumeric (sparse ([true, false])), false)
 */
 
-DEFUN (ismatrix, args, ,
+DEFUN (isscalar, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} ismatrix (@var{a})\n\
-Return true if @var{a} is a numeric, logical, or character matrix.\n\
-Scalars (1x1 matrices) and vectors (@nospell{1xN} or @nospell{Nx1} matrices)\n\
-are subsets of the more general N-dimensional matrix and @code{ismatrix}\n\
-will return true for these objects as well.\n\
-@seealso{isscalar, isvector, iscell, isstruct, issparse, isa}\n\
+@deftypefn {Built-in Function} {} isscalar (@var{x})\n\
+Return true if @var{x} is a scalar.\n\
+@seealso{isvector, ismatrix}\n\
 @end deftypefn")
 {
-  octave_value retval = false;
+  octave_value retval;
+
+  if (args.length () == 1)
+    retval = args(0).numel () == 1;
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+%!assert (isscalar (1))
+%!assert (isscalar ([1, 2]), false)
+%!assert (isscalar ([]), false)
+%!assert (isscalar ([1, 2; 3, 4]), false)
+
+%!assert (isscalar ("t"))
+%!assert (isscalar ("test"), false)
+%!assert (isscalar (["test"; "ing"]), false)
+
+%!test
+%! s.a = 1;
+%! assert (isscalar (s));
+
+%% Test input validation
+%!error isscalar ()
+%!error isscalar (1, 2)
+*/
+
+DEFUN (isvector, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Function File} {} isvector (@var{x})\n\
+Return true if @var{x} is a vector.\n\
+\n\
+A vector is a 2-D array where one of the dimensions is equal to 1.  As a\n\
+consequence a 1x1 array, or scalar, is also a vector.\n\
+@seealso{isscalar, ismatrix, size, rows, columns, length}\n\
+@end deftypefn")
+{
+  octave_value retval;
 
   if (args.length () == 1)
     {
-      octave_value arg = args(0);
-
-      retval = arg.is_matrix_type ()
-               || arg.is_scalar_type ()
-               || arg.is_range ();
+      dim_vector sz = args(0).dims ();
+      retval = sz.length () == 2 && (sz(0) == 1 || sz(1) == 1);
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+%!assert (isvector (1), true)
+%!assert (isvector ([1; 2; 3]), true)
+%!assert (isvector ([1, 2, 3]), true)
+%!assert (isvector ([]), false)
+%!assert (isvector ([1, 2; 3, 4]), false)
+
+%!assert (isvector ("t"), true)
+%!assert (isvector ("test"), true)
+%!assert (isvector (["test"; "ing"]), false)
+
+%!test
+%! s.a = 1;
+%! assert (isvector (s), true);
+
+%% Test input validation
+%!error isvector ()
+%!error isvector ([1, 2], 2)
+*/
+
+DEFUN (isrow, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Function File} {} isrow (@var{x})\n\
+Return true if @var{x} is a row vector 1xN with non-negative N.\n\
+@seealso{iscolumn, isscalar, isvector, ismatrix}\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      dim_vector sz = args(0).dims ();
+      retval = sz.length () == 2 && sz(0) == 1;
     }
   else
     print_usage ();
@@ -3522,29 +3771,173 @@
 }
 
 /*
-%!assert (ismatrix ([]))
-%!assert (ismatrix (1))
-%!assert (ismatrix ([1, 2, 3]))
-%!assert (ismatrix ([1, 2; 3, 4]))
-%!assert (ismatrix (zeros (3, 2, 4)))
-
-%!assert (ismatrix (single ([])))
-%!assert (ismatrix (single (1)))
-%!assert (ismatrix (single ([1, 2, 3])))
-%!assert (ismatrix (single ([1, 2; 3, 4])))
-
-%!assert (ismatrix ("t"))
-%!assert (ismatrix ("test"))
-%!assert (ismatrix (["test"; "ing"]))
+%!assert (isrow ([1, 2, 3]))
+%!assert (isrow ([1; 2; 3]), false)
+%!assert (isrow (1))
+%!assert (isrow ([]), false)
+%!assert (isrow ([1, 2; 3, 4]), false)
+
+%!assert (isrow (ones (1, 0)), true)
+%!assert (isrow (ones (1, 1)), true)
+%!assert (isrow (ones (1, 2)), true)
+%!assert (isrow (ones (1, 1, 1)), true)
+%!assert (isrow (ones (1, 1, 1, 1)), true)
+
+%!assert (isrow (ones (0, 0)), false)
+%!assert (isrow (ones (1, 1, 0)), false)
+
+
+%!assert (isrow ("t"), true)
+%!assert (isrow ("test"), true)
+%!assert (isrow (["test"; "ing"]), false)
+
+%!test
+%! s.a = 1;
+%! assert (isrow (s), true);
+
+%% Test input validation
+%!error isrow ()
+%!error isrow ([1, 2], 2)
+*/
+
+DEFUN (iscolumn, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Function File} {} iscolumn (@var{x})\n\
+Return true if @var{x} is a column vector Nx1 with non-negative N.\n\
+@seealso{isrow, isscalar, isvector, ismatrix}\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      dim_vector sz = args(0).dims ();
+      retval = sz.length () == 2 && sz(1) == 1;
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+%!assert (iscolumn ([1, 2, 3]), false)
+%!assert (iscolumn ([1; 2; 3]), true)
+%!assert (iscolumn (1), true)
+%!assert (iscolumn ([]), false)
+%!assert (iscolumn ([1, 2; 3, 4]), false)
+
+%!assert (iscolumn ("t"), true)
+%!assert (iscolumn ("test"), false)
+%!assert (iscolumn (["test"; "ing"]), false)
+
+%!assert (iscolumn (ones (0, 1)), true)
+%!assert (iscolumn (ones (1, 1)), true)
+%!assert (iscolumn (ones (2, 1)), true)
+%!assert (iscolumn (ones (1, 1, 1)), true)
+%!assert (iscolumn (ones (1, 1, 1, 1)), true)
+
+%!assert (iscolumn (ones (0, 0)), false)
+%!assert (iscolumn (ones (0, 1, 0)), false)
 
 %!test
 %! s.a = 1;
-%! assert (ismatrix (s), false);
+%! assert (iscolumn (s));
+
+%% Test input validation
+%!error iscolumn ()
+%!error iscolumn ([1, 2], 2)
+*/
+
+DEFUN (ismatrix, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} ismatrix (@var{a})\n\
+Return true if @var{a} is a 2-D array.\n\
+@seealso{isscalar, isvector, iscell, isstruct, issparse, isa}\n\
+@end deftypefn")
+{
+  octave_value retval = false;
+
+  if (args.length () == 1)
+    {
+      dim_vector sz = args(0).dims ();
+      retval = (sz.length () == 2) && (sz(0) >= 0) && (sz(1) >= 0);
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+%!assert (ismatrix ([]), true)
+%!assert (ismatrix (1), true)
+%!assert (ismatrix ([1, 2, 3]), true)
+%!assert (ismatrix ([1, 2; 3, 4]), true)
+
+%!assert (ismatrix (zeros (0)), true)
+%!assert (ismatrix (zeros (0, 0)), true)
+%!assert (ismatrix (zeros (0, 0, 0)), false)
+%!assert (ismatrix (zeros (3, 2, 4)), false)
+
+%!assert (ismatrix (single ([])), true)
+%!assert (ismatrix (single (1)), true)
+%!assert (ismatrix (single ([1, 2, 3])), true)
+%!assert (ismatrix (single ([1, 2; 3, 4])), true)
+
+%!assert (ismatrix ("t"), true)
+%!assert (ismatrix ("test"), true)
+%!assert (ismatrix (["test"; "ing"]), true)
+
+%!test
+%! s.a = 1;
+%! assert (ismatrix (s), true);
 
 %!error ismatrix ()
 %!error ismatrix ([1, 2; 3, 4], 2)
 */
 
+DEFUN (issquare, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Function File} {} issquare (@var{x})\n\
+Return true if @var{x} is a square matrix.\n\
+@seealso{isscalar, isvector, ismatrix, size}\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      dim_vector sz = args(0).dims ();
+      retval = sz.length () == 2 && sz(0) == sz(1);
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+%!assert (issquare ([]))
+%!assert (issquare (1))
+%!assert (! issquare ([1, 2]))
+%!assert (issquare ([1, 2; 3, 4]))
+%!assert (! issquare ([1, 2; 3, 4; 5, 6]))
+%!assert (! issquare (ones (3,3,3)))
+%!assert (issquare ("t"))
+%!assert (! issquare ("test"))
+%!assert (issquare (["test"; "ing"; "1"; "2"]))
+%!test
+%! s.a = 1;
+%! assert (issquare (s));
+%!assert (issquare ({1, 2; 3, 4}))
+%!assert (sparse (([1, 2; 3, 4])))
+
+%% Test input validation
+%!error issquare ()
+%!error issquare ([1, 2; 3, 4], 2)
+*/
+
 static octave_value
 fill_matrix (const octave_value_list& args, int val, const char *fcn)
 {
@@ -3814,7 +4207,7 @@
           switch (dt)
             {
             case oct_data_conv::dt_single:
-              retval = FloatNDArray (dims, static_cast <float> (val));
+              retval = FloatNDArray (dims, static_cast<float> (val));
               break;
 
             case oct_data_conv::dt_double:
@@ -4263,8 +4656,8 @@
                     {
                       int expon;
                       gnulib::frexpf (val, &expon);
-                      epsval(i) = std::pow (static_cast <float> (2.0),
-                                            static_cast <float> (expon - 24));
+                      epsval(i) = std::pow (2.0f,
+                                            static_cast<float> (expon - 24));
                     }
                 }
               retval = epsval;
@@ -4289,8 +4682,8 @@
                     {
                       int expon;
                       gnulib::frexp (val, &expon);
-                      epsval(i) = std::pow (static_cast <double> (2.0),
-                                            static_cast <double> (expon - 53));
+                      epsval(i) = std::pow (2.0,
+                                            static_cast<double> (expon - 53));
                     }
                   retval = epsval;
                 }
@@ -4690,7 +5083,7 @@
 @equiv{}\n\
 eye (2, 2)\n\
 @equiv{}\n\
-eye (size ([1, 2; 3, 4])\n\
+eye (size ([1, 2; 3, 4]))\n\
 @end group\n\
 @end example\n\
 \n\
@@ -5436,7 +5829,7 @@
 %!assert (norm (x,"inf"), single (7))
 %!assert (norm (x,"fro"), single (10), -eps ("single"))
 %!assert (norm (x), single (10))
-%!assert (norm (single ([1e200, 1])), single (1e200))
+%!assert (norm (single ([1e38, 1])), single (1e38))
 %!assert (norm (single ([3+4i, 3-4i, sqrt(31)])), single (9), -4*eps ("single"))
 %!shared m
 %! m = single (magic (4));
@@ -5485,9 +5878,10 @@
 
 DEFUN (not, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} not (@var{x})\n\
-Return the logical NOT of @var{x}.  This function is equivalent to\n\
-@code{! x}.\n\
+@deftypefn {Built-in Function} {@var{z} =} not (@var{x})\n\
+Return the logical NOT of @var{x}.\n\
+\n\
+This function is equivalent to the operator syntax @w{@code{! x}}.\n\
 @seealso{and, or, xor}\n\
 @end deftypefn")
 {
@@ -5826,12 +6220,13 @@
 
 DEFUN (and, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} and (@var{x}, @var{y})\n\
-@deftypefnx {Built-in Function} {} and (@var{x1}, @var{x2}, @dots{})\n\
+@deftypefn  {Built-in Function} {@var{z} =} and (@var{x}, @var{y})\n\
+@deftypefnx {Built-in Function} {@var{z} =} and (@var{x1}, @var{x2}, @dots{})\n\
 Return the logical AND of @var{x} and @var{y}.\n\
-This function is equivalent to @w{@code{x & y}}.\n\
-If more arguments are given, the logical and is applied\n\
-cumulatively from left to right:\n\
+\n\
+This function is equivalent to the operator syntax @w{@code{x & y}}.  If\n\
+more than two arguments are given, the logical AND is applied cumulatively\n\
+from left to right:\n\
 \n\
 @example\n\
 (@dots{}((x1 & x2) & x3) & @dots{})\n\
@@ -5847,12 +6242,13 @@
 
 DEFUN (or, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} or (@var{x}, @var{y})\n\
-@deftypefnx {Built-in Function} {} or (@var{x1}, @var{x2}, @dots{})\n\
+@deftypefn  {Built-in Function} {@var{z} =} or (@var{x}, @var{y})\n\
+@deftypefnx {Built-in Function} {@var{z} =} or (@var{x1}, @var{x2}, @dots{})\n\
 Return the logical OR of @var{x} and @var{y}.\n\
-This function is equivalent to @w{@code{x | y}}.\n\
-If more arguments are given, the logical or is applied\n\
-cumulatively from left to right:\n\
+\n\
+This function is equivalent to the operator syntax @w{@code{x | y}}.  If\n\
+more than two arguments are given, the logical OR is applied cumulatively\n\
+from left to right:\n\
 \n\
 @example\n\
 (@dots{}((x1 | x2) | x3) | @dots{})\n\
@@ -5866,6 +6262,38 @@
                                      octave_value::op_el_or_eq, args);
 }
 
+DEFUN (colon, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{r} =} colon (@var{base}, @var{limit})\n\
+@deftypefnx {Built-in Function} {@var{r} =} colon (@var{base}, @var{increment}, @var{limit})\n\
+Return the result of the colon expression corresponding to @var{base},\n\
+@var{limit}, and optionally, @var{increment}.\n\
+\n\
+This function is equivalent to the operator syntax @w{@code{base : limit}}\n\
+or @w{@code{base : increment : limit}}.\n\
+@end deftypefn")
+{
+  octave_value retval;
+  int nargin = args.length ();
+
+  switch (nargin)
+    {
+    case 2:
+      retval = do_colon_op (args(0), args(1));
+      break;
+
+    case 3:
+      retval = do_colon_op (args(0), args(1), args (2));
+      break;
+
+    default:
+      print_usage ();
+      break;
+    }
+
+  return retval;
+}
+
 static double tic_toc_timestamp = -1.0;
 
 DEFUN (tic, args, nargout,
@@ -6465,18 +6893,20 @@
   // FIXME: shouldn't these modes be scoped inside a class?
   sortmode smode = UNSORTED;
 
-  std::string mode = arg.string_value ();
-
-  if (error_state)
-    error ("issorted: expecting %s argument to be a character string", argn);
-  else if (mode == "ascending")
-    smode = ASCENDING;
-  else if (mode == "descending")
-    smode = DESCENDING;
-  else if (mode == "either")
-    smode = UNSORTED;
+  if (arg.is_string ())
+    {
+      std::string mode = arg.string_value ();
+      if (mode == "ascending")
+        smode = ASCENDING;
+      else if (mode == "descending")
+        smode = DESCENDING;
+      else if (mode == "either")
+        smode = UNSORTED;
+      else
+        error ("issorted: MODE must be \"ascending\", \"descending\", or \"either\"");
+    }
   else
-    error ("issorted: MODE must be \"ascending\", \"descending\", or \"either\"");
+    error ("issorted: expecting %s argument to be a string", argn);
 
   return smode;
 }
@@ -6520,17 +6950,16 @@
       if (nargin == 3)
         smode = get_sort_mode_option (args(2), "third");
 
-      std::string tmp = args(1).string_value ();
-
-      if (! error_state)
+      if (args(1).is_string ())
         {
+          std::string tmp = args(1).string_value ();
           if (tmp == "rows")
             by_rows = true;
           else
             smode = get_sort_mode_option (args(1), "second");
         }
       else
-        error ("expecting second argument to be character string");
+        error ("issorted: second argument must be a string");
 
       if (error_state)
         return retval;
@@ -6653,7 +7082,7 @@
 #define MAKE_INT_BRANCH(X) \
         case btyp_ ## X: \
           retval = argx.X ## _array_value ().nth_element (n, dim); \
-          break
+          break;
 
         MAKE_INT_BRANCH (int8);
         MAKE_INT_BRANCH (int16);
@@ -6797,7 +7226,8 @@
 
       if (! error_state)
         {
-          octave_value vals = args(1), zero = args (2);
+          octave_value vals = args(1);
+          octave_value zero = args(2);
 
           switch (vals.builtin_type ())
             {
@@ -6824,7 +7254,7 @@
               retval = do_accumarray_minmax (idx, vals.X ## _array_value (), \
                                              n, ismin, \
                                              zero.X ## _scalar_value ()); \
-              break
+              break;
 
             MAKE_INT_BRANCH (int8);
             MAKE_INT_BRANCH (int16);
@@ -6879,7 +7309,8 @@
   else if (idx.extent (n) > n)
     error ("accumdim: index out of range");
 
-  dim_vector vals_dim = vals.dims (), rdv = vals_dim;
+  dim_vector vals_dim = vals.dims ();
+  dim_vector rdv = vals_dim;
 
   if (dim < 0)
     dim = vals.dims ().first_non_singleton ();
@@ -6958,7 +7389,8 @@
   dim_vector dv = mask.dims ();
   NDT retval (dv);
 
-  bool tscl = tval.numel () == 1, fscl = fval.numel () == 1;
+  bool tscl = tval.numel () == 1;
+  bool fscl = fval.numel () == 1;
 
   if ((! tscl && tval.dims () != dv)
       || (! fscl && fval.dims () != dv))
@@ -6968,14 +7400,16 @@
       T *rv = retval.fortran_vec ();
       octave_idx_type n = retval.numel ();
 
-      const T *tv = tval.data (), *fv = fval.data ();
+      const T *tv = tval.data ();
+      const T *fv = fval.data ();
       const bool *mv = mask.data ();
 
       if (tscl)
         {
           if (fscl)
             {
-              T ts = tv[0], fs = fv[0];
+              T ts = tv[0];
+              T fs = fv[0];
               for (octave_idx_type i = 0; i < n; i++)
                 rv[i] = mv[i] ? ts : fs;
             }
@@ -7052,7 +7486,8 @@
       else
         {
           boolNDArray mask = mask_val.bool_array_value ();
-          octave_value tval = args(1), fval = args(2);
+          octave_value tval = args(1);
+          octave_value fval = args(2);
           if (tval.is_double_type () && fval.is_double_type ())
             {
               if (tval.is_complex_type () || fval.is_complex_type ())
@@ -7330,7 +7765,8 @@
 
   assert (rep.ndims () == 2 && rep.rows () == 2);
 
-  octave_idx_type n = rep.columns (), l = 0;
+  octave_idx_type n = rep.columns ();
+  octave_idx_type l = 0;
   for (octave_idx_type i = 0; i < n; i++)
     {
       octave_idx_type k = rep(1, i);
@@ -7417,7 +7853,7 @@
 #define BTYP_BRANCH(X, EX) \
             case btyp_ ## X: \
               retval = do_repelems (x.EX ## _value (), r); \
-              break
+              break;
 
               BTYP_BRANCH (double, array);
               BTYP_BRANCH (float, float_array);
--- a/libinterp/corefcn/data.h
+++ b/libinterp/corefcn/data.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/debug.cc
+++ b/libinterp/corefcn/debug.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Ben Sapp
+Copyright (C) 2001-2015 Ben Sapp
 Copyright (C) 2007-2009 John Swensen
 
 This file is part of Octave.
@@ -85,7 +85,6 @@
           if (file.eof ())
             {
               // Expected to read the entire file.
-
               retval = buf;
             }
           else
@@ -99,8 +98,7 @@
 static std::deque<size_t>
 get_line_offsets (const std::string& buf)
 {
-  // This could maybe be smarter.  Is deque the right thing to use
-  // here?
+  // This could maybe be smarter.  Is deque the right thing to use here?
 
   std::deque<size_t> offsets;
 
@@ -207,28 +205,47 @@
   if (args.length () == 0)
     return;
 
-  // If we are already in a debugging function.
-  if (octave_call_stack::caller_user_code ())
+  if (args(0).is_string ())
     {
-      idx = 0;
-      symbol_name = get_user_code ()->name ();
+      // string could be function name or line number
+      int isint = atoi (args(0).string_value ().c_str ());
+
+      if (error_state)
+        return;
+
+      if (isint == 0)
+        {
+          // It was a function name
+          symbol_name = args(0).string_value ();
+          if (error_state)
+            return;
+          idx = 1;
+        }
+      else
+        {
+          // It was a line number.  Need to get function name from debugger.
+          if (Vdebugging)
+            {
+              symbol_name = get_user_code ()->name ();
+              idx = 0;
+            }
+          else
+            {
+              error ("%s: no function specified", who);
+            }
+        }
     }
   else if (args(0).is_map ())
     {
-      // Problem because parse_dbfunction_params() can only pass out a
-      // single function
-    }
-  else if (args(0).is_string ())
-    {
-      symbol_name = args(0).string_value ();
-      if (error_state)
-        return;
-      idx = 1;
+      // This is a problem because parse_dbfunction_params()
+      // can only pass out a single function.
+      error ("%s: struct input not implemented", who);
+      return;
     }
   else
     error ("%s: invalid parameter specified", who);
 
-  for (int i = idx; i < nargin; i++ )
+  for (int i = idx; i < nargin; i++)
     {
       if (args(i).is_string ())
         {
@@ -238,7 +255,7 @@
           lines[list_idx++] = line;
         }
       else if (args(i).is_map ())
-        octave_stdout << who << ": accepting a struct" << std::endl;
+        octave_stdout << who << ": skipping struct input" << std::endl;
       else
         {
           const NDArray arg = args(i).array_value ();
@@ -356,7 +373,6 @@
   return retval;
 }
 
-
 int
 bp_table::do_remove_breakpoint_1 (octave_user_code *fcn,
                                   const std::string& fname,
@@ -522,9 +538,14 @@
 void
 bp_table::do_remove_all_breakpoints (void)
 {
-  for (const_bp_set_iterator it = bp_set.begin (); it != bp_set.end (); it++)
-    remove_all_breakpoints_in_file (*it);
-
+  // Odd loop structure required because delete will invalidate bp_set iterators
+  for (const_bp_set_iterator it=bp_set.begin (), it_next=it;
+       it != bp_set.end ();
+       it=it_next)
+    {
+      ++it_next;
+      remove_all_breakpoints_in_file (*it);
+    }
 
   tree_evaluator::debug_mode = bp_table::have_breakpoints () || Vdebugging;
 }
@@ -537,7 +558,7 @@
 
   for (int i = 0; i < slist.length (); i++)
     {
-      if (slist (i).string_value () == match)
+      if (slist(i).string_value () == match)
         {
           retval = slist(i).string_value ();
           break;
@@ -547,7 +568,6 @@
   return retval;
 }
 
-
 bp_table::fname_line_map
 bp_table::do_get_breakpoint_list (const octave_value_list& fname_list)
 {
@@ -576,7 +596,7 @@
                       bp_table::intmap bkpts_vec;
 
                       for (int i = 0; i < len; i++)
-                        bkpts_vec[i] = bkpts (i).double_value ();
+                        bkpts_vec[i] = bkpts(i).double_value ();
 
                       std::string symbol_name = f->name ();
 
@@ -615,31 +635,36 @@
 
 DEFUN (dbstop, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{rline} =} dbstop (\"@var{func}\")\n\
+@deftypefn  {Command} {} dbstop @var{func}\n\
+@deftypefnx {Command} {} dbstop @var{func} @var{line}\n\
+@deftypefnx {Command} {} dbstop @var{func} @var{line1} @var{line2} @dots{}\n\
+@deftypefnx {Command} {} dbstop @var{line} @dots{}\n\
+@deftypefnx {Built-in Function} {@var{rline} =} dbstop (\"@var{func}\")\n\
 @deftypefnx {Built-in Function} {@var{rline} =} dbstop (\"@var{func}\", @var{line})\n\
 @deftypefnx {Built-in Function} {@var{rline} =} dbstop (\"@var{func}\", @var{line1}, @var{line2}, @dots{})\n\
-Set a breakpoint in function @var{func}.\n\
+@deftypefnx {Built-in Function} {} dbstop (\"@var{func}\", [@var{line1}, @dots{}])\n\
+@deftypefnx {Built-in Function} {} dbstop (@var{line}, @dots{})\n\
+Set a breakpoint at line number @var{line} in function @var{func}.\n\
 \n\
 Arguments are\n\
 \n\
 @table @var\n\
 @item func\n\
-Function name as a string variable.  When already in debug\n\
-mode this should be left out and only the line should be given.\n\
+Function name as a string variable.  When already in debug mode this argument\n\
+can be omitted and the current function will be used.\n\
 \n\
 @item line\n\
-Line number where the breakpoint should be set.  Multiple\n\
-lines may be given as separate arguments or as a vector.\n\
+Line number where the breakpoint should be set.  Multiple lines may be given\n\
+as separate arguments or as a vector.\n\
 @end table\n\
 \n\
-When called with a single argument @var{func}, the breakpoint\n\
-is set at the first executable line in the named function.\n\
+When called with a single argument @var{func}, the breakpoint is set at the\n\
+first executable line in the named function.\n\
 \n\
-The optional output @var{rline} is the real line number where the\n\
-breakpoint was set.  This can differ from specified line if\n\
-the line is not executable.  For example, if a breakpoint attempted on a\n\
-blank line then Octave will set the real breakpoint at the\n\
-next executable line.\n\
+The optional output @var{rline} is the real line number where the breakpoint\n\
+was set.  This can differ from the specified line if the line is not\n\
+executable.  For example, if a breakpoint attempted on a blank line then\n\
+Octave will set the real breakpoint at the next executable line.\n\
 @seealso{dbclear, dbstatus, dbstep, debug_on_error, debug_on_warning, debug_on_interrupt}\n\
 @end deftypefn")
 {
@@ -660,28 +685,38 @@
 
 DEFUN (dbclear, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} dbclear (\"@var{func}\")\n\
-@deftypefnx {Built-in Function} {} dbclear (\"@var{func}\", @var{line}, @dots{})\n\
+@deftypefn  {Command} {} dbclear @var{func}\n\
+@deftypefnx {Command} {} dbclear @var{func} @var{line}\n\
+@deftypefnx {Command} {} dbclear @var{func} @var{line1} @var{line2} @dots{}\n\
+@deftypefnx {Command} {} dbclear @var{line} @dots{}\n\
+@deftypefnx {Command} {} dbclear all\n\
+@deftypefnx {Built-in Function} {} dbclear (\"@var{func}\")\n\
+@deftypefnx {Built-in Function} {} dbclear (\"@var{func}\", @var{line})\n\
+@deftypefnx {Built-in Function} {} dbclear (\"@var{func}\", @var{line1}, @var{line2}, @dots{})\n\
+@deftypefnx {Built-in Function} {} dbclear (\"@var{func}\", [@var{line1}, @dots{}])\n\
 @deftypefnx {Built-in Function} {} dbclear (@var{line}, @dots{})\n\
-Delete a breakpoint in the function @var{func}.\n\
+@deftypefnx {Built-in Function} {} dbclear (\"all\")\n\
+Delete a breakpoint at line number @var{line} in the function @var{func}.\n\
 \n\
 Arguments are\n\
 \n\
 @table @var\n\
 @item func\n\
-Function name as a string variable.  When already in debug\n\
-mode this argument should be omitted and only the line number should be\n\
-given.\n\
+Function name as a string variable.  When already in debug mode this argument\n\
+can be omitted and the current function will be used.\n\
 \n\
 @item line\n\
-Line number from which to remove a breakpoint.  Multiple\n\
-lines may be given as separate arguments or as a vector.\n\
+Line number from which to remove a breakpoint.  Multiple lines may be given\n\
+as separate arguments or as a vector.\n\
 @end table\n\
 \n\
-When called without a line number specification all breakpoints\n\
-in the named function are cleared.\n\
+When called without a line number specification all breakpoints in the named\n\
+function are cleared.\n\
 \n\
 If the requested line is not a breakpoint no action is performed.\n\
+\n\
+The special keyword @qcode{\"all\"} will clear all breakpoints from all\n\
+files.\n\
 @seealso{dbstop, dbstatus, dbwhere}\n\
 @end deftypefn")
 {
@@ -689,10 +724,17 @@
   std::string symbol_name = "";
   bp_table::intmap lines;
 
+  int nargin = args.length ();
+
   parse_dbfunction_params ("dbclear", args, symbol_name, lines);
 
-  if (! error_state)
-    bp_table::remove_breakpoint (symbol_name, lines);
+  if (nargin == 1 && symbol_name == "all")
+    bp_table::remove_all_breakpoints ();
+  else
+    {
+      if (! error_state)
+        bp_table::remove_breakpoint (symbol_name, lines);
+    }
 
   return retval;
 }
@@ -724,6 +766,9 @@
 A line number, or vector of line numbers, with a breakpoint.\n\
 @end table\n\
 \n\
+Note: When @code{dbstatus} is called from the debug prompt within a function,\n\
+the list of breakpoints is automatically trimmed to the breakpoints in the\n\
+current function.\n\
 @seealso{dbclear, dbwhere}\n\
 @end deftypefn")
 {
@@ -752,11 +797,14 @@
     }
   else
     {
-      octave_user_code *dbg_fcn = get_user_code ();
-      if (dbg_fcn)
+      if (Vdebugging)
         {
-          symbol_name = dbg_fcn->name ();
-          fcn_list(0) = symbol_name;
+          octave_user_code *dbg_fcn = get_user_code ();
+          if (dbg_fcn)
+            {
+              symbol_name = dbg_fcn->name ();
+              fcn_list(0) = symbol_name;
+            }
         }
 
       bp_list = bp_table::get_breakpoint_list (fcn_list);
@@ -844,7 +892,7 @@
 
       if (l > 0)
         {
-          octave_stdout << " line " << l << std::endl;
+          octave_stdout << "line " << l << std::endl;
 
           if (have_file)
             {
@@ -855,7 +903,7 @@
             }
         }
       else
-        octave_stdout << " <unknown line>" << std::endl;
+        octave_stdout << "<unknown line>" << std::endl;
     }
   else
     error ("dbwhere: must be inside a user function to use dbwhere\n");
@@ -863,8 +911,6 @@
   return retval;
 }
 
-// Copied and modified from the do_type command in help.cc
-// Maybe we could share some code?
 void
 do_dbtype (std::ostream& os, const std::string& name, int start, int end)
 {
@@ -876,29 +922,15 @@
 
       if (fs)
         {
-          char ch;
           int line = 1;
-          bool isnewline = true;
+          std::string text;
 
-          // FIXME: Why not use line-oriented input here [getline()]?
-          while (fs.get (ch) && line <= end)
+          while (std::getline (fs, text) && line <= end)
             {
-              if (isnewline && line >= start)
-                {
-                  os << line << "\t";
-                  isnewline = false;
-                }
+              if (line >= start)
+                os << line << "\t" << text << "\n";
 
-              if (line >= start)
-                {
-                  os << ch;
-                }
-
-              if (ch == '\n')
-                {
-                  line++;
-                  isnewline = true;
-                }
+              line++;
             }
         }
       else
@@ -946,13 +978,14 @@
           dbg_fcn = get_user_code ();
 
           if (dbg_fcn)
-            do_dbtype (octave_stdout, dbg_fcn->name (), 0,
-                       std::numeric_limits<int>::max ());
+            do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),
+                       0, std::numeric_limits<int>::max ());
           else
             error ("dbtype: must be inside a user function to give no arguments to dbtype\n");
+
           break;
 
-        case 1: // (dbtype func) || (dbtype start:end)
+        case 1: // (dbtype start:end) || (dbtype func) || (dbtype lineno)
           {
             std::string arg = argv[1];
 
@@ -975,28 +1008,51 @@
                       end = atoi (end_str.c_str ());
 
                     if (std::min (start, end) <= 0)
-                      error ("dbtype: start and end lines must be >= 1\n");
+                      {
+                        error ("dbtype: start and end lines must be >= 1\n");
+                        break;
+                      }
 
                     if (start <= end)
-                      do_dbtype (octave_stdout, dbg_fcn->name (), start, end);
+                      do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),
+                                 start, end);
                     else
                       error ("dbtype: start line must be less than end line\n");
                   }
               }
-            else  // (dbtype func)
+            else  // (dbtype func) || (dbtype lineno)
               {
-                dbg_fcn = get_user_code (arg);
+                int line = atoi (arg.c_str ());
+
+                if (line == 0)  // (dbtype func)
+                  {
+                    dbg_fcn = get_user_code (arg);
 
-                if (dbg_fcn)
-                  do_dbtype (octave_stdout, dbg_fcn->name (), 0,
-                             std::numeric_limits<int>::max ());
-                else
-                  error ("dbtype: function <%s> not found\n", arg.c_str ());
+                    if (dbg_fcn)
+                      do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),
+                                 0, std::numeric_limits<int>::max ());
+                    else
+                      error ("dbtype: function <%s> not found\n", arg.c_str ());
+                  }
+                else  // (dbtype lineno)
+                  {
+                    if (line <= 0)
+                      {
+                        error ("dbtype: start and end lines must be >= 1\n");
+                        break;
+                      }
+
+                    dbg_fcn = get_user_code ();
+
+                    if (dbg_fcn)
+                      do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),
+                                 line, line);
+                  }
               }
           }
           break;
 
-        case 2: // (dbtype func start:end) , (dbtype func start)
+        case 2: // (dbtype func start:end) || (dbtype func start)
           dbg_fcn = get_user_code (argv[1]);
 
           if (dbg_fcn)
@@ -1023,10 +1079,14 @@
                 }
 
               if (std::min (start, end) <= 0)
-                error ("dbtype: start and end lines must be >= 1\n");
+                {
+                  error ("dbtype: start and end lines must be >= 1\n");
+                  break;
+                }
 
               if (start <= end)
-                do_dbtype (octave_stdout, dbg_fcn->name (), start, end);
+                do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),
+                           start, end);
               else
                 error ("dbtype: start line must be less than end line\n");
             }
@@ -1096,13 +1156,13 @@
             {
               int l_min = std::max (l - n/2, 0);
               int l_max = l + n/2;
-              do_dbtype (octave_stdout, dbg_fcn->name (), l_min, l-1);
+              do_dbtype (octave_stdout, name, l_min, l-1);
 
               std::string line = get_file_line (name, l);
               if (! line.empty ())
                 octave_stdout << l << "-->\t" << line << std::endl;
 
-              do_dbtype (octave_stdout, dbg_fcn->name (), l+1, l_max);
+              do_dbtype (octave_stdout, name, l+1, l_max);
             }
         }
       else
@@ -1166,10 +1226,9 @@
 
   if (! error_state)
     {
-      octave_map stk = octave_call_stack::backtrace (nskip, curr_frame);
-
       if (nargout == 0)
         {
+          octave_map stk = octave_call_stack::backtrace (nskip, curr_frame);
           octave_idx_type nframes_to_display = stk.numel ();
 
           if (nframes_to_display > 0)
@@ -1215,6 +1274,10 @@
         }
       else
         {
+          octave_map stk = octave_call_stack::backtrace (nskip,
+                                                         curr_frame,
+                                                         false);
+
           retval(1) = curr_frame < 0 ? 1 : curr_frame + 1;
           retval(0) = stk;
         }
@@ -1309,8 +1372,8 @@
 
 DEFUN (dbup, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} dbup\n\
-@deftypefnx {Built-in Function} {} dbup (@var{n})\n\
+@deftypefn  {Command} {} dbup\n\
+@deftypefnx {Command} {} dbup @var{n}\n\
 In debugging mode, move up the execution stack @var{n} frames.\n\
 If @var{n} is omitted, move up one frame.\n\
 @seealso{dbstack, dbdown}\n\
@@ -1325,8 +1388,8 @@
 
 DEFUN (dbdown, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} dbdown\n\
-@deftypefnx {Built-in Function} {} dbdown (@var{n})\n\
+@deftypefn  {Command} {} dbdown\n\
+@deftypefnx {Command} {} dbdown @var{n}\n\
 In debugging mode, move down the execution stack @var{n} frames.\n\
 If @var{n} is omitted, move down one frame.\n\
 @seealso{dbstack, dbup}\n\
@@ -1371,37 +1434,34 @@
             {
               std::string arg = args(0).string_value ();
 
-              if (! error_state)
+              if (arg == "in")
+                {
+                  Vdebugging = false;
+
+                  tree_evaluator::dbstep_flag = -1;
+                }
+              else if (arg == "out")
                 {
-                  if (arg == "in")
-                    {
-                      Vdebugging = false;
+                  Vdebugging = false;
 
-                      tree_evaluator::dbstep_flag = -1;
-                    }
-                  else if (arg == "out")
+                  tree_evaluator::dbstep_flag = -2;
+                }
+              else
+                {
+                  int n = atoi (arg.c_str ());
+
+                  if (n > 0)
                     {
                       Vdebugging = false;
 
-                      tree_evaluator::dbstep_flag = -2;
+                      tree_evaluator::dbstep_flag = n;
                     }
                   else
-                    {
-                      int n = atoi (arg.c_str ());
-
-                      if (n > 0)
-                        {
-                          Vdebugging = false;
-
-                          tree_evaluator::dbstep_flag = n;
-                        }
-                      else
-                        error ("dbstep: invalid argument");
-                    }
+                    error ("dbstep: invalid argument");
                 }
             }
           else
-            error ("dbstep: input argument must be a character string");
+            error ("dbstep: input argument must be a string");
         }
       else
         {
@@ -1485,3 +1545,39 @@
 
   return retval;
 }
+
+DEFUN (__db_next_breakpoint_quiet__, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {} __db_next_breakpoint_quiet__ ()\n\
+@deftypefnx {Built-in Function} {} __db_next_breakpoint_quiet__ (@var{flag})\n\
+Disable line info printing at the next breakpoint.\n\
+\n\
+With a logical argument @var{flag}, set the state on or off.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  if (nargin == 0 || nargin == 1)
+    {
+      bool state = true;
+
+      if (nargin == 1)
+        {
+          state = args(0).bool_value ();
+
+          if (error_state)
+            {
+              gripe_wrong_type_arg ("db_next_breakpoint", args(0), true);
+              return retval;
+            }
+        }
+
+      tree_evaluator::quiet_breakpoint_flag = state;
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
--- a/libinterp/corefcn/debug.h
+++ b/libinterp/corefcn/debug.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Ben Sapp
+Copyright (C) 2001-2015 Ben Sapp
 
 This file is part of Octave.
 
@@ -62,7 +62,7 @@
                                 const intmap& lines = intmap ())
   {
     return instance_ok ()
-      ? instance->do_add_breakpoint (fname, lines) : intmap ();
+           ? instance->do_add_breakpoint (fname, lines) : intmap ();
   }
 
   // Remove a breakpoint from a line in file.
@@ -70,7 +70,7 @@
                                 const intmap& lines = intmap ())
   {
     return instance_ok ()
-      ? instance->do_remove_breakpoint (fname, lines) : 0;
+           ? instance->do_remove_breakpoint (fname, lines) : 0;
   }
 
   // Remove all the breakpoints in a specified file.
@@ -78,7 +78,8 @@
                                                 bool silent = false)
   {
     return instance_ok ()
-      ? instance->do_remove_all_breakpoints_in_file (fname, silent) : intmap ();
+           ? instance->do_remove_all_breakpoints_in_file (fname, silent)
+           : intmap ();
   }
 
   // Remove all the breakpoints registered with octave.
@@ -94,7 +95,7 @@
   get_breakpoint_list (const octave_value_list& fname_list)
   {
     return instance_ok ()
-      ? instance->do_get_breakpoint_list (fname_list) : fname_line_map ();
+           ? instance->do_get_breakpoint_list (fname_list) : fname_line_map ();
   }
 
   static bool
--- a/libinterp/corefcn/defaults.cc
+++ b/libinterp/corefcn/defaults.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -74,6 +74,7 @@
 std::string Vlocal_api_fcn_file_dir;
 std::string Vlocal_fcn_file_dir;
 
+std::string Voct_data_dir;
 std::string Voct_etc_dir;
 std::string Voct_locale_dir;
 
@@ -219,6 +220,12 @@
 }
 
 static void
+set_default_oct_data_dir (void)
+{
+  Voct_data_dir = subst_octave_home (OCTAVE_OCTDATADIR);
+}
+
+static void
 set_default_oct_etc_dir (void)
 {
   Voct_etc_dir = subst_octave_home (OCTAVE_OCTETCDIR);
@@ -435,6 +442,7 @@
   set_default_local_api_fcn_file_dir ();
   set_default_local_fcn_file_dir ();
 
+  set_default_oct_data_dir ();
   set_default_oct_etc_dir ();
   set_default_oct_locale_dir ();
 
@@ -594,7 +602,8 @@
 DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, ,
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} OCTAVE_VERSION ()\n\
-Return the version number of Octave, as a string.\n\
+Return the version number of Octave as a string.\n\
+@seealso{ver, version}\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/corefcn/defaults.in.h
+++ b/libinterp/corefcn/defaults.in.h
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -148,6 +148,10 @@
 #define OCTAVE_MANDIR %OCTAVE_MANDIR%
 #endif
 
+#ifndef OCTAVE_OCTDATADIR
+#define OCTAVE_OCTDATADIR %OCTAVE_OCTDATADIR%
+#endif
+
 #ifndef OCTAVE_OCTFILEDIR
 #define OCTAVE_OCTFILEDIR %OCTAVE_OCTFILEDIR%
 #endif
@@ -202,6 +206,7 @@
 extern OCTINTERP_API std::string Vlocal_api_fcn_file_dir;
 extern OCTINTERP_API std::string Vlocal_fcn_file_dir;
 
+extern OCTINTERP_API std::string Voct_data_dir;
 extern OCTINTERP_API std::string Voct_etc_dir;
 extern OCTINTERP_API std::string Voct_locale_dir;
 
--- a/libinterp/corefcn/defun-dld.h
+++ b/libinterp/corefcn/defun-dld.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/defun-int.h
+++ b/libinterp/corefcn/defun-int.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/defun.cc
+++ b/libinterp/corefcn/defun.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/defun.h
+++ b/libinterp/corefcn/defun.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/det.cc
+++ b/libinterp/corefcn/det.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -157,7 +157,7 @@
               MatrixType mtype = rep ? rep -> matrix_type () : MatrixType ();
               FloatDET det = m.determinant (mtype, info, rcond);
               retval(1) = rcond;
-              retval(0) = info == -1 ? static_cast<float>(0.0) : det.value ();
+              retval(0) = info == -1 ? 0.0f : det.value ();
               if (rep) rep->matrix_type (mtype);
             }
         }
--- a/libinterp/corefcn/dirfns.cc
+++ b/libinterp/corefcn/dirfns.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -346,7 +346,8 @@
                 {
                   bool doit = true;
 
-                  if (interactive && Vconfirm_recursive_rmdir)
+                  if (interactive && ! forced_interactive
+                      && Vconfirm_recursive_rmdir)
                     {
                       std::string prompt
                         = "remove entire contents of " + fulldir + "? ";
@@ -608,7 +609,7 @@
         [2,1] = file2\n\
       @}\n\
 @end example\n\
-@seealso{ls, dir, readdir, what, fnmatch}\n\
+@seealso{ls, dir, readdir, what}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -634,7 +635,7 @@
 
 /*
 %!test
-%! tmpdir = tmpnam;
+%! tmpdir = tempname;
 %! filename = {"file1", "file2", "file3", "myfile1", "myfile1b"};
 %! if (mkdir (tmpdir))
 %!   cwd = pwd;
@@ -664,8 +665,8 @@
 %! assert (result3, {"file1"; "file2"});
 */
 
-DEFUNX ("fnmatch", Ffnmatch, args, ,
-        "-*- texinfo -*-\n\
+DEFUN (__fnmatch__, args, ,
+       "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} fnmatch (@var{pattern}, @var{string})\n\
 Return true or false for each element of @var{string} that matches any of\n\
 the elements of the string array @var{pattern}, using the rules of\n\
--- a/libinterp/corefcn/dirfns.h
+++ b/libinterp/corefcn/dirfns.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/display.cc
+++ b/libinterp/corefcn/display.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,143 +24,28 @@
 #include <config.h>
 #endif
 
-#include <cstdlib>
-
-#if defined (OCTAVE_USE_WINDOWS_API)
-#include <windows.h>
-#elif defined (HAVE_FRAMEWORK_CARBON)
-#include <Carbon/Carbon.h>
-#elif defined (HAVE_X_WINDOWS)
-#include <X11/Xlib.h>
-#endif
-
 #include "singleton-cleanup.h"
 
+#include "cdisplay.h"
 #include "display.h"
 #include "error.h"
 
 display_info *display_info::instance = 0;
 
-#if defined (HAVE_FRAMEWORK_CARBON) && ! defined (HAVE_CARBON_CGDISPLAYBITSPERPIXEL)
-// FIXME: This will only work for MacOS > 10.5. For earlier versions
-// this code is not needed (use CGDisplayBitsPerPixel instead).
-size_t DisplayBitsPerPixel (CGDirectDisplayID display)
-{
-  CGDisplayModeRef mode = CGDisplayCopyDisplayMode (display);
-  CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding (mode);
-
-  if (CFStringCompare (pixelEncoding, CFSTR (IO32BitDirectPixels), 0) == 0)
-    return 32;
-  else if (CFStringCompare (pixelEncoding, CFSTR (IO16BitDirectPixels), 0) == 0)
-    return 16;
-  else
-    return 8;
-}
-#endif
-
 void
 display_info::init (bool query)
 {
   if (query)
     {
-#if defined (OCTAVE_USE_WINDOWS_API)
-
-      HDC hdc = GetDC (0);
-
-      if (hdc)
-        {
-          dp = GetDeviceCaps (hdc, BITSPIXEL);
-
-          ht = GetDeviceCaps (hdc, VERTRES);
-          wd = GetDeviceCaps (hdc, HORZRES);
-
-          double ht_mm = GetDeviceCaps (hdc, VERTSIZE);
-          double wd_mm = GetDeviceCaps (hdc, HORZSIZE);
-
-          rx = wd * 25.4 / wd_mm;
-          ry = ht * 25.4 / ht_mm;
-
-          dpy_avail = true;
-        }
-      else
-        err_msg = "no graphical display found";
-
-#elif defined (HAVE_FRAMEWORK_CARBON)
+      int avail = 0;
 
-      CGDirectDisplayID display = CGMainDisplayID ();
-
-      if (display)
-        {
-#  if defined (HAVE_CARBON_CGDISPLAYBITSPERPIXEL)
-          // For MacOS < 10.7 use the line below
-          dp = CGDisplayBitsPerPixel (display);
-#  else
-          // For MacOS > 10.5 use the line below
-          dp = DisplayBitsPerPixel (display);
-#  endif
-
-          ht = CGDisplayPixelsHigh (display);
-          wd = CGDisplayPixelsWide (display);
-
-          CGSize sz_mm = CGDisplayScreenSize (display);
-          // For MacOS >= 10.6, CGSize is a struct keeping 2 CGFloat values,
-          // but the CGFloat typedef is not present on older systems,
-          // so use double instead.
-          double ht_mm = sz_mm.height;
-          double wd_mm = sz_mm.width;
-
-          rx = wd * 25.4 / wd_mm;
-          ry = ht * 25.4 / ht_mm;
+      const char *msg = octave_get_display_info (&ht, &wd, &dp, &rx, &ry,
+                                                 &avail);
 
-          dpy_avail = true;
-        }
-      else
-        err_msg = "no graphical display found";
-
-#elif defined (HAVE_X_WINDOWS)
-
-      const char *display_name = getenv ("DISPLAY");
-
-      if (display_name && *display_name)
-        {
-          Display *display = XOpenDisplay (display_name);
-
-          if (display)
-            {
-              Screen *screen = DefaultScreenOfDisplay (display);
-
-              if (screen)
-                {
-                  dp = DefaultDepthOfScreen (screen);
-
-                  ht = HeightOfScreen (screen);
-                  wd = WidthOfScreen (screen);
+      dpy_avail = avail;
 
-                  int screen_number = XScreenNumberOfScreen (screen);
-
-                  double ht_mm = DisplayHeightMM (display, screen_number);
-                  double wd_mm = DisplayWidthMM (display, screen_number);
-
-                  rx = wd * 25.4 / wd_mm;
-                  ry = ht * 25.4 / ht_mm;
-                }
-              else
-                err_msg = "X11 display has no default screen";
-
-              XCloseDisplay (display);
-
-              dpy_avail = true;
-            }
-          else
-            err_msg = "unable to open X11 DISPLAY";
-        }
-      else
-        err_msg = "X11 DISPLAY environment variable not set";
-#else
-
-      err_msg = "no graphical display found";
-
-#endif
+      if (msg)
+        err_msg = msg;
     }
 }
 
--- a/libinterp/corefcn/display.h
+++ b/libinterp/corefcn/display.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/dlmread.cc
+++ b/libinterp/corefcn/dlmread.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jonathan Stickel
+Copyright (C) 2008-2015 Jonathan Stickel
 Copyright (C) 2010 Jaroslav Hajek
 
 This file is part of Octave.
@@ -214,8 +214,6 @@
     {
       // File name.
       std::string fname (args(0).string_value ());
-      if (error_state)
-        return retval;
 
       std::string tname = file_ops::tilde_expand (fname);
 
@@ -264,12 +262,15 @@
     }
 
   // Take a subset if a range was given.
-  octave_idx_type r0 = 0, c0 = 0, r1 = idx_max-1, c1 = idx_max-1;
+  octave_idx_type r0 = 0;
+  octave_idx_type c0 = 0;
+  octave_idx_type r1 = idx_max-1;
+  octave_idx_type c1 = idx_max-1;
   if (nargin > 2)
     {
       if (nargin == 3)
         {
-          if (!parse_range_spec (args (2), r0, c0, r1, c1))
+          if (!parse_range_spec (args(2), r0, c0, r1, c1))
             error ("dlmread: error parsing RANGE");
         }
       else if (nargin == 4)
@@ -287,7 +288,12 @@
 
   if (!error_state)
     {
-      octave_idx_type i = 0, j = 0, r = 1, c = 1, rmax = 0, cmax = 0;
+      octave_idx_type i = 0;
+      octave_idx_type j = 0;
+      octave_idx_type r = 1;
+      octave_idx_type c = 1;
+      octave_idx_type rmax = 0;
+      octave_idx_type cmax = 0;
 
       Matrix rdata;
       ComplexMatrix cdata;
@@ -483,7 +489,7 @@
 
 /*
 %!shared file
-%! file = tmpnam ();
+%! file = tempname ();
 %! fid = fopen (file, "wt");
 %! fwrite (fid, "1, 2, 3\n4, 5, 6\n7, 8, 9\n10, 11, 12");
 %! fclose (fid);
@@ -502,7 +508,7 @@
 %! unlink (file);
 
 %!shared file
-%! file = tmpnam ();
+%! file = tempname ();
 %! fid = fopen (file, "wt");
 %! fwrite (fid, "1, 2, 3\n4+4i, 5, 6\n7, 8, 9\n10, 11, 12");
 %! fclose (fid);
--- a/libinterp/corefcn/dot.cc
+++ b/libinterp/corefcn/dot.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 VZLU Prague
+Copyright (C) 2009-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -128,11 +128,13 @@
       return retval;
     }
 
-  octave_value argx = args(0), argy = args(1);
+  octave_value argx = args(0);
+  octave_value argy = args(1);
 
   if (argx.is_numeric_type () && argy.is_numeric_type ())
     {
-      dim_vector dimx = argx.dims (), dimy = argy.dims ();
+      dim_vector dimx = argx.dims ();
+      dim_vector dimy = argy.dims ();
       bool match = dimx == dimy;
       if (! match && nargin == 2
           && dimx.is_vector () && dimy.is_vector ())
@@ -245,10 +247,12 @@
 %! x = [2, 1; 2, 1];
 %! y = [-0.5, 2; 0.5, -2];
 %! assert (dot (x, y), [0 0]);
+%! assert (dot (single (x), single (y)), single ([0 0]));
 
 %!test
 %! x = [1+i, 3-i; 1-i, 3-i];
 %! assert (dot (x, x), [4, 20]);
+%! assert (dot (single (x), single (x)), single ([4, 20]));
 
 %!test
 %! x = int8 ([1 2]);
@@ -301,13 +305,18 @@
       return retval;
     }
 
-  octave_value argx = args(0), argy = args(1);
+  octave_value argx = args(0);
+  octave_value argy = args(1);
 
   if (argx.is_numeric_type () && argy.is_numeric_type ())
     {
-      const dim_vector dimx = argx.dims (), dimy = argy.dims ();
+      const dim_vector dimx = argx.dims ();
+      const dim_vector dimy = argy.dims ();
       int nd = dimx.length ();
-      octave_idx_type m = dimx(0), k = dimx(1), n = dimy(1), np = 1;
+      octave_idx_type m = dimx(0);
+      octave_idx_type k = dimx(1);
+      octave_idx_type n = dimy(1);
+      octave_idx_type np = 1;
       bool match = dimy(0) == k && nd == dimy.length ();
       dim_vector dimz = dim_vector::alloc (nd);
       dimz(0) = m;
@@ -390,4 +399,24 @@
 %! z(:,:,1) = [7 10; 15 22];
 %! z(:,:,2) = [2 2; 2 2];
 %! assert (blkmm (x,x), z);
+%! assert (blkmm (single (x), single (x)), single (z));
+%! assert (blkmm (x, single (x)), single (z));
+
+%!test
+%! x(:,:,1) = [1 2; 3 4];
+%! x(:,:,2) = [1i 1i; 1i 1i];
+%! z(:,:,1) = [7 10; 15 22];
+%! z(:,:,2) = [-2 -2; -2 -2];
+%! assert (blkmm (x,x), z);
+%! assert (blkmm (single (x), single (x)), single (z));
+%! assert (blkmm (x, single (x)), single (z));
+
+%% Test input validation
+%!error blkmm ()
+%!error blkmm (1)
+%!error blkmm (1,2,3)
+%!error <A and B dimensions don't match> blkmm (ones (2,2), ones (3,3))
+%!error <A and B must be numeric> blkmm ({1,2}, [3,4])
+%!error <A and B must be numeric> blkmm ([3,4], {1,2})
 */
+
--- a/libinterp/corefcn/dynamic-ld.cc
+++ b/libinterp/corefcn/dynamic-ld.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/dynamic-ld.h
+++ b/libinterp/corefcn/dynamic-ld.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/eig.cc
+++ b/libinterp/corefcn/eig.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -62,8 +62,8 @@
 
   octave_value arg_a, arg_b;
 
-  octave_idx_type nr_a = 0, nr_b = 0;
-  octave_idx_type nc_a = 0, nc_b = 0;
+  octave_idx_type nr_a, nr_b, nc_a, nc_b;
+  nr_a = nr_b = nc_a = nc_b = 0;
 
   arg_a = args(0);
   nr_a = arg_a.rows ();
--- a/libinterp/corefcn/ellipj.cc
+++ b/libinterp/corefcn/ellipj.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Leopoldo Cerbaro <redbliss@libero.it>
+Copyright (C) 2013-2015 Leopoldo Cerbaro <redbliss@libero.it>
 
 This file is part of Octave.
 
@@ -67,7 +67,7 @@
 return @code{NaN}.\n\
 @end enumerate\n\
 \n\
-Reference: Milton Abramowitz and Irene A Stegun,\n\
+Reference: Milton @nospell{Abramowitz} and Irene A @nospell{Stegun},\n\
 @cite{Handbook of Mathematical Functions}, Chapter 16 (Sections 16.4, 16.13,\n\
 and 16.15), Dover, 1965.\n\
 \n\
@@ -919,6 +919,15 @@
 %! assert (cn, C, 8*eps);
 %! assert (dn, D, 8*eps);
 
+%!test
+%! ## Test continuity of dn when cn is near zero (bug #43344)
+%! m = 0.5;
+%! u = ellipke (0.5);
+%! x = [-1e-3, -1e-12, 0, 1e-12, 1e-3];
+%! [~, ~, dn] = ellipj (u + x, m);
+%! D = 1/sqrt (2) * ones (size (x));
+%! assert (dn, D, 1e-6);
+
 %!error ellipj ()
 %!error ellipj (1)
 %!error ellipj (1,2,3,4)
--- a/libinterp/corefcn/error.cc
+++ b/libinterp/corefcn/error.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -27,6 +27,7 @@
 #include <cstdarg>
 #include <cstring>
 
+#include <iomanip>
 #include <iostream>
 #include <sstream>
 #include <string>
@@ -40,6 +41,7 @@
 #include "utils.h"
 #include "ov.h"
 #include "ov-usr-fcn.h"
+#include "pt-eval.h"
 #include "pt-pr-code.h"
 #include "pt-stmt.h"
 #include "toplev.h"
@@ -61,13 +63,12 @@
 
 // TRUE means that Octave will try to display a stack trace when a
 // warning is encountered.
-static bool Vbacktrace_on_warning = false;
+static bool Vbacktrace_on_warning = true;
 
 // TRUE means that Octave will print a verbose warning.  Currently unused.
 static bool Vverbose_warning;
 
-// TRUE means that Octave will print no warnings, but lastwarn will be
-//updated
+// TRUE means that Octave will print no warnings, but lastwarn will be updated
 static bool Vquiet_warning = false;
 
 // A structure containing (most of) the current state of warnings.
@@ -170,13 +171,8 @@
 
   std::string msg_string = output_buf.str ();
 
-  if (! warning_state)
-    {
-      // This is the first warning in a possible series.
-
-      Vlast_warning_id = id;
-      Vlast_warning_message = msg_string;
-    }
+  Vlast_warning_id = id;
+  Vlast_warning_message = msg_string;
 
   if (! Vquiet_warning)
     {
@@ -267,6 +263,70 @@
     }
 }
 
+static void
+pr_where_2 (const char *fmt, va_list args)
+{
+  if (fmt)
+    {
+      if (*fmt)
+        {
+          size_t len = strlen (fmt);
+
+          if (len > 0)
+            {
+              if (fmt[len - 1] == '\n')
+                {
+                  if (len > 1)
+                    {
+                      char *tmp_fmt = strsave (fmt);
+                      tmp_fmt[len - 1] = '\0';
+                      verror (false, std::cerr, 0, "", tmp_fmt, args);
+                      delete [] tmp_fmt;
+                    }
+                }
+              else
+                verror (false, std::cerr, 0, "", fmt, args);
+            }
+        }
+    }
+  else
+    panic ("pr_where_2: invalid format");
+}
+
+static void
+pr_where_1 (const char *fmt, ...)
+{
+  va_list args;
+  va_start (args, fmt);
+  pr_where_2 (fmt, args);
+  va_end (args);
+}
+
+static void
+pr_where (const char *who)
+{
+  std::list<octave_call_stack::stack_frame> frames
+    = octave_call_stack::backtrace_frames ();
+
+  size_t nframes = frames.size ();
+
+  if (nframes > 0)
+    pr_where_1 ("%s: called from\n", who);
+
+  for (std::list<octave_call_stack::stack_frame>::const_iterator p = frames.begin ();
+       p != frames.end (); p++)
+    {
+      const octave_call_stack::stack_frame& elt = *p;
+
+      std::string fcn_name = elt.fcn_name ();
+      int line = elt.line ();
+      int column = elt.column ();
+
+      pr_where_1 ("    %s at line %d column %d\n",
+                  fcn_name.c_str (), line, column);
+    }
+}
+
 // Note that we don't actually print any message if the error string
 // is just "" or "\n".  This allows error ("") and error ("\n") to
 // just set the error state.
@@ -381,85 +441,18 @@
 }
 
 static void
-pr_where_2 (const char *fmt, va_list args)
-{
-  if (fmt)
-    {
-      if (*fmt)
-        {
-          size_t len = strlen (fmt);
-
-          if (len > 0)
-            {
-              if (fmt[len - 1] == '\n')
-                {
-                  if (len > 1)
-                    {
-                      char *tmp_fmt = strsave (fmt);
-                      tmp_fmt[len - 1] = '\0';
-                      verror (false, std::cerr, 0, "", tmp_fmt, args);
-                      delete [] tmp_fmt;
-                    }
-                }
-              else
-                verror (false, std::cerr, 0, "", fmt, args);
-            }
-        }
-    }
-  else
-    panic ("pr_where_2: invalid format");
-}
-
-static void
-pr_where_1 (const char *fmt, ...)
-{
-  va_list args;
-  va_start (args, fmt);
-  pr_where_2 (fmt, args);
-  va_end (args);
-}
-
-static void
-pr_where (const char *who)
-{
-  octave_idx_type curr_frame = -1;
-
-  octave_map stk = octave_call_stack::backtrace (0, curr_frame);
-
-  octave_idx_type nframes_to_display = stk.numel ();
-
-  if (nframes_to_display > 0)
-    {
-      pr_where_1 ("%s: called from\n", who);
-
-      Cell names = stk.contents ("name");
-      Cell lines = stk.contents ("line");
-      Cell columns = stk.contents ("column");
-
-      for (octave_idx_type i = 0; i < nframes_to_display; i++)
-        {
-          octave_value name = names(i);
-          octave_value line = lines(i);
-          octave_value column = columns(i);
-
-          std::string nm = name.string_value ();
-
-          pr_where_1 ("    %s at line %d column %d\n", nm.c_str (),
-                      line.int_value (), column.int_value ());
-        }
-    }
-}
-
-static void
 error_2 (const char *id, const char *fmt, va_list args, bool with_cfn = false)
 {
   int init_state = error_state;
 
   error_1 (std::cerr, "error", id, fmt, args, with_cfn);
 
-  if ((interactive || forced_interactive)
-      && Vdebug_on_error && init_state == 0
-      && octave_call_stack::caller_user_code ())
+  bool in_user_code = octave_call_stack::caller_user_code () != 0;
+
+  if (error_state != -2 && in_user_code && ! discard_error_messages)
+    pr_where ("error");
+
+  if (interactive && Vdebug_on_error && init_state == 0 && in_user_code)
     {
       unwind_protect frame;
       frame.protect_var (Vdebug_on_error);
@@ -467,7 +460,9 @@
 
       error_state = 0;
 
-      pr_where ("error");
+      tree_evaluator::debug_mode = true;
+
+      tree_evaluator::current_frame = octave_call_stack::current_frame ();
 
       do_keyboard (octave_value_list ());
     }
@@ -641,22 +636,30 @@
     {
       vwarning ("warning", id, fmt, args);
 
-      if (! symbol_table::at_top_level ()
-          && Vbacktrace_on_warning
-          && ! warning_state
+      bool in_user_code = octave_call_stack::caller_user_code () != 0;
+
+      bool fmt_suppresses_backtrace = false;
+      size_t fmt_len = fmt ? strlen (fmt) : 0;
+      fmt_suppresses_backtrace = (fmt_len > 0 && fmt[fmt_len-1] == '\n');
+
+      if (! fmt_suppresses_backtrace && in_user_code
+          && Vbacktrace_on_warning && ! warning_state
           && ! discard_warning_messages)
         pr_where ("warning");
 
       warning_state = 1;
 
       if ((interactive || forced_interactive)
-          && Vdebug_on_warning
-          && octave_call_stack::caller_user_code ())
+          && Vdebug_on_warning && in_user_code)
         {
           unwind_protect frame;
           frame.protect_var (Vdebug_on_warning);
           Vdebug_on_warning = false;
 
+          tree_evaluator::debug_mode = true;
+
+          tree_evaluator::current_frame = octave_call_stack::current_frame ();
+
           do_keyboard (octave_value_list ());
         }
     }
@@ -1093,11 +1096,12 @@
 which will only stop execution if an error has been found.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences (e.g., \"\\n\" => newline) are processed in @var{template}\n\
-regardless of whether @var{template} has been defined within single quotes\n\
-as long as there are two or more input arguments.\n\
-Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+sequences in @var{template} (e.g., @qcode{\"@xbackslashchar{}n\"} =>\n\
+newline) are processed regardless of whether @var{template} has been defined\n\
+with single quotes, as long as there are two or more input arguments.  To\n\
+disable escape sequence expansion use a second backslash before the sequence\n\
+(e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 @seealso{warning, lasterror}\n\
 @end deftypefn")
 {
@@ -1217,6 +1221,127 @@
   return retval;
 }
 
+static std::string
+default_warning_state (void)
+{
+  std::string retval = "on";
+
+  Cell ident = warning_options.contents ("identifier");
+  Cell state = warning_options.contents ("state");
+
+  octave_idx_type nel = ident.numel ();
+
+  for (octave_idx_type i = 0; i < nel; i++)
+    {
+      if (ident(i).string_value () == "all")
+        {
+          retval = state(i).string_value ();
+          break;
+        }
+    }
+
+  return retval;
+}
+
+static void
+display_warning_options (std::ostream& os)
+{
+  Cell ident = warning_options.contents ("identifier");
+  Cell state = warning_options.contents ("state");
+
+  octave_idx_type nel = ident.numel ();
+
+  std::string all_state = default_warning_state ();
+
+  if (all_state == "on")
+    os << "By default, warnings are enabled.";
+  else if (all_state == "off")
+    os << "By default, warnings are disabled.";
+  else if (all_state == "error")
+    os << "By default, warnings are treated as errors.";
+  else
+    panic_impossible ();
+
+  if (nel > 1)
+    os << "\n\n";
+
+  // The state for all is always supposed to be first in the list.
+
+  for (octave_idx_type i = 1; i < nel; i++)
+    {
+      std::string tid = ident(i).string_value ();
+      std::string tst = state(i).string_value ();
+
+      os << std::setw (7) << tst << "  " << tid << "\n";
+    }
+
+  os << std::endl;
+}
+
+static void
+set_warning_option (const std::string& state, const std::string& ident)
+{
+  if (ident == "all")
+    {
+      initialize_warning_options (state);
+      return;
+    }
+
+  std::string all_state = default_warning_state ();
+
+  if (state != "on" && state != "off" && state != "error")
+    error ("invalid warning state: %s", state.c_str ());
+
+  Cell tid = warning_options.contents ("identifier");
+  Cell tst = warning_options.contents ("state");
+
+  octave_idx_type nel = tid.numel ();
+
+  for (octave_idx_type i = 0; i < nel; i++)
+    {
+      if (tid(i).string_value () == ident)
+        {
+          // We found it in the current list of options.  If the state
+          // for "all" is same as arg1, we can simply remove the item
+          // from the list.
+
+          if (state == all_state)
+            {
+              for (i = i + 1; i < nel; i++)
+                {
+                  tid(i-1) = tid(i);
+                  tst(i-1) = tst(i);
+                }
+
+              tid.resize (dim_vector (1, nel-1));
+              tst.resize (dim_vector (1, nel-1));
+            }
+          else
+            tst(i) = state;
+
+          warning_options.clear ();
+
+          warning_options.assign ("identifier", tid);
+          warning_options.assign ("state", tst);
+
+          return;
+        }
+    }
+
+  // The option wasn't already in the list.  Append it.
+
+  tid.resize (dim_vector (1, nel+1));
+  tst.resize (dim_vector (1, nel+1));
+
+  tid(nel) = ident;
+  tst(nel) = state;
+
+  warning_options.clear ();
+
+  warning_options.assign ("identifier", tid);
+  warning_options.assign ("state", tst);
+}
+
 DEFUN (warning, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} warning (@var{template}, @dots{})\n\
@@ -1225,6 +1350,7 @@
 @deftypefnx {Built-in Function} {} warning (\"off\", @var{id})\n\
 @deftypefnx {Built-in Function} {} warning (\"query\", @var{id})\n\
 @deftypefnx {Built-in Function} {} warning (\"error\", @var{id})\n\
+@deftypefnx {Built-in Function} {} warning (@var{state}, \"backtrace\")\n\
 @deftypefnx {Built-in Function} {} warning (@var{state}, @var{id}, \"local\")\n\
 Format the optional arguments under the control of the template string\n\
 @var{template} using the same rules as the @code{printf} family of\n\
@@ -1255,6 +1381,11 @@
 @end group\n\
 @end example\n\
 \n\
+If the state is @qcode{\"on\"} or @qcode{\"off\"} and the third argument\n\
+is @qcode{\"backtrace\"}, then a stack trace is printed along with the\n\
+warning message when warnings occur inside function calls.  This option\n\
+is enabled by default.\n\
+\n\
 If the state is @qcode{\"on\"}, @qcode{\"off\"}, or @qcode{\"error\"}\n\
 and the third argument is @qcode{\"local\"}, then the warning state\n\
 will be set temporarily, until the end of the current function.\n\
@@ -1265,11 +1396,12 @@
 workspace.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences (e.g., \"\\n\" => newline) are processed in @var{template}\n\
-regardless of whether @var{template} has been defined within single quotes\n\
-as long as there are two or more input arguments.\n\
-Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+sequences in @var{template} (e.g., @qcode{\"@xbackslashchar{}n\"} =>\n\
+newline) are processed regardless of whether @var{template} has been defined\n\
+with single quotes, as long as there are two or more input arguments.  To\n\
+disable escape sequence expansion use a second backslash before the sequence\n\
+(e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 @seealso{warning_ids, lastwarn, error}\n\
 @end deftypefn")
 {
@@ -1388,7 +1520,7 @@
                   // Since internal Octave functions are not
                   // compatible, turning all warnings into errors
                   // should leave the state of
-                  // Octave:matlab-incompatible alone.
+                  // Octave:language-extension alone.
 
                   if (arg1 == "error"
                       && warning_options.contains ("identifier"))
@@ -1406,7 +1538,7 @@
                             {
                               std::string key = vid.string_value ();
 
-                              if (key == "Octave:matlab-incompatible"
+                              if (key == "Octave:language-extension"
                                   || key == "Octave:single-quote-string")
                                 {
                                   id.resize (dim_vector (1, n+1));
@@ -1465,49 +1597,7 @@
                   if (arg2 == "last")
                     arg2 = Vlast_warning_id;
 
-                  if (arg2 == "all")
-                    initialize_warning_options (arg1);
-                  else
-                    {
-                      Cell ident = warning_options.contents ("identifier");
-                      Cell state = warning_options.contents ("state");
-
-                      octave_idx_type nel = ident.numel ();
-
-                      bool found = false;
-
-                      for (octave_idx_type i = 0; i < nel; i++)
-                        {
-                          if (ident(i).string_value () == arg2)
-                            {
-                              // FIXME: if state for "all" is  same as arg1,
-                              //        we can simply remove the item
-                              //        from the list.
-
-                              state(i) = arg1;
-                              warning_options.assign ("state", state);
-                              found = true;
-                              break;
-                            }
-                        }
-
-                      if (! found)
-                        {
-                          // FIXME: if state for "all" is same as arg1,
-                          //        we don't need to do anything.
-
-                          ident.resize (dim_vector (1, nel+1));
-                          state.resize (dim_vector (1, nel+1));
-
-                          ident(nel) = arg2;
-                          state(nel) = arg1;
-
-                          warning_options.clear ();
-
-                          warning_options.assign ("identifier", ident);
-                          warning_options.assign ("state", state);
-                        }
-                    }
+                  set_warning_option (arg1, arg2);
 
                   done = true;
                 }
@@ -1544,7 +1634,10 @@
     }
   else if (argc == 1)
     {
-      retval = warning_options;
+      if (nargout > 0)
+        retval = warning_options;
+      else
+        display_warning_options (octave_stdout);
 
       done = true;
     }
@@ -1559,7 +1652,25 @@
           octave_map m = arg.map_value ();
 
           if (m.contains ("identifier") && m.contains ("state"))
-            warning_options = m;
+            {
+              // Simply step through the struct elements one at a time.
+
+              Cell ident = m.contents ("identifier");
+              Cell state = m.contents ("state");
+
+              octave_idx_type nel = ident.numel ();
+
+              for (octave_idx_type i = 0; i < nel; i++)
+                {
+                  std::string tst = state(i).string_value ();
+                  std::string tid = ident(i).string_value ();
+
+                  if (error_state)
+                    return retval;
+
+                  set_warning_option (tst, tid);
+                }
+            }
           else
             error ("warning: expecting structure with fields 'identifier' and 'state'");
 
@@ -1614,7 +1725,7 @@
 void
 disable_warning (const std::string& id)
 {
-  set_warning_state (id, "off");
+  set_warning_option ("off", id);
 }
 
 void
@@ -1627,7 +1738,7 @@
   disable_warning ("Octave:array-to-scalar");
   disable_warning ("Octave:array-to-vector");
   disable_warning ("Octave:imag-to-real");
-  disable_warning ("Octave:matlab-incompatible");
+  disable_warning ("Octave:language-extension");
   disable_warning ("Octave:missing-semicolon");
   disable_warning ("Octave:neg-dim-as-zero");
   disable_warning ("Octave:resize-on-range-error");
@@ -1636,9 +1747,6 @@
   disable_warning ("Octave:str-to-num");
   disable_warning ("Octave:mixed-string-concat");
   disable_warning ("Octave:variable-switch-label");
-
-  // This should be an error unless we are in maximum braindamage mode.
-  set_warning_state ("Octave:noninteger-range-as-index", "error");
 }
 
 DEFUN (lasterror, args, ,
@@ -1855,7 +1963,7 @@
             }
         }
       else
-        error ("lasterr: expecting arguments to be character strings");
+        error ("lasterr: all arguments must be strings");
     }
   else
     print_usage ();
@@ -1902,7 +2010,7 @@
             }
         }
       else
-        error ("lastwarn: expecting arguments to be character strings");
+        error ("lastwarn: all arguments must be strings");
     }
   else
     print_usage ();
@@ -1910,7 +2018,7 @@
   return retval;
 }
 
-DEFUN (usage, args, ,
+DEFUN (__usage__, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} usage (@var{msg})\n\
 Print the message @var{msg}, prefixed by the string @samp{usage: }, and\n\
@@ -2008,6 +2116,12 @@
   return Vlast_error_id;
 }
 
+octave_map
+last_error_stack (void)
+{
+  return Vlast_error_stack;
+}
+
 std::string
 last_warning_message (void)
 {
--- a/libinterp/corefcn/error.h
+++ b/libinterp/corefcn/error.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -26,12 +26,12 @@
 #include <cstdarg>
 #include <string>
 
+class octave_map;
 class octave_value_list;
 class unwind_protect;
 
 #define panic_impossible() \
-  panic ("impossible state reached in file '%s' at line %d", \
-         __FILE__, __LINE__)
+  panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
 
 extern OCTINTERP_API void reset_error_handler (void);
 
@@ -137,6 +137,7 @@
 // Helper functions to pass last error and warning messages and ids
 extern OCTINTERP_API std::string last_error_message (void);
 extern OCTINTERP_API std::string last_error_id (void);
+extern OCTINTERP_API octave_map last_error_stack (void);
 extern OCTINTERP_API std::string last_warning_message (void);
 extern OCTINTERP_API std::string last_warning_id (void);
 
--- a/libinterp/corefcn/event-queue.h
+++ b/libinterp/corefcn/event-queue.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/fft.cc
+++ b/libinterp/corefcn/fft.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 David Bateman
+Copyright (C) 1997-2015 David Bateman
 Copyright (C) 1996-1997 John W. Eaton
 
 This file is part of Octave.
--- a/libinterp/corefcn/fft2.cc
+++ b/libinterp/corefcn/fft2.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 David Bateman
+Copyright (C) 1997-2015 David Bateman
 Copyright (C) 1996-1997 John W. Eaton
 
 This file is part of Octave.
--- a/libinterp/corefcn/fftn.cc
+++ b/libinterp/corefcn/fftn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/file-io.cc
+++ b/libinterp/corefcn/file-io.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -240,10 +240,17 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} fclose (@var{fid})\n\
 @deftypefnx {Built-in Function} {} fclose (\"all\")\n\
-Close the specified file.  If successful, @code{fclose} returns 0,\n\
-otherwise, it returns -1.  The second form of the @code{fclose} call closes\n\
-all open files except @code{stdout}, @code{stderr}, and @code{stdin}.\n\
-@seealso{fopen, freport}\n\
+@deftypefnx {Built-in Function} {@var{status} =} fclose (\"all\")\n\
+Close the file specified by the file descriptor @var{fid}.\n\
+\n\
+If successful, @code{fclose} returns 0, otherwise, it returns -1.  The\n\
+second form of the @code{fclose} call closes all open files except\n\
+@code{stdout}, @code{stderr}, and @code{stdin}.\n\
+\n\
+Programming Note: When using @qcode{\"all\"} the file descriptors associated\n\
+with gnuplot will also be closed.  This will prevent further plotting with\n\
+gnuplot until Octave is closed and restarted.\n\
+@seealso{fopen, fflush, freport}\n\
 @end deftypefn")
 {
   octave_value retval = -1;
@@ -261,8 +268,9 @@
 DEFUN (fclear, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} fclear (@var{fid})\n\
-Clear the stream state for the specified file.\n\
-@seealso{fopen}\n\
+Clear the stream state for the file specified by the file descriptor\n\
+@var{fid}.\n\
+@seealso{ferror, fopen}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -271,7 +279,7 @@
 
   if (nargin == 1)
     {
-      int fid = octave_stream_list::get_file_number (args (0));
+      int fid = octave_stream_list::get_file_number (args(0));
 
       octave_stream os = octave_stream_list::lookup (fid, "fclear");
 
@@ -287,13 +295,15 @@
 DEFUN (fflush, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} fflush (@var{fid})\n\
-Flush output to @var{fid}.  This is useful for ensuring that all\n\
-pending output makes it to the screen before some other event occurs.\n\
-For example, it is always a good idea to flush the standard output\n\
-stream before calling @code{input}.\n\
+Flush output to file descriptor @var{fid}.\n\
 \n\
 @code{fflush} returns 0 on success and an OS dependent error value\n\
 (@minus{}1 on Unix) on error.\n\
+\n\
+Programming Note: Flushing is useful for ensuring that all pending output\n\
+makes it to the screen before some other event occurs.  For example, it is\n\
+always a good idea to flush the standard output stream before calling\n\
+@code{input}.\n\
 @seealso{fopen, fclose}\n\
 @end deftypefn")
 {
@@ -305,7 +315,7 @@
     {
       // FIXME: any way to avoid special case for stdout?
 
-      int fid = octave_stream_list::get_file_number (args (0));
+      int fid = octave_stream_list::get_file_number (args(0));
 
       if (fid == 1)
         {
@@ -335,8 +345,7 @@
 or @var{len} characters have been read.  The characters read, excluding\n\
 the possible trailing newline, are returned as a string.\n\
 \n\
-If @var{len} is omitted, @code{fgetl} reads until the next newline\n\
-character.\n\
+If @var{len} is omitted, @code{fgetl} reads until the next newline character.\n\
 \n\
 If there are no more characters to read, @code{fgetl} returns @minus{}1.\n\
 \n\
@@ -386,8 +395,7 @@
 or @var{len} characters have been read.  The characters read, including\n\
 the possible trailing newline, are returned as a string.\n\
 \n\
-If @var{len} is omitted, @code{fgets} reads until the next newline\n\
-character.\n\
+If @var{len} is omitted, @code{fgets} reads until the next newline character.\n\
 \n\
 If there are no more characters to read, @code{fgets} returns @minus{}1.\n\
 \n\
@@ -434,7 +442,9 @@
 @deftypefn  {Built-in Function} {@var{nlines} =} fskipl (@var{fid})\n\
 @deftypefnx {Built-in Function} {@var{nlines} =} fskipl (@var{fid}, @var{count})\n\
 @deftypefnx {Built-in Function} {@var{nlines} =} fskipl (@var{fid}, Inf)\n\
-Read and skip @var{count} lines from the file descriptor @var{fid}.\n\
+Read and skip @var{count} lines from the file specified by the file\n\
+descriptor @var{fid}.\n\
+\n\
 @code{fskipl} discards characters until an end-of-line is encountered exactly\n\
 @var{count}-times, or until the end-of-file marker is found.\n\
 \n\
@@ -500,23 +510,8 @@
 
           file_stat fs (fname);
 
-          if (! (md & std::ios::out
-                 || octave_env::absolute_pathname (fname)
-                 || octave_env::rooted_relative_pathname (fname)))
-            {
-              if (! fs.exists ())
-                {
-                  std::string tmp
-                    = octave_env::make_absolute (load_path::find_file (fname));
-
-                  if (! tmp.empty ())
-                    {
-                      warning_with_id ("Octave:fopen-file-in-path",
-                                       "fopen: file found in load path");
-                      fname = tmp;
-                    }
-                }
-            }
+          if (! (md & std::ios::out))
+            fname = find_data_file_in_load_path ("fopen", fname);
 
           if (! fs.is_dir ())
             {
@@ -562,18 +557,20 @@
 
   fid = -1;
 
-  std::string name = tc_name.string_value ();
-
-  if (! error_state)
+  if (tc_name.is_string ())
     {
-      std::string mode = tc_mode.string_value ();
+      std::string name = tc_name.string_value ();
 
-      if (! error_state)
+      if (tc_mode.is_string ())
         {
-          std::string arch = tc_arch.string_value ();
+          std::string mode = tc_mode.string_value ();
 
-          if (! error_state)
-            retval = do_stream_open (name, mode, arch, fid);
+          if (tc_arch.is_string ())
+            {
+              std::string arch = tc_arch.string_value ();
+
+              retval = do_stream_open (name, mode, arch, fid);
+            }
           else
             ::error ("%s: architecture type must be a string", fcn);
         }
@@ -588,7 +585,10 @@
 
 DEFUN (fopen, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {[@var{fid}, @var{msg}] =} fopen (@var{name}, @var{mode}, @var{arch})\n\
+@deftypefn  {Built-in Function} {@var{fid} =} fopen (@var{name})\n\
+@deftypefnx {Built-in Function} {@var{fid} =} fopen (@var{name}, @var{mode})\n\
+@deftypefnx {Built-in Function} {@var{fid} =} fopen (@var{name}, @var{mode}, @var{arch})\n\
+@deftypefnx {Built-in Function} {[@var{fid}, @var{msg}] =} fopen (@dots{})\n\
 @deftypefnx {Built-in Function} {@var{fid_list} =} fopen (\"all\")\n\
 @deftypefnx {Built-in Function} {[@var{file}, @var{mode}, @var{arch}] =} fopen (@var{fid})\n\
 The first form of the @code{fopen} function opens the named file with\n\
@@ -627,7 +627,7 @@
 The possible values @samp{mode} may have are\n\
 \n\
 @table @asis\n\
-@item @samp{r}\n\
+@item @samp{r} (default)\n\
 Open a file for reading.\n\
 \n\
 @item @samp{w}\n\
@@ -652,7 +652,7 @@
 @qcode{\"b\"} to open in binary mode.  On Windows and Macintosh systems, text\n\
 mode reading and writing automatically converts linefeeds to the\n\
 appropriate line end character for the system (carriage-return linefeed\n\
-on Windows, carriage-return on Macintosh).  The default if no mode is\n\
+on Windows, carriage-return on Macintosh).  The default when no mode is\n\
 specified is binary mode.\n\
 \n\
 Additionally, you may append a @qcode{\"z\"} to the mode string to open a\n\
@@ -663,8 +663,8 @@
 for the file.  Valid values for @var{arch} are:\n\
 \n\
 @table @samp\n\
-@item native\n\
-The format of the current machine (this is the default).\n\
+@item native (default)\n\
+The format of the current machine.\n\
 \n\
 @item ieee-be\n\
 IEEE big endian format.\n\
@@ -753,15 +753,15 @@
 @group\n\
 freport ()\n\
 \n\
-     @print{}  number  mode  name\n\
-     @print{}\n\
-     @print{}       0     r  stdin\n\
-     @print{}       1     w  stdout\n\
-     @print{}       2     w  stderr\n\
-     @print{}       3     r  myfile\n\
+     @print{}  number  mode  arch       name\n\
+     @print{}  ------  ----  ----       ----\n\
+     @print{}     0     r    ieee-le    stdin\n\
+     @print{}     1     w    ieee-le    stdout\n\
+     @print{}     2     w    ieee-le    stderr\n\
+     @print{}     3     r    ieee-le    myfile\n\
 @end group\n\
 @end example\n\
-@seealso{fopen, fclose}\n\
+@seealso{fopen, fclose, is_valid_file_id}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -778,10 +778,13 @@
 
 DEFUN (frewind, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} frewind (@var{fid})\n\
-Move the file pointer to the beginning of the file @var{fid}, returning\n\
-0 for success, and -1 if an error was encountered.  It is equivalent to\n\
-@code{fseek (@var{fid}, 0, SEEK_SET)}.\n\
+@deftypefn  {Built-in Function} {} frewind (@var{fid})\n\
+@deftypefnx {Built-in Function} {@var{status} =} frewind (@var{fid})\n\
+Move the file pointer to the beginning of the file specified by file\n\
+descriptor @var{fid}.\n\
+\n\
+@code{frewind} returns 0 for success, and -1 if an error is encountered.  It\n\
+is equivalent to @code{fseek (@var{fid}, 0, SEEK_SET)}.\n\
 @seealso{fseek, ftell, fopen}\n\
 @end deftypefn")
 {
@@ -812,7 +815,7 @@
 @deftypefn  {Built-in Function} {} fseek (@var{fid}, @var{offset})\n\
 @deftypefnx {Built-in Function} {} fseek (@var{fid}, @var{offset}, @var{origin})\n\
 @deftypefnx {Built-in Function} {@var{status} =} fseek (@dots{})\n\
-Set the file pointer to any location within the file @var{fid}.\n\
+Set the file pointer to the location @var{offset} within the file @var{fid}.\n\
 \n\
 The pointer is positioned @var{offset} characters from the @var{origin},\n\
 which may be one of the predefined variables @w{@code{SEEK_CUR}} (current\n\
@@ -822,7 +825,7 @@
 be positive, negative, or zero but not all combinations of @var{origin} and\n\
 @var{offset} can be realized.\n\
 \n\
-Return 0 on success and -1 on error.\n\
+@code{fseek} returns 0 on success and -1 on error.\n\
 @seealso{fskipl, frewind, ftell, fopen}\n\
 @end deftypefn")
 {
@@ -850,10 +853,10 @@
 
 DEFUN (ftell, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} ftell (@var{fid})\n\
-Return the position of the file pointer as the number of characters\n\
-from the beginning of the file @var{fid}.\n\
-@seealso{fseek, feof, fopen}\n\
+@deftypefn {Built-in Function} {@var{pos} =} ftell (@var{fid})\n\
+Return the position of the file pointer as the number of characters from the\n\
+beginning of the file specified by file descriptor @var{fid}.\n\
+@seealso{fseek, frewind, feof, fopen}\n\
 @end deftypefn")
 {
   octave_value retval = -1;
@@ -875,10 +878,20 @@
 
 DEFUN (fprintf, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} fprintf (@var{fid}, @var{template}, @dots{})\n\
-This function is just like @code{printf}, except that the output is\n\
-written to the stream @var{fid} instead of @code{stdout}.\n\
-If @var{fid} is omitted, the output is written to @code{stdout}.\n\
+@deftypefn  {Built-in Function} {} fprintf (@var{fid}, @var{template}, @dots{})\n\
+@deftypefnx {Built-in Function} {} fprintf (@var{template}, @dots{})\n\
+@deftypefnx {Built-in Function} {@var{numbytes} =} fprintf (@dots{})\n\
+This function is equivalent to @code{printf}, except that the output is\n\
+written to the file descriptor @var{fid} instead of @code{stdout}.\n\
+\n\
+If @var{fid} is omitted, the output is written to @code{stdout} making the\n\
+function exactly equivalent to @code{printf}.\n\
+\n\
+The optional output returns the number of bytes written to the file.\n\
+\n\
+Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{fputs, fdisp, fwrite, fscanf, printf, sprintf, fopen}\n\
 @end deftypefn")
 {
@@ -945,6 +958,10 @@
 See the Formatted Output section of the GNU Octave manual for a\n\
 complete description of the syntax of the template string.\n\
 @end ifclear\n\
+\n\
+Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{fprintf, sprintf, scanf}\n\
 @end deftypefn")
 {
@@ -986,10 +1003,15 @@
 
 DEFUN (fputs, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} fputs (@var{fid}, @var{string})\n\
-Write a string to a file with no formatting.\n\
+@deftypefn  {Built-in Function} {} fputs (@var{fid}, @var{string})\n\
+@deftypefnx {Built-in Function} {@var{status} =} fputs (@var{fid}, @var{string})\n\
+Write the string @var{string} to the file with file descriptor @var{fid}.\n\
 \n\
-Return a non-negative number on success and EOF on error.\n\
+The string is written to the file with no additional formatting.  Use\n\
+@code{fdisp} instead to automatically append a newline character appropriate\n\
+for the local machine.\n\
+\n\
+Return a non-negative number on success or EOF on error.\n\
 @seealso{fdisp, fprintf, fwrite, fopen}\n\
 @end deftypefn")
 {
@@ -1014,9 +1036,13 @@
 
 DEFUN (puts, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} puts (@var{string})\n\
+@deftypefn  {Built-in Function} {} puts (@var{string})\n\
+@deftypefnx {Built-in Function} {@var{status} =} puts (@var{string})\n\
 Write a string to the standard output with no formatting.\n\
 \n\
+The string is written verbatim to the standard output.  Use @code{disp} to\n\
+automatically append a newline character appropriate for the local machine.\n\
+\n\
 Return a non-negative number on success and EOF on error.\n\
 @seealso{fputs, disp}\n\
 @end deftypefn")
@@ -1041,6 +1067,10 @@
 suitably sized string as an argument, Octave's @code{sprintf} function\n\
 returns the string, automatically sized to hold all of the items\n\
 converted.\n\
+\n\
+Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{printf, fprintf, sscanf}\n\
 @end deftypefn")
 {
@@ -1078,8 +1108,13 @@
 
               retval(2) = os.printf (fmt_arg, tmp_args, who);
               retval(1) = os.error ();
-              retval(0) = octave_value (ostr->str (),
-                                        fmt_arg.is_sq_string () ? '\'' : '"');
+
+              std::string result = ostr->str ();
+              char type = fmt_arg.is_sq_string () ? '\'' : '"';
+
+              retval(0) = (result.empty ()
+                           ? octave_value (charMatrix (1, 0), type)
+                           : octave_value (result, type));
             }
           else
             ::error ("%s: format TEMPLATE must be a string", who.c_str ());
@@ -1327,8 +1362,7 @@
 @deftypefnx {Built-in Function} {[@var{v1}, @var{v2}, @dots{}, @var{count}, @var{errmsg}]] =} scanf (@var{template}, \"C\")\n\
 This is equivalent to calling @code{fscanf} with @var{fid} = @code{stdin}.\n\
 \n\
-It is currently not useful to call @code{scanf} in interactive\n\
-programs.\n\
+It is currently not useful to call @code{scanf} in interactive programs.\n\
 @seealso{fscanf, sscanf, printf}\n\
 @end deftypefn")
 {
@@ -1338,7 +1372,7 @@
 
   tmp_args (0) = 0.0;
   for (int i = 0; i < nargin; i++)
-    tmp_args (i+1) = args (i);
+    tmp_args(i+1) = args(i);
 
   return Ffscanf (tmp_args, nargout);
 }
@@ -1356,10 +1390,10 @@
 
   if (! error_state)
     {
-      std::string prec = prec_arg.string_value ();
+      if (prec_arg.is_string ())
+        {
+          std::string prec = prec_arg.string_value ();
 
-      if (! error_state)
-        {
           int block_size = 1;
           oct_data_conv::data_type input_type;
           oct_data_conv::data_type output_type;
@@ -1373,10 +1407,10 @@
 
               if (! error_state)
                 {
-                  std::string arch = arch_arg.string_value ();
+                  if (arch_arg.is_string ())
+                    {
+                      std::string arch = arch_arg.string_value ();
 
-                  if (! error_state)
-                    {
                       oct_mach_info::float_format flt_fmt
                         = oct_mach_info::string_to_float_format (arch);
 
@@ -1404,9 +1438,13 @@
 
 DEFUN (fread, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {[@var{val}, @var{count}] =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip}, @var{arch})\n\
-Read binary data of type @var{precision} from the specified file ID\n\
-@var{fid}.\n\
+@deftypefn  {Built-in Function} {@var{val} =} fread (@var{fid})\n\
+@deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size})\n\
+@deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision})\n\
+@deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip})\n\
+@deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip}, @var{arch})\n\
+@deftypefnx {Built-in Function} {[@var{val}, @var{count}] =} fread (@dots{})\n\
+Read binary data from the file specified by the file descriptor @var{fid}.\n\
 \n\
 The optional argument @var{size} specifies the amount of data to read\n\
 and may be one of\n\
@@ -1548,19 +1586,19 @@
 The optional argument @var{arch} is a string specifying the data format\n\
 for the file.  Valid values are\n\
 \n\
-@table @code\n\
+@table @asis\n\
 @item @qcode{\"native\"}\n\
 The format of the current machine.\n\
 \n\
-@item \"ieee-be\"\n\
+@item @qcode{\"ieee-be\"}\n\
 IEEE big endian.\n\
 \n\
-@item \"ieee-le\"\n\
+@item @qcode{\"ieee-le\"}\n\
 IEEE little endian.\n\
 @end table\n\
 \n\
-The data read from the file is returned in @var{val}, and the number of\n\
-values read is returned in @code{count}\n\
+The output argument @var{val} contains the data read from the file.\n\
+The optional return value @var{count} contains the number of elements read.\n\
 @seealso{fwrite, fgets, fgetl, fscanf, fopen}\n\
 @end deftypefn")
 {
@@ -1622,10 +1660,10 @@
 {
   int retval = -1;
 
-  std::string prec = prec_arg.string_value ();
+  if (prec_arg.is_string ())
+    {
+      std::string prec = prec_arg.string_value ();
 
-  if (! error_state)
-    {
       int block_size = 1;
       oct_data_conv::data_type output_type;
 
@@ -1637,10 +1675,10 @@
 
           if (! error_state)
             {
-              std::string arch = arch_arg.string_value ();
+              if (arch_arg.is_string ())
+                {
+                  std::string arch = arch_arg.string_value ();
 
-              if (! error_state)
-                {
                   oct_mach_info::float_format flt_fmt
                     = oct_mach_info::string_to_float_format (arch);
 
@@ -1665,10 +1703,14 @@
 
 DEFUN (fwrite, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{count} =} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}, @var{arch})\n\
-Write data in binary form of type @var{precision} to the specified file\n\
-ID @var{fid}, returning the number of values successfully written to the\n\
-file.\n\
+@deftypefn  {Built-in Function} {} fwrite (@var{fid}, @var{data})\n\
+@deftypefnx {Built-in Function} {} fwrite (@var{fid}, @var{data}, @var{precision})\n\
+@deftypefnx {Built-in Function} {} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip})\n\
+@deftypefnx {Built-in Function} {} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}, @var{arch})\n\
+@deftypefnx {Built-in Function} {@var{count} =} fwrite (@dots{})\n\
+Write data in binary form to the file specified by the file descriptor\n\
+@var{fid}, returning the number of values @var{count} successfully written\n\
+to the file.\n\
 \n\
 The argument @var{data} is a matrix of values that are to be written to\n\
 the file.  The values are extracted in column-major order.\n\
@@ -1726,12 +1768,14 @@
 
 DEFUNX ("feof", Ffeof, args, ,
         "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} feof (@var{fid})\n\
-Return 1 if an end-of-file condition has been encountered for a given\n\
-file and 0 otherwise.  Note that it will only return 1 if the end of the\n\
-file has already been encountered, not if the next read operation will\n\
-result in an end-of-file condition.\n\
-@seealso{fread, fopen}\n\
+@deftypefn {Built-in Function} {@var{status} =} feof (@var{fid})\n\
+Return 1 if an end-of-file condition has been encountered for the file\n\
+specified by file descriptor @var{fid} and 0 otherwise.\n\
+\n\
+Note that @code{feof} will only return 1 if the end of the file has already\n\
+been encountered, not if the next read operation will result in an\n\
+end-of-file condition.\n\
+@seealso{fread, frewind, fseek, fclear, fopen}\n\
 @end deftypefn")
 {
   octave_value retval = -1;
@@ -1753,15 +1797,22 @@
 
 DEFUNX ("ferror", Fferror, args, ,
         "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {[@var{err}, @var{msg}] =} ferror (@var{fid})\n\
-@deftypefnx {Built-in Function} {[@var{err}, @var{msg}] =} ferror (@var{fid}, \"clear\")\n\
-Return 1 if an error condition has been encountered for the file ID\n\
-@var{fid} and 0 otherwise.  Note that it will only return 1 if an error\n\
-has already been encountered, not if the next operation will result in\n\
-an error condition.\n\
+@deftypefn  {Built-in Function} {@var{msg} =} ferror (@var{fid})\n\
+@deftypefnx {Built-in Function} {[@var{msg}, @var{err}] =} ferror (@var{fid})\n\
+@deftypefnx {Built-in Function} {[@var{dots}] =} ferror (@var{fid}, \"clear\")\n\
+Query the error status of the stream specified by file descriptor @var{fid}\n\
+\n\
+If an error condition exists then return a string @var{msg} describing the\n\
+error.  Otherwise, return an empty string @qcode{\"\"}.\n\
 \n\
-The second argument is optional.  If it is supplied, also clear the\n\
-error condition.\n\
+The optional second output is a numeric indication of the error status.\n\
+@var{err} is 1 if an error condition has been encountered and 0 otherwise.\n\
+\n\
+Note that @code{ferror} indicates if an error has already occurred, not\n\
+whether the next operation will result in an error condition.\n\
+\n\
+The second input @qcode{\"clear\"} is optional.  If supplied, the error\n\
+state on the stream will be cleared.\n\
 @seealso{fclear, fopen}\n\
 @end deftypefn")
 {
@@ -1802,7 +1853,7 @@
 }
 
 DEFUNX ("popen", Fpopen, args, ,
-       "-*- texinfo -*-\n\
+        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {@var{fid} =} popen (@var{command}, @var{mode})\n\
 Start a process and create a pipe.  The name of the command to run is\n\
 given by @var{command}.  The file identifier corresponding to the input\n\
@@ -1833,6 +1884,7 @@
    @print{} drwxrwxrwt  15 root  root  2048 Feb 17 14:53 tmp\n\
 @end group\n\
 @end example\n\
+@seealso{popen2}\n\
 @end deftypefn")
 {
   octave_value retval = -1;
@@ -1841,14 +1893,14 @@
 
   if (nargin == 2)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
-          std::string mode = args(1).string_value ();
+          std::string name = args(0).string_value ();
 
-          if (! error_state)
+          if (args(1).is_string ())
             {
+              std::string mode = args(1).string_value ();
+
               if (mode == "r")
                 {
                   octave_stream ips = octave_iprocstream::create (name);
@@ -1879,8 +1931,10 @@
 DEFUNX ("pclose", Fpclose, args, ,
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} pclose (@var{fid})\n\
-Close a file identifier that was opened by @code{popen}.  You may also\n\
-use @code{fclose} for the same purpose.\n\
+Close a file identifier that was opened by @code{popen}.\n\
+\n\
+The function @code{fclose} may also be used for the same purpose.\n\
+@seealso{fclose, popen}\n\
 @end deftypefn")
 {
   octave_value retval = -1;
@@ -1895,23 +1949,23 @@
   return retval;
 }
 
-DEFUNX ("tmpnam", Ftmpnam, args, ,
-        "-*- texinfo -*-\n\
-@c List other forms of function in documentation index\n\
-@findex octave_tmp_file_name\n\
-\n\
-@deftypefn  {Built-in Function} {} tmpnam ()\n\
-@deftypefnx {Built-in Function} {} tmpnam (@var{dir})\n\
-@deftypefnx {Built-in Function} {} tmpnam (@var{dir}, @var{prefix})\n\
+DEFUN (tempname, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{fname} =} tempname ()\n\
+@deftypefnx {Built-in Function} {@var{fname} =} tempname (@var{dir})\n\
+@deftypefnx {Built-in Function} {@var{fname} =} tempname (@var{dir}, @var{prefix})\n\
 Return a unique temporary file name as a string.\n\
 \n\
 If @var{prefix} is omitted, a value of @qcode{\"oct-\"} is used.\n\
 If @var{dir} is also omitted, the default directory for temporary files\n\
-is used.  If @var{dir} is provided, it must exist, otherwise the default\n\
-directory for temporary files is used.  Since the named file is not\n\
-opened, by @code{tmpnam}, it is possible (though relatively unlikely)\n\
-that it will not be available by the time your program attempts to open it.\n\
-@seealso{tmpfile, mkstemp, P_tmpdir}\n\
+(@code{P_tmpdir}) is used.  If @var{dir} is provided, it must exist,\n\
+otherwise the default directory for temporary files is used.\n\
+\n\
+Programming Note: Because the named file is not opened by @code{tempname},\n\
+it is possible, though relatively unlikely, that it will not be available\n\
+by the time your program attempts to open it.  If this is a concern,\n\
+see @code{tmpfile}.\n\
+@seealso{mkstemp, tempdir, P_tmpdir, tmpfile}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -1920,20 +1974,25 @@
 
   if (len < 3)
     {
-      std::string dir = len > 0 ? args(0).string_value () : std::string ();
-
-      if (! error_state)
+      std::string dir;
+      if (len > 0)
         {
-          std::string pfx
-            = len > 1 ? args(1).string_value () : std::string ("oct-");
+          if (args(0).is_string ())
+            dir = args(0).string_value ();
+          else
+            ::error ("DIR must be a string");
+        }
 
-          if (! error_state)
-            retval = octave_tempnam (dir, pfx);
+      std::string pfx ("oct-");
+      if (len > 1)
+        {
+          if (args(1).is_string ())
+            pfx = args(1).string_value ();
           else
             ::error ("PREFIX must be a string");
         }
-      else
-        ::error ("DIR argument must be a string");
+
+      retval = octave_tempnam (dir, pfx);
     }
   else
     print_usage ();
@@ -1941,20 +2000,67 @@
   return retval;
 }
 
-DEFALIAS (octave_tmp_file_name, tmpnam);
+/*
+%!test
+%! if (ispc ())
+%!   envname = "TMP";
+%! else
+%!   envname = "TMPDIR";
+%! endif
+%! envdir = getenv (envname);
+%! unsetenv (envname);
+%! unwind_protect
+%!   ## Test 0-argument form
+%!   fname = tempname ();
+%!   [tmpdir, tmpfname] = fileparts (fname);
+%!   assert (tmpdir, P_tmpdir);
+%!   assert (tmpfname (1:4), "oct-");
+%!   ## Test 1-argument form
+%!   tmp_tmpdir = [P_tmpdir filesep() substr(tmpfname, -5)];
+%!   mkdir (tmp_tmpdir) || error ("Unable to create tmp dir");
+%!   setenv (envname, P_tmpdir);
+%!   fname = tempname (tmp_tmpdir);
+%!   [tmpdir, tmpfname] = fileparts (fname);
+%!   assert (tmpdir, tmp_tmpdir);
+%!   assert (tmpfname (1:4), "oct-");
+%!   ## Test 1-argument form w/null tmpdir
+%!   fname = tempname ("");
+%!   [tmpdir, tmpfname] = fileparts (fname);
+%!   assert (tmpdir, P_tmpdir);
+%!   assert (tmpfname (1:4), "oct-");
+%!   ## Test 2-argument form
+%!   fname = tempname (tmp_tmpdir, "pfx-");
+%!   [tmpdir, tmpfname] = fileparts (fname);
+%!   assert (tmpdir, tmp_tmpdir);
+%!   assert (tmpfname (1:4), "pfx-");
+%!   ## Test 2-argument form w/null prefix
+%!   fname = tempname (tmp_tmpdir, "");
+%!   [tmpdir, tmpfname] = fileparts (fname);
+%!   assert (tmpdir, tmp_tmpdir);
+%!   assert (tmpfname (1:4), "file");
+%! unwind_protect_cleanup
+%!   rmdir (tmp_tmpdir);
+%!   if (isempty (envdir))
+%!     unsetenv (envname);
+%!   else
+%!     setenv (envname, envdir);
+%!   endif
+%! end_unwind_protect
+*/
 
 DEFUN (tmpfile, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} tmpfile ()\n\
 Return the file ID corresponding to a new temporary file with a unique\n\
-name.  The file is opened in binary read/write (@qcode{\"w+b\"}) mode.\n\
-The file will be deleted automatically when it is closed or when Octave\n\
-exits.\n\
+name.\n\
+\n\
+The file is opened in binary read/write (@qcode{\"w+b\"}) mode and will be\n\
+deleted automatically when it is closed or when Octave exits.\n\
 \n\
 If successful, @var{fid} is a valid file ID and @var{msg} is an empty\n\
 string.  Otherwise, @var{fid} is -1 and @var{msg} contains a\n\
 system-dependent error message.\n\
-@seealso{tmpnam, mkstemp, P_tmpdir}\n\
+@seealso{tempname, mkstemp, tempdir, P_tmpdir}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -1996,23 +2102,25 @@
 
 DEFUN (mkstemp, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} mkstemp (@var{template}, @var{delete})\n\
-Return the file ID corresponding to a new temporary file with a unique\n\
-name created from @var{template}.  The last six characters of @var{template}\n\
-must be @code{XXXXXX} and these are replaced with a string that makes the\n\
-filename unique.  The file is then created with mode read/write and\n\
-permissions that are system dependent (on GNU/Linux systems, the permissions\n\
-will be 0600 for versions of glibc 2.0.7 and later).  The file is opened\n\
-in binary mode and with the @w{@code{O_EXCL}} flag.\n\
+@deftypefn  {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} mkstemp (\"@var{template}\")\n\
+@deftypefnx {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} mkstemp (\"@var{template}\", @var{delete})\n\
+Return the file descriptor @var{fid} corresponding to a new temporary file\n\
+with a unique name created from @var{template}.\n\
 \n\
-If the optional argument @var{delete} is supplied and is true,\n\
-the file will be deleted automatically when Octave exits.\n\
+The last six characters of @var{template} must be @qcode{\"XXXXXX\"} and\n\
+these are replaced with a string that makes the filename unique.  The file\n\
+is then created with mode read/write and permissions that are system\n\
+dependent (on GNU/Linux systems, the permissions will be 0600 for versions of\n\
+glibc 2.0.7 and later).  The file is opened in binary mode and with the\n\
+@w{@code{O_EXCL}} flag.\n\
 \n\
-If successful, @var{fid} is a valid file ID, @var{name} is the name of\n\
-the file, and @var{msg} is an empty string.  Otherwise, @var{fid}\n\
-is -1, @var{name} is empty, and @var{msg} contains a system-dependent\n\
-error message.\n\
-@seealso{tmpfile, tmpnam, P_tmpdir}\n\
+If the optional argument @var{delete} is supplied and is true, the file will\n\
+be deleted automatically when Octave exits.\n\
+\n\
+If successful, @var{fid} is a valid file ID, @var{name} is the name of the\n\
+file, and @var{msg} is an empty string.  Otherwise, @var{fid} is -1,\n\
+@var{name} is empty, and @var{msg} contains a system-dependent error message.\n\
+@seealso{tempname, tempdir, P_tmpdir, tmpfile, fopen}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -2025,10 +2133,10 @@
 
   if (nargin == 1 || nargin == 2)
     {
-      std::string tmpl8 = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string tmpl8 = args(0).string_value ();
 
-      if (! error_state)
-        {
           OCTAVE_LOCAL_BUFFER (char, tmp, tmpl8.size () + 1);
           strcpy (tmp, tmpl8.c_str ());
 
@@ -2112,10 +2220,12 @@
 DEFUNX ("umask", Fumask, args, ,
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} umask (@var{mask})\n\
-Set the permission mask for file creation.  The parameter @var{mask}\n\
-is an integer, interpreted as an octal number.  If successful,\n\
-returns the previous value of the mask (as an integer to be\n\
+Set the permission mask for file creation.\n\
+\n\
+The parameter @var{mask} is an integer, interpreted as an octal number.  If\n\
+successful, returns the previous value of the mask (as an integer to be\n\
 interpreted as an octal number); otherwise an error message is printed.\n\
+@seealso{fopen, mkdir}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -2174,8 +2284,14 @@
 DEFUNX ("P_tmpdir", FP_tmpdir, args, ,
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} P_tmpdir ()\n\
-Return the default name of the directory for temporary files on\n\
-this system.  The name of this directory is system dependent.\n\
+Return the name of the host system's @strong{default} directory for\n\
+temporary files.\n\
+\n\
+Programming Note: The value returned by @code{P_tmpdir} is always the\n\
+default location.  This value may not agree with that returned from\n\
+@code{tempdir} if the user has overridden the default with the @env{TMPDIR}\n\
+environment variable.\n\
+@seealso{tempdir, tempname, mkstemp, tmpfile}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -2198,8 +2314,8 @@
 @deftypefn  {Built-in Function} {} SEEK_SET ()\n\
 @deftypefnx {Built-in Function} {} SEEK_CUR ()\n\
 @deftypefnx {Built-in Function} {} SEEK_END ()\n\
-Return the numerical value to pass to @code{fseek} to perform\n\
-one of the following actions:\n\
+Return the numerical value to pass to @code{fseek} to perform one of the\n\
+following actions:\n\
 \n\
 @table @code\n\
 @item SEEK_SET\n\
@@ -2259,7 +2375,8 @@
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} stdin ()\n\
 Return the numeric value corresponding to the standard input stream.\n\
-When Octave is used interactively, this is filtered through the command\n\
+\n\
+When Octave is used interactively, stdin is filtered through the command\n\
 line editing functions.\n\
 @seealso{stdout, stderr}\n\
 @end deftypefn")
@@ -2271,6 +2388,7 @@
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} stdout ()\n\
 Return the numeric value corresponding to the standard output stream.\n\
+\n\
 Data written to the standard output is normally filtered through the pager.\n\
 @seealso{stdin, stderr}\n\
 @end deftypefn")
@@ -2282,8 +2400,9 @@
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} stderr ()\n\
 Return the numeric value corresponding to the standard error stream.\n\
-Even if paging is turned on, the standard error is not sent to the\n\
-pager.  It is useful for error messages and prompts.\n\
+\n\
+Even if paging is turned on, the standard error is not sent to the pager.\n\
+It is useful for error messages and prompts.\n\
 @seealso{stdin, stdout}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/file-io.h
+++ b/libinterp/corefcn/file-io.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/filter.cc
+++ b/libinterp/corefcn/filter.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -75,9 +75,9 @@
 
   T norm = a (0);
 
-  if (norm == static_cast<T>(0.0))
+  if (norm == static_cast<T> (0.0))
     {
-      error ("filter: the first element of A must be non-zero");
+      error ("filter: the first element of A must be nonzero");
       return y;
     }
 
@@ -125,7 +125,7 @@
   if (x_len == 0)
     return x;
 
-  if (norm != static_cast<T>(1.0))
+  if (norm != static_cast<T> (1.0))
     {
       a = a / norm;
       b = b / norm;
--- a/libinterp/corefcn/find.cc
+++ b/libinterp/corefcn/find.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -61,7 +61,8 @@
     case 2:
       {
         Array<octave_idx_type> jdx (idx.dims ());
-        octave_idx_type n = idx.length (), nr = nda.rows ();
+        octave_idx_type n = idx.length ();
+        octave_idx_type nr = nda.rows ();
         for (octave_idx_type i = 0; i < n; i++)
           {
             jdx.xelem (i) = idx.xelem (i) / nr;
@@ -88,9 +89,8 @@
 {
   octave_value_list retval ((nargout == 0 ? 1 : nargout), Matrix ());
 
-
+  octave_idx_type nr = v.rows ();
   octave_idx_type nc = v.cols ();
-  octave_idx_type nr = v.rows ();
   octave_idx_type nz = v.nnz ();
 
   // Search in the default range.
@@ -138,21 +138,20 @@
   count = (n_to_find > v.cidx (end_nc) - v.cidx (start_nc) ?
            v.cidx (end_nc) - v.cidx (start_nc) : n_to_find);
 
-  // If the original argument was a row vector, force a row vector of
-  // the overall indices to be returned.  But see below for scalar
-  // case...
+  octave_idx_type result_nr;
+  octave_idx_type result_nc;
 
-  octave_idx_type result_nr = count;
-  octave_idx_type result_nc = 1;
-
-  bool scalar_arg = false;
-
-  if (v.rows () == 1)
+  // Default case is to return a column vector, however, if the original
+  // argument was a row vector, then force return of a row vector.
+  if (nr == 1)
     {
       result_nr = 1;
       result_nc = count;
-
-      scalar_arg = (v.columns () == 1);
+    }
+  else
+    {
+      result_nr = count;
+      result_nc = 1;
     }
 
   Matrix idx (result_nr, result_nc);
@@ -164,11 +163,10 @@
 
   if (count > 0)
     {
-      // Search for elements to return.  Only search the region where
-      // there are elements to be found using the count that we want
-      // to find.
+      // Search for elements to return.  Only search the region where there
+      // are elements to be found using the count that we want to find.
       for (octave_idx_type j = start_nc, cx = 0; j < end_nc; j++)
-        for (octave_idx_type i = v.cidx (j); i < v.cidx (j+1); i++ )
+        for (octave_idx_type i = v.cidx (j); i < v.cidx (j+1); i++)
           {
             OCTAVE_QUIT;
             if (direction < 0 && i < nz - count)
@@ -182,14 +180,19 @@
               break;
           }
     }
-  else if (scalar_arg)
+  else
     {
-      idx.resize (0, 0);
+      // No items found.  Fixup return dimensions for Matlab compatibility.
+      // The behavior to match is documented in Array.cc (Array<T>::find).
+      if ((nr == 0 && nc == 0) || (nr == 1 && nc == 1))
+        {
+          idx.resize (0, 0);
 
-      i_idx.resize (0, 0);
-      j_idx.resize (0, 0);
+          i_idx.resize (0, 0);
+          j_idx.resize (0, 0);
 
-      val.resize (dim_vector (0, 0));
+          val.resize (dim_vector (0, 0));
+        }
     }
 
   switch (nargout)
@@ -231,6 +234,7 @@
   // There are far fewer special cases to handle for a PermMatrix.
   octave_value_list retval ((nargout == 0 ? 1 : nargout), Matrix ());
 
+  octave_idx_type nr = v.rows ();
   octave_idx_type nc = v.cols ();
   octave_idx_type start_nc, count;
 
@@ -238,7 +242,6 @@
   if (n_to_find < 0 || n_to_find >= nc)
     {
       start_nc = 0;
-      n_to_find = nc;
       count = nc;
     }
   else if (direction > 0)
@@ -252,8 +255,6 @@
       count = n_to_find;
     }
 
-  bool scalar_arg = (v.rows () == 1 && v.cols () == 1);
-
   Matrix idx (count, 1);
   Matrix i_idx (count, 1);
   Matrix j_idx (count, 1);
@@ -262,42 +263,34 @@
 
   if (count > 0)
     {
-      const octave_idx_type* p = v.data ();
-      if (v.is_col_perm ())
+      const Array<octave_idx_type>& p = v.col_perm_vec ();
+      for (octave_idx_type k = 0; k < count; k++)
         {
-          for (octave_idx_type k = 0; k < count; k++)
-            {
-              OCTAVE_QUIT;
-              const octave_idx_type j = start_nc + k;
-              const octave_idx_type i = p[j];
-              i_idx(k) = static_cast<double> (1+i);
-              j_idx(k) = static_cast<double> (1+j);
-              idx(k) = j * nc + i + 1;
-            }
-        }
-      else
-        {
-          for (octave_idx_type k = 0; k < count; k++)
-            {
-              OCTAVE_QUIT;
-              const octave_idx_type i = start_nc + k;
-              const octave_idx_type j = p[i];
-              // Scatter into the index arrays according to
-              // j adjusted by the start point.
-              const octave_idx_type koff = j - start_nc;
-              i_idx(koff) = static_cast<double> (1+i);
-              j_idx(koff) = static_cast<double> (1+j);
-              idx(koff) = j * nc + i + 1;
-            }
+          OCTAVE_QUIT;
+          const octave_idx_type j = start_nc + k;
+          const octave_idx_type i = p(j);
+          i_idx(k) = static_cast<double> (1+i);
+          j_idx(k) = static_cast<double> (1+j);
+          idx(k) = j * nc + i + 1;
         }
     }
-  else if (scalar_arg)
+  else
     {
-      // Same odd compatibility case as the other overrides.
-      idx.resize (0, 0);
-      i_idx.resize (0, 0);
-      j_idx.resize (0, 0);
-      val.resize (dim_vector (0, 0));
+      // FIXME: Is this case even possible?  A scalar permutation matrix seems
+      // to devolve to a scalar full matrix, at least from the Octave command
+      // line.  Perhaps this function could be called internally from C++ with
+      // such a matrix.
+      // No items found.  Fixup return dimensions for Matlab compatibility.
+      // The behavior to match is documented in Array.cc (Array<T>::find).
+      if ((nr == 0 && nc == 0) || (nr == 1 && nc == 1))
+        {
+          idx.resize (0, 0);
+
+          i_idx.resize (0, 0);
+          j_idx.resize (0, 0);
+
+          val.resize (dim_vector (0, 0));
+        }
     }
 
   switch (nargout)
@@ -383,7 +376,7 @@
 ascending order.\n\
 \n\
 Note that this function is particularly useful for sparse matrices, as\n\
-it extracts the non-zero elements as vectors, which can then be used to\n\
+it extracts the nonzero elements as vectors, which can then be used to\n\
 create the original matrix.  For example:\n\
 \n\
 @example\n\
--- a/libinterp/corefcn/gammainc.cc
+++ b/libinterp/corefcn/gammainc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 John W. Eaton
+Copyright (C) 1997-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,7 +57,8 @@
 \n\
 @end ifnottex\n\
 with the limiting value of 1 as @var{x} approaches infinity.\n\
-The standard notation is @math{P(a,x)}, e.g., Abramowitz and Stegun (6.5.1).\n\
+The standard notation is @math{P(a,x)}, e.g., @nospell{Abramowitz} and\n\
+@nospell{Stegun} (6.5.1).\n\
 \n\
 If @var{a} is scalar, then @code{gammainc (@var{x}, @var{a})} is returned\n\
 for each element of @var{x} and vice versa.\n\
@@ -72,7 +73,7 @@
 @example\n\
 gammainc (@var{x}, @var{a}) @equiv{} 1 - gammainc (@var{x}, @var{a}, \"upper\")\n\
 @end example\n\
-@seealso{gamma, lgamma}\n\
+@seealso{gamma, gammaln}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -116,8 +117,7 @@
 
                       if (! error_state)
                         retval = lower ? gammainc (x, a)
-                                       : static_cast<float>(1)
-                                         - gammainc (x, a);
+                                       : 1.0f - gammainc (x, a);
                     }
                   else
                     {
@@ -125,8 +125,7 @@
 
                       if (! error_state)
                         retval = lower ? gammainc (x, a)
-                                       : static_cast<float>(1)
-                                         - gammainc (x, a);
+                                       : 1.0f - gammainc (x, a);
                     }
                 }
             }
@@ -142,8 +141,7 @@
 
                       if (! error_state)
                         retval = lower ? gammainc (x, a)
-                                       : static_cast<float>(1)
-                                         - gammainc (x, a);
+                                       : 1.0f - gammainc (x, a);
                     }
                   else
                     {
@@ -151,8 +149,7 @@
 
                       if (! error_state)
                         retval = lower ? gammainc (x, a)
-                                       : static_cast<float>(1)
-                                         - gammainc (x, a);
+                                       : 1.0f - gammainc (x, a);
                     }
                 }
             }
--- a/libinterp/corefcn/gcd.cc
+++ b/libinterp/corefcn/gcd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 2010 Jaroslav Hajek, Jordi Gutiérrez Hermoso
 
 This file is part of Octave.
@@ -125,8 +125,9 @@
   double aa = fabs (a);
   double bb = fabs (b);
 
-  double xx = 0, yy = 1;
-  double lx = 1, ly = 0;
+  double xx, lx, yy, ly;
+  xx = 0, lx = 1;
+  yy = 1, ly = 0;
 
   while (bb != 0)
     {
@@ -161,7 +162,8 @@
     (*current_liboctave_error_handler)
       ("gcd: all complex parts must be integers");
 
-  std::complex<FP> aa = a, bb = b;
+  std::complex<FP> aa = a;
+  std::complex<FP> bb = b;
   bool swapped = false;
   if (abs (aa) < abs (bb))
     {
@@ -169,8 +171,9 @@
       swapped = true;
     }
 
-  std::complex<FP> xx = 0, lx = 1;
-  std::complex<FP> yy = 1, ly = 0;
+  std::complex<FP> xx, lx, yy, ly;
+  xx = 0, lx = 1;
+  yy = 1, ly = 0;
 
   while (abs(bb) != 0)
     {
@@ -204,8 +207,9 @@
 {
   T aa = a.abs ().value ();
   T bb = b.abs ().value ();
-  T xx = 0, lx = 1;
-  T yy = 1, ly = 0;
+  T xx, lx, yy, ly;
+  xx = 0, lx = 1;
+  yy = 1, ly = 0;
 
   while (bb != 0)
     {
@@ -347,7 +351,8 @@
       bool incb = bb.numel () != 1;
 
       T *gptr = gg.fortran_vec ();
-      T *xptr = xx.fortran_vec (), *yptr = yy.fortran_vec ();
+      T *xptr = xx.fortran_vec ();
+      T *yptr = yy.fortran_vec ();
 
       octave_idx_type n = gg.numel ();
       for (octave_idx_type i = 0; i < n; i++)
@@ -436,25 +441,16 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{g} =} gcd (@var{a1}, @var{a2}, @dots{})\n\
 @deftypefnx {Built-in Function} {[@var{g}, @var{v1}, @dots{}] =} gcd (@var{a1}, @var{a2}, @dots{})\n\
-\n\
-Compute the greatest common divisor of @var{a1}, @var{a2}, @dots{}.  If more\n\
-than one argument is given all arguments must be the same size or scalar.\n\
-In this case the greatest common divisor is calculated for each element\n\
-individually.  All elements must be ordinary or Gaussian (complex)\n\
-integers.  Note that for Gaussian integers, the gcd is not unique up to\n\
-units (multiplication by 1, -1, @var{i} or -@var{i}), so an arbitrary\n\
-greatest common divisor amongst four possible is returned.\n\
+Compute the greatest common divisor of @var{a1}, @var{a2}, @dots{}.\n\
 \n\
-Example code:\n\
+If more than one argument is given then all arguments must be the same size\n\
+or scalar.  In this case the greatest common divisor is calculated for each\n\
+element individually.  All elements must be ordinary or Gaussian (complex)\n\
+integers.  Note that for Gaussian integers, the gcd is only unique up to a\n\
+phase factor (multiplication by 1, -1, i, or -i), so an arbitrary greatest\n\
+common divisor amongst four possible is returned.\n\
 \n\
-@example\n\
-@group\n\
-gcd ([15, 9], [20, 18])\n\
-   @result{}  5  9\n\
-@end group\n\
-@end example\n\
-\n\
-Optional return arguments @var{v1}, etc., contain integer vectors such\n\
+Optional return arguments @var{v1}, @dots{}, contain integer vectors such\n\
 that,\n\
 \n\
 @tex\n\
@@ -468,7 +464,16 @@
 \n\
 @end ifnottex\n\
 \n\
-@seealso{lcm, factor}\n\
+Example code:\n\
+\n\
+@example\n\
+@group\n\
+gcd ([15, 9], [20, 18])\n\
+   @result{}  5  9\n\
+@end group\n\
+@end example\n\
+\n\
+@seealso{lcm, factor, isprime}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -520,6 +525,19 @@
 %!assert (gcd (uint64 (200), uint64 (300), uint64 (50), uint64 (35)), uint64 (5))
 %!assert (gcd (18-i, -29+3i), -3-4i)
 
+%!test
+%! p = [953 967];
+%! u = [953 + i*971, 967 + i*977];
+%! [d, k(1), k(2)] = gcd (p(1), p(2));
+%! [z, w(1), w(2)] = gcd (u(1), u(2));
+%! assert (d, 1)
+%! assert (sum (p.*k), d)
+%! assert (abs (z), sqrt (2))
+%! assert (abs (sum (u.*w)), sqrt (2))
+
+%!error <all values must be integers> gcd (1/2, 2);
+%!error <all complex parts must be integers> gcd (e + i*pi, 1);
+
 %!error gcd ()
 
 %!test
--- a/libinterp/corefcn/getgrent.cc
+++ b/libinterp/corefcn/getgrent.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/getpwent.cc
+++ b/libinterp/corefcn/getpwent.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/getrusage.cc
+++ b/libinterp/corefcn/getrusage.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/givens.cc
+++ b/libinterp/corefcn/givens.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,10 +32,12 @@
 
 DEFUN (givens, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{g} =} givens (@var{x}, @var{y})\n\
+@deftypefn  {Built-in Function} {@var{G} =} givens (@var{x}, @var{y})\n\
 @deftypefnx {Built-in Function} {[@var{c}, @var{s}] =} givens (@var{x}, @var{y})\n\
+Compute the Givens rotation matrix @var{G}.\n\
+\n\
 @tex\n\
-Return a $2\\times 2$ orthogonal matrix\n\
+The Givens matrix is a $2\\times 2$ orthogonal matrix\n\
 $$\n\
  G = \\left[\\matrix{c & s\\cr -s'& c\\cr}\\right]\n\
 $$\n\
@@ -46,11 +48,20 @@
 with $x$ and $y$ scalars.\n\
 @end tex\n\
 @ifnottex\n\
-Return a 2 by 2 orthogonal matrix\n\
-@code{@var{g} = [@var{c} @var{s}; -@var{s}' @var{c}]} such that\n\
-@code{@var{g} [@var{x}; @var{y}] = [*; 0]} with @var{x} and @var{y} scalars.\n\
+The Givens matrix is a 2 by 2 orthogonal matrix\n\
+\n\
+@code{@var{g} = [@var{c} @var{s}; -@var{s}' @var{c}]}\n\
+\n\
+such that\n\
+\n\
+@code{@var{g} [@var{x}; @var{y}] = [*; 0]}\n\
+\n\
+with @var{x} and @var{y} scalars.\n\
 @end ifnottex\n\
 \n\
+If two output arguments are requested, return the factors @var{c} and\n\
+@var{s} rather than the Givens rotation matrix.\n\
+\n\
 For example:\n\
 \n\
 @example\n\
@@ -60,6 +71,7 @@
        -0.70711   0.70711\n\
 @end group\n\
 @end example\n\
+@seealso{planerot}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -97,10 +109,6 @@
                           retval(1) = result (0, 1);
                           retval(0) = result (0, 0);
                           break;
-
-                        default:
-                          error ("givens: invalid number of output arguments");
-                          break;
                         }
                     }
                 }
@@ -127,10 +135,6 @@
                           retval(1) = result (0, 1);
                           retval(0) = result (0, 0);
                           break;
-
-                        default:
-                          error ("givens: invalid number of output arguments");
-                          break;
                         }
                     }
                 }
@@ -160,10 +164,6 @@
                           retval(1) = result (0, 1);
                           retval(0) = result (0, 0);
                           break;
-
-                        default:
-                          error ("givens: invalid number of output arguments");
-                          break;
                         }
                     }
                 }
@@ -190,10 +190,6 @@
                           retval(1) = result (0, 1);
                           retval(0) = result (0, 0);
                           break;
-
-                        default:
-                          error ("givens: invalid number of output arguments");
-                          break;
                         }
                     }
                 }
@@ -211,4 +207,5 @@
 
 %!error givens ()
 %!error givens (1)
+%!error [a,b,c] = givens (1, 1)
 */
--- a/libinterp/corefcn/gl-render.cc
+++ b/libinterp/corefcn/gl-render.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -37,6 +37,31 @@
 
 #define LIGHT_MODE GL_FRONT_AND_BACK
 
+// Use symbolic names for axes
+enum
+{
+  X_AXIS,
+  Y_AXIS,
+  Z_AXIS
+};
+
+// Use symbolic names for color mode
+enum
+{
+  UNIFORM,
+  FLAT,
+  INTERP,
+  TEXTURE
+};
+
+// Use symbolic names for lighting
+enum
+{
+  NONE,
+  //FLAT,  // Already declared in anonymous enum for color mode
+  GOURAUD = 2
+};
+
 // Win32 API requires the CALLBACK attributes for
 // GLU callback functions. Define it to empty on
 // other platforms.
@@ -147,12 +172,13 @@
     {
       // FIXME: dim_vectors hold octave_idx_type values.
       //        Should we check for dimensions larger than intmax?
-      int h = dv(0), w = dv(1), tw, th;
+      int h, w, tw, th;
+      h = dv(0), w = dv(1);
       GLuint id;
       bool ok = true;
 
       tw = next_power_of_2 (w);
-      th = next_power_of_2 (w);
+      th = next_power_of_2 (h);
 
       glGenTextures (1, &id);
       glBindTexture (GL_TEXTURE_2D, id);
@@ -400,7 +426,7 @@
 opengl_renderer::patch_tesselator : public opengl_tesselator
 {
 public:
-  patch_tesselator (opengl_renderer *r, int cmode, int lmode, int idx = 0)
+  patch_tesselator (opengl_renderer *r, int cmode, int lmode, float idx = 0.0)
     : opengl_tesselator (), renderer (r),
       color_mode (cmode), light_mode (lmode), index (idx),
       first (true), tmp_vdata ()
@@ -412,13 +438,13 @@
     //printf ("patch_tesselator::begin (%d)\n", type);
     first = true;
 
-    if (color_mode == 2 || light_mode == 2)
+    if (color_mode == INTERP || light_mode == GOURAUD)
       glShadeModel (GL_SMOOTH);
     else
       glShadeModel (GL_FLAT);
 
     if (is_filled ())
-      renderer->set_polygon_offset (true, 1+index);
+      renderer->set_polygon_offset (true, index);
 
     glBegin (type);
   }
@@ -436,12 +462,10 @@
       = reinterpret_cast<vertex_data::vertex_data_rep *> (data);
     //printf ("patch_tesselator::vertex (%g, %g, %g)\n", v->coords(0), v->coords(1), v->coords(2));
 
-    // FIXME: why did I need to keep the first vertex of the face
-    // in JHandles? I think it's related to the fact that the
-    // tessellation process might re-order the vertices, such that
-    // the first one you get here might not be the first one of the face;
-    // but I can't figure out the actual reason.
-    if (color_mode > 0 && (first || color_mode == 2))
+    // NOTE: OpenGL can re-order vertices.  For "flat" coloring of FaceColor
+    // the first vertex must be identified in the draw_patch routine.
+
+    if (color_mode == INTERP || (color_mode == FLAT && ! is_filled ()))
       {
         Matrix col = v->color;
 
@@ -458,12 +482,12 @@
 
                 for (int k = 0; k < 3; k++)
                   buf[k] = (v->diffuse * col(k));
-                glMaterialfv (LIGHT_MODE, GL_AMBIENT, buf);
+                glMaterialfv (LIGHT_MODE, GL_DIFFUSE, buf);
               }
           }
       }
 
-    if (light_mode > 0 && (first || light_mode == 2))
+    if (light_mode > 0 && (first || light_mode == GOURAUD))
       glNormal3dv (v->normal.data ());
 
     glVertex3dv (v->coords.data ());
@@ -471,8 +495,7 @@
     first = false;
   }
 
-  void combine (GLdouble xyz[3], void *data[4], GLfloat w[4],
-                void **out_data)
+  void combine (GLdouble xyz[3], void *data[4], GLfloat w[4], void **out_data)
   {
     //printf ("patch_tesselator::combine\n");
 
@@ -530,8 +553,8 @@
   patch_tesselator& operator = (const patch_tesselator&);
 
   opengl_renderer *renderer;
-  int color_mode;       // 0: uni,  1: flat, 2: interp
-  int light_mode;       // 0: none, 1: flat, 2: gouraud
+  int color_mode;
+  int light_mode;
   int index;
   bool first;
   std::list<vertex_data> tmp_vdata;
@@ -624,7 +647,17 @@
   if (enhanced)
     {
       glEnable (GL_BLEND);
-      glEnable (GL_LINE_SMOOTH);
+      glEnable (GL_MULTISAMPLE);
+      GLint iMultiSample, iNumSamples;
+      glGetIntegerv (GL_SAMPLE_BUFFERS, &iMultiSample);
+      glGetIntegerv (GL_SAMPLES, &iNumSamples);
+      if (iMultiSample != GL_TRUE || iNumSamples == 0)
+        {
+          // MultiSample not implemented.  Use old-style anti-aliasing
+          glDisable (GL_MULTISAMPLE);
+          glEnable (GL_LINE_SMOOTH);
+          glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
+        }
     }
   else
     {
@@ -654,7 +687,7 @@
       double val = ticks(i);
       if (lim1 <= val && val <= lim2)
         {
-          if (xyz == 0) // X
+          if (xyz == X_AXIS)
             {
               glVertex3d (val, p1N, p2);
               glVertex3d (val, p1, p2);
@@ -664,7 +697,7 @@
                   glVertex3d (val, p1, p2);
                 }
             }
-          else if (xyz == 1) // Y
+          else if (xyz == Y_AXIS)
             {
               glVertex3d (p1N, val, p2);
               glVertex3d (p1, val, p2);
@@ -674,7 +707,7 @@
                   glVertex3d (p1, val, p2);
                 }
             }
-          else if (xyz == 2) // Z
+          else if (xyz == Z_AXIS)
             {
               glVertex3d (p1N, p2, val);
               glVertex3d (p1, p2, val);
@@ -703,7 +736,7 @@
 
       if (lim1 <= val && val <= lim2)
         {
-          if (xyz == 0) // X
+          if (xyz == X_AXIS)
             {
               glVertex3d (val, p1, p2);
               glVertex3d (val, p1+dy, p2+dz);
@@ -713,7 +746,7 @@
                   glVertex3d (val, p1N-dy, p2N-dz);
                 }
             }
-          else if (xyz == 1) // Y
+          else if (xyz == Y_AXIS)
             {
               glVertex3d (p1, val, p2);
               glVertex3d (p1+dx, val, p2+dz);
@@ -723,7 +756,7 @@
                   glVertex3d (p1N-dx, val, p2N-dz);
                 }
             }
-          else if (xyz == 2) // Z
+          else if (xyz == Z_AXIS)
             {
               glVertex3d (p1, p2, val);
               glVertex3d (p1+dx, p2+dy, val);
@@ -765,17 +798,17 @@
           label.erase (0, label.find_first_not_of (" "));
           label = label.substr (0, label.find_last_not_of (" ")+1);
 
-          // FIXME: as tick text is transparent, shouldn't it be
+          // FIXME: As tick text is transparent, shouldn't it be
           //        drawn after axes object, for correct rendering?
-          if (xyz == 0) // X
+          if (xyz == X_AXIS)
             {
               b = render_text (label, val, p1, p2, ha, va);
             }
-          else if (xyz == 1) // Y
+          else if (xyz == Y_AXIS)
             {
               b = render_text (label, p1, val, p2, ha, va);
             }
-          else if (xyz == 2) // Z
+          else if (xyz == Z_AXIS)
             {
               b = render_text (label, p1, p2, val, ha, va);
             }
@@ -819,8 +852,6 @@
 
   glClear (GL_DEPTH_BUFFER_BIT);
 
-  glDisable (GL_LINE_SMOOTH);
-
   // store axes transformation data
 
   xform = props.get_transform ();
@@ -829,22 +860,26 @@
 void
 opengl_renderer::draw_axes_planes (const axes::properties& props)
 {
+  Matrix axe_color = props.get_color_rgb ();
+  if (axe_color.numel () == 0 || ! props.is_visible ())
+    return;
+
   double xPlane = props.get_xPlane ();
   double yPlane = props.get_yPlane ();
   double zPlane = props.get_zPlane ();
   double xPlaneN = props.get_xPlaneN ();
   double yPlaneN = props.get_yPlaneN ();
   double zPlaneN = props.get_zPlaneN ();
+  bool is2d = props.get_is2D ();
 
   // Axes planes
-  Matrix axe_color = props.get_color_rgb ();
-  if (axe_color.numel () > 0 && props.is_visible ())
+  set_color (axe_color);
+  set_polygon_offset (true, 2.5);
+
+  glBegin (GL_QUADS);
+
+  if (! is2d)
     {
-      set_color (axe_color);
-      set_polygon_offset (true, 2.5);
-
-      glBegin (GL_QUADS);
-
       // X plane
       glVertex3d (xPlane, yPlaneN, zPlaneN);
       glVertex3d (xPlane, yPlane, zPlaneN);
@@ -856,23 +891,28 @@
       glVertex3d (xPlane, yPlane, zPlaneN);
       glVertex3d (xPlane, yPlane, zPlane);
       glVertex3d (xPlaneN, yPlane, zPlane);
-
-      // Z plane
-      glVertex3d (xPlaneN, yPlaneN, zPlane);
-      glVertex3d (xPlane, yPlaneN, zPlane);
-      glVertex3d (xPlane, yPlane, zPlane);
-      glVertex3d (xPlaneN, yPlane, zPlane);
-
-      glEnd ();
-
-      set_polygon_offset (false);
     }
+
+  // Z plane
+  glVertex3d (xPlaneN, yPlaneN, zPlane);
+  glVertex3d (xPlane, yPlaneN, zPlane);
+  glVertex3d (xPlane, yPlane, zPlane);
+  glVertex3d (xPlaneN, yPlane, zPlane);
+
+  glEnd ();
+
+  set_polygon_offset (false);
 }
 
 void
 opengl_renderer::draw_axes_boxes (const axes::properties& props)
 {
+  if (! props.is_visible ())
+    return;
+
   bool xySym = props.get_xySym ();
+  bool layer2Dtop = props.get_layer2Dtop ();
+  bool is2d = props.get_is2D ();
   double xPlane = props.get_xPlane ();
   double yPlane = props.get_yPlane ();
   double zPlane = props.get_zPlane ();
@@ -893,41 +933,51 @@
   set_linestyle ("-", true);
   set_linewidth (props.get_linewidth ());
 
-  if (props.is_visible ())
+  glBegin (GL_LINES);
+
+  if (layer2Dtop)
+    std::swap (zpTick, zpTickN);
+
+  // X box
+  set_color (props.get_xcolor_rgb ());
+  glVertex3d (xPlaneN, ypTick, zpTick);
+  glVertex3d (xPlane, ypTick, zpTick);
+
+  if (props.is_box ())
     {
-      glBegin (GL_LINES);
-
-      // X box
-      set_color (props.get_xcolor_rgb ());
-      glVertex3d (xPlaneN, ypTick, zpTick);
-      glVertex3d (xPlane, ypTick, zpTick);
-
-      if (props.is_box ())
+      glVertex3d (xPlaneN, ypTickN, zpTick);
+      glVertex3d (xPlane, ypTickN, zpTick);
+      if (! is2d)
         {
-          glVertex3d (xPlaneN, ypTickN, zpTick);
-          glVertex3d (xPlane, ypTickN, zpTick);
           glVertex3d (xPlaneN, ypTickN, zpTickN);
           glVertex3d (xPlane, ypTickN, zpTickN);
           glVertex3d (xPlaneN, ypTick, zpTickN);
           glVertex3d (xPlane, ypTick, zpTickN);
         }
-
-      // Y box
-      set_color (props.get_ycolor_rgb ());
-      glVertex3d (xpTick, yPlaneN, zpTick);
-      glVertex3d (xpTick, yPlane, zpTick);
-
-      if (props.is_box () && ! plotyy)
+    }
+
+  // Y box
+  set_color (props.get_ycolor_rgb ());
+  glVertex3d (xpTick, yPlaneN, zpTick);
+  glVertex3d (xpTick, yPlane, zpTick);
+
+  if (props.is_box () && ! plotyy)
+    {
+      glVertex3d (xpTickN, yPlaneN, zpTick);
+      glVertex3d (xpTickN, yPlane, zpTick);
+
+      if (! is2d)
         {
-          glVertex3d (xpTickN, yPlaneN, zpTick);
-          glVertex3d (xpTickN, yPlane, zpTick);
           glVertex3d (xpTickN, yPlaneN, zpTickN);
           glVertex3d (xpTickN, yPlane, zpTickN);
           glVertex3d (xpTick, yPlaneN, zpTickN);
           glVertex3d (xpTick, yPlane, zpTickN);
         }
-
-      // Z box
+    }
+
+  // Z box
+  if (! is2d)
+    {
       set_color (props.get_zcolor_rgb ());
 
       if (xySym)
@@ -960,39 +1010,40 @@
           glVertex3d (xPlaneN, yPlaneN, zPlaneN);
           glVertex3d (xPlaneN, yPlaneN, zPlane);
         }
-
-      glEnd ();
     }
+
+  glEnd ();
 }
 
 void
 opengl_renderer::draw_axes_x_grid (const axes::properties& props)
 {
   int xstate = props.get_xstate ();
-  int zstate = props.get_zstate ();
-  bool x2Dtop = props.get_x2Dtop ();
-  bool layer2Dtop = props.get_layer2Dtop ();
-  bool xyzSym = props.get_xyzSym ();
-  bool nearhoriz = props.get_nearhoriz ();
-  double xticklen = props.get_xticklen ();
-  double xtickoffset = props.get_xtickoffset ();
-  double fy = props.get_fy ();
-  double fz = props.get_fz ();
-  double x_min = props.get_x_min ();
-  double x_max = props.get_x_max ();
-  double yPlane = props.get_yPlane ();
-  double yPlaneN = props.get_yPlaneN ();
-  double ypTick = props.get_ypTick ();
-  double ypTickN = props.get_ypTickN ();
-  double zPlane = props.get_zPlane ();
-  double zPlaneN = props.get_zPlaneN ();
-  double zpTick = props.get_zpTick ();
-  double zpTickN = props.get_zpTickN ();
-
-  // X grid
 
   if (props.is_visible () && xstate != AXE_DEPTH_DIR)
     {
+      int zstate = props.get_zstate ();
+      bool x2Dtop = props.get_x2Dtop ();
+      bool layer2Dtop = props.get_layer2Dtop ();
+      bool xyzSym = props.get_xyzSym ();
+      bool nearhoriz = props.get_nearhoriz ();
+      double xticklen = props.get_xticklen ();
+      double xtickoffset = props.get_xtickoffset ();
+      double fy = props.get_fy ();
+      double fz = props.get_fz ();
+      double x_min = props.get_x_min ();
+      double x_max = props.get_x_max ();
+      double yPlane = props.get_yPlane ();
+      double yPlaneN = props.get_yPlaneN ();
+      double ypTick = props.get_ypTick ();
+      double ypTickN = props.get_ypTickN ();
+      double zPlane = props.get_zPlane ();
+      double zPlaneN = props.get_zPlaneN ();
+      double zpTick = props.get_zpTick ();
+      double zpTickN = props.get_zpTickN ();
+
+      // X grid
+
       std::string gridstyle = props.get_gridlinestyle ();
       std::string minorgridstyle = props.get_minorgridlinestyle ();
       bool do_xgrid = (props.is_xgrid () && (gridstyle != "none"));
@@ -1002,7 +1053,8 @@
       Matrix xticks = xform.xscale (props.get_xtick ().matrix_value ());
       Matrix xmticks = xform.xscale (props.get_xmtick ().matrix_value ());
       string_vector xticklabels = props.get_xticklabel ().all_strings ();
-      int wmax = 0, hmax = 0;
+      int wmax = 0;
+      int hmax = 0;
       bool tick_along_z = nearhoriz || xisinf (fy);
       bool mirror = props.is_box () && xstate != AXE_ANY_DIR;
 
@@ -1077,30 +1129,31 @@
 opengl_renderer::draw_axes_y_grid (const axes::properties& props)
 {
   int ystate = props.get_ystate ();
-  int zstate = props.get_zstate ();
-  bool y2Dright = props.get_y2Dright ();
-  bool layer2Dtop = props.get_layer2Dtop ();
-  bool xyzSym = props.get_xyzSym ();
-  bool nearhoriz = props.get_nearhoriz ();
-  double yticklen = props.get_yticklen ();
-  double ytickoffset = props.get_ytickoffset ();
-  double fx = props.get_fx ();
-  double fz = props.get_fz ();
-  double xPlane = props.get_xPlane ();
-  double xPlaneN = props.get_xPlaneN ();
-  double xpTick = props.get_xpTick ();
-  double xpTickN = props.get_xpTickN ();
-  double y_min = props.get_y_min ();
-  double y_max = props.get_y_max ();
-  double zPlane = props.get_zPlane ();
-  double zPlaneN = props.get_zPlaneN ();
-  double zpTick = props.get_zpTick ();
-  double zpTickN = props.get_zpTickN ();
-
-  // Y grid
 
   if (ystate != AXE_DEPTH_DIR && props.is_visible ())
     {
+      int zstate = props.get_zstate ();
+      bool y2Dright = props.get_y2Dright ();
+      bool layer2Dtop = props.get_layer2Dtop ();
+      bool xyzSym = props.get_xyzSym ();
+      bool nearhoriz = props.get_nearhoriz ();
+      double yticklen = props.get_yticklen ();
+      double ytickoffset = props.get_ytickoffset ();
+      double fx = props.get_fx ();
+      double fz = props.get_fz ();
+      double xPlane = props.get_xPlane ();
+      double xPlaneN = props.get_xPlaneN ();
+      double xpTick = props.get_xpTick ();
+      double xpTickN = props.get_xpTickN ();
+      double y_min = props.get_y_min ();
+      double y_max = props.get_y_max ();
+      double zPlane = props.get_zPlane ();
+      double zPlaneN = props.get_zPlaneN ();
+      double zpTick = props.get_zpTick ();
+      double zpTickN = props.get_zpTickN ();
+
+      // Y grid
+
       std::string gridstyle = props.get_gridlinestyle ();
       std::string minorgridstyle = props.get_minorgridlinestyle ();
       bool do_ygrid = (props.is_ygrid () && (gridstyle != "none"));
@@ -1110,7 +1163,8 @@
       Matrix yticks = xform.yscale (props.get_ytick ().matrix_value ());
       Matrix ymticks = xform.yscale (props.get_ymtick ().matrix_value ());
       string_vector yticklabels = props.get_yticklabel ().all_strings ();
-      int wmax = 0, hmax = 0;
+      int wmax = 0;
+      int hmax = 0;
       bool tick_along_z = nearhoriz || xisinf (fx);
       bool mirror = props.is_box () && ystate != AXE_ANY_DIR
                     && (! props.has_property ("__plotyy_axes__"));
@@ -1183,23 +1237,24 @@
 opengl_renderer::draw_axes_z_grid (const axes::properties& props)
 {
   int zstate = props.get_zstate ();
-  bool xySym = props.get_xySym ();
-  bool zSign = props.get_zSign ();
-  double zticklen = props.get_zticklen ();
-  double ztickoffset = props.get_ztickoffset ();
-  double fx = props.get_fx ();
-  double fy = props.get_fy ();
-  double xPlane = props.get_xPlane ();
-  double xPlaneN = props.get_xPlaneN ();
-  double yPlane = props.get_yPlane ();
-  double yPlaneN = props.get_yPlaneN ();
-  double z_min = props.get_z_min ();
-  double z_max = props.get_z_max ();
-
-  // Z Grid
 
   if (zstate != AXE_DEPTH_DIR && props.is_visible ())
     {
+      bool xySym = props.get_xySym ();
+      bool zSign = props.get_zSign ();
+      double zticklen = props.get_zticklen ();
+      double ztickoffset = props.get_ztickoffset ();
+      double fx = props.get_fx ();
+      double fy = props.get_fy ();
+      double xPlane = props.get_xPlane ();
+      double xPlaneN = props.get_xPlaneN ();
+      double yPlane = props.get_yPlane ();
+      double yPlaneN = props.get_yPlaneN ();
+      double z_min = props.get_z_min ();
+      double z_max = props.get_z_max ();
+
+      // Z Grid
+
       std::string gridstyle = props.get_gridlinestyle ();
       std::string minorgridstyle = props.get_minorgridlinestyle ();
       bool do_zgrid = (props.is_zgrid () && (gridstyle != "none"));
@@ -1209,7 +1264,8 @@
       Matrix zticks = xform.zscale (props.get_ztick ().matrix_value ());
       Matrix zmticks = xform.zscale (props.get_zmtick ().matrix_value ());
       string_vector zticklabels = props.get_zticklabel ().all_strings ();
-      int wmax = 0, hmax = 0;
+      int wmax = 0;
+      int hmax = 0;
       bool mirror = props.is_box () && zstate != AXE_ANY_DIR;
 
       set_color (props.get_zcolor_rgb ());
@@ -1324,12 +1380,6 @@
 {
   // Children
 
-  GLboolean antialias;
-  glGetBooleanv (GL_LINE_SMOOTH, &antialias);
-
-  if (antialias == GL_TRUE)
-    glEnable (GL_LINE_SMOOTH);
-
   Matrix children = props.get_all_children ();
   std::list<graphics_object> obj_list;
   std::list<graphics_object>::iterator it;
@@ -1337,11 +1387,11 @@
   // 1st pass: draw light objects
 
   // Start with the last element of the array of child objects to
-  // display them in the oder they were added to the array.
+  // display them in the order they were added to the array.
 
   for (octave_idx_type i = children.numel () - 1; i >= 0; i--)
     {
-      graphics_object go = gh_manager::get_object (children (i));
+      graphics_object go = gh_manager::get_object (children(i));
 
       if (go.get_properties ().is_visible ())
         {
@@ -1407,12 +1457,18 @@
   if (x_max > floatmax || y_max > floatmax || z_max > floatmax
       || x_min < -floatmax || y_min < -floatmax || z_min < -floatmax)
     {
-      warning ("gl-render: data values greater than float capacity.  (1) Scale data, or (2) Use gnuplot");
+      warning ("opengl_renderer: data values greater than float capacity.  (1) Scale data, or (2) Use gnuplot");
       return;
     }
 
   setup_opengl_transformation (props);
 
+  // Disable line smoothing for axes
+  GLboolean antialias;
+  glGetBooleanv (GL_LINE_SMOOTH, &antialias);
+  if (antialias == GL_TRUE)
+    glDisable (GL_LINE_SMOOTH);
+
   // draw axes object
 
   draw_axes_planes (props);
@@ -1428,6 +1484,10 @@
 
   set_clipbox (x_min, x_max, y_min, y_max, z_min, z_max);
 
+  // Re-enable line smoothing for children
+  if (antialias == GL_TRUE)
+    glEnable (GL_LINE_SMOOTH);
+
   draw_axes_children (props);
 }
 
@@ -1522,9 +1582,9 @@
 
   set_clipping (false);
 
-  if (! props.marker_is ("none") &&
-      ! (props.markeredgecolor_is ("none")
-         && props.markerfacecolor_is ("none")))
+  if (! props.marker_is ("none")
+      && ! (props.markeredgecolor_is ("none")
+            && props.markerfacecolor_is ("none")))
     {
       Matrix lc, fc;
 
@@ -1545,7 +1605,7 @@
         {
           if (clip[i] == clip_ok)
             draw_marker (x(i), y(i),
-                         has_z ? z(i) : static_cast<double> (i) / n,
+                         has_z ? z(i) : 0.0,
                          lc, fc);
         }
 
@@ -1562,7 +1622,8 @@
   const Matrix y = xform.yscale (props.get_ydata ().matrix_value ());
   const Matrix z = xform.zscale (props.get_zdata ().matrix_value ());
 
-  int zr = z.rows (), zc = z.columns ();
+  int zr = z.rows ();
+  int zc = z.columns ();
 
   NDArray c;
   const NDArray n = props.get_vertexnormals ().array_value ();
@@ -1571,7 +1632,7 @@
   Matrix a;
 
   if (props.facelighting_is ("phong") || props.edgelighting_is ("phong"))
-    warning ("opengl_renderer::draw: phong light model not supported");
+    warning ("opengl_renderer: phong light model not supported");
 
   int fc_mode = (props.facecolor_is_rgb () ? 0 :
                  (props.facecolor_is ("flat") ? 1 :
@@ -1589,8 +1650,8 @@
   int ea_mode = (props.edgealpha_is_double () ? 0 :
                  (props.edgealpha_is ("flat") ? 1 : 2));
 
-  Matrix fcolor = (fc_mode == 3 ? Matrix (1, 3, 1.0)
-                                : props.get_facecolor_rgb ());
+  Matrix fcolor = (fc_mode == TEXTURE ? Matrix (1, 3, 1.0)
+                                      : props.get_facecolor_rgb ());
   Matrix ecolor = props.get_edgecolor_rgb ();
 
   float as = props.get_ambientstrength ();
@@ -1641,16 +1702,16 @@
       glMaterialf (LIGHT_MODE, GL_SHININESS, se);
     }
 
-  // FIXME: good candidate for caching, transfering pixel
-  // data to OpenGL is time consuming.
-  if (fc_mode == 3)
+  // FIXME: good candidate for caching,
+  //        transferring pixel data to OpenGL is time consuming.
+  if (fc_mode == TEXTURE)
     tex = opengl_texture::create (props.get_color_data ());
 
   if (! props.facecolor_is ("none"))
     {
       if (props.get_facealpha_double () == 1)
         {
-          if (fc_mode == 0 || fc_mode == 3)
+          if (fc_mode == UNIFORM || fc_mode == TEXTURE)
             {
               glColor3dv (fcolor.data ());
               if (fl_mode > 0)
@@ -1667,9 +1728,10 @@
 
           if (fl_mode > 0)
             glEnable (GL_LIGHTING);
-          glShadeModel ((fc_mode == 2 || fl_mode == 2) ? GL_SMOOTH : GL_FLAT);
+          glShadeModel ((fc_mode == INTERP || fl_mode == GOURAUD) ? GL_SMOOTH
+                                                                  : GL_FLAT);
           set_polygon_offset (true, 1);
-          if (fc_mode == 3)
+          if (fc_mode == TEXTURE)
             glEnable (GL_TEXTURE_2D);
 
           for (int i = 1; i < zc; i++)
@@ -1687,13 +1749,13 @@
                       || clip(j-1, i) || clip(j, i))
                     continue;
 
-                  if (fc_mode == 1)
+                  if (fc_mode == FLAT)
                     {
                       // "flat" only needs color at lower-left vertex
                       if (! xfinite (c(j-1,i-1)))
                         continue;
                     }
-                  else if (fc_mode == 2)
+                  else if (fc_mode == INTERP)
                     {
                       // "interp" needs valid color at all 4 vertices
                       if (! (xfinite (c(j-1, i-1)) && xfinite (c(j, i-1))
@@ -1710,7 +1772,7 @@
                   glBegin (GL_QUADS);
 
                   // Vertex 1
-                  if (fc_mode == 3)
+                  if (fc_mode == TEXTURE)
                     tex.tex_coord (double (i-1) / (zc-1),
                                    double (j-1) / (zr-1));
                   else if (fc_mode > 0)
@@ -1743,9 +1805,9 @@
                   glVertex3d (x(j1,i-1), y(j-1,i1), z(j-1,i-1));
 
                   // Vertex 2
-                  if (fc_mode == 3)
+                  if (fc_mode == TEXTURE)
                     tex.tex_coord (double (i) / (zc-1), double (j-1) / (zr-1));
-                  else if (fc_mode == 2)
+                  else if (fc_mode == INTERP)
                     {
                       for (int k = 0; k < 3; k++)
                         cb[k] = c(j-1, i, k);
@@ -1763,7 +1825,7 @@
                         }
                     }
 
-                  if (fl_mode == 2)
+                  if (fl_mode == GOURAUD)
                     {
                       d = sqrt (n(j-1,i,0) * n(j-1,i,0)
                                 + n(j-1,i,1) * n(j-1,i,1)
@@ -1774,9 +1836,9 @@
                   glVertex3d (x(j1,i), y(j-1,i2), z(j-1,i));
 
                   // Vertex 3
-                  if (fc_mode == 3)
+                  if (fc_mode == TEXTURE)
                     tex.tex_coord (double (i) / (zc-1), double (j) / (zr-1));
-                  else if (fc_mode == 2)
+                  else if (fc_mode == INTERP)
                     {
                       for (int k = 0; k < 3; k++)
                         cb[k] = c(j, i, k);
@@ -1793,7 +1855,7 @@
                           glMaterialfv (LIGHT_MODE, GL_DIFFUSE, cb);
                         }
                     }
-                  if (fl_mode == 2)
+                  if (fl_mode == GOURAUD)
                     {
                       d = sqrt (n(j,i,0) * n(j,i,0)
                                 + n(j,i,1) * n(j,i,1)
@@ -1803,9 +1865,9 @@
                   glVertex3d (x(j2,i), y(j,i2), z(j,i));
 
                   // Vertex 4
-                  if (fc_mode == 3)
+                  if (fc_mode == TEXTURE)
                     tex.tex_coord (double (i-1) / (zc-1), double (j) / (zr-1));
-                  else if (fc_mode == 2)
+                  else if (fc_mode == INTERP)
                     {
                       for (int k = 0; k < 3; k++)
                         cb[k] = c(j, i-1, k);
@@ -1822,7 +1884,7 @@
                           glMaterialfv (LIGHT_MODE, GL_DIFFUSE, cb);
                         }
                     }
-                  if (fl_mode == 2)
+                  if (fl_mode == GOURAUD)
                     {
                       d = sqrt (n(j,i-1,0) * n(j,i-1,0)
                                 + n(j,i-1,1) * n(j,i-1,1)
@@ -1836,7 +1898,7 @@
             }
 
           set_polygon_offset (false);
-          if (fc_mode == 3)
+          if (fc_mode == TEXTURE)
             glDisable (GL_TEXTURE_2D);
 
           if (fl_mode > 0)
@@ -1852,7 +1914,7 @@
     {
       if (props.get_edgealpha_double () == 1)
         {
-          if (ec_mode == 0)
+          if (ec_mode == UNIFORM)
             {
               glColor3dv (ecolor.data ());
               if (fl_mode > 0)
@@ -1869,7 +1931,8 @@
 
           if (el_mode > 0)
             glEnable (GL_LIGHTING);
-          glShadeModel ((ec_mode == 2 || el_mode == 2) ? GL_SMOOTH : GL_FLAT);
+          glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD) ? GL_SMOOTH
+                                                                  : GL_FLAT);
 
           set_linestyle (props.get_linestyle (), false);
           set_linewidth (props.get_linewidth ());
@@ -1891,13 +1954,13 @@
                       if (clip(j-1,i) || clip(j,i))
                         continue;
 
-                      if (ec_mode == 1)
+                      if (ec_mode == FLAT)
                         {
                           // "flat" only needs color at lower-left vertex
                           if (! xfinite (c(j-1,i)))
                             continue;
                         }
-                      else if (ec_mode == 2)
+                      else if (ec_mode == INTERP)
                         {
                           // "interp" needs valid color at both vertices
                           if (! (xfinite (c(j-1, i)) && xfinite (c(j, i))))
@@ -1940,7 +2003,7 @@
                       glVertex3d (x(j1,i), y(j-1,i2), z(j-1,i));
 
                       // Vertex 2
-                      if (ec_mode == 2)
+                      if (ec_mode == INTERP)
                         {
                           for (int k = 0; k < 3; k++)
                             cb[k] = c(j, i, k);
@@ -1957,7 +2020,7 @@
                               glMaterialfv (LIGHT_MODE, GL_DIFFUSE, cb);
                             }
                         }
-                      if (el_mode == 2)
+                      if (el_mode == GOURAUD)
                         {
                           d = sqrt (n(j,i,0) * n(j,i,0)
                                     + n(j,i,1) * n(j,i,1)
@@ -1988,13 +2051,13 @@
                       if (clip(j,i-1) || clip(j,i))
                         continue;
 
-                      if (ec_mode == 1)
+                      if (ec_mode == FLAT)
                         {
                           // "flat" only needs color at lower-left vertex
                           if (! xfinite (c(j,i-1)))
                             continue;
                         }
-                      else if (ec_mode == 2)
+                      else if (ec_mode == INTERP)
                         {
                           // "interp" needs valid color at both vertices
                           if (! (xfinite (c(j, i-1)) && xfinite (c(j, i))))
@@ -2037,7 +2100,7 @@
                       glVertex3d (x(j2,i-1), y(j,i1), z(j,i-1));
 
                       // Vertex 2
-                      if (ec_mode == 2)
+                      if (ec_mode == INTERP)
                         {
                           for (int k = 0; k < 3; k++)
                             cb[k] = c(j, i, k);
@@ -2054,7 +2117,7 @@
                               glMaterialfv (LIGHT_MODE, GL_DIFFUSE, cb);
                             }
                         }
-                      if (el_mode == 2)
+                      if (el_mode == GOURAUD)
                         {
                           d = sqrt (n(j,i,0) * n(j,i,0)
                                     + n(j,i,1) * n(j,i,1)
@@ -2080,9 +2143,9 @@
         }
     }
 
-  if (! props.marker_is ("none") &&
-      ! (props.markeredgecolor_is ("none")
-         && props.markerfacecolor_is ("none")))
+  if (! props.marker_is ("none")
+      && ! (props.markeredgecolor_is ("none")
+            && props.markerfacecolor_is ("none")))
     {
       // FIXME: check how transparency should be handled in markers
       // FIXME: check what to do with marker facecolor set to auto
@@ -2150,11 +2213,19 @@
     }
 }
 
-// FIXME: global optimization (rendering, data structures...), there
-// is probably a smarter/faster/less-memory-consuming way to do this.
+// FIXME: global optimization (rendering, data structures...),
+// there is probably a smarter/faster/less-memory-consuming way to do this.
 void
 opengl_renderer::draw_patch (const patch::properties &props)
 {
+  // Do not render if the patch has incoherent data
+  std::string msg;
+  if (props.has_bad_data (msg))
+    {
+      warning ("opengl_renderer: %s. Not rendering.", msg.c_str ());
+      return;
+    }
+
   const Matrix f = props.get_faces ().matrix_value ();
   const Matrix v = xform.scale (props.get_vertices ().matrix_value ());
   Matrix c;
@@ -2162,7 +2233,6 @@
   Matrix a;
 
   int nv = v.rows ();
-  // int vmax = v.columns ();
   int nf = f.rows ();
   int fcmax = f.columns ();
 
@@ -2228,13 +2298,13 @@
           if (fc_mode > 0)
             {
               fcolor = c;
-              fc_mode = 0;
+              fc_mode = UNIFORM;
             }
 
           if (ec_mode > 0)
             {
               ecolor = c;
-              ec_mode = 0;
+              ec_mode = UNIFORM;
             }
 
           c = Matrix ();
@@ -2260,7 +2330,7 @@
 
         Matrix vv (1, 3, 0.0);
         Matrix cc;
-        Matrix nn(1, 3, 0.0);
+        Matrix nn (1, 3, 0.0);
         double aa = 1.0;
 
         vv(0) = v(idx,0); vv(1) = v(idx,1);
@@ -2284,8 +2354,7 @@
               aa = a(idx);
           }
 
-        vdata[i+j*fr] =
-          vertex_data (vv, cc, nn, aa, as, ds, ss, se);
+        vdata[i+j*fr] = vertex_data (vv, cc, nn, aa, as, ds, ss, se);
       }
 
   if (fl_mode > 0 || el_mode > 0)
@@ -2301,7 +2370,7 @@
       // FIXME: adapt to double-radio property
       if (props.get_facealpha_double () == 1)
         {
-          if (fc_mode == 0)
+          if (fc_mode == UNIFORM)
             {
               glColor3dv (fcolor.data ());
               if (fl_mode > 0)
@@ -2321,8 +2390,11 @@
           if (fl_mode > 0)
             glEnable (GL_LIGHTING);
 
-          // FIXME: use __index__ property from patch object
-          patch_tesselator tess (this, fc_mode, fl_mode, 0);
+          // NOTE: Push filled part of patch backwards to avoid Z-fighting with
+          // tesselator outline.  A value of 1.0 seems to work fine.  Value
+          // can't be too large or the patch will be pushed below the axes
+          // planes at +2.5.
+          patch_tesselator tess (this, fc_mode, fl_mode, 1.0);
 
           for (int i = 0; i < nf; i++)
             {
@@ -2332,13 +2404,44 @@
               tess.begin_polygon (true);
               tess.begin_contour ();
 
-              for (int j = 0; j < count_f(i); j++)
+              // Add vertices in reverse order for Matlab compatibility
+              for (int j = count_f(i)-1; j > 0; j--)
                 {
                   vertex_data::vertex_data_rep *vv = vdata[i+j*fr].get_rep ();
 
                   tess.add_vertex (vv->coords.fortran_vec (), vv);
                 }
 
+              if (count_f(i) > 0)
+                {
+                  vertex_data::vertex_data_rep *vv = vdata[i].get_rep ();
+
+                  if (fc_mode == FLAT)
+                    {
+                      // For "flat" shading, use color of 1st vertex.
+                      Matrix col = vv->color;
+
+                      if (col.numel () == 3)
+                        {
+                          glColor3dv (col.data ());
+                          if (fl_mode > 0)
+                            {
+                              float cb[4] = { 0, 0, 0, 1 };
+
+                              for (int k = 0; k < 3; k++)
+                                cb[k] = (vv->ambient * col(k));
+                              glMaterialfv (LIGHT_MODE, GL_AMBIENT, cb);
+
+                              for (int k = 0; k < 3; k++)
+                                cb[k] = (vv->diffuse * col(k));
+                              glMaterialfv (LIGHT_MODE, GL_DIFFUSE, cb);
+                            }
+                        }
+                    }
+
+                  tess.add_vertex (vv->coords.fortran_vec (), vv);
+                }
+
               tess.end_contour ();
               tess.end_polygon ();
             }
@@ -2357,7 +2460,7 @@
       // FIXME: adapt to double-radio property
       if (props.get_edgealpha_double () == 1)
         {
-          if (ec_mode == 0)
+          if (ec_mode == UNIFORM)
             {
               glColor3dv (ecolor.data ());
               if (el_mode > 0)
@@ -2380,19 +2483,25 @@
           set_linestyle (props.get_linestyle (), false);
           set_linewidth (props.get_linewidth ());
 
-
-          // FIXME: use __index__ property from patch object; should we
-          // offset patch contour as well?
+          // NOTE: patch contour cannot be offset.  Offset must occur with the
+          // filled portion of the patch above.  The tesselator uses
+          // GLU_TESS_BOUNDARY_ONLY to get the outline of the patch and OpenGL
+          // automatically sets the glType to GL_LINE_LOOP.  This primitive is
+          // not supported by glPolygonOffset which is used to do Z offsets.
           patch_tesselator tess (this, ec_mode, el_mode);
 
           for (int i = 0; i < nf; i++)
             {
               if (clip_f(i))
                 {
-                  // This is an unclosed contour. Draw it as a line
+                  // This is an unclosed contour.  Draw it as a line.
                   bool flag = false;
 
-                  for (int j = 0; j < count_f(i); j++)
+                  glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD)
+                                ? GL_SMOOTH : GL_FLAT);
+
+                  // Add vertices in reverse order for Matlab compatibility
+                  for (int j = count_f(i)-1; j >= 0; j--)
                     {
                       if (! clip(int (f(i,j) - 1)))
                         {
@@ -2404,6 +2513,13 @@
                               flag = true;
                               glBegin (GL_LINE_STRIP);
                             }
+                          if (ec_mode != UNIFORM)
+                            {
+                              Matrix col = vv->color;
+
+                              if (col.numel () == 3)
+                                glColor3dv (col.data ());
+                            }
                           glVertex3d (m(0), m(1), m(2));
                         }
                       else if (flag)
@@ -2412,16 +2528,33 @@
                           glEnd ();
                         }
                     }
+                  // Do loop body with vertex N to "close" GL_LINE_STRIP
+                  // from vertex 0 to vertex N.
+                  int j = count_f(i)-1;
+                  if (flag && ! clip(int (f(i,j) - 1)))
+                    {
+                      vertex_data::vertex_data_rep *vv
+                        = vdata[i+j*fr].get_rep ();
+                      const Matrix m = vv->coords;
+                      if (ec_mode != UNIFORM)
+                        {
+                          Matrix col = vv->color;
+
+                          if (col.numel () == 3)
+                            glColor3dv (col.data ());
+                        }
+                      glVertex3d (m(0), m(1), m(2));
+                    }
 
                   if (flag)
                     glEnd ();
                 }
-              else
+              else  // Normal edge contour drawn with tesselator
                 {
                   tess.begin_polygon (false);
                   tess.begin_contour ();
 
-                  for (int j = 0; j < count_f(i); j++)
+                  for (int j = count_f(i)-1; j >= 0; j--)
                     {
                       vertex_data::vertex_data_rep *vv
                         = vdata[i+j*fr].get_rep ();
@@ -2529,6 +2662,8 @@
   if (props.get_string ().is_empty ())
     return;
 
+  set_font (props);
+
   Matrix pos = xform.scale (props.get_data_position ());
   const Matrix bbox = props.get_extent_matrix ();
 
@@ -2552,7 +2687,8 @@
 {
   octave_value cdata = props.get_color_data ();
   dim_vector dv (cdata.dims ());
-  int h = dv(0), w = dv(1);
+  int h = dv(0);
+  int w = dv(1);
 
   Matrix x = props.get_xdata ().matrix_value ();
   Matrix y = props.get_ydata ().matrix_value ();
@@ -2572,7 +2708,7 @@
 
   if (xisnan (p0(0)) || xisnan (p0(1)) || xisnan (p1(0)) || xisnan (p1(1)))
     {
-      warning ("gl-render: image x,y data too large to draw");
+      warning ("opengl_renderer: image X,Y data too large to draw");
       return;
     }
 
@@ -2605,13 +2741,12 @@
       nor_dy = 1;
     }
 
-
-  // OpenGL won't draw the image if it's origin is outside the
-  // viewport/clipping plane so we must do the clipping
-  // ourselfes - only draw part of the image
-
-  int j0 = 0, j1 = w;
-  int i0 = 0, i1 = h;
+  // OpenGL won't draw any of the image if it's origin is outside the
+  // viewport/clipping plane so we must do the clipping ourselves.
+
+  int j0, j1, i0, i1;
+  j0 = 0, j1 = w;
+  i0 = 0, i1 = h;
 
   float im_xmin = x(0) - nor_dx/2;
   float im_xmax = x(1) + nor_dx/2;
@@ -2644,7 +2779,7 @@
   glRasterPos3d (im_xmin + nor_dx*j0, im_ymin + nor_dy*i0, 0);
 
   // by default this is 4
-  glPixelStorei (GL_UNPACK_ALIGNMENT,1);
+  glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
 
   // Expect RGB data
   if (dv.length () == 3 && dv(2) == 3)
@@ -2668,6 +2803,44 @@
           draw_pixels (j1-j0, i1-i0, GL_RGB, GL_FLOAT, a);
 
         }
+      else if (cdata.is_single_type ())
+        {
+          const FloatNDArray xcdata = cdata.float_array_value ();
+
+          OCTAVE_LOCAL_BUFFER (GLfloat, a, 3*(j1-j0)*(i1-i0));
+
+          for (int i = i0; i < i1; i++)
+            {
+              for (int j = j0, idx = (i-i0)*(j1-j0)*3; j < j1; j++, idx += 3)
+                {
+                  a[idx]   = xcdata(i,j,0);
+                  a[idx+1] = xcdata(i,j,1);
+                  a[idx+2] = xcdata(i,j,2);
+                }
+            }
+
+          draw_pixels (j1-j0, i1-i0, GL_RGB, GL_FLOAT, a);
+
+        }
+      else if (cdata.is_uint8_type ())
+        {
+          const uint8NDArray xcdata = cdata.uint8_array_value ();
+
+          OCTAVE_LOCAL_BUFFER (GLubyte, a, 3*(j1-j0)*(i1-i0));
+
+          for (int i = i0; i < i1; i++)
+            {
+              for (int j = j0, idx = (i-i0)*(j1-j0)*3; j < j1; j++, idx += 3)
+                {
+                  a[idx]   = xcdata(i,j,0);
+                  a[idx+1] = xcdata(i,j,1);
+                  a[idx+2] = xcdata(i,j,2);
+                }
+            }
+
+          draw_pixels (j1-j0, i1-i0, GL_RGB, GL_UNSIGNED_BYTE, a);
+
+        }
       else if (cdata.is_uint16_type ())
         {
           const uint16NDArray xcdata = cdata.uint16_array_value ();
@@ -2687,29 +2860,11 @@
           draw_pixels (j1-j0, i1-i0, GL_RGB, GL_UNSIGNED_SHORT, a);
 
         }
-      else if (cdata.is_uint8_type ())
-        {
-          const uint8NDArray xcdata = cdata.uint8_array_value ();
-
-          OCTAVE_LOCAL_BUFFER (GLubyte, a, 3*(j1-j0)*(i1-i0));
-
-          for (int i = i0; i < i1; i++)
-            {
-              for (int j = j0, idx = (i-i0)*(j1-j0)*3; j < j1; j++, idx += 3)
-                {
-                  a[idx]   = xcdata(i,j,0);
-                  a[idx+1] = xcdata(i,j,1);
-                  a[idx+2] = xcdata(i,j,2);
-                }
-            }
-
-          draw_pixels (j1-j0, i1-i0, GL_RGB, GL_UNSIGNED_BYTE, a);
-        }
       else
-        warning ("opengl_texture::draw: invalid image data type (expected double, uint16, or uint8)");
+        warning ("opengl_renderer: invalid image data type (expected double, single, uint8, or uint16)");
     }
   else
-    warning ("opengl_texture::draw: invalid image size (expected n*m*3 or n*m)");
+    warning ("opengl_renderer: invalid image size (expected MxNx3 or MxN)");
 
   glPixelZoom (1, 1);
 }
@@ -2743,18 +2898,18 @@
   text_renderer.set_font (props.get ("fontname").string_value (),
                           props.get ("fontweight").string_value (),
                           props.get ("fontangle").string_value (),
-                          props.get ("fontsize").double_value ());
+                          props.get ("fontsize_points").double_value ());
 #endif
 }
 
 void
-opengl_renderer::set_polygon_offset (bool on, double offset)
+opengl_renderer::set_polygon_offset (bool on, float offset)
 {
   if (on)
     {
-      glPolygonOffset (offset, offset);
       glEnable (GL_POLYGON_OFFSET_FILL);
       glEnable (GL_POLYGON_OFFSET_LINE);
+      glPolygonOffset (offset, offset);
     }
   else
     {
@@ -2782,7 +2937,7 @@
   else if (s == ":")
     glLineStipple (1, static_cast<unsigned short> (0x8888));
   else if (s == "--")
-    glLineStipple (1, static_cast<unsigned short> (0x0FFF));
+    glLineStipple (1, static_cast<unsigned short> (0xF0F0));
   else if (s == "-.")
     glLineStipple (1, static_cast<unsigned short> (0x020F));
   else
@@ -2934,30 +3089,30 @@
     {
     case '+':
       glBegin (GL_LINES);
-      glVertex2f (-sz/2, 0);
-      glVertex2f (sz/2, 0);
-      glVertex2f (0, -sz/2);
-      glVertex2f (0, sz/2);
+      glVertex2d (-sz/2, 0);
+      glVertex2d (sz/2, 0);
+      glVertex2d (0, -sz/2);
+      glVertex2d (0, sz/2);
       glEnd ();
       break;
     case 'x':
       glBegin (GL_LINES);
-      glVertex2f (-sz/2, -sz/2);
-      glVertex2f (sz/2, sz/2);
-      glVertex2f (-sz/2, sz/2);
-      glVertex2f (sz/2, -sz/2);
+      glVertex2d (-sz/2, -sz/2);
+      glVertex2d (sz/2, sz/2);
+      glVertex2d (-sz/2, sz/2);
+      glVertex2d (sz/2, -sz/2);
       glEnd ();
       break;
     case '*':
       glBegin (GL_LINES);
-      glVertex2f (-sz/2, 0);
-      glVertex2f (sz/2, 0);
-      glVertex2f (0, -sz/2);
-      glVertex2f (0, sz/2);
-      glVertex2f (-tt, -tt);
-      glVertex2f (+tt, +tt);
-      glVertex2f (-tt, +tt);
-      glVertex2f (+tt, -tt);
+      glVertex2d (-sz/2, 0);
+      glVertex2d (sz/2, 0);
+      glVertex2d (0, -sz/2);
+      glVertex2d (0, sz/2);
+      glVertex2d (-tt, -tt);
+      glVertex2d (+tt, +tt);
+      glVertex2d (-tt, +tt);
+      glVertex2d (+tt, -tt);
       glEnd ();
       break;
     case '.':
@@ -2998,30 +3153,30 @@
       break;
     case 'v':
       glBegin ((filled ? GL_POLYGON : GL_LINE_LOOP));
-      glVertex2f (0, sz/2);
-      glVertex2f (sz/2, -sz/2);
-      glVertex2f (-sz/2, -sz/2);
+      glVertex2d (0, sz/2);
+      glVertex2d (sz/2, -sz/2);
+      glVertex2d (-sz/2, -sz/2);
       glEnd ();
       break;
     case '^':
       glBegin ((filled ? GL_POLYGON : GL_LINE_LOOP));
-      glVertex2f (0, -sz/2);
-      glVertex2f (-sz/2, sz/2);
-      glVertex2f (sz/2, sz/2);
+      glVertex2d (0, -sz/2);
+      glVertex2d (-sz/2, sz/2);
+      glVertex2d (sz/2, sz/2);
       glEnd ();
       break;
     case '>':
       glBegin ((filled ? GL_POLYGON : GL_LINE_LOOP));
-      glVertex2f (sz/2, 0);
-      glVertex2f (-sz/2, sz/2);
-      glVertex2f (-sz/2, -sz/2);
+      glVertex2d (sz/2, 0);
+      glVertex2d (-sz/2, sz/2);
+      glVertex2d (-sz/2, -sz/2);
       glEnd ();
       break;
     case '<':
       glBegin ((filled ? GL_POLYGON : GL_LINE_LOOP));
-      glVertex2f (-sz/2, 0);
-      glVertex2f (sz/2, -sz/2);
-      glVertex2f (sz/2, sz/2);
+      glVertex2d (-sz/2, 0);
+      glVertex2d (sz/2, -sz/2);
+      glVertex2d (sz/2, sz/2);
       glEnd ();
       break;
     case 'p':
@@ -3057,8 +3212,7 @@
       }
       break;
     default:
-      warning ("opengl_renderer: unsupported marker '%s'",
-               marker.c_str ());
+      warning ("opengl_renderer: unsupported marker '%s'", marker.c_str ());
       break;
     }
 
@@ -3106,7 +3260,7 @@
 
   return bbox;
 #else
-  ::warning ("render_text: cannot render text, Freetype library not available");
+  warning ("opengl_renderer: cannot render text, FreeType library not available");
   return Matrix (1, 4, 0.0);
 #endif
 }
--- a/libinterp/corefcn/gl-render.h
+++ b/libinterp/corefcn/gl-render.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -40,9 +40,17 @@
 #include <OpenGL/glu.h>
 #endif
 
+#ifdef HAVE_GL_GLEXT_H
+#include <GL/glext.h>
+#elif defined HAVE_OPENGL_GLEXT_H || defined HAVE_FRAMEWORK_OPENGL
+#include <OpenGL/glext.h>
+#endif
+
 #include "graphics.h"
 #include "txt-eng-ft.h"
 
+#if defined (HAVE_OPENGL)
+
 class
 OCTINTERP_API
 opengl_renderer
@@ -62,17 +70,17 @@
   virtual void draw (const graphics_object& go, bool toplevel = true);
 
   virtual void draw (const Matrix& hlist, bool toplevel = false)
-    {
-      int len = hlist.length ();
+  {
+    int len = hlist.length ();
 
-      for (int i = len-1; i >= 0; i--)
-        {
-          graphics_object obj = gh_manager::get_object (hlist(i));
+    for (int i = len-1; i >= 0; i--)
+      {
+        graphics_object obj = gh_manager::get_object (hlist(i));
 
-          if (obj)
-            draw (obj, toplevel);
-        }
-    }
+        if (obj)
+          draw (obj, toplevel);
+      }
+  }
 
   virtual void set_viewport (int w, int h);
   virtual graphics_xform get_transform (void) const { return xform; }
@@ -93,7 +101,7 @@
   virtual void setup_opengl_transformation (const axes::properties& props);
 
   virtual void set_color (const Matrix& c);
-  virtual void set_polygon_offset (bool on, double offset = 0.0);
+  virtual void set_polygon_offset (bool on, float offset = 0.0f);
   virtual void set_linewidth (float w);
   virtual void set_linestyle (const std::string& s, bool stipple = false);
   virtual void set_clipbox (double x1, double x2, double y1, double y2,
@@ -144,27 +152,27 @@
 #if HAVE_FREETYPE
     , text_renderer ()
 #endif
-    { }
+  { }
 
   opengl_renderer& operator = (const opengl_renderer&)
-    { return *this; }
+  { return *this; }
 
   bool is_nan_or_inf (double x, double y, double z) const
-    {
-      return (xisnan (x) || xisnan (y) || xisnan (z)
-              || xisinf (x) || xisinf (y) || xisinf (z));
-    }
+  {
+    return (xisnan (x) || xisnan (y) || xisnan (z)
+            || xisinf (x) || xisinf (y) || xisinf (z));
+  }
 
   octave_uint8 clip_code (double x, double y, double z) const
-    {
-      return ((x < xmin ? 1 : 0)
-              | (x > xmax ? 1 : 0) << 1
-              | (y < ymin ? 1 : 0) << 2
-              | (y > ymax ? 1 : 0) << 3
-              | (z < zmin ? 1 : 0) << 4
-              | (z > zmax ? 1 : 0) << 5
-              | (is_nan_or_inf (x, y, z) ? 0 : 1) << 6);
-    }
+  {
+    return ((x < xmin ? 1 : 0)
+            | (x > xmax ? 1 : 0) << 1
+            | (y < ymin ? 1 : 0) << 2
+            | (y > ymax ? 1 : 0) << 3
+            | (z < zmin ? 1 : 0) << 4
+            | (z > zmax ? 1 : 0) << 5
+            | (is_nan_or_inf (x, y, z) ? 0 : 1) << 6);
+  }
 
   unsigned int make_marker_list (const std::string& m, double size,
                                  bool filled) const;
@@ -200,7 +208,7 @@
   ColumnVector camera_pos, camera_dir;
 
 #if HAVE_FREETYPE
-  // freetype render, used for text rendering
+  // FreeType render, used for text rendering
   ft_render text_renderer;
 #endif
 
@@ -209,3 +217,5 @@
 };
 
 #endif
+
+#endif
--- a/libinterp/corefcn/gl2ps-renderer.cc
+++ b/libinterp/corefcn/gl2ps-renderer.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Shai Ayal
+Copyright (C) 2009-2015 Shai Ayal
 
 This file is part of Octave.
 
@@ -24,50 +24,66 @@
 #include <config.h>
 #endif
 
+#include "error.h"
+#include "gl2ps-renderer.h"
+
 #ifdef HAVE_GL2PS_H
 
 #include <cstdio>
 
 #include "lo-mappers.h"
 #include "oct-locbuf.h"
+#include "unwind-prot.h"
 
-#include "gl2ps-renderer.h"
 #include "gl2ps.h"
+#include "sysdep.h"
 
 void
-glps_renderer::draw (const graphics_object& go, const std::string print_cmd)
+glps_renderer::draw (const graphics_object& go, const std::string& print_cmd)
 {
   static bool in_draw = false;
   static std::string old_print_cmd;
 
   if (!in_draw)
     {
-      in_draw = true;
+      unwind_protect frame;
 
-      GLint buffsize = 0, state = GL2PS_OVERFLOW;
-      GLint viewport[4];
+      frame.protect_var (in_draw);
 
-      glGetIntegerv (GL_VIEWPORT, viewport);
+      in_draw = true;
 
       GLint gl2ps_term;
-      if (term.find ("eps") != std::string::npos) gl2ps_term = GL2PS_EPS;
-      else if (term.find ("pdf") != std::string::npos) gl2ps_term = GL2PS_PDF;
-      else if (term.find ("svg") != std::string::npos) gl2ps_term = GL2PS_SVG;
-      else if (term.find ("ps") != std::string::npos) gl2ps_term = GL2PS_PS;
-      else if (term.find ("pgf") != std::string::npos) gl2ps_term = GL2PS_PGF;
-      else if (term.find ("tex") != std::string::npos) gl2ps_term = GL2PS_TEX;
+      if (term.find ("eps") != std::string::npos)
+        gl2ps_term = GL2PS_EPS;
+      else if (term.find ("pdf") != std::string::npos)
+        gl2ps_term = GL2PS_PDF;
+      else if (term.find ("ps") != std::string::npos)
+        gl2ps_term = GL2PS_PS;
+      else if (term.find ("svg") != std::string::npos)
+        gl2ps_term = GL2PS_SVG;
+      else if (term.find ("pgf") != std::string::npos)
+        gl2ps_term = GL2PS_PGF;
+      else if (term.find ("tex") != std::string::npos)
+        gl2ps_term = GL2PS_TEX;
       else
         {
-          error ("gl2ps-renderer:: Unknown terminal");
+          error ("gl2ps-renderer::draw: Unknown terminal %s", term.c_str ());
           return;
         }
 
       GLint gl2ps_text = 0;
-      if (term.find ("notxt") != std::string::npos) gl2ps_text = GL2PS_NO_TEXT;
+      if (term.find ("notxt") != std::string::npos)
+        gl2ps_text = GL2PS_NO_TEXT;
 
       // Default sort order optimizes for 3D plots
       GLint gl2ps_sort = GL2PS_BSP_SORT;
-      if (term.find ("is2D") != std::string::npos) gl2ps_sort = GL2PS_NO_SORT;
+
+      // For 2D plots we can use a simpler Z-depth sorting algorithm
+      if (term.find ("is2D") != std::string::npos)
+        gl2ps_sort = GL2PS_SIMPLE_SORT;
+
+      GLint state = GL2PS_OVERFLOW;
+      GLint buffsize = 0;
 
       while (state == GL2PS_OVERFLOW)
         {
@@ -76,36 +92,71 @@
           // print_cmd is saved as old_print_cmd.  Then the second drawnow()
           // outputs the tex-file and the graphic filename to be included is
           // extracted from old_print_cmd.
+
           std::string include_graph;
-          std::size_t found_redirect = old_print_cmd.find (">");
+
+          size_t found_redirect = old_print_cmd.find (">");
+
           if (found_redirect != std::string::npos)
             include_graph = old_print_cmd.substr (found_redirect + 1);
           else
             include_graph = old_print_cmd;
-          std::size_t n_begin = include_graph.find_first_not_of (" ");
+
+          size_t n_begin = include_graph.find_first_not_of (" ");
+
           if (n_begin != std::string::npos)
             {
-              std::size_t n_end = include_graph.find_last_not_of (" ");
+              size_t n_end = include_graph.find_last_not_of (" ");
               include_graph = include_graph.substr (n_begin,
                                                     n_end - n_begin + 1);
             }
           else
             include_graph = "foobar-inc";
+
           buffsize += 1024*1024;
-          gl2psBeginPage ("glps_renderer figure", "Octave", viewport,
-                          gl2ps_term, gl2ps_sort,
-                          (GL2PS_SILENT | GL2PS_SIMPLE_LINE_OFFSET
-                           | GL2PS_NO_BLENDING | GL2PS_OCCLUSION_CULL
-                           | GL2PS_BEST_ROOT | gl2ps_text
-                           | GL2PS_NO_PS3_SHADING),
-                          GL_RGBA, 0, NULL, 0, 0, 0,
-                          buffsize, fp, include_graph.c_str ());
+
+          // GL2PS_SILENT was removed to allow gl2ps printing errors on stderr
+          GLint ret = gl2psBeginPage ("glps_renderer figure", "Octave", 0,
+                                      gl2ps_term, gl2ps_sort,
+                                      (GL2PS_NO_BLENDING
+                                       | GL2PS_OCCLUSION_CULL
+                                       | GL2PS_BEST_ROOT
+                                       | gl2ps_text
+                                       | GL2PS_NO_PS3_SHADING
+                                       | GL2PS_USE_CURRENT_VIEWPORT),
+                                      GL_RGBA, 0, 0, 0, 0, 0,
+                                      buffsize, fp, include_graph.c_str ());
+          if (ret == GL2PS_ERROR)
+            {
+              old_print_cmd.clear ();
+              error ("gl2ps-renderer::draw: gl2psBeginPage returned GL2PS_ERROR");
+              return;
+            }
+
           old_print_cmd = print_cmd;
+
           opengl_renderer::draw (go);
+
+          // Without glFinish () there may primitives be missing in the
+          // gl2ps output.
+          glFinish ();
+
           state = gl2psEndPage ();
+
+          if (state == GL2PS_NO_FEEDBACK)
+            {
+              warning ("gl2ps-renderer::draw: empty feedback buffer and/or nothing else to print");
+            }
+          else if (state == GL2PS_ERROR)
+            {
+              old_print_cmd.clear ();
+              error ("gl2ps-renderer::draw: gl2psEndPage returned GL2PS_ERROR");
+              return;
+            }
+
+          // Don't check state for GL2PS_UNINITIALIZED (should never happen)
+          // GL2PS_OVERFLOW (see while loop) or GL2PS_SUCCESS
         }
-
-      in_draw = 0;
     }
   else
     opengl_renderer::draw (go);
@@ -114,7 +165,8 @@
 int
 glps_renderer::alignment_to_mode (int ha, int va) const
 {
-  int gl2psa=GL2PS_TEXT_BL;
+  int gl2psa = GL2PS_TEXT_BL;
+
   if (ha == 0)
     {
       if (va == 0 || va == 3)
@@ -142,6 +194,7 @@
       else if (va == 1)
         gl2psa=GL2PS_TEXT_C;
     }
+
   return gl2psa;
 }
 
@@ -154,14 +207,16 @@
     return Matrix (1, 4, 0.0);
 
   glRasterPos3d (x, y, z);
+
   gl2psTextOpt (txt.c_str (), fontname.c_str (), fontsize,
                 alignment_to_mode (ha, va), rotation);
 
   // FIXME?
-  // We have no way of getting a bounding box from gl2ps, so we use freetype.
+  // We have no way of getting a bounding box from gl2ps, so we use FreeType.
   Matrix bbox;
   uint8NDArray pixels;
   text_to_pixels (txt, pixels, bbox, 0, 0, rotation);
+
   return bbox;
 }
 
@@ -170,22 +225,52 @@
 {
   opengl_renderer::set_font (props);
 
-  fontsize = props.get ("fontsize").double_value ();
+  fontsize = props.get ("fontsize_points").double_value ();
 
-  caseless_str fn = props.get ("fontname").string_value ();
+  caseless_str fn = props.get ("fontname").xtolower ().string_value ();
+  bool isbold = 
+    (props.get ("fontweight").xtolower ().string_value () == "bold");
+  bool isitalic = 
+    (props.get ("fontangle").xtolower ().string_value () == "italic");
+
   fontname = "";
   if (fn == "times" || fn == "times-roman")
-    fontname = "Times-Roman";
+    {
+      if (isitalic && isbold)
+        fontname = "Times-BoldItalic";
+      else if (isitalic)
+        fontname = "Times-Italic";
+      else if (isbold)
+        fontname = "Times-Bold";
+      else
+        fontname = "Times-Roman";
+    }
   else if (fn == "courier")
-    fontname = "Courier";
+    {
+      if (isitalic && isbold)
+        fontname = "Courier-BoldOblique";
+      else if (isitalic)
+        fontname = "Courier-Oblique";
+      else if (isbold)
+        fontname = "Courier-Bold";
+      else
+        fontname = "Courier";
+    }
   else if (fn == "symbol")
     fontname = "Symbol";
   else if (fn == "zapfdingbats")
     fontname = "ZapfDingbats";
   else
-    fontname = "Helvetica";
-
-  // FIXME: add support for bold and italic
+    {
+      if (isitalic && isbold)
+        fontname = "Helvetica-BoldOblique";
+      else if (isitalic)
+        fontname = "Helvetica-Oblique";
+      else if (isbold)
+        fontname = "Helvetica-Bold";
+      else
+        fontname = "Helvetica";
+    }
 }
 
 template <typename T>
@@ -195,7 +280,7 @@
   OCTAVE_LOCAL_BUFFER (GLfloat, a, 3*w*h);
 
   // Convert to GL_FLOAT as it is the only type gl2ps accepts.
-  for (unsigned int i = 0; i < 3*w*h; i++)
+  for (int i = 0; i < 3*w*h; i++)
     a[i] = data[i] / maxval;
 
   gl2psDrawPixels (w, h, 0, 0, format, GL_FLOAT, a);
@@ -225,7 +310,8 @@
   set_color (props.get_color_rgb ());
 
   const Matrix pos = get_transform ().scale (props.get_data_position ());
-  int halign = 0, valign = 0;
+  int halign = 0;
+  int valign = 0;
 
   if (props.horizontalalignment_is ("center"))
     halign = 1;
@@ -253,4 +339,39 @@
                 alignment_to_mode (halign, valign), props.get_rotation ());
 }
 
+static void
+safe_pclose (FILE *f)
+{
+  if (f)
+    octave_pclose (f);
+}
+
 #endif
+
+void
+gl2ps_print (const graphics_object& fig, const std::string& cmd,
+             const std::string& term)
+{
+#ifdef HAVE_GL2PS_H
+
+  FILE *fp = octave_popen (cmd.c_str (), "w");
+
+  if (fp)
+    {
+      unwind_protect frame;
+
+      frame.add_fcn (safe_pclose, fp);
+
+      glps_renderer rend (fp, term);
+
+      rend.draw (fig, cmd);
+    }
+  else
+    error ("print: failed to open pipe for gl2ps renderer");
+
+#else
+
+  error ("print: printing not available without gl2ps library");
+
+#endif
+}
--- a/libinterp/corefcn/gl2ps-renderer.h
+++ b/libinterp/corefcn/gl2ps-renderer.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Shai Ayal
+Copyright (C) 2009-2015 Shai Ayal
 
 This file is part of Octave.
 
@@ -23,6 +23,8 @@
 #if !defined (octave_gl2ps_renderer_h)
 #define octave_gl2ps_renderer_h 1
 
+#include "graphics.h"
+
 #ifdef HAVE_GL2PS_H
 
 #include "gl-render.h"
@@ -38,7 +40,7 @@
 
   ~glps_renderer (void) { }
 
-  void draw (const graphics_object& go, const std::string print_cmd);
+  void draw (const graphics_object& go, const std::string& print_cmd);
 
 protected:
 
@@ -62,13 +64,18 @@
       gl2psEnable (GL2PS_LINE_STIPPLE);
   }
 
-  void set_polygon_offset (bool on, double offset = 0.0)
+  void set_polygon_offset (bool on, float offset = 0.0f)
   {
-    opengl_renderer::set_polygon_offset (on, offset);
     if (on)
-      gl2psEnable (GL2PS_POLYGON_OFFSET_FILL);
+      {
+        opengl_renderer::set_polygon_offset (on, offset);
+        gl2psEnable (GL2PS_POLYGON_OFFSET_FILL);
+      }
     else
-      gl2psDisable (GL2PS_POLYGON_OFFSET_FILL);
+      {
+        gl2psDisable (GL2PS_POLYGON_OFFSET_FILL);
+        opengl_renderer::set_polygon_offset (on, offset);
+      }
   }
 
   void set_linewidth (float w)
@@ -86,4 +93,8 @@
 
 #endif  // HAVE_GL2PS_H
 
+extern OCTINTERP_API void
+gl2ps_print (const graphics_object& fig, const std::string& cmd,
+             const std::string& term);
+
 #endif
--- a/libinterp/corefcn/graphics.cc
+++ b/libinterp/corefcn/graphics.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -58,6 +58,7 @@
 #include "toplev.h"
 #include "txt-eng-ft.h"
 #include "unwind-prot.h"
+#include "octave-default-image.h"
 
 // forward declarations
 static octave_value xget (const graphics_handle& h, const caseless_str& name);
@@ -255,6 +256,93 @@
 }
 
 static Matrix
+default_image_cdata (void)
+{
+  Matrix m (64, 64, 0.0);
+  int i = 0;
+  for (int col = 0; col < 64; col++)
+    for (int row = 0; row < 64; row++)
+      {
+        m(col,row) = static_cast<double> (default_im_data[i]);
+        i++;
+      }
+
+  return m;
+}
+
+static Matrix
+default_surface_xdata (void)
+{
+  Matrix m (3, 3, 0.0);
+  for (int col = 0; col < 3; col++)
+    for (int row = 0; row < 3; row++)
+      m(row,col) = col+1;
+
+  return m;
+}
+
+static Matrix
+default_surface_ydata (void)
+{
+  Matrix m (3, 3, 0.0);
+  for (int row = 0; row < 3; row++)
+    for (int col = 0; col < 3; col++)
+      m(row,col) = row+1;
+
+  return m;
+}
+
+static Matrix
+default_surface_zdata (void)
+{
+  Matrix m (3, 3, 0.0);
+  for (int row = 0; row < 3; row++)
+    m(row,row) = 1.0;
+  return m;
+}
+
+static Matrix
+default_surface_cdata (void)
+{
+  return default_surface_zdata ();
+}
+
+static Matrix
+default_patch_faces (void)
+{
+  Matrix m (1, 3, 1.0);
+  m(1) = 2.0;
+  m(2) = 3.0;
+  return m;
+}
+
+static Matrix
+default_patch_vertices (void)
+{
+  Matrix m (3, 2, 0);
+  m(1) = 1.0;
+  m(3) = 1.0;
+  m(4) = 1.0;
+  return m;
+}
+
+static Matrix
+default_patch_xdata (void)
+{
+  Matrix m (3, 1, 0.0);
+  m(1) = 1.0;
+  return m;
+}
+
+static Matrix
+default_patch_ydata (void)
+{
+  Matrix m (3, 1, 1.0);
+  m(2) = 0.0;
+  return m;
+}
+
+static Matrix
 default_axes_position (void)
 {
   Matrix m (1, 4, 0.0);
@@ -274,6 +362,14 @@
 }
 
 static Matrix
+default_axes_view (void)
+{
+  Matrix m (1, 2, 0.0);
+  m(1) = 90.0;
+  return m;
+}
+
+static Matrix
 default_axes_tick (void)
 {
   Matrix m (1, 6, 0.0);
@@ -357,8 +453,8 @@
 
   retval(0) = 0;
   retval(1) = 0;
-  retval(2) = 0.5;
-  retval(3) = 0.5;
+  retval(2) = 1;
+  retval(3) = 1;
 
   return retval;
 }
@@ -668,13 +764,13 @@
 }
 
 static void
-convert_cdata_2 (bool is_scaled, double clim_0, double clim_1,
+convert_cdata_2 (bool is_scaled, bool is_real, double clim_0, double clim_1,
                  const double *cmapv, double x, octave_idx_type lda,
                  octave_idx_type nc, octave_idx_type i, double *av)
 {
   if (is_scaled)
     x = xround ((nc - 1) * (x - clim_0) / (clim_1 - clim_0));
-  else
+  else if (is_real)
     x = xround (x - 1);
 
   if (xisnan (x))
@@ -700,12 +796,13 @@
 
 template <class T>
 void
-convert_cdata_1 (bool is_scaled, double clim_0, double clim_1,
+convert_cdata_1 (bool is_scaled, bool is_real, double clim_0, double clim_1,
                  const double *cmapv, const T *cv, octave_idx_type lda,
                  octave_idx_type nc, double *av)
 {
   for (octave_idx_type i = 0; i < lda; i++)
-    convert_cdata_2 (is_scaled, clim_0, clim_1, cmapv, cv[i], lda, nc, i, av);
+    convert_cdata_2 (is_scaled, is_real,
+                     clim_0, clim_1, cmapv, cv[i], lda, nc, i, av);
 }
 
 static octave_value
@@ -714,6 +811,7 @@
 {
   dim_vector dv (cdata.dims ());
 
+  // TrueColor data doesn't require conversion
   if (dv.length () == cdim && dv(cdim-1) == 3)
     return cdata;
 
@@ -758,22 +856,34 @@
   double clim_0 = clim(0);
   double clim_1 = clim(1);
 
-#define CONVERT_CDATA_1(ARRAY_T, VAL_FN) \
+  // FIXME: There is a lot of processing time spent just on data conversion
+  //        both here in graphics.cc and again in gl-render.cc.  There must
+  //        be room for improvement!  Here a macro expands to a templated
+  //        function which in turn calls another function (covert_cdata_2).
+  //        And in gl-render.cc (opengl_renderer::draw_image), only GLfloat
+  //        is supported anyways so there is another double for loop across
+  //        height and width to convert all of the input data to GLfloat.
+
+#define CONVERT_CDATA_1(ARRAY_T, VAL_FN, IS_REAL) \
   do \
     { \
       ARRAY_T tmp = cdata. VAL_FN ## array_value (); \
  \
-      convert_cdata_1 (is_scaled, clim_0, clim_1, cmapv, \
+      convert_cdata_1 (is_scaled, IS_REAL, clim_0, clim_1, cmapv, \
                        tmp.data (), lda, nc, av); \
     } \
   while (0)
 
   if (cdata.is_uint8_type ())
-    CONVERT_CDATA_1 (uint8NDArray, uint8_);
+    CONVERT_CDATA_1 (uint8NDArray, uint8_, false);
+  else if (cdata.is_uint16_type ())
+    CONVERT_CDATA_1 (uint16NDArray, uint16_, false);
+  else if (cdata.is_double_type ())
+    CONVERT_CDATA_1 (NDArray, , true);
   else if (cdata.is_single_type ())
-    CONVERT_CDATA_1 (FloatNDArray, float_);
-  else if (cdata.is_double_type ())
-    CONVERT_CDATA_1 (NDArray, );
+    CONVERT_CDATA_1 (FloatNDArray, float_, true);
+  else if (cdata.is_bool_type ())
+    CONVERT_CDATA_1 (boolNDArray, bool_, false);
   else
     error ("unsupported type for cdata (= %s)", cdata.type_name ().c_str ());
 
@@ -1012,7 +1122,7 @@
   for (std::set<caseless_str>::const_iterator it = possible_vals.begin ();
        it != possible_vals.end (); it++)
     {
-      if (retval == "")
+      if (retval.empty ())
         {
           if (*it == default_value ())
             retval = "{" + *it + "}";
@@ -1027,8 +1137,10 @@
             retval += " | " + *it;
         }
     }
-  if (retval != "")
+
+  if (! retval.empty ())
     retval = "[ " + retval + " ]";
+
   return retval;
 }
 
@@ -1044,10 +1156,13 @@
 }
 
 bool
-color_values::str2rgb (std::string str)
-{
+color_values::str2rgb (const std::string& str_arg)
+{
+  bool retval = true;
+
   double tmp_rgb[3] = {0, 0, 0};
-  bool retval = true;
+
+  std::string str = str_arg;
   unsigned int len = str.length ();
 
   std::transform (str.begin (), str.end (), str.begin (), tolower);
@@ -1218,7 +1333,7 @@
         xok = false;
     }
   else
-    xok = v.is_numeric_type ();
+    xok = v.is_numeric_type () || v.is_bool_scalar ();
 
   if (xok)
     {
@@ -1358,6 +1473,18 @@
 bool
 handle_property::do_set (const octave_value& v)
 {
+  // Users may want to use empty matrix to reset a handle property
+  if (v.is_empty ())
+    {
+      if (! get ().is_empty ())
+        {
+          current_val = graphics_handle ();
+          return true;
+        }
+      else
+        return false;
+    }
+
   double dv = v.double_value ();
 
   if (! error_state)
@@ -1694,6 +1821,67 @@
   mark_modified ();
 }
 
+void
+figure::properties::set___mouse_mode__ (const octave_value& val_arg)
+{
+  if (! error_state)
+    {
+      std::string direction = "in";
+
+      octave_value val = val_arg;
+
+      if (val.is_string ())
+        {
+          std::string modestr = val.string_value ();
+
+          if (modestr == "zoom in")
+            {
+              val = modestr = "zoom";
+              direction = "in";
+            }
+          else if (modestr == "zoom out")
+            {
+              val = modestr = "zoom";
+              direction = "out";
+            }
+
+          if (__mouse_mode__.set (val, true))
+            {
+              std::string mode = __mouse_mode__.current_value ();
+
+              octave_scalar_map pm = get___pan_mode__ ().scalar_map_value ();
+              pm.setfield ("Enable", mode == "pan" ? "on" : "off");
+              set___pan_mode__ (pm);
+
+              octave_scalar_map rm = get___rotate_mode__ ().scalar_map_value ();
+              rm.setfield ("Enable", mode == "rotate" ? "on" : "off");
+              set___rotate_mode__ (rm);
+
+              octave_scalar_map zm = get___zoom_mode__ ().scalar_map_value ();
+              zm.setfield ("Enable", mode == "zoom" ? "on" : "off");
+              zm.setfield ("Direction", direction);
+              set___zoom_mode__ (zm);
+
+              mark_modified ();
+            }
+          else if (modestr == "zoom")
+            {
+              octave_scalar_map zm = get___zoom_mode__ ().scalar_map_value ();
+              std::string curr_direction
+                = zm.getfield ("Direction").string_value ();
+
+              if (direction != curr_direction)
+                {
+                  zm.setfield ("Direction", direction);
+                  set___zoom_mode__ (zm);
+
+                  mark_modified ();
+                }
+            }
+        }
+    }
+}
+
 // ---------------------------------------------------------------------
 
 void
@@ -2640,6 +2828,49 @@
   finalize (go);
 }
 
+static void
+xreset_default_properties (graphics_handle gh,
+                           property_list::pval_map_type factory_pval)
+{
+  graphics_object obj = gh_manager::get_object (gh);
+
+  // Replace factory defaults by user defined ones
+  std::string go_name = obj.get_properties ().graphics_object_name ();
+  property_list::pval_map_type pval;
+  obj.build_user_defaults_map (pval, go_name);
+
+  for (property_list::pval_map_const_iterator p = pval.begin ();
+       p != pval.end (); p++)
+    {
+      factory_pval[p->first] = p->second;
+    }
+
+
+  // Reset defaults
+  for (property_list::pval_map_const_iterator it = factory_pval.begin ();
+       it != factory_pval.end (); it++)
+    {
+      std::string pname = it->first;
+
+      // Don't reset internal properties and handle_properties
+      if (! obj.has_readonly_property (pname)
+          && pname.find ("__") != 0 && pname.find ("current") != 0
+          && pname != "uicontextmenu" && pname != "parent")
+        {
+          // Store *mode prop/val in order to set them last
+          if (pname.find ("mode") == (pname.length () - 4))
+            pval[pname] = it->second;
+          else
+            obj.set (pname, it->second);
+        }
+    }
+
+  // set *mode properties
+  for (property_list::pval_map_const_iterator it = pval.begin ();
+       it != pval.end (); it++)
+    obj.set (it->first, it->second);
+}
+
 // ---------------------------------------------------------------------
 
 void
@@ -2671,6 +2902,22 @@
     }
 }
 
+/*
+## test defaults are set in the order they were stored
+%!test
+%! set(0, "defaultfigureunits", "normalized");
+%! set(0, "defaultfigureposition", [0.7 0 0.3 0.3]);
+%! hf = figure ("visible", "off");
+%! tol = 20 * eps;
+%! unwind_protect
+%!   assert (get (hf, "position"), [0.7 0 0.3 0.3], tol);
+%! unwind_protect_cleanup
+%!   close (hf);
+%!   set(0, "defaultfigureunits", "remove");
+%!   set(0, "defaultfigureposition", "remove");
+%! end_unwind_protect
+*/
+
 octave_value
 base_properties::get_dynamic (const caseless_str& name) const
 {
@@ -2772,7 +3019,13 @@
               // Remove child from current parent
               graphics_object old_parent_obj;
               old_parent_obj = gh_manager::get_object (get_parent ());
-              old_parent_obj.remove_child (__myhandle__);
+
+
+              if (old_parent_obj.get_handle () != hnp)
+                old_parent_obj.remove_child (__myhandle__);
+              else
+                // Do nothing more
+                return;
 
               // Check new parent's parent is not this child to avoid recursion
               graphics_object new_parent_obj;
@@ -2795,6 +3048,18 @@
     error ("set: expecting parent to be a graphics handle");
 }
 
+/*
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = gca ();
+%!   set (hax, "parent", gcf ())
+%!   assert (gca (), hax)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+*/
+
 void
 base_properties::mark_modified (void)
 {
@@ -2832,6 +3097,21 @@
     obj.update_axis_limits (axis_type, h);
 }
 
+void
+base_properties::update_uicontextmenu (void) const
+{
+  if (uicontextmenu.get ().is_empty ())
+    return;
+  
+  graphics_object obj = gh_manager::get_object (uicontextmenu.get ());
+  if (obj && obj.isa ("uicontextmenu"))
+    {
+      uicontextmenu::properties& props =
+        reinterpret_cast<uicontextmenu::properties&> (obj.get_properties ());
+      props.add_dependent_obj (__myhandle__);
+    }
+}
+
 bool
 base_properties::is_handle_visible (void) const
 {
@@ -2953,6 +3233,45 @@
     }
 }
 
+void 
+base_graphics_object::build_user_defaults_map (property_list::pval_map_type &def, const std::string go_name) const
+{
+  property_list local_defaults = get_defaults_list ();
+  property_list::plist_map_const_iterator p =
+    local_defaults.find (go_name);
+
+  if (p != local_defaults.end ())
+    {
+      property_list::pval_map_type pval = p->second;
+      for (property_list::pval_map_const_iterator q = pval.begin ();
+           q != pval.end (); q++)
+        {
+          std::string pname = q->first;
+          if (def.find (pname) == def.end ())
+            def[pname] = q->second;
+        }
+    }
+
+  graphics_object parent_obj = gh_manager::get_object (get_parent ());
+
+  if (parent_obj)
+    parent_obj.build_user_defaults_map (def, go_name);
+
+}
+
+void
+base_graphics_object::reset_default_properties (void)
+{
+  if (valid_object ())
+    {
+      property_list::pval_map_type factory_pval =
+        gh_manager::get_object (0).get_factory_defaults_list ()
+        .find (type ())->second;
+
+      xreset_default_properties (get_handle (), factory_pval);
+    }
+}
+
 std::string
 base_graphics_object::values_as_string (void)
 {
@@ -2961,10 +3280,12 @@
   if (valid_object ())
     {
       octave_map m = get ().map_value ();
+      graphics_object obj = gh_manager::get_object (get_handle ());
 
       for (octave_map::const_iterator pa = m.begin (); pa != m.end (); pa++)
         {
-          if (pa->first != "children")
+          if (pa->first != "children"
+              && ! obj.has_readonly_property (pa->first))
             {
               property p = get_properties ().get_property (pa->first);
 
@@ -2976,7 +3297,8 @@
                 }
             }
         }
-      if (retval != "")
+
+      if (! retval.empty ())
         retval += "\n";
     }
   else
@@ -2985,6 +3307,35 @@
   return retval;
 }
 
+std::string
+base_graphics_object::value_as_string (const std::string& prop)
+{
+  std::string retval;
+
+  if (valid_object ())
+    {
+      graphics_object obj = gh_manager::get_object (get_handle ());
+
+      if (prop != "children" && ! obj.has_readonly_property (prop))
+        {
+          property p = get_properties ().get_property (prop);
+
+          if (p.ok () && ! p.is_hidden ())
+            {
+              if (p.is_radio ())
+                retval += p.values_as_string ();
+            }
+        }
+
+      if (! retval.empty ())
+        retval += "\n";
+    }
+  else
+    error ("base_graphics_object::value_as_string: invalid graphics object");
+
+  return retval;
+}
+
 octave_scalar_map
 base_graphics_object::values_as_struct (void)
 {
@@ -2993,11 +3344,13 @@
   if (valid_object ())
     {
       octave_scalar_map m = get ().scalar_map_value ();
+      graphics_object obj = gh_manager::get_object (get_handle ());
 
       for (octave_scalar_map::const_iterator pa = m.begin ();
            pa != m.end (); pa++)
         {
-          if (pa->first != "children")
+          if (pa->first != "children"
+              && ! obj.has_readonly_property (pa->first))
             {
               property p = get_properties ().get_property (pa->first);
 
@@ -3017,6 +3370,26 @@
   return retval;
 }
 
+/*
+%!test
+%! hfig = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ();
+%!   ret = set (hax, "tightinset");
+%!   assert (isempty (ret));
+%!   ret = set (hax, "type");
+%!   assert (isempty (ret));
+%!   ret = set (hfig, "tag");
+%!   assert (isempty (ret));
+%!   ret = set (0, "commandwindowsize");
+%!   assert (isempty (ret));
+%!   ret = set (0);
+%!   assert (! isfield (ret, "commandwindowsize"));
+%! unwind_protect_cleanup
+%!   close (hfig);
+%! end_unwind_protect
+*/
+
 graphics_object
 graphics_object::get_ancestor (const std::string& obj_type) const
 {
@@ -3038,25 +3411,6 @@
 // ---------------------------------------------------------------------
 
 void
-root_figure::properties::set_currentfigure (const octave_value& v)
-{
-  graphics_handle val (v);
-
-  if (error_state)
-    return;
-
-  if (xisnan (val.value ()) || is_handle (val))
-    {
-      currentfigure = val;
-
-      if (val.ok ())
-        gh_manager::push_figure (val);
-    }
-  else
-    gripe_set_invalid ("currentfigure");
-}
-
-void
 root_figure::properties::set_callbackobject (const octave_value& v)
 {
   graphics_handle val (v);
@@ -3087,6 +3441,189 @@
 }
 
 void
+root_figure::properties::set_currentfigure (const octave_value& v)
+{
+  graphics_handle val (v);
+
+  if (error_state)
+    return;
+
+  if (xisnan (val.value ()) || is_handle (val))
+    {
+      currentfigure = val;
+
+      if (val.ok ())
+        gh_manager::push_figure (val);
+    }
+  else
+    gripe_set_invalid ("currentfigure");
+}
+
+std::string
+root_figure::properties::get_diary (void) const
+{
+  bool is_diary_on = F__diarystate__ ()(0).bool_value ();
+  if (is_diary_on)
+    return std::string ("on");
+  else
+    return std::string ("off");
+}
+
+void
+root_figure::properties::set_diary (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      diary.set (val, false);
+
+      if (! error_state)
+        {
+          Fdiary (ovl (diary.current_value ()));
+
+          diary.run_listeners ();
+        }
+    }
+}
+
+std::string
+root_figure::properties::get_diaryfile (void) const
+{
+  return F__diaryfile__ ()(0).string_value ();
+}
+
+void
+root_figure::properties::set_diaryfile (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      diaryfile.set (val, false);
+
+      if (! error_state)
+        {
+          Fdiary (ovl (diaryfile.string_value ()));
+
+          diaryfile.run_listeners ();
+        }
+    }
+}
+
+std::string
+root_figure::properties::get_echo (void) const
+{
+  bool is_echo_on = F__echostate__ ()(0).bool_value ();
+  if (is_echo_on)
+    return std::string ("on");
+  else
+    return std::string ("off");
+}
+
+void
+root_figure::properties::set_echo (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      echo.set (val, false);
+
+      if (! error_state)
+        {
+          Fecho (ovl (echo.current_value ()));
+
+          echo.run_listeners ();
+        }
+    }
+}
+
+std::string
+root_figure::properties::get_errormessage (void) const
+{
+  return Flasterr ()(0).string_value ();
+}
+
+std::string
+root_figure::properties::get_format (void) const
+{
+  return F__formatstring__ ()(0).string_value ();
+}
+
+void
+root_figure::properties::set_format (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      format.set (val, false);
+
+      if (! error_state)
+        {
+          Fformat (ovl (format.current_value ()));
+
+          format.run_listeners ();
+        }
+    }
+}
+
+std::string
+root_figure::properties::get_formatspacing (void) const
+{
+  bool iscompact = F__compactformat__ ()(0).bool_value ();
+  if (iscompact)
+    return std::string ("compact");
+  else
+    return std::string ("loose");
+}
+
+void
+root_figure::properties::set_formatspacing (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      formatspacing.set (val, false);
+
+      if (! error_state)
+        {
+          std::string strval = formatspacing.current_value ();
+
+          if (strval == "compact")
+            F__compactformat__ (ovl (true));
+          else
+            F__compactformat__ (ovl (false));
+
+          formatspacing.run_listeners ();
+        }
+    }
+}
+
+
+double
+root_figure::properties::get_recursionlimit (void) const
+{
+  return Fmax_recursion_depth ()(0).double_value ();
+}
+
+void
+root_figure::properties::set_recursionlimit (const octave_value& val)
+{
+  if (! error_state)
+    {
+      // Input checking and abrev. matching
+      recursionlimit.set (val, false);
+
+      if (! error_state)
+        {
+          double dval = recursionlimit.double_value ();
+
+          Fmax_recursion_depth (ovl (dval));
+
+          recursionlimit.run_listeners ();
+        }
+    }
+}
+
+void
 figure::properties::set_integerhandle (const octave_value& val)
 {
   if (! error_state)
@@ -3220,39 +3757,14 @@
 property_list
 root_figure::factory_properties = root_figure::init_factory_properties ();
 
-static void
-reset_default_properties (property_list& default_properties)
-{
-  property_list new_defaults;
-
-  for (property_list::plist_map_const_iterator p = default_properties.begin ();
-       p != default_properties.end (); p++)
-    {
-      const property_list::pval_map_type pval_map = p->second;
-      std::string prefix = p->first;
-
-      for (property_list::pval_map_const_iterator q = pval_map.begin ();
-           q != pval_map.end ();
-           q++)
-        {
-          std::string s = q->first;
-
-          if (prefix == "axes" && (s == "position" || s == "units"))
-            new_defaults.set (prefix + s, q->second);
-          else if (prefix == "figure" && (s == "position" || s == "units"
-                                          || s == "windowstyle"
-                                          || s == "paperunits"))
-            new_defaults.set (prefix + s, q->second);
-        }
-    }
-
-  default_properties = new_defaults;
-}
-
 void
 root_figure::reset_default_properties (void)
 {
-  ::reset_default_properties (default_properties);
+  // empty list of local defaults
+  default_properties = property_list ();
+
+  xreset_default_properties (get_handle (),
+                             xproperties.factory_defaults ());
 }
 
 // ---------------------------------------------------------------------
@@ -3300,6 +3812,38 @@
 }
 
 void
+figure::properties::adopt (const graphics_handle& h)
+{
+  base_properties::adopt (h);
+
+  if (! get_currentaxes ().ok ())
+    {
+      graphics_object go = gh_manager::get_object (h);
+
+      if (go.type () == "axes")
+        set_currentaxes (h.as_octave_value ());
+    }
+}
+
+/*
+%!test
+%! hf1 = figure ("visible", "off");
+%! ax1 = subplot (1,2,1);
+%! ax2 = subplot (1,2,2);
+%! hf2 = figure ("visible", "off");
+%! unwind_protect
+%!   set (ax2, "parent", hf2);
+%!   assert (get (hf2, "currentaxes"), ax2);
+%!   assert (get (hf1, "currentaxes"), ax1);
+%!   set (ax1, "parent", hf2);
+%!   assert (get (hf2, "currentaxes"), ax2);
+%! unwind_protect_cleanup
+%!   close (hf1);
+%!   close (hf2);
+%! end_unwind_protect
+*/
+
+void
 figure::properties::set_visible (const octave_value& val)
 {
   std::string s = val.string_value ();
@@ -3409,6 +3953,9 @@
           position.run_listeners (POSTSET);
           mark_modified ();
         }
+
+      if (paperpositionmode.is ("auto"))
+        paperposition.set (get_auto_paperposition ());
     }
 }
 
@@ -3628,6 +4175,122 @@
   return ret;
 }
 
+
+Matrix
+figure::properties::get_auto_paperposition (void)
+{
+  Matrix pos = get_position ().matrix_value ();
+  Matrix sz;
+
+  caseless_str funits = get_units ();
+  caseless_str punits = get_paperunits ();
+
+  // Convert position from figure units to paperunits
+  if (funits == "normalized" || punits == "normalized")
+    {
+      sz = screen_size_pixels ();
+      pos = convert_position (pos, funits, "inches", sz);
+
+      if (punits == "normalized")
+        sz = papersize_from_type ("points", get_papertype ());
+
+      pos = convert_position (pos, "inches", punits, sz);
+    }
+  else
+    pos = convert_position (pos, funits, punits, sz);
+
+  // Center the figure on the page
+  sz = get_papersize ().matrix_value ();
+
+  pos(0) = sz(0)/2 - pos(2)/2;
+  pos(1) = sz(1)/2 - pos(3)/2;
+
+  return pos;
+}
+
+/*
+%!test
+%! hf = figure ("visible", "off", "paperpositionmode", "auto");
+%! in_pos = [0 0 4 5];
+%! tol = 20 * eps ();
+%! unwind_protect
+%!   ## paperpositionmode "auto" converts figure size to paper units
+%!   set (hf, "units", "inches");
+%!   set (hf, "position", in_pos);
+%!   set (hf, "paperunits", "centimeters");
+%!   psz = get (hf, "papersize");
+%!   fsz = in_pos(3:4) * 2.54;
+%!   pos = [(psz/2 .- fsz/2) fsz];
+%!   set (hf, "paperpositionmode", "auto");
+%!   assert (get (hf, "paperposition"), pos, tol)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test
+%! hf = figure ("visible", "off", "paperpositionmode", "auto");
+%! in_pos = [0 0 4 5];
+%! tol = 20 * eps ();
+%! unwind_protect
+%!   ## likewise with normalized units
+%!   set (hf, "units", "inches");
+%!   set (hf, "position", in_pos);
+%!   psz = get (hf, "papersize");
+%!   set (hf, "paperunits", "normalized");
+%!   fsz = in_pos(3:4) ./ psz;
+%!   pos = [([0.5 0.5] .- fsz/2) fsz];
+%!   assert (get (hf, "paperposition"), pos, tol)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test
+%! hf = figure ("visible", "off", "paperpositionmode", "auto");
+%! in_pos = [0 0 4 5];
+%! tol = 20 * eps ();
+%! unwind_protect
+%!   ## changing papertype updates paperposition
+%!   set (hf, "units", "inches");
+%!   set (hf, "position", in_pos);
+%!   set  (hf, "papertype", "a4");
+%!   psz = get (hf, "papersize");
+%!   fsz = in_pos(3:4);
+%!   pos = [(psz/2 .- fsz/2) fsz];
+%!   assert (get (hf, "paperposition"), pos, tol)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test
+%! hf = figure ("visible", "off", "paperpositionmode", "auto");
+%! in_pos = [0 0 4 5];
+%! tol = 20 * eps ();
+%! unwind_protect
+%!   ## lanscape updates paperposition
+%!   set (hf, "units", "inches");
+%!   set (hf, "position", in_pos);
+%!   set (hf, "paperorientation", "landscape");
+%!   psz = get (hf, "papersize");
+%!   fsz = in_pos(3:4);
+%!   pos = [(psz/2 .- fsz/2) fsz];
+%!   assert (get (hf, "paperposition"), pos, tol)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test
+%! hf = figure ("visible", "off", "paperpositionmode", "auto");
+%! in_pos = [0 0 4 5];
+%! unwind_protect
+%!   ## back to manual mode
+%!   set (hf, "paperposition", in_pos * 1.1)
+%!   assert (get (hf, "paperpositionmode"), "manual")
+%!   assert (get (hf, "paperposition"), in_pos * 1.1)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+*/
+
 void
 figure::properties::update_paperunits (const caseless_str& old_paperunits)
 {
@@ -3696,6 +4359,9 @@
       // between update_papersize and update_papertype
       papersize.set (octave_value (sz));
     }
+
+  if (paperpositionmode.is ("auto"))
+    paperposition.set (get_auto_paperposition ());
 }
 
 void
@@ -3828,6 +4494,9 @@
       std::swap (sz(0), sz(1));
       papersize.set (octave_value (sz));
     }
+
+  if (paperpositionmode.is ("auto"))
+    paperposition.set (get_auto_paperposition ());
 }
 
 /*
@@ -3879,6 +4548,9 @@
       papersize.set (octave_value (sz));
       paperposition.set (octave_value (pos));
     }
+
+  if (paperpositionmode.is ("auto"))
+    paperposition.set (get_auto_paperposition ());
 }
 
 /*
@@ -3984,7 +4656,18 @@
 void
 figure::reset_default_properties (void)
 {
-  ::reset_default_properties (default_properties);
+  // empty list of local defaults
+  default_properties = property_list ();
+
+  property_list::pval_map_type plist = xproperties.factory_defaults ();
+  plist.erase ("units");
+  plist.erase ("position");
+  plist.erase ("outerposition");
+  plist.erase ("paperunits");
+  plist.erase ("paperposition");
+  plist.erase ("windowstyle");
+
+  xreset_default_properties (get_handle (), plist);
 }
 
 // ---------------------------------------------------------------------
@@ -4202,28 +4885,23 @@
                                   const std::string& who,
                                   const octave_value& v)
 {
+  if (v.is_string ())
+    {
+      xset (hp.handle_value (), "string", v);
+      return;
+    }
+
   graphics_handle val;
-
-  if (v.is_string ())
-    {
-      val = gh_manager::make_graphics_handle ("text", __myhandle__,
-                                              false, false);
-
-      xset (val, "string", v);
-    }
-  else
-    {
-      graphics_object go = gh_manager::get_object (gh_manager::lookup (v));
-
-      if (go.isa ("text"))
-        val = ::reparent (v, "set", who, __myhandle__, false);
-      else
-        {
-          std::string cname = v.class_name ();
-
-          error ("set: expecting text graphics object or character string for %s property, found %s",
-                 who.c_str (), cname.c_str ());
-        }
+  graphics_object go = gh_manager::get_object (gh_manager::lookup (v));
+
+  if (go.isa ("text"))
+    val = ::reparent (v, "set", who, __myhandle__, false);
+  else
+    {
+      std::string cname = v.class_name ();
+
+      error ("set: expecting text graphics object or character string for %s property, found %s",
+             who.c_str (), cname.c_str ());
     }
 
   if (! error_state)
@@ -4405,27 +5083,53 @@
 
   visible = "on";
 
-  // Replace preserves Position and Units properties
-  if (mode != "replace")
+  // Replace/Reset preserves Position and Units properties
+  if (mode != "replace" && mode != "reset")
     {
       outerposition = default_axes_outerposition ();
       position = default_axes_position ();
       activepositionproperty = "outerposition";
     }
 
-  delete_children (true);
-
-  xlabel = gh_manager::make_graphics_handle ("text", __myhandle__,
-                                             false, false);
-
-  ylabel = gh_manager::make_graphics_handle ("text", __myhandle__,
-                                             false, false);
-
-  zlabel = gh_manager::make_graphics_handle ("text", __myhandle__,
-                                             false, false);
-
-  title = gh_manager::make_graphics_handle ("text", __myhandle__,
-                                            false, false);
+  if (mode != "reset")
+    {
+      delete_children (true);
+
+      xlabel.invalidate ();
+      ylabel.invalidate ();
+      zlabel.invalidate ();
+      title.invalidate ();
+
+      xlabel = gh_manager::make_graphics_handle ("text", __myhandle__,
+                                                 false, false, false);
+      ylabel = gh_manager::make_graphics_handle ("text", __myhandle__,
+                                                 false, false, false);
+      zlabel = gh_manager::make_graphics_handle ("text", __myhandle__,
+                                                 false, false, false);
+      title = gh_manager::make_graphics_handle ("text", __myhandle__,
+                                                false, false, false);
+
+      adopt (xlabel.handle_value ());
+      adopt (ylabel.handle_value ());
+      adopt (zlabel.handle_value ());
+      adopt (title.handle_value ());
+
+      update_xlabel_position ();
+      update_ylabel_position ();
+      update_zlabel_position ();
+      update_title_position ();
+    }
+  else
+    {
+      graphics_object go = gh_manager::get_object (xlabel.handle_value ());
+      go.reset_default_properties ();
+      go = gh_manager::get_object (ylabel.handle_value ());
+      go.reset_default_properties ();
+      go = gh_manager::get_object (zlabel.handle_value ());
+      go.reset_default_properties ();
+      go = gh_manager::get_object (title.handle_value ());
+      go.reset_default_properties ();
+    }
 
   xset (xlabel.handle_value (), "handlevisibility", "off");
   xset (ylabel.handle_value (), "handlevisibility", "off");
@@ -4463,11 +5167,6 @@
   xset (zlabel.handle_value (), "autopos_tag", "zlabel");
   xset (title.handle_value (), "autopos_tag", "title");
 
-  adopt (xlabel.handle_value ());
-  adopt (ylabel.handle_value ());
-  adopt (zlabel.handle_value ());
-  adopt (title.handle_value ());
-
   update_transform ();
   sync_positions ();
   override_defaults (obj);
@@ -4508,13 +5207,25 @@
 axes::properties::remove_child (const graphics_handle& h)
 {
   if (xlabel.handle_value ().ok () && h == xlabel.handle_value ())
-    delete_text_child (xlabel);
+    {
+      delete_text_child (xlabel);
+      update_xlabel_position ();
+    }
   else if (ylabel.handle_value ().ok () && h == ylabel.handle_value ())
-    delete_text_child (ylabel);
+    {
+      delete_text_child (ylabel);
+      update_ylabel_position ();
+    }
   else if (zlabel.handle_value ().ok () && h == zlabel.handle_value ())
-    delete_text_child (zlabel);
+    {
+      delete_text_child (zlabel);
+      update_zlabel_position ();
+    }
   else if (title.handle_value ().ok () && h == title.handle_value ())
-    delete_text_child (title);
+    {
+      delete_text_child (title);
+      update_title_position ();
+    }
   else
     base_properties::remove_child (h);
 }
@@ -4704,7 +5415,8 @@
   if (camerapositionmode_is ("auto"))
     {
       Matrix tview = get_view ().matrix_value ();
-      double az = tview(0), el = tview(1);
+      double az = tview(0);
+      double el = tview(1);
       double d = 5 * sqrt (pb(0)*pb(0)+pb(1)*pb(1)+pb(2)*pb(2));
 
       if (el == 90 || el == -90)
@@ -4729,7 +5441,8 @@
   if (cameraupvectormode_is ("auto"))
     {
       Matrix tview = get_view ().matrix_value ();
-      double az = tview(0), el = tview(1);
+      double az = tview(0);
+      double el = tview(1);
 
       if (el == 90 || el == -90)
         {
@@ -4791,7 +5504,8 @@
   translate (x_view, -0.5, -0.5, -0.5);
 
   Matrix x_cube = x_view * unit_cube ();
-  ColumnVector cmin = x_cube.row_min (), cmax = x_cube.row_max ();
+  ColumnVector cmin = x_cube.row_min ();
+  ColumnVector cmax = x_cube.row_max ();
   double xM = cmax(0)-cmin(0);
   double yM = cmax(1)-cmin(1);
 
@@ -4897,9 +5611,11 @@
   const Matrix xlims = xform.xscale (get_xlim ().matrix_value ());
   const Matrix ylims = xform.yscale (get_ylim ().matrix_value ());
   const Matrix zlims = xform.zscale (get_zlim ().matrix_value ());
-  double x_min = xlims(0), x_max = xlims(1);
-  double y_min = ylims(0), y_max = ylims(1);
-  double z_min = zlims(0), z_max = zlims(1);
+
+  double x_min, x_max, y_min, y_max, z_min, z_max;
+  x_min = xlims(0), x_max = xlims(1);
+  y_min = ylims(0), y_max = ylims(1);
+  z_min = zlims(0), z_max = zlims(1);
 
   ColumnVector p1, p2, dir (3);
 
@@ -5011,18 +5727,14 @@
     {
       if (xaxislocation_is ("top"))
         {
-          double tmp = yPlane;
-          yPlane = yPlaneN;
-          yPlaneN = tmp;
+          std::swap (yPlane, yPlaneN);
           x2Dtop = true;
         }
       ypTick = yPlaneN;
       ypTickN = yPlane;
       if (yaxislocation_is ("right"))
         {
-          double tmp = xPlane;
-          xPlane = xPlaneN;
-          xPlaneN = tmp;
+          std::swap (xPlane, xPlaneN);
           y2Dright = true;
         }
       xpTick = xPlaneN;
@@ -5038,6 +5750,7 @@
 
   Matrix viewmat = get_view ().matrix_value ();
   nearhoriz = std::abs (viewmat(1)) <= 5;
+  is2D = viewmat(1) == 90;
 
   update_ticklength ();
 }
@@ -5091,6 +5804,35 @@
 %!  title title;
 */
 
+static ColumnVector
+convert_label_position (const ColumnVector& p,
+                        const text::properties& props,
+                        const graphics_xform& xform,
+                        const Matrix& bbox)
+{
+  ColumnVector retval;
+
+  caseless_str to_units = props.get_units ();
+
+  if (! to_units.compare ("data"))
+    {
+      ColumnVector v = xform.transform (p(0), p(1), p(2));
+
+      retval.resize (3);
+
+      retval(0) = v(0) - bbox(0) + 1;
+      retval(1) = bbox(1) + bbox(3) - v(1) + 1;
+      retval(2) = 0;
+
+      retval = convert_position (retval, "pixels", to_units,
+                                 bbox.extract_n (0, 2, 1, 2));
+    }
+  else
+    retval = p;
+
+  return retval;
+}
+
 static bool updating_xlabel_position = false;
 
 void
@@ -5099,9 +5841,13 @@
   if (updating_xlabel_position)
     return;
 
+  graphics_object obj = gh_manager::get_object (get_xlabel ());
+
+  if (! obj.valid_object ())
+    return;
+
   text::properties& xlabel_props
-    = reinterpret_cast<text::properties&>
-        (gh_manager::get_object (get_xlabel ()).get_properties ());
+    = reinterpret_cast<text::properties&> (obj.get_properties ());
 
   bool is_empty = xlabel_props.get_string ().is_empty ();
 
@@ -5139,7 +5885,9 @@
                                    get_xticklabel ().all_strings (),
                                    get_xlim ().matrix_value ());
 
-      double wmax = ext(0), hmax = ext(1), angle = 0;
+      double wmax = ext(0);
+      double hmax = ext(1);
+      double angle = 0;
       ColumnVector p =
         graphics_xform::xform_vector ((xpTickN+xpTick)/2, ypTick, zpTick);
 
@@ -5171,6 +5919,10 @@
       if (xlabel_props.positionmode_is ("auto"))
         {
           p = xform.untransform (p(0), p(1), p(2), true);
+
+          p = convert_label_position (p, xlabel_props, xform,
+                                      get_extent (false));
+
           xlabel_props.set_position (p.extract_n (0, 3).transpose ());
           xlabel_props.set_positionmode ("auto");
         }
@@ -5191,9 +5943,13 @@
   if (updating_ylabel_position)
     return;
 
+  graphics_object obj = gh_manager::get_object (get_ylabel ());
+
+  if (! obj.valid_object ())
+    return;
+
   text::properties& ylabel_props
-    = reinterpret_cast<text::properties&>
-        (gh_manager::get_object (get_ylabel ()).get_properties ());
+    = reinterpret_cast<text::properties&> (obj.get_properties ());
 
   bool is_empty = ylabel_props.get_string ().is_empty ();
 
@@ -5240,7 +5996,9 @@
                                    get_yticklabel ().all_strings (),
                                    get_ylim ().matrix_value ());
 
-      double wmax = ext(0)+4, hmax = ext(1), angle = 0;
+      double wmax = ext(0)+4;
+      double hmax = ext(1);
+      double angle = 0;
       ColumnVector p =
         graphics_xform::xform_vector (xpTick, (ypTickN+ypTick)/2, zpTick);
 
@@ -5272,6 +6030,10 @@
       if (ylabel_props.positionmode_is ("auto"))
         {
           p = xform.untransform (p(0), p(1), p(2), true);
+
+          p = convert_label_position (p, ylabel_props, xform,
+                                      get_extent (false));
+
           ylabel_props.set_position (p.extract_n (0, 3).transpose ());
           ylabel_props.set_positionmode ("auto");
         }
@@ -5292,9 +6054,13 @@
   if (updating_zlabel_position)
     return;
 
+  graphics_object obj = gh_manager::get_object (get_zlabel ());
+
+  if (! obj.valid_object ())
+    return;
+
   text::properties& zlabel_props
-    = reinterpret_cast<text::properties&>
-        (gh_manager::get_object (get_zlabel ()).get_properties ());
+    = reinterpret_cast<text::properties&> (obj.get_properties ());
 
   bool camAuto = cameraupvectormode_is ("auto");
   bool is_empty = zlabel_props.get_string ().is_empty ();
@@ -5333,7 +6099,9 @@
                                    get_zticklabel ().all_strings (),
                                    get_zlim ().matrix_value ());
 
-      double wmax = ext(0), hmax = ext(1), angle = 0;
+      double wmax = ext(0);
+      double hmax = ext(1);
+      double angle = 0;
       ColumnVector p;
 
       if (xySym)
@@ -5386,6 +6154,10 @@
       if (zlabel_props.positionmode_is ("auto"))
         {
           p = xform.untransform (p(0), p(1), p(2), true);
+
+          p = convert_label_position (p, zlabel_props, xform,
+                                      get_extent (false));
+
           zlabel_props.set_position (p.extract_n (0, 3).transpose ());
           zlabel_props.set_positionmode ("auto");
         }
@@ -5406,9 +6178,13 @@
   if (updating_title_position)
     return;
 
+  graphics_object obj = gh_manager::get_object (get_title ());
+
+  if (! obj.valid_object ())
+    return;
+
   text::properties& title_props
-    = reinterpret_cast<text::properties&>
-        (gh_manager::get_object (get_title ()).get_properties ());
+    = reinterpret_cast<text::properties&> (obj.get_properties ());
 
   unwind_protect frame;
   frame.protect_var (updating_title_position);
@@ -5437,6 +6213,8 @@
 
       p = xform.untransform (p(0), p(1), p(2), true);
 
+      p = convert_label_position (p, title_props, xform, bbox);
+
       title_props.set_position (p.extract_n (0, 3).transpose ());
       title_props.set_positionmode ("auto");
     }
@@ -5494,12 +6272,13 @@
     s = xmax(s, (limits(1) - limits(0)) / (pbfactor * dafactor));
 }
 
-static bool updating_aspectratios = false;
+static std::set<double> updating_aspectratios;
 
 void
 axes::properties::update_aspectratios (void)
 {
-  if (updating_aspectratios)
+  if (updating_aspectratios.find (get___myhandle__ ().value ())
+      != updating_aspectratios.end ())
     return;
 
   Matrix xlimits = get_xlim ().matrix_value ();
@@ -5565,7 +6344,7 @@
           unwind_protect frame;
           frame.protect_var (updating_aspectratios);
 
-          updating_aspectratios = true;
+          updating_aspectratios.insert (get___myhandle__ ().value ());
 
           dx = pba(0) *da(0);
           dy = pba(1) *da(1);
@@ -5616,7 +6395,7 @@
   text_renderer.set_font (get ("fontname").string_value (),
                           get ("fontweight").string_value (),
                           get ("fontangle").string_value (),
-                          get ("fontsize").double_value ());
+                          get ("fontsize_points").double_value ());
 #endif
 #endif
 }
@@ -5803,6 +6582,8 @@
         }
       else
         set_xticklabelmode ("manual");
+
+      sync_positions ();
     }
 }
 
@@ -5819,6 +6600,8 @@
         }
       else
         set_yticklabelmode ("manual");
+
+      sync_positions ();
     }
 }
 
@@ -5835,6 +6618,8 @@
         }
       else
         set_zticklabelmode ("manual");
+
+      sync_positions ();
     }
 }
 
@@ -6248,11 +7033,7 @@
   double tmp;
   // FIXME: should this be checked for somewhere else? (i.e. set{x,y,z}lim)
   if (hi < lo)
-    {
-      tmp = hi;
-      hi = lo;
-      lo = tmp;
-    }
+    std::swap (hi, lo);
 
   if (is_logscale)
     {
@@ -6269,15 +7050,17 @@
         }
     }
 
-  double tick_sep = calc_tick_sep (lo , hi);
-
-  if (is_logscale && ! (xisinf (hi) || xisinf (lo)))
-    {
-      // FIXME: what if (hi-lo) < tick_sep?
-      //         ex: loglog ([1 1.1])
-      tick_sep = std::max (tick_sep, 1.);
-      tick_sep = std::ceil (tick_sep);
-    }
+  double tick_sep;
+
+  if (is_logscale)
+    {
+      if (! (xisinf (hi) || xisinf (lo)))
+        tick_sep = 1;  // Tick is every order of magnitude (bug #39449)
+      else
+        tick_sep = 0;
+    }
+  else
+    tick_sep = calc_tick_sep (lo , hi);
 
   int i1 = static_cast<int> (gnulib::floor (lo / tick_sep));
   int i2 = static_cast<int> (std::ceil (hi / tick_sep));
@@ -6402,7 +7185,8 @@
 #endif
 
   Matrix ext (1, 2, 0.0);
-  double wmax = 0., hmax = 0.;
+  double wmax, hmax;
+  wmax = hmax = 0.;
   int n = std::min (ticklabels.numel (), ticks.numel ());
   for (int i = 0; i < n; i++)
     {
@@ -6514,13 +7298,14 @@
     }
 }
 
-static bool updating_axis_limits = false;
+static std::set<double> updating_axis_limits;
 
 void
 axes::update_axis_limits (const std::string& axis_type,
                           const graphics_handle& h)
 {
-  if (updating_axis_limits)
+  if (updating_axis_limits.find (get_handle ().value ())
+      != updating_axis_limits.end ())
     return;
 
   Matrix kids = Matrix (1, 1, h.value ());
@@ -6679,7 +7464,7 @@
   unwind_protect frame;
   frame.protect_var (updating_axis_limits);
 
-  updating_axis_limits = true;
+  updating_axis_limits.insert (get_handle ().value ());
 
   switch (update_type)
     {
@@ -6722,7 +7507,10 @@
 void
 axes::update_axis_limits (const std::string& axis_type)
 {
-  if (updating_axis_limits || updating_aspectratios)
+  if ((updating_axis_limits.find (get_handle ().value ())
+       != updating_axis_limits.end ())
+      || (updating_aspectratios.find (get_handle ().value ())
+          != updating_aspectratios.end ()))
     return;
 
   Matrix kids = xproperties.get_children ();
@@ -6838,7 +7626,7 @@
   unwind_protect frame;
   frame.protect_var (updating_axis_limits);
 
-  updating_axis_limits = true;
+  updating_axis_limits.insert (get_handle ().value ());
 
   switch (update_type)
     {
@@ -6878,14 +7666,14 @@
 }
 
 inline
-double force_in_range (const double x, const double lower, const double upper)
+double force_in_range (double x, double lower, double upper)
 {
   if (x < lower)
-    { return lower; }
+    return lower;
   else if (x > upper)
-    { return upper; }
-  else
-    { return x; }
+    return upper;
+  else
+    return x;
 }
 
 static Matrix
@@ -6916,8 +7704,8 @@
     }
 
   // Perform the zooming
-  lo = val + factor * (lo - val);
-  hi = val + factor * (hi - val);
+  lo = val + (lo - val) / factor;
+  hi = val + (hi - val) / factor;
 
   if (is_logscale)
     {
@@ -6941,7 +7729,8 @@
 }
 
 void
-axes::properties::zoom_about_point (double x, double y, double factor,
+axes::properties::zoom_about_point (const std::string& mode,
+                                    double x, double y, double factor,
                                     bool push_to_zoom_stack)
 {
   // FIXME: Do we need error checking here?
@@ -6965,29 +7754,65 @@
   xlims = do_zoom (x, factor, xlims, xscale_is ("log"));
   ylims = do_zoom (y, factor, ylims, yscale_is ("log"));
 
-  zoom (xlims, ylims, push_to_zoom_stack);
-}
-
-void
-axes::properties::zoom (const Matrix& xl, const Matrix& yl,
+  zoom (mode, xlims, ylims, push_to_zoom_stack);
+}
+
+void
+axes::properties::zoom (const std::string& mode, double factor,
                         bool push_to_zoom_stack)
 {
-  if (push_to_zoom_stack)
+  // FIXME: Do we need error checking here?
+  Matrix xlims = get_xlim ().matrix_value ();
+  Matrix ylims = get_ylim ().matrix_value ();
+
+  double x = (xlims(0) + xlims(1)) / 2;
+  double y = (ylims(0) + ylims(1)) / 2;
+
+  zoom_about_point (mode, x, y, factor, push_to_zoom_stack);
+}
+
+void
+axes::properties::push_zoom_stack (void)
+{
+  if (zoom_stack.empty ())
     {
       zoom_stack.push_front (xlimmode.get ());
       zoom_stack.push_front (xlim.get ());
       zoom_stack.push_front (ylimmode.get ());
       zoom_stack.push_front (ylim.get ());
-    }
-
-  xlim = xl;
-  xlimmode = "manual";
-  ylim = yl;
-  ylimmode = "manual";
+      zoom_stack.push_front (zlimmode.get ());
+      zoom_stack.push_front (zlim.get ());
+      zoom_stack.push_front (view.get ());
+    }
+}
+
+void
+axes::properties::zoom (const std::string& mode,
+                        const Matrix& xl, const Matrix& yl,
+                        bool push_to_zoom_stack)
+{
+  if (push_to_zoom_stack)
+    push_zoom_stack ();
+
+  if (mode == "horizontal" || mode == "both")
+    {
+      xlim = xl;
+      xlimmode = "manual";
+    }
+
+  if (mode == "vertical" || mode == "both")
+    {
+      ylim = yl;
+      ylimmode = "manual";
+    }
 
   update_transform ();
-  update_xlim (false);
-  update_ylim (false);
+
+  if (mode == "horizontal" || mode == "both")
+    update_xlim ();
+
+  if (mode == "vertical" || mode == "both")
+    update_ylim ();
 }
 
 static Matrix
@@ -7051,7 +7876,9 @@
 }
 
 void
-axes::properties::translate_view (double x0, double x1, double y0, double y1)
+axes::properties::translate_view (const std::string& mode,
+                                  double x0, double x1, double y0, double y1,
+                                  bool push_to_zoom_stack)
 {
   // FIXME: Do we need error checking here?
   Matrix xlims = get_xlim ().matrix_value ();
@@ -7074,12 +7901,82 @@
   xlims = do_translate (x0, x1, xlims, xscale_is ("log"));
   ylims = do_translate (y0, y1, ylims, yscale_is ("log"));
 
-  zoom (xlims, ylims, false);
-}
-
-void
-axes::properties::rotate_view (double delta_el, double delta_az)
-{
+  zoom (mode, xlims, ylims, push_to_zoom_stack);
+}
+
+void
+axes::properties::pan (const std::string& mode, double factor,
+                       bool push_to_zoom_stack)
+{
+  // FIXME: Do we need error checking here?
+  Matrix xlims = get_xlim ().matrix_value ();
+  Matrix ylims = get_ylim ().matrix_value ();
+
+  double x0 = (xlims(0) + xlims(1)) / 2;
+  double y0 = (ylims(0) + ylims(1)) / 2;
+
+  double x1 = x0 + (xlims(1) - xlims(0)) * factor;
+  double y1 = y0 + (ylims(1) - ylims(0)) * factor;
+
+  translate_view (mode, x0, x1, y0, y1, push_to_zoom_stack);
+}
+
+void
+axes::properties::rotate3d (double x0, double x1, double y0, double y1,
+                            bool push_to_zoom_stack)
+{
+  if (push_to_zoom_stack)
+    push_zoom_stack ();
+
+  Matrix bb = get_boundingbox (true);
+  Matrix new_view = get_view ().matrix_value ();
+
+  // Compute new view angles
+  new_view(0) += ((x0 - x1) * (180.0 / bb(2)));
+  new_view(1) += ((y1 - y0) * (180.0 / bb(3)));
+
+  // Clipping
+  new_view(1) = std::min (new_view(1), 90.0);
+  new_view(1) = std::max (new_view(1), -90.0);
+  if (new_view(0) > 180.0)
+    new_view(0) -= 360.0;
+  else if (new_view(0) < -180.0)
+    new_view(0) += 360.0;
+
+  // Snapping
+  double snapMargin = 1.0;
+  for (int a = -90; a <= 90; a += 90)
+    {
+      if ((a - snapMargin) < new_view(1)
+          && new_view(1) < (a + snapMargin))
+        {
+          new_view(1) = a;
+          break;
+        }
+    }
+
+  for (int a = -180; a <= 180; a += 180)
+    if ((a - snapMargin) < new_view(0)
+        && new_view(0) < (a + snapMargin))
+      {
+        if (a == 180)
+          new_view(0) = -180;
+        else
+          new_view(0) = a;
+        break;
+      }
+
+  // Update axes properties
+  set_view (new_view);
+}
+
+void
+axes::properties::rotate_view (double delta_el, double delta_az,
+                               bool push_to_zoom_stack)
+{
+  if (push_to_zoom_stack)
+    push_zoom_stack ();
+
   Matrix v = get_view ().matrix_value ();
 
   v(1) += delta_el;
@@ -7092,42 +7989,66 @@
   v(0) = fmod (v(0) - delta_az + 720,360);
 
   set_view (v);
+
   update_transform ();
 }
 
 void
 axes::properties::unzoom (void)
 {
-  if (zoom_stack.size () >= 4)
-    {
+  if (zoom_stack.size () >= 7)
+    {
+      view = zoom_stack.front ();
+      zoom_stack.pop_front ();
+
+      zlim = zoom_stack.front ();
+      zoom_stack.pop_front ();
+
+      zlimmode = zoom_stack.front ();
+      zoom_stack.pop_front ();
+
       ylim = zoom_stack.front ();
       zoom_stack.pop_front ();
+
       ylimmode = zoom_stack.front ();
       zoom_stack.pop_front ();
+
       xlim = zoom_stack.front ();
       zoom_stack.pop_front ();
+
       xlimmode = zoom_stack.front ();
       zoom_stack.pop_front ();
 
       update_transform ();
-      update_xlim (false);
-      update_ylim (false);
-    }
-}
-
-void
-axes::properties::clear_zoom_stack (void)
-{
-  while (zoom_stack.size () > 4)
+
+      update_xlim ();
+      update_ylim ();
+      update_zlim ();
+
+      update_view ();
+    }
+}
+
+void
+axes::properties::clear_zoom_stack (bool do_unzoom)
+{
+  size_t items_to_leave_on_stack = do_unzoom ? 7 : 0;
+
+  while (zoom_stack.size () > items_to_leave_on_stack)
     zoom_stack.pop_front ();
 
-  unzoom ();
+  if (do_unzoom)
+    unzoom ();
 }
 
 void
 axes::reset_default_properties (void)
 {
-  ::reset_default_properties (default_properties);
+  // empty list of local defaults
+  default_properties = property_list ();
+
+  // reset factory defaults
+  set_defaults ("reset");
 }
 
 void
@@ -7207,6 +8128,40 @@
 }
 
 void
+text::properties::set_fontunits (const octave_value& v)
+{
+  if (! error_state)
+    {
+      caseless_str old_fontunits = get_fontunits ();
+      if (fontunits.set (v, true))
+        {
+          update_fontunits (old_fontunits);
+          mark_modified ();
+        }
+    }
+}
+
+void
+text::properties::update_fontunits (const caseless_str& old_units)
+{
+  caseless_str new_units = get_fontunits ();
+  double parent_height = 0;
+  double fsz = get_fontsize ();
+
+  if (new_units == "normalized")
+    {
+      graphics_object go (gh_manager::get_object (get___myhandle__ ()));
+      graphics_object ax (go.get_ancestor ("axes"));
+
+      parent_height = ax.get_properties ().get_boundingbox (true).elem (3);
+    }
+
+  fsz = convert_font_size (fsz, old_units, new_units, parent_height);
+
+  set_fontsize (octave_value (fsz));
+}
+
+void
 text::properties::update_font (void)
 {
 #ifdef HAVE_FREETYPE
@@ -7214,7 +8169,7 @@
   renderer.set_font (get ("fontname").string_value (),
                      get ("fontweight").string_value (),
                      get ("fontangle").string_value (),
-                     get ("fontsize").double_value ());
+                     get ("fontsize_points").double_value ());
 #endif
   renderer.set_color (get_color_rgb ());
 #endif
@@ -7225,7 +8180,8 @@
 {
 #ifdef HAVE_FREETYPE
 
-  int halign = 0, valign = 0;
+  int halign = 0;
+  int valign = 0;
 
   if (horizontalalignment_is ("center"))
     halign = 1;
@@ -7260,16 +8216,16 @@
 
 #endif
 
-  if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") ||
-      autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
+  if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel")
+      || autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
     update_autopos ("sync");
 }
 
 void
 text::properties::request_autopos (void)
 {
-  if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") ||
-      autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
+  if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel")
+      || autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
     update_autopos (get_autopos_tag ());
 }
 
@@ -7286,11 +8242,18 @@
   Matrix pos = get_position ().matrix_value ();
 
   pos = convert_text_position (pos, *this, cached_units, get_units ());
+
   // FIXME: if the current axes view is 2D, then one should
   // probably drop the z-component of "pos" and leave "zliminclude"
   // to "off".
+
+  bool autopos = positionmode_is ("auto");
+
   set_position (pos);
 
+  if (autopos)
+    set_positionmode ("auto");
+
   if (units_is ("data"))
     {
       set_xliminclude ("on");
@@ -7340,6 +8303,197 @@
     return convert_cdata (*this, fvc,cdatamapping_is ("scaled"), 2);
 }
 
+static bool updating_patch_data = false;
+
+void
+patch::properties::update_fvc (void)
+{
+  if (updating_patch_data)
+    return;
+
+  Matrix xd = get_xdata ().matrix_value ();
+  Matrix yd = get_ydata ().matrix_value ();
+  Matrix zd = get_zdata ().matrix_value ();
+  NDArray cd = get_cdata ().array_value ();
+
+  bad_data_msg = std::string ();
+  if (xd.dims () != yd.dims ()
+      || (xd.dims () != zd.dims () && ! zd.is_empty ()))
+    {
+      bad_data_msg = "x/y/zdata should have the same dimensions";
+      return;
+    }
+
+  // Faces and Vertices
+  dim_vector dv;
+  bool is3D = false;
+  octave_idx_type nr = xd.rows ();
+  octave_idx_type nc = xd.columns ();
+  if (nr == 1 && nc > 1)
+    {
+      nr = nc;
+      nc = 1;
+      xd = xd.as_column ();
+      yd = yd.as_column ();
+      zd = zd.as_column ();
+    }
+
+  dv(0) = nr * nc;
+  if (zd.is_empty ())
+    dv(1) = 2;
+  else
+    {
+      dv(1) = 3;
+      is3D = true;
+    }
+
+  Matrix vert (dv);
+  Matrix idx (nc, nr);
+
+  octave_idx_type kk = 0;
+  for (octave_idx_type jj = 0; jj < nc; jj++)
+    {
+      for (octave_idx_type ii = 0; ii < nr; ii++)
+        {
+          vert(kk,0) = xd(ii,jj);
+          vert(kk,1) = yd(ii,jj);
+          if (is3D)
+            vert(kk,2) = zd(ii,jj);
+
+          idx(jj,ii) = static_cast<double> (kk+1);
+
+          kk++;
+        }
+    }
+
+  // facevertexcdata
+  Matrix fvc;
+  if (cd.ndims () == 3)
+    {
+      dv(0) = cd.rows () * cd.columns ();
+      dv(1) = cd.dims ()(2);
+      fvc = cd.reshape (dv);
+    }
+  else
+    fvc = cd.as_column ();
+
+  // FIXME: shouldn't we update facevertexalphadata here ?
+
+  unwind_protect frame;
+  frame.protect_var (updating_patch_data);
+  updating_patch_data = true;
+
+  faces.set (idx);
+  vertices.set (vert);
+  facevertexcdata.set (fvc);
+}
+
+
+void
+patch::properties::update_data (void)
+{
+  if (updating_patch_data)
+    return;
+
+  Matrix idx = get_faces ().matrix_value ().transpose ();
+  Matrix vert = get_vertices ().matrix_value ();
+  NDArray fvc = get_facevertexcdata ().array_value ();
+
+  octave_idx_type nfaces = idx.columns ();
+  octave_idx_type nvert = vert.rows ();
+
+  // Check all vertices in faces are defined
+  bad_data_msg = std::string ();
+  if (static_cast<double> (nvert) < idx.row_max ().max ())
+    {
+      bad_data_msg = "some vertices in \"faces\" property are undefined";
+      return;
+    }
+
+  // Replace NaNs
+  if (idx.any_element_is_inf_or_nan ())
+    {
+      for (octave_idx_type jj = 0; jj < idx.columns (); jj++)
+        {
+          double valid_vert = idx(0,jj);
+          bool turn_valid = false;
+          for (octave_idx_type ii = 0; ii < idx.rows (); ii++)
+            {
+              if (xisnan (idx(ii,jj)) || turn_valid)
+                {
+                  idx(ii,jj) = valid_vert;
+                  turn_valid = true;
+                }
+              else
+                valid_vert = idx(ii,jj);
+            }
+        }
+    }
+
+  // Build cdata
+  dim_vector dv = dim_vector::alloc (3);
+  NDArray cd;
+  bool pervertex = false;
+
+  if (fvc.rows () == nfaces || fvc.rows () == 1)
+    {
+      dv(0) = 1;
+      dv(1) = fvc.rows ();
+      dv(2) = fvc.columns ();
+      cd = fvc.reshape (dv);
+    }
+  else
+    {
+      if (! fvc.is_empty ())
+        {
+          dv(0) = idx.rows ();
+          dv(1) = nfaces;
+          dv(2) = fvc.columns ();
+          cd.resize (dv);
+          pervertex = true;
+        }
+    }
+
+  // Build x,y,zdata and eventually per vertex cdata
+  Matrix xd (idx.dims ());
+  Matrix yd (idx.dims ());
+  Matrix zd;
+  bool has_zd = false;
+  if (vert.columns () > 2)
+    {
+      zd = Matrix (idx.dims ());
+      has_zd = true;
+    }
+
+
+  for (octave_idx_type jj = 0; jj < nfaces; jj++)
+    {
+      for (octave_idx_type ii = 0; ii < idx.rows (); ii++)
+        {
+          octave_idx_type row = static_cast<octave_idx_type> (idx(ii,jj)-1);
+          xd(ii,jj) = vert(row,0);
+          yd(ii,jj) = vert(row,1);
+
+          if (has_zd)
+            zd(ii,jj) = vert(row,2);
+
+          if (pervertex)
+            for (int kk = 0; kk < fvc.columns (); kk++)
+              cd(ii,jj,kk) = fvc(row,kk);
+        }
+    }
+
+
+  unwind_protect frame;
+  frame.protect_var (updating_patch_data);
+  updating_patch_data = true;
+
+  set_xdata (xd);
+  set_ydata (yd);
+  set_zdata (zd);
+  set_cdata (cd);
+}
+
 // ---------------------------------------------------------------------
 
 octave_value
@@ -7367,15 +8521,26 @@
       Matrix y = get_ydata ().matrix_value ();
       Matrix z = get_zdata ().matrix_value ();
 
-
-      int p = z.columns (), q = z.rows ();
-      int i1 = 0, i2 = 0, i3 = 0;
-      int j1 = 0, j2 = 0, j3 = 0;
+      int p = z.columns ();
+      int q = z.rows ();
+
+      // FIXME: There might be a cleaner way to do this.  When data is changed
+      // the update_xdata, update_ydata, update_zdata routines are called in a
+      // serial fashion.  Until the final call to update_zdata the matrices
+      // will be of mismatched dimensions which can cause an out-of-bound
+      // indexing in the code below.  This one-liner prevents calculating
+      // normals until dimensions match.
+      if (x.columns () != p || y.rows () != q)
+        return;
+
+      NDArray n (dim_vector (q, p, 3), 0.0);
 
       bool x_mat = (x.rows () == q);
       bool y_mat = (y.columns () == p);
 
-      NDArray n (dim_vector (q, p, 3), 0.0);
+      int i1, i2, i3, j1, j2, j3;
+      i1 = i2 = i3 = 0;
+      j1 = j2 = j3 = 0;
 
       for (int i = 0; i < p; i++)
         {
@@ -7675,6 +8840,51 @@
 
 // ---------------------------------------------------------------------
 
+uicontextmenu::~uicontextmenu (void)
+{ 
+  std::list<graphics_handle> lst = xproperties.get_dependent_obj_list ();
+  std::list<graphics_handle>::const_iterator it;
+  
+  for (it = lst.begin (); it != lst.end (); it++)
+    {
+      graphics_object go = gh_manager::get_object (*it);
+      
+      if (go.valid_object () &&
+          go.get ("uicontextmenu") == xproperties.get___myhandle__ ())
+        go.set ("uicontextmenu", Matrix ());
+    }
+}
+
+
+/*
+## Test deletion/reset of uicontextmenu
+%!test
+%! hf = figure ("visible", "off");
+%! hax = axes ("parent", hf);
+%! unwind_protect
+%!   hctx1 = uicontextmenu ("parent", hf);
+%!   hctx2 = uicontextmenu ("parent", hf);
+%!   set (hf, "uicontextmenu", hctx2);
+%!   set (hax, "uicontextmenu", hctx2);
+%!   assert (get (hf, "uicontextmenu"), hctx2);
+%!   assert (get (hax, "uicontextmenu"), hctx2);
+%!   assert (get (hf, "children"), [hctx2; hctx1; hax]);
+%!   delete (hctx2);
+%!   assert (get (hf, "uicontextmenu"), []);
+%!   assert (get (hax, "uicontextmenu"), []);
+%!   assert (get (hf, "children"), [hctx1; hax]);
+%!   set (hf, "uicontextmenu", hctx1);
+%!   assert (get (hf, "uicontextmenu"), hctx1);
+%!   set (hf, "uicontextmenu", []);
+%!   assert (get (hf, "uicontextmenu"), []);
+%!   assert (get (hf, "children"), [hctx1; hax]);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect;
+ */
+
+// ---------------------------------------------------------------------
+
 octave_value
 uicontrol::properties::get_extent (void) const
 {
@@ -7969,7 +9179,11 @@
 void
 uitoolbar::reset_default_properties (void)
 {
-  ::reset_default_properties (default_properties);
+  // empty list of local defaults
+  default_properties = property_list ();
+
+  xreset_default_properties (get_handle (),
+                             xproperties.factory_defaults ());
 }
 
 // ---------------------------------------------------------------------
@@ -8032,6 +9246,35 @@
       graphics_object obj (go);
 
       handle_map[h] = obj;
+
+      // Overriding defaults will work now because the handle is valid
+      // and we can find parent objects (not just handles).
+      obj.override_defaults ();
+
+      if (go_name == "axes")
+        {
+          // Handle defaults for labels since overriding defaults for
+          // them can't work before the axes object is fully
+          // constructed.
+
+          axes::properties& props =
+            dynamic_cast<axes::properties&> (obj.get_properties ());
+
+          graphics_object tgo;
+
+          tgo = gh_manager::get_object (props.get_xlabel ());
+          tgo.override_defaults ();
+
+          tgo = gh_manager::get_object (props.get_ylabel ());
+          tgo.override_defaults ();
+
+          tgo = gh_manager::get_object (props.get_zlabel ());
+          tgo.override_defaults ();
+
+          tgo = gh_manager::get_object (props.get_title ());
+          tgo.override_defaults ();
+        }
+
       if (do_createfcn)
         go->get_properties ().execute_createfcn ();
 
@@ -8060,6 +9303,8 @@
   if (do_notify_toolkit)
     obj.initialize ();
 
+  obj.override_defaults ();
+
   return h;
 }
 
@@ -8144,9 +9389,9 @@
 
   // No copying!
 
-  function_event (const function_event &);
-
-  function_event & operator = (const function_event &);
+  function_event (const function_event&);
+
+  function_event & operator = (const function_event&);
 };
 
 class
@@ -8348,7 +9593,7 @@
 }
 
 void
-gh_manager::do_post_callback (const graphics_handle& h, const std::string name,
+gh_manager::do_post_callback (const graphics_handle& h, const std::string& name,
                               const octave_value& data)
 {
   gh_manager::auto_lock guard;
@@ -8398,7 +9643,7 @@
 }
 
 void
-gh_manager::do_post_set (const graphics_handle& h, const std::string name,
+gh_manager::do_post_set (const graphics_handle& h, const std::string& name,
                          const octave_value& value, bool notify_toolkit)
 {
   gh_manager::auto_lock guard;
@@ -8579,7 +9824,7 @@
 
 DEFUN (__is_handle_visible__, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} __is_handle_visible__ (@var{h})\n\
+@deftypefn {Built-in Function} {} __is_handle_visible__ (@var{h})\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -8595,12 +9840,17 @@
 
 DEFUN (reset, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} reset (@var{h}, @var{property})\n\
-Remove any defaults set for the handle @var{h}.  The default figure\n\
-properties of @qcode{\"position\"}, @qcode{\"units\"},\n\
-@qcode{\"windowstyle\"} and @qcode{\"paperunits\"} and the default axes\n\
-properties of @qcode{\"position\"} and @qcode{\"units\"} are not reset.\n\
-@seealso{cla, clf}\n\
+@deftypefn {Built-in Function} {} reset (@var{h})\n\
+Reset the properties of the graphic object @var{h} to their default values.\n\
+\n\
+For figures, the properties @qcode{\"position\"}, @qcode{\"units\"},\n\
+@qcode{\"windowstyle\"}, and @qcode{\"paperunits\"} are not affected.\n\
+For axes, the properties @qcode{\"position\"} and @qcode{\"units\"} are\n\
+not affected.\n\
+\n\
+The input @var{h} may also be a vector of graphic handles in which case\n\
+each individual object will be reset.\n\
+@seealso{cla, clf, newplot}\n\
 @end deftypefn")
 {
   int nargin = args.length ();
@@ -8617,20 +9867,148 @@
           // loop over graphics objects
           for (octave_idx_type n = 0; n < hcv.length (); n++)
             gh_manager::get_object (hcv(n)).reset_default_properties ();
+
+          if (! error_state)
+            Fdrawnow ();
         }
     }
 
   return octave_value ();
 }
 
+/*
+
+%!test  # line object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   hax = axes ("defaultlinelinewidth", 3);
+%!
+%!   hli = line (1:10, 1:10, 1:10, "marker", "o",
+%!               "markerfacecolor", "b", "linestyle", ":");
+%!
+%!   reset (hli);
+%!   assert (get (hli, "marker"), get (0, "defaultlinemarker"));
+%!   assert (get (hli, "markerfacecolor"),
+%!           get (0, "defaultlinemarkerfacecolor"));
+%!   assert (get (hli, "linestyle"),
+%!           get (0, "defaultlinelinestyle"));
+%!   assert (get (hli, "linewidth"), 3, tol);  # parent axes defaults
+%!
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # patch object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   t1 = (1/16:1/8:1)' * 2*pi;
+%!   t2 = ((1/16:1/16:1)' + 1/32) * 2*pi;
+%!   x1 = sin (t1) - 0.8;
+%!   y1 = cos (t1);
+%!   x2 = sin (t2) + 0.8;
+%!   y2 = cos (t2);
+%!   vert = [x1, y1; x2, y2];
+%!   fac = [1:8,NaN(1,8);9:24];
+%!   hpa = patch ("Faces",fac, "Vertices",vert, "FaceColor","r");
+%!
+%!   reset (hpa);
+%!   assert (get (hpa, "faces"), get (0, "defaultpatchfaces"), tol);
+%!   assert (get (hpa, "vertices"), get (0, "defaultpatchvertices"), tol);
+%!   assert (get (hpa, "facevertexcdata"),
+%!           get (0, "defaultpatchfacevertexcdata"), tol);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # surface object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   hsu = surface (peaks, "edgecolor", "none");
+%!
+%!   reset (hsu);
+%!   assert (get (hsu, "xdata"), get (0, "defaultsurfacexdata"), tol);
+%!   assert (get (hsu, "ydata"), get (0, "defaultsurfaceydata"), tol);
+%!   assert (get (hsu, "zdata"), get (0, "defaultsurfacezdata"), tol);
+%!   assert (get (hsu, "edgecolor"),
+%!           get (0, "defaultsurfaceedgecolor"), tol);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # image object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   him = image (rand (10,10), "cdatamapping", "scaled");
+%!
+%!   reset (him);
+%!   assert (get (him, "cdata"), get (0, "defaultimagecdata"), tol);
+%!   assert (get (him, "cdatamapping"),
+%!           get (0, "defaultimagecdatamapping"), tol);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # text object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   hte = text (5, 5, "Hi!", "fontsize", 20 ,"color", "r");
+%!
+%!   reset (hte);
+%!   assert (get (hte, "position"), get (0, "defaulttextposition"), tol);
+%!   assert (get (hte, "fontsize"), get (0, "defaulttextfontsize"), tol);
+%!   assert (get (hte, "color"), get (0, "defaulttextcolor"), tol);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # axes object
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   tol = 20 * eps;
+%!   pos = get (0, "defaultaxesposition") * .5;
+%!   hax = axes ("linewidth", 2, "position", pos);
+%!   title ("Reset me, please!");
+%!
+%!   reset (hax);
+%!   assert (get (hax, "linewidth"), get (0, "defaultaxeslinewidth"), tol);
+%!   assert (get (hax, "position"), pos, tol); # axes position is unchanged
+%!   assert (get (hax, "default"), struct ()); # no more axes' defaults
+%!   assert (get (get (hax, "title"), "string"), "");
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+%!test  # root figure object
+%! set (0, "defaultfigurevisible", "off");
+%! hf = figure ("visible", "off", "paperunits", "centimeters",
+%!              "papertype", "a4");
+%! unwind_protect
+%!   reset (hf);
+%!   assert (get (hf, "papertype"), get (0, "defaultfigurepapertype"));
+%!   assert (get (hf, "paperunits"), "centimeters"); # paperunits is unchanged
+%!   assert (get (hf, "visible"), get (0, "defaultfigurevisible"));
+%! unwind_protect_cleanup
+%!   close (hf);
+%!   set (0, "defaultfigurevisible", "remove");
+%! end_unwind_protect
+
+*/
+
 DEFUN (set, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} set (@var{h}, @var{property}, @var{value}, @dots{})\n\
 @deftypefnx {Built-in Function} {} set (@var{h}, @var{properties}, @var{values})\n\
 @deftypefnx {Built-in Function} {} set (@var{h}, @var{pv})\n\
+@deftypefnx {Built-in Function} {@var{value_list} =} set (@var{h}, @var{property})\n\
+@deftypefnx {Built-in Function} {@var{all_value_list} =} set (@var{h})\n\
 Set named property values for the graphics handle (or vector of graphics\n\
 handles) @var{h}.\n\
-There are three ways how to give the property names and values:\n\
+There are three ways to give the property names and values:\n\
 \n\
 @itemize\n\
 @item as a comma separated list of @var{property}, @var{value} pairs\n\
@@ -8656,6 +10034,32 @@
 elements of @var{pv} will be set in all handles in @var{h} independent of\n\
 the dimensions of @var{pv}.\n\
 @end itemize\n\
+\n\
+@code{set} is also used to query the list of values a named property will\n\
+take.  @code{@var{clist} = set (@var{h}, \"property\")} will return the list\n\
+of possible values for @qcode{\"property\"} in the cell list @var{clist}.\n\
+If no output variable is used then the list is formatted and printed to the\n\
+screen.\n\
+\n\
+If no property is specified (@code{@var{slist} = set (@var{h})}) then a\n\
+structure @var{slist} is returned where the fieldnames are the properties of\n\
+the object @var{h} and the fields are the list of possible values for each\n\
+property.  If no output variable is used then the list is formatted and\n\
+printed to the screen.\n\
+\n\
+For example,\n\
+\n\
+@example\n\
+@group\n\
+hf = figure ();\n\
+set (hf, \"paperorientation\")\n\
+@result{}  paperorientation:  [ landscape | @{portrait@} | rotated ]\n\
+@end group\n\
+@end example\n\
+\n\
+@noindent\n\
+shows the paperorientation property can take three values with the default\n\
+being @qcode{\"portrait\"}.\n\
 @seealso{get}\n\
 @end deftypefn")
 {
@@ -8706,6 +10110,35 @@
                     {
                       obj.set (args(1).map_value ());
                     }
+                  else if (nargin == 2 && args(1).is_string ())
+                    {
+                      std::string property = args(1).string_value ();
+
+                      octave_map pmap = obj.values_as_struct ();
+
+                      if (obj.has_readonly_property (property))
+                        if (nargout != 0)
+                          retval = Matrix ();
+                        else
+                          octave_stdout << "set: " << property
+                                        <<" is read-only" << std::endl;
+                      else if (pmap.isfield (property))
+                        {
+                          if (nargout != 0)
+                            retval = pmap.getfield (property)(0);
+                          else
+                            {
+                              std::string s = obj.value_as_string (property);
+                              if (! error_state)
+                                octave_stdout << s;
+                            }
+                        }
+                      else
+                        {
+                          error ("set: unknown property");
+                          break;
+                        }
+                    }
                   else if (nargin == 1)
                     {
                       if (nargout != 0)
@@ -8748,7 +10181,7 @@
 }
 
 static std::string
-get_graphics_object_type (const double val)
+get_graphics_object_type (double val)
 {
   std::string retval;
 
@@ -9380,7 +10813,7 @@
     {
       graphics_handle h = octave_NaN;
 
-      const NDArray vals = args (0).array_value ();
+      const NDArray vals = args(0).array_value ();
 
       if (! error_state)
         {
@@ -9585,16 +11018,6 @@
 
 gtk_manager *gtk_manager::instance = 0;
 
-gtk_manager::gtk_manager (void)
-  : dtk (), available_toolkits (), loaded_toolkits ()
-{
-#if defined (HAVE_FLTK)
-  dtk = display_info::display_available () ? "fltk" : "gnuplot";
-#else
-  dtk = "gnuplot";
-#endif
-}
-
 void
 gtk_manager::create_instance (void)
 {
@@ -9609,36 +11032,81 @@
 {
   graphics_toolkit retval;
 
-  const_loaded_toolkits_iterator pl = loaded_toolkits.find (dtk);
-
-  if (pl == loaded_toolkits.end ())
-    {
-      const_available_toolkits_iterator pa = available_toolkits.find (dtk);
-
-      if (pa != available_toolkits.end ())
-        {
-          octave_value_list args;
-          args(0) = dtk;
-          feval ("graphics_toolkit", args);
-
-          if (! error_state)
-            pl = loaded_toolkits.find (dtk);
-
-          if (error_state || pl == loaded_toolkits.end ())
-            error ("failed to load %s graphics toolkit", dtk.c_str ());
+  if (! dtk.empty ())
+    {
+      const_loaded_toolkits_iterator pl = loaded_toolkits.find (dtk);
+
+      if (pl == loaded_toolkits.end ())
+        {
+          const_available_toolkits_iterator pa = available_toolkits.find (dtk);
+
+          if (pa != available_toolkits.end ())
+            {
+              octave_value_list args;
+              args(0) = dtk;
+              feval ("graphics_toolkit", args);
+
+              if (! error_state)
+                pl = loaded_toolkits.find (dtk);
+
+              if (error_state || pl == loaded_toolkits.end ())
+                error ("failed to load %s graphics toolkit", dtk.c_str ());
+              else
+                retval = pl->second;
+            }
           else
-            retval = pl->second;
+            error ("default graphics toolkit '%s' is not available!",
+                   dtk.c_str ());
         }
       else
-        error ("default graphics toolkit '%s' is not available!",
-               dtk.c_str ());
-    }
-  else
-    retval = pl->second;
+        retval = pl->second;
+    }
+  else
+    error ("no graphics toolkits are available!");
 
   return retval;
 }
 
+void
+gtk_manager::do_register_toolkit (const std::string& name)
+{
+  if (dtk.empty () || name == "qt"
+      || (name == "fltk"
+          && available_toolkits.find ("qt") == available_toolkits.end ()))
+    dtk = name;
+
+  available_toolkits.insert (name);
+}
+
+void
+gtk_manager::do_unregister_toolkit (const std::string& name)
+{
+  available_toolkits.erase (name);
+
+  if (dtk == name)
+    {
+      if (available_toolkits.empty ())
+        dtk.clear ();
+      else
+        {
+          const_available_toolkits_iterator pa = available_toolkits.begin ();
+
+          dtk = *pa++;
+
+          while (pa != available_toolkits.end ())
+            {
+              std::string tk_name = *pa++;
+
+              if (tk_name == "qt"
+                  || (tk_name == "fltk"
+                      && (available_toolkits.find ("qt")
+                          == available_toolkits.end ())))
+                dtk = tk_name;
+            }
+        }
+    }
+}
+
 DEFUN (available_graphics_toolkits, , ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} available_graphics_toolkits ()\n\
@@ -9664,12 +11132,13 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
-        gtk_manager::register_toolkit (name);
+      if (args(0).is_string ())
+        {
+          std::string name = args(0).string_value ();
+          gtk_manager::register_toolkit (name);
+        }
       else
-        error ("register_graphics_toolkit: expecting character string");
+        error ("register_graphics_toolkit: TOOLKIT must be a string");
     }
   else
     print_usage ();
@@ -9756,6 +11225,9 @@
               else
                 {
                   error ("drawnow: invalid argument, expected 'expose' as argument");
+
+                  gh_manager::unlock ();
+
                   return retval;
                 }
             }
@@ -9782,16 +11254,38 @@
 
               if (! error_state)
                 {
-                  size_t pos = file.find_first_not_of ("|");
-                  if (pos > 0)
-                    file = file.substr (pos);
+                  size_t pos_p = file.find_first_of ("|");
+                  size_t pos_c = file.find_first_not_of ("| ");
+
+                  if (pos_p == std::string::npos &&
+                      pos_c == std::string::npos)
+                    {
+                      error ("drawnow: empty output ''");
+
+                      gh_manager::unlock ();
+
+                      return retval;
+                    }
+                  else if (pos_c == std::string::npos)
+                    {
+                      error ("drawnow: empty pipe '|'");
+
+                      gh_manager::unlock ();
+
+                      return retval;
+                    }
+                  else if (pos_p != std::string::npos && pos_p < pos_c)
+                    {
+                      // Strip leading pipe character
+                      file = file.substr (pos_c);
+                    }
                   else
                     {
-                      pos = file.find_last_of (file_ops::dir_sep_chars ());
+                      size_t pos = file.find_last_of (file_ops::dir_sep_chars ());
 
                       if (pos != std::string::npos)
                         {
-                          std::string dirname = file.substr (0, pos+1);
+                          std::string dirname = file.substr (pos_c, pos+1);
 
                           file_stat fs (dirname);
 
@@ -9800,6 +11294,8 @@
                               error ("drawnow: nonexistent directory '%s'",
                                      dirname.c_str ());
 
+                              gh_manager::unlock ();
+
                               return retval;
                             }
                         }
@@ -9982,8 +11478,8 @@
                                                  POSTSET);
                   else
                     {
-                      caseless_str persistent = args(2).string_value ();
-                      if (persistent.compare ("persistent"))
+                      if (args(2).is_string ()
+                          && args(2).string_value () == "persistent")
                         {
                           go.delete_property_listener (pname, octave_value (),
                                                        PERSISTENT);
@@ -10065,8 +11561,8 @@
 @var{type} may also be the concatenation of a core object type and\n\
 a valid property name for that object type.  The property created\n\
 then has the same characteristics as the referenced property (type,\n\
-possible values, hidden state@dots{}).  This allows to clone an existing\n\
-property into the graphics object @var{h}.\n\
+possible values, hidden state@dots{}).  This allows one to clone an\n\
+existing property into the graphics object @var{h}.\n\
 \n\
 Examples:\n\
 \n\
@@ -10177,7 +11673,7 @@
 static bool
 compare_property_values (const octave_value& o1, const octave_value& o2)
 {
-  octave_value_list args (2);
+  octave_value_list args(2);
 
   args(0) = o1;
   args(1) = o2;
@@ -10384,13 +11880,10 @@
                         {
                           caseless_str s = args(2).string_value ();
 
-                          if (! error_state)
-                            {
-                              if (s.compare ("timeout"))
-                                timeout_index = 2;
-                              else
-                                max_arg_index++;
-                            }
+                          if (s.compare ("timeout"))
+                            timeout_index = 2;
+                          else
+                            max_arg_index++;
                         }
                       else
                         max_arg_index++;
@@ -10563,3 +12056,75 @@
 
   return octave_value ();
 }
+
+DEFUN (__zoom__, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {} __zoom__ (@var{axes}, @var{mode}, @var{factor})\n\
+@deftypefnx {Built-in Function} {} __zoom__ (@var{axes}, \"out\")\n\
+@deftypefnx {Built-in Function} {} __zoom__ (@var{axes}, \"reset\")\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  if (nargin != 2 && nargin != 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  double h = args(0).double_value ();
+
+  if (error_state)
+    return retval;
+
+  gh_manager::auto_lock guard;
+
+  graphics_handle handle = gh_manager::lookup (h);
+
+  if (! handle.ok ())
+    {
+      error ("__zoom__: invalid handle");
+      return retval;
+    }
+
+  graphics_object ax = gh_manager::get_object (handle);
+
+  axes::properties& ax_props =
+    dynamic_cast<axes::properties&> (ax.get_properties ());
+
+  if (nargin == 2)
+    {
+      std::string opt = args(1).string_value ();
+
+      if (error_state)
+        return retval;
+
+      if (opt == "out" || opt == "reset")
+        {
+          if (opt == "out")
+            {
+              ax_props.clear_zoom_stack ();
+              Vdrawnow_requested = true;
+            }
+          else
+            ax_props.clear_zoom_stack (false);
+
+        }
+    }
+  else
+    {
+      std::string mode = args(1).string_value ();
+      double factor = args(2).scalar_value ();
+
+      if (error_state)
+        return retval;
+
+      ax_props.zoom (mode, factor);
+      Vdrawnow_requested = true;
+    }
+
+  return retval;
+}
--- a/libinterp/corefcn/graphics.in.h
+++ b/libinterp/corefcn/graphics.in.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -296,7 +296,7 @@
 
   graphics_handle get_parent (void) const { return parent; }
 
-  void set_parent (const graphics_handle &h) { parent = h; }
+  void set_parent (const graphics_handle& h) { parent = h; }
 
   bool is_hidden (void) const { return hidden; }
 
@@ -1028,7 +1028,7 @@
     validate ();
   }
 
-  color_values (std::string str)
+  color_values (const std::string& str)
     : xrgb (1, 3)
   {
     if (! str2rgb (str))
@@ -1076,7 +1076,7 @@
 private:
   Matrix xrgb;
 
-  OCTINTERP_API bool str2rgb (std::string str);
+  OCTINTERP_API bool str2rgb (const std::string& str);
 };
 
 class color_property : public base_property
@@ -1577,6 +1577,8 @@
     return *this;
   }
 
+  void invalidate (void) { current_val = octave_NaN; }
+
   base_property* clone (void) const { return new handle_property (*this); }
 
 protected:
@@ -1631,7 +1633,7 @@
   }
 
   children_property (const std::string& nm, const graphics_handle& h,
-                     const Matrix &val)
+                     const Matrix& val)
     : base_property (nm, h), children_list ()
   {
     do_init_children (val);
@@ -1651,12 +1653,12 @@
 
   base_property* clone (void) const { return new children_property (*this); }
 
-  bool remove_child (const double &val)
+  bool remove_child (double val)
   {
     return do_remove_child (val);
   }
 
-  void adopt (const double &val)
+  void adopt (double val)
   {
     do_adopt_child (val);
   }
@@ -1716,6 +1718,7 @@
     const Matrix new_kids_column = new_kids.reshape (dim_vector (nel, 1));
 
     bool is_ok = true;
+    bool add_hidden = true;
 
     if (! error_state)
       {
@@ -1725,9 +1728,13 @@
           {
             Matrix t1 = visible_kids.sort ();
             Matrix t2 = new_kids_column.sort ();
+            Matrix t3 = get_hidden ().sort ();
 
             if (t1 != t2)
               is_ok = false;
+
+            if (t1 == t3)
+              add_hidden = false;
           }
         else
           is_ok = false;
@@ -1743,7 +1750,10 @@
 
     if (is_ok)
       {
-        Matrix tmp = new_kids_column.stack (get_hidden ());
+        Matrix tmp = new_kids_column;
+
+        if (add_hidden)
+          tmp.stack (get_hidden ());
 
         children_list.clear ();
 
@@ -1759,14 +1769,14 @@
   }
 
 private:
-  void do_init_children (const Matrix &val)
+  void do_init_children (const Matrix& val)
   {
     children_list.clear ();
     for (octave_idx_type i = 0; i < val.numel (); i++)
       children_list.push_front (val.xelem (i));
   }
 
-  void do_init_children (const std::list<double> &val)
+  void do_init_children (const std::list<double>& val)
   {
     children_list.clear ();
     for (const_children_list_iterator p = val.begin (); p != val.end (); p++)
@@ -1800,7 +1810,7 @@
     return false;
   }
 
-  void do_adopt_child (const double &val)
+  void do_adopt_child (double val)
   {
     children_list.push_front (val);
   }
@@ -1989,10 +1999,76 @@
 
 // ---------------------------------------------------------------------
 
+typedef std::pair <std::string, octave_value> pval_pair;
+
+class pval_vector : public std::vector <pval_pair>
+{
+public:
+  const_iterator find (const std::string pname) const
+  {
+    const_iterator it;
+
+    for (it = (*this).begin (); it != (*this).end (); it++)
+      if (pname.compare ((*it).first) == 0)
+        return it;
+
+    return (*this).end ();
+  }
+
+  iterator find (const std::string pname)
+  {
+    iterator it;
+
+    for (it = (*this).begin (); it != (*this).end (); it++)
+      if (pname.compare ((*it).first) == 0)
+        return it;
+
+    return (*this).end ();
+  }
+
+  octave_value lookup (const std::string pname) const
+  {
+    octave_value retval;
+
+    const_iterator it = find (pname);
+
+    if (it != (*this).end ())
+      retval = (*it).second;
+
+    return retval;
+  }
+
+  octave_value& operator [] (const std::string pname)
+  {
+    iterator it = find (pname);
+
+    if (it == (*this).end ())
+      {
+        push_back (pval_pair (pname, octave_value ()));
+        return (*this).back ().second;
+      }
+
+    return (*it).second;
+  }
+
+  void erase (const std::string pname)
+  {
+    iterator it = find (pname);
+    if (it != (*this).end ())
+      erase (it);
+  }
+
+  void erase (iterator it)
+  {
+    std::vector <pval_pair>::erase (it);
+  }
+
+};
+
 class property_list
 {
 public:
-  typedef std::map<std::string, octave_value> pval_map_type;
+  typedef pval_vector pval_map_type;
   typedef std::map<std::string, pval_map_type> plist_map_type;
 
   typedef pval_map_type::iterator pval_map_iterator;
@@ -2273,7 +2349,7 @@
 
 private:
 
-  gtk_manager (void);
+  gtk_manager (void) { }
 
   ~gtk_manager (void) { }
 
@@ -2322,15 +2398,9 @@
 
   graphics_toolkit do_get_toolkit (void) const;
 
-  void do_register_toolkit (const std::string& name)
-  {
-    available_toolkits.insert (name);
-  }
-
-  void do_unregister_toolkit (const std::string& name)
-  {
-    available_toolkits.erase (name);
-  }
+  void do_register_toolkit (const std::string& name);
+
+  void do_unregister_toolkit (const std::string& name);
 
   void do_load_toolkit (const graphics_toolkit& tk)
   {
@@ -2462,12 +2532,16 @@
   virtual void remove_child (const graphics_handle& h)
   {
     if (children.remove_child (h.value ()))
-      mark_modified ();
+      {
+        children.run_listeners ();
+        mark_modified ();
+      }
   }
 
   virtual void adopt (const graphics_handle& h)
   {
     children.adopt (h.value ());
+    children.run_listeners ();
     mark_modified ();
   }
 
@@ -2521,6 +2595,8 @@
   virtual void update_axis_limits (const std::string& axis_type,
                                    const graphics_handle& h) const;
 
+  virtual void update_uicontextmenu (void) const;
+
   virtual void delete_children (bool clear = false)
   {
     children.delete_children (clear);
@@ -2589,7 +2665,7 @@
     bool_property selectionhighlight , "on"
     string_property tag s , ""
     string_property type frs , ty
-    handle_property uicontextmenu , graphics_handle ()
+    handle_property uicontextmenu u , graphics_handle ()
     any_property userdata , Matrix ()
     bool_property visible , "on"
     // additional (Octave-specific) properties
@@ -2600,7 +2676,7 @@
 protected:
   struct cmp_caseless_str
   {
-    bool operator () (const caseless_str &a, const caseless_str &b) const
+    bool operator () (const caseless_str& a, const caseless_str& b) const
     {
       std::string a1 = a;
       std::transform (a1.begin (), a1.end (), a1.begin (), tolower);
@@ -2645,6 +2721,9 @@
       error ("base_graphics_object::override_defaults: invalid graphics object");
   }
 
+  void build_user_defaults_map (property_list::pval_map_type &def,
+                                const std::string go_name) const;
+
   virtual void set_from_list (property_list& plist)
   {
     if (valid_object ())
@@ -2698,14 +2777,34 @@
     return octave_value ();
   }
 
+  virtual property_list get_defaults_list (void) const
+  {
+    if (! valid_object ())
+      error ("base_graphics_object::get_defaults_list: invalid graphics object");
+    return property_list ();
+  }
+
   virtual octave_value get_factory_defaults (void) const
   {
     error ("base_graphics_object::get_factory_defaults: invalid graphics object");
     return octave_value ();
   }
 
+  virtual property_list get_factory_defaults_list (void) const
+  {
+    error ("base_graphics_object::get_factory_defaults_list: invalid graphics object");
+    return property_list ();
+  }
+
+  virtual bool has_readonly_property (const caseless_str& pname) const
+  {
+    return base_properties::has_readonly_property (pname);
+  }
+
   virtual std::string values_as_string (void);
 
+  virtual std::string value_as_string (const std::string& prop);
+
   virtual octave_scalar_map values_as_struct (void);
 
   virtual graphics_handle get_parent (void) const
@@ -2828,16 +2927,7 @@
 
   virtual void remove_all_listeners (void);
 
-  virtual void reset_default_properties (void)
-  {
-    if (valid_object ())
-      {
-        std::string msg = (type () + "::reset_default_properties");
-        gripe_not_implemented (msg.c_str ());
-      }
-    else
-      error ("base_graphics_object::default: invalid graphics object");
-  }
+  virtual void reset_default_properties (void);
 
 protected:
   virtual void initialize (const graphics_object& go)
@@ -2919,6 +3009,17 @@
     rep->override_defaults (obj);
   }
 
+  void override_defaults (void)
+  {
+    rep->override_defaults (*rep);
+  }
+
+  void build_user_defaults_map (property_list::pval_map_type &def,
+                                const std::string go_name) const
+  {
+    rep->build_user_defaults_map (def, go_name);
+  }
+
   void set_from_list (property_list& plist) { rep->set_from_list (plist); }
 
   void set (const caseless_str& name, const octave_value& val)
@@ -2970,13 +3071,33 @@
 
   octave_value get_defaults (void) const { return rep->get_defaults (); }
 
+  property_list get_defaults_list (void) const
+  {
+    return rep->get_defaults_list ();
+  }
+
   octave_value get_factory_defaults (void) const
   {
     return rep->get_factory_defaults ();
   }
 
+  property_list get_factory_defaults_list (void) const
+  {
+    return rep->get_factory_defaults_list ();
+  }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    return rep->has_readonly_property (pname);
+  }
+
   std::string values_as_string (void) { return rep->values_as_string (); }
 
+  std::string value_as_string (const std::string& prop)
+  {
+    return rep->value_as_string (prop);
+  }
+
   octave_map values_as_struct (void) { return rep->values_as_struct (); }
 
   graphics_handle get_parent (void) const { return rep->get_parent (); }
@@ -3096,20 +3217,10 @@
     // See the genprops.awk script for an explanation of the
     // properties declarations.
 
-    // FIXME: it seems strange to me that the diary, diaryfile,
-    // echo, errormessage, format, formatspacing, language, and
-    // recursionlimit properties are here.
-    // WTF do they have to do with graphics?
-    // Also note that these properties (and the monitorpositions,
-    // pointerlocation, and pointerwindow properties) are not yet used
-    // by Octave, so setting them will have no effect, and changes
-    // made elswhere (say, the diary or format functions) will not
-    // cause these properties to be updated.
-    // ANSWER: Matlab defines these properties and uses them in
-    // the same way that Octave uses an internal static variable to
-    // keep track of state.  set (0, "echo", "on") is equivalent
-    // to Octave's echo ("on").  Maybe someday we can connect callbacks
-    // that actually call Octave's own functions for this.
+    // FIXME: Properties that still dont have callbacks are:
+    // language, monitorpositions, pointerlocation, pointerwindow.
+    // Note that these properties are not yet used by Octave, so setting
+    // them will have no effect.
 
     // Programming note: Keep property list sorted if new ones are added.
 
@@ -3117,18 +3228,18 @@
       handle_property callbackobject Sr , graphics_handle ()
       array_property commandwindowsize r , Matrix (1, 2, 0)
       handle_property currentfigure S , graphics_handle ()
-      bool_property diary , "off"
-      string_property diaryfile , "diary"
-      bool_property echo , "off"
-      string_property errormessage , ""
+      bool_property diary GS , "off"
+      string_property diaryfile GS , "diary"
+      bool_property echo GS , "off"
+      string_property errormessage Gr , ""
       string_property fixedwidthfontname , "Courier"
-      radio_property format , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rational|{short}|shorte|shorteng|shortg"
-      radio_property formatspacing , "compact|{loose}"
+      radio_property format GS , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rat|{short}|shorte|shorteng|shortg"
+      radio_property formatspacing GS , "compact|{loose}"
       string_property language , "ascii"
       array_property monitorpositions , Matrix (1, 4, 0)
       array_property pointerlocation , Matrix (1, 2, 0)
       double_property pointerwindow r , 0.0
-      double_property recursionlimit , 256.0
+      double_property recursionlimit GS , 256.0
       double_property screendepth r , default_screendepth ()
       double_property screenpixelsperinch r , default_screenpixelsperinch ()
       array_property screensize r , default_screensize ()
@@ -3138,6 +3249,7 @@
 
   private:
     std::list<graphics_handle> cbo_stack;
+
   };
 
 private:
@@ -3218,11 +3330,21 @@
     return default_properties.as_struct ("default");
   }
 
+  property_list get_defaults_list (void) const
+  {
+    return default_properties;
+  }
+
   octave_value get_factory_defaults (void) const
   {
     return factory_properties.as_struct ("factory");
   }
 
+  property_list get_factory_defaults_list (void) const
+  {
+    return factory_properties;
+  }
+
   base_properties& get_properties (void) { return xproperties; }
 
   const base_properties& get_properties (void) const { return xproperties; }
@@ -3231,6 +3353,14 @@
 
   void reset_default_properties (void);
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 private:
   property_list default_properties;
 
@@ -3280,8 +3410,11 @@
                 }
               else
                 {
-                  set_toolkit (b);
-                  mark_modified ();
+                  if (nm != get___graphics_toolkit__ ())
+                    {
+                      set_toolkit (b);
+                      mark_modified ();
+                    }
                 }
             }
           else
@@ -3289,6 +3422,8 @@
         }
     }
 
+    void adopt (const graphics_handle& h);
+
     void set_position (const octave_value& val,
                        bool do_notify_toolkit = true);
 
@@ -3339,8 +3474,8 @@
       bool_property numbertitle , "on"
       array_property outerposition s , Matrix (1, 4, -1.0)
       radio_property paperorientation U , "{portrait}|landscape|rotated"
-      array_property paperposition , default_figure_paperposition ()
-      radio_property paperpositionmode , "auto|{manual}"
+      array_property paperposition m , default_figure_paperposition ()
+      radio_property paperpositionmode au , "auto|{manual}"
       array_property papersize U , default_figure_papersize ()
       radio_property papertype SU , "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>"
       radio_property paperunits Su , "{inches}|centimeters|normalized|points"
@@ -3368,8 +3503,12 @@
       string_property xvisual , ""
       radio_property xvisualmode , "{auto}|manual"
       // Octave-specific properties
+      radio_property __mouse_mode__ hS , "{none}|pan|rotate|select|text|zoom"
+      any_property __pan_mode__ h , Matrix ()
+      any_property __rotate_mode__ h , Matrix ()
+      any_property __zoom_mode__ h , Matrix ()
       bool_property __enhanced__ h , "on"
-      string_property __graphics_toolkit__ s , gtk_manager::default_toolkit ()
+      string_property __graphics_toolkit__ hs , gtk_manager::default_toolkit ()
       any_property __guidata__ h , Matrix ()
       any_property __plot_stream__ h , Matrix ()
     END_PROPERTIES
@@ -3388,6 +3527,14 @@
     }
 
   private:
+    Matrix get_auto_paperposition (void);
+
+    void update_paperpositionmode (void)
+    {
+      if (paperpositionmode.is ("auto"))
+        paperposition.set (get_auto_paperposition ());
+    }
+
     mutable graphics_toolkit toolkit;
   };
 
@@ -3397,9 +3544,7 @@
 public:
   figure (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p), default_properties ()
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~figure (void) { }
 
@@ -3447,6 +3592,11 @@
     return default_properties.as_struct ("default");
   }
 
+  property_list get_defaults_list (void) const
+  {
+    return default_properties;
+  }
+
   base_properties& get_properties (void) { return xproperties; }
 
   const base_properties& get_properties (void) const { return xproperties; }
@@ -3455,6 +3605,14 @@
 
   void reset_default_properties (void);
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 private:
   property_list default_properties;
 };
@@ -3639,6 +3797,7 @@
     bool get_x2Dtop (void) const { return x2Dtop; }
     bool get_y2Dright (void) const { return y2Dright; }
     bool get_layer2Dtop (void) const { return layer2Dtop; }
+    bool get_is2D (void) const { return is2D; }
     bool get_xySym (void) const { return xySym; }
     bool get_xyzSym (void) const { return xyzSym; }
     bool get_zSign (void) const { return zSign; }
@@ -3650,14 +3809,29 @@
     ColumnVector coord2pixel (double x, double y, double z) const
     { return get_transform ().transform (x, y, z); }
 
-    void zoom_about_point (double x, double y, double factor,
-                           bool push_to_zoom_stack = true);
-    void zoom (const Matrix& xl, const Matrix& yl,
+    void zoom_about_point (const std::string& mode, double x, double y,
+                           double factor, bool push_to_zoom_stack = true);
+    void zoom (const std::string& mode, double factor,
+               bool push_to_zoom_stack = true);
+    void zoom (const std::string& mode, const Matrix& xl, const Matrix& yl,
                bool push_to_zoom_stack = true);
-    void translate_view (double x0, double x1, double y0, double y1);
-    void rotate_view (double delta_az, double delta_el);
+
+    void translate_view (const std::string& mode,
+                         double x0, double x1, double y0, double y1,
+                         bool push_to_zoom_stack = true);
+
+    void pan (const std::string& mode, double factor,
+              bool push_to_zoom_stack = true);
+
+    void rotate3d (double x0, double x1, double y0, double y1,
+                   bool push_to_zoom_stack = true);
+
+    void rotate_view (double delta_az, double delta_el,
+                      bool push_to_zoom_stack = true);
+
     void unzoom (void);
-    void clear_zoom_stack (void);
+    void push_zoom_stack (void);
+    void clear_zoom_stack (bool do_unzoom = true);
 
     void update_units (const caseless_str& old_units);
 
@@ -3677,11 +3851,11 @@
     double fx, fy, fz;
     double xticklen, yticklen, zticklen;
     double xtickoffset, ytickoffset, ztickoffset;
-    bool x2Dtop, y2Dright, layer2Dtop;
+    bool x2Dtop, y2Dright, layer2Dtop, is2D;
     bool xySym, xyzSym, zSign, nearhoriz;
 
 #if HAVE_FREETYPE
-    // freetype renderer, used for calculation of text (tick labels) size
+    // FreeType renderer, used for calculation of text (tick labels) size
     ft_render text_renderer;
 #endif
 
@@ -3704,7 +3878,7 @@
       radio_property camerapositionmode , "{auto}|manual"
       array_property cameratarget m , Matrix (1, 3, 0.0)
       radio_property cameratargetmode , "{auto}|manual"
-      array_property cameraupvector m , Matrix ()
+      array_property cameraupvector m , Matrix (1, 3, 0.0)
       radio_property cameraupvectormode , "{auto}|manual"
       double_property cameraviewangle m , 10.0
       radio_property cameraviewanglemode , "{auto}|manual"
@@ -3730,6 +3904,7 @@
       any_property linestyleorder S , "-"
       double_property linewidth , 0.5
       radio_property minorgridlinestyle , "-|--|{:}|-.|none"
+      double_property mousewheelzoom , 0.5
       radio_property nextplot , "add|replacechildren|{replace}"
       array_property outerposition u , default_axes_outerposition ()
       array_property plotboxaspectratio mu , Matrix (1, 3, 1.0)
@@ -3743,7 +3918,7 @@
       handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
       // FIXME: uicontextmenu should be moved here.
       radio_property units SU , "{normalized}|inches|centimeters|points|pixels|characters"
-      array_property view u , Matrix ()
+      array_property view u , default_axes_view ()
       radio_property xaxislocation u , "{bottom}|top|zero"
       color_property xcolor , color_values (0, 0, 0)
       radio_property xdir u , "{normal}|reverse"
@@ -3802,6 +3977,8 @@
       row_vector_property xmtick h , Matrix ()
       row_vector_property ymtick h , Matrix ()
       row_vector_property zmtick h , Matrix ()
+      // hidden property for text rendering
+      double_property fontsize_points hgr , 0
    END_PROPERTIES
 
   protected:
@@ -3844,11 +4021,13 @@
     void update_layer (void) { update_axes_layout (); }
     void update_yaxislocation (void)
     {
+      sync_positions ();
       update_axes_layout ();
       update_ylabel_position ();
     }
     void update_xaxislocation (void)
     {
+      sync_positions ();
       update_axes_layout ();
       update_xlabel_position ();
     }
@@ -3865,16 +4044,19 @@
     {
       if (xticklabelmode.is ("auto"))
         calc_ticklabels (xtick, xticklabel, xscale.is ("log"));
+      sync_positions ();
     }
     void update_ytick (void)
     {
       if (yticklabelmode.is ("auto"))
         calc_ticklabels (ytick, yticklabel, yscale.is ("log"));
+      sync_positions ();
     }
     void update_ztick (void)
     {
       if (zticklabelmode.is ("auto"))
         calc_ticklabels (ztick, zticklabel, zscale.is ("log"));
+      sync_positions ();
     }
 
     void update_xtickmode (void)
@@ -3922,10 +4104,26 @@
     }
 
     void update_font (void);
-    void update_fontname (void) { update_font (); }
-    void update_fontsize (void) { update_font (); }
-    void update_fontangle (void) { update_font (); }
-    void update_fontweight (void) { update_font (); }
+    void update_fontname (void)
+    {
+      update_font ();
+      sync_positions ();
+    }
+    void update_fontsize (void)
+    {
+      update_font ();
+      sync_positions ();
+    }
+    void update_fontangle (void)
+    {
+      update_font ();
+      sync_positions ();
+    }
+    void update_fontweight (void)
+    {
+      update_font ();
+      sync_positions ();
+    }
 
     void update_outerposition (void)
     {
@@ -4044,7 +4242,7 @@
                             double min_pos, double max_neg,
                             bool logscale);
 
-    void update_xlim (bool do_clr_zoom = true)
+    void update_xlim ()
     {
       if (xtickmode.is ("auto"))
         calc_ticks_and_lims (xlim, xtick, xmtick, xlimmode.is ("auto"),
@@ -4056,13 +4254,10 @@
 
       update_xscale ();
 
-      if (do_clr_zoom)
-        zoom_stack.clear ();
-
       update_axes_layout ();
     }
 
-    void update_ylim (bool do_clr_zoom = true)
+    void update_ylim (void)
     {
       if (ytickmode.is ("auto"))
         calc_ticks_and_lims (ylim, ytick, ymtick, ylimmode.is ("auto"),
@@ -4074,9 +4269,6 @@
 
       update_yscale ();
 
-      if (do_clr_zoom)
-        zoom_stack.clear ();
-
       update_axes_layout ();
     }
 
@@ -4092,8 +4284,6 @@
 
       update_zscale ();
 
-      zoom_stack.clear ();
-
       update_axes_layout ();
     }
 
@@ -4106,7 +4296,6 @@
   axes (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p), default_properties ()
   {
-    xproperties.override_defaults (*this);
     xproperties.update_transform ();
   }
 
@@ -4139,7 +4328,6 @@
 
   void set_defaults (const std::string& mode)
   {
-    remove_all_listeners ();
     xproperties.set_defaults (*this, mode);
   }
 
@@ -4163,6 +4351,11 @@
     return default_properties.as_struct ("default");
   }
 
+  property_list get_defaults_list (void) const
+  {
+    return default_properties;
+  }
+
   base_properties& get_properties (void) { return xproperties; }
 
   const base_properties& get_properties (void) const { return xproperties; }
@@ -4176,6 +4369,14 @@
 
   void reset_default_properties (void);
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 protected:
   void initialize (const graphics_object& go);
 
@@ -4245,9 +4446,7 @@
 public:
   line (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~line (void) { }
 
@@ -4256,6 +4455,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -4307,13 +4514,13 @@
       radio_property fontangle u , "{normal}|italic|oblique"
       string_property fontname u , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize u , 10
-      radio_property fontunits , "inches|centimeters|normalized|{points}|pixels"
+      radio_property fontunits SU , "inches|centimeters|normalized|{points}|pixels"
       radio_property fontweight u , "light|{normal}|demi|bold"
       radio_property horizontalalignment mu , "{left}|center|right"
       radio_property interpreter u , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      double_property margin , 1
+      double_property margin , 2
       array_property position smu , Matrix (1, 3, 0.0)
       double_property rotation mu , 0
       text_label_property string u , ""
@@ -4333,13 +4540,15 @@
       radio_property horizontalalignmentmode hu , "{auto}|manual"
       radio_property verticalalignmentmode hu , "{auto}|manual"
       radio_property autopos_tag h , "{none}|xlabel|ylabel|zlabel|title"
+      // hidden property for text rendering
+      double_property fontsize_points hgr , 0
     END_PROPERTIES
 
     Matrix get_data_position (void) const;
     Matrix get_extent_matrix (void) const;
     const uint8NDArray& get_pixels (void) const { return pixels; }
 #if HAVE_FREETYPE
-    // freetype renderer, used for calculation of text size
+    // FreeType renderer, used for calculation of text size
     ft_render renderer;
 #endif
 
@@ -4397,6 +4606,7 @@
     void update_verticalalignment (void) { update_text_extent (); }
 
     void update_units (void);
+    void update_fontunits (const caseless_str& old_fontunits);
 
   private:
     std::string cached_units;
@@ -4411,7 +4621,6 @@
     : base_graphics_object (), xproperties (mh, p)
   {
     xproperties.set_clipping ("off");
-    xproperties.override_defaults (*this);
   }
 
   ~text (void) { }
@@ -4421,6 +4630,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -4443,18 +4660,21 @@
 
     octave_value get_color_data (void) const;
 
+    void initialize_data (void) { update_cdata (); }
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (image)
-      array_property alphadata u , Matrix ()
-      radio_property alphadatamapping al , "none|direct|{scaled}"
-      array_property cdata u , Matrix ()
+      array_property alphadata u , Matrix (1, 1, 1.0)
+      radio_property alphadatamapping al , "{none}|direct|scaled"
+      array_property cdata u , default_image_cdata ()
       radio_property cdatamapping al , "scaled|{direct}"
+      string_property displayname , ""
       radio_property erasemode , "{normal}|none|xor|background"
-      row_vector_property xdata u , Matrix ()
-      row_vector_property ydata u , Matrix ()
+      row_vector_property xdata mu , Matrix ()
+      row_vector_property ydata mu , Matrix ()
       // hidden properties for limit computation
       row_vector_property alim hlr , Matrix ()
       row_vector_property clim hlr , Matrix ()
@@ -4464,26 +4684,28 @@
       bool_property climinclude hlg , "on"
       bool_property xliminclude hl , "on"
       bool_property yliminclude hl , "on"
+      radio_property xdatamode ha , "{auto}|manual"
+      radio_property ydatamode ha , "{auto}|manual"
     END_PROPERTIES
 
   protected:
     void init (void)
-      {
-        xdata.add_constraint (2);
-        ydata.add_constraint (2);
-        cdata.add_constraint ("double");
-        cdata.add_constraint ("single");
-        cdata.add_constraint ("logical");
-        cdata.add_constraint ("uint8");
-        cdata.add_constraint ("uint16");
-        cdata.add_constraint ("int16");
-        cdata.add_constraint ("real");
-        cdata.add_constraint (dim_vector (-1, -1));
-        cdata.add_constraint (dim_vector (-1, -1, 3));
-        alphadata.add_constraint (dim_vector (-1, -1));
-        alphadata.add_constraint ("double");
-        alphadata.add_constraint ("uint8");
-      }
+    {
+      xdata.add_constraint (2);
+      ydata.add_constraint (2);
+      cdata.add_constraint ("double");
+      cdata.add_constraint ("single");
+      cdata.add_constraint ("logical");
+      cdata.add_constraint ("uint8");
+      cdata.add_constraint ("uint16");
+      cdata.add_constraint ("int16");
+      cdata.add_constraint ("real");
+      cdata.add_constraint (dim_vector (-1, -1));
+      cdata.add_constraint (dim_vector (-1, -1, 3));
+      alphadata.add_constraint (dim_vector (-1, -1));
+      alphadata.add_constraint ("double");
+      alphadata.add_constraint ("uint8");
+    }
 
   private:
     void update_alphadata (void)
@@ -4500,10 +4722,25 @@
         set_clim (cdata.get_limits ());
       else
         clim = cdata.get_limits ();
+
+      if (xdatamode.is ("auto"))
+        update_xdata ();
+
+      if (ydatamode.is ("auto"))
+        update_ydata ();
     }
 
     void update_xdata (void)
     {
+      if (xdata.get ().is_empty ())
+        set_xdatamode ("auto");
+
+      if (xdatamode.is ("auto"))
+        {
+          set_xdata (get_auto_xdata ());
+          set_xdatamode ("auto");
+        }
+
       Matrix limits = xdata.get_limits ();
       float dp = pixel_xsize ();
 
@@ -4514,6 +4751,15 @@
 
     void update_ydata (void)
     {
+      if (ydata.get ().is_empty ())
+        set_ydatamode ("auto");
+
+      if (ydatamode.is ("auto"))
+        {
+          set_ydata (get_auto_ydata ());
+          set_ydatamode ("auto");
+        }
+
       Matrix limits = ydata.get_limits ();
       float dp = pixel_ysize ();
 
@@ -4522,6 +4768,30 @@
       set_ylim (limits);
     }
 
+    Matrix get_auto_xdata (void)
+    {
+      dim_vector dv = get_cdata ().dims ();
+      Matrix data;
+      if (dv(1) > 0.)
+        {
+          data = Matrix (1, 2, 1);
+          data(1) = dv(1);
+        }
+      return data;
+    }
+
+    Matrix get_auto_ydata (void)
+    {
+      dim_vector dv = get_cdata ().dims ();
+      Matrix data;
+      if (dv(0) > 0.)
+        {
+          data = Matrix (1, 2, 1);
+          data(1) = dv(0);
+        }
+      return data;
+    }
+
     float pixel_size (octave_idx_type dim, const Matrix limits)
     {
       octave_idx_type l = dim - 1;
@@ -4558,7 +4828,7 @@
   image (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
   {
-    xproperties.override_defaults (*this);
+    xproperties.initialize_data ();
   }
 
   ~image (void) { }
@@ -4568,6 +4838,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -4580,6 +4858,14 @@
   public:
     octave_value get_color_data (void) const;
 
+    // Matlab allows incoherent data to be stored into patch properties.
+    // The patch should then be ignored by the renderer.
+    bool has_bad_data (std::string &msg) const
+    {
+      msg = bad_data_msg;
+      return ! msg.empty ();
+    }
+
     bool is_aliminclude (void) const
     { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
     std::string get_aliminclude (void) const
@@ -4609,9 +4895,9 @@
       double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp"))
       color_property facecolor , color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))
       radio_property facelighting , "{none}|flat|gouraud|phong"
-      array_property faces , Matrix ()
+      array_property faces u , default_patch_faces ()
       array_property facevertexalphadata , Matrix ()
-      array_property facevertexcdata , Matrix ()
+      array_property facevertexcdata u , Matrix ()
       // FIXME: interpreter is not a property of a Matlab patch.
       //        Octave uses this for legend() with the string displayname.
       radio_property interpreter , "{tex}|none|latex"
@@ -4624,11 +4910,11 @@
       radio_property normalmode , "{auto}|manual"
       double_property specularcolorreflectance , 1.0
       double_property specularexponent , 10.0
-      double_property specularstrength , 0.6
+      double_property specularstrength , 0.9
       array_property vertexnormals , Matrix ()
-      array_property vertices , Matrix ()
-      array_property xdata u , Matrix ()
-      array_property ydata u , Matrix ()
+      array_property vertices u , default_patch_vertices ()
+      array_property xdata u , default_patch_xdata ()
+      array_property ydata u , default_patch_ydata ()
       array_property zdata u , Matrix ()
 
       // hidden properties for limit computation
@@ -4662,17 +4948,67 @@
     }
 
   private:
-    void update_xdata (void) { set_xlim (xdata.get_limits ()); }
-    void update_ydata (void) { set_ylim (ydata.get_limits ()); }
-    void update_zdata (void) { set_zlim (zdata.get_limits ()); }
+    std::string bad_data_msg;
+
+    void update_faces (void) { update_data ();}
+
+    void update_vertices (void)  {  update_data ();}
+
+    void update_facevertexcdata (void) { update_data ();}
+
+    void update_fvc (void);
+
+    void update_xdata (void)
+    {
+      if (get_xdata ().is_empty ())
+        {
+          // For compatibility with matlab behavior,
+          // if x/ydata are set empty, silently empty other *data and
+          // faces properties while vertices remain unchanged.
+          set_ydata (Matrix ());
+          set_zdata (Matrix ());
+          set_cdata (Matrix ());
+          set_faces (Matrix ());
+        }
+      else
+        update_fvc ();
+
+      set_xlim (xdata.get_limits ());
+    }
+
+    void update_ydata (void)
+    {
+      if (get_ydata ().is_empty ())
+        {
+          set_xdata (Matrix ());
+          set_zdata (Matrix ());
+          set_cdata (Matrix ());
+          set_faces (Matrix ());
+        }
+      else
+        update_fvc ();
+
+      set_ylim (ydata.get_limits ());
+    }
+
+    void update_zdata (void)
+    {
+      update_fvc ();
+      set_zlim (zdata.get_limits ());
+    }
 
     void update_cdata (void)
     {
+      update_fvc ();
+
       if (cdatamapping_is ("scaled"))
         set_clim (cdata.get_limits ());
       else
         clim = cdata.get_limits ();
     }
+
+
+    void update_data (void);
   };
 
 private:
@@ -4681,9 +5017,7 @@
 public:
   patch (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~patch (void) { }
 
@@ -4692,6 +5026,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -4719,11 +5061,11 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (surface)
-      array_property alphadata u , Matrix ()
+      array_property alphadata u , Matrix (1, 1, 1.0)
       radio_property alphadatamapping l , "none|direct|{scaled}"
       double_property ambientstrength , 0.3
       radio_property backfacelighting , "unlit|lit|{reverselit}"
-      array_property cdata u , Matrix ()
+      array_property cdata u , default_surface_cdata ()
       radio_property cdatamapping al , "{scaled}|direct"
       string_property cdatasource , ""
       double_property diffusestrength , 0.6
@@ -4750,11 +5092,11 @@
       double_property specularexponent , 10
       double_property specularstrength , 0.9
       array_property vertexnormals u , Matrix ()
-      array_property xdata u , Matrix ()
+      array_property xdata u , default_surface_xdata ()
       string_property xdatasource , ""
-      array_property ydata u , Matrix ()
+      array_property ydata u , default_surface_ydata ()
       string_property ydatasource , ""
-      array_property zdata u , Matrix ()
+      array_property zdata u , default_surface_zdata ()
       string_property zdatasource , ""
 
       // hidden properties for limit computation
@@ -4784,6 +5126,7 @@
       alphadata.add_constraint ("uint8");
       alphadata.add_constraint (dim_vector (-1, -1));
       vertexnormals.add_constraint (dim_vector (-1, -1, 3));
+      vertexnormals.add_constraint (dim_vector (0, 0));
     }
 
   private:
@@ -4836,9 +5179,7 @@
 public:
   surface (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~surface (void) { }
 
@@ -4847,6 +5188,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -4908,9 +5257,7 @@
 public:
   hggroup (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~hggroup (void) { }
 
@@ -4925,6 +5272,14 @@
   void update_axis_limits (const std::string& axis_type,
                            const graphics_handle& h);
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 };
 
 // ---------------------------------------------------------------------
@@ -4957,7 +5312,7 @@
       bool_property enable , "on"
       color_property foregroundcolor , color_values (0, 0, 0)
       string_property label , ""
-      double_property position , 9
+      double_property position , 0
       bool_property separator , "off"
       // Octave-specific properties
       string_property fltk_label h , ""
@@ -4974,9 +5329,7 @@
 public:
   uimenu (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uimenu (void) { }
 
@@ -4986,6 +5339,14 @@
 
   bool valid_object (void) const { return true; }
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 };
 
 // ---------------------------------------------------------------------
@@ -4996,6 +5357,15 @@
   class OCTINTERP_API properties : public base_properties
   {
   public:
+  
+    void add_dependent_obj (graphics_handle gh) 
+    { dependent_obj_list.push_back (gh); }
+
+    // FIXME: the list may contain duplicates. 
+    //        Should we return only unique elements? 
+    const std::list<graphics_handle> get_dependent_obj_list (void) 
+    { return dependent_obj_list; }
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
@@ -5013,6 +5383,10 @@
       position.add_constraint (dim_vector (2, 1));
       visible.set (octave_value (true));
     }
+
+  private:
+    // List of objects that might depend on this uicontextmenu object
+    std::list<graphics_handle> dependent_obj_list;
   };
 
 private:
@@ -5021,11 +5395,9 @@
 public:
   uicontextmenu (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
-
-  ~uicontextmenu (void) { }
+  { }
+
+  ~uicontextmenu (void);
 
   base_properties& get_properties (void) { return xproperties; }
 
@@ -5033,6 +5405,14 @@
 
   bool valid_object (void) const { return true; }
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 };
 
 // ---------------------------------------------------------------------
@@ -5114,9 +5494,7 @@
 public:
   uicontrol (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uicontrol (void) { }
 
@@ -5125,6 +5503,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -5166,9 +5552,9 @@
 
   protected:
     void init (void)
-      {
-        position.add_constraint (dim_vector (1, 4));
-      }
+    {
+      position.add_constraint (dim_vector (1, 4));
+    }
 
     void update_units (const caseless_str& old_units);
     void update_fontunits (const caseless_str& old_units);
@@ -5181,9 +5567,7 @@
 public:
   uipanel (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uipanel (void) { }
 
@@ -5192,6 +5576,14 @@
   const base_properties& get_properties (void) const { return xproperties; }
 
   bool valid_object (void) const { return true; }
+
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
 };
 
 // ---------------------------------------------------------------------
@@ -5221,9 +5613,7 @@
 public:
   uitoolbar (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p), default_properties ()
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uitoolbar (void) { }
 
@@ -5271,6 +5661,11 @@
     return default_properties.as_struct ("default");
   }
 
+  property_list get_defaults_list (void) const
+  {
+    return default_properties;
+  }
+
   base_properties& get_properties (void) { return xproperties; }
 
   const base_properties& get_properties (void) const { return xproperties; }
@@ -5279,6 +5674,14 @@
 
   void reset_default_properties (void);
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 private:
   property_list default_properties;
 };
@@ -5319,9 +5722,7 @@
 public:
   uipushtool (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uipushtool (void) { }
 
@@ -5331,6 +5732,14 @@
 
   bool valid_object (void) const { return true; }
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 };
 
 // ---------------------------------------------------------------------
@@ -5372,9 +5781,7 @@
 public:
   uitoggletool (const graphics_handle& mh, const graphics_handle& p)
     : base_graphics_object (), xproperties (mh, p)
-  {
-    xproperties.override_defaults (*this);
-  }
+  { }
 
   ~uitoggletool (void) { }
 
@@ -5384,16 +5791,24 @@
 
   bool valid_object (void) const { return true; }
 
+  bool has_readonly_property (const caseless_str& pname) const
+  {
+    bool retval = xproperties.has_readonly_property (pname);
+    if (! retval)
+      retval = base_properties::has_readonly_property (pname);
+    return retval;
+  }
+
 };
 
 // ---------------------------------------------------------------------
 
 octave_value
-get_property_from_handle (double handle, const std::string &property,
-                          const std::string &func);
+get_property_from_handle (double handle, const std::string& property,
+                          const std::string& func);
 bool
-set_property_in_handle (double handle, const std::string &property,
-                        const octave_value &arg, const std::string &func);
+set_property_in_handle (double handle, const std::string& property,
+                        const octave_value& arg, const std::string& func);
 
 // ---------------------------------------------------------------------
 
@@ -5864,12 +6279,12 @@
   void do_execute_callback (const graphics_handle& h, const octave_value& cb,
                             const octave_value& data);
 
-  void do_post_callback (const graphics_handle& h, const std::string name,
+  void do_post_callback (const graphics_handle& h, const std::string& name,
                          const octave_value& data);
 
   void do_post_function (graphics_event::event_fcn fcn, void* fcn_data);
 
-  void do_post_set (const graphics_handle& h, const std::string name,
+  void do_post_set (const graphics_handle& h, const std::string& name,
                     const octave_value& value, bool notify_toolkit = true);
 
   int do_process_events (bool force = false);
--- a/libinterp/corefcn/gripes.cc
+++ b/libinterp/corefcn/gripes.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -234,8 +234,8 @@
 void
 gripe_warn_complex_cmp (void)
 {
-  warning_with_id ("Octave:matlab-incompatible",
-                   "potential Matlab compatibility problem: comparing complex numbers");
+  warning_with_id ("Octave:language-extension",
+                   "comparing complex numbers is not supported in Matlab");
 }
 
 void
@@ -245,3 +245,11 @@
   error ("%s: support for %s was disabled when %s was built",
          func.c_str (), feature.c_str (), pkg.c_str ());
 }
+
+void
+gripe_data_file_in_path (const std::string& fcn, const std::string& file)
+{
+  warning_with_id ("Octave:data-file-in-path",
+                   "%s: '%s' found by searching load path",
+                   fcn.c_str (), file.c_str ());
+}
--- a/libinterp/corefcn/gripes.h
+++ b/libinterp/corefcn/gripes.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -131,4 +131,8 @@
 extern OCTINTERP_API void
 gripe_disabled_feature (const std::string& func, const std::string& feature,
                         const std::string& pkg="Octave");
+
+extern OCTINTERP_API void
+gripe_data_file_in_path (const std::string& fcn, const std::string& file);
+
 #endif
--- a/libinterp/corefcn/help.cc
+++ b/libinterp/corefcn/help.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -40,6 +40,7 @@
 #include "file-ops.h"
 #include "file-stat.h"
 #include "oct-env.h"
+#include "oct-locbuf.h"
 #include "str-vec.h"
 
 #include <defaults.h>
@@ -97,8 +98,8 @@
 typedef map_type::value_type pair_type;
 typedef map_type::const_iterator map_iter;
 
-template<typename T, std::size_t z>
-std::size_t
+template<typename T, size_t z>
+size_t
 size (T const (&)[z])
 {
   return z;
@@ -107,55 +108,55 @@
 const static pair_type operators[] =
 {
   pair_type ("!",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} !\n\
 Logical 'not' operator.\n\
 @seealso{~, not}\n\
 @end deftypefn"),
 
   pair_type ("~",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ~\n\
 Logical 'not' operator.\n\
 @seealso{!, not}\n\
 @end deftypefn"),
 
   pair_type ("!=",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} !=\n\
 Logical 'not equals' operator.\n\
 @seealso{~=, ne}\n\
 @end deftypefn"),
 
   pair_type ("~=",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ~=\n\
 Logical 'not equals' operator.\n\
 @seealso{!=, ne}\n\
 @end deftypefn"),
 
   pair_type ("\"",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} \"\n\
 String delimiter.\n\
 @end deftypefn"),
 
   pair_type ("#",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} #\n\
 Begin comment character.\n\
 @seealso{%, #@\\{}\n\
 @end deftypefn"),
 
   pair_type ("%",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} %\n\
 Begin comment character.\n\
 @seealso{#, %@\\{}\n\
 @end deftypefn"),
 
   pair_type ("#{",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} #@{\n\
 Begin block comment.  There must be nothing else, other than\n\
 whitespace, in the line both before and after @code{#@{}.\n\
@@ -164,7 +165,7 @@
 @end deftypefn"),
 
   pair_type ("%{",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} %@{\n\
 Begin block comment.  There must be nothing else, other than\n\
 whitespace, in the line both before and after @code{%@{}.\n\
@@ -173,7 +174,7 @@
 @end deftypefn"),
 
   pair_type ("#}",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} #@}\n\
 Close block comment.  There must be nothing else, other than\n\
 whitespace, in the line both before and after @code{#@}}.\n\
@@ -182,7 +183,7 @@
 @end deftypefn"),
 
   pair_type ("%}",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} %@}\n\
 Close block comment.  There must be nothing else, other than\n\
 whitespace, in the line both before and after @code{%@}}.\n\
@@ -191,27 +192,27 @@
 @end deftypefn"),
 
   pair_type ("...",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ...\n\
 Continuation marker.  Joins current line with following line.\n\
 @end deftypefn"),
 
   pair_type ("&",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} &\n\
 Element by element logical 'and' operator.\n\
 @seealso{&&, and}\n\
 @end deftypefn"),
 
   pair_type ("&&",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} &&\n\
 Logical 'and' operator (with short-circuit evaluation).\n\
 @seealso{&, and}\n\
 @end deftypefn"),
 
   pair_type ("'",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} '\n\
 Matrix transpose operator.  For complex matrices, computes the\n\
 complex conjugate (Hermitian) transpose.\n\
@@ -223,26 +224,26 @@
 @end deftypefn"),
 
   pair_type ("(",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} (\n\
 Array index or function argument delimiter.\n\
 @end deftypefn"),
 
   pair_type (")",
-    "-*- texinfo -*-\n\
-@deftypefn {Operator} {} )\n\
+  "-*- texinfo -*-\n\
+@deftypefn {Operator} {})\n\
 Array index or function argument delimiter.\n\
 @end deftypefn"),
 
   pair_type ("*",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} *\n\
 Multiplication operator.\n\
 @seealso{.*, times}\n\
 @end deftypefn"),
 
   pair_type ("**",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} **\n\
 Power operator.  This may return complex results for real inputs.  Use\n\
 @code{realsqrt}, @code{cbrt}, @code{nthroot}, or @code{realroot} to obtain\n\
@@ -251,7 +252,7 @@
 @end deftypefn"),
 
   pair_type ("^",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ^\n\
 Power operator.  This may return complex results for real inputs.  Use\n\
 @code{realsqrt}, @code{cbrt}, @code{nthroot}, or @code{realroot} to obtain\n\
@@ -260,14 +261,14 @@
 @end deftypefn"),
 
   pair_type ("+",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} +\n\
 Addition operator.\n\
 @seealso{plus}\n\
 @end deftypefn"),
 
   pair_type ("++",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ++\n\
 Increment operator.  As in C, may be applied as a prefix or postfix\n\
 operator.\n\
@@ -275,20 +276,20 @@
 @end deftypefn"),
 
   pair_type (",",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ,\n\
 Array index, function argument, or command separator.\n\
 @end deftypefn"),
 
   pair_type ("-",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} -\n\
 Subtraction or unary negation operator.\n\
 @seealso{minus}\n\
 @end deftypefn"),
 
   pair_type ("--",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} --\n\
 Decrement operator.  As in C, may be applied as a prefix or postfix\n\
 operator.\n\
@@ -296,7 +297,7 @@
 @end deftypefn"),
 
   pair_type (".'",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} .'\n\
 Matrix transpose operator.  For complex matrices, computes the\n\
 transpose, @emph{not} the complex conjugate transpose.\n\
@@ -304,14 +305,14 @@
 @end deftypefn"),
 
   pair_type (".*",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} .*\n\
 Element by element multiplication operator.\n\
 @seealso{*, times}\n\
 @end deftypefn"),
 
   pair_type (".**",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} .*\n\
 Element by element power operator.  If several complex results are possible,\n\
 returns the one with smallest non-negative argument (angle).  Use\n\
@@ -321,7 +322,7 @@
 @end deftypefn"),
 
   pair_type (".^",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} .^\n\
 Element by element power operator.  If several complex results are possible,\n\
 returns the one with smallest non-negative argument (angle).  Use\n\
@@ -331,110 +332,110 @@
 @end deftypefn"),
 
   pair_type ("./",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ./\n\
 Element by element right division operator.\n\
 @seealso{/, .\\, rdivide, mrdivide}\n\
 @end deftypefn"),
 
   pair_type ("/",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} /\n\
 Right division operator.\n\
 @seealso{./, \\, rdivide, mrdivide}\n\
 @end deftypefn"),
 
   pair_type (".\\",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} .\\\n\
 Element by element left division operator.\n\
 @seealso{\\, ./, rdivide, mrdivide}\n\
 @end deftypefn"),
 
   pair_type ("\\",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} \\\n\
 Left division operator.\n\
 @seealso{.\\, /, ldivide, mldivide}\n\
 @end deftypefn"),
 
   pair_type (":",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} :\n\
 Select entire rows or columns of matrices.\n\
 @end deftypefn"),
 
   pair_type (";",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ;\n\
 Array row or command separator.\n\
 @seealso{,}\n\
 @end deftypefn"),
 
   pair_type ("<",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} <\n\
 'Less than' operator.\n\
 @seealso{lt}\n\
 @end deftypefn"),
 
   pair_type ("<=",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} <=\n\
 'Less than' or 'equals' operator.\n\
 @seealso{le}\n\
 @end deftypefn"),
 
   pair_type ("=",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} =\n\
 Assignment operator.\n\
 @end deftypefn"),
 
   pair_type ("==",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ==\n\
 Equality test operator.\n\
 @seealso{eq}\n\
 @end deftypefn"),
 
   pair_type (">",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} >\n\
 'Greater than' operator.\n\
 @seealso{gt}\n\
 @end deftypefn"),
 
   pair_type (">=",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} >=\n\
 'Greater than' or 'equals' operator.\n\
 @seealso{ge}\n\
 @end deftypefn"),
 
   pair_type ("[",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} [\n\
 Return list delimiter.\n\
 @seealso{]}\n\
 @end deftypefn"),
 
   pair_type ("]",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ]\n\
 Return list delimiter.\n\
 @seealso{[}\n\
 @end deftypefn"),
 
   pair_type ("|",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} |\n\
 Element by element logical 'or' operator.\n\
 @seealso{||, or}\n\
 @end deftypefn"),
 
   pair_type ("||",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Operator} {} ||\n\
 Logical 'or' (with short-circuit evaluation) operator.\n\
 @seealso{|, or}\n\
@@ -444,14 +445,14 @@
 const static pair_type keywords[] =
 {
   pair_type ("break",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} break\n\
 Exit the innermost enclosing do, while or for loop.\n\
 @seealso{do, while, for, parfor, continue}\n\
 @end deftypefn"),
 
   pair_type ("case",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn  {Keyword} {} case @var{value}\n\
 @deftypefnx {Keyword} {} case @{@var{value}, @dots{}@}\n\
 A case statement in a switch.  Octave cases are exclusive and do not\n\
@@ -461,7 +462,7 @@
 @end deftypefn"),
 
   pair_type ("catch",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn  {Keyword} {} catch\n\
 @deftypefnx {Keyword} {} catch @var{value}\n\
 Begin the cleanup part of a try-catch block.\n\
@@ -469,14 +470,14 @@
 @end deftypefn"),
 
   pair_type ("continue",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} continue\n\
 Jump to the end of the innermost enclosing do, while or for loop.\n\
 @seealso{do, while, for, parfor, break}\n\
 @end deftypefn"),
 
   pair_type ("do",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} do\n\
 Begin a do-until loop.  This differs from a do-while loop in that the\n\
 body of the loop is executed at least once.\n\
@@ -493,21 +494,21 @@
 @end deftypefn"),
 
   pair_type ("else",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} else\n\
 Alternate action for an if block.  See @code{if} for an example.\n\
 @seealso{if}\n\
 @end deftypefn"),
 
   pair_type ("elseif",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} elseif (@var{condition})\n\
 Alternate conditional test for an if block.  See @code{if} for an example.\n\
 @seealso{if}\n\
 @end deftypefn"),
 
   pair_type ("end",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} end\n\
 Mark the end of any @code{for}, @code{parfor}, @code{if}, @code{do},\n\
 @code{while}, @code{function}, @code{switch}, @code{try}, or\n\
@@ -516,63 +517,63 @@
 @end deftypefn"),
 
   pair_type ("end_try_catch",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} end_try_catch\n\
 Mark the end of an @code{try-catch} block.\n\
 @seealso{try, catch}\n\
 @end deftypefn"),
 
   pair_type ("end_unwind_protect",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} end_unwind_protect\n\
 Mark the end of an unwind_protect block.\n\
 @seealso{unwind_protect}\n\
 @end deftypefn"),
 
   pair_type ("endfor",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endfor\n\
 Mark the end of a for loop.  See @code{for} for an example.\n\
 @seealso{for}\n\
 @end deftypefn"),
 
   pair_type ("endfunction",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endfunction\n\
 Mark the end of a function.\n\
 @seealso{function}\n\
 @end deftypefn"),
 
   pair_type ("endif",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endif\n\
 Mark the end of an if block.  See @code{if} for an example.\n\
 @seealso{if}\n\
 @end deftypefn"),
 
   pair_type ("endparfor",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endparfor\n\
 Mark the end of a parfor loop.  See @code{parfor} for an example.\n\
 @seealso{parfor}\n\
 @end deftypefn"),
 
   pair_type ("endswitch",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endswitch\n\
 Mark the end of a switch block.  See @code{switch} for an example.\n\
 @seealso{switch}\n\
 @end deftypefn"),
 
   pair_type ("endwhile",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} endwhile\n\
 Mark the end of a while loop.  See @code{while} for an example.\n\
 @seealso{do, while}\n\
 @end deftypefn"),
 
   pair_type ("for",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} for @var{i} = @var{range}\n\
 Begin a for loop.\n\
 \n\
@@ -587,7 +588,7 @@
 @end deftypefn"),
 
   pair_type ("function",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn  {Keyword} {} function @var{outputs} = function (@var{input}, @dots{})\n\
 @deftypefnx {Keyword} {} function {} function (@var{input}, @dots{})\n\
 @deftypefnx {Keyword} {} function @var{outputs} = function\n\
@@ -597,7 +598,7 @@
 @end deftypefn"),
 
   pair_type ("global",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} global @var{var}\n\
 Declare variables to have global scope.\n\
 \n\
@@ -613,7 +614,7 @@
 @end deftypefn"),
 
   pair_type ("if",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn  {Keyword} {} if (@var{cond}) @dots{} endif\n\
 @deftypefnx {Keyword} {} if (@var{cond}) @dots{} else @dots{} endif\n\
 @deftypefnx {Keyword} {} if (@var{cond}) @dots{} elseif (@var{cond}) @dots{} endif\n\
@@ -636,14 +637,14 @@
 @end deftypefn"),
 
   pair_type ("otherwise",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} otherwise\n\
 The default statement in a switch block (similar to else in an if block).\n\
 @seealso{switch}\n\
 @end deftypefn"),
 
   pair_type ("parfor",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn  {Keyword} {} parfor @var{i} = @var{range}\n\
 @deftypefnx {Keyword} {} parfor (@var{i} = @var{range}, @var{maxproc})\n\
 Begin a for loop that may execute in parallel.\n\
@@ -659,7 +660,7 @@
 @end deftypefn"),
 
   pair_type ("persistent",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} persistent @var{var}\n\
 Declare variables as persistent.  A variable that has been declared\n\
 persistent within a function will retain its contents in memory between\n\
@@ -670,21 +671,21 @@
 @end deftypefn"),
 
   pair_type ("return",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} return\n\
 Return from a function.\n\
 @seealso{function}\n\
 @end deftypefn"),
 
   pair_type ("static",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} static\n\
 This statement has been deprecated in favor of @code{persistent}.\n\
 @seealso{persistent}\n\
 @end deftypefn"),
 
   pair_type ("switch",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} switch @var{statement}\n\
 Begin a switch block.\n\
 \n\
@@ -706,7 +707,7 @@
 @end deftypefn"),
 
   pair_type ("try",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} try\n\
 Begin a try-catch block.\n\
 \n\
@@ -718,14 +719,14 @@
 @end deftypefn"),
 
   pair_type ("until",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} until (@var{cond})\n\
 End a do-until loop.  See @code{do} for an example.\n\
 @seealso{do}\n\
 @end deftypefn"),
 
   pair_type ("unwind_protect",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} unwind_protect\n\
 Begin an unwind_protect block.\n\
 \n\
@@ -739,28 +740,28 @@
 @end deftypefn"),
 
   pair_type ("unwind_protect_cleanup",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} unwind_protect_cleanup\n\
 Begin the cleanup section of an unwind_protect block.\n\
 @seealso{unwind_protect}\n\
 @end deftypefn"),
 
   pair_type ("varargin",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} varargin\n\
 Pass an arbitrary number of arguments into a function.\n\
 @seealso{varargout, nargin, isargout, nargout, nthargout}\n\
 @end deftypefn"),
 
   pair_type ("varargout",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} varargout\n\
 Pass an arbitrary number of arguments out of a function.\n\
 @seealso{varargin, nargin, isargout, nargout, nthargout}\n\
 @end deftypefn"),
 
   pair_type ("while",
-    "-*- texinfo -*-\n\
+  "-*- texinfo -*-\n\
 @deftypefn {Keyword} {} while\n\
 Begin a while loop.\n\
 \n\
@@ -931,10 +932,21 @@
   std::string w;
   std::string f;
 
-  (raw_help_from_symbol_table (nm, h, w, symbol_found)
-   || raw_help_from_file (nm, h, f, symbol_found)
-   || raw_help_from_map (nm, h, operators_map, symbol_found)
-   || raw_help_from_map (nm, h, keywords_map, symbol_found));
+  bool found;
+
+  found = raw_help_from_symbol_table (nm, h, w, symbol_found);
+  if (! found && ! error_state)
+    {
+      found = raw_help_from_file (nm, h, f, symbol_found);
+      if (! found && ! error_state)
+        {
+          found = raw_help_from_map (nm, h, operators_map, symbol_found);
+          if (! found && ! error_state)
+            {
+              raw_help_from_map (nm, h, keywords_map, symbol_found);
+            }
+        }
+    }
 
   return h;
 }
@@ -1078,7 +1090,7 @@
 
   if (args.length () == 1)
     {
-      const std::string name = args (0).string_value ();
+      const std::string name = args(0).string_value ();
 
       if (! error_state)
         {
@@ -1173,7 +1185,7 @@
 
 DEFUN (__operators__, , ,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __operators__ ()\n\
+@deftypefn {Function File} {} __operators__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -1185,7 +1197,7 @@
 
 DEFUN (__keywords__, , ,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __keywords__ ()\n\
+@deftypefn {Function File} {} __keywords__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -1197,7 +1209,7 @@
 
 DEFUN (__builtins__, , ,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __builtins__ ()\n\
+@deftypefn {Function File} {} __builtins__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -1365,27 +1377,24 @@
 
   if (args.length () == 0)
     retval = Cell (ffl.append (afl));
-  else
+  else if (args(0).is_string ())
     {
-      std::string dir = args (0).string_value ();
+      std::string dir = args(0).string_value ();
+
+      string_vector fl = load_path::files (dir, true);
 
       if (! error_state)
         {
-          string_vector fl = load_path::files (dir, true);
+          // Return a sorted list with unique entries (in case of
+          // .m and .oct versions of the same function in a given
+          // directory, for example).
+          fl.sort (true);
 
-          if (! error_state)
-            {
-              // Return a sorted list with unique entries (in case of
-              // .m and .oct versions of the same function in a given
-              // directory, for example).
-              fl.sort (true);
-
-              retval = Cell (fl);
-            }
+          retval = Cell (fl);
         }
-      else
-        error ("__list_functions__: DIRECTORY argument must be a string");
     }
+  else
+    error ("__list_functions__: DIRECTORY argument must be a string");
 
   return retval;
 }
--- a/libinterp/corefcn/help.h
+++ b/libinterp/corefcn/help.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/hess.cc
+++ b/libinterp/corefcn/hess.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -58,8 +58,9 @@
 @end ifnottex\n\
 \n\
 The Hessenberg decomposition is usually used as the first step in an\n\
-eigenvalue computation, but has other applications as well (see Golub,\n\
-Nash, and Van Loan, IEEE Transactions on Automatic Control, 1979).\n\
+eigenvalue computation, but has other applications as well\n\
+(see @nospell{Golub, Nash, and Van Loan},\n\
+IEEE Transactions on Automatic Control, 1979).\n\
 @seealso{eig, chol, lu, qr, qz, schur, svd}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/hex2num.cc
+++ b/libinterp/corefcn/hex2num.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 David Bateman
+Copyright (C) 2008-2015 David Bateman
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/hook-fcn.cc
+++ b/libinterp/corefcn/hook-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/hook-fcn.h
+++ b/libinterp/corefcn/hook-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/input.cc
+++ b/libinterp/corefcn/input.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -99,10 +99,11 @@
 // Character to append after successful command-line completion attempts.
 static char Vcompletion_append_char = ' ';
 
-// TRUE means this is an interactive shell.
+// TRUE means this is an interactive shell (either forced or not)
 bool interactive = false;
 
 // TRUE means the user forced this shell to be interactive (-i).
+// FALSE means the shell would be interactive, independent of user settings.
 bool forced_interactive = false;
 
 // TRUE after a call to completion_matches.
@@ -196,7 +197,7 @@
 {
   Vlast_prompt_time.stamp ();
 
-  if (Vdrawnow_requested && (interactive || forced_interactive))
+  if (Vdrawnow_requested && interactive)
     {
       feval ("drawnow");
 
@@ -226,7 +227,7 @@
   // Process pre input event hook function prior to flushing output and
   // printing the prompt.
 
-  if (interactive || forced_interactive)
+  if (interactive)
     {
       if (! Vdebugging)
         octave_link::exit_debugger_event ();
@@ -292,7 +293,7 @@
   // Process post input event hook function after the internal history
   // list has been updated.
 
-  if (interactive || forced_interactive)
+  if (interactive)
     octave_link::post_input_event ();
 
   return retval;
@@ -508,10 +509,12 @@
 {
   unwind_protect frame;
 
+  bool silent = tree_evaluator::quiet_breakpoint_flag;
+  tree_evaluator::quiet_breakpoint_flag = false;
+
   octave_user_code *caller = octave_call_stack::caller_user_code ();
   std::string nm;
-
-  int curr_debug_line = octave_call_stack::current_line ();
+  int curr_debug_line;
 
   bool have_file = false;
 
@@ -523,9 +526,11 @@
         nm = caller->name ();
       else
         have_file = true;
+
+      curr_debug_line = octave_call_stack::caller_user_code_line ();
     }
   else
-    curr_debug_line = -1;
+    curr_debug_line = octave_call_stack::current_line ();
 
   std::ostringstream buf;
 
@@ -543,10 +548,13 @@
           // that we are stopped on the no-op command that marks the
           // end of a function or script.
 
-          buf << "stopped in " << nm;
+          if (! silent)
+            {
+              buf << "stopped in " << nm;
 
-          if (curr_debug_line > 0)
-            buf << " at line " << curr_debug_line;
+              if (curr_debug_line > 0)
+                buf << " at line " << curr_debug_line;
+            }
 
           if (have_file)
             {
@@ -557,15 +565,21 @@
               frame.add_fcn (execute_in_debugger_handler,
                              std::pair<std::string, int> (nm, curr_debug_line));
 
-              std::string line_buf
-                = get_file_line (nm, curr_debug_line);
+              if (! silent)
+                {
+                  std::string line_buf
+                    = get_file_line (nm, curr_debug_line);
 
-              if (! line_buf.empty ())
-                buf << "\n" << curr_debug_line << ": " << line_buf;
+                  if (! line_buf.empty ())
+                    buf << "\n" << curr_debug_line << ": " << line_buf;
+                }
             }
         }
     }
 
+  if (silent)
+    command_editor::erase_empty_line (true);
+
   std::string msg = buf.str ();
 
   if (! msg.empty ())
@@ -574,8 +588,10 @@
   frame.protect_var (VPS1);
   VPS1 = prompt;
 
-  if (! (interactive || forced_interactive))
+  if (! interactive)
     {
+      frame.protect_var (interactive);
+      interactive = true;
       frame.protect_var (forced_interactive);
       forced_interactive = true;
     }
@@ -749,10 +765,10 @@
 @noindent\n\
 and waits for the user to enter a value.  The string entered by the user\n\
 is evaluated as an expression, so it may be a literal constant, a\n\
-variable name, or any other valid expression.\n\
+variable name, or any other valid Octave code.\n\
 \n\
-Currently, @code{input} only returns one value, regardless of the number\n\
-of values produced by the evaluation of the expression.\n\
+The number of return arguments, their size, and their class depend on the\n\
+expression entered.\n\
 \n\
 If you are only interested in getting a literal string value, you can\n\
 call @code{input} with the character string @qcode{\"s\"} as the second\n\
@@ -771,7 +787,7 @@
   int nargin = args.length ();
 
   if (nargin == 1 || nargin == 2)
-    retval = get_user_input (args, nargout);
+    retval = get_user_input (args, std::max (nargout, 1));
   else
     print_usage ();
 
@@ -821,11 +837,11 @@
 
       if (nargin == 1)
         {
-          prompt = args(0).string_value ();
-
-          if (error_state)
+          if (args(0).is_string ())
+            prompt = args(0).string_value ();
+          else
             {
-              error ("yes_or_no: PROMPT must be a character string");
+              error ("yes_or_no: PROMPT must be a string");
               return retval;
             }
         }
@@ -909,6 +925,7 @@
       octave_call_stack::goto_frame_relative (0);
 
       tree_evaluator::debug_mode = true;
+      tree_evaluator::quiet_breakpoint_flag = false;
 
       tree_evaluator::current_frame = octave_call_stack::current_frame ();
 
@@ -1004,6 +1021,15 @@
   return retval;
 }
 
+DEFUN (__echostate__, , ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{state} =} __echostate__ ()\n\
+Undocumented internal function\n\
+@end deftypefn")
+{
+  return ovl (Vecho_executing_commands == ECHO_SCRIPTS);
+}
+
 DEFUN (completion_matches, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} completion_matches (@var{hint})\n\
@@ -1184,7 +1210,7 @@
           retval = hook_fcn.id ();
         }
       else
-        error ("add_input_event_hook: expecting function handle or character string as first argument");
+        error ("add_input_event_hook: FCN must be a function handle or string");
     }
   else
     print_usage ();
@@ -1409,11 +1435,12 @@
 DEFUN (filemarker, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} filemarker ()\n\
-@deftypefnx {Built-in Function} {} filemarker (@var{new_val})\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} filemarker (@var{new_val})\n\
 @deftypefnx {Built-in Function} {} filemarker (@var{new_val}, \"local\")\n\
-Query or set the character used to separate filename from the\n\
-the subfunction names contained within the file.  This can be used in\n\
-a generic manner to interact with subfunctions.  For example,\n\
+Query or set the character used to separate the filename from the subfunction\n\
+names contained within the file.  By default this is the character @samp{>}.\n\
+This can be used in a generic manner to interact with subfunctions.\n\
+For example,\n\
 \n\
 @example\n\
 help ([\"myfunc\", filemarker, \"mysubfunc\"])\n\
@@ -1421,8 +1448,10 @@
 \n\
 @noindent\n\
 returns the help string associated with the subfunction @code{mysubfunc}\n\
-of the function @code{myfunc}.  Another use of @code{filemarker} is when\n\
-debugging it allows easier placement of breakpoints within subfunctions.\n\
+located in the file @file{myfunc.m}.\n\
+\n\
+@code{filemarker} is also useful during debugging for placing breakpoints\n\
+within subfunctions or nested functions.\n\
 For example,\n\
 \n\
 @example\n\
@@ -1433,7 +1462,7 @@
 will set a breakpoint at the first line of the subfunction @code{mysubfunc}.\n\
 \n\
 When called from inside a function with the @qcode{\"local\"} option, the\n\
-variable is changed locally for the function and any subroutines it calls.  \n\
+variable is changed locally for the function and any subroutines it calls.\n\
 The original variable value is restored when exiting the function.\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/input.h
+++ b/libinterp/corefcn/input.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -38,10 +38,11 @@
 
 extern OCTINTERP_API FILE *get_input_from_stdin (void);
 
-// TRUE means this is an interactive shell.
+// TRUE means this is an interactive shell (forced or not)
 extern bool interactive;
 
 // TRUE means the user forced this shell to be interactive (-i).
+// FALSE means the shell would be interactive, independent of user settings.
 extern bool forced_interactive;
 
 // TRUE after a call to completion_matches.
--- a/libinterp/corefcn/inv.cc
+++ b/libinterp/corefcn/inv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -227,8 +227,7 @@
         }
 
       if (nargout < 2 && (info == -1 || rcond_plus_one_eq_one))
-        warning ("inverse: matrix singular to machine precision, rcond = %g",
-                 (isfloat ? frcond : rcond));
+        gripe_singular_matrix (isfloat ? frcond : rcond);
     }
 
   return retval;
--- a/libinterp/corefcn/jit-ir.cc
+++ b/libinterp/corefcn/jit-ir.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/jit-ir.h
+++ b/libinterp/corefcn/jit-ir.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -566,7 +566,7 @@
 
   void replace_in_phi (jit_block *ablock, jit_block *with);
 
-  // we have a new internal list, but we want to stay compatable with jit_value
+  // we have a new internal list, but we want to stay compatible with jit_value
   jit_use *first_use (void) const { return jit_value::first_use (); }
 
   size_t use_count (void) const { return jit_value::use_count (); }
--- a/libinterp/corefcn/jit-typeinfo.cc
+++ b/libinterp/corefcn/jit-typeinfo.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -34,7 +34,12 @@
 
 #include "jit-typeinfo.h"
 
+#ifdef HAVE_LLVM_IR_VERIFIER_H
+#include <llvm/IR/Verifier.h>
+#else
 #include <llvm/Analysis/Verifier.h>
+#endif
+
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 
 #ifdef HAVE_LLVM_IR_FUNCTION_H
@@ -916,7 +921,7 @@
 
 bool
 jit_operation::signature_cmp
-::operator() (const signature_vec *lhs, const signature_vec *rhs)
+::operator() (const signature_vec *lhs, const signature_vec *rhs) const
 {
   const signature_vec& l = *lhs;
   const signature_vec& r = *rhs;
@@ -1247,6 +1252,8 @@
   destroy_fn.add_overload (create_identity(index));
   destroy_fn.add_overload (create_identity(complex));
 
+  // -------------------- scalar related operations --------------------
+
   // now for binary scalar operations
   add_binary_op (scalar, octave_value::op_add, llvm::Instruction::FAdd);
   add_binary_op (scalar, octave_value::op_sub, llvm::Instruction::FSub);
@@ -1335,6 +1342,7 @@
     val = builder.CreateFMul (val, mone);
     fn.do_return (builder, val);
   }
+  unary_ops[octave_value::op_uminus].add_overload (fn);
 
   fn = create_identity (scalar);
   unary_ops[octave_value::op_uplus].add_overload (fn);
@@ -1842,7 +1850,7 @@
   register_generic ("cos", matrix, matrix);
 
   add_builtin ("exp");
-  register_intrinsic ("exp", llvm::Intrinsic::cos, scalar, scalar);
+  register_intrinsic ("exp", llvm::Intrinsic::exp, scalar, scalar);
   register_generic ("exp", matrix, matrix);
 
   add_builtin ("balance");
--- a/libinterp/corefcn/jit-typeinfo.h
+++ b/libinterp/corefcn/jit-typeinfo.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -40,7 +40,7 @@
 // Operations are defined and implemented in jit_typeinfo.  Eventually they
 // should be moved elsewhere. (just like with octave_typeinfo)
 
-// jit_range is compatable with the llvm range structure
+// jit_range is compatible with the llvm range structure
 struct
 jit_range
 {
@@ -63,7 +63,7 @@
 
 std::ostream& operator << (std::ostream& os, const jit_range& rng);
 
-// jit_array is compatable with the llvm array/matrix structures
+// jit_array is compatible with the llvm array/matrix structures
 template <typename T, typename U>
 struct
 jit_array
@@ -372,7 +372,7 @@
 
   struct signature_cmp
   {
-    bool operator() (const signature_vec *lhs, const signature_vec *rhs);
+    bool operator() (const signature_vec *lhs, const signature_vec *rhs) const;
   };
 
   typedef std::map<const signature_vec *, jit_function *, signature_cmp>
--- a/libinterp/corefcn/jit-util.cc
+++ b/libinterp/corefcn/jit-util.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/jit-util.h
+++ b/libinterp/corefcn/jit-util.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -42,8 +42,15 @@
 {
   class Value;
   class Module;
+#ifdef LEGACY_PASSMANAGER
+  namespace legacy {
+    class FunctionPassManager;
+    class PassManager;
+  }
+#else
   class FunctionPassManager;
   class PassManager;
+#endif
   class ExecutionEngine;
   class Function;
   class BasicBlock;
--- a/libinterp/corefcn/kron.cc
+++ b/libinterp/corefcn/kron.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -55,8 +55,10 @@
   assert (a.ndims () == 2);
   assert (b.ndims () == 2);
 
-  octave_idx_type nra = a.rows (), nrb = b.rows ();
-  octave_idx_type nca = a.cols (), ncb = b.cols ();
+  octave_idx_type nra = a.rows ();
+  octave_idx_type nrb = b.rows ();
+  octave_idx_type nca = a.cols ();
+  octave_idx_type ncb = b.cols ();
 
   MArray<T> c (dim_vector (nra*nrb, nca*ncb));
   T *cv = c.fortran_vec ();
@@ -79,8 +81,11 @@
 {
   assert (b.ndims () == 2);
 
-  octave_idx_type nra = a.rows (), nrb = b.rows (), dla = a.diag_length ();
-  octave_idx_type nca = a.cols (), ncb = b.cols ();
+  octave_idx_type nra = a.rows ();
+  octave_idx_type nrb = b.rows ();
+  octave_idx_type dla = a.diag_length ();
+  octave_idx_type nca = a.cols ();
+  octave_idx_type ncb = b.cols ();
 
   MArray<T> c (dim_vector (nra*nrb, nca*ncb), T ());
 
@@ -129,38 +134,20 @@
 static PermMatrix
 kron (const PermMatrix& a, const PermMatrix& b)
 {
-  octave_idx_type na = a.rows (), nb = b.rows ();
-  const octave_idx_type *pa = a.data (), *pb = b.data ();
-  PermMatrix c(na*nb); // Row permutation.
-  octave_idx_type *pc = c.fortran_vec ();
-
-  bool cola = a.is_col_perm (), colb = b.is_col_perm ();
-  if (cola && colb)
-    {
-      for (octave_idx_type i = 0; i < na; i++)
-        for (octave_idx_type j = 0; j < nb; j++)
-          pc[pa[i]*nb+pb[j]] = i*nb+j;
-    }
-  else if (cola)
+  octave_idx_type na = a.rows ();
+  octave_idx_type nb = b.rows ();
+  const Array<octave_idx_type>& pa = a.col_perm_vec ();
+  const Array<octave_idx_type>& pb = b.col_perm_vec ();
+  Array<octave_idx_type> res_perm (dim_vector (na * nb, 1));
+  octave_idx_type rescol = 0;
+  for (octave_idx_type i = 0; i < na; i++)
     {
-      for (octave_idx_type i = 0; i < na; i++)
-        for (octave_idx_type j = 0; j < nb; j++)
-          pc[pa[i]*nb+j] = i*nb+pb[j];
-    }
-  else if (colb)
-    {
-      for (octave_idx_type i = 0; i < na; i++)
-        for (octave_idx_type j = 0; j < nb; j++)
-          pc[i*nb+pb[j]] = pa[i]*nb+j;
-    }
-  else
-    {
-      for (octave_idx_type i = 0; i < na; i++)
-        for (octave_idx_type j = 0; j < nb; j++)
-          pc[i*nb+j] = pa[i]*nb+pb[j];
+      octave_idx_type a_add = pa(i) * nb;
+      for (octave_idx_type j = 0; j < nb; j++)
+        res_perm.xelem (rescol++) = a_add + pb(j);
     }
 
-  return c;
+  return PermMatrix (res_perm, true);
 }
 
 template <class MTA, class MTB>
@@ -195,7 +182,7 @@
           // the diagonals as vectors and compute the product.  That
           // will be another vector, which we then use to construct a
           // diagonal matrix object.  Note that this will fail if our
-          // digaonal matrix object is modified to allow the non-zero
+          // digaonal matrix object is modified to allow the nonzero
           // values to be stored off of the principal diagonal (i.e., if
           // diag ([1,2], 3) is modified to return a diagonal matrix
           // object instead of a full matrix object).
@@ -282,7 +269,8 @@
 
   if (nargin >= 2)
     {
-      octave_value a = args(0), b = args(1);
+      octave_value a = args(0);
+      octave_value b = args(1);
       retval = dispatch_kron (a, b);
       for (octave_idx_type i = 2; i < nargin; i++)
         retval = dispatch_kron (retval, args(i));
@@ -299,13 +287,26 @@
 %! x = ones (2);
 %! assert (kron (x, x), ones (4));
 
-%!shared x, y, z
+%!shared x, y, z, p1, p2, d1, d2
 %! x =  [1, 2];
 %! y =  [-1, -2];
 %! z =  [1,  2,  3,  4; 1,  2,  3,  4; 1,  2,  3,  4];
+%! p1 = eye (3)([2, 3, 1], :);  ## Permutation matrix
+%! p2 = [0 1 0; 0 0 1; 1 0 0];  ## Non-permutation equivalent
+%! d1 = diag ([1 2 3]);         ## Diag type matrix
+%! d2 = [1 0 0; 0 2 0; 0 0 3];  ## Non-diag equivalent
 %!assert (kron (1:4, ones (3, 1)), z)
+%!assert (kron (single (1:4), ones (3, 1)), single (z))
+%!assert (kron (sparse (1:4), ones (3, 1)), sparse (z))
+%!assert (kron (complex (1:4), ones (3, 1)), z)
+%!assert (kron (complex (single(1:4)), ones (3, 1)), single(z))
 %!assert (kron (x, y, z), kron (kron (x, y), z))
 %!assert (kron (x, y, z), kron (x, kron (y, z)))
+%!assert (kron (p1, p1), kron (p2, p2))
+%!assert (kron (p1, p2), kron (p2, p1))
+%!assert (kron (d1, d1), kron (d2, d2))
+%!assert (kron (d1, d2), kron (d2, d1))
+
 
 %!assert (kron (diag ([1, 2]), diag ([3, 4])), diag ([3, 4, 6, 8]))
 
--- a/libinterp/corefcn/load-path.cc
+++ b/libinterp/corefcn/load-path.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -38,6 +38,7 @@
 #include "defun.h"
 #include "input.h"
 #include "load-path.h"
+#include "ov-usr-fcn.h"
 #include "pager.h"
 #include "parse.h"
 #include "toplev.h"
@@ -78,7 +79,7 @@
                   const dir_info& di = p->second;
 
                   if (fs.mtime () + fs.time_resolution ()
-                       > di.dir_time_last_checked)
+                      > di.dir_time_last_checked)
                     initialize ();
                   else
                     *this = di;
@@ -108,6 +109,27 @@
     }
 }
 
+bool
+load_path::dir_info::is_package (const std::string& name) const
+{
+  size_t pos = name.find ('.');
+
+  if (pos == std::string::npos)
+    return package_dir_map.find (name) != package_dir_map.end ();
+  else
+    {
+      std::string name_head = name.substr (0, pos);
+      std::string name_tail = name.substr (pos + 1);
+
+      const_package_dir_map_iterator it = package_dir_map.find (name_head);
+
+      if (it != package_dir_map.end ())
+        return it->second.is_package (name_tail);
+      else
+        return false;
+    }
+}
+
 void
 load_path::dir_info::initialize (void)
 {
@@ -120,6 +142,7 @@
   if (fs)
     {
       method_file_map.clear ();
+      package_dir_map.clear ();
 
       dir_mtime = fs.mtime ();
       dir_time_last_checked = octave_time ();
@@ -181,6 +204,8 @@
                     get_private_file_map (full_name);
                   else if (fname[0] == '@')
                     get_method_file_map (full_name, fname.substr (1));
+                  else if (fname[0] == '+')
+                    get_package_dir (full_name, fname.substr (1));
                 }
               else
                 {
@@ -286,6 +311,13 @@
     method_file_map[class_name].private_file_map = get_fcn_files (pd);
 }
 
+void
+load_path::dir_info::get_package_dir (const std::string& d,
+                                      const std::string& package_name)
+{
+  package_dir_map[package_name] = dir_info (d);
+}
+
 bool
 load_path::instance_ok (void)
 {
@@ -373,8 +405,8 @@
 }
 
 void
-load_path::move_fcn_map (const std::string& dir_name,
-                         const string_vector& fcn_files, bool at_end)
+load_path::loader::move_fcn_map (const std::string& dir_name,
+                                 const string_vector& fcn_files, bool at_end)
 {
   octave_idx_type len = fcn_files.length ();
 
@@ -422,7 +454,7 @@
 }
 
 void
-load_path::move_method_map (const std::string& dir_name, bool at_end)
+load_path::loader::move_method_map (const std::string& dir_name, bool at_end)
 {
   for (method_map_iterator i = method_map.begin ();
        i != method_map.end ();
@@ -466,7 +498,7 @@
 }
 
 void
-load_path::move (dir_info_list_iterator i, bool at_end)
+load_path::do_move (dir_info_list_iterator i, bool at_end)
 {
   if (dir_info_list.size () > 1)
     {
@@ -479,16 +511,56 @@
       else
         dir_info_list.push_front (di);
 
-      std::string dir_name = di.dir_name;
-
-      move_fcn_map (dir_name, di.fcn_files, at_end);
-
-      // No need to move elements of private function map.
-
-      move_method_map (dir_name, at_end);
+      move (di, at_end);
+    }
+}
+
+void
+load_path::move (const dir_info& di, bool at_end, const std::string& pname)
+{
+  loader& l = get_loader (pname);
+
+  l.move (di, at_end);
+
+  dir_info::package_dir_map_type package_dir_map = di.package_dir_map;
+
+  for (dir_info::const_package_dir_map_iterator p = package_dir_map.begin ();
+       p != package_dir_map.end (); ++p)
+    {
+      std::string full_name = p->first;
+
+      if (! pname.empty ())
+        full_name = pname + "." + full_name;
+
+      move (p->second, at_end, full_name);
     }
 }
 
+void
+load_path::loader::move (const dir_info& di, bool at_end)
+{
+  std::string dir_name = di.dir_name;
+
+  std::list<std::string>::iterator s =
+    std::find (dir_list.begin (), dir_list.end (), dir_name);
+
+  if (s != dir_list.end ())
+    {
+      dir_list.erase (s);
+
+      if (at_end)
+        dir_list.push_back (dir_name);
+      else
+        dir_list.push_front (dir_name);
+    }
+
+  move_fcn_map (dir_name, di.fcn_files, at_end);
+
+  // No need to move elements of private function map.
+
+  move_method_map (dir_name, at_end);
+}
+
 static void
 maybe_add_path_elts (std::string& path, const std::string& dir)
 {
@@ -518,6 +590,7 @@
       maybe_add_path_elts (sys_path, Vlocal_fcn_file_dir);
       maybe_add_path_elts (sys_path, Voct_file_dir);
       maybe_add_path_elts (sys_path, Vfcn_file_dir);
+      maybe_add_path_elts (sys_path, Voct_data_dir);
     }
 
   std::string tpath = load_path::command_line_path;
@@ -544,9 +617,10 @@
 load_path::do_clear (void)
 {
   dir_info_list.clear ();
-  fcn_map.clear ();
-  private_fcn_map.clear ();
-  method_map.clear ();
+
+  default_loader.clear ();
+
+  loader_map.clear ();
 }
 
 static std::list<std::string>
@@ -683,7 +757,7 @@
   dir_info_list_iterator i = find_dir_info (dir);
 
   if (i != dir_info_list.end ())
-    move (i, at_end);
+    do_move (i, at_end);
   else
     {
       file_stat fs (dir);
@@ -701,11 +775,7 @@
                   else
                     dir_info_list.push_front (di);
 
-                  add_to_fcn_map (di, at_end);
-
-                  add_to_private_fcn_map (di);
-
-                  add_to_method_map (di, at_end);
+                  add (di, at_end);
 
                   if (add_hook)
                     add_hook (dir);
@@ -726,12 +796,12 @@
   i = find_dir_info (".");
 
   if (i != dir_info_list.end ())
-    move (i, false);
+    do_move (i, false);
 }
 
 void
-load_path::remove_fcn_map (const std::string& dir,
-                           const string_vector& fcn_files)
+load_path::loader::remove_fcn_map (const std::string& dir,
+                                   const string_vector& fcn_files)
 {
   octave_idx_type len = fcn_files.length ();
 
@@ -770,7 +840,7 @@
 }
 
 void
-load_path::remove_private_fcn_map (const std::string& dir)
+load_path::loader::remove_private_fcn_map (const std::string& dir)
 {
   private_fcn_map_iterator p = private_fcn_map.find (dir);
 
@@ -779,7 +849,7 @@
 }
 
 void
-load_path::remove_method_map (const std::string& dir)
+load_path::loader::remove_method_map (const std::string& dir)
 {
   for (method_map_iterator i = method_map.begin ();
        i != method_map.end ();
@@ -847,15 +917,11 @@
               if (remove_hook)
                 remove_hook (dir);
 
-              string_vector fcn_files = i->fcn_files;
+              dir_info& di = *i;
+
+              remove (di);
 
               dir_info_list.erase (i);
-
-              remove_fcn_map (dir, fcn_files);
-
-              remove_private_fcn_map (dir);
-
-              remove_method_map (dir);
             }
         }
     }
@@ -864,17 +930,52 @@
 }
 
 void
+load_path::remove (const dir_info& di, const std::string& pname)
+{
+  loader& l = get_loader (pname);
+
+  l.remove (di);
+
+  dir_info::package_dir_map_type package_dir_map = di.package_dir_map;
+
+  for (dir_info::const_package_dir_map_iterator p = package_dir_map.begin ();
+       p != package_dir_map.end (); ++p)
+    {
+      std::string full_name = p->first;
+
+      if (! pname.empty ())
+        full_name = pname + "." + full_name;
+
+      remove (p->second, full_name);
+    }
+}
+
+void
+load_path::loader::remove (const dir_info& di)
+{
+  std::string dir = di.dir_name;
+
+  string_vector fcn_files = di.fcn_files;
+
+  dir_list.remove (dir);
+
+  remove_fcn_map (dir, fcn_files);
+
+  remove_private_fcn_map (dir);
+
+  remove_method_map (dir);
+}
+
+void
 load_path::do_update (void) const
 {
   // I don't see a better way to do this because we need to
   // preserve the correct directory ordering for new files that
   // have appeared.
 
-  fcn_map.clear ();
-
-  private_fcn_map.clear ();
-
-  method_map.clear ();
+  default_loader.clear ();
+
+  loader_map.clear ();
 
   for (dir_info_list_iterator p = dir_info_list.begin ();
        p != dir_info_list.end ();
@@ -884,11 +985,7 @@
 
       di.update ();
 
-      add_to_fcn_map (di, true);
-
-      add_to_private_fcn_map (di);
-
-      add_to_method_map (di, true);
+      add (di, true);
     }
 }
 
@@ -987,8 +1084,8 @@
 }
 
 std::string
-load_path::do_find_fcn (const std::string& fcn, std::string& dir_name,
-                        int type) const
+load_path::loader::find_fcn (const std::string& fcn, std::string& dir_name,
+                             int type) const
 {
   std::string retval;
 
@@ -1003,7 +1100,7 @@
           std::string class_name = fcn.substr (1, pos-1);
           std::string meth = fcn.substr (pos+1);
 
-          retval = do_find_method (class_name, meth, dir_name);
+          retval = find_method (class_name, meth, dir_name);
         }
       else
         retval = std::string ();
@@ -1042,8 +1139,8 @@
 }
 
 std::string
-load_path::do_find_private_fcn (const std::string& dir,
-                                const std::string& fcn, int type) const
+load_path::loader::find_private_fcn (const std::string& dir,
+                                     const std::string& fcn, int type) const
 {
   std::string retval;
 
@@ -1072,9 +1169,9 @@
 }
 
 std::string
-load_path::do_find_method (const std::string& class_name,
-                           const std::string& meth,
-                           std::string& dir_name, int type) const
+load_path::loader::find_method (const std::string& class_name,
+                                const std::string& meth,
+                                std::string& dir_name, int type) const
 {
   std::string retval;
 
@@ -1120,7 +1217,7 @@
 }
 
 std::list<std::string>
-load_path::do_methods (const std::string& class_name) const
+load_path::loader::methods (const std::string& class_name) const
 {
   std::list<std::string> retval;
 
@@ -1142,6 +1239,20 @@
   return retval;
 }
 
+bool
+load_path::is_package (const std::string& name) const
+{
+  for (const_dir_info_list_iterator p = dir_info_list.begin ();
+       p != dir_info_list.end ();
+       p++)
+    {
+      if (p->is_package (name))
+        return true;
+    }
+
+  return false;
+}
+
 std::list<std::string>
 load_path::do_overloads (const std::string& meth) const
 {
@@ -1149,13 +1260,67 @@
 
   //  update ();
 
+  default_loader.overloads (meth, retval);
+
+  for (const_loader_map_iterator l = loader_map.begin ();
+       l != loader_map.end (); ++l)
+    l->second.overloads (meth, retval);
+
+  return retval;
+}
+
+void
+load_path::loader::overloads (const std::string& meth,
+                              std::list<std::string>& l) const
+{
   for (const_method_map_iterator q = method_map.begin ();
        q != method_map.end (); q++)
     {
       const fcn_map_type& m = q->second;
 
       if (m.find (meth) != m.end ())
-        retval.push_back (q->first);
+        {
+          std::string class_name = q->first;
+
+          if (! prefix.empty ())
+            class_name = prefix + "." + class_name;
+
+          l.push_back (class_name);
+        }
+    }
+}
+
+// Should we cache all files in private directories, or is it OK to just
+// look them up each time as needed?
+
+std::string
+find_private_file (const std::string& fname)
+{
+  std::string retval;
+
+  // Look in private directory corresponding to current function (if
+  // any).
+
+  octave_user_function *curr_fcn = symbol_table::get_curr_fcn ();
+
+  if (curr_fcn)
+    {
+      // Even for private functions, dir_name doesn't contain the
+      // "private" directory component so we append it here in all
+      // cases.
+
+      std::string dir_name = curr_fcn->dir_name ();
+
+      if (! dir_name.empty ())
+        {
+          std::string pfname = dir_name + file_ops::dir_sep_str ()
+                               + "private" + file_ops::dir_sep_str () + fname;
+
+          file_stat fs (pfname);
+
+          if (fs.exists () && fs.is_reg ())
+            retval = pfname;
+        }
     }
 
   return retval;
@@ -1166,33 +1331,42 @@
 {
   std::string retval;
 
+  if (octave_env::absolute_pathname (file)
+      || octave_env::rooted_relative_pathname (file))
+    {
+      file_stat fs (file);
+
+      return fs.exists () ? file : retval;
+    }
+  else
+    {
+      std::string tfile = find_private_file (file);
+
+      if (! tfile.empty ())
+        return tfile;
+    }
+
   if (file.find_first_of (file_ops::dir_sep_chars ()) != std::string::npos)
     {
-      if (octave_env::absolute_pathname (file)
-          || octave_env::rooted_relative_pathname (file))
+      // Given name has a directory separator, so append it to each
+      // element of the load path in turn.
+
+      for (const_dir_info_list_iterator p = dir_info_list.begin ();
+           p != dir_info_list.end ();
+           p++)
         {
-          file_stat fs (file);
+          std::string tfile = file_ops::concat (p->dir_name, file);
+
+          file_stat fs (tfile);
 
           if (fs.exists ())
-            return file;
-        }
-      else
-        {
-          for (const_dir_info_list_iterator p = dir_info_list.begin ();
-               p != dir_info_list.end ();
-               p++)
-            {
-              std::string tfile = file_ops::concat (p->dir_name, file);
-
-              file_stat fs (tfile);
-
-              if (fs.exists ())
-                return tfile;
-            }
+            return tfile;
         }
     }
   else
     {
+      // Look in cache.
+
       for (const_dir_info_list_iterator p = dir_info_list.begin ();
            p != dir_info_list.end ();
            p++)
@@ -1244,7 +1418,7 @@
 
           size_t dir_len = dir.length ();
 
-          if (dname_len >= dir_len
+          if (dname_len > dir_len
               && file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
               && dir.compare (dname.substr (dname_len - dir_len)) == 0)
             {
@@ -1291,7 +1465,7 @@
 
           size_t dir_len = dir.length ();
 
-          if (dname_len >= dir_len
+          if (dname_len > dir_len
               && file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
               && dir.compare (dname.substr (dname_len - dir_len)) == 0)
             {
@@ -1515,6 +1689,12 @@
 string_vector
 load_path::do_fcn_names (void) const
 {
+  return default_loader.fcn_names ();
+}
+
+string_vector
+load_path::loader::fcn_names (void) const
+{
   size_t len = fcn_map.size ();
 
   string_vector retval (len);
@@ -1657,69 +1837,11 @@
         }
     }
 
-  for (const_private_fcn_map_iterator i = private_fcn_map.begin ();
-       i != private_fcn_map.end (); i++)
-    {
-      os << "\n*** private functions in "
-         << file_ops::concat (i->first, "private") << ":\n\n";
-
-      print_fcn_list (os, i->second);
-    }
-
-#if defined (DEBUG_LOAD_PATH)
-
-  for (const_fcn_map_iterator i = fcn_map.begin ();
-       i != fcn_map.end ();
-       i++)
-    {
-      os << i->first << ":\n";
-
-      const file_info_list_type& file_info_list = i->second;
-
-      for (const_file_info_list_iterator p = file_info_list.begin ();
-           p != file_info_list.end ();
-           p++)
-        {
-          os << "  " << p->dir_name << " (";
-
-          print_types (os, p->types);
-
-          os << ")\n";
-        }
-    }
-
-  for (const_method_map_iterator i = method_map.begin ();
-       i != method_map.end ();
-       i++)
-    {
-      os << "CLASS " << i->first << ":\n";
-
-      const fcn_map_type& fm = i->second;
-
-      for (const_fcn_map_iterator q = fm.begin ();
-           q != fm.end ();
-           q++)
-        {
-          os << "  " << q->first << ":\n";
-
-          const file_info_list_type& file_info_list = q->second;
-
-          for (const_file_info_list_iterator p = file_info_list.begin ();
-               p != file_info_list.end ();
-               p++)
-            {
-              os << "  " << p->dir_name << " (";
-
-              print_types (os, p->types);
-
-              os << ")\n";
-            }
-        }
-    }
-
-  os << "\n";
-
-#endif
+  default_loader.display (os);
+
+  for (const_loader_map_iterator l = loader_map.begin ();
+       l != loader_map.end (); ++l)
+    l->second.display (os);
 }
 
 // True if a path is contained in a path list separated by path_sep_char
@@ -1743,7 +1865,29 @@
 }
 
 void
-load_path::add_to_fcn_map (const dir_info& di, bool at_end) const
+load_path::add (const dir_info& di, bool at_end,
+                const std::string& pname) const
+{
+  loader& l = get_loader (pname);
+
+  l.add (di, at_end);
+
+  dir_info::package_dir_map_type package_dir_map = di.package_dir_map;
+
+  for (dir_info::const_package_dir_map_iterator p = package_dir_map.begin ();
+       p != package_dir_map.end (); ++p)
+    {
+      std::string full_name = p->first;
+
+      if (! pname.empty ())
+        full_name = pname + "." + full_name;
+
+      add (p->second, at_end, full_name);
+    }
+}
+
+void
+load_path::loader::add_to_fcn_map (const dir_info& di, bool at_end)
 {
   std::string dir_name = di.dir_name;
 
@@ -1839,7 +1983,7 @@
 }
 
 void
-load_path::add_to_private_fcn_map (const dir_info& di) const
+load_path::loader::add_to_private_fcn_map (const dir_info& di)
 {
   dir_info::fcn_file_map_type private_file_map = di.private_file_map;
 
@@ -1848,7 +1992,7 @@
 }
 
 void
-load_path::add_to_method_map (const dir_info& di, bool at_end) const
+load_path::loader::add_to_method_map (const dir_info& di, bool at_end)
 {
   std::string dir_name = di.dir_name;
 
@@ -1918,6 +2062,81 @@
     }
 }
 
+void
+load_path::loader::display (std::ostream& os) const
+{
+  os << "*** loader: " << (prefix.empty () ? "<top-level>" : prefix) << "\n\n";
+
+  for (std::list<std::string>::const_iterator s = dir_list.begin ();
+       s != dir_list.end (); ++s)
+    os << *s << "\n";
+  os << "\n";
+
+  for (const_private_fcn_map_iterator i = private_fcn_map.begin ();
+       i != private_fcn_map.end (); i++)
+    {
+      os << "\n*** private functions in "
+         << file_ops::concat (i->first, "private") << ":\n\n";
+
+      print_fcn_list (os, i->second);
+    }
+
+#if defined (DEBUG_LOAD_PATH)
+
+  for (const_fcn_map_iterator i = fcn_map.begin ();
+       i != fcn_map.end ();
+       i++)
+    {
+      os << i->first << ":\n";
+
+      const file_info_list_type& file_info_list = i->second;
+
+      for (const_file_info_list_iterator p = file_info_list.begin ();
+           p != file_info_list.end ();
+           p++)
+        {
+          os << "  " << p->dir_name << " (";
+
+          print_types (os, p->types);
+
+          os << ")\n";
+        }
+    }
+
+  for (const_method_map_iterator i = method_map.begin ();
+       i != method_map.end ();
+       i++)
+    {
+      os << "CLASS " << i->first << ":\n";
+
+      const fcn_map_type& fm = i->second;
+
+      for (const_fcn_map_iterator q = fm.begin ();
+           q != fm.end ();
+           q++)
+        {
+          os << "  " << q->first << ":\n";
+
+          const file_info_list_type& file_info_list = q->second;
+
+          for (const_file_info_list_iterator p = file_info_list.begin ();
+               p != file_info_list.end ();
+               p++)
+            {
+              os << "  " << p->dir_name << " (";
+
+              print_types (os, p->types);
+
+              os << ")\n";
+            }
+        }
+    }
+
+  os << "\n";
+
+#endif
+}
+
 std::string
 genpath (const std::string& dirname, const string_vector& skip)
 {
@@ -1929,7 +2148,7 @@
     {
       retval = dirname;
 
-      string_vector dirlist = dir.read ();
+      string_vector dirlist = dir.read ().sort (false);
 
       octave_idx_type len = dirlist.length ();
 
@@ -1937,7 +2156,8 @@
         {
           std::string elt = dirlist[i];
 
-          bool skip_p = (elt == "." || elt == ".." || elt[0] == '@');
+          bool skip_p = (elt == "." || elt == ".." || elt[0] == '@'
+                         || elt[0] == '+');
 
           if (! skip_p)
             {
@@ -1964,6 +2184,21 @@
   return retval;
 }
 
+std::list<std::string>
+load_path::do_get_all_package_names (bool only_top_level) const
+{
+  std::list<std::string> retval;
+
+  for (const_loader_map_iterator l = loader_map.begin ();
+       l != loader_map.end (); ++l)
+    {
+      if (! only_top_level || l->first.find ('.') == std::string::npos)
+        retval.push_back (l->first);
+    }
+
+  return retval;
+}
+
 static void
 execute_pkg_add_or_del (const std::string& dir,
                         const std::string& script_file)
@@ -2013,7 +2248,7 @@
       if (! error_state)
         retval = genpath (dirname);
       else
-        error ("genpath: DIR must be a character string");
+        error ("genpath: DIR must be a string");
     }
   else if (nargin > 1)
     {
@@ -2032,7 +2267,7 @@
       if (! error_state)
         retval = genpath (dirname, skip);
       else
-        error ("genpath: all arguments must be character strings");
+        error ("genpath: all arguments must be strings");
     }
   else
     print_usage ();
@@ -2237,10 +2472,10 @@
 
       for (int i = 0; i < nargin; i++)
         {
-          std::string arg = args(i).string_value ();
-
-          if (! error_state)
+          if (args(i).is_string ())
             {
+              std::string arg = args(i).string_value ();
+
               std::list<std::string> dir_elts = split_path (arg);
 
               if (! append)
@@ -2264,7 +2499,7 @@
                 }
             }
           else
-            error ("addpath: all arguments must be character strings");
+            error ("addpath: all arguments must be strings");
         }
 
       if (need_to_update)
@@ -2306,10 +2541,9 @@
 
       for (int i = 0; i < nargin; i++)
         {
-          std::string arg = args(i).string_value ();
-
-          if (! error_state)
+          if (args(i).is_string ())
             {
+              std::string arg = args(i).string_value ();
               std::list<std::string> dir_elts = split_path (arg);
 
               for (std::list<std::string>::const_iterator p = dir_elts.begin ();
@@ -2328,7 +2562,7 @@
                 }
             }
           else
-            error ("addpath: all arguments must be character strings");
+            error ("addpath: all arguments must be strings");
         }
 
       if (need_to_update)
@@ -2339,3 +2573,10 @@
 
   return retval;
 }
+
+DEFUN (__dump_load_path__, , , "")
+{
+  load_path::display (octave_stdout);
+
+  return octave_value_list ();
+}
--- a/libinterp/corefcn/load-path.h
+++ b/libinterp/corefcn/load-path.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -39,8 +39,7 @@
 protected:
 
   load_path (void)
-    : dir_info_list (), fcn_map (), private_fcn_map (), method_map (),
-      init_dirs () { }
+    : loader_map (), default_loader (), dir_info_list (), init_dirs () { }
 
 public:
 
@@ -96,24 +95,29 @@
 
   static std::string find_method (const std::string& class_name,
                                   const std::string& meth,
-                                  std::string& dir_name)
+                                  std::string& dir_name,
+                                  const std::string& pack_name = std::string ())
   {
     return instance_ok ()
-           ? instance->do_find_method (class_name, meth, dir_name)
-           : std::string ();
+      ? instance->get_loader (pack_name).find_method (class_name, meth,
+                                                      dir_name)
+      : std::string ();
   }
 
   static std::string find_method (const std::string& class_name,
-                                  const std::string& meth)
+                                  const std::string& meth,
+                                  const std::string& pack_name = std::string ())
   {
     std::string dir_name;
-    return find_method (class_name, meth, dir_name);
+    return find_method (class_name, meth, dir_name, pack_name);
   }
 
-  static std::list<std::string> methods (const std::string& class_name)
+  static std::list<std::string> methods (const std::string& class_name,
+                                         const std::string& pack_name = std::string ())
   {
     return instance_ok ()
-           ? instance->do_methods (class_name) : std::list<std::string> ();
+      ? instance->get_loader(pack_name).methods (class_name)
+      : std::list<std::string> ();
   }
 
   static std::list<std::string> overloads (const std::string& meth)
@@ -122,47 +126,72 @@
            ? instance->do_overloads (meth) : std::list<std::string> ();
   }
 
-  static std::string find_fcn (const std::string& fcn, std::string& dir_name)
+  static bool find_package (const std::string& package_name)
+  {
+    return instance_ok ()
+      ? instance->do_find_package (package_name) : false;
+  }
+
+  static std::list<std::string>
+  get_all_package_names (bool only_top_level = true)
   {
     return instance_ok ()
-           ? instance->do_find_fcn (fcn, dir_name) : std::string ();
+      ? instance->do_get_all_package_names (only_top_level)
+      : std::list<std::string> ();
   }
 
-  static std::string find_fcn (const std::string& fcn)
+  static std::string find_fcn (const std::string& fcn, std::string& dir_name,
+                               const std::string& pack_name = std::string ())
+  {
+    return instance_ok ()
+      ? instance->get_loader (pack_name).find_fcn (fcn, dir_name)
+      : std::string ();
+  }
+
+  static std::string find_fcn (const std::string& fcn,
+                               const std::string& pack_name = std::string ())
   {
     std::string dir_name;
-    return find_fcn (fcn, dir_name);
+    return find_fcn (fcn, dir_name, pack_name);
   }
 
   static std::string find_private_fcn (const std::string& dir,
-                                       const std::string& fcn)
+                                       const std::string& fcn,
+                                       const std::string& pack_name = std::string ())
   {
     return instance_ok ()
-           ? instance->do_find_private_fcn (dir, fcn) : std::string ();
+      ? instance->get_loader (pack_name).find_private_fcn (dir, fcn)
+      : std::string ();
   }
 
-  static std::string find_fcn_file (const std::string& fcn)
+  static std::string find_fcn_file (const std::string& fcn,
+                                    const std::string& pack_name = std::string ())
   {
     std::string dir_name;
 
-    return instance_ok () ?
-           instance->do_find_fcn (fcn, dir_name, M_FILE) : std::string ();
+    return instance_ok ()
+      ? instance->get_loader (pack_name).find_fcn (fcn, dir_name, M_FILE)
+      : std::string ();
   }
 
-  static std::string find_oct_file (const std::string& fcn)
+  static std::string find_oct_file (const std::string& fcn,
+                                    const std::string& pack_name = std::string ())
   {
     std::string dir_name;
 
-    return instance_ok () ?
-           instance->do_find_fcn (fcn, dir_name, OCT_FILE) : std::string ();
+    return instance_ok ()
+      ? instance->get_loader (pack_name).find_fcn (fcn, dir_name, M_FILE)
+      : std::string ();
   }
 
-  static std::string find_mex_file (const std::string& fcn)
+  static std::string find_mex_file (const std::string& fcn,
+                                    const std::string& pack_name = std::string ())
   {
     std::string dir_name;
 
-    return instance_ok () ?
-           instance->do_find_fcn (fcn, dir_name, MEX_FILE) : std::string ();
+    return instance_ok ()
+      ? instance->get_loader (pack_name).find_fcn (fcn, dir_name, M_FILE)
+      : std::string ();
   }
 
   static std::string find_file (const std::string& file)
@@ -297,19 +326,27 @@
     typedef method_file_map_type::const_iterator const_method_file_map_iterator;
     typedef method_file_map_type::iterator method_file_map_iterator;
 
+    // <PACKAGE_NAME, DIR_INFO>
+    typedef std::map<std::string, dir_info> package_dir_map_type;
+
+    typedef package_dir_map_type::const_iterator const_package_dir_map_iterator;
+    typedef package_dir_map_type::iterator package_dir_map_iterator;
+
     // This default constructor is only provided so we can create a
     // std::map of dir_info objects.  You should not use this
     // constructor for any other purpose.
     dir_info (void)
       : dir_name (), abs_dir_name (), is_relative (false),
         dir_mtime (), dir_time_last_checked (),
-        all_files (), fcn_files (), private_file_map (), method_file_map ()
+        all_files (), fcn_files (), private_file_map (), method_file_map (),
+        package_dir_map ()
     { }
 
     dir_info (const std::string& d)
       : dir_name (d), abs_dir_name (), is_relative (false),
         dir_mtime (), dir_time_last_checked (),
-        all_files (), fcn_files (), private_file_map (), method_file_map ()
+        all_files (), fcn_files (), private_file_map (), method_file_map (),
+        package_dir_map ()
     {
       initialize ();
     }
@@ -321,7 +358,8 @@
         dir_time_last_checked (di.dir_time_last_checked),
         all_files (di.all_files), fcn_files (di.fcn_files),
         private_file_map (di.private_file_map),
-        method_file_map (di.method_file_map) { }
+        method_file_map (di.method_file_map),
+        package_dir_map (di.package_dir_map) { }
 
     ~dir_info (void) { }
 
@@ -338,6 +376,7 @@
           fcn_files = di.fcn_files;
           private_file_map = di.private_file_map;
           method_file_map = di.method_file_map;
+          package_dir_map = di.package_dir_map;
         }
 
       return *this;
@@ -354,6 +393,9 @@
     string_vector fcn_files;
     fcn_file_map_type private_file_map;
     method_file_map_type method_file_map;
+    package_dir_map_type package_dir_map;
+
+    bool is_package (const std::string& name) const;
 
   private:
 
@@ -366,6 +408,9 @@
     void get_method_file_map (const std::string& d,
                               const std::string& class_name);
 
+    void get_package_dir (const std::string& d,
+                          const std::string& package_name);
+
     friend fcn_file_map_type get_fcn_files (const std::string& d);
   };
 
@@ -442,13 +487,125 @@
   typedef method_map_type::const_iterator const_method_map_iterator;
   typedef method_map_type::iterator method_map_iterator;
 
-  mutable dir_info_list_type dir_info_list;
+  class loader
+  {
+  public:
+    loader (const std::string& pfx = std::string ())
+      : prefix (pfx), dir_list (), fcn_map (), private_fcn_map (),
+        method_map () { }
+
+    loader (const loader& l)
+      : prefix (l.prefix), dir_list (l.dir_list),
+        private_fcn_map (l.private_fcn_map), method_map (l.method_map) { }
+
+    ~loader (void) { }
+
+    loader& operator = (const loader& l)
+    {
+      if (&l != this)
+        {
+          prefix = l.prefix;
+          dir_list = l.dir_list;
+          fcn_map = l.fcn_map;
+          private_fcn_map = l.private_fcn_map;
+          method_map = l.method_map;
+        }
+
+      return *this;
+    }
 
-  mutable fcn_map_type fcn_map;
+    void add (const dir_info& di, bool at_end)
+    {
+      if (at_end)
+        dir_list.push_back (di.dir_name);
+      else
+        dir_list.push_front (di.dir_name);
+
+      add_to_fcn_map (di, at_end);
+
+      add_to_private_fcn_map (di);
+
+      add_to_method_map (di, at_end);
+    }
+
+    void move (const dir_info& di, bool at_end);
+
+    void remove (const dir_info& di);
+
+    void clear (void)
+    {
+      dir_list.clear ();
+
+      fcn_map.clear ();
+
+      private_fcn_map.clear ();
+
+      method_map.clear ();
+    }
+
+    void display (std::ostream& out) const;
 
-  mutable private_fcn_map_type private_fcn_map;
+    std::string find_fcn (const std::string& fcn,
+                          std::string& dir_name,
+                          int type = M_FILE | OCT_FILE | MEX_FILE) const;
+
+    std::string find_private_fcn (const std::string& dir,
+                                  const std::string& fcn,
+                                  int type = M_FILE | OCT_FILE | MEX_FILE) const;
+
+    std::string find_method (const std::string& class_name,
+                             const std::string& meth,
+                             std::string& dir_name,
+                             int type = M_FILE | OCT_FILE | MEX_FILE) const;
+
+    std::list<std::string> methods (const std::string& class_name) const;
+
+    void overloads (const std::string& meth, std::list<std::string>& l) const;
+
+    string_vector fcn_names (void) const;
+
+  private:
+    void add_to_fcn_map (const dir_info& di, bool at_end);
+
+    void add_to_private_fcn_map (const dir_info& di);
+
+    void add_to_method_map (const dir_info& di, bool at_end);
+
+    void move_fcn_map (const std::string& dir,
+                       const string_vector& fcn_files, bool at_end);
+
+    void move_method_map (const std::string& dir, bool at_end);
 
-  mutable method_map_type method_map;
+    void remove_fcn_map (const std::string& dir,
+                         const string_vector& fcn_files);
+
+    void remove_private_fcn_map (const std::string& dir);
+
+    void remove_method_map (const std::string& dir);
+
+  private:
+    std::string prefix;
+
+    std::list<std::string> dir_list;
+
+    fcn_map_type fcn_map;
+
+    private_fcn_map_type private_fcn_map;
+
+    method_map_type method_map;
+  };
+
+  // <PACKAGE_NAME, LOADER>
+  typedef std::map<std::string, loader> loader_map_type;
+
+  typedef loader_map_type::const_iterator const_loader_map_iterator;
+  typedef loader_map_type::iterator loader_map_iterator;
+
+  mutable loader_map_type loader_map;
+
+  mutable loader default_loader;
+
+  mutable dir_info_list_type dir_info_list;
 
   mutable std::set<std::string> init_dirs;
 
@@ -475,12 +632,13 @@
 
   bool do_contains_canonical (const std::string& dir) const;
 
-  void move_fcn_map (const std::string& dir,
-                     const string_vector& fcn_files, bool at_end);
+  void do_move (dir_info_list_iterator i, bool at_end);
 
-  void move_method_map (const std::string& dir, bool at_end);
+  void move (const dir_info& di, bool at_end,
+             const std::string& pname = std::string ());
 
-  void move (std::list<dir_info>::iterator i, bool at_end);
+  void remove (const dir_info& di,
+               const std::string& pname = std::string ());
 
   void do_initialize (bool set_initial_path);
 
@@ -494,12 +652,6 @@
 
   void do_add (const std::string& dir, bool at_end, bool warn);
 
-  void remove_fcn_map (const std::string& dir, const string_vector& fcn_files);
-
-  void remove_private_fcn_map (const std::string& dir);
-
-  void remove_method_map (const std::string& dir);
-
   bool do_remove (const std::string& dir);
 
   void do_update (void) const;
@@ -508,23 +660,33 @@
   check_file_type (std::string& fname, int type, int possible_types,
                    const std::string& fcn, const char *who);
 
-  std::string do_find_fcn (const std::string& fcn,
-                           std::string& dir_name,
-                           int type = M_FILE | OCT_FILE | MEX_FILE) const;
+  bool is_package (const std::string& name) const;
+
+  loader& get_loader (const std::string& name) const
+  {
+    if (! name.empty () && is_package (name))
+      {
+        loader_map_iterator l = loader_map.find (name);
 
-  std::string do_find_private_fcn (const std::string& dir,
-                                   const std::string& fcn,
-                                   int type = M_FILE | OCT_FILE | MEX_FILE) const;
+        if (l == loader_map.end ())
+          l = loader_map.insert (loader_map.end (),
+                                 loader_map_type::value_type (name, loader (name)));
 
-  std::string do_find_method (const std::string& class_name,
-                              const std::string& meth,
-                              std::string& dir_name,
-                              int type = M_FILE | OCT_FILE | MEX_FILE) const;
+        return l->second;
+      }
 
-  std::list<std::string> do_methods (const std::string& class_name) const;
+    return default_loader;
+  }
 
   std::list<std::string> do_overloads (const std::string& meth) const;
 
+  bool do_find_package (const std::string& package_name) const
+  {
+    return (loader_map.find (package_name) != loader_map.end ());
+  }
+
+  std::list<std::string> do_get_all_package_names (bool only_top_level) const;
+
   std::string do_find_file (const std::string& file) const;
 
   std::string do_find_dir (const std::string& dir) const;
@@ -559,11 +721,8 @@
   std::string do_get_command_line_path (void) const
   { return command_line_path; }
 
-  void add_to_fcn_map (const dir_info& di, bool at_end) const;
-
-  void add_to_private_fcn_map (const dir_info& di) const;
-
-  void add_to_method_map (const dir_info& di, bool at_end) const;
+  void add (const dir_info& di, bool at_end,
+            const std::string& pname = std::string ()) const;
 
   friend dir_info::fcn_file_map_type get_fcn_files (const std::string& d);
 };
--- a/libinterp/corefcn/load-save.cc
+++ b/libinterp/corefcn/load-save.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -215,8 +215,8 @@
   std::ifstream file (fname.c_str ());
   OCTAVE_LOCAL_BUFFER (unsigned char, magic, 2);
 
-  if (file.read (reinterpret_cast<char *> (magic), 2) && magic[0] == 0x1f &&
-      magic[1] == 0x8b)
+  if (file.read (reinterpret_cast<char *> (magic), 2) && magic[0] == 0x1f
+      && magic[1] == 0x8b)
     retval = true;
 
   file.close ();
@@ -498,26 +498,7 @@
 std::string
 find_file_to_load (const std::string& name, const std::string& orig_name)
 {
-  std::string fname = name;
-
-  if (! (octave_env::absolute_pathname (fname)
-         || octave_env::rooted_relative_pathname (fname)))
-    {
-      file_stat fs (fname);
-
-      if (! (fs.exists () && fs.is_reg ()))
-        {
-          std::string tmp
-            = octave_env::make_absolute (load_path::find_file (fname));
-
-          if (! tmp.empty ())
-            {
-              warning_with_id ("Octave:load-file-in-path",
-                               "load: file found in load path");
-              fname = tmp;
-            }
-        }
-    }
+  std::string fname = find_data_file_in_load_path ("load", name, true);
 
   size_t dot_pos = fname.rfind (".");
   size_t sep_pos = fname.find_last_of (file_ops::dir_sep_chars ());
@@ -1071,7 +1052,8 @@
   string_vector retval;
   int argc = argv.length ();
 
-  bool do_double = false, do_tabs = false;
+  bool do_double = false;
+  bool do_tabs = false;
 
   for (int i = 0; i < argc; i++)
     {
@@ -1224,7 +1206,7 @@
         char headertext[128];
 
         time (&now);
-        bdt = *gmtime (&now);
+        bdt = *gnulib::gmtime (&now);
         memset (headertext, ' ', 124);
         // ISO 8601 format date
         nstrftime (headertext, 124, "MATLAB 5.0 MAT-file, written by Octave "
@@ -1494,23 +1476,24 @@
     }
 }
 
-DEFUN (save, args, ,
+DEFUN (save, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Command} {} save file\n\
 @deftypefnx {Command} {} save options file\n\
 @deftypefnx {Command} {} save options file @var{v1} @var{v2} @dots{}\n\
 @deftypefnx {Command} {} save options file -struct @var{STRUCT} @var{f1} @var{f2} @dots{}\n\
+@deftypefnx {Command} {} save @code{\"-\"} @var{v1} @var{v2} @dots{}\n\
+@deftypefnx {Built-in Function} {@var{s} =} save (@code{\"-\"} @var{v1} @var{v2} @dots{})\n\
 Save the named variables @var{v1}, @var{v2}, @dots{}, in the file\n\
-@var{file}.  The special filename @samp{-} may be used to write\n\
-output to the terminal.  If no variable names are listed, Octave saves\n\
-all the variables in the current scope.  Otherwise, full variable names or\n\
-pattern syntax can be used to specify the variables to save.\n\
-If the @option{-struct} modifier is used, fields @var{f1} @var{f2} @dots{}\n\
-of the scalar structure @var{STRUCT} are saved as if they were variables\n\
-with corresponding names.\n\
-Valid options for the @code{save} command are listed in the following table.\n\
-Options that modify the output format override the format specified by\n\
-@code{save_default_options}.\n\
+@var{file}.  The special filename @samp{-} may be used to return the\n\
+content of the variables as a string.  If no variable names are listed,\n\
+Octave saves all the variables in the current scope.  Otherwise, full\n\
+variable names or pattern syntax can be used to specify the variables to\n\
+save.  If the @option{-struct} modifier is used, fields @var{f1} @var{f2}\n\
+@dots{} of the scalar structure @var{STRUCT} are saved as if they were\n\
+variables with corresponding names.  Valid options for the @code{save}\n\
+command are listed in the following table.  Options that modify the output\n\
+format override the format specified by @code{save_default_options}.\n\
 \n\
 If save is invoked using the functional form\n\
 \n\
@@ -1522,6 +1505,9 @@
 then the @var{options}, @var{file}, and variable name arguments\n\
 (@var{v1}, @dots{}) must be specified as character strings.\n\
 \n\
+If called with a filename of @qcode{\"-\"}, write the output to stdout\n\
+if nargout is 0, otherwise return the output in a character string.\n\
+\n\
 @table @code\n\
 @item -append\n\
 Append to the destination instead of overwriting.\n\
@@ -1621,8 +1607,6 @@
 {
   octave_value_list retval;
 
-  int argc = args.length ();
-
   string_vector argv = args.make_argv ();
 
   if (error_state)
@@ -1646,7 +1630,7 @@
   // override from command line
   argv = parse_save_options (argv, format, append, save_as_floats,
                              use_zlib);
-  argc = argv.length ();
+  int argc = argv.length ();
   int i = 0;
 
   if (error_state)
@@ -1679,11 +1663,14 @@
           if (append)
             warning ("save: ignoring -append option for output to stdout");
 
-          // FIXME: should things intended for the screen
-          //        end up in an octave_value (string)?
-
-          save_vars (argv, i, argc, octave_stdout, format,
-                     save_as_floats, true);
+          if (nargout == 0)
+            save_vars (argv, i, argc, std::cout, format, save_as_floats, true);
+          else
+            {
+              std::ostringstream output_buf;
+              save_vars (argv, i, argc, output_buf, format, save_as_floats, true);
+              retval = octave_value (output_buf.str());
+            }
         }
     }
 
@@ -1726,8 +1713,8 @@
               return retval;
             }
 
-          bool write_header_info = ! (append &&
-                                      H5Fis_hdf5 (fname.c_str ()) > 0);
+          bool write_header_info
+            = ! (append && H5Fis_hdf5 (fname.c_str ()) > 0);
 
           hdf5_ofstream hdf5_file (fname.c_str (), mode);
 
--- a/libinterp/corefcn/load-save.h
+++ b/libinterp/corefcn/load-save.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -41,9 +41,7 @@
   LS_MAT_BINARY,
   LS_MAT5_BINARY,
   LS_MAT7_BINARY,
-#ifdef HAVE_HDF5
   LS_HDF5,
-#endif /* HAVE_HDF5 */
   LS_UNKNOWN
 };
 
--- a/libinterp/corefcn/lookup.cc
+++ b/libinterp/corefcn/lookup.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 VZLU Prague a.s., Czech Republic
+Copyright (C) 2008-2015 VZLU Prague a.s., Czech Republic
 
 This file is part of Octave.
 
@@ -52,13 +52,13 @@
 struct icmp_char_lt : public std::binary_function<char, char, bool>
 {
   bool operator () (char x, char y) const
-    { return std::toupper (x) < std::toupper (y); }
+  { return std::toupper (x) < std::toupper (y); }
 };
 
 struct icmp_char_gt : public std::binary_function<char, char, bool>
 {
   bool operator () (char x, char y) const
-    { return std::toupper (x) > std::toupper (y); }
+  { return std::toupper (x) > std::toupper (y); }
 };
 
 // FIXME: maybe these should go elsewhere?
@@ -115,7 +115,8 @@
   octave_value retval;
 
   Array<octave_idx_type> idx = array.lookup (values);
-  octave_idx_type n = array.numel (), nval = values.numel ();
+  octave_idx_type n = array.numel ();
+  octave_idx_type nval = values.numel ();
 
   // Post-process.
   if (match_bool)
@@ -246,7 +247,8 @@
       return retval;
     }
 
-  octave_value table = args(0), y = args(1);
+  octave_value table = args(0);
+  octave_value y = args(1);
   if (table.ndims () > 2 || (table.columns () > 1 && table.rows () > 1))
     warning ("lookup: table is not a vector");
 
--- a/libinterp/corefcn/ls-ascii-helper.cc
+++ b/libinterp/corefcn/ls-ascii-helper.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Benjamin Lindner
+Copyright (C) 2009-2015 Benjamin Lindner
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-ascii-helper.h
+++ b/libinterp/corefcn/ls-ascii-helper.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Benjamin Lindner
+Copyright (C) 2009-2015 Benjamin Lindner
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-hdf5.cc
+++ b/libinterp/corefcn/ls-hdf5.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -55,6 +55,7 @@
 #include "error.h"
 #include "gripes.h"
 #include "load-save.h"
+#include "oct-hdf5-id.h"
 #include "oct-obj.h"
 #include "oct-map.h"
 #include "ov-cell.h"
@@ -247,7 +248,7 @@
 herr_t
 hdf5_read_next_data (hid_t group_id, const char *name, void *dv)
 {
-  hdf5_callback_data *d = static_cast <hdf5_callback_data *> (dv);
+  hdf5_callback_data *d = static_cast<hdf5_callback_data *> (dv);
   hid_t type_id = -1;
   hid_t type_class_id = -1;
   hid_t data_id = -1;
@@ -263,7 +264,7 @@
   // Allow identifiers as all digits so we can load lists saved by
   // earlier versions of Octave.
 
-  if (! ident_valid )
+  if (! ident_valid)
     {
       // fix the identifier, replacing invalid chars with underscores
       vname = make_valid_identifier (vname);
@@ -528,6 +529,7 @@
         {
           warning ("load: can't read '%s' (unknown datatype)", name);
           retval = 0; // unknown datatype; skip
+          return retval;
         }
 
       // check for OCTAVE_GLOBAL attribute:
@@ -586,6 +588,8 @@
                 bool& global, octave_value& tc, std::string& doc,
                 const string_vector& argv, int argv_idx, int argc)
 {
+  check_hdf5_id_type ();
+
   std::string retval;
 
   doc.resize (0);
@@ -615,7 +619,7 @@
 
       len = H5Gget_objname_by_idx (hs.file_id, hs.current_item, 0, 0);
       var_name.resize (len+1);
-      H5Gget_objname_by_idx( hs.file_id, hs.current_item, &var_name[0], len+1);
+      H5Gget_objname_by_idx (hs.file_id, hs.current_item, &var_name[0], len+1);
 
       for (int i = argv_idx; i < argc; i++)
         {
@@ -738,7 +742,8 @@
   hsize_t sz = d.length ();
   OCTAVE_LOCAL_BUFFER (octave_idx_type, dims, sz);
   bool empty = false;
-  hid_t space_hid = -1, data_hid = -1;
+  hid_t space_hid = -1;
+  hid_t data_hid = -1;
   int retval;
   for (hsize_t i = 0; i < sz; i++)
     {
@@ -865,7 +870,9 @@
                bool mark_as_global, bool save_as_floats)
 {
   hsize_t dims[3];
-  hid_t type_id = -1, space_id = -1, data_id = -1, data_type_id = -1;
+  hid_t type_id, space_id, data_id, data_type_id;
+  type_id = space_id = data_id = data_type_id = -1;
+
   bool retval = false;
   octave_value val = tc;
   // FIXME: diagonal & permutation matrices currently don't know how to save
@@ -948,6 +955,8 @@
                 const std::string& name, const std::string& doc,
                 bool mark_as_global, bool save_as_floats)
 {
+  check_hdf5_id_type ();
+
   hdf5_ofstream& hs = dynamic_cast<hdf5_ofstream&> (os);
 
   return add_hdf5_data (hs.file_id, tc, name, doc,
--- a/libinterp/corefcn/ls-hdf5.h
+++ b/libinterp/corefcn/ls-hdf5.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-mat-ascii.cc
+++ b/libinterp/corefcn/ls-mat-ascii.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -172,8 +172,8 @@
 
               beg = buf.find_first_not_of (", \t", end);
 
-              if (beg == std::string::npos || (buf[beg] == '\r' &&
-                                               beg == buf.length () - 1))
+              if (beg == std::string::npos
+                  || (buf[beg] == '\r' && beg == buf.length () - 1))
                 {
                   // We had a line with trailing spaces and
                   // ending with a CRLF, so this should look like EOL,
--- a/libinterp/corefcn/ls-mat-ascii.h
+++ b/libinterp/corefcn/ls-mat-ascii.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-mat4.cc
+++ b/libinterp/corefcn/ls-mat4.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -461,7 +461,6 @@
       len = nr * nc;
     }
 
-
   // LEN includes the terminating character, and the file is also
   // supposed to include it.
 
@@ -489,7 +488,10 @@
           for (octave_idx_type j = 0; j < ncol; j++)
             buf[j*nrow+i] = static_cast<double> (*s++ & 0x00FF);
         }
-      os.write (reinterpret_cast<char *> (buf), nrow*ncol*sizeof (double));
+      std::streamsize n_bytes = static_cast<std::streamsize> (nrow) *
+                                static_cast<std::streamsize> (ncol) *
+                                sizeof (double);
+      os.write (reinterpret_cast<char *> (buf), n_bytes);
     }
   else if (tc.is_range ())
     {
@@ -518,7 +520,8 @@
 
           for (octave_idx_type i = 0; i < len; i++)
             dtmp[i] = m.ridx (i) + 1;
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          std::streamsize n_bytes = 8 * static_cast<std::streamsize> (len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           ds = nr;
           os.write (reinterpret_cast<const char *> (&ds), 8);
 
@@ -526,19 +529,19 @@
           for (octave_idx_type j = 0; j < nc; j++)
             for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++)
               dtmp[ii++] = j + 1;
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           ds = nc;
           os.write (reinterpret_cast<const char *> (&ds), 8);
 
           for (octave_idx_type i = 0; i < len; i++)
             dtmp[i] = std::real (m.data (i));
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           ds = 0.;
           os.write (reinterpret_cast<const char *> (&ds), 8);
 
           for (octave_idx_type i = 0; i < len; i++)
             dtmp[i] = std::imag (m.data (i));
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           os.write (reinterpret_cast<const char *> (&ds), 8);
         }
       else
@@ -547,7 +550,8 @@
 
           for (octave_idx_type i = 0; i < len; i++)
             dtmp[i] = m.ridx (i) + 1;
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          std::streamsize n_bytes = 8 * static_cast<std::streamsize> (len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           ds = nr;
           os.write (reinterpret_cast<const char *> (&ds), 8);
 
@@ -555,11 +559,11 @@
           for (octave_idx_type j = 0; j < nc; j++)
             for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++)
               dtmp[ii++] = j + 1;
-          os.write (reinterpret_cast<const char *> (dtmp), 8 * len);
+          os.write (reinterpret_cast<const char *> (dtmp), n_bytes);
           ds = nc;
           os.write (reinterpret_cast<const char *> (&ds), 8);
 
-          os.write (reinterpret_cast<const char *> (m.data ()), 8 * len);
+          os.write (reinterpret_cast<const char *> (m.data ()), n_bytes);
           ds = 0.;
           os.write (reinterpret_cast<const char *> (&ds), 8);
         }
@@ -567,7 +571,8 @@
   else if (tc.is_real_matrix ())
     {
       Matrix m = tc.matrix_value ();
-      os.write (reinterpret_cast<const char *> (m.data ()), 8 * len);
+      std::streamsize n_bytes = 8 * static_cast<std::streamsize> (len);
+      os.write (reinterpret_cast<const char *> (m.data ()), n_bytes);
     }
   else if (tc.is_complex_scalar ())
     {
@@ -578,9 +583,10 @@
     {
       ComplexMatrix m_cmplx = tc.complex_matrix_value ();
       Matrix m = ::real (m_cmplx);
-      os.write (reinterpret_cast<const char *> (m.data ()), 8 * len);
+      std::streamsize n_bytes = 8 * static_cast<std::streamsize> (len);
+      os.write (reinterpret_cast<const char *> (m.data ()), n_bytes);
       m = ::imag (m_cmplx);
-      os.write (reinterpret_cast<const char *> (m.data ()), 8 * len);
+      os.write (reinterpret_cast<const char *> (m.data ()), n_bytes);
     }
   else
     gripe_wrong_type_arg ("save", tc, false);
--- a/libinterp/corefcn/ls-mat4.h
+++ b/libinterp/corefcn/ls-mat4.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-mat5.cc
+++ b/libinterp/corefcn/ls-mat5.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -264,7 +264,8 @@
       if (len > 0) \
         { \
           OCTAVE_LOCAL_BUFFER (TYPE, ptr, len); \
-          stream.read (reinterpret_cast<char *> (ptr), size * len); \
+          std::streamsize n_bytes = size * static_cast<std::streamsize> (len); \
+          stream.read (reinterpret_cast<char *> (ptr), n_bytes); \
           if (swap) \
             swap_bytes< size > (ptr, len); \
           for (octave_idx_type i = 0; i < len; i++) \
@@ -439,7 +440,7 @@
   unsigned int upper;
   int32_t temp;
 
-  if (! is.read (reinterpret_cast<char *> (&temp), 4 ))
+  if (! is.read (reinterpret_cast<char *> (&temp), 4))
     goto data_read_error;
 
   if (swap)
@@ -456,7 +457,7 @@
     }
   else
     {
-      if (! is.read (reinterpret_cast<char *> (&temp), 4 ))
+      if (! is.read (reinterpret_cast<char *> (&temp), 4))
         goto data_read_error;
       if (swap)
         swap_bytes<4> (&temp);
@@ -631,8 +632,8 @@
 
   // array flags subelement
   int32_t len;
-  if (read_mat5_tag (is, swap, type, len, is_small_data_element) ||
-      type != miUINT32 || len != 8 || is_small_data_element)
+  if (read_mat5_tag (is, swap, type, len, is_small_data_element)
+      || type != miUINT32 || len != 8 || is_small_data_element)
     {
       error ("load: invalid array flags subelement");
       goto early_read_error;
@@ -650,7 +651,7 @@
   arrayclass = static_cast<arrayclasstype> (flags & 0xff);
 
   int32_t tmp_nzmax;
-  read_int (is, swap, tmp_nzmax);   // max number of non-zero in sparse
+  read_int (is, swap, tmp_nzmax);   // max number of nonzero in sparse
   nzmax = tmp_nzmax;
 
   // dimensions array subelement
@@ -658,8 +659,8 @@
     {
       int32_t dim_len;
 
-      if (read_mat5_tag (is, swap, type, dim_len, is_small_data_element) ||
-          type != miINT32)
+      if (read_mat5_tag (is, swap, type, dim_len, is_small_data_element)
+          || type != miINT32)
         {
           error ("load: invalid dimensions array subelement");
           goto early_read_error;
@@ -694,7 +695,8 @@
       dims(1) = 1;
     }
 
-  if (read_mat5_tag (is, swap, type, len, is_small_data_element) || !INT8(type))
+  if (read_mat5_tag (is, swap, type, len, is_small_data_element)
+      || ! INT8(type))
     {
       error ("load: invalid array name subelement");
       goto early_read_error;
@@ -709,7 +711,7 @@
 
     if (len)
       {
-        if (! is.read (name, len ))
+        if (! is.read (name, len))
           goto data_read_error;
 
         is.seekg (tmp_pos + static_cast<std::streamoff>
@@ -913,9 +915,9 @@
                 std::string mroot =
                   m0.contents ("matlabroot").string_value ();
 
-                if ((fpath.length () >= mroot.length ()) &&
-                    fpath.substr (0, mroot.length ()) == mroot &&
-                    OCTAVE_EXEC_PREFIX != mroot)
+                if ((fpath.length () >= mroot.length ())
+                    && fpath.substr (0, mroot.length ()) == mroot
+                    && OCTAVE_EXEC_PREFIX != mroot)
                   {
                     // If fpath starts with matlabroot, and matlabroot
                     // doesn't equal octave_config_info ("exec_prefix")
@@ -937,7 +939,7 @@
                         std::string dir_name = str.substr (0, xpos);
 
                         octave_function *fcn
-                          = load_fcn_from_file (str, dir_name, "", fname);
+                          = load_fcn_from_file (str, dir_name, "", "", fname);
 
                         if (fcn)
                           {
@@ -966,7 +968,7 @@
                         std::string dir_name = str.substr (0, xpos);
 
                         octave_function *fcn
-                          = load_fcn_from_file (str, dir_name, "", fname);
+                          = load_fcn_from_file (str, dir_name, "", "", fname);
 
                         if (fcn)
                           {
@@ -991,7 +993,7 @@
                     std::string dir_name = fpath.substr (0, xpos);
 
                     octave_function *fcn
-                      = load_fcn_from_file (fpath, dir_name, "", fname);
+                      = load_fcn_from_file (fpath, dir_name, "", "", fname);
 
                     if (fcn)
                       {
@@ -1096,7 +1098,7 @@
             int32_t fn_type;
             int32_t fn_len;
             if (read_mat5_tag (is, swap, fn_type, fn_len, is_small_data_element)
-                || !INT8(fn_type))
+                || ! INT8(fn_type))
               {
                 error ("load: invalid field name subelement");
                 goto data_read_error;
@@ -1157,8 +1159,8 @@
       {
         isclass = true;
 
-        if (read_mat5_tag (is, swap, type, len, is_small_data_element) ||
-            !INT8(type))
+        if (read_mat5_tag (is, swap, type, len, is_small_data_element)
+            || ! INT8(type))
           {
             error ("load: invalid class name");
             goto skip_ahead;
@@ -1171,7 +1173,7 @@
 
           if (len)
             {
-              if (! is.read (name, len ))
+              if (! is.read (name, len))
                 goto data_read_error;
 
               is.seekg (tmp_pos + static_cast<std::streamoff>
@@ -1201,7 +1203,7 @@
             goto data_read_error;
           }
 
-        if (! is.read (reinterpret_cast<char *> (&field_name_length), fn_len ))
+        if (! is.read (reinterpret_cast<char *> (&field_name_length), fn_len))
           goto data_read_error;
 
         if (swap)
@@ -1210,7 +1212,7 @@
         // field name subelement.  The length of this subelement tells
         // us how many fields there are.
         if (read_mat5_tag (is, swap, fn_type, fn_len, is_small_data_element)
-            || !INT8(fn_type))
+            || ! INT8(fn_type))
           {
             error ("load: invalid field name subelement");
             goto data_read_error;
@@ -1277,8 +1279,8 @@
                       warning ("load: unable to reconstruct object inheritance");
 
                     tc = cls;
-                    if (load_path::find_method (classname, "loadobj") !=
-                        std::string ())
+                    if (load_path::find_method (classname, "loadobj")
+                        != std::string ())
                       {
                         octave_value_list tmp = feval ("loadobj", tc, 1);
 
@@ -1568,7 +1570,8 @@
 read_mat5_binary_file_header (std::istream& is, bool& swap, bool quiet,
                               const std::string& filename)
 {
-  int16_t version=0, magic=0;
+  int16_t version = 0;
+  int16_t magic = 0;
   uint64_t subsys_offset;
 
   is.seekg (116, std::ios::beg);
@@ -1674,7 +1677,8 @@
       OCTAVE_LOCAL_BUFFER (TYPE, ptr, count); \
       for (octave_idx_type i = 0; i < count; i++) \
         ptr[i] = static_cast<TYPE> (data[i]); \
-      stream.write (reinterpret_cast<char *> (ptr), count * sizeof (TYPE)); \
+      std::streamsize n_bytes = sizeof (TYPE) * static_cast<std::streamsize> (count); \
+      stream.write (reinterpret_cast<char *> (ptr), n_bytes); \
     } \
   while (0)
 
--- a/libinterp/corefcn/ls-mat5.h
+++ b/libinterp/corefcn/ls-mat5.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-oct-ascii.cc
+++ b/libinterp/corefcn/ls-oct-ascii.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-oct-ascii.h
+++ b/libinterp/corefcn/ls-oct-ascii.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-oct-binary.cc
+++ b/libinterp/corefcn/ls-oct-binary.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -207,7 +207,7 @@
       {
         // FIXME:
         // This is cruft, since its for a save type that is old. Maybe
-        // this is taking backward compatability too far!!
+        // this is taking backward compatibility too far!!
         int32_t len;
         if (! is.read (reinterpret_cast<char *> (&len), 4))
           goto data_read_error;
--- a/libinterp/corefcn/ls-oct-binary.h
+++ b/libinterp/corefcn/ls-oct-binary.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-utils.cc
+++ b/libinterp/corefcn/ls-utils.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/ls-utils.h
+++ b/libinterp/corefcn/ls-utils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/lsode.cc
+++ b/libinterp/corefcn/lsode.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/lu.cc
+++ b/libinterp/corefcn/lu.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -137,7 +137,7 @@
 is embedded into @var{U} to give a return value similar to the full case.\n\
 For both full and sparse matrices, @code{lu} loses the permutation\n\
 information.\n\
-@seealso{luupdate, chol, hess, qr, qz, schur, svd}\n\
+@seealso{luupdate, ilu, chol, hess, qr, qz, schur, svd}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -158,23 +158,20 @@
   int n = 1;
   while (n < nargin && ! error_state)
     {
-      if (args (n).is_string ())
+      if (args(n).is_string ())
         {
           std::string tmp = args(n++).string_value ();
 
-          if (! error_state )
-            {
-              if (tmp.compare ("vector") == 0)
-                vecout = true;
-              else
-                error ("lu: unrecognized string argument");
-            }
+          if (tmp.compare ("vector") == 0)
+            vecout = true;
+          else
+            error ("lu: unrecognized string argument");
         }
       else
         {
           Matrix tmp = args(n++).matrix_value ();
 
-          if (! error_state )
+          if (! error_state)
             {
               if (!issparse)
                 error ("lu: can not define pivoting threshold THRES for full matrices");
@@ -211,7 +208,7 @@
 
           SparseMatrix m = arg.sparse_matrix_value ();
 
-          if ( nargout < 4 )
+          if (nargout < 4)
             {
 
               ColumnVector Qinit;
@@ -220,8 +217,8 @@
                 Qinit (i) = i;
               SparseLU fact (m, Qinit, thres, false, true);
 
-              if ( nargout < 2 )
-                  retval(0) = fact.Y ();
+              if (nargout < 2)
+                retval(0) = fact.Y ();
               else
                 {
 
@@ -233,15 +230,15 @@
 
                   PermMatrix P = fact.Pr_mat ();
                   SparseMatrix L = fact.L ();
-                  if ( nargout < 3 )
+                  if (nargout < 3)
                       retval(0)
-                        = octave_value ( P.transpose () * L,
+                        = octave_value (P.transpose () * L,
                             MatrixType (MatrixType::Permuted_Lower,
                                         nr, fact.row_perm ()));
                   else
                     {
                       retval(0) = L;
-                      if ( vecout )
+                      if (vecout)
                         retval(2) = fact.Pr_vec();
                       else
                         retval(2) = P;
@@ -253,25 +250,25 @@
           else
             {
 
-                SparseLU fact (m, thres, scale);
+              SparseLU fact (m, thres, scale);
 
-                if (scale)
-                  retval(4) = fact.R ();
+              if (scale)
+                retval(4) = fact.R ();
 
-                if (vecout)
-                  {
-                    retval(3) = fact.Pc_vec ();
-                    retval(2) = fact.Pr_vec ();
-                  }
-                else
-                  {
-                    retval(3) = fact.Pc_mat ();
-                    retval(2) = fact.Pr_mat ();
-                  }
-                retval(1) = octave_value (fact.U (),
-                                          MatrixType (MatrixType::Upper));
-                retval(0) = octave_value (fact.L (),
-                                          MatrixType (MatrixType::Lower));
+              if (vecout)
+                {
+                  retval(3) = fact.Pc_vec ();
+                  retval(2) = fact.Pr_vec ();
+                }
+              else
+                {
+                  retval(3) = fact.Pc_mat ();
+                  retval(2) = fact.Pr_mat ();
+                }
+              retval(1) = octave_value (fact.U (),
+                                        MatrixType (MatrixType::Upper));
+              retval(0) = octave_value (fact.L (),
+                                        MatrixType (MatrixType::Lower));
             }
 
         }
@@ -279,7 +276,7 @@
         {
           SparseComplexMatrix m = arg.sparse_complex_matrix_value ();
 
-          if ( nargout < 4 )
+          if (nargout < 4)
             {
 
               ColumnVector Qinit;
@@ -288,9 +285,9 @@
                 Qinit (i) = i;
               SparseComplexLU fact (m, Qinit, thres, false, true);
 
-              if ( nargout < 2 )
+              if (nargout < 2)
 
-                  retval(0) = fact.Y ();
+                retval(0) = fact.Y ();
 
               else
                 {
@@ -303,15 +300,15 @@
 
                   PermMatrix P = fact.Pr_mat ();
                   SparseComplexMatrix L = fact.L ();
-                  if ( nargout < 3 )
-                      retval(0)
-                        = octave_value ( P.transpose () * L,
-                            MatrixType (MatrixType::Permuted_Lower,
-                                        nr, fact.row_perm ()));
+                  if (nargout < 3)
+                    retval(0)
+                      = octave_value (P.transpose () * L,
+                                      MatrixType (MatrixType::Permuted_Lower,
+                                                  nr, fact.row_perm ()));
                   else
                     {
                       retval(0) = L;
-                      if ( vecout )
+                      if (vecout)
                         retval(2) = fact.Pr_vec();
                       else
                         retval(2) = P;
@@ -323,25 +320,25 @@
           else
             {
 
-                SparseComplexLU fact (m, thres, scale);
+              SparseComplexLU fact (m, thres, scale);
 
-                if (scale)
-                  retval(4) = fact.R ();
+              if (scale)
+                retval(4) = fact.R ();
 
-                if (vecout)
-                  {
-                    retval(3) = fact.Pc_vec ();
-                    retval(2) = fact.Pr_vec ();
-                  }
-                else
-                  {
-                    retval(3) = fact.Pc_mat ();
-                    retval(2) = fact.Pr_mat ();
-                  }
-                retval(1) = octave_value (fact.U (),
-                                          MatrixType (MatrixType::Upper));
-                retval(0) = octave_value (fact.L (),
-                                          MatrixType (MatrixType::Lower));
+              if (vecout)
+                {
+                  retval(3) = fact.Pc_vec ();
+                  retval(2) = fact.Pr_vec ();
+                }
+              else
+                {
+                  retval(3) = fact.Pc_mat ();
+                  retval(2) = fact.Pr_mat ();
+                }
+              retval(1) = octave_value (fact.U (),
+                                        MatrixType (MatrixType::Upper));
+              retval(0) = octave_value (fact.L (),
+                                        MatrixType (MatrixType::Lower));
             }
 
         }
@@ -592,10 +589,12 @@
 bool check_lu_dims (const octave_value& l, const octave_value& u,
                     const octave_value& p)
 {
-  octave_idx_type m = l.rows (), k = u.rows (), n = u.columns ();
+  octave_idx_type m = l.rows ();
+  octave_idx_type k = u.rows ();
+  octave_idx_type n = u.columns ();
   return ((l.ndims () == 2 && u.ndims () == 2 && k == l.columns ())
-          && k == std::min (m, n) &&
-          (p.is_undefined () || p.rows () == m));
+          && k == std::min (m, n)
+          && (p.is_undefined () || p.rows () == m));
 }
 
 DEFUN (luupdate, args, ,
@@ -840,6 +839,20 @@
 %! assert (norm (vec (P'*L*U - A - u*v.'), Inf) < norm (A)*1e1*eps);
 %!
 %!testif HAVE_QRUPDATE_LUU
+%! [L,U,P] = lu (A);
+%! [~,ordcols] = max (P,[],1);
+%! [~,ordrows] = max (P,[],2);
+%! P1 = eye (size(P))(:,ordcols);
+%! P2 = eye (size(P))(ordrows,:);
+%! assert(P1 == P);
+%! assert(P2 == P);
+%! [L,U,P] = luupdate (L,U,P,u,v);
+%! [L,U,P1] = luupdate (L,U,P1,u,v);
+%! [L,U,P2] = luupdate (L,U,P2,u,v);
+%! assert(P1 == P);
+%! assert(P2 == P);
+%!
+%!testif HAVE_QRUPDATE_LUU
 %! [L,U,P] = lu (Ac);
 %! [L,U,P] = luupdate (L,U,P,uc,vc);
 %! assert (norm (vec (tril (L)-L), Inf) == 0);
--- a/libinterp/corefcn/luinc.cc
+++ b/libinterp/corefcn/luinc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -37,7 +37,7 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
-DEFUN (luinc, args, nargout,
+DEFUN (__luinc__, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, '0')\n\
 @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{droptol})\n\
@@ -49,7 +49,7 @@
 \n\
 Called with a second argument of @qcode{'0'}, the zero-level incomplete\n\
 LU@tie{}factorization is produced.  This creates a factorization of @var{A}\n\
-where the position of the non-zero arguments correspond to the same\n\
+where the position of the nonzero arguments correspond to the same\n\
 positions as in the matrix @var{A}.\n\
 \n\
 Alternatively, the fill-in of the incomplete LU@tie{}factorization can\n\
@@ -93,7 +93,7 @@
 \n\
 Given the string argument @qcode{\"vector\"}, @code{luinc} returns the\n\
 values of @var{p} @var{q} as vector values.\n\
-@seealso{sparse, lu}\n\
+@seealso{sparse, lu, ilu, ichol}\n\
 @end deftypefn")
 {
   int nargin = args.length ();
@@ -177,7 +177,7 @@
         {
           std::string tmp = args(2).string_value ();
 
-          if (! error_state )
+          if (! error_state)
             {
               if (tmp.compare ("vector") == 0)
                 vecout = true;
--- a/libinterp/corefcn/mappers.cc
+++ b/libinterp/corefcn/mappers.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -114,6 +114,20 @@
 %! v = single ([0, pi/6, pi/4, pi/3, pi/2, 2*pi/3, 3*pi/4, 5*pi/6, pi]);
 %! assert (acos (x), v, sqrt (eps ("single")));
 
+## Test values on either side of branch cut
+%!test
+%! rval = 0;
+%! ival = 1.31695789692481635;
+%! obs = acos ([2, 2-i*eps, 2+i*eps]);
+%! exp = [rval + ival*i, rval + ival*i, rval - ival*i];
+%! assert (obs, exp, 2*eps);
+%! rval = pi;
+%! obs = acos ([-2, -2-i*eps, -2+i*eps]);
+%! exp = [rval - ival*i, rval + ival*i, rval - ival*i];
+%! assert (obs, exp, 2*eps);
+%! assert (acos ([2 0]),  [ival*i, pi/2], 2*eps);
+%! assert (acos ([2 0i]), [ival*i, pi/2], 2*eps);
+
 %!error acos ()
 %!error acos (1, 2)
 */
@@ -141,10 +155,22 @@
 %! assert (acosh (x), v, sqrt (eps));
 
 %!test
+%! re = 2.99822295029797;
+%! im = pi/2;
+%! assert (acosh (10i), re + i*im);
+%! assert (acosh (-10i), re - i*im);
+
+%!test
 %! x = single ([1, 0, -1, 0]);
 %! v = single ([0, pi/2*i, pi*i, pi/2*i]);
 %! assert (acosh (x), v, sqrt (eps ("single")));
 
+%!test
+%! re = single (2.99822295029797);
+%! im = single (pi/2);
+%! assert (acosh (single (10i)), re + i*im, 5*eps ("single"));
+%! assert (acosh (single (-10i)), re - i*im, 5*eps ("single"));
+
 %!error acosh ()
 %!error acosh (1, 2)
 */
@@ -236,12 +262,32 @@
 }
 
 /*
-%!test
+%!shared rt2, rt3
 %! rt2 = sqrt (2);
 %! rt3 = sqrt (3);
+
+%!test
 %! x = [0, 1/2, rt2/2, rt3/2, 1, rt3/2, rt2/2, 1/2, 0];
 %! v = [0, pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6, 0];
-%! assert (all (abs (asin (x) - v) < sqrt (eps)));
+%! assert (asin (x), v, sqrt (eps));
+
+%!test
+%! x = single ([0, 1/2, rt2/2, rt3/2, 1, rt3/2, rt2/2, 1/2, 0]);
+%! v = single ([0, pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6, 0]);
+%! assert (asin (x), v, sqrt (eps ("single")));
+
+## Test values on either side of branch cut
+%!test
+%! rval = pi/2;
+%! ival = 1.31695789692481635;
+%! obs = asin ([2, 2-i*eps, 2+i*eps]);
+%! exp = [rval - ival*i, rval - ival*i, rval + ival*i];
+%! assert (obs, exp, 2*eps);
+%! obs = asin ([-2, -2-i*eps, -2+i*eps]);
+%! exp = [-rval + ival*i, -rval - ival*i, -rval + ival*i];
+%! assert (obs, exp, 2*eps);
+%! assert (asin ([2 0]),  [rval - ival*i, 0], 2*eps);
+%! assert (asin ([2 0i]), [rval - ival*i, 0], 2*eps);
 
 %!error asin ()
 %!error asin (1, 2)
@@ -895,15 +941,15 @@
 
 DEFUN (isfinite, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Mapping Function} {} isfinite (@var{x})\n\
-@deftypefnx {Mapping Function} {} finite (@var{x})\n\
+@deftypefn {Mapping Function} {} isfinite (@var{x})\n\
 Return a logical array which is true where the elements of @var{x} are\n\
 finite values and false where they are not.\n\
+\n\
 For example:\n\
 \n\
 @example\n\
 @group\n\
-finite ([13, Inf, NA, NaN])\n\
+isfinite ([13, Inf, NA, NaN])\n\
      @result{} [ 1, 0, 0, 0 ]\n\
 @end group\n\
 @end example\n\
@@ -920,16 +966,16 @@
 }
 
 /*
-%!assert (!finite (Inf))
-%!assert (!finite (NaN))
-%!assert (finite (rand (1,10)))
+%!assert (!isfinite (Inf))
+%!assert (!isfinite (NaN))
+%!assert (isfinite (rand (1,10)))
 
-%!assert (!finite (single (Inf)))
-%!assert (!finite (single (NaN)))
-%!assert (finite (single (rand (1,10))))
+%!assert (!isfinite (single (Inf)))
+%!assert (!isfinite (single (NaN)))
+%!assert (isfinite (single (rand (1,10))))
 
-%!error finite ()
-%!error finite (1, 2)
+%!error isfinite ()
+%!error isfinite (1, 2)
 */
 
 DEFUN (fix, args, ,
@@ -1024,7 +1070,13 @@
 @end example\n\
 \n\
 @end ifnottex\n\
-@seealso{gammainc, lgamma}\n\
+\n\
+Programming Note: The gamma function can grow quite large even for small\n\
+input values.  In many cases it may be preferable to use the natural\n\
+logarithm of the gamma function (@code{gammaln}) in calculations to minimize\n\
+loss of precision.  The final result is then\n\
+@code{exp (@var{result_using_gammaln}).}\n\
+@seealso{gammainc, gammaln, factorial}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -1574,8 +1626,8 @@
 
 DEFUN (lgamma, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Mapping Function} {} lgamma (@var{x})\n\
-@deftypefnx {Mapping Function} {} gammaln (@var{x})\n\
+@deftypefn  {Mapping Function} {} gammaln (@var{x})\n\
+@deftypefnx {Mapping Function} {} lgamma (@var{x})\n\
 Return the natural logarithm of the gamma function of @var{x}.\n\
 @seealso{gamma, gammainc}\n\
 @end deftypefn")
@@ -1592,30 +1644,30 @@
 /*
 %!test
 %! a = -1i*sqrt (-1/(6.4187*6.4187));
-%! assert (lgamma (a), lgamma (real (a)));
+%! assert (gammaln (a), gammaln (real (a)));
 
 %!test
 %! x = [.5, 1, 1.5, 2, 3, 4, 5];
 %! v = [sqrt(pi), 1, .5*sqrt(pi), 1, 2, 6, 24];
-%! assert (lgamma (x), log (v), sqrt (eps))
+%! assert (gammaln (x), log (v), sqrt (eps))
 
 %!test
 %! a = single (-1i*sqrt (-1/(6.4187*6.4187)));
-%! assert (lgamma (a), lgamma (real (a)));
+%! assert (gammaln (a), gammaln (real (a)));
 
 %!test
 %! x = single ([.5, 1, 1.5, 2, 3, 4, 5]);
 %! v = single ([sqrt(pi), 1, .5*sqrt(pi), 1, 2, 6, 24]);
-%! assert (lgamma (x), log (v), sqrt (eps ("single")))
+%! assert (gammaln (x), log (v), sqrt (eps ("single")))
 
 %!test
 %! x = [-1, 0, 1, Inf];
 %! v = [Inf, Inf, 0, Inf];
-%! assert (lgamma (x), v);
-%! assert (lgamma (single (x)), single (v));
+%! assert (gammaln (x), v);
+%! assert (gammaln (single (x)), single (v));
 
-%!error lgamma ()
-%!error lgamma (1,2)
+%!error gammaln ()
+%!error gammaln (1,2)
 */
 
 DEFUN (log, args, ,
@@ -1886,7 +1938,7 @@
 Return logical true if the value of @var{x} has its sign bit set.\n\
 Otherwise return logical false.  This behavior is consistent with the other\n\
 logical functions.  See@ref{Logical Values}.  The behavior differs from the\n\
-C language function which returns non-zero if the sign bit is set.\n\
+C language function which returns nonzero if the sign bit is set.\n\
 \n\
 This is not the same as @code{x < 0.0}, because IEEE 754 floating point\n\
 allows zero to be signed.  The comparison @code{-0.0 < 0.0} is false,\n\
@@ -2156,8 +2208,17 @@
 %!assert (tolower ({"ABC", "DEF", {"GHI", {"JKL"}}}), {"abc", "def", {"ghi", {"jkl"}}})
 %!assert (tolower (["ABC"; "DEF"]), ["abc"; "def"])
 %!assert (tolower ({["ABC"; "DEF"]}), {["abc";"def"]})
-%!assert (tolower (68), "d")
-%!assert (tolower ({[68, 68; 68, 68]}), {["dd";"dd"]})
+%!assert (tolower (68), 68)
+%!assert (tolower ({[68, 68; 68, 68]}), {[68, 68; 68, 68]})
+%!test
+%! classes = {@char, @double, @single, ...
+%!            @int8, @int16, @int32, @int64, ...
+%!            @uint8, @uint16, @uint32, @uint64};
+%! for i = 1:numel (classes)
+%!   cls = classes{i};
+%!   assert (class (tolower (cls (97))), class (cls (97)));
+%!   assert (class (tolower (cls ([98, 99]))), class (cls ([98, 99])));
+%! endfor
 %!test
 %! a(3,3,3,3) = "D";
 %! assert (tolower (a)(3,3,3,3), "d");
@@ -2207,8 +2268,17 @@
 %!assert (toupper ({"abc", "def", {"ghi", {"jkl"}}}), {"ABC", "DEF", {"GHI", {"JKL"}}})
 %!assert (toupper (["abc"; "def"]), ["ABC"; "DEF"])
 %!assert (toupper ({["abc"; "def"]}), {["ABC";"DEF"]})
-%!assert (toupper (100), "D")
-%!assert (toupper ({[100, 100; 100, 100]}), {["DD";"DD"]})
+%!assert (toupper (100), 100)
+%!assert (toupper ({[100, 100; 100, 100]}), {[100, 100; 100, 100]})
+%!test
+%! classes = {@char, @double, @single, ...
+%!            @int8, @int16, @int32, @int64, ...
+%!            @uint8, @uint16, @uint32, @uint64};
+%! for i = 1:numel (classes)
+%!   cls = classes{i};
+%!   assert (class (toupper (cls (97))), class (cls (97)));
+%!   assert (class (toupper (cls ([98, 99]))), class (cls ([98, 99])));
+%! endfor
 %!test
 %! a(3,3,3,3) = "d";
 %! assert (toupper (a)(3,3,3,3), "D");
@@ -2225,4 +2295,3 @@
 
 DEFALIAS (gammaln, lgamma);
 
-DEFALIAS (finite, isfinite);
--- a/libinterp/corefcn/matherr.c
+++ b/libinterp/corefcn/matherr.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1997-2013 John W. Eaton
+Copyright (C) 1997-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/matrix_type.cc
+++ b/libinterp/corefcn/matrix_type.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -148,7 +148,7 @@
                 {
                   mattyp = args(0).matrix_type ();
 
-                  if (mattyp.is_unknown () && autocomp )
+                  if (mattyp.is_unknown () && autocomp)
                     {
                       SparseComplexMatrix m =
                         args(0).sparse_complex_matrix_value ();
@@ -213,18 +213,18 @@
           else
             {
               // Ok, we're changing the matrix type
-              std::string str_typ = args(1).string_value ();
-
-              // FIXME: why do I have to explicitly call the constructor?
-              MatrixType mattyp = MatrixType ();
-
-              octave_idx_type nl = 0;
-              octave_idx_type nu = 0;
-
-              if (error_state)
+              if (! args(1).is_string ())
                 error ("matrix_type: TYPE must be a string");
               else
                 {
+                  std::string str_typ = args(1).string_value ();
+
+                  // FIXME: why do I have to explicitly call the constructor?
+                  MatrixType mattyp = MatrixType ();
+
+                  octave_idx_type nl = 0;
+                  octave_idx_type nu = 0;
+
                   // Use STL function to convert to lower case
                   std::transform (str_typ.begin (), str_typ.end (),
                                   str_typ.begin (), tolower);
@@ -281,7 +281,7 @@
                           && (str_typ == "upper" || str_typ == "lower"))
                         {
                           const ColumnVector perm =
-                            ColumnVector (args (2).vector_value ());
+                            ColumnVector (args(2).vector_value ());
 
                           if (error_state)
                             error ("matrix_type: Invalid permutation vector PERM");
@@ -416,15 +416,15 @@
           else
             {
               // Ok, we're changing the matrix type
-              std::string str_typ = args(1).string_value ();
-
-              // FIXME: why do I have to explicitly call the constructor?
-              MatrixType mattyp = MatrixType (MatrixType::Unknown, true);
-
-              if (error_state)
+              if (! args(1).is_string ())
                 error ("matrix_type: TYPE must be a string");
               else
                 {
+                  std::string str_typ = args(1).string_value ();
+
+                  // FIXME: why do I have to explicitly call the constructor?
+                  MatrixType mattyp = MatrixType (MatrixType::Unknown, true);
+
                   // Use STL function to convert to lower case
                   std::transform (str_typ.begin (), str_typ.end (),
                                   str_typ.begin (), tolower);
@@ -454,7 +454,7 @@
                                           || str_typ == "lower"))
                         {
                           const ColumnVector perm =
-                            ColumnVector (args (2).vector_value ());
+                            ColumnVector (args(2).vector_value ());
 
                           if (error_state)
                             error ("matrix_type: Invalid permutation vector PERM");
--- a/libinterp/corefcn/max.cc
+++ b/libinterp/corefcn/max.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -155,7 +155,7 @@
 
   octave_value retval;
 
-  if (argx.is_scalar_type () == 1)
+  if (argx.is_scalar_type ())
     {
       ScalarType x = octave_value_extract<ScalarType> (argx);
       ArrayType y = octave_value_extract<ArrayType> (argy);
@@ -167,7 +167,7 @@
       else
         retval = max (x, y);
     }
-  else if (argy.is_scalar_type () == 1)
+  else if (argy.is_scalar_type ())
     {
       ArrayType x = octave_value_extract<ArrayType> (argx);
       ScalarType y = octave_value_extract<ScalarType> (argy);
@@ -210,39 +210,26 @@
 {
   octave_value retval;
 
-  if (argx.is_scalar_type () == 1)
-    {
-      char x = octave_value_extract<char> (argx);
-      charNDArray y = octave_value_extract<charNDArray> (argy);
+  charNDArray x = octave_value_extract<charNDArray> (argx);
+  charNDArray y = octave_value_extract<charNDArray> (argy);
 
-      if (error_state)
-        ;
-      else if (ismin)
-        retval = NDArray (min (x, y));
+  if (error_state)
+    ;
+  else if (ismin)
+    {
+      if (x.numel () == 1)
+        retval = NDArray (min (x(0), y));
+      else if (y.numel () == 1)
+        retval = NDArray (min (x, y(0)));
       else
-        retval = NDArray (max (x, y));
-    }
-  else if (argy.is_scalar_type () == 1)
-    {
-      charNDArray x = octave_value_extract<charNDArray> (argx);
-      char y = octave_value_extract<char> (argy);
-
-      if (error_state)
-        ;
-      else if (ismin)
         retval = NDArray (min (x, y));
-      else
-        retval = NDArray (max (x, y));
     }
   else
     {
-      charNDArray x = octave_value_extract<charNDArray> (argx);
-      charNDArray y = octave_value_extract<charNDArray> (argy);
-
-      if (error_state)
-        ;
-      else if (ismin)
-        retval = NDArray (min (x, y));
+      if (x.numel () == 1)
+        retval = NDArray (max (x(0), y));
+      else if (y.numel () == 1)
+        retval = NDArray (max (x, y(0)));
       else
         retval = NDArray (max (x, y));
     }
@@ -284,7 +271,7 @@
             if (arg.is_range () && (dim == -1 || dim == 1))
               {
                 Range range = arg.range_value ();
-                if (range.nelem () == 0)
+                if (range.nelem () < 1)
                   {
                     retval(0) = arg;
                     if (nargout > 1)
@@ -354,11 +341,18 @@
     }
   else if (nargin == 2)
     {
-      octave_value argx = args(0), argy = args(1);
-      builtin_type_t xtyp = argx.builtin_type (), ytyp = argy.builtin_type ();
+      octave_value argx = args(0);
+      octave_value argy = args(1);
+      builtin_type_t xtyp = argx.builtin_type ();
+      builtin_type_t ytyp = argy.builtin_type ();
       builtin_type_t rtyp;
       if (xtyp == btyp_char && ytyp == btyp_char)
         rtyp = btyp_char;
+      /*
+      FIXME: This is what should happen when boolNDArray has max()
+      else if (xtyp == btyp_bool && ytyp == btyp_bool)
+        rtyp = btyp_bool;
+      */
       else
         rtyp = btyp_mixed_numeric (xtyp, ytyp);
 
@@ -407,10 +401,21 @@
         MAKE_INT_BRANCH (uint32);
         MAKE_INT_BRANCH (uint64);
 #undef MAKE_INT_BRANCH
+        /*
+        FIXME: This is what should happen when boolNDArray has max()
+        case btyp_bool:
+          retval = do_minmax_bin_op<boolNDArray> (argx, argy, ismin);
+          break;
+        */
         default:
           error ("%s: cannot compute %s (%s, %s)", func, func,
                  argx.type_name ().c_str (), argy.type_name ().c_str ());
         }
+
+      // FIXME: Delete when boolNDArray has max()
+      if (xtyp == btyp_bool && ytyp == btyp_bool)
+        retval(0) = retval(0).bool_array_value ();
+
     }
   else
     print_usage ();
@@ -421,15 +426,23 @@
 DEFUN (min, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} min (@var{x})\n\
-@deftypefnx {Built-in Function} {} min (@var{x}, @var{y})\n\
 @deftypefnx {Built-in Function} {} min (@var{x}, [], @var{dim})\n\
-@deftypefnx {Built-in Function} {} min (@var{x}, @var{y}, @var{dim})\n\
 @deftypefnx {Built-in Function} {[@var{w}, @var{iw}] =} min (@var{x})\n\
-For a vector argument, return the minimum value.  For a matrix\n\
-argument, return the minimum value from each column, as a row\n\
-vector, or over the dimension @var{dim} if defined, in which case @var{y} \n\
-should be set to the empty matrix (it's ignored otherwise).  For two matrices\n\
-(or a matrix and scalar), return the pair-wise minimum.\n\
+@deftypefnx {Built-in Function} {} min (@var{x}, @var{y})\n\
+Find minimum values in the array @var{x}.\n\
+\n\
+For a vector argument, return the minimum value.\n\
+For a matrix argument, return a row vector with the minimum value of each\n\
+column.\n\
+For a multi-dimensional array, @code{min} operates along the first\n\
+non-singleton dimension.\n\
+\n\
+If the optional third argument @var{dim} is present then operate along\n\
+this dimension.  In this case the second argument is ignored and should be\n\
+set to the empty matrix.\n\
+\n\
+For two matrices (or a matrix and a scalar), return the pairwise minimum.\n\
+\n\
 Thus,\n\
 \n\
 @example\n\
@@ -437,7 +450,7 @@
 @end example\n\
 \n\
 @noindent\n\
-returns the smallest element of @var{x}, and\n\
+returns the smallest element of the 2-D matrix @var{x}, and\n\
 \n\
 @example\n\
 @group\n\
@@ -451,7 +464,19 @@
 returns a row vector of the minimum values.\n\
 \n\
 For complex arguments, the magnitude of the elements are used for\n\
-comparison.\n\
+comparison.  If the magnitudes are identical, then the results are ordered\n\
+by phase angle in the range (-pi, pi].  Hence,\n\
+\n\
+@example\n\
+@group\n\
+min ([-1 i 1 -i])\n\
+    @result{} -i\n\
+@end group\n\
+@end example\n\
+\n\
+@noindent\n\
+because all entries have magnitude 1, but -i has the smallest phase angle\n\
+with value -pi/2.\n\
 \n\
 If called with one input and two output arguments,\n\
 @code{min} also returns the first index of the\n\
@@ -471,40 +496,176 @@
 }
 
 /*
+## Test generic double class
 %!assert (min ([1, 4, 2, 3]), 1)
 %!assert (min ([1; -10; 5; -2]), -10)
-%!assert (min ([4, i; -2, 2]), [-2, i])
-%!assert (min (char(42)), 42)
-%!assert (min (char(21), char(3)), 3)
-%!assert (min([char(21), char(3)]), 3)
-%!assert (min([char(100) char(3)], [char(42) char(42)]), [42 3])
+%!assert (min ([4, 2i 4.999; -2, 2, 3+4i]), [-2, 2, 4.999])
+## Special routines for char arrays
+%!assert (min (["abc", "ABC"]), 65)
+%!assert (min (["abc"; "CBA"]), [67 66 65])
+## Special routines for logical arrays
+%!assert (min (logical ([])), logical ([]))
+%!assert (min (logical ([0 0 1 0])), false)
+%!assert (min (logical ([0 0 1 0; 0 1 1 0])), logical ([0 0 1 0]))
+## Single values
+%!assert (min (single ([1, 4, 2, 3])), single (1))
+%!assert (min (single ([1; -10; 5; -2])), single (-10))
+%!assert (min (single ([4, 2i 4.999; -2, 2, 3+4i])), single ([-2, 2, 4.999]))
+## Integer values
+%!assert (min (uint8 ([1, 4, 2, 3])), uint8 (1))
+%!assert (min (uint8 ([1; -10; 5; -2])), uint8 (-10))
+%!assert (min (int8 ([1, 4, 2, 3])), int8 (1))
+%!assert (min (int8 ([1; -10; 5; -2])), int8 (-10))
+%!assert (min (uint16 ([1, 4, 2, 3])), uint16 (1))
+%!assert (min (uint16 ([1; -10; 5; -2])), uint16 (-10))
+%!assert (min (int16 ([1, 4, 2, 3])), int16 (1))
+%!assert (min (int16 ([1; -10; 5; -2])), int16 (-10))
+%!assert (min (uint32 ([1, 4, 2, 3])), uint32 (1))
+%!assert (min (uint32 ([1; -10; 5; -2])), uint32 (-10))
+%!assert (min (int32 ([1, 4, 2, 3])), int32 (1))
+%!assert (min (int32 ([1; -10; 5; -2])), int32 (-10))
+%!assert (min (uint64 ([1, 4, 2, 3])), uint64 (1))
+%!assert (min (uint64 ([1; -10; 5; -2])), uint64 (-10))
+%!assert (min (int64 ([1, 4, 2, 3])), int64 (1))
+%!assert (min (int64 ([1; -10; 5; -2])), int64 (-10))
+## Sparse double values
+%!assert (min (sparse ([1, 4, 2, 3])), sparse (1))
+%!assert (min (sparse ([1; -10; 5; -2])), sparse(-10))
+## FIXME: sparse doesn't order complex values by phase angle
+%!xtest
+%! assert (min (sparse ([4, 2i 4.999; -2, 2, 3+4i])), sparse ([-2, 2, 4.999]));
 
+## Test dimension argument
 %!test
 %! x = reshape (1:8, [2,2,2]);
-%! assert (max (x, [], 1), reshape ([2, 4, 6, 8], [1,2,2]));
-%! assert (max (x, [], 2), reshape ([3, 4, 7, 8], [2,1,2]));
-%! [y, i] = max (x, [], 3);
+%! assert (min (x, [], 1), reshape ([1, 3, 5, 7], [1,2,2]));
+%! assert (min (x, [], 2), reshape ([1, 2, 5, 6], [2,1,2]));
+%! [y, i] = min (x, [], 3);
 %! assert (ndims (y), 2);
-%! assert (y, [5, 7; 6, 8]);
+%! assert (y, [1, 3; 2, 4]);
 %! assert (ndims (i), 2);
-%! assert (i, [2, 2; 2, 2]);
+%! assert (i, [1, 1; 1, 1]);
+
+## Test 2-output forms for various arg types
+## Special routines for char arrays
+%!test
+%! [y, i] = min (["abc", "ABC"]);
+%! assert (y, 65);
+%! assert (i, 4);
+## Special routines for logical arrays
+%!test
+%! x = logical ([0 0 1 0]);
+%! [y, i] = min (x);
+%! assert (y, false);
+%! assert (i, 1);
+## Special handling of ranges
+%!test
+%! rng = 1:2:10;
+%! [y, i] = min (rng);
+%! assert (y, 1);
+%! assert (i, 1);
+%! rng = 10:-2:1;
+%! [y, i] = min (rng);
+%! assert (y, 2);
+%! assert (i, 5);
+
+## Test 2-input calling form for various arg types
+## Test generic double class
+%!test
+%! x = [1, 2, 3, 4];  y = fliplr (x);
+%! assert (min (x, y), [1 2 2 1]);
+%! assert (min (x, 3), [1 2 3 3]);
+%! assert (min (2, x), [1 2 2 2]);
+%! assert (min (x, 2.1i), [1 2 2.1i 2.1i]);
+## FIXME: Ordering of complex results with equal magnitude is not by phase
+##        angle in the 2-input form.  Instead, it is in the order in which it
+##        appears in the argument list.
+%!xtest
+%! x = [1, 2, 3, 4];  y = fliplr (x);
+%! assert (min (x, 2i), [2i 2i 3 4]);
+## Special routines for char arrays
+%!assert (min ("abc", "b"), [97 98 98])
+%!assert (min ("b", "cba"), [98 98 97])
+## Special handling for logical arrays
+%!assert (min ([true false], false), [false false])
+%!assert (min (true, [true false]), [true false])
+## Single values
+%!test
+%! x = single ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), single ([1 2 2 1]));
+%! assert (min (x, 3), single ([1 2 3 3]));
+%! assert (min (2, x), single ([1 2 2 2]));
+%! assert (min (x, 2.1i), single ([1 2 2.1i 2.1i]));
+## Integer values
+%!test
+%! x = uint8 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), uint8 ([1 2 2 1]));
+%! assert (min (x, 3), uint8 ([1 2 3 3]));
+%! assert (min (2, x), uint8 ([1 2 2 2]));
+%! x = int8 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), int8 ([1 2 2 1]));
+%! assert (min (x, 3), int8 ([1 2 3 3]));
+%! assert (min (2, x), int8 ([1 2 2 2]));
+%! x = uint16 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), uint16 ([1 2 2 1]));
+%! assert (min (x, 3), uint16 ([1 2 3 3]));
+%! assert (min (2, x), uint16 ([1 2 2 2]));
+%! x = int16 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), int16 ([1 2 2 1]));
+%! assert (min (x, 3), int16 ([1 2 3 3]));
+%! assert (min (2, x), int16 ([1 2 2 2]));
+%! x = uint32 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), uint32 ([1 2 2 1]));
+%! assert (min (x, 3), uint32 ([1 2 3 3]));
+%! assert (min (2, x), uint32 ([1 2 2 2]));
+%! x = int32 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), int32 ([1 2 2 1]));
+%! assert (min (x, 3), int32 ([1 2 3 3]));
+%! assert (min (2, x), int32 ([1 2 2 2]));
+%! x = uint64 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), uint64 ([1 2 2 1]));
+%! assert (min (x, 3), uint64 ([1 2 3 3]));
+%! assert (min (2, x), uint64 ([1 2 2 2]));
+%! x = int64 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), int64 ([1 2 2 1]));
+%! assert (min (x, 3), int64 ([1 2 3 3]));
+%! assert (min (2, x), int64 ([1 2 2 2]));
+## Sparse double values
+%!test
+%! x = sparse ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (min (x, y), sparse ([1 2 2 1]));
+%! assert (min (x, 3), sparse ([1 2 3 3]));
+%! assert (min (2, x), sparse ([1 2 2 2]));
+%! assert (min (x, 2.1i), sparse ([1 2 2.1i 2.1i]));
 
 %!error min ()
 %!error min (1, 2, 3, 4)
+%!error <DIM must be a valid dimension> min ([1 2; 3 4], [], -3)
+%!warning <second argument is ignored> min ([1 2 3 4], 2, 2);
+%!error <wrong type argument 'cell'> min ({1 2 3 4})
+%!error <cannot compute min \(cell, scalar\)> min ({1, 2, 3}, 2)
 */
 
 DEFUN (max, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} max (@var{x})\n\
-@deftypefnx {Built-in Function} {} max (@var{x}, @var{y})\n\
 @deftypefnx {Built-in Function} {} max (@var{x}, [], @var{dim})\n\
-@deftypefnx {Built-in Function} {} max (@var{x}, @var{y}, @var{dim})\n\
 @deftypefnx {Built-in Function} {[@var{w}, @var{iw}] =} max (@var{x})\n\
-For a vector argument, return the maximum value.  For a matrix\n\
-argument, return the maximum value from each column, as a row\n\
-vector, or over the dimension @var{dim} if defined, in which case @var{y} \n\
-should be set to the empty matrix (it's ignored otherwise).  For two matrices\n\
-(or a matrix and scalar), return the pair-wise maximum.\n\
+@deftypefnx {Built-in Function} {} max (@var{x}, @var{y})\n\
+Find maximum values in the array @var{x}.\n\
+\n\
+For a vector argument, return the maximum value.\n\
+For a matrix argument, return a row vector with the maximum value of each\n\
+column.\n\
+For a multi-dimensional array, @code{max} operates along the first\n\
+non-singleton dimension.\n\
+\n\
+If the optional third argument @var{dim} is present then operate along\n\
+this dimension.  In this case the second argument is ignored and should be\n\
+set to the empty matrix.\n\
+\n\
+For two matrices (or a matrix and a scalar), return the pairwise maximum.\n\
+\n\
 Thus,\n\
 \n\
 @example\n\
@@ -512,7 +673,7 @@
 @end example\n\
 \n\
 @noindent\n\
-returns the largest element of the matrix @var{x}, and\n\
+returns the largest element of the 2-D matrix @var{x}, and\n\
 \n\
 @example\n\
 @group\n\
@@ -522,11 +683,23 @@
 @end example\n\
 \n\
 @noindent\n\
-compares each element of the range @code{2:5} with @code{pi}, and\n\
-returns a row vector of the maximum values.\n\
+compares each element of the range @code{2:5} with @code{pi}, and returns a\n\
+row vector of the maximum values.\n\
 \n\
 For complex arguments, the magnitude of the elements are used for\n\
-comparison.\n\
+comparison.  If the magnitudes are identical, then the results are ordered\n\
+by phase angle in the range (-pi, pi].  Hence,\n\
+\n\
+@example\n\
+@group\n\
+max ([-1 i 1 -i])\n\
+    @result{} -1\n\
+@end group\n\
+@end example\n\
+\n\
+@noindent\n\
+because all entries have magnitude 1, but -1 has the largest phase angle\n\
+with value pi.\n\
 \n\
 If called with one input and two output arguments,\n\
 @code{max} also returns the first index of the\n\
@@ -546,22 +719,157 @@
 }
 
 /*
+## Test generic double class
 %!assert (max ([1, 4, 2, 3]), 4)
 %!assert (max ([1; -10; 5; -2]), 5)
-%!assert (max ([4, i 4.999; -2, 2, 3+4i]), [4, 2, 3+4i])
+%!assert (max ([4, 2i 4.999; -2, 2, 3+4i]), [4, 2i, 3+4i])
+## Special routines for char arrays
+%!assert (max (["abc", "ABC"]), 99)
+%!assert (max (["abc"; "CBA"]), [97 98 99])
+## Special routines for logical arrays
+%!assert (max (logical ([])), logical ([]))
+%!assert (max (logical ([0 0 1 0])), true)
+%!assert (max (logical ([0 0 1 0; 0 1 0 0])), logical ([0 1 1 0]))
+## Single values
+%!assert (max (single ([1, 4, 2, 3])), single (4))
+%!assert (max (single ([1; -10; 5; -2])), single (5))
+%!assert (max (single ([4, 2i 4.999; -2, 2, 3+4i])), single ([4, 2i, 3+4i]))
+## Integer values
+%!assert (max (uint8 ([1, 4, 2, 3])), uint8 (4))
+%!assert (max (uint8 ([1; -10; 5; -2])), uint8 (5))
+%!assert (max (int8 ([1, 4, 2, 3])), int8 (4))
+%!assert (max (int8 ([1; -10; 5; -2])), int8 (5))
+%!assert (max (uint16 ([1, 4, 2, 3])), uint16 (4))
+%!assert (max (uint16 ([1; -10; 5; -2])), uint16 (5))
+%!assert (max (int16 ([1, 4, 2, 3])), int16 (4))
+%!assert (max (int16 ([1; -10; 5; -2])), int16 (5))
+%!assert (max (uint32 ([1, 4, 2, 3])), uint32 (4))
+%!assert (max (uint32 ([1; -10; 5; -2])), uint32 (5))
+%!assert (max (int32 ([1, 4, 2, 3])), int32 (4))
+%!assert (max (int32 ([1; -10; 5; -2])), int32 (5))
+%!assert (max (uint64 ([1, 4, 2, 3])), uint64 (4))
+%!assert (max (uint64 ([1; -10; 5; -2])), uint64 (5))
+%!assert (max (int64 ([1, 4, 2, 3])), int64 (4))
+%!assert (max (int64 ([1; -10; 5; -2])), int64 (5))
+## Sparse double values
+%!assert (max (sparse ([1, 4, 2, 3])), sparse (4))
+%!assert (max (sparse ([1; -10; 5; -2])), sparse(5))
+%!assert (max (sparse ([4, 2i 4.999; -2, 2, 3+4i])), sparse ([4, 2i, 3+4i]))
 
+## Test dimension argument
 %!test
 %! x = reshape (1:8, [2,2,2]);
 %! assert (min (x, [], 1), reshape ([1, 3, 5, 7], [1,2,2]));
 %! assert (min (x, [], 2), reshape ([1, 2, 5, 6], [2,1,2]));
 %! [y, i] = min (x, [], 3);
-%! assert (ndims(y), 2);
+%! assert (ndims (y), 2);
 %! assert (y, [1, 3; 2, 4]);
-%! assert (ndims(i), 2);
+%! assert (ndims (i), 2);
 %! assert (i, [1, 1; 1, 1]);
 
+## Test 2-output forms for various arg types
+## Special routines for char arrays
+%!test
+%! [y, i] = max (["abc", "ABC"]);
+%! assert (y, 99);
+%! assert (i, 3);
+## Special routines for logical arrays
+%!test
+%! x = logical ([0 0 1 0]);
+%! [y, i] = max (x);
+%! assert (y, true);
+%! assert (i, 3);
+## Special handling of ranges
+%!test
+%! rng = 1:2:10;
+%! [y, i] = max (rng);
+%! assert (y, 9);
+%! assert (i, 5);
+%! rng = 10:-2:1;
+%! [y, i] = max (rng);
+%! assert (y, 10);
+%! assert (i, 1);
+
+## Test 2-input calling form for various arg types
+## Test generic double class
+%!test
+%! x = [1, 2, 3, 4];  y = fliplr (x);
+%! assert (max (x, y), [4 3 3 4]);
+%! assert (max (x, 3), [3 3 3 4]);
+%! assert (max (2, x), [2 2 3 4]);
+%! assert (max (x, 2.1i), [2.1i 2.1i 3 4]);
+## FIXME: Ordering of complex results with equal magnitude is not by phase
+##        angle in the 2-input form.  Instead, it is in the order in which it
+##        appears in the argument list.
+%!xtest
+%! x = [1, 2, 3, 4];  y = fliplr (x);
+%! assert (max (x, 2i), [2i 2i 3 4]);
+## Special routines for char arrays
+%!assert (max ("abc", "b"), [98 98 99])
+%!assert (max ("b", "cba"), [99 98 98])
+## Special handling for logical arrays
+%!assert (max ([true false], false), [true false])
+%!assert (max (true, [false false]), [true true])
+## Single values
+%!test
+%! x = single ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), single ([4 3 3 4]));
+%! assert (max (x, 3), single ([3 3 3 4]));
+%! assert (max (2, x), single ([2 2 3 4]));
+%! assert (max (x, 2.1i), single ([2.1i 2.1i 3 4]));
+## Integer values
+%!test
+%! x = uint8 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), uint8 ([4 3 3 4]));
+%! assert (max (x, 3), uint8 ([3 3 3 4]));
+%! assert (max (2, x), uint8 ([2 2 3 4]));
+%! x = int8 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), int8 ([4 3 3 4]));
+%! assert (max (x, 3), int8 ([3 3 3 4]));
+%! assert (max (2, x), int8 ([2 2 3 4]));
+%! x = uint16 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), uint16 ([4 3 3 4]));
+%! assert (max (x, 3), uint16 ([3 3 3 4]));
+%! assert (max (2, x), uint16 ([2 2 3 4]));
+%! x = int16 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), int16 ([4 3 3 4]));
+%! assert (max (x, 3), int16 ([3 3 3 4]));
+%! assert (max (2, x), int16 ([2 2 3 4]));
+%! x = uint32 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), uint32 ([4 3 3 4]));
+%! assert (max (x, 3), uint32 ([3 3 3 4]));
+%! assert (max (2, x), uint32 ([2 2 3 4]));
+%! x = int32 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), int32 ([4 3 3 4]));
+%! assert (max (x, 3), int32 ([3 3 3 4]));
+%! assert (max (2, x), int32 ([2 2 3 4]));
+%! x = uint64 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), uint64 ([4 3 3 4]));
+%! assert (max (x, 3), uint64 ([3 3 3 4]));
+%! assert (max (2, x), uint64 ([2 2 3 4]));
+%! x = int64 ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), int64 ([4 3 3 4]));
+%! assert (max (x, 3), int64 ([3 3 3 4]));
+%! assert (max (2, x), int64 ([2 2 3 4]));
+## Sparse double values
+%!test
+%! x = sparse ([1, 2, 3, 4]);  y = fliplr (x);
+%! assert (max (x, y), sparse ([4 3 3 4]));
+%! assert (max (x, 3), sparse ([3 3 3 4]));
+%! assert (max (2, x), sparse ([2 2 3 4]));
+%! assert (max (x, 2.1i), sparse ([2.1i 2.1i 3 4]));
+
+## Test for bug #40743
+%!assert (max (zeros (1,0), ones (1,1)), zeros (1,0))
+%!assert (max (sparse (zeros (1,0)), sparse (ones (1,1))), sparse (zeros (1,0)))
+
 %!error max ()
 %!error max (1, 2, 3, 4)
+%!error <DIM must be a valid dimension> max ([1 2; 3 4], [], -3)
+%!warning <second argument is ignored> max ([1 2 3 4], 2, 2);
+%!error <wrong type argument 'cell'> max ({1 2 3 4})
+%!error <cannot compute max \(cell, scalar\)> max ({1, 2, 3}, 2)
+
 */
 
 template <class ArrayType>
@@ -708,6 +1016,7 @@
 %!assert (cummin ([1, 4, 2, 3]), [1 1 1 1])
 %!assert (cummin ([1; -10; 5; -2]), [1; -10; -10; -10])
 %!assert (cummin ([4, i; -2, 2]), [4, i; -2, i])
+%!assert (cummin ([1 2; NaN 1], 2), [1 1; NaN 1])
 
 %!test
 %! x = reshape (1:8, [2,2,2]);
@@ -719,6 +1028,7 @@
 %! assert (ndims (iw), 3);
 %! assert (iw, ones (2,2,2));
 
+
 %!error cummin ()
 %!error cummin (1, 2, 3)
 */
@@ -762,6 +1072,7 @@
 %!assert (cummax ([1, 4, 2, 3]), [1 4 4 4])
 %!assert (cummax ([1; -10; 5; -2]), [1; 1; 5; 5])
 %!assert (cummax ([4, i 4.9, -2, 2, 3+4i]), [4, 4, 4.9, 4.9, 4.9, 3+4i])
+%!assert (cummax ([1 NaN 0; NaN NaN 1], 2), [1 1 1; NaN NaN 1])
 
 %!test
 %! x = reshape (8:-1:1, [2,2,2]);
--- a/libinterp/corefcn/md5sum.cc
+++ b/libinterp/corefcn/md5sum.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 
 
 This file is part of Octave.
@@ -31,10 +31,10 @@
 #include "defun.h"
 #include "file-stat.h"
 #include "file-ops.h"
-#include "gripes.h"
 #include "load-path.h"
 #include "oct-env.h"
 #include "oct-md5.h"
+#include "utils.h"
 
 DEFUN (md5sum, args, ,
        "-*- texinfo -*-\n\
@@ -64,22 +64,11 @@
             retval = oct_md5 (str);
           else
             {
-              file_stat fs (str);
-
-              if (! fs.exists ())
-                {
-                  std::string tmp
-                    = octave_env::make_absolute (load_path::find_file (str));
+              std::string fname = file_ops::tilde_expand (str);
 
-                  if (! tmp.empty ())
-                    {
-                      warning_with_id ("Octave:md5sum-file-in-path",
-                                       "md5sum: file found in load path");
-                      str = tmp;
-                    }
-                }
+              fname = find_data_file_in_load_path ("md5sum", fname);
 
-              retval = oct_md5_file (str);
+              retval = oct_md5_file (fname);
             }
         }
     }
@@ -91,11 +80,13 @@
 %!assert (md5sum ("abc\0", true), "147a664a2ca9410911e61986d3f0d52a");
 
 %!test
-%! tfile = tmpnam ();
+%! tfile = tempname ();
 %! fid = fopen (tfile, "wb");
 %! fwrite (fid, "abc\0");
 %! fclose (fid);
 %! assert (md5sum (tfile), "147a664a2ca9410911e61986d3f0d52a");
 %! unlink (tfile);
+
+%!error md5sum ();
 */
 
--- a/libinterp/corefcn/mex.cc
+++ b/libinterp/corefcn/mex.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -2896,7 +2896,7 @@
 void
 mxSetIr (mxArray *ptr, mwIndex *ir)
 {
-  ptr->set_ir (static_cast <mwIndex *> (maybe_unmark (ir)));
+  ptr->set_ir (static_cast<mwIndex *> (maybe_unmark (ir)));
 }
 
 void
--- a/libinterp/corefcn/mex.h
+++ b/libinterp/corefcn/mex.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Paul Kienzle
+Copyright (C) 2001-2015 Paul Kienzle
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/mexproto.h
+++ b/libinterp/corefcn/mexproto.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 Paul Kienzle
+Copyright (C) 2006-2015 Paul Kienzle
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/mgorth.cc
+++ b/libinterp/corefcn/mgorth.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Carlo de Falco
+Copyright (C) 2009-2015 Carlo de Falco
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/libinterp/corefcn/module.mk
+++ b/libinterp/corefcn/module.mk
@@ -5,6 +5,7 @@
   corefcn/mxarray.in.h \
   corefcn/oct-errno.in.cc \
   corefcn/oct-tex-lexer.in.ll \
+  corefcn/oct-tex-parser.in.yy \
   corefcn/oct-tex-symbols.in
 
 ## Options functions for Fortran packages like LSODE, DASPK.
@@ -24,13 +25,14 @@
   $(top_builddir)/liboctave/numeric/Quad-opts.h
 
 $(OPT_HANDLERS): corefcn/%.cc : $(top_builddir)/liboctave/numeric/%.in
-	$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-handler-fcns $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-handler-fcns $< > $@-t && \
 	mv $@-t $@
 
 $(OPT_HANDLERS): $(top_srcdir)/build-aux/mk-opts.pl
 
 $(OPT_INC) : %.h : %.in
-	$(MAKE) -C $(top_builddir)/liboctave/numeric $(@F)
+	$(AM_V_GEN)$(MAKE) -C $(top_builddir)/liboctave/numeric $(@F)
 
 JIT_INC = \
   corefcn/jit-util.h \
@@ -44,6 +46,7 @@
 COREFCN_INC = \
   corefcn/Cell.h \
   corefcn/c-file-ptr-stream.h \
+  corefcn/cdisplay.h \
   corefcn/comment-list.h \
   corefcn/cutils.h \
   corefcn/data.h \
@@ -75,11 +78,11 @@
   corefcn/ls-utils.h \
   corefcn/mex.h \
   corefcn/mexproto.h \
-  corefcn/mxarray.in.h \
   corefcn/oct-errno.h \
   corefcn/oct-fstrm.h \
   corefcn/oct-handle.h \
   corefcn/oct-hdf5.h \
+  corefcn/oct-hdf5-id.h \
   corefcn/oct-hist.h \
   corefcn/oct-iostrm.h \
   corefcn/oct-lvalue.h \
@@ -91,6 +94,7 @@
   corefcn/oct-stream.h \
   corefcn/oct-strstrm.h \
   corefcn/oct.h \
+  corefcn/octave-default-image.h \
   corefcn/octave-link.h \
   corefcn/pager.h \
   corefcn/pr-output.h \
@@ -134,6 +138,9 @@
   corefcn/Cell.cc \
   corefcn/__contourc__.cc \
   corefcn/__dispatch__.cc \
+  corefcn/__dsearchn__.cc \
+  corefcn/__ichol__.cc \
+  corefcn/__ilu__.cc \
   corefcn/__lin_interpn__.cc \
   corefcn/__pchip_deriv__.cc \
   corefcn/__qp__.cc \
@@ -143,6 +150,7 @@
   corefcn/bitfcns.cc \
   corefcn/bsxfun.cc \
   corefcn/c-file-ptr-stream.cc \
+  corefcn/cdisplay.c \
   corefcn/cellfun.cc \
   corefcn/colloc.cc \
   corefcn/comment-list.cc \
@@ -208,6 +216,7 @@
   corefcn/mgorth.cc \
   corefcn/nproc.cc \
   corefcn/oct-fstrm.cc \
+  corefcn/oct-hdf5-id.cc \
   corefcn/oct-hist.cc \
   corefcn/oct-iostrm.cc \
   corefcn/oct-lvalue.cc \
@@ -218,6 +227,7 @@
   corefcn/oct-stream.cc \
   corefcn/oct-strstrm.cc \
   corefcn/octave-link.cc \
+  corefcn/ordschur.cc \
   corefcn/pager.cc \
   corefcn/pinv.cc \
   corefcn/pr-output.cc \
@@ -241,15 +251,16 @@
   corefcn/strfns.cc \
   corefcn/sub2ind.cc \
   corefcn/svd.cc \
-  corefcn/syl.cc \
+  corefcn/sylvester.cc \
   corefcn/symtab.cc \
   corefcn/syscalls.cc \
   corefcn/sysdep.cc \
   corefcn/time.cc \
   corefcn/toplev.cc \
   corefcn/tril.cc \
+  corefcn/tsearch.cc \
+  corefcn/txt-eng-ft.cc \
   corefcn/txt-eng.cc \
-  corefcn/txt-eng-ft.cc \
   corefcn/typecast.cc \
   corefcn/urlwrite.cc \
   corefcn/utils.cc \
@@ -275,12 +286,13 @@
 
 ## Special rules for FreeType .df files so that not all .df files are built
 ## with FT2_CPPFLAGS, FONTCONFIG_CPPFLAGS
-$(COREFCN_FT2_DF) : corefcn/%.df : corefcn/%.cc
+$(COREFCN_FT2_DF) : corefcn/%.df : corefcn/%.cc $(GENERATED_MAKE_BUILTINS_INCS)
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	  $(AM_CPPFLAGS) $(FONTCONFIG_CPPFLAGS) $(FT2_CPPFLAGS) $(CPPFLAGS) \
 	  $(AM_CXXFLAGS) $(CXXFLAGS) \
-	  -DMAKE_BUILTINS $< > $@-t
-	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@
+	  -DMAKE_BUILTINS $< > $@-t && \
+	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@ && \
 	rm $@-t
 
 ## Special rules for sources which must be built before rest of compilation.
@@ -289,44 +301,52 @@
 ## may change default/config values.  However, calling configure will also
 ## regenerate the Makefiles from Makefile.am and trigger the rules below.
 corefcn/defaults.h: corefcn/defaults.in.h Makefile
-	@$(do_subst_default_vals)
+	$(AM_V_GEN)$(do_subst_default_vals)
 
 corefcn/graphics.h: corefcn/graphics.in.h genprops.awk Makefile
-	$(AWK) -f $(srcdir)/genprops.awk $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -f $(srcdir)/genprops.awk $< > $@-t && \
 	mv $@-t $@
 
 corefcn/graphics-props.cc: corefcn/graphics.in.h genprops.awk Makefile
-	$(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-errno.cc: corefcn/oct-errno.in.cc Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	if test -n "$(PERL)"; then \
 	  $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \
 	elif test -n "$(PYTHON)"; then \
 	  $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \
 	else \
 	  $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \
-	fi
+	fi && \
 	mv $@-t $@
 
 corefcn/mxarray.h: corefcn/mxarray.in.h Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(SED) < $< \
 	  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
-	  -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t
+	  -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-tex-lexer.ll: corefcn/oct-tex-lexer.in.ll corefcn/oct-tex-symbols.in Makefile.am
-	$(AWK) 'BEGIN { print "/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */"; } /^@SYMBOL_RULES@$$/ { count = 0; while (getline < "$(srcdir)/corefcn/oct-tex-symbols.in") { if ($$0 !~ /^#.*/ && NF == 3) { printf("\"\\\\%s\" { yylval->sym = %d; return SYM; }\n", $$1, count); count++; } } getline } ! /^@SYMBOL_RULES@$$/ { print }' $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) 'BEGIN { print "/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */"; } /^@SYMBOL_RULES@$$/ { count = 0; while (getline < "$(srcdir)/corefcn/oct-tex-symbols.in") { if ($$0 !~ /^#.*/ && NF == 3) { printf("\"\\\\%s\" { yylval->sym = %d; return SYM; }\n", $$1, count); count++; } } getline } ! /^@SYMBOL_RULES@$$/ { print }' $< > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-tex-symbols.cc: corefcn/oct-tex-symbols.in Makefile.am
-	$(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } /^#/ { } { if (NF == 3) { printf("  { %s, %s },\n", $$2, $$3); count++; } }' $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } !/^#/ && (NF == 3) { printf("  { %s, %s },\n", $$2, $$3); count++; }' $< > $@-t && \
 	mv $@-t $@
 
 corefcn/txt-eng.cc: corefcn/oct-tex-symbols.cc
 corefcn/oct-tex-lexer.cc: LEX_OUTPUT_ROOT := lex.octave_tex_
 corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy
 
+corefcn/oct-tex-parser.yy: corefcn/oct-tex-parser.in.yy
+	$(AM_V_GEN)$(call subst-bison-api-decls,octave_tex_)
 
 noinst_LTLIBRARIES += \
   corefcn/libcorefcn.la \
@@ -338,7 +358,9 @@
                                  $(FONTCONFIG_CPPFLAGS) \
                                  $(FT2_CPPFLAGS) \
                                  $(HDF5_CPPFLAGS) \
-                                 $(LLVM_CPPFLAGS)
+                                 $(LLVM_CPPFLAGS) \
+                                 $(Z_CPPFLAGS)
+
 corefcn_libcorefcn_la_CXXFLAGS = $(AM_CXXFLAGS) $(LLVM_CXXFLAGS)
 
 corefcn_libtex_parser_la_SOURCES = $(TEX_PARSER_SRC)
--- a/libinterp/corefcn/mxarray.in.h
+++ b/libinterp/corefcn/mxarray.in.h
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 2001-2013 Paul Kienzle
+Copyright (C) 2001-2015 Paul Kienzle
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/nproc.cc
+++ b/libinterp/corefcn/nproc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Iain Murray
+Copyright (C) 2012-2015 Iain Murray
 
 This file is part of Octave.
 
@@ -87,4 +87,23 @@
 /*
 ## Must always report at least 1 cpu available
 %!assert (nproc () >= 1);
+%!assert (nproc ("all") >= 1);
+%!assert (nproc ("current") >= 1);
+
+%!test
+%! c = nproc ("current");
+%! unwind_protect
+%!   old_val = getenv ("OMP_NUM_THREADS");
+%!   new_val = c + 1;
+%!   setenv ("OMP_NUM_THREADS", num2str (new_val));
+%!   assert (nproc ("overridable"), new_val);
+%! unwind_protect_cleanup
+%!   if (! isempty (old_val))
+%!     setenv ("OMP_NUM_THREADS", old_val);
+%!   else
+%!     unsetenv ("OMP_NUM_THREADS");
+%!   endif
+%! end_unwind_protect
+
+%!error nproc ("no_valid_option");
 */
--- a/libinterp/corefcn/oct-errno.h
+++ b/libinterp/corefcn/oct-errno.h
@@ -1,7 +1,7 @@
 // oct-errno.h.in
 /*
 
-Copyright (C) 2005-2013 John W. Eaton
+Copyright (C) 2005-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-errno.in.cc
+++ b/libinterp/corefcn/oct-errno.in.cc
@@ -1,7 +1,7 @@
 // DO NOT EDIT!  Generated automatically from oct-errno.in.cc by configure
 /*
 
-Copyright (C) 2005-2013 John W. Eaton
+Copyright (C) 2005-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-fstrm.cc
+++ b/libinterp/corefcn/oct-fstrm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -77,7 +77,7 @@
   return -1;
 }
 
-// Return non-zero if EOF has been reached on this stream.
+// Return nonzero if EOF has been reached on this stream.
 
 bool
 octave_fstream::eof (void) const
--- a/libinterp/corefcn/oct-fstrm.h
+++ b/libinterp/corefcn/oct-fstrm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -52,7 +52,7 @@
 
   off_t tell (void);
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const;
 
--- a/libinterp/corefcn/oct-handle.h
+++ b/libinterp/corefcn/oct-handle.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/oct-hdf5-id.cc
@@ -0,0 +1,56 @@
+/*
+
+Copyright (C) 2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "error.h"
+#include "oct-hdf5.h"
+#include "oct-hdf5-id.h"
+
+bool
+check_hdf5_id_type (bool warn)
+{
+  static bool checked = false;
+  static bool ok = false;
+
+  if (! checked)
+    {
+#if defined (HAVE_HDF5)
+      ok = sizeof (octave_hdf5_id) >= sizeof (hid_t);
+
+      if (warn && ! ok)
+        warning_with_id
+          ("Octave:internal",
+           "the size of octave_hdf5_id is smaller than the size of HDF5 hid_t");
+#else
+      warning_with_id
+        ("Octave:internal",
+         "check_hdf5_id_type called but Octave was not compiled with support for HDF5");
+#endif
+
+      checked = true;
+    }
+
+  return ok;
+}
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/oct-hdf5-id.h
@@ -0,0 +1,30 @@
+/*
+
+Copyright (C) 2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_oct_hdf5_id_h)
+#define octave_oct_hdf5_id_h 1
+
+typedef int octave_hdf5_id;
+
+extern bool check_hdf5_id_type (bool warn = true);
+
+#endif
--- a/libinterp/corefcn/oct-hdf5.h
+++ b/libinterp/corefcn/oct-hdf5.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,8 +23,12 @@
 #if !defined (octave_oct_hdf5_h)
 #define octave_hdf5_h 1
 
-#if defined (HAVE_HDF5)
+#if defined (HAVE_HDF5_H)
+
 #include <hdf5.h>
+
+#define HDF5_SAVE_TYPE H5T_NATIVE_UINT8
+
 #endif
 
 #endif
--- a/libinterp/corefcn/oct-hist.cc
+++ b/libinterp/corefcn/oct-hist.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-hist.h
+++ b/libinterp/corefcn/oct-hist.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-iostrm.cc
+++ b/libinterp/corefcn/oct-iostrm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -45,7 +45,7 @@
   return -1;
 }
 
-// Return non-zero if EOF has been reached on this stream.
+// Return nonzero if EOF has been reached on this stream.
 
 bool
 octave_base_iostream::eof (void) const
@@ -60,7 +60,7 @@
   ::error ("%s: invalid operation", stream_type ());
 }
 
-// Return non-zero if EOF has been reached on this stream.
+// Return nonzero if EOF has been reached on this stream.
 
 bool
 octave_istream::eof (void) const
@@ -74,7 +74,7 @@
   return octave_stream (new octave_istream (arg, n));
 }
 
-// Return non-zero if EOF has been reached on this stream.
+// Return nonzero if EOF has been reached on this stream.
 
 bool
 octave_ostream::eof (void) const
--- a/libinterp/corefcn/oct-iostrm.h
+++ b/libinterp/corefcn/oct-iostrm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -46,7 +46,7 @@
 
   off_t tell (void);
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const;
 
@@ -87,7 +87,7 @@
   static octave_stream
   create (std::istream *arg = 0, const std::string& n = std::string ());
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const;
 
@@ -126,7 +126,7 @@
   static octave_stream
   create (std::ostream *arg, const std::string& n = std::string ());
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const;
 
--- a/libinterp/corefcn/oct-lvalue.cc
+++ b/libinterp/corefcn/oct-lvalue.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-lvalue.h
+++ b/libinterp/corefcn/oct-lvalue.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-map.cc
+++ b/libinterp/corefcn/oct-map.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -25,7 +25,9 @@
 #include <config.h>
 #endif
 
+#include "Array-util.h"
 #include "error.h"
+#include "oct-locbuf.h"
 #include "str-vec.h"
 
 #include "oct-map.h"
@@ -117,7 +119,8 @@
 {
   bool retval = true;
 
-  iterator p = begin (), q = other.begin ();
+  iterator p = begin ();
+  iterator q = other.begin ();
   for (; p != end () && q != other.end (); p++, q++)
     {
       if (p->first == q->first)
@@ -251,15 +254,6 @@
     }
 }
 
-octave_map::octave_map (const Octave_map& m)
-  : xkeys (m.keys ()), xvals (m.nfields ()), dimensions (m.dims ())
-{
-  for (iterator p = begin (); p != end (); p++)
-    contents(p) = m.contents (key (p));
-
-  optimize_dimensions ();
-}
-
 Cell
 octave_map::getfield (const std::string& k) const
 {
@@ -819,9 +813,9 @@
 %! sr = [s,s];
 %! sc = [s;s];
 %! sm = [s,s;s,s];
-%! assert (nfields (sr), 0);
-%! assert (nfields (sc), 0);
-%! assert (nfields (sm), 0);
+%! assert (numfields (sr), 0);
+%! assert (numfields (sc), 0);
+%! assert (numfields (sm), 0);
 %! assert (size (sr), [1, 2]);
 %! assert (size (sc), [2, 1]);
 %! assert (size (sm), [2, 2]);
@@ -1314,470 +1308,3 @@
 
 }
 
-Octave_map::Octave_map (const dim_vector& dv, const Cell& key_vals)
-  : map (), key_list (), dimensions (dv)
-{
-  Cell c (dv);
-
-  if (key_vals.is_cellstr ())
-    {
-      for (octave_idx_type i = 0; i < key_vals.numel (); i++)
-        {
-          std::string k = key_vals(i).string_value ();
-          map[k] = c;
-          key_list.push_back (k);
-        }
-    }
-  else
-    error ("Octave_map: expecting keys to be cellstr");
-}
-
-Octave_map::Octave_map (const octave_map& m)
-  : map (), key_list (), dimensions (m.dims ())
-{
-  for (octave_map::const_iterator p = m.begin (); p != m.end (); p++)
-    map[m.key (p)] = m.contents (p);
-  const string_vector mkeys = m.fieldnames ();
-  for (octave_idx_type i = 0; i < mkeys.numel (); i++)
-    key_list.push_back (mkeys(i));
-}
-
-Octave_map
-Octave_map::squeeze (void) const
-{
-  Octave_map retval (dims ().squeeze ());
-
-  for (const_iterator pa = begin (); pa != end (); pa++)
-    {
-      Cell tmp = contents (pa).squeeze ();
-
-      if (error_state)
-        break;
-
-      retval.assign (key (pa), tmp);
-    }
-
-  // Preserve order of keys.
-  retval.key_list = key_list;
-
-  return retval;
-}
-
-Octave_map
-Octave_map::permute (const Array<int>& vec, bool inv) const
-{
-  Octave_map retval (dims ());
-
-  for (const_iterator pa = begin (); pa != end (); pa++)
-    {
-      Cell tmp = contents (pa).permute (vec, inv);
-
-      if (error_state)
-        break;
-
-      retval.assign (key (pa), tmp);
-    }
-
-  // Preserve order of keys.
-  retval.key_list = key_list;
-
-  return retval;
-}
-
-Cell&
-Octave_map::contents (const std::string& k)
-{
-  maybe_add_to_key_list (k);
-
-  return map[k];
-}
-
-Cell
-Octave_map::contents (const std::string& k) const
-{
-  const_iterator p = seek (k);
-
-  return p != end () ? p->second : Cell ();
-}
-
-int
-Octave_map::intfield (const std::string& k, int def_val) const
-{
-  int retval = def_val;
-
-  Cell c = contents (k);
-
-  if (! c.is_empty ())
-    retval = c(0).int_value ();
-
-  return retval;
-}
-
-std::string
-Octave_map::stringfield (const std::string& k,
-                         const std::string& def_val) const
-{
-  std::string retval = def_val;
-
-  Cell c = contents (k);
-
-  if (! c.is_empty ())
-    retval = c(0).string_value ();
-
-  return retval;
-}
-
-string_vector
-Octave_map::keys (void) const
-{
-  assert (static_cast<size_t>(nfields ()) == key_list.size ());
-
-  return string_vector (key_list);
-}
-
-Octave_map
-Octave_map::transpose (void) const
-{
-  assert (ndims () == 2);
-
-  dim_vector dv = dims ();
-
-  octave_idx_type nr = dv(0);
-  octave_idx_type nc = dv(1);
-
-  dim_vector new_dims (nc, nr);
-
-  Octave_map retval (new_dims);
-
-  for (const_iterator p = begin (); p != end (); p++)
-    retval.assign (key(p), Cell (contents(p).transpose ()));
-
-  // Preserve order of keys.
-  retval.key_list = key_list;
-
-  return retval;
-}
-
-Octave_map
-Octave_map::reshape (const dim_vector& new_dims) const
-{
-  Octave_map retval;
-
-  if (new_dims != dims ())
-    {
-      for (const_iterator p = begin (); p != end (); p++)
-        retval.assign (key(p), contents(p).reshape (new_dims));
-
-      retval.dimensions = new_dims;
-
-      // Preserve order of keys.
-      retval.key_list = key_list;
-    }
-  else
-    retval = *this;
-
-  return retval;
-}
-
-void
-Octave_map::resize (const dim_vector& dv, bool fill)
-{
-  if (dv != dims ())
-    {
-      if (nfields () == 0)
-        dimensions = dv;
-      else
-        {
-          for (const_iterator p = begin (); p != end (); p++)
-            {
-              Cell tmp = contents(p);
-
-              if (fill)
-                tmp.resize (dv, Matrix ());
-              else
-                tmp.resize (dv);
-
-              dimensions = dv;
-
-              assign (key(p), tmp);
-            }
-        }
-    }
-}
-
-Octave_map
-Octave_map::concat (const Octave_map& rb, const Array<octave_idx_type>& ra_idx)
-{
-  Octave_map retval;
-
-  if (nfields () == rb.nfields ())
-    {
-      for (const_iterator pa = begin (); pa != end (); pa++)
-        {
-          const_iterator pb = rb.seek (key(pa));
-
-          if (pb == rb.end ())
-            {
-              error ("field name mismatch in structure concatenation");
-              break;
-            }
-
-          retval.assign (key(pa),
-                         contents(pa).insert (rb.contents(pb), ra_idx));
-        }
-
-      // Preserve order of keys.
-      retval.key_list = key_list;
-    }
-  else
-    {
-      dim_vector dv = dims ();
-
-      if (dv.all_zero ())
-        retval = rb;
-      else
-        {
-          dv = rb.dims ();
-
-          if (dv.all_zero ())
-            retval = *this;
-          else
-            error ("invalid structure concatenation");
-        }
-    }
-
-  return retval;
-}
-
-static bool
-keys_ok (const Octave_map& a, const Octave_map& b, string_vector& keys)
-{
-  bool retval = false;
-
-  keys = string_vector ();
-
-  if (a.nfields () == 0)
-    {
-      keys = b.keys ();
-      retval = true;
-    }
-  else
-    {
-      string_vector a_keys = a.keys ().sort ();
-      string_vector b_keys = b.keys ().sort ();
-
-      octave_idx_type a_len = a_keys.length ();
-      octave_idx_type b_len = b_keys.length ();
-
-      if (a_len == b_len)
-        {
-          for (octave_idx_type i = 0; i < a_len; i++)
-            {
-              if (a_keys[i] != b_keys[i])
-                goto done;
-            }
-
-          keys = a_keys;
-          retval = true;
-        }
-    }
-
-done:
-  return retval;
-}
-
-Octave_map&
-Octave_map::maybe_delete_elements (const octave_value_list& idx)
-{
-  string_vector t_keys = keys ();
-  octave_idx_type len = t_keys.length ();
-
-  if (len > 0)
-    {
-      for (octave_idx_type i = 0; i < len; i++)
-        {
-          std::string k = t_keys[i];
-
-          contents(k).delete_elements (idx);
-
-          if (error_state)
-            break;
-        }
-
-      if (!error_state)
-        dimensions = contents(t_keys[0]).dims ();
-    }
-
-  return *this;
-}
-
-Octave_map&
-Octave_map::assign (const octave_value_list& idx, const Octave_map& rhs)
-{
-  string_vector t_keys;
-
-  if (keys_ok (*this, rhs, t_keys))
-    {
-      octave_idx_type len = t_keys.length ();
-
-      if (len == 0)
-        {
-          Cell tmp_lhs (dims ());
-          Cell tmp_rhs (rhs.dims ());
-
-          tmp_lhs.assign (idx, tmp_rhs, Matrix ());
-
-          if (! error_state)
-            resize (tmp_lhs.dims ());
-          else
-            error ("size mismatch in structure assignment");
-        }
-      else
-        {
-          for (octave_idx_type i = 0; i < len; i++)
-            {
-              std::string k = t_keys[i];
-
-              Cell t_rhs = rhs.contents (k);
-
-              assign (idx, k, t_rhs);
-
-              if (error_state)
-                break;
-            }
-        }
-    }
-  else
-    error ("field name mismatch in structure assignment");
-
-  return *this;
-}
-
-Octave_map&
-Octave_map::assign (const octave_value_list& idx, const std::string& k,
-                    const Cell& rhs)
-{
-  Cell tmp;
-
-  if (contains (k))
-    tmp = map[k];
-  else
-    tmp = Cell (dimensions);
-
-  tmp.assign (idx, rhs);
-
-  if (! error_state)
-    {
-      dim_vector tmp_dims = tmp.dims ();
-
-      if (tmp_dims != dimensions)
-        {
-          for (iterator p = begin (); p != end (); p++)
-            contents(p).resize (tmp_dims, Matrix ());
-
-          dimensions = tmp_dims;
-        }
-
-      maybe_add_to_key_list (k);
-
-      map[k] = tmp;
-    }
-
-  return *this;
-}
-
-Octave_map&
-Octave_map::assign (const std::string& k, const octave_value& rhs)
-{
-  if (nfields () == 0)
-    {
-      maybe_add_to_key_list (k);
-
-      map[k] = Cell (rhs);
-
-      dimensions = dim_vector (1, 1);
-    }
-  else
-    {
-      dim_vector dv = dims ();
-
-      if (dv.all_ones ())
-        {
-          maybe_add_to_key_list (k);
-
-          map[k] = Cell (rhs);
-        }
-      else
-        error ("invalid structure assignment");
-    }
-
-  return *this;
-}
-
-Octave_map&
-Octave_map::assign (const std::string& k, const Cell& rhs)
-{
-  if (nfields () == 0)
-    {
-      maybe_add_to_key_list (k);
-
-      map[k] = rhs;
-
-      dimensions = rhs.dims ();
-    }
-  else
-    {
-      if (dims () == rhs.dims ())
-        {
-          maybe_add_to_key_list (k);
-
-          map[k] = rhs;
-        }
-      else
-        error ("invalid structure assignment");
-    }
-
-  return *this;
-}
-
-Octave_map
-Octave_map::index (const octave_value_list& idx, bool resize_ok) const
-{
-  Octave_map retval;
-
-  octave_idx_type n_idx = idx.length ();
-
-  if (n_idx > 0)
-    {
-      Array<idx_vector> ra_idx (dim_vector (n_idx, 1));
-
-      for (octave_idx_type i = 0; i < n_idx; i++)
-        {
-          ra_idx(i) = idx(i).index_vector ();
-          if (error_state)
-            break;
-        }
-
-      if (! error_state)
-        {
-          for (const_iterator p = begin (); p != end (); p++)
-            {
-              Cell tmp = contents (p);
-
-              tmp = tmp.Array<octave_value>::index (ra_idx, resize_ok);
-
-              if (error_state)
-                break;
-
-              retval.assign (key(p), tmp);
-            }
-
-          // Preserve order of keys.
-          retval.key_list = key_list;
-        }
-    }
-  else
-    retval = *this;
-
-  return retval;
-}
--- a/libinterp/corefcn/oct-map.h
+++ b/libinterp/corefcn/oct-map.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -287,8 +287,6 @@
 
   octave_map (const octave_scalar_map& m);
 
-  octave_map (const Octave_map& m);
-
   octave_map& operator = (const octave_map& m)
   {
     xkeys = m.xkeys;
@@ -475,189 +473,4 @@
 inline octave_map octave_value_extract<octave_map> (const octave_value& v)
 { return v.map_value (); }
 
-// The original Octave_map object which is now deprecated.
-// It was fully deprecated in version 3.8 and should be removed in 3.12.
-// Octave_map and octave_map are convertible to each other.
-
-class
-OCTINTERP_API
-Octave_map
-{
-public:
-
-  typedef std::map<std::string, Cell>::iterator iterator;
-  typedef std::map<std::string, Cell>::const_iterator const_iterator;
-
-  typedef std::list<std::string>::iterator key_list_iterator;
-  typedef std::list<std::string>::const_iterator const_key_list_iterator;
-
-  // Warning!  You should always use at least two dimensions.
-
-  Octave_map (const dim_vector& dv = dim_vector (0, 0),
-              const Cell& key_vals = Cell ());
-
-  Octave_map (const std::string& k, const octave_value& value)
-    : map (), key_list (), dimensions (1, 1)
-  {
-    map[k] = value;
-    key_list.push_back (k);
-  }
-
-  Octave_map (const string_vector& sv,
-              const dim_vector& dv = dim_vector (0, 0))
-    : map (), key_list (), dimensions (dv)
-  {
-    for (octave_idx_type i = 0; i < sv.length (); i++)
-      {
-        std::string k = sv[i];
-        map[k] = Cell (dv);
-        key_list.push_back (k);
-      }
-  }
-
-  Octave_map (const std::string& k, const Cell& vals)
-    : map (), key_list (), dimensions (vals.dims ())
-  {
-    map[k] = vals;
-    key_list.push_back (k);
-  }
-
-  Octave_map (const std::string& k, const octave_value_list& val_list)
-    : map (), key_list (), dimensions (1, val_list.length ())
-  {
-    map[k] = val_list;
-    key_list.push_back (k);
-  }
-
-  Octave_map (const Octave_map& m)
-    : map (m.map), key_list (m.key_list), dimensions (m.dimensions) { }
-
-  Octave_map (const octave_map& m);
-
-  Octave_map& operator = (const Octave_map& m)
-  {
-    if (this != &m)
-      {
-        map = m.map;
-        key_list = m.key_list;
-        dimensions = m.dimensions;
-      }
-
-    return *this;
-  }
-
-  ~Octave_map (void) { }
-
-  Octave_map squeeze (void) const;
-
-  Octave_map permute (const Array<int>& vec, bool inv = false) const;
-
-  // This is the number of keys.
-  octave_idx_type nfields (void) const { return map.size (); }
-
-  void del (const std::string& k)
-  {
-    iterator p = map.find (k);
-
-    if (p != map.end ())
-      {
-        map.erase (p);
-
-        key_list_iterator q
-          = std::find (key_list.begin (), key_list.end (), k);
-
-        assert (q != key_list.end ());
-
-        key_list.erase (q);
-      }
-  }
-
-  iterator begin (void) { return iterator (map.begin ()); }
-  const_iterator begin (void) const { return const_iterator (map.begin ()); }
-
-  iterator end (void) { return iterator (map.end ()); }
-  const_iterator end (void) const { return const_iterator (map.end ()); }
-
-  std::string key (const_iterator p) const { return p->first; }
-
-  Cell& contents (const std::string& k);
-  Cell contents (const std::string& k) const;
-
-  Cell& contents (iterator p)
-  { return p->second; }
-
-  Cell contents (const_iterator p) const
-  { return p->second; }
-
-  int intfield (const std::string& k, int def_val = 0) const;
-
-  std::string stringfield (const std::string& k,
-                           const std::string& def_val = std::string ()) const;
-
-  iterator seek (const std::string& k) { return map.find (k); }
-  const_iterator seek (const std::string& k) const { return map.find (k); }
-
-  bool contains (const std::string& k) const
-  { return (seek (k) != map.end ()); }
-
-  void clear (void)
-  {
-    map.clear ();
-    key_list.clear ();
-  }
-
-  string_vector keys (void) const;
-
-  octave_idx_type rows (void) const { return dimensions(0); }
-
-  octave_idx_type columns (void) const { return dimensions(1); }
-
-  dim_vector dims (void) const { return dimensions; }
-
-  int ndims (void) const { return dimensions.length (); }
-
-  Octave_map transpose (void) const;
-
-  Octave_map reshape (const dim_vector& new_dims) const;
-
-  void resize (const dim_vector& dv, bool fill = false);
-
-  octave_idx_type numel (void) const { return dimensions.numel (); }
-
-  Octave_map concat (const Octave_map& rb,
-                     const Array<octave_idx_type>& ra_idx);
-
-  Octave_map& maybe_delete_elements (const octave_value_list& idx);
-
-  Octave_map& assign (const octave_value_list& idx, const Octave_map& rhs);
-
-  Octave_map& assign (const octave_value_list& idx, const std::string& k,
-                      const Cell& rhs);
-
-  Octave_map& assign (const std::string& k, const octave_value& rhs);
-
-  Octave_map& assign (const std::string& k, const Cell& rhs);
-
-  Octave_map index (const octave_value_list& idx,
-                    bool resize_ok = false) const;
-
-private:
-
-  // The map of names to values.
-  std::map<std::string, Cell> map;
-
-  // An extra list of keys, so we can keep track of the order the keys
-  // are added for compatibility with you know what.
-  std::list<std::string> key_list;
-
-  // The current size.
-  mutable dim_vector dimensions;
-
-  void maybe_add_to_key_list (const std::string& k)
-  {
-    if (! contains (k))
-      key_list.push_back (k);
-  }
-} GCC_ATTR_DEPRECATED;
-
 #endif
--- a/libinterp/corefcn/oct-obj.cc
+++ b/libinterp/corefcn/oct-obj.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -31,11 +31,11 @@
 
 // We are likely to have a lot of octave_value_list objects to allocate,
 // so make the grow_size large.
-DEFINE_OCTAVE_ALLOCATOR2(octave_value_list, 1024);
 
 octave_value_list::octave_value_list (const std::list<octave_value_list>& lst)
 {
-  octave_idx_type n = 0, nel = 0;
+  octave_idx_type n = 0;
+  octave_idx_type nel = 0;
 
   // Determine number.
   for (std::list<octave_value_list>::const_iterator p = lst.begin ();
--- a/libinterp/corefcn/oct-obj.h
+++ b/libinterp/corefcn/oct-obj.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -27,7 +27,6 @@
 #include <string>
 #include <vector>
 
-#include "oct-alloc.h"
 #include "str-vec.h"
 #include "Array.h"
 
@@ -107,10 +106,16 @@
   octave_value_list
   slice (octave_idx_type offset, octave_idx_type len, bool tags = false) const
   {
-    octave_value_list retval (data.linear_slice (offset, offset + len));
+    // linear_slice uses begin/end indices instead of offset and
+    // length.  Avoid calling with upper bound out of range.
+    // linear_slice handles the case of len < 0.
+
+    octave_value_list retval
+      = data.linear_slice (offset, std::min (offset + len, length ()));
+
     if (tags && len > 0 && names.length () > 0)
-      retval.names = names.linear_slice (offset,
-                                         std::min (len, names.length ()));
+      retval.names = names.linear_slice (offset, std::min (offset + len,
+                                                           names.length ()));
 
     return retval;
   }
@@ -164,7 +169,6 @@
   const octave_value& elem (octave_idx_type n) const
   { return data(n); }
 
-  DECLARE_OCTAVE_ALLOCATOR
 };
 
 // Make it easy to build argument lists for built-in functions or for
--- a/libinterp/corefcn/oct-prcstrm.cc
+++ b/libinterp/corefcn/oct-prcstrm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-prcstrm.h
+++ b/libinterp/corefcn/oct-prcstrm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-procbuf.cc
+++ b/libinterp/corefcn/oct-procbuf.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-procbuf.h
+++ b/libinterp/corefcn/oct-procbuf.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-stdstrm.h
+++ b/libinterp/corefcn/oct-stdstrm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -50,7 +50,7 @@
 
   off_t tell (void) { return s ? s->tell () : -1; }
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const { return s ? s->eof () : true; }
 
--- a/libinterp/corefcn/oct-stream.cc
+++ b/libinterp/corefcn/oct-stream.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -34,12 +34,12 @@
 #include <sstream>
 #include <string>
 
-#include <Array.h>
-
+#include "Array.h"
 #include "byte-swap.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
+#include "oct-locbuf.h"
 #include "quit.h"
 #include "singleton-cleanup.h"
 #include "str-vec.h"
@@ -586,8 +586,8 @@
 
   int args = 0;
   std::string flags;
-  int fw = 0;
-  int prec = 0;
+  int fw = -1;
+  int prec = -1;
   char modifier = '\0';
   char type = '\0';
 
@@ -636,8 +636,8 @@
               {
                 args = 0;
                 flags = "";
-                fw = 0;
-                prec = 0;
+                fw = -1;
+                prec = -1;
                 modifier = '\0';
                 type = '\0';
                 *buf << s[i++];
@@ -707,8 +707,8 @@
 {
   args = 0;
   flags = "";
-  fw = 0;
-  prec = 0;
+  fw = -1;
+  prec = -1;
   modifier = '\0';
   type = '\0';
 
@@ -738,7 +738,7 @@
     {
       if (s[i] == '*')
         {
-          fw = -1;
+          fw = -2;
           args++;
           *buf << s[i++];
         }
@@ -758,13 +758,20 @@
 
   if (i < n && s[i] == '.')
     {
+      // nothing before the . means 0.
+      if (fw == -1)
+        fw = 0;
+
+      // . followed by nothing is 0.
+      prec = 0;
+
       *buf << s[i++];
 
       if (i < n)
         {
           if (s[i] == '*')
             {
-              prec = -1;
+              prec = -2;
               args++;
               *buf << s[i++];
             }
@@ -785,11 +792,14 @@
 
   if (i < n)
     {
+      // Accept and record modifier, but don't place it in the format
+      // item text.  All integer conversions are handled as 64-bit
+      // integers.
+
       switch (s[i])
         {
         case 'h': case 'l': case 'L':
-          modifier = s[i];
-          *buf << s[i++];
+          modifier = s[i++];
           break;
 
         default:
@@ -921,7 +931,7 @@
 {
   std::string retval;
 
-  if ((interactive || forced_interactive) && file_number () == 0)
+  if (interactive && file_number () == 0)
     {
       ::error ("%s: unable to read from stdin while running interactively",
                who.c_str ());
@@ -1037,7 +1047,7 @@
 {
   off_t cnt = -1;
 
-  if ((interactive || forced_interactive) && file_number () == 0)
+  if (interactive && file_number () == 0)
     {
       ::error ("%s: unable to read from stdin while running interactively",
                who.c_str ());
@@ -1053,7 +1063,8 @@
     {
       std::istream& is = *isp;
 
-      int c = 0, lastc = -1;
+      int c = 0;
+      int lastc = -1;
       cnt = 0;
 
       while (is && (c = is.get ()) != EOF)
@@ -1485,7 +1496,7 @@
 {
   octave_value retval = Matrix ();
 
-  if ((interactive || forced_interactive) && file_number () == 0)
+  if (interactive && file_number () == 0)
     {
       ::error ("%s: unable to read from stdin while running interactively",
                who.c_str ());
@@ -1813,7 +1824,7 @@
 
                   // FIXME: is this the right thing to do?
 
-                  if (interactive && name () == "stdin")
+                  if (interactive && ! forced_interactive && name () == "stdin")
                     {
                       is.clear ();
 
@@ -2038,7 +2049,7 @@
 
           // FIXME: is this the right thing to do?
 
-          if (interactive && name () == "stdin")
+          if (interactive && ! forced_interactive && name () == "stdin")
             {
               // Skip to end of line.
 
@@ -2159,7 +2170,7 @@
 
   printf_value_cache (const octave_value_list& args, const std::string& who)
     : values (args), val_idx (0), elt_idx (0),
-      n_vals (values.length ()), n_elts (0), data (0),
+      n_vals (values.length ()), n_elts (0), have_data (false),
       curr_state (ok)
   {
     for (octave_idx_type i = 0; i < values.length (); i++)
@@ -2177,14 +2188,11 @@
   ~printf_value_cache (void) { }
 
   // Get the current value as a double and advance the internal pointer.
-  double double_value (void);
+  octave_value get_next_value (char type = 0);
 
   // Get the current value as an int and advance the internal pointer.
   int int_value (void);
 
-  // Get the current value as a string and advance the internal pointer.
-  std::string string_value (void);
-
   operator bool () const { return (curr_state == ok); }
 
   bool exhausted (void) { return (val_idx >= n_vals); }
@@ -2196,8 +2204,8 @@
   int elt_idx;
   int n_vals;
   int n_elts;
-  const double *data;
-  NDArray curr_val;
+  bool have_data;
+  octave_value curr_val;
   state curr_state;
 
   // Must create value cache with values!
@@ -2211,29 +2219,27 @@
   printf_value_cache& operator = (const printf_value_cache&);
 };
 
-double
-printf_value_cache::double_value (void)
+octave_value
+printf_value_cache::get_next_value (char type)
 {
-  double retval = 0.0;
+  octave_value retval;
 
   if (exhausted ())
     curr_state = conversion_error;
 
   while (! exhausted ())
     {
-      if (! data)
+      if (! have_data)
         {
-          octave_value tmp_val = values (val_idx);
+          curr_val = values (val_idx);
 
           // Force string conversion here for compatibility.
 
-          curr_val = tmp_val.array_value (true);
-
           if (! error_state)
             {
               elt_idx = 0;
-              n_elts = curr_val.length ();
-              data = curr_val.data ();
+              n_elts = curr_val.numel ();
+              have_data = true;
             }
           else
             {
@@ -2244,13 +2250,67 @@
 
       if (elt_idx < n_elts)
         {
-          retval = data[elt_idx++];
+          if (type == 's')
+            {
+              if (curr_val.is_string ())
+                {
+                  std::string sval = curr_val.string_value ();
+
+                  retval = sval.substr (elt_idx);
+
+                  // We've consumed the rest of the value.
+                  elt_idx = n_elts;
+                }
+              else
+                {
+                  // Convert to character string while values are
+                  // integers in the range [0 : char max]
+
+                  const NDArray val = curr_val.array_value ();
+
+                  octave_idx_type idx = elt_idx;
+
+                  for (; idx < n_elts; idx++)
+                    {
+                      double dval = val(idx);
+
+                      if (D_NINT (dval) != dval || dval < 0 || dval > 255)
+                        break;
+                    }
+
+                  octave_idx_type n = idx - elt_idx;
+
+                  if (n > 0)
+                    {
+                      std::string sval (n, '\0');
+
+                      for (octave_idx_type i = 0; i < n; i++)
+                        sval[i] = val(elt_idx++);
+
+                      retval = sval;
+                    }
+                  else
+                    retval = curr_val.fast_elem_extract (elt_idx++);
+                }
+            }
+          else
+            {
+              retval = curr_val.fast_elem_extract (elt_idx++);
+
+              if (type == 'c' && ! retval.is_string ())
+                {
+                  double dval = retval.double_value ();
+
+                  if (D_NINT (dval) == dval && dval >= 0 && dval < 256)
+                    retval = static_cast<char> (dval);
+                }
+            }
 
           if (elt_idx >= n_elts)
             {
               elt_idx = 0;
               val_idx++;
-              data = 0;
+              have_data = false;
             }
 
           break;
@@ -2258,12 +2318,19 @@
       else
         {
           val_idx++;
-          data = 0;
-
-          if (n_elts == 0 && exhausted ())
-            curr_state = conversion_error;
-
-          continue;
+          have_data = false;
+
+          if (n_elts == 0)
+            {
+              if (elt_idx == 0 && (type == 's' || type == 'c'))
+                {
+                  retval = "";
+                  break;
+                }
+
+              if (exhausted ())
+                curr_state = conversion_error;
+            }
         }
     }
 
@@ -2275,52 +2342,19 @@
 {
   int retval = 0;
 
-  double dval = double_value ();
+  octave_value val = get_next_value ();
 
   if (! error_state)
     {
-      if (D_NINT (dval) == dval)
-        retval = NINT (dval);
-      else
-        curr_state = conversion_error;
-    }
-
-  return retval;
-}
-
-std::string
-printf_value_cache::string_value (void)
-{
-  std::string retval;
-
-  if (exhausted ())
-    curr_state = conversion_error;
-  else
-    {
-      octave_value tval = values (val_idx++);
-
-      if (tval.rows () == 1)
-        retval = tval.string_value ();
-      else
+      double dval = val.double_value (true);
+
+      if (! error_state)
         {
-          // In the name of Matlab compatibility.
-
-          charMatrix chm = tval.char_matrix_value ();
-
-          octave_idx_type nr = chm.rows ();
-          octave_idx_type nc = chm.columns ();
-
-          int k = 0;
-
-          retval.resize (nr * nc, '\0');
-
-          for (octave_idx_type j = 0; j < nc; j++)
-            for (octave_idx_type i = 0; i < nr; i++)
-              retval[k++] = chm(i,j);
+          if (D_NINT (dval) == dval)
+            retval = NINT (dval);
+          else
+            curr_state = conversion_error;
         }
-
-      if (error_state)
-        curr_state = conversion_error;
     }
 
   return retval;
@@ -2357,27 +2391,235 @@
   return retval;
 }
 
-#define DO_DOUBLE_CONV(TQUAL) \
-  do \
-    { \
-      if (val > std::numeric_limits<TQUAL long>::max () \
-          || val < std::numeric_limits<TQUAL long>::min ()) \
-        { \
-          std::string tfmt = fmt; \
- \
-          tfmt.replace (tfmt.rfind (elt->type), 1, ".f"); \
- \
-          if (elt->modifier == 'l') \
-            tfmt.replace (tfmt.rfind (elt->modifier), 1, ""); \
- \
-          retval += do_printf_conv (os, tfmt.c_str (), nsa, sa_1, sa_2, \
-                                    val, who); \
-        } \
-      else \
-        retval += do_printf_conv (os, fmt, nsa, sa_1, sa_2, \
-                                  static_cast<TQUAL long> (val), who); \
-    } \
-  while (0)
+static size_t
+do_printf_string (std::ostream& os, const printf_format_elt *elt,
+                  int nsa, int sa_1, int sa_2, const std::string& arg,
+                  const std::string& who)
+{
+  size_t retval = 0;
+
+  if (nsa > 2)
+    {
+      ::error ("%s: internal error handling format", who.c_str ());
+      return retval;
+    }
+
+  std::string flags = elt->flags;
+
+  bool left = flags.find ('-') != std::string::npos;
+
+  size_t len = arg.length ();
+
+  size_t fw = nsa > 0 ? sa_1 : (elt->fw == -1 ? len : elt->fw);
+  size_t prec = nsa > 1 ? sa_2 : (elt->prec == -1 ? len : elt->prec);
+
+  os << std::setw (fw)
+     << (left ? std::left : std::right)
+     << (prec < len ? arg.substr (0, prec) : arg);
+
+  return len > fw ? len : fw;
+}
+
+static bool
+is_nan_or_inf (const octave_value& val)
+{
+  octave_value ov_isnan = val.isnan ();
+  octave_value ov_isinf = val.isinf ();
+
+  return (ov_isnan.is_true () || ov_isinf.is_true ());
+}
+
+static bool
+ok_for_signed_int_conv (const octave_value& val)
+{
+  uint64_t limit = std::numeric_limits<int64_t>::max ();
+
+  if (val.is_string ())
+    return false;
+  else if (val.is_integer_type ())
+    {
+      if (val.is_uint64_type ())
+        {
+          octave_uint64 ival = val.uint64_scalar_value ();
+
+          if (ival.value () <= limit)
+            return true;
+        }
+      else
+        return true;
+    }
+  else
+    {
+      double dval = val.double_value (true);
+
+      if (dval == xround (dval) && dval <= limit)
+        return true;
+    }
+
+  return false;
+}
+
+static bool
+ok_for_unsigned_int_conv (const octave_value& val)
+{
+  if (val.is_string ())
+    return false;
+  else if (val.is_integer_type ())
+    {
+      // Easier than dispatching here...
+
+      octave_value ov_is_ge_zero
+        = do_binary_op (octave_value::op_ge, val, octave_value (0.0));
+
+      return ov_is_ge_zero.is_true ();
+    }
+  else
+    {
+      double dval = val.double_value (true);
+
+      uint64_t limit = std::numeric_limits<uint64_t>::max ();
+
+      if (dval == xround (dval) && dval >= 0 && dval <= limit)
+        return true;
+    }
+
+  return false;
+}
+
+static std::string
+switch_to_g_format (const printf_format_elt *elt)
+{
+  std::string tfmt = elt->text;
+
+  tfmt.replace (tfmt.rfind (elt->type), 1, "g");
+
+  return tfmt;
+}
+
+int
+octave_base_stream::do_numeric_printf_conv (std::ostream& os,
+                                            const printf_format_elt *elt,
+                                            int nsa, int sa_1, int sa_2,
+                                            const octave_value& val,
+                                            const std::string& who)
+{
+  int retval = 0;
+
+  const char *fmt = elt->text;
+
+  if (is_nan_or_inf (val))
+    {
+      double dval = val.double_value ();
+
+      std::string tfmt = fmt;
+      std::string::size_type i1, i2;
+
+      tfmt.replace ((i1 = tfmt.rfind (elt->type)),
+                    1, 1, 's');
+
+      if ((i2 = tfmt.rfind ('.')) != std::string::npos
+          && i2 < i1)
+        {
+          tfmt.erase (i2, i1-i2);
+          if (elt->prec == -2)
+            nsa--;
+        }
+
+      const char *tval;
+      if (lo_ieee_isinf (dval))
+        {
+          if (elt->flags.find ('+') != std::string::npos)
+            tval = (dval < 0 ? "-Inf" : "+Inf");
+          else
+            tval = (dval < 0 ? "-Inf" : "Inf");
+        }
+      else
+        {
+          if (elt->flags.find ('+') != std::string::npos)
+            tval = (lo_ieee_is_NA (dval) ? "+NA" : "+NaN");
+          else
+            tval = (lo_ieee_is_NA (dval) ? "NA" : "NaN");
+        }
+
+      retval += do_printf_conv (os, tfmt.c_str (), nsa, sa_1, sa_2, tval, who);
+    }
+  else
+    {
+      static std::string llmod
+        = sizeof (long) == sizeof (int64_t) ? "l" : "ll";
+
+      char type = elt->type;
+
+      switch (type)
+        {
+        case 'd': case 'i': case 'c':
+          if (ok_for_signed_int_conv (val))
+            {
+              octave_int64 tval = val.int64_scalar_value ();
+
+              // Insert "long" modifier.
+              std::string tfmt = fmt;
+              tfmt.replace (tfmt.rfind (type), 1, llmod + type);
+
+              retval += do_printf_conv (os, tfmt.c_str (), nsa, sa_1, sa_2,
+                                        tval.value (), who);
+            }
+          else
+            {
+              std::string tfmt = switch_to_g_format (elt);
+
+              double dval = val.double_value (true);
+
+              if (! error_state)
+                retval += do_printf_conv (os, tfmt.c_str (), nsa,
+                                          sa_1, sa_2, dval, who);
+            }
+          break;
+
+        case 'o': case 'x': case 'X': case 'u':
+          if (ok_for_unsigned_int_conv (val))
+            {
+              octave_uint64 tval = val.uint64_scalar_value ();
+
+              // Insert "long" modifier.
+              std::string tfmt = fmt;
+              tfmt.replace (tfmt.rfind (type), 1, llmod + type);
+
+              retval += do_printf_conv (os, tfmt.c_str (), nsa, sa_1, sa_2,
+                                        tval.value (), who);
+            }
+          else
+            {
+              std::string tfmt = switch_to_g_format (elt);
+
+              double dval = val.double_value (true);
+
+              if (! error_state)
+                retval += do_printf_conv (os, tfmt.c_str (), nsa,
+                                          sa_1, sa_2, dval, who);
+            }
+          break;
+
+        case 'f': case 'e': case 'E':
+        case 'g': case 'G':
+          {
+            double dval = val.double_value (true);
+
+            if (! error_state)
+              retval += do_printf_conv (os, fmt, nsa, sa_1, sa_2, dval, who);
+          }
+          break;
+
+        default:
+          error ("%s: invalid format specifier",
+                 who.c_str ());
+          return -1;
+          break;
+        }
+    }
+
+  return retval;
+}
 
 int
 octave_base_stream::do_printf (printf_format_list& fmt_list,
@@ -2409,7 +2651,7 @@
             {
               // NSA is the number of 'star' args to convert.
 
-              int nsa = (elt->fw < 0) + (elt->prec < 0);
+              int nsa = (elt->fw == -2) + (elt->prec == -2);
 
               int sa_1 = 0;
               int sa_2 = 0;
@@ -2432,8 +2674,6 @@
                     }
                 }
 
-              const char *fmt = elt->text;
-
               if (elt->type == '%')
                 {
                   os << "%";
@@ -2444,82 +2684,33 @@
                   os << elt->text;
                   retval += strlen (elt->text);
                 }
-              else if (elt->type == 's')
+              else if (elt->type == 's' || elt->type == 'c')
                 {
-                  std::string val = val_cache.string_value ();
+                  octave_value val = val_cache.get_next_value (elt->type);
 
                   if (val_cache)
-                    retval += do_printf_conv (os, fmt, nsa, sa_1,
-                                              sa_2, val.c_str (), who);
+                    {
+                      if (val.is_string ())
+                        {
+                          std::string sval = val.string_value ();
+
+                          retval += do_printf_string (os, elt, nsa, sa_1,
+                                                      sa_2, sval, who);
+                        }
+                      else
+                        retval += do_numeric_printf_conv (os, elt, nsa, sa_1,
+                                                          sa_2, val, who);
+                    }
                   else
                     break;
                 }
               else
                 {
-                  double val = val_cache.double_value ();
+                  octave_value val = val_cache.get_next_value ();
 
                   if (val_cache)
-                    {
-                      if (lo_ieee_isnan (val) || xisinf (val))
-                        {
-                          std::string tfmt = fmt;
-                          std::string::size_type i1, i2;
-
-                          tfmt.replace ((i1 = tfmt.rfind (elt->type)),
-                                        1, 1, 's');
-
-                          if ((i2 = tfmt.rfind ('.')) != std::string::npos
-                              && i2 < i1)
-                            {
-                              tfmt.erase (i2, i1-i2);
-                              if (elt->prec < 0)
-                                nsa--;
-                            }
-
-                          const char *tval;
-                          if (xisinf (val))
-                            if (elt->flags.find ('+') != std::string::npos)
-                              tval = (val < 0 ? "-Inf" : "+Inf");
-                            else
-                              tval = (val < 0 ? "-Inf" : "Inf");
-                          else
-                            if (elt->flags.find ('+') != std::string::npos)
-                              tval = (lo_ieee_is_NA (val) ? "+NA" : "+NaN");
-                            else
-                              tval = (lo_ieee_is_NA (val) ? "NA" : "NaN");
-
-                          retval += do_printf_conv (os, tfmt.c_str (),
-                                                    nsa, sa_1, sa_2,
-                                                    tval, who);
-                        }
-                      else
-                        {
-                          char type = elt->type;
-
-                          switch (type)
-                            {
-                            case 'd': case 'i': case 'c':
-                              DO_DOUBLE_CONV (OCTAVE_EMPTY_CPP_ARG);
-                              break;
-
-                            case 'o': case 'x': case 'X': case 'u':
-                              DO_DOUBLE_CONV (unsigned);
-                              break;
-
-                            case 'f': case 'e': case 'E':
-                            case 'g': case 'G':
-                              retval += do_printf_conv (os, fmt, nsa,
-                                                        sa_1, sa_2, val, who);
-                              break;
-
-                            default:
-                              error ("%s: invalid format specifier",
-                                     who.c_str ());
-                              return -1;
-                              break;
-                            }
-                        }
-                    }
+                    retval += do_numeric_printf_conv (os, elt, nsa, sa_1,
+                                                      sa_2, val, who);
                   else
                     break;
                 }
@@ -3191,8 +3382,7 @@
       if (! error_state)
         {
 
-          octave_idx_type elts_to_read
-            = std::numeric_limits<octave_idx_type>::max ();
+          octave_idx_type elts_to_read;
 
           if (one_elt_size_spec)
             {
@@ -3221,7 +3411,9 @@
                 nr = nc = 0;
             }
 
-          // FIXME: ensure that this does not overflow.
+          // FIXME: Ensure that this does not overflow.
+          //        Maybe try comparing nr * nc computed in double with
+          //        std::numeric_limits<octave_idx_type>::max ();
 
           elts_to_read = nr * nc;
 
@@ -3398,7 +3590,7 @@
 {
   typedef typename V::val_type val_type;
 
-  val_type *vt_data = static_cast <val_type *> (conv_data);
+  val_type *vt_data = static_cast<val_type *> (conv_data);
 
   for (octave_idx_type i = 0; i < n_elts; i++)
     {
@@ -3493,7 +3685,7 @@
 
     case oct_data_conv::dt_single:
       {
-        float *vt_data = static_cast <float *> (conv_data);
+        float *vt_data = static_cast<float *> (conv_data);
 
         for (octave_idx_type i = 0; i < n_elts; i++)
           {
@@ -3507,7 +3699,7 @@
 
     case oct_data_conv::dt_double:
       {
-        double *vt_data = static_cast <double *> (conv_data);
+        double *vt_data = static_cast<double *> (conv_data);
 
         for (octave_idx_type i = 0; i < n_elts; i++)
           {
@@ -4034,15 +4226,18 @@
   if ((stream_number = os.file_number ()) == -1)
     return stream_number;
 
-  // Should we test for "(list.find (stream_number) != list.end ()) &&
-  // list[stream_number].is_open ()" and respond with "error
-  // ("internal error: ...")"? It should not happen except for some
-  // bug or if the user has opened a stream with an interpreted
-  // command, but closed it directly with a system call in an
-  // oct-file; then the kernel knows the fd is free, but Octave does
-  // not know. If it happens, it should not do harm here to simply
-  // overwrite this entry, although the wrong entry might have done
-  // harm before.
+  // Should we test for
+  //
+  //  (list.find (stream_number) != list.end ()
+  //   && list[stream_number].is_open ())
+  //
+  // and respond with "error ("internal error: ...")"?  It should not
+  // happen except for some bug or if the user has opened a stream with
+  // an interpreted command, but closed it directly with a system call
+  // in an oct-file; then the kernel knows the fd is free, but Octave
+  // does not know.  If it happens, it should not do harm here to simply
+  // overwrite this entry, although the wrong entry might have done harm
+  // before.
 
   if (list.size () < list.max_size ())
     list[stream_number] = os;
@@ -4248,6 +4443,8 @@
       buf << "  "
           << std::setiosflags (std::ios::right)
           << std::setw (4) << p->first << "     "
+          // reset necessary in addition to setiosflags since this is one stmt.
+          << std::resetiosflags (std::ios::adjustfield)
           << std::setiosflags (std::ios::left)
           << std::setw (3)
           << octave_stream::mode_as_string (os.mode ())
--- a/libinterp/corefcn/oct-stream.h
+++ b/libinterp/corefcn/oct-stream.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -38,7 +38,6 @@
 #include "data-conv.h"
 #include "lo-utils.h"
 #include "mach-info.h"
-#include "oct-locbuf.h"
 #include "oct-refcount.h"
 
 class
@@ -191,8 +190,8 @@
 {
 public:
 
-  printf_format_elt (const char *txt = 0, int n = 0, int w = 0,
-                     int p = 0, const std::string& f = std::string (),
+  printf_format_elt (const char *txt = 0, int n = 0, int w = -1,
+                     int p = -1, const std::string& f = std::string (),
                      char typ = '\0', char mod = '\0')
     : text (strsave (txt)), args (n), fw (w), prec (p), flags (f),
       type (typ), modifier (mod) { }
@@ -479,6 +478,11 @@
 
   int flush (void);
 
+  int do_numeric_printf_conv (std::ostream& os, const printf_format_elt *elt,
+                              int nsa, int sa_1, int sa_2,
+                              const octave_value& val,
+                              const std::string& who);
+
   int do_printf (printf_format_list& fmt_list, const octave_value_list& args,
                  const std::string& who /* = "printf" */);
 
--- a/libinterp/corefcn/oct-strstrm.cc
+++ b/libinterp/corefcn/oct-strstrm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/oct-strstrm.h
+++ b/libinterp/corefcn/oct-strstrm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -96,7 +96,7 @@
           oct_mach_info::float_format ff
             = oct_mach_info::native_float_format ());
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const { return is.eof (); }
 
@@ -142,7 +142,7 @@
           oct_mach_info::float_format ff
             = oct_mach_info::native_float_format ());
 
-  // Return non-zero if EOF has been reached on this stream.
+  // Return nonzero if EOF has been reached on this stream.
 
   bool eof (void) const { return os.eof (); }
 
--- a/libinterp/corefcn/oct-tex-lexer.in.ll
+++ b/libinterp/corefcn/oct-tex-lexer.in.ll
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Michael Goffioul
+Copyright (C) 2013-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -25,6 +25,10 @@
 %option reentrant
 %option bison-bridge
 
+%option noyyalloc
+%option noyyrealloc
+%option noyyfree
+
 %top {
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -47,6 +51,17 @@
 #include "txt-eng.h"
 #include "oct-tex-parser.h"
 
+// FIXME: with bison 3.x, OCTAVE_TEX_STYPE appears in the generated
+// oct-parse.h file, but there is no definition for YYSTYPE, which is
+// needed by the code that is generated by flex.  I can't seem to find a
+// way to tell flex to use OCTAVE_TEX_STYPE instead of YYSTYPE in the code
+// it generates, or to tell bison to provide the definition of YYSTYPE
+// in the generated oct-parse.h file.
+
+#if defined (OCTAVE_TEX_STYPE_IS_DECLARED) && ! defined YYSTYPE
+#define YYSTYPE OCTAVE_TEX_STYPE
+#endif
+
 #if defined (GNULIB_NAMESPACE)
 // Calls to the following functions appear in the generated output from
 // flex without the namespace tag.  Redefine them so we will use them
@@ -132,6 +147,24 @@
 
 %%
 
+void *
+octave_tex_alloc (yy_size_t size, yyscan_t)
+{
+  return malloc (size);
+}
+
+void *
+octave_tex_realloc (void *ptr, yy_size_t size, yyscan_t)
+{
+  return realloc (ptr, size);
+}
+
+void
+octave_tex_free (void *ptr, yyscan_t)
+{
+  free (ptr);
+}
+
 bool
 text_parser_tex::init_lexer (const std::string& s)
 {
rename from libinterp/corefcn/oct-tex-parser.yy
rename to libinterp/corefcn/oct-tex-parser.in.yy
--- a/libinterp/corefcn/oct-tex-parser.yy
+++ b/libinterp/corefcn/oct-tex-parser.in.yy
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Michael Goffioul
+Copyright (C) 2013-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -45,7 +45,8 @@
 #define scanner parser.get_scanner ()
 %}
 
-%name-prefix="octave_tex_"
+%API_PREFIX_DECL%
+
 %define api.pure
 %parse-param { text_parser_tex& parser }
 %lex-param { void *scanner }
--- a/libinterp/corefcn/oct-tex-symbols.in
+++ b/libinterp/corefcn/oct-tex-symbols.in
@@ -1,12 +1,14 @@
 # List of supported symbols for the TeX interpreter
-# (http://www.mathworks.com/help/matlab/ref/text_props.html):
-# - symbol name
-# - Unicode code
-# - MS symbol code (http://www.kostis.net/charsets/symbol.htm)
-# - Arranged by listings in The TeXbook, Appendix F
-# - Lowercase Greek letters: Greek Upper case: Misc Symbols type Ord: "Large" operators:
-# - Binary operators: Relations: Negated relations: Arrows: Openings: Closings: Alternate names:
-# - Other (not in Appendix F Tables):
+# Reference: http://www.mathworks.com/help/matlab/ref/text_props.html
+#
+# Column 1 : symbol name
+# Column 2 : Unicode code
+# Column 3 : MS symbol code (http://www.kostis.net/charsets/symbol.htm)
+#
+# Arranged by listings in The TeXbook, Appendix F:
+# Greek lower case letters, Greek upper case, Misc Symbols type Ord,
+# "Large" operators, Binary operators, Relations, Negated relations, Arrows,
+# Openings, Closings, Alternate names, and Other (not in Appendix F Tables).
 
 alpha           0x03B1  0xF061
 beta            0x03B2  0xF062
@@ -108,6 +110,6 @@
 rceil           0x2309  0xF0F9
 neq             0x2260  0xF0B9
 ldots           0x2026  0xF0BC
-0               0x2298  0xF0C6
+0               0x2205  0xF0C6
 copyright       0x00A9  0xF0E3
 deg             0x00B0  0xF0B0
--- a/libinterp/corefcn/oct.h
+++ b/libinterp/corefcn/oct.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/octave-default-image.h
@@ -0,0 +1,282 @@
+/*
+
+Copyright (C) 2014-2015 Pantxo Diribarne
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+static char default_im_data[] =
+{
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,20,20,20,20,20,20,21,21,21,21,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,20,20,20,20,20,20,20,20,20,20,20,21,21,
+  21,21,21,21,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,
+  21,21,21,21,21,21,21,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,20,
+  20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
+  21,21,21,21,21,21,21,21,21,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,
+  20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
+  20,21,21,21,21,21,21,21,21,21,21,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,
+  20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
+  20,20,21,21,21,21,21,21,21,21,21,21,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,20,
+  20,20,20,20,20,20,20,20,20,20,20,20,31,31,31,31,
+  31,31,31,31,31,31,21,21,21,21,21,21,21,21,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,20,
+  20,20,20,20,20,20,20,20,20,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,21,21,21,21,21,21,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,20,20,20,20,20,20,
+  20,20,20,20,20,20,20,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,21,21,21,21,21,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,20,20,20,20,20,20,20,
+  20,20,20,20,20,20,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,21,21,21,
+  21,21,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,20,20,20,20,20,20,20,20,
+  20,20,20,20,20,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,63,
+  49,49,49,49,49,49,49,49,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,20,20,20,20,20,20,20,20,
+  20,20,20,20,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,48,48,48,48,48,48,49,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,20,20,20,20,20,20,20,20,20,
+  20,20,20,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,47,48,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,19,20,20,20,20,20,20,20,20,
+  20,20,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,47,48,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,20,19,20,20,20,20,20,20,20,
+  20,20,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,47,48,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,19,19,19,19,20,20,20,20,20,20,
+  20,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,47,48,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,19,19,19,19,19,20,20,20,20,20,
+  20,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,47,48,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,19,19,19,19,19,19,19,20,20,20,
+  19,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  48,47,47,47,47,47,48,48,63,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,19,19,19,19,19,19,20,19,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,49,
+  49,48,48,48,48,48,48,48,21,31,31,31,31,31,31,31,
+  31,31,31,31,31,19,19,19,19,19,19,19,19,19,19,20,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,21,21,21,31,31,31,31,31,31,
+  31,31,31,31,31,20,20,20,20,20,20,20,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,21,21,31,31,31,31,31,31,
+  31,31,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
+  49,49,49,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,21,21,31,31,31,31,31,
+  31,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,
+  48,48,48,49,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,21,21,21,31,31,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,21,21,31,31,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,21,21,31,31,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,21,21,31,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,21,21,31,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,21,21,21,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,21,21,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,21,21,31,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,21,21,21,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,21,21,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,21,21,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,21,31,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,21,21,21,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,21,21,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,21,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,
+  49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,
+  31,49,48,47,47,47,47,47,47,47,47,47,47,47,47,47,
+  47,47,48,49,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,
+  31,49,49,48,48,48,48,48,48,48,48,48,48,48,48,48,
+  48,48,49,63,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,
+  31,31,31,49,49,49,49,49,49,47,63,63,63,63,63,63,
+  63,63,20,19,19,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,19,19,19,19,19,19,
+  19,19,19,19,19,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,19,19,19,19,19,
+  19,19,19,19,19,19,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,19,19,19,19,19,
+  19,19,19,19,19,19,19,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,31,19,19,19,19,
+  19,19,19,19,19,19,19,19,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,20,20,20,20,20,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,19,19,19,
+  19,19,19,19,19,19,19,19,19,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,49,49,49,49,49,47,63,63,63,21,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,49,48,48,48,48,48,48,48,48,48,48,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,48,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,47,47,47,47,47,47,47,47,47,47,48,48,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,19,19,19,19,19,19,19,19,19,19,19,19,19,19,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,31,31,31,31,31,31,31,31,31,31,31,
+  31,19,20,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,20,20,49,47,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,18,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,20,49,47,47,47,47,47,47,47,47,47,47,48,48,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,20,20,49,48,47,47,47,47,47,47,47,47,47,48,49,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,19,19,19,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,20,63,48,48,48,48,48,48,48,48,48,48,49,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,19,19,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,20,21,63,63,63,48,49,49,49,49,49,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,19,19,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,20,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,19,19,
+  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,19,19,19,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+  19,19,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
+  31,31,31,31,31,19,19,19,19,19,19,19,19,19,19,31,
+  31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+};
+
--- a/libinterp/corefcn/octave-link.cc
+++ b/libinterp/corefcn/octave-link.cc
@@ -1,8 +1,8 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
-Copyright (C) 2011-2013 John P. Swensen
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
+Copyright (C) 2011-2015 John P. Swensen
 
 This file is part of Octave.
 
@@ -61,6 +61,7 @@
   if (enabled ())
     instance->do_set_workspace ((symbol_table::current_scope ()
                                  == symbol_table::top_scope ()),
+                                instance->debugging, 
                                 symbol_table::workspace_info ());
 }
 
@@ -225,7 +226,7 @@
       std::string multi_on = args(4).string_value (); // on, off, create
       std::string pathname = args(5).string_value ();
 
-      octave_idx_type nel = flist.numel ();
+      octave_idx_type nel;
       octave_link::filter_list filter_lst;
 
       for (octave_idx_type i = 0; i < flist.rows (); i++)
@@ -400,7 +401,7 @@
                                          defaults_lst);
 
           nel = items_lst.size ();
-          Cell items (dim_vector (1, nel));
+          Cell items (dim_vector (nel, 1));
           octave_idx_type i = 0;
           for (std::list<std::string>::iterator it = items_lst.begin ();
                it != items_lst.end (); it++)
@@ -432,7 +433,7 @@
 
 DEFUN (__octave_link_show_doc__, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} __octave_link_show_doc__ ( @var{filename} )\n\
+@deftypefn {Built-in Function} {} __octave_link_show_doc__ (@var{filename})\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/octave-link.h
+++ b/libinterp/corefcn/octave-link.h
@@ -1,8 +1,8 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2011-2013 Jacob Dawid
-Copyright (C) 2011-2013 John P. Swensen
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2011-2015 Jacob Dawid
+Copyright (C) 2011-2015 John P. Swensen
 
 This file is part of Octave.
 
@@ -79,6 +79,16 @@
       instance->do_discard_events ();
   }
 
+  static bool confirm_shutdown (void)
+  {
+    bool retval = true;
+
+    if (instance_ok ())
+      retval = instance->do_confirm_shutdown ();
+
+    return retval;
+  }
+
   static bool exit (int status)
   {
     bool retval = false;
@@ -110,14 +120,6 @@
       instance->do_post_event (obj, method, arg);
   }
 
-  template <class T, class A, class B>
-  static void post_event (T *obj, void (T::*method) (const A&, const B&),
-                          const A& arg_a, const B& arg_b)
-  {
-    if (enabled ())
-      instance->do_post_event (obj, method, arg_a, arg_b);
-  }
-
   static void entered_readline_hook (void)
   {
     if (enabled ())
@@ -131,6 +133,12 @@
   }
 
   static bool
+  copy_image_to_clipboard (const std::string& file)
+  {
+    return enabled () ? instance->do_copy_image_to_clipboard (file) : false;
+  }
+
+  static bool
   edit_file (const std::string& file)
   {
     return enabled () ? instance->do_edit_file (file) : false;
@@ -229,7 +237,7 @@
                              const std::list<workspace_element>& ws)
   {
     if (enabled ())
-      instance->do_set_workspace (top_level, ws);
+      instance->do_set_workspace (top_level, instance->debugging, ws);
   }
 
   static void clear_workspace (void)
@@ -388,8 +396,11 @@
   void do_entered_readline_hook (void) { }
   void do_finished_readline_hook (void) { }
 
+  virtual bool do_confirm_shutdown (void) = 0;
   virtual bool do_exit (int status) = 0;
 
+  virtual bool do_copy_image_to_clipboard (const std::string& file) = 0;
+
   virtual bool do_edit_file (const std::string& file) = 0;
   virtual bool do_prompt_new_edit_file (const std::string& file) = 0;
 
@@ -434,7 +445,7 @@
   virtual void do_execute_command_in_terminal (const std::string& command) = 0;
 
   virtual void
-  do_set_workspace (bool top_level,
+  do_set_workspace (bool top_level, bool debug,
                     const std::list<workspace_element>& ws) = 0;
 
   virtual void do_clear_workspace (void) = 0;
new file mode 100644
--- /dev/null
+++ b/libinterp/corefcn/ordschur.cc
@@ -0,0 +1,258 @@
+/*
+
+Copyright (C) 2015 Sébastien Villemot <sebastien@debian.org>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "defun.h"
+#include "error.h"
+#include "oct-obj.h"
+#include "f77-fcn.h"
+
+extern "C"
+{
+  F77_RET_T
+  F77_FUNC (dtrsen, DTRSEN) (F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL,
+                             const octave_idx_type*, const octave_idx_type&,
+                             double*, const octave_idx_type&, double*, const octave_idx_type&,
+                             double*, double*, octave_idx_type&, double&, double&, double*,
+                             const octave_idx_type&, octave_idx_type*,
+                             const octave_idx_type&, octave_idx_type&);
+
+  F77_RET_T
+  F77_FUNC (ztrsen, ZTRSEN) (F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL,
+                             const octave_idx_type*, const octave_idx_type&,
+                             Complex*, const octave_idx_type&, Complex*, const octave_idx_type&,
+                             Complex*, octave_idx_type&, double&, double&, Complex*,
+                             const octave_idx_type&, octave_idx_type &);
+
+  F77_RET_T
+  F77_FUNC (strsen, STRSEN) (F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL,
+                             const octave_idx_type*, const octave_idx_type&,
+                             float*, const octave_idx_type&, float*, const octave_idx_type&,
+                             float*, float*, octave_idx_type&, float&, float&, float*,
+                             const octave_idx_type&, octave_idx_type*,
+                             const octave_idx_type&, octave_idx_type&);
+
+  F77_RET_T
+  F77_FUNC (ctrsen, CTRSEN) (F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL,
+                             const octave_idx_type*, const octave_idx_type&,
+                             FloatComplex*, const octave_idx_type&, FloatComplex*, const octave_idx_type&,
+                             FloatComplex*, octave_idx_type&, float&, float&, FloatComplex*,
+                             const octave_idx_type&, octave_idx_type &);
+}
+
+DEFUN (ordschur, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {[@var{UR}, @var{SR}] =} ordschur (@var{U}, @var{S}, @var{select})\n\
+Reorders the real Schur factorization (@var{U},@var{S}) obtained with the\n\
+@code{schur} function, so that selected eigenvalues appear in the upper left\n\
+diagonal blocks of the quasi triangular Schur matrix.\n\
+The logical vector @var{select} specifies the selected eigenvalues as they\n\
+appear along @var{S}'s diagonal.\n\
+\n\
+For example, given the matrix @code{@var{A} = [1, 2; 3, 4]}, and its Schur\n\
+decomposition\n\
+\n\
+@example\n\
+[@var{U}, @var{S}] = schur (@var{A})\n\
+@end example\n\
+\n\
+@noindent\n\
+which returns\n\
+\n\
+@example\n\
+@group\n\
+@var{U} =\n\
+\n\
+  -0.82456  -0.56577\n\
+   0.56577  -0.82456\n\
+\n\
+@var{S} =\n\
+\n\
+  -0.37228  -1.00000\n\
+   0.00000   5.37228\n\
+\n\
+@end group\n\
+@end example\n\
+\n\
+It is possible to reorder the decomposition so that the positive eigenvalue\n\
+is in the upper left corner, by doing:\n\
+\n\
+@example\n\
+[@var{U}, @var{S}] = ordschur (@var{U}, @var{S}, [0,1])\n\
+@end example\n\
+\n\
+@seealso{schur}\n\
+@end deftypefn")
+{
+  const octave_idx_type nargin = args.length ();
+  octave_value_list retval;
+
+  if (nargin != 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  const Array<octave_idx_type> sel = args(2).octave_idx_type_vector_value ();
+  if (error_state)
+    {
+      error ("ordschur: SELECT must be an array of integers");
+      return retval;
+    }
+  const octave_idx_type n = sel.numel ();
+
+  const dim_vector dimU = args(0).dims ();
+  const dim_vector dimS = args(1).dims ();
+  if (n != dimU(0))
+    {
+      error ("ordschur: SELECT must have same length as the sides of U and S");
+      return retval;
+    }
+  else if (n != dimU(0) || n != dimS(0) || n != dimU(1) || n != dimS(1))
+    {
+      error ("ordschur: U and S must be square and of equal sizes");
+      return retval;
+    }
+
+  const bool double_type  = args(0).is_double_type ()
+                            || args(1).is_double_type ();
+  const bool complex_type = args(0).is_complex_type ()
+                            || args(1).is_complex_type ();
+
+#define PREPARE_ARGS(TYPE, TYPE_M, TYPE_COND) \
+          TYPE ## Matrix U = args(0).TYPE_M ## _value (); \
+          TYPE ## Matrix S = args(1).TYPE_M ## _value (); \
+          if (error_state) \
+            { \
+              error ("ordschur: U and S must be real or complex floating point matrices"); \
+              return retval; \
+            } \
+          TYPE ## Matrix w (dim_vector (n, 1)); \
+          TYPE ## Matrix work (dim_vector (n, 1)); \
+          octave_idx_type m; \
+          octave_idx_type info; \
+          TYPE_COND cond1, cond2;
+
+#define PREPARE_OUTPUT()\
+          if (info != 0) \
+            { \
+              error ("ordschur: trsen failed"); \
+              return retval; \
+            } \
+          retval(0) = U; \
+          retval(1) = S;
+
+  if (double_type)
+    {
+      if (complex_type)
+        {
+          PREPARE_ARGS (Complex, complex_matrix, double)
+
+          F77_XFCN (ztrsen, ztrsen,
+                    (F77_CONST_CHAR_ARG ("N"), F77_CONST_CHAR_ARG ("V"),
+                     sel.data (), n, S.fortran_vec (), n, U.fortran_vec (), n,
+                     w.fortran_vec (), m, cond1, cond2, work.fortran_vec (), n,
+                     info));
+          PREPARE_OUTPUT()
+        }
+      else
+        {
+          PREPARE_ARGS (, matrix, double)
+          Matrix wi (dim_vector (n, 1));
+          Array<octave_idx_type> iwork (dim_vector (n, 1));
+
+          F77_XFCN (dtrsen, dtrsen,
+                    (F77_CONST_CHAR_ARG ("N"), F77_CONST_CHAR_ARG ("V"),
+                     sel.data (), n, S.fortran_vec (), n, U.fortran_vec (), n,
+                     w.fortran_vec (), wi.fortran_vec (), m, cond1, cond2,
+                     work.fortran_vec (), n, iwork.fortran_vec (), n, info));
+          PREPARE_OUTPUT ()
+        }
+    }
+  else
+    {
+      if (complex_type)
+        {
+          PREPARE_ARGS (FloatComplex, float_complex_matrix, float)
+
+          F77_XFCN (ctrsen, ctrsen,
+                    (F77_CONST_CHAR_ARG ("N"), F77_CONST_CHAR_ARG ("V"),
+                     sel.data (), n, S.fortran_vec (), n, U.fortran_vec (), n,
+                     w.fortran_vec (), m, cond1, cond2, work.fortran_vec (), n,
+                     info));
+          PREPARE_OUTPUT ()
+        }
+      else
+        {
+          PREPARE_ARGS (Float, float_matrix, float)
+          FloatMatrix wi (dim_vector (n, 1));
+          Array<octave_idx_type> iwork (dim_vector (n, 1));
+
+          F77_XFCN (strsen, strsen,
+                    (F77_CONST_CHAR_ARG ("N"), F77_CONST_CHAR_ARG ("V"),
+                     sel.data (), n, S.fortran_vec (), n, U.fortran_vec (), n,
+                     w.fortran_vec (), wi.fortran_vec (), m, cond1, cond2,
+                     work.fortran_vec (), n, iwork.fortran_vec (), n, info));
+          PREPARE_OUTPUT ()
+        }
+    }
+
+#undef PREPARE_ARGS
+#undef PREPARE_OUTPUT
+
+  return retval;
+}
+
+/*
+
+%!test
+%! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4 ];
+%! [U, T] = schur (A);
+%! [US, TS] = ordschur (U, T, [ 0, 0, 1, 1 ]);
+%! assert (US*TS*US', A, sqrt (eps))
+%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps))
+
+%!test
+%! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4 ];
+%! [U, T] = schur (A);
+%! [US, TS] = ordschur (single (U), single (T), [ 0, 0, 1, 1 ]);
+%! assert (US*TS*US', A, sqrt (eps ("single")))
+%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single")))
+
+%!test
+%! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4+3i ];
+%! [U, T] = schur (A);
+%! [US, TS] = ordschur (U, T, [ 0, 0, 1, 1 ]);
+%! assert (US*TS*US', A, sqrt (eps))
+%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps))
+
+%!test
+%! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4+3i ];
+%! [U, T] = schur (A);
+%! [US, TS] = ordschur (single (U), single (T), [ 0, 0, 1, 1 ]);
+%! assert (US*TS*US', A, sqrt (eps ("single")))
+%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single")))
+
+*/
--- a/libinterp/corefcn/pager.cc
+++ b/libinterp/corefcn/pager.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -52,7 +52,7 @@
 static bool write_to_diary_file = false;
 
 // The name of the current diary file.
-static std::string diary_file;
+static std::string diary_file ("diary");
 
 // The diary file.
 static std::ofstream external_diary_file;
@@ -231,7 +231,7 @@
 int
 octave_pager_buf::sync (void)
 {
-  if (! interactive
+  if (! interactive || forced_interactive
       || really_flush_to_pager
       || (Vpage_screen_output && Vpage_output_immediately)
       || ! Vpage_screen_output)
@@ -240,7 +240,7 @@
 
       int len = pptr () - buf;
 
-      bool bypass_pager = (! interactive
+      bool bypass_pager = (! interactive || forced_interactive
                            || ! Vpage_screen_output
                            || (really_flush_to_pager
                                && Vpage_screen_output
@@ -589,6 +589,24 @@
   return retval;
 }
 
+DEFUN (__diaryfile__, , ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{fname} =} __diaryfile__ ()\n\
+Undocumented internal function\n\
+@end deftypefn")
+{
+  return ovl (diary_file);
+}
+
+DEFUN (__diarystate__, , ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{state} =} __diarystate__ ()\n\
+Undocumented internal function\n\
+@end deftypefn")
+{
+  return ovl (write_to_diary_file);
+}
+
 DEFUN (more, args, ,
        "-*- texinfo -*-\n\
 @deftypefn  {Command} {} more\n\
--- a/libinterp/corefcn/pager.h
+++ b/libinterp/corefcn/pager.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/pinv.cc
+++ b/libinterp/corefcn/pinv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -76,22 +76,45 @@
 
   if (arg.is_diag_matrix ())
     {
-      if (nargin == 2)
-        warning ("pinv: tol is ignored for diagonal matrices");
-
-      if (arg.is_complex_type ())
+      if (isfloat)
         {
-          if (isfloat)
-            retval = arg.float_complex_diag_matrix_value ().pseudo_inverse ();
+          float tol = 0.0;
+          if (nargin == 2)
+            tol = args(1).float_value ();
+
+          if (error_state)
+            return retval;
+
+          if (tol < 0.0)
+            {
+              error ("pinv: TOL must be greater than zero");
+              return retval;
+            }
+
+          if (arg.is_real_type ())
+            retval = arg.float_diag_matrix_value ().pseudo_inverse (tol);
           else
-            retval = arg.complex_diag_matrix_value ().pseudo_inverse ();
+            retval = arg.float_complex_diag_matrix_value ().pseudo_inverse (tol);
         }
       else
         {
-          if (isfloat)
-            retval = arg.float_diag_matrix_value ().pseudo_inverse ();
+          double tol = 0.0;
+          if (nargin == 2)
+            tol = args(1).double_value ();
+
+          if (error_state)
+            return retval;
+
+          if (tol < 0.0)
+            {
+              error ("pinv: TOL must be greater than zero");
+              return retval;
+            }
+
+          if (arg.is_real_type ())
+            retval = arg.diag_matrix_value ().pseudo_inverse (tol);
           else
-            retval = arg.diag_matrix_value ().pseudo_inverse ();
+            retval = arg.complex_diag_matrix_value ().pseudo_inverse (tol);
         }
     }
   else if (arg.is_perm_matrix ())
@@ -189,4 +212,20 @@
 %!assert (y*x*y, y, -hitol)
 %!assert ((x*y)', x*y, hitol)
 %!assert ((y*x)', y*x, hitol)
+
+## Clear shared variables
+%!shared
+
+## Test pinv for Diagonal matrices
+%!test
+%! x = diag ([3 2 1 0 -0.5]);
+%! y = pinv (x);
+%! assert (typeinfo (y)(1:8), "diagonal");
+%! assert (isa (y, "double"));
+%! assert (diag (y), [1/3, 1/2, 1, 0  1/-0.5]');
+%! y = pinv (x, 1);
+%! assert (diag (y), [1/3 1/2 1 0 0]');
+%! y = pinv (x, 2);
+%! assert (diag (y), [1/3 1/2 0 0 0]');
+
 */
--- a/libinterp/corefcn/pr-output.cc
+++ b/libinterp/corefcn/pr-output.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -85,7 +85,7 @@
 static bool plus_format = false;
 
 // First char for > 0, second for < 0, third for == 0.
-static std::string plus_format_chars = "+  ";
+static std::string plus_format_chars = "+- ";
 
 // TRUE means always print in a rational approximation
 static bool rat_format = false;
@@ -596,13 +596,11 @@
         {
           ld = digits;
           rd = prec > digits ? prec - digits : prec;
-          digits++;
         }
       else
         {
           ld = 1;
           rd = prec > digits ? prec - digits : prec;
-          digits = -digits + 1;
         }
 
       fw = 1 + ld + 1 + rd;
@@ -824,7 +822,7 @@
   int x_min = min_abs == 0.0 ? 0 : num_digits (min_abs);
 
   scale = (x_max == 0 || int_or_inf_or_nan)
-            ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
+          ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
 
   set_real_matrix_format (x_max, x_min, inf_or_nan, int_or_inf_or_nan, fw);
 }
@@ -1240,7 +1238,7 @@
   int x_min = r_x_min > i_x_min ? r_x_min : i_x_min;
 
   scale = (x_max == 0 || int_or_inf_or_nan)
-            ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
+          ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
 
   set_complex_matrix_format (x_max, x_min, r_x_max, r_x_min, inf_or_nan,
                              int_or_inf_or_nan, r_fw, i_fw);
@@ -1396,7 +1394,7 @@
   int x_min = min_abs == 0.0 ? 0 : num_digits (min_abs);
 
   scale = (x_max == 0 || all_ints)
-            ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
+          ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
 
   set_range_format (x_max, x_min, all_ints, fw);
 }
@@ -2105,7 +2103,7 @@
     {
     case 1:
     case 2:
-      octave_print_internal (os, nda.matrix_value (),
+      octave_print_internal (os, Matrix (nda),
                              pr_as_read_syntax, extra_indent);
       break;
 
@@ -2502,11 +2500,10 @@
 
       if (pr_as_read_syntax)
         {
-          Array<octave_idx_type> pvec = m.pvec ();
-          bool colp = m.is_col_perm ();
+          Array<octave_idx_type> pvec = m.col_perm_vec ();
 
           os << "eye (";
-          if (colp) os << ":, ";
+          os << ":, ";
 
           octave_idx_type col = 0;
           while (col < nc)
@@ -2537,7 +2534,6 @@
               else
                 os << " ...\n";
             }
-          if (! colp) os << ", :";
           os << ")";
         }
       else
@@ -2584,13 +2580,13 @@
     {
     case 1:
     case 2:
-      octave_print_internal (os, nda.matrix_value (),
+      octave_print_internal (os, ComplexMatrix (nda),
                              pr_as_read_syntax, extra_indent);
       break;
 
     default:
       print_nd_array <ComplexNDArray, Complex, ComplexMatrix>
-                      (os, nda, pr_as_read_syntax);
+                     (os, nda, pr_as_read_syntax);
       break;
     }
 }
@@ -2794,7 +2790,7 @@
     {
     case 1:
     case 2:
-      octave_print_internal (os, nda.matrix_value (),
+      octave_print_internal (os, boolMatrix (nda),
                              pr_as_read_syntax, extra_indent);
       break;
 
@@ -2861,7 +2857,7 @@
     {
     case 1:
     case 2:
-      octave_print_internal (os, nda.matrix_value (),
+      octave_print_internal (os, charMatrix (nda),
                              pr_as_read_syntax, extra_indent, pr_as_string);
       break;
 
@@ -3402,8 +3398,7 @@
 }
 
 void
-octave_print_internal (std::ostream&, const octave_value&,
-                       bool pr_as_read_syntax)
+octave_print_internal (std::ostream&, const octave_value&, bool)
 {
   panic_impossible ();
 }
@@ -3457,7 +3452,7 @@
               rat_format = true;
 
               std::ostringstream buf;
-              args(0).print (buf);
+              arg.print (buf);
               std::string s = buf.str ();
 
               std::list<std::string> lst;
@@ -3519,11 +3514,12 @@
 
   if (nargin == 1 && nargout < 2)
     {
+      octave_value arg = args(0);
+
       if (nargout == 0)
-        args(0).print (octave_stdout);
+        arg.print (octave_stdout);
       else
         {
-          octave_value arg = args(0);
           std::ostringstream buf;
           arg.print (buf);
           retval = octave_value (buf.str (), arg.is_dq_string () ? '"' : '\'');
@@ -3560,7 +3556,7 @@
 
   if (nargin == 2)
     {
-      int fid = octave_stream_list::get_file_number (args (0));
+      int fid = octave_stream_list::get_file_number (args(0));
 
       octave_stream os = octave_stream_list::lookup (fid, "fdisp");
 
@@ -3568,8 +3564,10 @@
         {
           std::ostream *osp = os.output_stream ();
 
+          octave_value arg = args(1);
+
           if (osp)
-            args(1).print (*osp);
+            arg.print (*osp);
           else
             error ("fdisp: stream FID not open for writing");
         }
@@ -3630,20 +3628,25 @@
   Voutput_max_field_width = fw;
 }
 
+static std::string format_string ("short");
+
 static void
 set_format_style (int argc, const string_vector& argv)
 {
   int idx = 1;
+  std::string format;
 
   if (--argc > 0)
     {
       std::string arg = argv[idx++];
+      format = arg;
 
       if (arg == "short")
         {
           if (--argc > 0)
             {
               arg = argv[idx++];
+              format.append (arg);
 
               if (arg == "e")
                 {
@@ -3684,11 +3687,44 @@
 
           set_output_prec_and_fw (5, 10);
         }
+      else if (arg == "shorte")
+        {
+          init_format_state ();
+          print_e = true;
+          set_output_prec_and_fw (5, 10);
+        }
+      else if (arg == "shortE")
+        {
+          init_format_state ();
+          print_e = true;
+          print_big_e = true;
+          set_output_prec_and_fw (5, 10);
+        }
+      else if (arg == "shortg")
+        {
+          init_format_state ();
+          print_g = true;
+          set_output_prec_and_fw (5, 10);
+        }
+      else if (arg == "shortG")
+        {
+          init_format_state ();
+          print_g = true;
+          print_big_e = true;
+          set_output_prec_and_fw (5, 10);
+        }
+      else if (arg == "shortEng")
+        {
+          init_format_state ();
+          print_eng = true;
+          set_output_prec_and_fw (5, 10);
+        }
       else if (arg == "long")
         {
           if (--argc > 0)
             {
               arg = argv[idx++];
+              format.append (arg);
 
               if (arg == "e")
                 {
@@ -3729,6 +3765,38 @@
 
           set_output_prec_and_fw (15, 20);
         }
+      else if (arg == "longe")
+        {
+          init_format_state ();
+          print_e = true;
+          set_output_prec_and_fw (15, 20);
+        }
+      else if (arg == "longE")
+        {
+          init_format_state ();
+          print_e = true;
+          print_big_e = true;
+          set_output_prec_and_fw (15, 20);
+        }
+      else if (arg == "longg")
+        {
+          init_format_state ();
+          print_g = true;
+          set_output_prec_and_fw (15, 20);
+        }
+      else if (arg == "longG")
+        {
+          init_format_state ();
+          print_g = true;
+          print_big_e = true;
+          set_output_prec_and_fw (15, 20);
+        }
+      else if (arg == "longEng")
+        {
+          init_format_state ();
+          print_eng = true;
+          set_output_prec_and_fw (15, 20);
+        }
       else if (arg == "hex")
         {
           init_format_state ();
@@ -3754,6 +3822,7 @@
           if (--argc > 0)
             {
               arg = argv[idx++];
+              format.append (arg);
 
               if (arg.length () == 3)
                 plus_format_chars = arg;
@@ -3764,7 +3833,7 @@
                 }
             }
           else
-            plus_format_chars = "+  ";
+            plus_format_chars = "+- ";
 
           init_format_state ();
           plus_format = true;
@@ -3792,21 +3861,30 @@
       else if (arg == "compact")
         {
           Vcompact_format = true;
+          return;
         }
       else if (arg == "loose")
         {
           Vcompact_format = false;
+          return;
         }
       else
-        error ("format: unrecognized format state '%s'", arg.c_str ());
+        {
+          error ("format: unrecognized format state '%s'", arg.c_str ());
+          return;
+        }
     }
   else
     {
       init_format_state ();
       set_output_prec_and_fw (5, 10);
+      format = std::string ("short");
     }
+
+  format_string = format;
 }
 
+
 DEFUN (format, args, ,
        "-*- texinfo -*-\n\
 @deftypefn  {Command} {} format\n\
@@ -3900,18 +3978,19 @@
 integer types).\n\
 \n\
 @table @code\n\
-@item  +\n\
-@itemx + @var{chars}\n\
+@item  \"+\"\n\
+@itemx \"+\" @var{chars}\n\
 @itemx plus\n\
 @itemx plus @var{chars}\n\
-Print a @samp{+} symbol for nonzero matrix elements and a space for zero\n\
-matrix elements.  This format can be very useful for examining the\n\
-structure of a large sparse matrix.\n\
+Print a @samp{+} symbol for matrix elements greater than zero, a\n\
+@samp{-} symbol for elements less than zero and a space for zero matrix\n\
+elements.  This format can be very useful for examining the structure\n\
+of a large sparse matrix.\n\
 \n\
 The optional argument @var{chars} specifies a list of 3 characters to use\n\
 for printing values greater than zero, less than zero and equal to zero.\n\
-For example, with the @samp{+ \"+-.\"} format, @code{[1, 0, -1; -1, 0, 1]}\n\
-is displayed as\n\
+For example, with the @samp{\"+\" \"+-.\"} format,\n\
+@code{[1, 0, -1; -1, 0, 1]} is displayed as\n\
 \n\
 @example\n\
 @group\n\
@@ -3991,6 +4070,25 @@
   return retval;
 }
 
+DEFUN (__compactformat__, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{val} =} __compactformat__ ()\n\
+@deftypefnx {Built-in Function} {} __compactformat__ (@var{TRUE|FALSE})\n\
+Undocumented internal function\n\
+@end deftypefn")
+{
+  return SET_INTERNAL_VARIABLE (compact_format);
+}
+
+DEFUN (__formatstring__, , ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{val} =} __formatstring__ ()\n\
+Undocumented internal function\n\
+@end deftypefn")
+{
+  return ovl (format_string);
+}
+
 DEFUN (fixed_point_format, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} fixed_point_format ()\n\
@@ -4020,7 +4118,7 @@
 \n\
 @noindent\n\
 Notice that the first value appears to be 0 when it is actually 1.  Because\n\
-of the possibilty for confusion you should be careful about enabling\n\
+of the possibility for confusion you should be careful about enabling\n\
 @code{fixed_point_format}.\n\
 \n\
 When called from inside a function with the @qcode{\"local\"} option, the\n\
--- a/libinterp/corefcn/pr-output.h
+++ b/libinterp/corefcn/pr-output.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/procstream.cc
+++ b/libinterp/corefcn/procstream.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/procstream.h
+++ b/libinterp/corefcn/procstream.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,7 +23,8 @@
 #if !defined (octave_procstream_h)
 #define octave_procstream_h 1
 
-#include <iosfwd>
+#include <istream>
+#include <ostream>
 #include <string>
 
 #include <sys/types.h>
--- a/libinterp/corefcn/profiler.cc
+++ b/libinterp/corefcn/profiler.cc
@@ -1,6 +1,7 @@
 /*
 
-Copyright (C) 2012-2013 Daniel Kraft
+Copyright (C) 2014-2015 Julien Bect
+Copyright (C) 2012-2015 Daniel Kraft
 
 This file is part of Octave.
 
@@ -32,29 +33,6 @@
 #include "pager.h"
 #include "profiler.h"
 
-profile_data_accumulator::enter::enter (profile_data_accumulator& a,
-                                        const std::string& f)
-  : acc (a)
-{
-  // FIXME: Add test for f != "" to prevent a blank line showing up
-  //        in profiler statistics.  See bug #39524.  The root cause
-  //        is that the function name is not set for the recurring readline
-  //        hook function.
-  if (acc.is_active () && f != "")
-    {
-      fcn = f;
-      acc.enter_function (fcn);
-    }
-  else
-    fcn = "";
-}
-
-profile_data_accumulator::enter::~enter ()
-{
-  if (fcn != "")
-    acc.exit_function (fcn);
-}
-
 profile_data_accumulator::stats::stats ()
   : time (0.0), calls (0), recursive (false),
     parents (), children ()
@@ -106,7 +84,7 @@
 }
 
 profile_data_accumulator::tree_node*
-profile_data_accumulator::tree_node::exit (octave_idx_type fcn)
+profile_data_accumulator::tree_node::exit (octave_idx_type /* fcn */)
 {
   // FIXME: These assert statements don't make sense if profile() is called
   //        from within a function hierarchy to begin with.  See bug #39587.
@@ -419,7 +397,7 @@
 // Enable or disable the profiler data collection.
 DEFUN (__profiler_enable__, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __profiler_enable__ ()\n\
+@deftypefn {Function File} {} __profiler_enable__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -445,7 +423,7 @@
 // Clear all collected profiling data.
 DEFUN (__profiler_reset__, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __profiler_reset__ ()\n\
+@deftypefn {Function File} {} __profiler_reset__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
@@ -463,7 +441,7 @@
 // Query the timings collected by the profiler.
 DEFUN (__profiler_data__, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn {Function File} __profiler_data__ ()\n\
+@deftypefn {Function File} {} __profiler_data__ ()\n\
 Undocumented internal function.\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/profiler.h
+++ b/libinterp/corefcn/profiler.h
@@ -1,6 +1,7 @@
 /*
 
-Copyright (C) 2012-2013 Daniel Kraft
+Copyright (C) 2014-2015 Julien Bect
+Copyright (C) 2012-2015 Daniel Kraft
 
 This file is part of Octave.
 
@@ -39,17 +40,40 @@
 
   // This is a utility class that can be used to call the enter/exit
   // functions in a manner protected from stack unwinding.
-  class enter
+  template<class T> class enter
   {
   private:
 
     profile_data_accumulator& acc;
     std::string fcn;
+    bool is_active;
 
   public:
 
-    enter (profile_data_accumulator&, const std::string&);
-    virtual ~enter (void);
+    enter (profile_data_accumulator& a, const T& t) : acc (a)
+    {
+      // A profiling block cannot be active if the profiler is not
+      is_active = acc.is_active ();
+
+      if (is_active)
+        {
+          fcn = t.profiler_name ();
+
+          // NOTE: The test f != "" must be kept to prevent a blank line showing
+          //  up in profiler statistics.  See bug #39524.  The root cause is that
+          //  the function name is not set for the recurring readline hook function.
+          if (fcn == "")
+            is_active = false;  // Inactive profiling block
+          else
+            acc.enter_function (fcn);
+        }
+    }
+
+    ~enter ()
+    {
+      if (is_active)
+        acc.exit_function (fcn);
+    }
 
   private:
 
@@ -181,10 +205,12 @@
 extern OCTINTERP_API profile_data_accumulator profiler;
 
 // Helper macro to profile a block of code.
-#define BEGIN_PROFILER_BLOCK(name) \
+
+#define BEGIN_PROFILER_BLOCK(classname) \
   { \
-    profile_data_accumulator::enter pe (profiler, (name));
+    profile_data_accumulator::enter<classname> pe (profiler, *this);
+
 #define END_PROFILER_BLOCK \
-  }
+  }  // end of block => call pe's destructor
 
 #endif
--- a/libinterp/corefcn/pt-jit.cc
+++ b/libinterp/corefcn/pt-jit.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -46,13 +46,26 @@
 
 static int Vjit_startcnt = 1000;
 
+static int Vjit_failcnt = 0;
+
 #include <llvm/Analysis/CallGraph.h>
 #include <llvm/Analysis/Passes.h>
+
+#ifdef HAVE_LLVM_IR_VERIFIER_H
+#include <llvm/IR/Verifier.h>
+#else
 #include <llvm/Analysis/Verifier.h>
+#endif
+
 #include <llvm/Bitcode/ReaderWriter.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/ExecutionEngine/JIT.h>
+
+#ifdef LEGACY_PASSMANAGER
+#include <llvm/IR/LegacyPassManager.h>
+#else
 #include <llvm/PassManager.h>
+#endif
 
 #ifdef HAVE_LLVM_IR_FUNCTION_H
 #include <llvm/IR/LLVMContext.h>
@@ -164,7 +177,7 @@
       if (expr)
         {
           jit_variable *retvar = get_variable ("#return");
-          jit_value *retval;
+          jit_value *retval = 0;
           try
             {
               retval = visit (expr);
@@ -230,13 +243,13 @@
 void
 jit_convert::visit_anon_fcn_handle (tree_anon_fcn_handle&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_anon_fcn_handle implementation");
 }
 
 void
 jit_convert::visit_argument_list (tree_argument_list&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_argument_list implementation");
 }
 
 void
@@ -337,25 +350,25 @@
 void
 jit_convert::visit_global_command (tree_global_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_global_command implemenation");
 }
 
 void
 jit_convert::visit_persistent_command (tree_persistent_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_persistent_command implementation");
 }
 
 void
 jit_convert::visit_decl_elt (tree_decl_elt&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_decl_elt implementation");
 }
 
 void
 jit_convert::visit_decl_init_list (tree_decl_init_list&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_decl_init_list implementation");
 }
 
 void
@@ -464,37 +477,37 @@
 void
 jit_convert::visit_complex_for_command (tree_complex_for_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_complex_for_command implementation");
 }
 
 void
 jit_convert::visit_octave_user_script (octave_user_script&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_octave_user_script implementation");
 }
 
 void
 jit_convert::visit_octave_user_function (octave_user_function&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_octave_user_function implementation");
 }
 
 void
 jit_convert::visit_octave_user_function_header (octave_user_function&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_octave_user_function_header implementation");
 }
 
 void
 jit_convert::visit_octave_user_function_trailer (octave_user_function&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_octave_user_function_trailer implementation");
 }
 
 void
 jit_convert::visit_function_def (tree_function_def&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_function_def implementation");
 }
 
 void
@@ -518,7 +531,7 @@
 void
 jit_convert::visit_if_clause (tree_if_clause&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_if_clause implementation");
 }
 
 void
@@ -539,7 +552,6 @@
   // the condition check for the ith clause. For the else, it is simple the
   // else body. If there is no else body, then it is padded with the tail
   std::vector<jit_block *> entry_blocks (lst.size () + 1 - last_else);
-  std::vector<jit_block *> branch_blocks (lst.size (), 0); // final blocks
   entry_blocks[0] = block;
 
   // we need to construct blocks first, because they have jumps to eachother
@@ -630,25 +642,25 @@
 void
 jit_convert::visit_matrix (tree_matrix&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_matrix implementation");
 }
 
 void
 jit_convert::visit_cell (tree_cell&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_cell implementation");
 }
 
 void
 jit_convert::visit_multi_assignment (tree_multi_assignment&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_multi_assignment implementation");
 }
 
 void
 jit_convert::visit_no_op_command (tree_no_op_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_no_op_command implementation");
 }
 
 void
@@ -679,13 +691,19 @@
 void
 jit_convert::visit_fcn_handle (tree_fcn_handle&)
 {
+  throw jit_fail_exception ("No visit_fcn_handle implementation");
+}
+
+void
+jit_convert::visit_funcall (tree_funcall&)
+{
   throw jit_fail_exception ();
 }
 
 void
 jit_convert::visit_parameter_list (tree_parameter_list&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_parameter_list implementation");
 }
 
 void
@@ -721,13 +739,13 @@
 void
 jit_convert::visit_return_command (tree_return_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_return_command implementation");
 }
 
 void
 jit_convert::visit_return_list (tree_return_list&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_return_list implementation");
 }
 
 void
@@ -805,31 +823,132 @@
 void
 jit_convert::visit_switch_case (tree_switch_case&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_switch_case implementation");
 }
 
 void
 jit_convert::visit_switch_case_list (tree_switch_case_list&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_switch_case_list implementation");
 }
 
 void
-jit_convert::visit_switch_command (tree_switch_command&)
+jit_convert::visit_switch_command (tree_switch_command& cmd)
 {
-  throw jit_fail_exception ();
+  tree_switch_case_list *lst = cmd.case_list ();
+
+  // always visit switch expression
+  tree_expression *expr = cmd.switch_value ();
+  assert (expr && "Switch value can not be null");
+  jit_value *value = visit (expr);
+  assert (value);
+
+  size_t case_blocks_num = lst->size ();
+
+  if (! case_blocks_num)  // there's nothing to do
+    return;
+
+  // check for otherwise, it's interpreted as last 'else' condition
+  size_t has_otherwise = 0;
+  tree_switch_case *last = lst->back ();
+  if (last->is_default_case ())
+    has_otherwise = 1;
+
+  std::vector<jit_block *> entry_blocks (case_blocks_num + 1 - has_otherwise);
+
+  // the first entry point is always the actual block. afterward new blocks
+  // are created for every case and the otherwise branch
+  entry_blocks[0] = block;
+  for (size_t i = 1; i < case_blocks_num; ++i)
+    entry_blocks[i] = factory.create<jit_block> ("case_cond");
+
+  jit_block *tail = factory.create<jit_block> ("switch_tail");
+
+  // if there's no otherwise branch, the the 'else' of the last branch
+  // has to point to the tail
+  if (! has_otherwise)
+    entry_blocks[entry_blocks.size()-1] = tail;
+
+  // each branch in the case statement will have different breaks/continues
+  block_list current_breaks = breaks;
+  block_list current_continues = continues;
+  breaks.clear ();
+  continues.clear ();
+
+  size_t num_incomming = 0; // number of incomming blocks to our tail
+
+  tree_switch_case_list::iterator iter = lst->begin ();
+  for (size_t i = 0; i < case_blocks_num; ++iter, ++i)
+    {
+      tree_switch_case *twc = *iter;
+      block = entry_blocks[i]; // case_cond
+      assert (block);
+
+      if (i)
+        blocks.push_back (entry_blocks[i]);  // first block already pushed
+
+      if (! twc->is_default_case ())
+        {
+          // compare result of switch expression with actual case label
+          tree_expression *te = twc->case_label ();
+          jit_value *label = visit (te);
+          assert(label);
+
+          const jit_operation& fn = jit_typeinfo::binary_op (octave_value::op_eq);
+          jit_value *cond = create_checked (fn, value, label);
+          assert(cond);
+
+          jit_call *check = create_checked (&jit_typeinfo::logically_true,
+                                            cond);
+
+          jit_block *body = factory.create<jit_block> ("case_body");
+          blocks.push_back (body);
+
+          block->append (factory.create<jit_cond_branch> (check, body,
+                                                          entry_blocks[i+1]));
+          block = body; // case_body
+        }
+
+      tree_statement_list *stmt_lst = twc->commands ();
+      assert(stmt_lst);
+
+      try
+        {
+          stmt_lst->accept (*this);
+          num_incomming++;
+          block->append (factory.create<jit_branch> (tail));
+        }
+      catch (const jit_break_exception&)
+        { }
+
+      // each branch in the case statement will have different breaks/continues
+      current_breaks.splice (current_breaks.end (), breaks);
+      current_continues.splice (current_continues.end (), continues);
+    }
+
+  // each branch in the case statement will have different breaks/continues
+  breaks.splice (breaks.end (), current_breaks);
+  continues.splice (continues.end (), current_continues);
+
+  if (num_incomming || ! has_otherwise)
+    {
+      blocks.push_back (tail);
+      block = tail; // switch_tail
+    }
+  else
+    throw jit_break_exception ();   // every branch broke
 }
 
 void
 jit_convert::visit_try_catch_command (tree_try_catch_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_try_catch_command implementation");
 }
 
 void
 jit_convert::visit_unwind_protect_command (tree_unwind_protect_command&)
 {
-  throw jit_fail_exception ();
+  throw jit_fail_exception ("No visit_unwind_protect_command implementation");
 }
 
 void
@@ -895,9 +1014,66 @@
 }
 
 void
-jit_convert::visit_do_until_command (tree_do_until_command&)
+jit_convert::visit_do_until_command (tree_do_until_command& duc)
 {
-  throw jit_fail_exception ();
+  unwind_protect prot;
+  prot.protect_var (breaks);
+  prot.protect_var (continues);
+  breaks.clear ();
+  continues.clear ();
+
+  jit_block *body = factory.create<jit_block> ("do_until_body");
+  jit_block *cond_check = factory.create<jit_block> ("do_until_cond_check");
+  jit_block *tail = factory.create<jit_block> ("do_until_tail");
+
+  block->append (factory.create<jit_branch> (body));
+  blocks.push_back (body);
+  block = body;
+
+  tree_statement_list *loop_body = duc.body ();
+  bool all_breaking = false;
+  if (loop_body)
+    {
+      try
+        {
+          loop_body->accept (*this);
+        }
+      catch (const jit_break_exception&)
+        {
+          all_breaking = true;
+        }
+    }
+
+  finish_breaks (tail, breaks);
+
+  if (! all_breaking || continues.size ())
+    {
+      jit_block *interrupt_check
+        = factory.create<jit_block> ("interrupt_check");
+      blocks.push_back (interrupt_check);
+      finish_breaks (interrupt_check, continues);
+      if (! all_breaking)
+        block->append (factory.create<jit_branch> (interrupt_check));
+
+      block = interrupt_check;
+      jit_error_check *ec
+        = factory.create<jit_error_check> (jit_error_check::var_interrupt,
+                                           cond_check, final_block);
+      block->append (ec);
+
+      blocks.push_back (cond_check);
+      block = cond_check;
+
+      tree_expression *expr = duc.condition ();
+      assert (expr && "Do-Until expression can not be null");
+      jit_value *check = visit (expr);
+      check = create_checked (&jit_typeinfo::logically_true, check);
+
+      block->append (factory.create<jit_cond_branch> (check, tail, body));
+    }
+
+  blocks.push_back (tail);
+  block = tail;
 }
 
 void
@@ -956,6 +1132,9 @@
   else
     {
       octave_value val = record.varval ();
+      if (val.is_undefined ())
+        val = symbol_table::find_function (vname);
+
       jit_type *type = jit_typeinfo::type_of (val);
       bounds.push_back (type_bound (type, vname));
 
@@ -1888,10 +2067,15 @@
   if (! engine)
     return false;
 
+#ifdef LEGACY_PASSMANAGER
+  module_pass_manager = new llvm::legacy::PassManager ();
+  pass_manager = new llvm::legacy::FunctionPassManager (module);
+#else
   module_pass_manager = new llvm::PassManager ();
+  pass_manager = new llvm::FunctionPassManager (module);
+#endif
   module_pass_manager->add (llvm::createAlwaysInlinerPass ());
 
-  pass_manager = new llvm::FunctionPassManager (module);
 #ifdef HAVE_LLVM_DATALAYOUT
   pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
 #else
@@ -2006,8 +2190,13 @@
   if (Vdebug_jit)
     {
       std::string error;
+#ifdef RAW_FD_OSTREAM_ARG_IS_LLVM_SYS_FS
+      llvm::raw_fd_ostream fout ("test.bc", error,
+                                 llvm::sys::fs::F_Binary);
+#else
       llvm::raw_fd_ostream fout ("test.bc", error,
                                  llvm::raw_fd_ostream::F_Binary);
+#endif
       llvm::WriteBitcodeToFile (module, fout);
     }
 }
@@ -2123,6 +2312,8 @@
             std::cout << "jit fail: " << e.what () << std::endl;
         }
 
+      Vjit_failcnt++;
+
       wrapper.erase ();
       raw_fn.erase ();
     }
@@ -2279,6 +2470,9 @@
           if (e.known ())
             std::cout << "jit fail: " << e.what () << std::endl;
         }
+
+      Vjit_failcnt++;
+
     }
 
   if (llvm_function)
@@ -2314,7 +2508,37 @@
 
 #endif
 
-DEFUN (debug_jit, args, nargout,
+#if defined (HAVE_LLVM)
+#define UNUSED_WITHOUT_LLVM(x) x
+#else
+#define UNUSED_WITHOUT_LLVM(x) x GCC_ATTR_UNUSED
+#endif
+
+DEFUN (jit_failcnt, UNUSED_WITHOUT_LLVM (args),
+       UNUSED_WITHOUT_LLVM (nargout),
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{val} =} jit_failcnt ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} jit_failcnt (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} jit_failcnt (@var{new_val}, \"local\")\n\
+Query or set the internal variable that counts the number of\n\
+JIT fail exceptions for Octave's JIT compiler.\n\
+\n\
+When called from inside a function with the @qcode{\"local\"} option, the\n\
+variable is changed locally for the function and any subroutines it calls.  \n\
+The original variable value is restored when exiting the function.\n\
+@seealso{jit_enable, jit_startcnt, debug_jit}\n\
+@end deftypefn")
+{
+#if defined (HAVE_LLVM)
+  return SET_INTERNAL_VARIABLE (jit_failcnt);
+#else
+  warning ("jit_failcnt: JIT compiling not available in this version of Octave");
+  return octave_value ();
+#endif
+}
+
+DEFUN (debug_jit, UNUSED_WITHOUT_LLVM (args),
+       UNUSED_WITHOUT_LLVM (nargout),
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} debug_jit ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\
@@ -2336,7 +2560,8 @@
 #endif
 }
 
-DEFUN (jit_enable, args, nargout,
+DEFUN (jit_enable, UNUSED_WITHOUT_LLVM (args),
+       UNUSED_WITHOUT_LLVM (nargout),
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} jit_enable ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\
@@ -2357,7 +2582,8 @@
 #endif
 }
 
-DEFUN (jit_startcnt, args, nargout,
+DEFUN (jit_startcnt, UNUSED_WITHOUT_LLVM (args),
+       UNUSED_WITHOUT_LLVM (nargout),
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} jit_startcnt ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} jit_startcnt (@var{new_val})\n\
--- a/libinterp/corefcn/pt-jit.h
+++ b/libinterp/corefcn/pt-jit.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
@@ -129,6 +129,8 @@
 
   void visit_fcn_handle (tree_fcn_handle&);
 
+  void visit_funcall (tree_funcall&);
+
   void visit_parameter_list (tree_parameter_list&);
 
   void visit_postfix_expression (tree_postfix_expression&);
@@ -384,8 +386,13 @@
   size_t trip_count (const octave_value& bounds) const;
 
   llvm::Module *module;
+#ifdef LEGACY_PASSMANAGER
+  llvm::legacy::PassManager *module_pass_manager;
+  llvm::legacy::FunctionPassManager *pass_manager;
+#else
   llvm::PassManager *module_pass_manager;
   llvm::FunctionPassManager *pass_manager;
+#endif
   llvm::ExecutionEngine *engine;
 };
 
--- a/libinterp/corefcn/quad.cc
+++ b/libinterp/corefcn/quad.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -235,7 +235,7 @@
         quad_fcn = args(0).function_value ();
       else
         {
-          fcn_name = unique_symbol_name ("__quad_fcn_");
+          fcn_name = unique_symbol_name ("__quad_fcn__");
           std::string fname = "function y = ";
           fname.append (fcn_name);
           fname.append ("(x) y = ");
--- a/libinterp/corefcn/quadcc.cc
+++ b/libinterp/corefcn/quadcc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 Pedro Gonnet
+Copyright (C) 2010-2015 Pedro Gonnet
 
 This file is part of Octave.
 
@@ -25,14 +25,14 @@
 #endif
 
 #include "lo-ieee.h"
-#include "parse.h"
-#include "variables.h"
+#include "oct-locbuf.h"
 
 #include "defun.h"
 #include "error.h"
 #include "oct-obj.h"
+#include "parse.h"
 #include "utils.h"
-
+#include "variables.h"
 
 /* Extended debugging */
 #define DEBUG_QUADCC 0
@@ -1492,9 +1492,9 @@
 @deftypefnx {Function File} {@var{q} =} quadcc (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing})\n\
 @deftypefnx {Function File} {[@var{q}, @var{err}, @var{nr_points}] =} quadcc (@dots{})\n\
 Numerically evaluate the integral of @var{f} from @var{a} to @var{b}\n\
-using the doubly-adaptive Clenshaw-Curtis quadrature described by P. Gonnet\n\
-in @cite{Increasing the Reliability of Adaptive Quadrature Using Explicit\n\
-Interpolants}.\n\
+using the doubly-adaptive @nospell{Clenshaw-Curtis} quadrature described by\n\
+@nospell{P. Gonnet} in @cite{Increasing the Reliability of Adaptive\n\
+Quadrature Using Explicit Interpolants}.\n\
 @var{f} is a function handle, inline function, or string\n\
 containing the name of the function to evaluate.\n\
 The function @var{f} must be vectorized and must return a vector of output\n\
@@ -1540,14 +1540,14 @@
 and, as such, may be less efficient for a smooth or otherwise\n\
 well-behaved integrand than other methods such as @code{quadgk}.\n\
 \n\
-The algorithm uses Clenshaw-Curtis quadrature rules of increasing\n\
+The algorithm uses @nospell{Clenshaw-Curtis} quadrature rules of increasing\n\
 degree in each interval and bisects the interval if either the\n\
 function does not appear to be smooth or a rule of maximum\n\
 degree has been reached.  The error estimate is computed from the\n\
 L2-norm of the difference between two successive interpolations\n\
 of the integrand over the nodes of the respective quadrature rules.\n\
 \n\
-Reference: P. Gonnet, @cite{Increasing the Reliability of Adaptive\n\
+Reference: @nospell{P. Gonnet}, @cite{Increasing the Reliability of Adaptive\n\
 Quadrature Using Explicit Interpolants}, ACM Transactions on\n\
 Mathematical Software, Vol. 37, Issue 3, Article No. 3, 2010.\n\
 @seealso{quad, quadv, quadl, quadgk, trapz, dblquad, triplequad}\n\
--- a/libinterp/corefcn/qz.cc
+++ b/libinterp/corefcn/qz.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1998-2013 A. S. Hodel
+Copyright (C) 1998-2015 A. S. Hodel
 
 This file is part of Octave.
 
@@ -75,7 +75,7 @@
                              octave_idx_type& INFO
                              F77_CHAR_ARG_LEN_DECL);
 
-F77_RET_T
+  F77_RET_T
   F77_FUNC (zggbal, ZGGBAL) (F77_CONST_CHAR_ARG_DECL,
                              const octave_idx_type& N, Complex* A,
                              const octave_idx_type& LDA, Complex* B,
@@ -97,7 +97,7 @@
                              F77_CHAR_ARG_LEN_DECL
                              F77_CHAR_ARG_LEN_DECL);
 
-F77_RET_T
+  F77_RET_T
   F77_FUNC (zggbak, ZGGBAK) (F77_CONST_CHAR_ARG_DECL,
                              F77_CONST_CHAR_ARG_DECL,
                              const octave_idx_type& N,
@@ -122,7 +122,7 @@
                              F77_CHAR_ARG_LEN_DECL
                              F77_CHAR_ARG_LEN_DECL);
 
- F77_RET_T
+  F77_RET_T
   F77_FUNC (zgghrd, ZGGHRD) (F77_CONST_CHAR_ARG_DECL,
                              F77_CONST_CHAR_ARG_DECL,
                              const octave_idx_type& N,
@@ -153,7 +153,7 @@
                              F77_CHAR_ARG_LEN_DECL
                              F77_CHAR_ARG_LEN_DECL);
 
-F77_RET_T
+  F77_RET_T
   F77_FUNC (zhgeqz, ZHGEQZ) (F77_CONST_CHAR_ARG_DECL,
                              F77_CONST_CHAR_ARG_DECL,
                              F77_CONST_CHAR_ARG_DECL,
@@ -204,7 +204,7 @@
                              F77_CHAR_ARG_LEN_DECL
                              F77_CHAR_ARG_LEN_DECL);
 
-F77_RET_T
+  F77_RET_T
   F77_FUNC (ztgevc, ZTGEVC) (F77_CONST_CHAR_ARG_DECL,
                              F77_CONST_CHAR_ARG_DECL,
                              octave_idx_type* SELECT,
@@ -402,7 +402,7 @@
 
   if (nargin == 2)
     ord_job = 'N';
-  else if (!args(2).is_string ())
+  else if (! args(2).is_string ())
     {
       error ("qz: OPT must be a string");
       return retval;
@@ -928,7 +928,7 @@
                   std::cout << "  single gen eig:" << std::endl;
                   std::cout << "  alphar(" << jj << ") = " << aa(jj,jj)
                             << std::endl;
-                  std::cout << "  betar( " << jj << ") = " << bb(jj,jj)
+                  std::cout << "  betar(" << jj << ") = " << bb(jj,jj)
                             << std::endl;
                   std::cout << "  alphai(" << jj << ") = 0" << std::endl;
 #endif
@@ -1277,9 +1277,9 @@
 %! [aa, bb, q, z, v, w, lambda] = qz (a, b);
 %! sz = length (lambda);
 %! observed = (b * v * diag ([lambda;0])) (:, 1:sz);
-%! assert ( (a*v) (:, 1:sz), observed, norm (observed) * 1e-14);
+%! assert ((a*v)(:, 1:sz), observed, norm (observed) * 1e-14);
 %! observed = (diag ([lambda;0]) * w' * b) (1:sz, :);
-%! assert ( (w'*a) (1:sz, :) , observed, norm (observed) * 1e-13);
+%! assert ((w'*a)(1:sz, :) , observed, norm (observed) * 1e-13);
 %! assert (q * a * z, aa, norm (aa) * 1e-14);
 %! assert (q * b * z, bb, norm (bb) * 1e-14);
 
--- a/libinterp/corefcn/rand.cc
+++ b/libinterp/corefcn/rand.cc
@@ -1,7 +1,7 @@
 
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -408,8 +408,8 @@
 vector in Octave's startup files (@pxref{Startup Files}).\n\
 \n\
 To compute the pseudo-random sequence, @code{rand} uses the Mersenne\n\
-Twister with a period of @math{2^{19937}-1} (See M. Matsumoto and\n\
-T. Nishimura,\n\
+Twister with a period of @math{2^{19937}-1} (See\n\
+@nospell{M. Matsumoto and T. Nishimura},\n\
 @cite{Mersenne Twister: A 623-dimensionally equidistributed uniform\n\
 pseudorandom number generator}, ACM Trans. on\n\
 Modeling and Computer Simulation Vol. 8, No. 1, pp. 3-30, January 1998,\n\
@@ -567,17 +567,17 @@
 elements having zero mean and variance one.  The arguments are\n\
 handled the same as the arguments for @code{rand}.\n\
 \n\
-By default, @code{randn} uses the Marsaglia and Tsang ``Ziggurat technique''\n\
-to transform from a uniform to a normal distribution.\n\
+By default, @code{randn} uses the @nospell{Marsaglia and Tsang}\n\
+``Ziggurat technique'' to transform from a uniform to a normal distribution.\n\
 \n\
 The class of the value returned can be controlled by a trailing\n\
 @qcode{\"double\"} or @qcode{\"single\"} argument.  These are the only valid\n\
 classes.\n\
 \n\
-Reference: G. Marsaglia and W.W. Tsang,\n\
+Reference: @nospell{G. Marsaglia and W.W. Tsang},\n\
 @cite{Ziggurat Method for Generating Random Variables},\n\
 J. Statistical Software, vol 5, 2000,\n\
-@url{http://www.jstatsoft.org/v05/i08/})\n\
+@url{http://www.jstatsoft.org/v05/i08/}\n\
 \n\
 @seealso{rand, rande, randg, randp}\n\
 @end deftypefn")
@@ -638,17 +638,17 @@
 Return a matrix with exponentially distributed random elements.  The\n\
 arguments are handled the same as the arguments for @code{rand}.\n\
 \n\
-By default, @code{randn} uses the Marsaglia and Tsang ``Ziggurat technique''\n\
-to transform from a uniform to an exponential distribution.\n\
+By default, @code{randn} uses the @nospell{Marsaglia and Tsang}\n\
+``Ziggurat technique'' to transform from a uniform to a normal distribution.\n\
 \n\
 The class of the value returned can be controlled by a trailing\n\
 @qcode{\"double\"} or @qcode{\"single\"} argument.  These are the only valid\n\
 classes.\n\
 \n\
-Reference: G. Marsaglia and W.W. Tsang,\n\
+Reference: @nospell{G. Marsaglia and W.W. Tsang},\n\
 @cite{Ziggurat Method for Generating Random Variables},\n\
 J. Statistical Software, vol 5, 2000,\n\
-@url{http://www.jstatsoft.org/v05/i08/})\n\
+@url{http://www.jstatsoft.org/v05/i08/}\n\
 \n\
 @seealso{rand, randn, randg, randp}\n\
 @end deftypefn")
@@ -1003,17 +1003,17 @@
 Cambridge University Press, 1992.\n\
 \n\
 @item For matrix @var{l} @leq{} 10, use inversion method.[2]\n\
-E. Stadlober, et al., WinRand source code, available via FTP.\n\
+@nospell{E. Stadlober, et al., WinRand source code}, available via FTP.\n\
 \n\
 @item For matrix @var{l} > 10, use patchwork rejection method.\n\
-E. Stadlober, et al., WinRand source code, available via FTP, or\n\
-H. Zechner, @cite{Efficient sampling from continuous and discrete\n\
+@nospell{E. Stadlober, et al., WinRand source code}, available via FTP, or\n\
+@nospell{H. Zechner}, @cite{Efficient sampling from continuous and discrete\n\
 unimodal distributions}, Doctoral Dissertation, 156pp., Technical\n\
-University Graz, Austria, 1994.\n\
+University @nospell{Graz}, Austria, 1994.\n\
 \n\
 @item For @var{l} > 1e8, use normal approximation.\n\
-L. Montanet, et al., @cite{Review of Particle Properties}, Physical Review\n\
-D 50 p1284, 1994.\n\
+@nospell{L. Montanet}, et al., @cite{Review of Particle Properties},\n\
+Physical Review D 50 p1284, 1994.\n\
 @end table\n\
 \n\
 The class of the value returned can be controlled by a trailing\n\
--- a/libinterp/corefcn/rcond.cc
+++ b/libinterp/corefcn/rcond.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 David Bateman
+Copyright (C) 2008-2015 David Bateman
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/regexp.cc
+++ b/libinterp/corefcn/regexp.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 2002-2005 Paul Kienzle
 
 This file is part of Octave.
@@ -189,12 +189,13 @@
 
   for (int i = skip; i < nargin; i++)
     {
-      std::string str = args(i).string_value ();
+      std::string str;
 
-      if (error_state)
+      if (args(i).is_string ())
+        str = args(i).string_value ();
+      else
         {
-          error ("%s: optional arguments must be character strings",
-                 who.c_str ());
+          error ("%s: optional arguments must be strings", who.c_str ());
           break;
         }
 
@@ -676,11 +677,12 @@
 Match within a word\n\
 @end table\n\
 \n\
-Implementation Note: For compatibility with @sc{matlab}, ordinary escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{pat}\n\
-regardless of whether @var{pat} has been defined within single quotes.  Use\n\
-a second backslash to stop interpolation of the escape sequence (e.g.,\n\
-\"\\\\n\") or use the @code{regexptranslate} function.\n\
+Implementation Note: For compatibility with @sc{matlab}, escape sequences\n\
+in @var{pat} (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are expanded\n\
+even when @var{pat} has been defined with single quotes.  To disable\n\
+expansion use a second backslash before the escape sequence (e.g.,\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 \n\
 The outputs of @code{regexp} default to the order given below\n\
 \n\
@@ -1308,11 +1310,12 @@
 \n\
 @end table\n\
 \n\
-Implementation Note: For compatibility with @sc{matlab}, ordinary escape\n\
-sequences (e.g., @qcode{\"\\n\"} => newline) are processed in both @var{pat}\n\
-and @var{repstr} regardless of whether they were defined within single\n\
-quotes.  Use a second backslash to stop interpolation of the escape sequence\n\
-(e.g., \"\\\\n\") or use the @code{regexptranslate} function.\n\
+Implementation Note: For compatibility with @sc{matlab}, escape sequences\n\
+in @var{pat} (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are expanded\n\
+even when @var{pat} has been defined with single quotes.  To disable\n\
+expansion use a second backslash before the escape sequence (e.g.,\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 @seealso{regexp, regexpi, strrep}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/schur.cc
+++ b/libinterp/corefcn/schur.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -63,7 +63,7 @@
 @deftypefnx {Built-in Function} {@var{S} =} schur (@var{A}, \"real\")\n\
 @deftypefnx {Built-in Function} {@var{S} =} schur (@var{A}, \"complex\")\n\
 @deftypefnx {Built-in Function} {@var{S} =} schur (@var{A}, @var{opt})\n\
-@deftypefnx {Built-in Function} {[@var{U}, @var{S}] =} schur (@var{A}, @dots{})\n\
+@deftypefnx {Built-in Function} {[@var{U}, @var{S}] =} schur (@dots{})\n\
 @cindex Schur decomposition\n\
 Compute the Schur@tie{}decomposition of @var{A}\n\
 @tex\n\
@@ -124,7 +124,7 @@
 The Schur@tie{}decomposition is used to compute eigenvalues of a\n\
 square matrix, and has applications in the solution of algebraic\n\
 Riccati equations in control (see @code{are} and @code{dare}).\n\
-@seealso{rsf2csf, lu, chol, hess, qr, qz, svd}\n\
+@seealso{rsf2csf, ordschur, lu, chol, hess, qr, qz, svd}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -143,9 +143,9 @@
 
   if (nargin == 2)
     {
-      ord = args(1).string_value ();
-
-      if (error_state)
+      if (args(1).is_string ())
+        ord = args(1).string_value ();
+      else
         {
           error ("schur: second argument must be a string");
           return retval;
@@ -170,7 +170,7 @@
       if (ord_char != 'U' && ord_char != 'A' && ord_char != 'D'
           && ord_char != 'u' && ord_char != 'a' && ord_char != 'd')
         {
-          warning ("schur: incorrect ordered schur argument '%c'",
+          warning ("schur: incorrect ordered schur argument '%s'",
                    ord.c_str ());
           return retval;
         }
@@ -286,11 +286,13 @@
 %! [u, s] = schur (a);
 %! assert (u' * a * u, s, sqrt (eps ("single")));
 
-%!test
-%! fail ("schur ([1, 2; 3, 4], 2)", "warning");
+%!error schur ()
+%!error schur (1,2,3)
+%!error [a,b,c] = schur (1)
+%!error <argument must be a square matrix> schur ([1, 2, 3; 4, 5, 6])
+%!error <wrong type argument 'cell'> schur ({1})
+%!warning <incorrect ordered schur argument> schur ([1, 2; 3, 4], "bad_opt");
 
-%!error schur ()
-%!error <argument must be a square matrix> schur ([1, 2, 3; 4, 5, 6])
 */
 
 DEFUN (rsf2csf, args, nargout,
--- a/libinterp/corefcn/sighandlers.cc
+++ b/libinterp/corefcn/sighandlers.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -523,7 +523,8 @@
           octave_signal_caught = 1;
           octave_interrupt_state++;
 
-          if (interactive && octave_interrupt_state == 2)
+          if (interactive && ! forced_interactive
+              && octave_interrupt_state == 2)
             std::cerr << "Press Control-C again to abort." << std::endl;
 
           if (octave_interrupt_state >= 3)
--- a/libinterp/corefcn/sighandlers.h
+++ b/libinterp/corefcn/sighandlers.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/siglist.c
+++ b/libinterp/corefcn/siglist.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/siglist.h
+++ b/libinterp/corefcn/siglist.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/sparse-xdiv.cc
+++ b/libinterp/corefcn/sparse-xdiv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -28,6 +28,7 @@
 #include <cassert>
 
 #include "Array-util.h"
+#include "lo-array-gripes.h"
 #include "oct-cmplx.h"
 #include "quit.h"
 #include "error.h"
@@ -43,8 +44,7 @@
 static void
 solve_singularity_warning (double rcond)
 {
-  warning ("matrix singular to machine precision, rcond = %g", rcond);
-  warning ("attempting to find minimum norm solution");
+  gripe_singular_matrix (rcond);
 }
 
 template <class T1, class T2>
@@ -302,7 +302,7 @@
   using std::min;
   const octave_idx_type nc = min (d_nr, a_nc);
 
-  if ( ! mx_div_conform (a, d))
+  if (! mx_div_conform (a, d))
     return RT ();
 
   const octave_idx_type nz = a.nnz ();
@@ -569,7 +569,7 @@
   using std::min;
   const octave_idx_type nr = min (d_nc, a_nr);
 
-  if ( ! mx_leftdiv_conform (d, a))
+  if (! mx_leftdiv_conform (d, a))
     return RT ();
 
   const octave_idx_type nz = a.nnz ();
--- a/libinterp/corefcn/sparse-xdiv.h
+++ b/libinterp/corefcn/sparse-xdiv.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/corefcn/sparse-xpow.cc
+++ b/libinterp/corefcn/sparse-xpow.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/corefcn/sparse-xpow.h
+++ b/libinterp/corefcn/sparse-xpow.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/corefcn/sparse.cc
+++ b/libinterp/corefcn/sparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -135,7 +135,7 @@
 
   if (nargin == 1)
     {
-      octave_value arg = args (0);
+      octave_value arg = args(0);
       if (arg.is_bool_type ())
         retval = arg.sparse_bool_matrix_value ();
       else if (arg.is_complex_type ())
@@ -178,7 +178,8 @@
 
       if (! error_state)
         {
-          octave_idx_type m = -1, n = -1, nzmax = -1;
+          octave_idx_type m, n, nzmax;
+          m = n = nzmax = -1;
           if (nargin == 6)
             {
               nzmax = args(5).idx_type_value ();
--- a/libinterp/corefcn/spparms.cc
+++ b/libinterp/corefcn/spparms.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -40,7 +40,7 @@
 @deftypefnx {Built-in Function} {[@var{keys}, @var{vals}] =} spparms ()\n\
 @deftypefnx {Built-in Function} {@var{val} =} spparms (@var{key})\n\
 @deftypefnx {Built-in Function} { } spparms (@var{vals})\n\
-@deftypefnx {Built-in Function} { } spparms (\"defaults\")\n\
+@deftypefnx {Built-in Function} { } spparms (\"default\")\n\
 @deftypefnx {Built-in Function} { } spparms (\"tight\")\n\
 @deftypefnx {Built-in Function} { } spparms (@var{key}, @var{val})\n\
 Query or set the parameters used by the sparse solvers and factorization\n\
@@ -86,7 +86,7 @@
 The pivot tolerance of the @sc{umfpack} symmetric solvers (default 0.001)\n\
 \n\
 @item bandden\n\
-The density of non-zero elements in a banded matrix before it is treated\n\
+The density of nonzero elements in a banded matrix before it is treated\n\
 by the @sc{lapack} banded solvers (default 0.5)\n\
 \n\
 @item umfpack\n\
@@ -97,7 +97,7 @@
 The value of individual keys can be set with\n\
 @code{spparms (@var{key}, @var{val})}.\n\
 The default values can be restored with the special keyword\n\
-@qcode{\"defaults\"}.  The special keyword @qcode{\"tight\"} can be used to\n\
+@qcode{\"default\"}.  The special keyword @qcode{\"tight\"} can be used to\n\
 set the mmd solvers to attempt a sparser solution at the potential cost of\n\
 longer running time.\n\
 @seealso{chol, colamd, lu, qr, symamd}\n\
@@ -129,8 +129,17 @@
           for (int i = 0; i < len; i++)
             str[i] = tolower (str[i]);
 
-          if (str == "defaults")
-            octave_sparse_params::defaults ();
+          if (str == "defaults" || str == "default")
+            {
+              // FIXME: deprecated in 4.0, remove "defaults" for 4.4 release
+              static bool warned = false;
+              if (! warned && str == "defaults")
+                {
+                  warning ("spparms: use \"default\" instead of \"defaults\"");
+                  warned = true;
+                }
+              octave_sparse_params::defaults ();
+            }
           else if (str == "tight")
             octave_sparse_params::tight ();
           else
@@ -181,7 +190,7 @@
 /*
 %!test
 %! old_vals = spparms ();  # save state
-%! spparms ("defaults");
+%! spparms ("default");
 %! vals = spparms ();
 %! assert (vals, [0 1 1 0 3 3 0.5 1.0 1.0 0.1 0.5 1.0 0.001]');
 %! [keys, vals] = spparms ();
--- a/libinterp/corefcn/sqrtm.cc
+++ b/libinterp/corefcn/sqrtm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Ross Lippert and Paul Kienzle
+Copyright (C) 2001-2015 Ross Lippert and Paul Kienzle
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -101,7 +101,8 @@
 
   typedef typename Matrix::element_type real_type;
 
-  real_type cutoff = 0, one = 1;
+  real_type cutoff = 0;
+  real_type one = 1;
   real_type eps = std::numeric_limits<real_type>::epsilon ();
 
   if (! iscomplex)
@@ -205,7 +206,7 @@
 @deftypefnx {Built-in Function} {[@var{s}, @var{error_estimate}] =} sqrtm (@var{A})\n\
 Compute the matrix square root of the square matrix @var{A}.\n\
 \n\
-Ref: N.J. Higham.  @cite{A New sqrtm for @sc{matlab}}.  Numerical\n\
+Ref: @nospell{N.J. Higham}.  @cite{A New sqrtm for @sc{matlab}}.  Numerical\n\
 Analysis Report No. 336, Manchester @nospell{Centre} for Computational\n\
 Mathematics, Manchester, England, January 1999.\n\
 @seealso{expm, logm}\n\
--- a/libinterp/corefcn/str2double.cc
+++ b/libinterp/corefcn/str2double.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 Jaroslav Hajek
+Copyright (C) 2010-2015 Jaroslav Hajek
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -45,7 +45,7 @@
 static double
 single_num (std::istringstream& is)
 {
-  double num;
+  double num = 0.0;
 
   char c = is.peek ();
 
@@ -60,7 +60,8 @@
     {
       // It's infinity.
       is.get ();
-      char c1 = is.get (), c2 = is.get ();
+      char c1 = is.get ();
+      char c2 = is.get ();
       if (std::tolower (c1) == 'n' && std::tolower (c2) == 'f')
         {
           num = octave_Inf;
--- a/libinterp/corefcn/strfind.cc
+++ b/libinterp/corefcn/strfind.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,6 +30,8 @@
 #include <limits>
 #include <string>
 
+#include "oct-locbuf.h"
+
 #include "Cell.h"
 #include "ov.h"
 #include "defun.h"
@@ -155,7 +157,8 @@
 starting index of every such occurrence in the vector @var{idx}.\n\
 \n\
 If there is no such occurrence, or if @var{pattern} is longer\n\
-than @var{str}, then @var{idx} is the empty array @code{[]}.\n\
+than @var{str}, or if @var{pattern} itself is empty, then @var{idx} is the\n\
+empty array @code{[]}.\n\
 The optional argument @qcode{\"overlaps\"} determines whether the pattern\n\
 can match at every position in @var{str} (true), or only for unique\n\
 occurrences of the complete pattern (false).  The default is true.\n\
@@ -209,7 +212,8 @@
 
   if (nargin == 2)
     {
-      octave_value argstr = args(0), argpat = args(1);
+      octave_value argstr = args(0);
+      octave_value argpat = args(1);
       if (argpat.is_string ())
         {
           Array<char> needle = argpat.char_array_value ();
@@ -217,10 +221,14 @@
           qs_preprocess (needle, table);
 
           if (argstr.is_string ())
-            retval = octave_value (qs_search (needle,
-                                              argstr.char_array_value (),
-                                              table, overlaps),
-                                   true, true);
+            if (argpat.is_empty ())
+              // Return a null matrix for null pattern for MW compatibility
+              retval = Matrix ();
+            else
+              retval = octave_value (qs_search (needle,
+                                                argstr.char_array_value (),
+                                                table, overlaps),
+                                     true, true);
           else if (argstr.is_cell ())
             {
               const Cell argsc = argstr.cell_value ();
@@ -231,11 +239,15 @@
                 {
                   octave_value argse = argsc(i);
                   if (argse.is_string ())
-                    retc(i)
-                      = octave_value (qs_search (needle,
-                                                 argse.char_array_value (),
-                                                 table, overlaps),
-                                      true, true);
+                    {
+                      if (argpat.is_empty ())
+                        retc(i) = Matrix ();
+                      else
+                        retc(i) = octave_value (qs_search (needle,
+                                                     argse.char_array_value (),
+                                                     table, overlaps),
+                                                true, true);
+                    }
                   else
                     {
                       error ("strfind: each element of CELLSTR must be a string");
@@ -264,11 +276,16 @@
 %!assert (strfind ("abababa", "aba", "overlaps", false), [1, 5])
 %!assert (strfind ({"abababa", "bla", "bla"}, "a"), {[1, 3, 5, 7], 3, 3})
 %!assert (strfind ("Linux _is_ user-friendly. It just isn't ignorant-friendly or idiot-friendly.", "friendly"), [17, 50, 68])
+%!assert (strfind ("abc", ""), [])
+%!assert (strfind ("abc", {"", "b", ""}), {[], 2, []})
+%!assert (strfind ({"abc", "def"}, ""), {[], []})
 
 %!error strfind ()
 %!error strfind ("foo", "bar", 1)
+%!error <unknown option: foobar> strfind ("foo", 100, "foobar", 1)
+%!error <each element of CELLSTR must be a string> strfind ({"A", 1}, "foo")
+%!error <first argument must be a string> strfind (100, "foo")
 %!error <PATTERN must be a string> strfind ("foo", 100)
-%!error <first argument must be a string> strfind (100, "foo")
 */
 
 static Array<char>
@@ -279,7 +296,9 @@
 {
   Array<char> ret = str;
 
-  octave_idx_type siz = str.numel (), psiz = pat.numel (), rsiz = rep.numel ();
+  octave_idx_type siz = str.numel ();
+  octave_idx_type psiz = pat.numel ();
+  octave_idx_type rsiz = rep.numel ();
 
   if (psiz != 0)
     {
@@ -311,21 +330,27 @@
           else
             retsiz = siz + nidx * (rsiz - psiz);
 
-          ret.clear (dim_vector (1, retsiz));
-          const char *src = str.data (), *reps = rep.data ();
-          char *dest = ret.fortran_vec ();
-
-          octave_idx_type k = 0;
-          for (octave_idx_type i = 0; i < nidx; i++)
+          if (retsiz == 0)
+            ret.clear (dim_vector (0, 0));
+          else
             {
-              octave_idx_type j = idx(i);
-              if (j >= k)
-                dest = std::copy (src + k, src + j, dest);
-              dest = std::copy (reps, reps + rsiz, dest);
-              k = j + psiz;
+              ret.clear (dim_vector (1, retsiz));
+              const char *src = str.data ();
+              const char *reps = rep.data ();
+              char *dest = ret.fortran_vec ();
+
+              octave_idx_type k = 0;
+              for (octave_idx_type i = 0; i < nidx; i++)
+                {
+                  octave_idx_type j = idx(i);
+                  if (j >= k)
+                    dest = std::copy (src + k, src + j, dest);
+                  dest = std::copy (reps, reps + rsiz, dest);
+                  k = j + psiz;
+                }
+
+              std::copy (src + k, src + siz, dest);
             }
-
-          std::copy (src + k, src + siz, dest);
         }
     }
 
@@ -380,7 +405,9 @@
 
   if (nargin == 3)
     {
-      octave_value argstr = args(0), argpat = args(1), argrep = args(2);
+      octave_value argstr = args(0);
+      octave_value argpat = args(1);
+      octave_value argrep = args(2);
       if (argpat.is_string () && argrep.is_string ())
         {
           const Array<char> pat = argpat.char_array_value ();
@@ -433,6 +460,8 @@
 %!assert (strrep ("abababc", "abab", "xyz"), "xyzxyzc")
 %!assert (strrep ("abababc", "abab", "xyz", "overlaps", false), "xyzabc")
 
+%!assert (size (strrep ("a", "a", "")), [0 0])
+
 %!error strrep ()
 %!error strrep ("foo", "bar", 3, 4)
 */
--- a/libinterp/corefcn/strfns.cc
+++ b/libinterp/corefcn/strfns.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -585,7 +585,7 @@
 
   if (args.length () == 2)
     {
-      retval = do_strcmp_fun (args (0), args (1), 0,
+      retval = do_strcmp_fun (args(0), args(1), 0,
                               "strcmp", strcmp_array_op, strcmp_str_op);
     }
   else
@@ -647,7 +647,8 @@
 strncmp_array_op (const charNDArray& s1, const charNDArray& s2,
                   octave_idx_type n)
 {
-  octave_idx_type l1 = s1.numel (), l2 = s2.numel ();
+  octave_idx_type l1 = s1.numel ();
+  octave_idx_type l2 = s2.numel ();
   return (n > 0 && n <= l1 && n <= l2
           && std::equal (s1.data (), s1.data () + n, s2.data ()));
 }
@@ -658,7 +659,8 @@
 static bool
 strncmp_str_op (const std::string& s1, const std::string& s2, octave_idx_type n)
 {
-  octave_idx_type l1 = s1.length (), l2 = s2.length ();
+  octave_idx_type l1 = s1.length ();
+  octave_idx_type l2 = s2.length ();
   return (n > 0 && n <= l1 && n <= l2
           && std::equal (s1.data (), s1.data () + n, s2.data ()));
 }
@@ -735,7 +737,7 @@
 struct icmp_char_eq : public std::binary_function<char, char, bool>
 {
   bool operator () (char x, char y) const
-    { return std::toupper (x) == std::toupper (y); }
+  { return std::toupper (x) == std::toupper (y); }
 };
 
 // strcmpi is equivalent to strcmp in that it checks all dims.
@@ -781,7 +783,7 @@
 
   if (args.length () == 2)
     {
-      retval = do_strcmp_fun (args (0), args (1), 0,
+      retval = do_strcmp_fun (args(0), args(1), 0,
                               "strcmpi", strcmpi_array_op, strcmpi_str_op);
     }
   else
@@ -799,7 +801,8 @@
 strncmpi_array_op (const charNDArray& s1, const charNDArray& s2,
                    octave_idx_type n)
 {
-  octave_idx_type l1 = s1.numel (), l2 = s2.numel ();
+  octave_idx_type l1 = s1.numel ();
+  octave_idx_type l2 = s2.numel ();
   return (n > 0 && n <= l1 && n <= l2
           && std::equal (s1.data (), s1.data () + n, s2.data (),
                          icmp_char_eq ()));
@@ -810,7 +813,8 @@
 strncmpi_str_op (const std::string& s1, const std::string& s2,
                  octave_idx_type n)
 {
-  octave_idx_type l1 = s1.length (), l2 = s2.length ();
+  octave_idx_type l1 = s1.length ();
+  octave_idx_type l2 = s2.length ();
   return (n > 0 && n <= l1 && n <= l2
           && std::equal (s1.data (), s1.data () + n, s2.data (),
                          icmp_char_eq ()));
@@ -912,7 +916,7 @@
 
   if (error_state)
     {
-      error ("list_in_columns: expecting cellstr or char array");
+      error ("list_in_columns: ARG must be a cellstr or char array");
       return retval;
     }
 
@@ -934,18 +938,10 @@
   if (nargin > 2)
     {
       if (args(2).is_string ())
-        {
-          prefix = args(2).string_value ();
-
-          if (error_state)
-            {
-              error ("list_in_columns: PREFIX must be a character string");
-              return retval;
-            }
-        }
+        prefix = args(2).string_value ();
       else
         {
-          error ("list_in_columns: PREFIX must be a character string");
+          error ("list_in_columns: PREFIX must be a string");
           return retval;
         }
     }
--- a/libinterp/corefcn/sub2ind.cc
+++ b/libinterp/corefcn/sub2ind.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 VZLU Prague
+Copyright (C) 2009-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -24,6 +24,8 @@
 #include <config.h>
 #endif
 
+#include "Array-util.h"
+#include "oct-locbuf.h"
 #include "quit.h"
 
 #include "defun.h"
--- a/libinterp/corefcn/svd.cc
+++ b/libinterp/corefcn/svd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
rename from libinterp/corefcn/syl.cc
rename to libinterp/corefcn/sylvester.cc
--- a/libinterp/corefcn/syl.cc
+++ b/libinterp/corefcn/sylvester.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,28 +32,30 @@
 #include "oct-obj.h"
 #include "utils.h"
 
-DEFUN (syl, args, nargout,
+DEFUN (sylvester, args, nargout,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{x} =} syl (@var{A}, @var{B}, @var{C})\n\
+@deftypefn {Built-in Function} {@var{X} =} syl (@var{A}, @var{B}, @var{C})\n\
 Solve the Sylvester equation\n\
 @tex\n\
 $$\n\
- A X + X B + C = 0\n\
+ A X + X B = C\n\
 $$\n\
 @end tex\n\
 @ifnottex\n\
 \n\
 @example\n\
-A X + X B + C = 0\n\
+A X + X B = C\n\
 @end example\n\
 \n\
 @end ifnottex\n\
-using standard @sc{lapack} subroutines.  For example:\n\
+using standard @sc{lapack} subroutines.\n\
+\n\
+For example:\n\
 \n\
 @example\n\
 @group\n\
-syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])\n\
-   @result{} [ -0.50000, -0.66667; -0.66667, -0.50000 ]\n\
+sylvester ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])\n\
+   @result{} [ 0.50000, 0.66667; 0.66667, 0.50000 ]\n\
 @end group\n\
 @end example\n\
 @end deftypefn")
@@ -81,11 +83,12 @@
   octave_idx_type c_nr = arg_c.rows ();
   octave_idx_type c_nc = arg_c.columns ();
 
-  int arg_a_is_empty = empty_arg ("syl", a_nr, a_nc);
-  int arg_b_is_empty = empty_arg ("syl", b_nr, b_nc);
-  int arg_c_is_empty = empty_arg ("syl", c_nr, c_nc);
+  int arg_a_is_empty = empty_arg ("sylvester", a_nr, a_nc);
+  int arg_b_is_empty = empty_arg ("sylvester", b_nr, b_nc);
+  int arg_c_is_empty = empty_arg ("sylvester", c_nr, c_nc);
 
-  bool isfloat = arg_a.is_single_type () || arg_b.is_single_type ()
+  bool isfloat = arg_a.is_single_type ()
+                 || arg_b.is_single_type ()
                  || arg_c.is_single_type ();
 
   if (arg_a_is_empty > 0 && arg_b_is_empty > 0 && arg_c_is_empty > 0)
@@ -98,9 +101,14 @@
 
   // Arguments are not empty, so check for correct dimensions.
 
-  if (a_nr != a_nc || b_nr != b_nc)
+  if (a_nr != a_nc)
     {
-      gripe_square_matrix_required ("syl: first two parameters:");
+      gripe_square_matrix_required ("sylvester: input A");
+      return retval;
+    }
+  else if (b_nr != b_nc)
+    {
+      gripe_square_matrix_required ("sylvester: input B");
       return retval;
     }
   else if (a_nr != c_nr || b_nr != c_nc)
@@ -109,7 +117,6 @@
       return retval;
     }
 
-  // Dimensions look o.k., let's solve the problem.
   if (isfloat)
     {
       if (arg_a.is_complex_type ()
@@ -209,10 +216,15 @@
 }
 
 /*
-%!assert (syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12]), [-1/2, -2/3; -2/3, -1/2], sqrt (eps))
-%!assert (syl (single ([1, 2; 3, 4]), single ([5, 6; 7, 8]), single ([9, 10; 11, 12])), single ([-1/2, -2/3; -2/3, -1/2]), sqrt (eps ("single")))
+%!assert (sylvester ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12]), [1/2, 2/3; 2/3, 1/2], sqrt (eps))
+%!assert (sylvester (single ([1, 2; 3, 4]), single ([5, 6; 7, 8]), single ([9, 10; 11, 12])), single ([1/2, 2/3; 2/3, 1/2]), sqrt (eps ("single")))
 
-%!error syl ()
-%!error syl (1, 2, 3, 4)
-%!error <must be a square matrix> syl ([1, 2; 3, 4], [1, 2, 3; 4, 5, 6], [4, 3])
+%% Test input validation
+%!error sylvester ()
+%!error sylvester (1)
+%!error sylvester (1,2)
+%!error sylvester (1, 2, 3, 4)
+%!error <input A: .* must be a square matrix> sylvester (ones (2,3), ones (2,2), ones (2,2))
+%!error <input B: .* must be a square matrix> sylvester (ones (2,2), ones (2,3), ones (2,2))
+%!error <nonconformant matrices> sylvester (ones (2,2), ones (2,2), ones (3,3))
 */
--- a/libinterp/corefcn/symtab.cc
+++ b/libinterp/corefcn/symtab.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -38,6 +38,7 @@
 #include "dirfns.h"
 #include "input.h"
 #include "load-path.h"
+#include "ov-classdef.h"
 #include "ov-fcn.h"
 #include "ov-usr-fcn.h"
 #include "pager.h"
@@ -149,6 +150,24 @@
   return retval;
 }
 
+static void
+split_name_with_package (const std::string& name, std::string& fname,
+                         std::string& pname)
+{
+  size_t pos = name.rfind ('.');
+
+  fname.clear ();
+  pname.clear ();
+
+  if (pos != std::string::npos)
+    {
+      fname = name.substr (pos + 1);
+      pname = name.substr (0, pos);
+    }
+  else
+    fname = name;
+}
+
 // Check the load path to see if file that defined this is still
 // visible.  If the file is no longer visible, then erase the
 // definition and move on.  If the file is visible, then we also
@@ -165,11 +184,13 @@
 static inline bool
 load_out_of_date_fcn (const std::string& ff, const std::string& dir_name,
                       octave_value& function,
-                      const std::string& dispatch_type = std::string ())
+                      const std::string& dispatch_type = std::string (),
+                      const std::string& package_name = std::string ())
 {
   bool retval = false;
 
-  octave_function *fcn = load_fcn_from_file (ff, dir_name, dispatch_type);
+  octave_function *fcn = load_fcn_from_file (ff, dir_name, dispatch_type,
+                                             package_name);
 
   if (fcn)
     {
@@ -206,11 +227,13 @@
 
               bool relative = check_relative && fcn->is_relative ();
 
-              if (tc < Vlast_prompt_time
+              if (tc <= Vlast_prompt_time
                   || (relative && tc < Vlast_chdir_time))
                 {
                   bool clear_breakpoints = false;
                   std::string nm = fcn->name ();
+                  std::string pack = fcn->package_name ();
+                  std::string canonical_nm = fcn->canonical_name ();
 
                   bool is_same_file = false;
 
@@ -221,10 +244,12 @@
                     {
                       int nm_len = nm.length ();
 
-                      if (octave_env::absolute_pathname (nm) &&
-                          ((nm_len > 4 && (nm.substr (nm_len-4) == ".oct"
-                                           || nm.substr (nm_len-4) == ".mex"))
-                            || (nm_len > 2 && nm.substr (nm_len-2) == ".m")))
+                      if (octave_env::absolute_pathname (nm)
+                          && ((nm_len > 4
+                               && (nm.substr (nm_len-4) == ".oct"
+                                   || nm.substr (nm_len-4) == ".mex"))
+                              || (nm_len > 2
+                                  && nm.substr (nm_len-2) == ".m")))
                         file = nm;
                       else
                         {
@@ -235,10 +260,13 @@
                           if (! dispatch_type.empty ())
                             {
                               file = load_path::find_method (dispatch_type, nm,
-                                                             dir_name);
+                                                             dir_name, pack);
 
                               if (file.empty ())
                                 {
+                                  std::string s_name;
+                                  std::string s_pack;
+
                                   const std::list<std::string>& plist
                                     = symbol_table::parent_classes (dispatch_type);
                                   std::list<std::string>::const_iterator it
@@ -246,10 +274,17 @@
 
                                   while (it != plist.end ())
                                     {
+                                      split_name_with_package (*it, s_name,
+                                                               s_pack);
+
                                       file = load_path::find_method (*it, nm,
-                                                                     dir_name);
+                                                                     dir_name,
+                                                                     s_pack);
                                       if (! file.empty ())
-                                        break;
+                                        {
+                                          pack = s_pack;
+                                          break;
+                                        }
 
                                       it++;
                                     }
@@ -261,7 +296,7 @@
                             file = lookup_autoload (nm);
 
                           if (file.empty ())
-                            file = load_path::find_fcn (nm, dir_name);
+                            file = load_path::find_fcn (nm, dir_name, pack);
                         }
 
                       if (! file.empty ())
@@ -303,7 +338,8 @@
                                 {
                                   retval = load_out_of_date_fcn (ff, dir_name,
                                                                  function,
-                                                                 dispatch_type);
+                                                                 dispatch_type,
+                                                                 pack);
 
                                   clear_breakpoints = true;
                                 }
@@ -322,7 +358,7 @@
                       // place of the old.
 
                       retval = load_out_of_date_fcn (file, dir_name, function,
-                                                     dispatch_type);
+                                                     dispatch_type, pack);
 
                       clear_breakpoints = true;
                     }
@@ -330,7 +366,8 @@
                   // If the function has been replaced then clear any
                   // breakpoints associated with it
                   if (clear_breakpoints)
-                    bp_table::remove_all_breakpoints_in_file (nm, true);
+                    bp_table::remove_all_breakpoints_in_file (canonical_nm,
+                                                              true);
                 }
             }
         }
@@ -383,11 +420,13 @@
 
   std::string dir_name;
 
-  std::string file_name = load_path::find_method (name, name, dir_name);
+  std::string file_name = load_path::find_method (name, name, dir_name,
+                                                  package_name);
 
   if (! file_name.empty ())
     {
-      octave_function *fcn = load_fcn_from_file (file_name, dir_name, name);
+      octave_function *fcn = load_fcn_from_file (file_name, dir_name, name,
+                                                 package_name);
 
       if (fcn)
         {
@@ -396,6 +435,31 @@
           class_constructors[name] = retval;
         }
     }
+  else
+    {
+      // Classdef constructors can be defined anywhere in the path, not
+      // necessarily in @-folders. Look for a normal function and load it.
+      // If the loaded function is a classdef constructor, store it as such
+      // and restore function_on_path to its previous value.
+
+      octave_value old_function_on_path = function_on_path;
+
+      octave_value maybe_cdef_ctor = find_user_function ();
+
+      if (maybe_cdef_ctor.is_defined ())
+        {
+          octave_function *fcn = maybe_cdef_ctor.function_value (true);
+
+          if (fcn && fcn->is_classdef_constructor ())
+            {
+              retval = maybe_cdef_ctor;
+
+              class_constructors[name] = retval;
+
+              function_on_path = old_function_on_path;
+            }
+        }
+    }
 
   return retval;
 }
@@ -406,47 +470,57 @@
 {
   octave_value retval;
 
-  if (name == dispatch_type)
+  if (full_name () == dispatch_type)
     retval = load_class_constructor ();
   else
     {
-      std::string dir_name;
+      octave_function *cm = cdef_manager::find_method_symbol (name,
+                                                              dispatch_type);
 
-      std::string file_name = load_path::find_method (dispatch_type, name,
-                                                      dir_name);
+      if (cm)
+        retval = octave_value (cm);
 
-      if (! file_name.empty ())
+      if (! retval.is_defined ())
         {
-          octave_function *fcn = load_fcn_from_file (file_name, dir_name,
-                                                     dispatch_type);
+          std::string dir_name;
 
-          if (fcn)
+          std::string file_name = load_path::find_method (dispatch_type, name,
+                                                          dir_name);
+
+          if (! file_name.empty ())
             {
-              retval = octave_value (fcn);
+              octave_function *fcn = load_fcn_from_file (file_name, dir_name,
+                                                         dispatch_type);
 
-              class_methods[dispatch_type] = retval;
-            }
-        }
+              if (fcn)
+                {
+                  retval = octave_value (fcn);
 
-      if (retval.is_undefined ())
-        {
-          // Search parent classes
+                  class_methods[dispatch_type] = retval;
+                }
+            }
 
-          const std::list<std::string>& plist = parent_classes (dispatch_type);
-
-          std::list<std::string>::const_iterator it = plist.begin ();
-
-          while (it != plist.end ())
+          if (retval.is_undefined ())
             {
-              retval = find_method (*it);
+              // Search parent classes
 
-              if (retval.is_defined ())
+              const std::list<std::string>& plist =
+                parent_classes (dispatch_type);
+
+              std::list<std::string>::const_iterator it = plist.begin ();
+
+              while (it != plist.end ())
                 {
-                  class_methods[dispatch_type] = retval;
-                  break;
+                  retval = find_method (*it);
+
+                  if (retval.is_defined ())
+                    {
+                      class_methods[dispatch_type] = retval;
+                      break;
+                    }
+
+                  it++;
                 }
-
-              it++;
             }
         }
     }
@@ -787,6 +861,13 @@
   if (fcn.is_defined ())
     return fcn;
 
+  // Package
+
+  fcn = find_package ();
+
+  if (fcn.is_defined ())
+    return fcn;
+
   // Built-in function (might be undefined).
 
   return built_in_function;
@@ -975,7 +1056,7 @@
 
           std::string dir_name = file_name.substr (0, pos);
 
-          octave_function *fcn = load_fcn_from_file (file_name, dir_name,
+          octave_function *fcn = load_fcn_from_file (file_name, dir_name, "",
                                                      "", name, true);
 
           if (fcn)
@@ -998,11 +1079,13 @@
     {
       std::string dir_name;
 
-      std::string file_name = load_path::find_fcn (name, dir_name);
+      std::string file_name = load_path::find_fcn (name, dir_name,
+                                                   package_name);
 
       if (! file_name.empty ())
         {
-          octave_function *fcn = load_fcn_from_file (file_name, dir_name);
+          octave_function *fcn = load_fcn_from_file (file_name, dir_name, "",
+                                                     package_name);
 
           if (fcn)
             function_on_path = octave_value (fcn);
@@ -1012,6 +1095,25 @@
   return function_on_path;
 }
 
+octave_value
+symbol_table::fcn_info::fcn_info_rep::find_package (void)
+{
+  // FIXME: implement correct way to check out of date package
+  //if (package.is_defined ())
+  //  out_of_date_check (package);
+
+  if (! (error_state || package.is_defined ()))
+    {
+      octave_function * fcn =
+        cdef_manager::find_package_symbol (full_name ());
+
+      if (fcn)
+        package = octave_value (fcn);
+    }
+
+  return package;
+}
+
 // Insert INF_CLASS in the set of class names that are considered
 // inferior to SUP_CLASS.  Return FALSE if INF_CLASS is currently
 // marked as superior to  SUP_CLASS.
@@ -1069,10 +1171,11 @@
 symbol_table::fcn_info::fcn_info_rep::dump (std::ostream& os,
                                             const std::string& prefix) const
 {
-  os << prefix << name
+  os << prefix << full_name ()
      << " ["
      << (cmdline_function.is_defined () ? "c" : "")
      << (built_in_function.is_defined () ? "b" : "")
+     << (package.is_defined () ? "p" : "")
      << "]\n";
 
   std::string tprefix = prefix + "  ";
@@ -1177,9 +1280,10 @@
       std::string dispatch_type =
         name.substr (1, name.find_first_of (file_ops::dir_sep_str ()) - 1);
 
-      std::string method =
-        name.substr (name.find_last_of (file_ops::dir_sep_str ()) + 1,
-                     std::string::npos);
+      std::string method;
+      size_t pos = name.find_last_of (file_ops::dir_sep_str ());
+      if (pos != std::string::npos)
+        method = name.substr (pos + 1);
 
       retval = find_method (method, dispatch_type);
     }
@@ -1404,7 +1508,13 @@
 
           if (val.is_defined ())
             {
-              dim_vector dv = val.dims ();
+              // FIXME: fix size for objects, see kluge in variables.cc
+              //dim_vector dv = val.dims ();
+              octave_value tmp = val;
+              Matrix sz = tmp.size ();
+              dim_vector dv = dim_vector::alloc (sz.numel ());
+              for (octave_idx_type i = 0; i < dv.length (); i++)
+                dv(i) = sz(i);
 
               char storage = ' ';
               if (sr.is_global ())
@@ -1575,10 +1685,9 @@
 
   if (nargin == 1)
     {
-      std::string sval = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
+          std::string sval = args(0).string_value ();
           if (sval == "all")
             Vignore_function_time_stamp = 2;
           else if (sval == "system")
@@ -1586,7 +1695,7 @@
           else if (sval == "none")
             Vignore_function_time_stamp = 0;
           else
-            error ("ignore_function_time_stamp: expecting argument to be \"all\", \"system\", or \"none\"");
+            error ("ignore_function_time_stamp: argument must be \"all\", \"system\", or \"none\"");
         }
       else
         error ("ignore_function_time_stamp: expecting argument to be character string");
--- a/libinterp/corefcn/symtab.h
+++ b/libinterp/corefcn/symtab.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -756,10 +756,19 @@
     public:
 
       fcn_info_rep (const std::string& nm)
-        : name (nm), subfunctions (), private_functions (),
+        : name (nm), package_name (), subfunctions (), private_functions (),
           class_constructors (), class_methods (), dispatch_map (),
           cmdline_function (), autoload_function (), function_on_path (),
-          built_in_function (), count (1) { }
+          built_in_function (), count (1)
+      {
+        size_t pos = name.rfind ('.');
+
+        if (pos != std::string::npos)
+          {
+            package_name = name.substr (0, pos);
+            name = name.substr (pos+1);
+          }
+      }
 
       octave_value load_private_function (const std::string& dir_name);
 
@@ -775,6 +784,8 @@
 
       octave_value find_autoload (void);
 
+      octave_value find_package (void);
+
       octave_value find_user_function (void);
 
       bool is_user_function_defined (void) const
@@ -883,6 +894,11 @@
           clear_user_function ();
       }
 
+      void clear_package (void)
+      {
+        package = octave_value ();
+      }
+
       void clear (bool force = false)
       {
         clear_map (subfunctions, force);
@@ -892,6 +908,7 @@
 
         clear_autoload_function (force);
         clear_user_function (force);
+        clear_package ();
       }
 
       void add_dispatch (const std::string& type, const std::string& fname)
@@ -915,8 +932,18 @@
 
       void dump (std::ostream& os, const std::string& prefix) const;
 
+      std::string full_name (void) const
+      {
+        if (package_name.empty ())
+          return name;
+        else
+          return package_name + "." + name;
+      }
+
       std::string name;
 
+      std::string package_name;
+
       // Scope id to function object.
       std::map<scope_id, octave_value> subfunctions;
 
@@ -938,6 +965,8 @@
 
       octave_value function_on_path;
 
+      octave_value package;
+
       octave_value built_in_function;
 
       octave_refcount<size_t> count;
@@ -1027,7 +1056,7 @@
     }
 
     octave_value find_function (const octave_value_list& args
-                                  = octave_value_list (),
+                                = octave_value_list (),
                                 bool local_funcs = true)
     {
       return rep->find_function (args, local_funcs);
--- a/libinterp/corefcn/syscalls.cc
+++ b/libinterp/corefcn/syscalls.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -117,6 +117,7 @@
 If successful, @var{fid} is greater than zero and contains the new file\n\
 ID@.  Otherwise, @var{fid} is negative and @var{msg} contains a\n\
 system-dependent error message.\n\
+@seealso{fopen, fclose, fcntl}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -189,10 +190,10 @@
 
   if (nargin == 1 || nargin == 2)
     {
-      std::string exec_file = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string exec_file = args(0).string_value ();
 
-      if (! error_state)
-        {
           string_vector exec_args;
 
           if (nargin == 2)
@@ -211,7 +212,7 @@
                     exec_args[i+1] = tmp[i];
                 }
               else
-                error ("exec: arguments must be character strings");
+                error ("exec: all arguments must be strings");
             }
           else
             {
@@ -299,10 +300,10 @@
 
   if (nargin >= 1 && nargin <= 3)
     {
-      std::string exec_file = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string exec_file = args(0).string_value ();
 
-      if (! error_state)
-        {
           string_vector arg_list;
 
           if (nargin >= 2)
@@ -321,7 +322,7 @@
                     arg_list[i+1] = tmp[i];
                 }
               else
-                error ("popen2: arguments must be character strings");
+                error ("popen2: all arguments must be strings");
             }
           else
             {
@@ -366,7 +367,7 @@
                 }
             }
           else
-            error ("popen2: arguments must be character strings");
+            error ("popen2: all arguments must be strings");
         }
       else
         error ("popen2: COMMAND argument must be a string");
@@ -448,8 +449,9 @@
 DEFUNX ("fcntl", Ffcntl, args, ,
         "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} fcntl (@var{fid}, @var{request}, @var{arg})\n\
-Change the properties of the open file @var{fid}.  The following values\n\
-may be passed as @var{request}:\n\
+Change the properties of the open file @var{fid}.\n\
+\n\
+The following values may be passed as @var{request}:\n\
 \n\
 @vtable @code\n\
 @item F_DUPFD\n\
@@ -500,6 +502,7 @@
 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\
 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\
 system-dependent error message.\n\
+@seealso{fopen, dup2}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -511,7 +514,7 @@
 
   if (nargin == 3)
     {
-      octave_stream strm = octave_stream_list::lookup (args (0), "fcntl");
+      octave_stream strm = octave_stream_list::lookup (args(0), "fcntl");
 
       if (! error_state)
         {
@@ -1622,10 +1625,9 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
+          std::string name = args(0).string_value ();
           std::string msg;
 
           std::string result = octave_canonicalize_file_name (name, msg);
@@ -1635,7 +1637,7 @@
           retval(0) = result;
         }
       else
-        error ("canonicalize_file_name: NAME must be a character string");
+        error ("canonicalize_file_name: NAME must be a string");
     }
   else
     print_usage ();
@@ -1878,7 +1880,7 @@
 
 DEFUNX ("O_TRUNC", FO_TRUNC, args, ,
         "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} O_TRUNC ()\n\
+@deftypefn {Built-in Function} {} O_TRUNC ()\n\
 Return the numerical value of the file status flag that may be\n\
 returned by @code{fcntl} to indicate that if file exists, it should\n\
 be truncated when writing.\n\
@@ -1959,3 +1961,4 @@
 {
   return const_value (args, WCONTINUE);
 }
+
--- a/libinterp/corefcn/sysdep.cc
+++ b/libinterp/corefcn/sysdep.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -106,6 +106,7 @@
 
 #define WIN32_LEAN_AND_MEAN
 #include <tlhelp32.h>
+#include <windows.h>
 
 static void
 w32_set_octave_home (void)
@@ -169,13 +170,64 @@
 {
   w32_set_quiet_shutdown ();
 }
+
+static void
+w32_init (void)
+{
+  w32_set_octave_home ();
+
+  command_editor::prefer_env_winsize (true);
+}
+
+static bool
+w32_shell_execute (const std::string& file)
+{
+}
 #endif
 
+DEFUN (__open_with_system_app__, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __open_with_system_app__ (@var{file})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      std::string file = args(0).string_value ();
+
+      if (! error_state)
+        {
+#if defined (__WIN32__) && ! defined (_POSIX_VERSION)
+          HINSTANCE status = ShellExecute (0, 0, file.c_str (), 0, 0,
+                                           SW_SHOWNORMAL);
+
+          // ShellExecute returns a value greater than 32 if successful.
+          retval = (reinterpret_cast<ptrdiff_t> (status) > 32);
+#else
+          octave_value_list tmp
+            = Fsystem (ovl ("xdg-open " + file + " 2> /dev/null",
+                            false, "async"),
+                       1);
+
+          retval = (tmp(0).double_value () == 0);
+#endif
+        }
+      else
+        error ("__open_with_system_app__: argument must be a file name");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
 #if defined (__MINGW32__)
 static void
 MINGW_init (void)
 {
-  w32_set_octave_home ();
+  w32_init ();
 }
 #endif
 
@@ -183,7 +235,7 @@
 static void
 MSVC_init (void)
 {
-  w32_set_octave_home ();
+  w32_init ();
 }
 #endif
 
@@ -291,7 +343,7 @@
   int tty_fd = STDIN_FILENO;
   if (! gnulib::isatty (tty_fd))
     {
-      if (interactive)
+      if (interactive && ! forced_interactive)
         error ("stdin is not a tty!");
       return;
     }
@@ -555,6 +607,7 @@
 \n\
 @noindent\n\
 returns a string containing the value of your path.\n\
+@seealso{setenv, unsetenv}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -574,11 +627,20 @@
   return retval;
 }
 
-DEFUN (putenv, args, ,
+/*
+%!assert (ischar (getenv ("OCTAVE_HOME")))
+*/
+
+DEFUN (setenv, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} putenv (@var{var}, @var{value})\n\
-@deftypefnx {Built-in Function} {} setenv (@var{var}, @var{value})\n\
+@deftypefn  {Built-in Function} {} setenv (@var{var}, @var{value})\n\
+@deftypefnx {Built-in Function} {} setenv (@var{var})\n\
+@deftypefnx {Built-in Function} {} putenv (@dots{})\n\
 Set the value of the environment variable @var{var} to @var{value}.\n\
+\n\
+If no @var{value} is specified then the variable will be assigned the null\n\
+string.\n\
+@seealso{unsetenv, getenv}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -587,20 +649,20 @@
 
   if (nargin == 2 || nargin == 1)
     {
-      std::string var = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string var = args(0).string_value ();
 
-      if (! error_state)
-        {
           std::string val = (nargin == 2
                              ? args(1).string_value () : std::string ());
 
           if (! error_state)
             octave_env::putenv (var, val);
           else
-            error ("putenv: VALUE must be a string");
+            error ("setenv: VALUE must be a string");
         }
       else
-        error ("putenv: VAR must be a string");
+        error ("setenv: VAR must be a string");
     }
   else
     print_usage ();
@@ -608,13 +670,48 @@
   return retval;
 }
 
-DEFALIAS (setenv, putenv);
+DEFALIAS (putenv, setenv);
 
 /*
-%!assert (ischar (getenv ("OCTAVE_HOME")))
 %!test
 %! setenv ("dummy_variable_that_cannot_matter", "foobar");
 %! assert (getenv ("dummy_variable_that_cannot_matter"), "foobar");
+%! unsetenv ("dummy_variable_that_cannot_matter");
+%! assert (getenv ("dummy_variable_that_cannot_matter"), "");
+*/
+
+DEFUN (unsetenv, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{status} =} unsetenv (@var{var})\n\
+Delete the environment variable @var{var}.\n\
+\n\
+Return 0 if the variable was deleted, or did not exist, and -1 if an error\n\
+occurred.\n\
+@seealso{setenv, getenv}\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  if (nargin == 1)
+    {
+      std::string tmp = args(0).string_value ();
+
+      if (! error_state)
+        {
+          int status = gnulib::unsetenv (tmp.c_str ());
+          retval = status;
+        }
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+## Test for unsetenv is in setenv test
 */
 
 // FIXME: perhaps kbhit should also be able to print a prompt?
@@ -648,7 +745,7 @@
 
   // FIXME: add timeout and default value args?
 
-  if (interactive || forced_interactive)
+  if (interactive)
     {
       Fdrawnow ();
 
@@ -906,24 +1003,44 @@
 
 /*
 %!test
-%! if (isempty (getenv ("HOME")))
-%!   setenv ("HOME", "foobar");
-%! endif
-%! home = getenv ("HOME");
-%! assert (tilde_expand ("~/foobar"), strcat (home, "/foobar"));
+%! home = get_home_directory ();
+%! assert (tilde_expand ("~/foobar"), [home "/foobar"]);
 %! assert (tilde_expand ("/foo/bar"), "/foo/bar");
 %! assert (tilde_expand ("foo/bar"), "foo/bar");
 */
 
+DEFUN (get_home_directory, , ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{homedir} =} get_home_directory ()\n\
+Return the current home directory.\n\
+\n\
+On most systems, this is equivalent to @code{getenv (\"HOME\")}.  On Windows\n\
+systems, if the environment variable @env{HOME} is not set then it is\n\
+equivalent to\n\
+@code{fullfile (getenv (\"HOMEDRIVE\"), getenv (\"HOMEPATH\"))}\n\
+@seealso{getenv}\n\
+@end deftypefn")
+{
+  return octave_value (octave_env::get_home_directory ());
+}
+
+/*
+%!test
+%! if (! ispc ())
+%!   assert (get_home_directory (), getenv ("HOME")); 
+%! endif
+*/
+
 // This function really belongs in display.cc, but including defun.h in
 // that file results in conflicts with symbols from headers that are
 // needed for X11 and Carbon functions.
 
 DEFUN (have_window_system, , ,
-  "-*- texinfo -*-\n\
+       "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} have_window_system ()\n\
 Return true if a window system is available (X11, Windows, or Apple OS X)\n\
 and false otherwise.\n\
+@seealso{isguirunning}\n\
 @end deftypefn")
 {
   return octave_value (display_info::display_available ());
--- a/libinterp/corefcn/sysdep.h
+++ b/libinterp/corefcn/sysdep.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/time.cc
+++ b/libinterp/corefcn/time.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -123,6 +123,8 @@
 
 /*
 %!assert (time () > 0)
+
+%!error time (1)
 */
 
 DEFUN (gmtime, args, ,
@@ -299,7 +301,9 @@
 %!assert (datestr (datenum (1795, 1, 1), 0), "01-Jan-1795 00:00:00")
 
 %!error mktime ()
+%!error mktime (1)
 %!error mktime (1, 2, 3)
+%!error mktime (struct ("year", "foo"))
 */
 
 DEFUN (strftime, args, ,
@@ -459,10 +463,10 @@
 
   if (args.length () == 2)
     {
-      std::string fmt = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string fmt = args(0).string_value ();
 
-      if (! error_state)
-        {
           octave_scalar_map map = args(1).scalar_map_value ();
 
           if (! error_state)
@@ -494,6 +498,8 @@
 %!assert (ischar (strftime ("%m%U%w%W%x%y%Y", localtime (time ()))));
 
 %!error strftime ()
+%!error strftime ("foo", 1)
+%!error strftime ("foo", struct ("year", "foo"))
 %!error strftime ("foo", localtime (time ()), 1)
 */
 
@@ -513,14 +519,14 @@
 
   if (args.length () == 2)
     {
-      std::string str = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
-          std::string fmt = args(1).string_value ();
+          std::string str = args(0).string_value ();
 
-          if (! error_state)
+          if (args(1).is_string ())
             {
+              std::string fmt = args(1).string_value ();
+
               octave_strptime t (str, fmt);
 
               retval(1) = t.characters_converted ();
@@ -537,3 +543,23 @@
 
   return retval;
 }
+
+/*
+%!test
+%! fmt = "%Y-%m-%d %H:%M:%S";
+%! s = strftime (fmt, localtime (time ()));
+%! ts = strptime  (s, fmt);
+%! assert (isstruct (ts));
+%! assert (isfield (ts, "usec"));
+%! assert (isfield (ts, "year"));
+%! assert (isfield (ts, "mon"));
+%! assert (isfield (ts, "mday"));
+%! assert (isfield (ts, "sec"));
+%! assert (isfield (ts, "min"));
+%! assert (isfield (ts, "wday"));
+%! assert (isfield (ts, "hour"));
+%! assert (isfield (ts, "isdst"));
+%! assert (isfield (ts, "yday"));
+
+%!error strptime ()
+*/
--- a/libinterp/corefcn/toplev.cc
+++ b/libinterp/corefcn/toplev.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -104,6 +104,32 @@
 
 octave_call_stack *octave_call_stack::instance = 0;
 
+std::string
+octave_call_stack::stack_frame::fcn_file_name (void) const
+{
+  return m_fcn ? m_fcn->fcn_file_name () : std::string ();
+}
+
+std::string
+octave_call_stack::stack_frame::fcn_name (bool print_subfn) const
+{
+  std::string retval;
+
+  if (m_fcn)
+    {
+      std::string parent_fcn_name = m_fcn->parent_fcn_name ();
+
+      if (print_subfn && ! parent_fcn_name.empty ())
+        retval = parent_fcn_name + Vfilemarker;
+
+      retval += m_fcn->name ();
+    }
+  else
+    retval = "<unknown>";
+
+  return retval;
+}
+
 void
 octave_call_stack::create_instance (void)
 {
@@ -124,8 +150,8 @@
 
   if (! cs.empty ())
     {
-      const call_stack_elt& elt = cs[curr_frame];
-      retval = elt.line;
+      const stack_frame& elt = cs[curr_frame];
+      retval = elt.m_line;
     }
 
   return retval;
@@ -138,8 +164,8 @@
 
   if (! cs.empty ())
     {
-      const call_stack_elt& elt = cs[curr_frame];
-      retval = elt.column;
+      const stack_frame& elt = cs[curr_frame];
+      retval = elt.m_column;
     }
 
   return retval;
@@ -154,15 +180,15 @@
 
   while (p != cs.begin ())
     {
-      const call_stack_elt& elt = *(--p);
+      const stack_frame& elt = *(--p);
 
-      octave_function *f = elt.fcn;
+      octave_function *f = elt.m_fcn;
 
       if (f && f->is_user_code ())
         {
-          if (elt.line > 0)
+          if (elt.m_line > 0)
             {
-              retval = elt.line;
+              retval = elt.m_line;
               break;
             }
         }
@@ -180,15 +206,15 @@
 
   while (p != cs.begin ())
     {
-      const call_stack_elt& elt = *(--p);
+      const stack_frame& elt = *(--p);
 
-      octave_function *f = elt.fcn;
+      octave_function *f = elt.m_fcn;
 
       if (f && f->is_user_code ())
         {
-          if (elt.column)
+          if (elt.m_column)
             {
-              retval = elt.column;
+              retval = elt.m_column;
               break;
             }
         }
@@ -206,7 +232,7 @@
   curr_user_frame = 0;
 
   // Look for the caller of dbstack.
-  size_t frame = cs[curr_frame].prev;
+  size_t xframe = cs[curr_frame].m_prev;
 
   bool found = false;
 
@@ -214,9 +240,9 @@
 
   for (const_reverse_iterator p = cs.rbegin (); p != cs.rend (); p++)
     {
-      octave_function *f = (*p).fcn;
+      octave_function *f = (*p).m_fcn;
 
-      if (--k == frame)
+      if (--k == xframe)
         found = true;
 
       if (f && f->is_user_code ())
@@ -244,9 +270,9 @@
 
   while (p != cs.begin ())
     {
-      const call_stack_elt& elt = *(--p);
+      const stack_frame& elt = *(--p);
 
-      octave_function *f = elt.fcn;
+      octave_function *f = elt.m_fcn;
 
       if (f && f->is_user_code ())
         {
@@ -263,6 +289,29 @@
   return retval;
 }
 
+bool
+octave_call_stack::do_all_scripts (void) const
+{
+  bool retval = true;
+
+  const_iterator p = cs.end ();
+
+  while (p != cs.begin ())
+    {
+      const stack_frame& elt = *(--p);
+
+      octave_function *f = elt.m_fcn;
+
+      if (f && ! f->is_user_script ())
+        {
+          retval = false;
+          break;
+        }
+    }
+
+  return retval;
+}
+
 // Use static fields for the best efficiency.
 // NOTE: C++0x will allow these two to be merged into one.
 static const char *bt_fieldnames[] = { "file", "name", "line",
@@ -276,10 +325,12 @@
   return octave_map (dim_vector (0, 1), bt_fields);
 }
 
-octave_map
-octave_call_stack::do_backtrace (size_t nskip,
-                                 octave_idx_type& curr_user_frame) const
+std::list<octave_call_stack::stack_frame>
+octave_call_stack::do_backtrace_frames (size_t nskip,
+                                        octave_idx_type& curr_user_frame) const
 {
+  std::list<octave_call_stack::stack_frame> retval;
+
   size_t user_code_frames = do_num_user_code_frames (curr_user_frame);
 
   size_t nframes = nskip <= user_code_frames ? user_code_frames - nskip : 0;
@@ -287,6 +338,37 @@
   // Our list is reversed.
   curr_user_frame = nframes - curr_user_frame - 1;
 
+  if (nframes > 0)
+    {
+      for (const_reverse_iterator p = cs.rbegin (); p != cs.rend (); p++)
+        {
+          const stack_frame& elt = *p;
+
+          octave_function *f = elt.m_fcn;
+
+          if (f && f->is_user_code ())
+            {
+              if (nskip > 0)
+                nskip--;
+              else
+                retval.push_back (elt);
+            }
+        }
+    }
+
+  return retval;
+}
+
+octave_map
+octave_call_stack::do_backtrace (size_t nskip,
+                                 octave_idx_type& curr_user_frame,
+                                 bool print_subfn) const
+{
+  std::list<octave_call_stack::stack_frame> frames
+    = do_backtrace_frames (nskip, curr_user_frame);
+
+  size_t nframes = frames.size ();
+
   octave_map retval (dim_vector (nframes, 1), bt_fields);
 
   Cell& file = retval.contents (0);
@@ -296,39 +378,21 @@
   Cell& scope = retval.contents (4);
   Cell& context = retval.contents (5);
 
-  if (nframes > 0)
-    {
-      int k = 0;
+  octave_idx_type k = 0;
 
-      for (const_reverse_iterator p = cs.rbegin (); p != cs.rend (); p++)
-        {
-          const call_stack_elt& elt = *p;
-
-          octave_function *f = elt.fcn;
+  for (std::list<octave_call_stack::stack_frame>::const_iterator p = frames.begin ();
+       p != frames.end (); p++)
+    {
+      const stack_frame& elt = *p;
 
-          if (f && f->is_user_code ())
-            {
-              if (nskip > 0)
-                nskip--;
-              else
-                {
-                  scope(k) = elt.scope;
-                  context(k) = elt.context;
+      scope(k) = elt.m_scope;
+      context(k) = elt.m_context;
+      file(k) = elt.fcn_file_name ();
+      name(k) = elt.fcn_name (print_subfn);
+      line(k) = elt.m_line;
+      column(k) = elt.m_column;
 
-                  file(k) = f->fcn_file_name ();
-                  std::string parent_fcn_name = f->parent_fcn_name ();
-                  if (parent_fcn_name == std::string ())
-                    name(k) = f->name ();
-                  else
-                    name(k) = f->parent_fcn_name () + Vfilemarker + f->name ();
-
-                  line(k) = elt.line;
-                  column(k) = elt.column;
-
-                  k++;
-                }
-            }
-        }
+      k++;
     }
 
   return retval;
@@ -345,21 +409,16 @@
 
       curr_frame = n;
 
-      const call_stack_elt& elt = cs[n];
+      const stack_frame& elt = cs[n];
 
-      symbol_table::set_scope_and_context (elt.scope, elt.context);
+      symbol_table::set_scope_and_context (elt.m_scope, elt.m_context);
 
       if (verbose)
-        {
-          octave_function *f = elt.fcn;
-          std::string nm = f ? f->name () : std::string ("<unknown>");
-
-          octave_stdout << "stopped in " << nm
-                        << " at line " << elt.line
-                        << " column " << elt.column
-                        << " (" << elt.scope << "[" << elt.context << "])"
-                        << std::endl;
-        }
+        octave_stdout << "stopped in " << elt.fcn_name ()
+                      << " at line " << elt.m_line
+                      << " column " << elt.m_column
+                      << " (" << elt.m_scope << "[" << elt.m_context << "])"
+                      << std::endl;
     }
 
   return retval;
@@ -378,20 +437,20 @@
     incr = 1;
 
   // Start looking with the caller of dbup/dbdown/keyboard.
-  size_t frame = cs[curr_frame].prev;
+  size_t xframe = cs[curr_frame].m_prev;
 
   while (true)
     {
-      if ((incr < 0 && frame == 0) || (incr > 0 && frame == cs.size () - 1))
+      if ((incr < 0 && xframe == 0) || (incr > 0 && xframe == cs.size () - 1))
         break;
 
-      frame += incr;
+      xframe += incr;
 
-      const call_stack_elt& elt = cs[frame];
+      const stack_frame& elt = cs[xframe];
 
-      octave_function *f = elt.fcn;
+      octave_function *f = elt.m_fcn;
 
-      if (frame == 0 || (f && f->is_user_code ()))
+      if (xframe == 0 || (f && f->is_user_code ()))
         {
           if (nskip > 0)
             nskip--;
@@ -400,10 +459,10 @@
 
           if (nskip == 0)
             {
-              curr_frame = frame;
-              cs[cs.size () - 1].prev = curr_frame;
+              curr_frame = xframe;
+              cs[cs.size () - 1].m_prev = curr_frame;
 
-              symbol_table::set_scope_and_context (elt.scope, elt.context);
+              symbol_table::set_scope_and_context (elt.m_scope, elt.m_context);
 
               if (verbose)
                 {
@@ -411,7 +470,7 @@
 
                   if (f)
                     buf << "stopped in " << f->name ()
-                        << " at line " << elt.line << std::endl;
+                        << " at line " << elt.m_line << std::endl;
                   else
                     buf << "at top level" << std::endl;
 
@@ -422,6 +481,8 @@
               break;
             }
         }
+      else if (incr == 0)  // Break out of infinite loop by choosing an incr.
+        incr = -1;
 
       // There is no need to set scope and context here.  That will
       // happen when the dbup/dbdown/keyboard frame is popped and we
@@ -434,19 +495,19 @@
 void
 octave_call_stack::do_goto_caller_frame (void)
 {
-  size_t frame = curr_frame;
+  size_t xframe = curr_frame;
 
   bool skipped = false;
 
-  while (frame != 0)
+  while (xframe != 0)
     {
-      frame = cs[frame].prev;
+      xframe = cs[xframe].m_prev;
 
-      const call_stack_elt& elt = cs[frame];
+      const stack_frame& elt = cs[xframe];
 
-      octave_function *f = elt.fcn;
+      octave_function *f = elt.m_fcn;
 
-      if (frame == 0 || (f && f->is_user_code ()))
+      if (elt.m_scope == cs[0].m_scope || (f && f->is_user_code ()))
         {
           if (! skipped)
             // We found the current user code frame, so skip it.
@@ -454,14 +515,14 @@
           else
             {
               // We found the caller user code frame.
-              call_stack_elt tmp (elt);
-              tmp.prev = curr_frame;
+              stack_frame tmp (elt);
+              tmp.m_prev = curr_frame;
 
               curr_frame = cs.size ();
 
               cs.push_back (tmp);
 
-              symbol_table::set_scope_and_context (tmp.scope, tmp.context);
+              symbol_table::set_scope_and_context (tmp.m_scope, tmp.m_context);
 
               break;
             }
@@ -472,45 +533,14 @@
 void
 octave_call_stack::do_goto_base_frame (void)
 {
-  call_stack_elt tmp (cs[0]);
-  tmp.prev = curr_frame;
+  stack_frame tmp (cs[0]);
+  tmp.m_prev = curr_frame;
 
   curr_frame = cs.size ();
 
   cs.push_back (tmp);
 
-  symbol_table::set_scope_and_context (tmp.scope, tmp.context);
-}
-
-void
-octave_call_stack::do_backtrace_error_message (void) const
-{
-  if (error_state > 0)
-    {
-      error_state = -1;
-
-      error ("called from:");
-    }
-
-  if (! cs.empty ())
-    {
-      const call_stack_elt& elt = cs.back ();
-
-      octave_function *fcn = elt.fcn;
-
-      std::string fcn_name = "?unknown?";
-
-      if (fcn)
-        {
-          fcn_name = fcn->fcn_file_name ();
-
-          if (fcn_name.empty ())
-            fcn_name = fcn->name ();
-        }
-
-      error ("  %s at line %d, column %d",
-             fcn_name.c_str (), elt.line, elt.column);
-    }
+  symbol_table::set_scope_and_context (tmp.m_scope, tmp.m_context);
 }
 
 void
@@ -542,7 +572,7 @@
 
   // The big loop.
 
-  octave_lexer *lxr = ((interactive || forced_interactive)
+  octave_lexer *lxr = (interactive
                        ? new octave_lexer ()
                        : new octave_lexer (stdin));
 
@@ -570,7 +600,7 @@
 
                   octave_quit ();
 
-                  if (! (interactive || forced_interactive))
+                  if (! interactive)
                     {
                       bool quit = (tree_return_command::returning
                                    || tree_break_command::breaking);
@@ -587,9 +617,9 @@
 
                   if (error_state)
                     {
-                      if (! (interactive || forced_interactive))
+                      if (! interactive)
                         {
-                          // We should exit with a non-zero status.
+                          // We should exit with a nonzero status.
                           retval = 1;
                           break;
                         }
@@ -628,6 +658,8 @@
     }
   while (retval == 0);
 
+  octave_stdout << "\n";
+
   if (retval == EOF)
     retval = 0;
 
@@ -698,7 +730,7 @@
 
       OCTAVE_SAFE_CALL (flush_octave_stdout, ());
 
-      if (! quitting_gracefully && (interactive || forced_interactive))
+      if (! quitting_gracefully && interactive)
         {
           octave_stdout << "\n";
 
@@ -725,11 +757,11 @@
 }
 
 void
-clean_up_and_exit (int retval, bool safe_to_return)
+clean_up_and_exit (int status, bool safe_to_return)
 {
   do_octave_atexit ();
 
-  if (octave_link::exit (retval))
+  if (octave_link::exit (status))
     {
       if (safe_to_return)
         return;
@@ -750,21 +782,36 @@
   else
     {
       if (octave_exit)
-        (*octave_exit) (retval);
+        (*octave_exit) (status);
     }
 }
 
 DEFUN (quit, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} exit (@var{status})\n\
+@deftypefn  {Built-in Function} {} exit\n\
+@deftypefnx {Built-in Function} {} exit (@var{status})\n\
+@deftypefnx {Built-in Function} {} quit\n\
 @deftypefnx {Built-in Function} {} quit (@var{status})\n\
-Exit the current Octave session.  If the optional integer value\n\
-@var{status} is supplied, pass that value to the operating system as the\n\
-Octave's exit status.  The default value is zero.\n\
+Exit the current Octave session.\n\
+\n\
+If the optional integer value @var{status} is supplied, pass that value to\n\
+the operating system as Octave's exit status.  The default value is zero.\n\
+\n\
+When exiting, Octave will attempt to run the m-file @file{finish.m} if it\n\
+exists.  User commands to save the workspace or clean up temporary files\n\
+may be placed in that file.  Alternatively, another m-file may be scheduled\n\
+to run using @code{atexit}.\n\
+@seealso{atexit}\n\
 @end deftypefn")
 {
   octave_value_list retval;
 
+  // Confirm OK to shutdown.  Note: A dynamic function installation similar
+  // to overriding polymorphism for which the GUI can install its own "quit"
+  // yet call this base "quit" could be nice.  No link would be needed here.
+  if (! octave_link::confirm_shutdown ())
+    return retval;
+
   if (! quit_allowed)
     error ("quit: not supported in embedded mode");
   else
@@ -969,10 +1016,10 @@
 
       if (nargin == 3)
         {
-          std::string type_str = args(2).string_value ();
+          if (args(2).is_string ())
+            {
+              std::string type_str = args(2).string_value ();
 
-          if (! error_state)
-            {
               if (type_str == "sync")
                 type = et_sync;
               else if (type_str == "async")
@@ -985,7 +1032,7 @@
             }
           else
             {
-              error ("system: TYPE must be a character string");
+              error ("system: TYPE must be a string");
               return retval;
             }
         }
@@ -1125,7 +1172,9 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} atexit (@var{fcn})\n\
 @deftypefnx {Built-in Function} {} atexit (@var{fcn}, @var{flag})\n\
-Register a function to be called when Octave exits.  For example,\n\
+Register a function to be called when Octave exits.\n\
+\n\
+For example,\n\
 \n\
 @example\n\
 @group\n\
@@ -1157,6 +1206,7 @@
 from the list, so if a function was placed in the list multiple\n\
 times with @code{atexit}, it must also be removed from the list\n\
 multiple times.\n\
+@seealso{quit}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -1165,10 +1215,10 @@
 
   if (nargin == 1 || nargin == 2)
     {
-      std::string arg = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string arg = args(0).string_value ();
 
-      if (! error_state)
-        {
           bool add_mode = true;
 
           if (nargin == 2)
@@ -1205,12 +1255,13 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} octave_config_info ()\n\
 @deftypefnx {Built-in Function} {} octave_config_info (@var{option})\n\
-Return a structure containing configuration and installation\n\
-information for Octave.\n\
+Return a structure containing configuration and installation information for\n\
+Octave.\n\
 \n\
 If @var{option} is a string, return the configuration information for the\n\
 specified option.\n\
 \n\
+@seealso{computer}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -1251,8 +1302,6 @@
     { false, "CAMD_LIBS", OCTAVE_CONF_CAMD_LIBS },
     { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS },
     { false, "CC", OCTAVE_CONF_CC },
-    // FIXME: CC_VERSION is deprecated.  Remove in version 3.12
-    { false, "CC_VERSION", OCTAVE_CONF_CC_VERSION },
     { false, "CCOLAMD_CPPFLAGS", OCTAVE_CONF_CCOLAMD_CPPFLAGS },
     { false, "CCOLAMD_LDFLAGS", OCTAVE_CONF_CCOLAMD_LDFLAGS },
     { false, "CCOLAMD_LIBS", OCTAVE_CONF_CCOLAMD_LIBS },
@@ -1275,8 +1324,6 @@
     { false, "CXXCPP", OCTAVE_CONF_CXXCPP },
     { false, "CXXFLAGS", OCTAVE_CONF_CXXFLAGS },
     { false, "CXXPICFLAG", OCTAVE_CONF_CXXPICFLAG },
-    // FIXME: CXX_VERSION is deprecated.  Remove in version 3.12
-    { false, "CXX_VERSION", OCTAVE_CONF_CXX_VERSION },
     { false, "DEFAULT_PAGER", OCTAVE_DEFAULT_PAGER },
     { false, "DEFS", OCTAVE_CONF_DEFS },
     { false, "DL_LD", OCTAVE_CONF_DL_LD },
@@ -1289,7 +1336,6 @@
     { false, "F77", OCTAVE_CONF_F77 },
     { false, "F77_FLOAT_STORE_FLAG", OCTAVE_CONF_F77_FLOAT_STORE_FLAG },
     { false, "F77_INTEGER_8_FLAG", OCTAVE_CONF_F77_INTEGER_8_FLAG },
-    { false, "FC", OCTAVE_CONF_FC },
     { false, "FFLAGS", OCTAVE_CONF_FFLAGS },
     { false, "FFTW3_CPPFLAGS", OCTAVE_CONF_FFTW3_CPPFLAGS },
     { false, "FFTW3_LDFLAGS", OCTAVE_CONF_FFTW3_LDFLAGS },
@@ -1298,16 +1344,18 @@
     { false, "FFTW3F_LDFLAGS", OCTAVE_CONF_FFTW3F_LDFLAGS },
     { false, "FFTW3F_LIBS", OCTAVE_CONF_FFTW3F_LIBS },
     { false, "FLIBS", OCTAVE_CONF_FLIBS },
-    { false, "FONTCONFIG_CFLAGS", OCTAVE_CONF_FONTCONFIG_CFLAGS },
+    { false, "FLTK_CPPFLAGS", OCTAVE_CONF_FLTK_CPPFLAGS },
+    { false, "FLTK_LDFLAGS", OCTAVE_CONF_FLTK_LDFLAGS },
+    { false, "FLTK_LIBS", OCTAVE_CONF_FLTK_LIBS },
+    { false, "FONTCONFIG_CPPFLAGS", OCTAVE_CONF_FONTCONFIG_CPPFLAGS },
+    { false, "FONTCONFIG_LIBS", OCTAVE_CONF_FONTCONFIG_LIBS },
     { false, "FPICFLAG", OCTAVE_CONF_FPICFLAG },
-    { false, "FT2_CFLAGS", OCTAVE_CONF_FT2_CFLAGS },
+    { false, "FT2_CPPFLAGS", OCTAVE_CONF_FT2_CPPFLAGS },
     { false, "FT2_LIBS", OCTAVE_CONF_FT2_LIBS },
     { false, "GLPK_CPPFLAGS", OCTAVE_CONF_GLPK_CPPFLAGS },
     { false, "GLPK_LDFLAGS", OCTAVE_CONF_GLPK_LDFLAGS },
     { false, "GLPK_LIBS", OCTAVE_CONF_GLPK_LIBS },
     { false, "GNUPLOT", OCTAVE_CONF_GNUPLOT },
-    { false, "GRAPHICS_CFLAGS", OCTAVE_CONF_GRAPHICS_CFLAGS },
-    { false, "GRAPHICS_LIBS", OCTAVE_CONF_GRAPHICS_LIBS },
     { false, "HDF5_CPPFLAGS", OCTAVE_CONF_HDF5_CPPFLAGS },
     { false, "HDF5_LDFLAGS", OCTAVE_CONF_HDF5_LDFLAGS },
     { false, "HDF5_LIBS", OCTAVE_CONF_HDF5_LIBS },
@@ -1336,6 +1384,9 @@
     { false, "OCT_LINK_DEPS", OCTAVE_CONF_OCT_LINK_DEPS },
     { false, "OCT_LINK_OPTS", OCTAVE_CONF_OCT_LINK_OPTS },
     { false, "OPENGL_LIBS", OCTAVE_CONF_OPENGL_LIBS },
+    { false, "OSMESA_CPPFLAGS", OCTAVE_CONF_OSMESA_CPPFLAGS },
+    { false, "OSMESA_LDFLAGS", OCTAVE_CONF_OSMESA_LDFLAGS },
+    { false, "OSMESA_LIBS", OCTAVE_CONF_OSMESA_LIBS },
     { false, "PCRE_CPPFLAGS", OCTAVE_CONF_PCRE_CPPFLAGS },
     { false, "PCRE_LIBS", OCTAVE_CONF_PCRE_LIBS },
     { false, "PTHREAD_CFLAGS", OCTAVE_CONF_PTHREAD_CFLAGS },
@@ -1404,6 +1455,7 @@
     { true, "man1dir", OCTAVE_MAN1DIR },
     { false, "man1ext", OCTAVE_MAN1EXT },
     { true, "mandir", OCTAVE_MANDIR },
+    { true, "octdatadir", OCTAVE_OCTDATADIR },
     { true, "octfiledir", OCTAVE_OCTFILEDIR },
     { true, "octetcdir", OCTAVE_OCTETCDIR },
     { true, "octincludedir", OCTAVE_OCTINCLUDEDIR },
--- a/libinterp/corefcn/toplev.h
+++ b/libinterp/corefcn/toplev.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -76,41 +76,52 @@
 OCTINTERP_API
 octave_call_stack
 {
-private:
-
-  struct call_stack_elt
-  {
-    call_stack_elt (octave_function *f, symbol_table::scope_id s,
-                    symbol_table::context_id c, size_t p = 0)
-      : fcn (f), line (-1), column (-1), scope (s), context (c), prev (p)
-    { }
-
-    call_stack_elt (const call_stack_elt& elt)
-      : fcn (elt.fcn), line (elt.line), column (elt.column),
-        scope (elt.scope), context (elt.context), prev (elt.prev)
-    { }
-
-    octave_function *fcn;
-    int line;
-    int column;
-    symbol_table::scope_id scope;
-    symbol_table::context_id context;
-    size_t prev;
-  };
-
 protected:
 
   octave_call_stack (void) : cs (), curr_frame (0) { }
 
 public:
 
-  typedef std::deque<call_stack_elt>::iterator iterator;
-  typedef std::deque<call_stack_elt>::const_iterator const_iterator;
+  class stack_frame
+  {
+  public:
+
+    friend class octave_call_stack;
+
+    stack_frame (octave_function *fcn = 0, symbol_table::scope_id scope = 0,
+                 symbol_table::context_id context = 0, size_t prev = 0)
+      : m_fcn (fcn), m_line (-1), m_column (-1), m_scope (scope),
+        m_context (context), m_prev (prev)
+    { }
+
+    stack_frame (const stack_frame& elt)
+      : m_fcn (elt.m_fcn), m_line (elt.m_line), m_column (elt.m_column),
+        m_scope (elt.m_scope), m_context (elt.m_context), m_prev (elt.m_prev)
+    { }
+
+    int line (void) const { return m_line; }
 
-  typedef std::deque<call_stack_elt>::reverse_iterator
-    reverse_iterator;
-  typedef std::deque<call_stack_elt>::const_reverse_iterator
-    const_reverse_iterator;
+    int column (void) const { return m_column; }
+
+    std::string fcn_file_name (void) const;
+
+    std::string fcn_name (bool print_subfn = true) const;
+
+  private:
+
+    octave_function *m_fcn;
+    int m_line;
+    int m_column;
+    symbol_table::scope_id m_scope;
+    symbol_table::context_id m_context;
+    size_t m_prev;
+  };
+
+  typedef std::deque<stack_frame>::iterator iterator;
+  typedef std::deque<stack_frame>::const_iterator const_iterator;
+
+  typedef std::deque<stack_frame>::reverse_iterator reverse_iterator;
+  typedef std::deque<stack_frame>::const_reverse_iterator const_reverse_iterator;
 
   static void create_instance (void);
 
@@ -193,6 +204,12 @@
     return instance_ok () ? instance->do_current_context () : 0;
   }
 
+  /*
+  static stack_frame frame (size_t idx)
+  {
+    return instance_ok () ? instance->do_frame (idx) : stack_frame ();
+  }
+  */
   // Function at location N on the call stack (N == 0 is current), may
   // be built-in.
   static octave_function *element (size_t n)
@@ -206,6 +223,12 @@
     return instance_ok () ? instance->do_caller_user_code (nskip) : 0;
   }
 
+  // Return TRUE if all elements on the call stack are scripts.
+  static bool all_scripts (void)
+  {
+    return instance_ok () ? instance->do_all_scripts () : false;
+  }
+
   static void
   push (octave_function *f,
         symbol_table::scope_id scope = symbol_table::current_scope (),
@@ -269,10 +292,39 @@
       instance->do_goto_base_frame ();
   }
 
-  static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame)
+  static octave_map backtrace (size_t nskip = 0)
+  {
+    octave_idx_type curr_user_frame = -1;
+
+    return instance_ok ()
+           ? instance->do_backtrace (nskip, curr_user_frame, true)
+           : octave_map ();
+  }
+
+  static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame,
+                               bool print_subfn = true)
   {
     return instance_ok ()
-           ? instance->do_backtrace (nskip, curr_user_frame) : octave_map ();
+           ? instance->do_backtrace (nskip, curr_user_frame, print_subfn)
+           : octave_map ();
+  }
+
+  static std::list<octave_call_stack::stack_frame>
+  backtrace_frames (size_t nskip = 0)
+  {
+    octave_idx_type curr_user_frame = -1;
+
+    return instance_ok ()
+           ? instance->do_backtrace_frames (nskip, curr_user_frame)
+           : std::list<octave_call_stack::stack_frame> ();
+  }
+
+  static std::list<octave_call_stack::stack_frame>
+  backtrace_frames (size_t nskip, octave_idx_type& curr_user_frame)
+  {
+    return instance_ok ()
+           ? instance->do_backtrace_frames (nskip, curr_user_frame)
+           : std::list<octave_call_stack::stack_frame> ();
   }
 
   static octave_map empty_backtrace (void);
@@ -289,16 +341,10 @@
       instance->do_clear ();
   }
 
-  static void backtrace_error_message (void)
-  {
-    if (instance_ok ())
-      instance->do_backtrace_error_message ();
-  }
-
 private:
 
   // The current call stack.
-  std::deque<call_stack_elt> cs;
+  std::deque<stack_frame> cs;
 
   size_t curr_frame;
 
@@ -316,7 +362,7 @@
 
   octave_function *do_caller (void) const
   {
-    return curr_frame > 1 ? cs[curr_frame-1].fcn : cs[0].fcn;
+    return curr_frame > 1 ? cs[curr_frame-1].m_fcn : cs[0].m_fcn;
   }
 
   size_t do_current_frame (void) { return curr_frame; }
@@ -328,23 +374,30 @@
   symbol_table::scope_id do_current_scope (void) const
   {
     return curr_frame > 0 && curr_frame < cs.size ()
-           ? cs[curr_frame].scope : 0;
+           ? cs[curr_frame].m_scope : 0;
   }
 
   symbol_table::context_id do_current_context (void) const
   {
     return curr_frame > 0 && curr_frame < cs.size ()
-           ? cs[curr_frame].context : 0;
+           ? cs[curr_frame].m_context : 0;
   }
 
+  /*  const stack_frame& do_frame (size_t idx)
+  {
+    static stack_frame foobar;
+
+    return idx < cs.size () ? cs[idx] : foobar;
+  }
+  */
   octave_function *do_element (size_t n)
   {
     octave_function *retval = 0;
 
     if (cs.size () > n)
       {
-        call_stack_elt& elt = cs[n];
-        retval = elt.fcn;
+        stack_frame& elt = cs[n];
+        retval = elt.m_fcn;
       }
 
     return retval;
@@ -352,12 +405,14 @@
 
   octave_user_code *do_caller_user_code (size_t nskip) const;
 
-  void do_push (octave_function *f, symbol_table::scope_id scope,
+  bool do_all_scripts (void) const;
+
+  void do_push (octave_function *fcn, symbol_table::scope_id scope,
                 symbol_table::context_id context)
   {
     size_t prev_frame = curr_frame;
     curr_frame = cs.size ();
-    cs.push_back (call_stack_elt (f, scope, context, prev_frame));
+    cs.push_back (stack_frame (fcn, scope, context, prev_frame));
     symbol_table::set_scope_and_context (scope, context);
   }
 
@@ -367,8 +422,8 @@
 
     if (! cs.empty ())
       {
-        const call_stack_elt& elt = cs[curr_frame];
-        retval = elt.fcn;
+        const stack_frame& elt = cs[curr_frame];
+        retval = elt.m_fcn;
       }
 
     return retval;
@@ -378,10 +433,10 @@
   {
     if (! cs.empty ())
       {
-        call_stack_elt& elt = cs.back ();
+        stack_frame& elt = cs.back ();
 
-        elt.line = l;
-        elt.column = c;
+        elt.m_line = l;
+        elt.m_column = c;
       }
   }
 
@@ -389,9 +444,9 @@
   {
     if (! cs.empty ())
       {
-        call_stack_elt& elt = cs.back ();
+        stack_frame& elt = cs.back ();
 
-        elt.line = l;
+        elt.m_line = l;
       }
   }
 
@@ -399,14 +454,18 @@
   {
     if (! cs.empty ())
       {
-        call_stack_elt& elt = cs.back ();
+        stack_frame& elt = cs.back ();
 
-        elt.column = c;
+        elt.m_column = c;
       }
   }
 
+  std::list<octave_call_stack::stack_frame>
+  do_backtrace_frames (size_t nskip, octave_idx_type& curr_user_frame) const;
+
   octave_map do_backtrace (size_t nskip,
-                           octave_idx_type& curr_user_frame) const;
+                           octave_idx_type& curr_user_frame,
+                           bool print_subfn) const;
 
   bool do_goto_frame (size_t n, bool verbose);
 
@@ -420,17 +479,15 @@
   {
     if (cs.size () > 1)
       {
-        const call_stack_elt& elt = cs.back ();
-        curr_frame = elt.prev;
+        const stack_frame& elt = cs.back ();
+        curr_frame = elt.m_prev;
         cs.pop_back ();
-        const call_stack_elt& new_elt = cs[curr_frame];
-        symbol_table::set_scope_and_context (new_elt.scope, new_elt.context);
+        const stack_frame& new_elt = cs[curr_frame];
+        symbol_table::set_scope_and_context (new_elt.m_scope, new_elt.m_context);
       }
   }
 
   void do_clear (void) { cs.clear (); }
-
-  void do_backtrace_error_message (void) const;
 };
 
 // Call a function with exceptions handled to avoid problems with
--- a/libinterp/corefcn/tril.cc
+++ b/libinterp/corefcn/tril.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -42,7 +42,8 @@
 static Array<T>
 do_tril (const Array<T>& a, octave_idx_type k, bool pack)
 {
-  octave_idx_type nr = a.rows (), nc = a.columns ();
+  octave_idx_type nr = a.rows ();
+  octave_idx_type nc = a.columns ();
   const T *avec = a.fortran_vec ();
   octave_idx_type zero = 0;
 
@@ -83,7 +84,8 @@
 static Array<T>
 do_triu (const Array<T>& a, octave_idx_type k, bool pack)
 {
-  octave_idx_type nr = a.rows (), nc = a.columns ();
+  octave_idx_type nr = a.rows ();
+  octave_idx_type nc = a.columns ();
   const T *avec = a.fortran_vec ();
   octave_idx_type zero = 0;
 
@@ -211,7 +213,7 @@
     print_usage ();
   else
     {
-      octave_value arg = args (0);
+      octave_value arg = args(0);
 
       dim_vector dims = arg.dims ();
       if (dims.length () != 2)
@@ -274,7 +276,8 @@
                 if (arg.numel () == 0)
                   return arg;
 
-                octave_idx_type nr = dims(0), nc = dims (1);
+                octave_idx_type nr = dims(0);
+                octave_idx_type nc = dims(1);
 
                 // The sole purpose of the below is to force the correct
                 // matrix size. This would not be necessary if the
@@ -364,7 +367,7 @@
 diagonal; above for positive @var{k} and below for negative @var{k}.\n\
 \n\
 The absolute value of @var{k} must not be greater than the number of\n\
-sub-diagonals or super-diagonals.\n\
+subdiagonals or superdiagonals.\n\
 \n\
 For example:\n\
 \n\
rename from libinterp/dldfcn/tsearch.cc
rename to libinterp/corefcn/tsearch.cc
--- a/libinterp/dldfcn/tsearch.cc
+++ b/libinterp/corefcn/tsearch.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 Andreas Stahel
+Copyright (C) 2002-2015 Andreas Stahel
 
 This file is part of Octave.
 
@@ -26,17 +26,12 @@
 #include <config.h>
 #endif
 
-#include <iostream>
-#include <fstream>
-#include <string>
-
 #include "lo-ieee.h"
 #include "lo-math.h"
 
-#include "defun-dld.h"
+#include "defun.h"
 #include "error.h"
 #include "oct-obj.h"
-#include "parse.h"
 
 inline double max (double a, double b, double c)
 {
@@ -64,9 +59,9 @@
 // e.g., build up a neighbouring triangle structure and use a simplex-like
 // method to traverse it
 
-DEFUN_DLD (tsearch, args, ,
-           "-*- texinfo -*-\n\
-@deftypefn {Loadable Function} {@var{idx} =} tsearch (@var{x}, @var{y}, @var{t}, @var{xi}, @var{yi})\n\
+DEFUN (tsearch, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{idx} =} tsearch (@var{x}, @var{y}, @var{t}, @var{xi}, @var{yi})\n\
 Search for the enclosing Delaunay convex hull.  For @code{@var{t} =\n\
 delaunay (@var{x}, @var{y})}, finds the index in @var{t} containing the\n\
 points @code{(@var{xi}, @var{yi})}.  For points outside the convex hull,\n\
@@ -110,8 +105,10 @@
   const octave_idx_type np = xi.length ();
   ColumnVector values (np);
 
-  double x0 = 0.0, y0 = 0.0;
-  double a11 = 0.0, a12 = 0.0, a21 = 0.0, a22 = 0.0, det = 0.0;
+  double x0, y0, a11, a12, a21, a22, det;
+  x0 = y0 = 0.0;
+  a11 = a12 = a21 = a22 = 0.0;
+  det = 0.0;
 
   octave_idx_type k = nelem; // k is a counter of elements
   for (octave_idx_type kp = 0; kp < np; kp++)
--- a/libinterp/corefcn/txt-eng-ft.cc
+++ b/libinterp/corefcn/txt-eng-ft.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Michael Goffioul
+Copyright (C) 2009-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -121,7 +121,7 @@
   typedef std::pair<std::string, double> ft_key;
   typedef std::map<ft_key, FT_Face> ft_cache;
 
-  // Cache the fonts loaded by freetype. This cache only contains
+  // Cache the fonts loaded by FreeType. This cache only contains
   // weak references to the fonts, strong references are only present
   // in class ft_render.
   ft_cache cache;
@@ -138,7 +138,7 @@
     : library (), freetype_initialized (false), fontconfig_initialized (false)
   {
     if (FT_Init_FreeType (&library))
-      ::error ("unable to initialize freetype library");
+      ::error ("unable to initialize FreeType library");
     else
       freetype_initialized = true;
 
@@ -635,7 +635,8 @@
       FT_UInt glyph_index, previous = 0;
 
       std::string str = e.string_value ();
-      size_t n = str.length (), curr = 0;
+      size_t n = str.length ();
+      size_t curr = 0;
       mbstate_t ps;
       memset (&ps, 0, sizeof (ps));  // Initialize state to 0.
       wchar_t wc;
--- a/libinterp/corefcn/txt-eng-ft.h
+++ b/libinterp/corefcn/txt-eng-ft.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Michael Goffioul
+Copyright (C) 2009-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -114,7 +114,7 @@
   ft_render& operator = (const ft_render&);
 
   // Class to hold information about fonts and a strong
-  // reference to the font objects loaded by freetype.
+  // reference to the font objects loaded by FreeType.
   class ft_font
   {
   public:
--- a/libinterp/corefcn/txt-eng.cc
+++ b/libinterp/corefcn/txt-eng.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 Michael Goffioul
+Copyright (C) 2013-2015 Michael Goffioul
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/txt-eng.h
+++ b/libinterp/corefcn/txt-eng.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Michael Goffioul
+Copyright (C) 2009-2015 Michael Goffioul
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/typecast.cc
+++ b/libinterp/corefcn/typecast.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -90,10 +90,12 @@
 
 DEFUN (typecast, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} typecast (@var{x}, @var{class})\n\
+@deftypefn {Built-in Function} {@var{y} =} typecast (@var{x}, \"@var{class}\")\n\
 Return a new array @var{y} resulting from interpreting the data of\n\
-@var{x} in memory as data of the numeric class @var{class}.  Both the class\n\
-of @var{x} and @var{class} must be one of the built-in numeric classes:\n\
+@var{x} in memory as data of the numeric class @var{class}.\n\
+\n\
+Both the class of @var{x} and @var{class} must be one of the built-in\n\
+numeric classes:\n\
 \n\
 @example\n\
 @group\n\
@@ -120,7 +122,7 @@
 consecutive pairs of real numbers.  The sizes of integer types are given by\n\
 their bit counts.  Both logical and char are typically one byte wide;\n\
 however, this is not guaranteed by C++.  If your system is IEEE conformant,\n\
-single and double should be 4 bytes and 8 bytes wide, respectively.\n\
+single and double will be 4 bytes and 8 bytes wide, respectively.\n\
 @qcode{\"logical\"} is not allowed for @var{class}.  If the input is a row\n\
 vector, the return value is a row vector, otherwise it is a column vector.  \n\
 If the bit length of @var{x} is not divisible by that of @var{class}, an\n\
@@ -135,7 +137,7 @@
 @result{} [   1,   0, 255, 255]\n\
 @end group\n\
 @end example\n\
-@seealso{cast, bitunpack, bitpack, swapbytes}\n\
+@seealso{cast, bitpack, bitunpack, swapbytes}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -297,12 +299,17 @@
 DEFUN (bitpack, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {@var{y} =} bitpack (@var{x}, @var{class})\n\
-Return a new array @var{y} resulting from interpreting an array\n\
+Return a new array @var{y} resulting from interpreting the logical array\n\
 @var{x} as raw bit patterns for data of the numeric class @var{class}.\n\
+\n\
 @var{class} must be one of the built-in numeric classes:\n\
 \n\
 @example\n\
 @group\n\
+\"double\"\n\
+\"single\"\n\
+\"double complex\"\n\
+\"single complex\"\n\
 \"char\"\n\
 \"int8\"\n\
 \"int16\"\n\
@@ -312,8 +319,6 @@
 \"uint16\"\n\
 \"uint32\"\n\
 \"uint64\"\n\
-\"double\"\n\
-\"single\"\n\
 @end group\n\
 @end example\n\
 \n\
@@ -327,7 +332,11 @@
 {
   octave_value retval;
 
-  if (args.length () == 2 && args(0).is_bool_type ())
+  if (args.length () != 2)
+    print_usage ();
+  else if (! args(0).is_bool_type ())
+    error ("bitpack: X must be a logical array");
+  else
     {
       boolNDArray bitp = args(0).bool_array_value ();
 
@@ -371,8 +380,6 @@
       if (! error_state && retval.is_undefined ())
         error ("bitpack: cannot pack to %s class", numclass.c_str ());
     }
-  else
-    print_usage ();
 
   return retval;
 }
@@ -407,11 +414,15 @@
 DEFUN (bitunpack, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {@var{y} =} bitunpack (@var{x})\n\
-Return an array @var{y} corresponding to the raw bit patterns of\n\
-@var{x}.  @var{x} must belong to one of the built-in numeric classes:\n\
+Return a logical array @var{y} corresponding to the raw bit patterns of\n\
+@var{x}.\n\
+\n\
+@var{x} must belong to one of the built-in numeric classes:\n\
 \n\
 @example\n\
 @group\n\
+\"double\"\n\
+\"single\"\n\
 \"char\"\n\
 \"int8\"\n\
 \"int16\"\n\
@@ -421,8 +432,6 @@
 \"uint16\"\n\
 \"uint32\"\n\
 \"uint64\"\n\
-\"double\"\n\
-\"single\"\n\
 @end group\n\
 @end example\n\
 \n\
--- a/libinterp/corefcn/urlwrite.cc
+++ b/libinterp/corefcn/urlwrite.cc
@@ -1,7 +1,7 @@
 // urlwrite and urlread, a curl front-end for octave
 /*
 
-Copyright (C) 2006-2013 Alexander Barth
+Copyright (C) 2006-2015 Alexander Barth
 Copyright (C) 2009 David Bateman
 
 This file is part of Octave.
@@ -346,36 +346,36 @@
       return retval;
     }
 
+  if (! args(0).is_string ())
+    {
+      error ("urlwrite: URL must be a string");
+      return retval;
+    }
+
   std::string url = args(0).string_value ();
 
-  if (error_state)
+  if (! args(1).is_string ())
     {
-      error ("urlwrite: URL must be a character string");
+      error ("urlwrite: LOCALFILE must be a string");
       return retval;
     }
 
   // name to store the file if download is succesful
   std::string filename = args(1).string_value ();
 
-  if (error_state)
-    {
-      error ("urlwrite: LOCALFILE must be a character string");
-      return retval;
-    }
-
   std::string method;
   Array<std::string> param;
 
   if (nargin == 4)
     {
-      method = args(2).string_value ();
-
-      if (error_state)
+      if (! args(2).is_string ())
         {
-          error ("urlwrite: METHOD must be \"get\" or \"post\"");
+          error ("urlwrite: METHOD must be a string");
           return retval;
         }
 
+      method = args(2).string_value ();
+
       if (method != "get" && method != "post")
         {
           error ("urlwrite: METHOD must be \"get\" or \"post\"");
@@ -386,12 +386,11 @@
 
       if (error_state)
         {
-          error ("urlwrite: parameters (PARAM) for get and post requests must be given as a cell array of character strings");
+          error ("urlwrite: parameters (PARAM) for get and post requests must be given as a cell array of strings");
           return retval;
         }
 
-
-      if (param.numel () % 2 == 1 )
+      if (param.numel () % 2 == 1)
         {
           error ("urlwrite: number of elements in PARAM must be even");
           return retval;
@@ -498,33 +497,33 @@
   int nargin = args.length ();
 
   // verify arguments
-  if (nargin != 1  && nargin != 3)
+  if (nargin != 1 && nargin != 3)
     {
       print_usage ();
       return retval;
     }
 
-  std::string url = args(0).string_value ();
-
-  if (error_state)
+  if (! args(0).is_string ())
     {
-      error ("urlread: URL must be a character string");
+      error ("urlread: URL must be a string");
       return retval;
     }
 
+  std::string url = args(0).string_value ();
+
   std::string method;
   Array<std::string> param;
 
   if (nargin == 3)
     {
-      method = args(1).string_value ();
-
-      if (error_state)
+      if (! args(1).is_string ())
         {
-          error ("urlread: METHOD must be \"get\" or \"post\"");
+          error ("urlread: METHOD must be a string");
           return retval;
         }
 
+      method = args(1).string_value ();
+
       if (method != "get" && method != "post")
         {
           error ("urlread: METHOD must be \"get\" or \"post\"");
@@ -535,11 +534,11 @@
 
       if (error_state)
         {
-          error ("urlread: parameters (PARAM) for get and post requests must be given as a cell array of character strings");
+          error ("urlread: parameters (PARAM) for get and post requests must be given as a cell array of strings");
           return retval;
         }
 
-      if (param.numel () % 2 == 1 )
+      if (param.numel () % 2 == 1)
         {
           error ("urlread: number of elements in PARAM must be even");
           return retval;
--- a/libinterp/corefcn/utils.cc
+++ b/libinterp/corefcn/utils.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -38,8 +38,6 @@
 
 #include "vasnprintf.h"
 
-#include "quit.h"
-
 #include "dir-ops.h"
 #include "file-ops.h"
 #include "file-stat.h"
@@ -47,7 +45,9 @@
 #include "lo-utils.h"
 #include "oct-cmplx.h"
 #include "oct-env.h"
+#include "oct-locbuf.h"
 #include "pathsearch.h"
+#include "quit.h"
 #include "str-vec.h"
 
 #include "Cell.h"
@@ -121,6 +121,7 @@
 %!assert (isvarname ("1foo"), false)
 %!assert (isvarname (""), false)
 %!assert (isvarname (12), false)
+%!assert (isvarname ("foo+bar"), false)
 
 %!error isvarname ()
 %!error isvarname ("foo", "bar");
@@ -238,7 +239,7 @@
   return status;
 }
 
-// Return non-zero if either NR or NC is zero.  Return -1 if this
+// Return nonzero if either NR or NC is zero.  Return -1 if this
 // should be considered fatal; return 1 if this is ok.
 
 int
@@ -303,7 +304,7 @@
 If the second optional argument @qcode{\"all\"} is supplied, return\n\
 a cell array containing the list of all files that have the same\n\
 name in the path.  If no files are found, return an empty cell array.\n\
-@seealso{file_in_path, find_dir_in_path, path}\n\
+@seealso{file_in_path, dir_in_loadpath, path}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -355,6 +356,8 @@
 
 %!error file_in_loadpath ()
 %!error file_in_loadpath ("foo", "bar", 1)
+%!error file_in_loadpath ([])
+%!error file_in_loadpath ("plot.m", "bar")
 */
 
 DEFUN (file_in_path, args, ,
@@ -380,7 +383,7 @@
 If the third optional argument @qcode{\"all\"} is supplied, return\n\
 a cell array containing the list of all files that have the same\n\
 name in the path.  If no files are found, return an empty cell array.\n\
-@seealso{file_in_loadpath, find_dir_in_path, path}\n\
+@seealso{file_in_loadpath, dir_in_loadpath, path}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -389,10 +392,10 @@
 
   if (nargin == 2 || nargin == 3)
     {
-      std::string path = args(0).string_value ();
+      if (args(0).is_string ())
+        {
+          std::string path = args(0).string_value ();
 
-      if (! error_state)
-        {
           string_vector names = args(1).all_strings ();
 
           if (! error_state && names.length () > 0)
@@ -439,6 +442,9 @@
 %!error file_in_path ()
 %!error file_in_path ("foo")
 %!error file_in_path ("foo", "bar", "baz", 1)
+%!error file_in_path ([])
+%!error file_in_path (path (), [])
+%!error file_in_path (path (), "plot.m", "bar")
 */
 
 std::string
@@ -452,6 +458,44 @@
   return octave_env::make_absolute (load_path::find_file (nm));
 }
 
+std::string
+find_data_file_in_load_path  (const std::string& fcn,
+                              const std::string& file,
+                              bool require_regular_file)
+{
+  std::string fname = file;
+
+  if (! (octave_env::absolute_pathname (fname)
+         || octave_env::rooted_relative_pathname (fname)))
+    {
+      // Load path will also search "." first, but we don't want to
+      // issue a warning if the file is found in the current directory,
+      // so do an explicit check for that.
+
+      file_stat fs (fname);
+
+      bool local_file_ok
+        = fs.exists () && (fs.is_reg () || ! require_regular_file);
+
+      if (! local_file_ok)
+        {
+          // Not directly found; search load path.
+
+          std::string tmp
+            = octave_env::make_absolute (load_path::find_file (fname));
+
+          if (! tmp.empty ())
+            {
+              gripe_data_file_in_path (fcn, tmp);
+
+              fname = tmp;
+            }
+        }
+    }
+
+  return fname;
+}
+
 // See if there is an function file in the path.  If so, return the
 // full path to the file.
 
@@ -680,14 +724,24 @@
 %!assert (do_string_escapes ("foo\\nbar"), ["foo", char(10), "bar"])
 %!assert ("foo\nbar", ["foo", char(10), "bar"])
 
-%!assert (do_string_escapes ('\a\b\f\n\r\t\v'), "\a\b\f\n\r\t\v")
-%!assert (do_string_escapes ("\\a\\b\\f\\n\\r\\t\\v"), "\a\b\f\n\r\t\v")
-%!assert (do_string_escapes ("\\a\\b\\f\\n\\r\\t\\v"),
-%!        char ([7, 8, 12, 10, 13, 9, 11]))
-%!assert ("\a\b\f\n\r\t\v", char ([7, 8, 12, 10, 13, 9, 11]))
+%!assert (do_string_escapes ('\0\a\b\f\n\r\t\v'), "\0\a\b\f\n\r\t\v")
+%!assert (do_string_escapes ("\\0\\a\\b\\f\\n\\r\\t\\v"), "\0\a\b\f\n\r\t\v")
+%!assert (do_string_escapes ("\\0\\a\\b\\f\\n\\r\\t\\v"),
+%!        char ([0, 7, 8, 12, 10, 13, 9, 11]))
+%!assert ("\0\a\b\f\n\r\t\v", char ([0, 7, 8, 12, 10, 13, 9, 11]))
+
+%!assert (do_string_escapes ('\\'), "\\")
+%!assert (do_string_escapes ("\\\\"), "\\")
+%!assert (do_string_escapes ("\\\\"), char (92))
+
+%!assert (do_string_escapes ('\''single-quoted\'''), "'single-quoted'")
+%!assert (do_string_escapes ("\\'single-quoted\\'"), "'single-quoted'")
+%!assert (do_string_escapes ('\"double-quoted\"'), "\"double-quoted\"")
+%!assert (do_string_escapes ("\\\"double-quoted\\\""), "\"double-quoted\"")
 
 %!error do_string_escapes ()
 %!error do_string_escapes ("foo", "bar")
+%!error do_string_escapes (3)
 */
 
 const char *
@@ -806,8 +860,16 @@
 %!assert (undo_string_escapes (char ([7, 8, 12, 10, 13, 9, 11])),
 %!        "\\a\\b\\f\\n\\r\\t\\v")
 
+%!assert (undo_string_escapes ("\\"), '\\')
+%!assert (undo_string_escapes ("\\"), "\\\\")
+%!assert (undo_string_escapes (char (92)), "\\\\")
+
+%!assert (undo_string_escapes ("\"double-quoted\""), '\"double-quoted\"')
+%!assert (undo_string_escapes ("\"double-quoted\""), "\\\"double-quoted\\\"")
+
 %!error undo_string_escapes ()
 %!error undo_string_escapes ("foo", "bar")
+%!error undo_string_escapes (3)
 */
 
 DEFUN (is_absolute_filename, args, ,
@@ -892,10 +954,10 @@
 %!error make_absolute_filename ("foo", "bar")
 */
 
-DEFUN (find_dir_in_path, args, ,
+DEFUN (dir_in_loadpath, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {} find_dir_in_path (@var{dir})\n\
-@deftypefnx {Built-in Function} {} find_dir_in_path (@var{dir}, \"all\")\n\
+@deftypefn  {Built-in Function} {} dir_in_loadpath (@var{dir})\n\
+@deftypefnx {Built-in Function} {} dir_in_loadpath (@var{dir}, \"all\")\n\
 Return the full name of the path element matching @var{dir}.  The\n\
 match is performed at the end of each path element.  For example, if\n\
 @var{dir} is @qcode{\"foo/bar\"}, it matches the path element\n\
@@ -926,7 +988,7 @@
             retval = Cell (load_path::find_matching_dirs (dir));
         }
       else
-        error ("find_dir_in_path: DIR must be a directory name");
+        error ("dir_in_loadpath: DIR must be a directory name");
     }
   else
     print_usage ();
@@ -935,10 +997,21 @@
 }
 
 /*
-## FIXME: We need system-dependent tests here.
+%!test
+%! f = dir_in_loadpath ("plot");
+%! assert (ischar (f));
+%! assert (! isempty (f));
 
-%!error find_dir_in_path ()
-%!error find_dir_in_path ("foo", "bar", 1)
+%!test
+%! f = dir_in_loadpath ("$$probably_!!_not_&&_a_!!_dir$$");
+%! assert (f, "");
+
+%!test
+%! lst = dir_in_loadpath ("$$probably_!!_not_&&_a_!!_dir$$", "all");
+%! assert (lst, {});
+
+%!error dir_in_loadpath ()
+%!error dir_in_loadpath ("foo", "bar", 1)
 */
 
 DEFUNX ("errno", Ferrno, args, ,
@@ -962,10 +1035,7 @@
         {
           std::string nm = args(0).string_value ();
 
-          if (! error_state)
-            retval = octave_errno::lookup (nm);
-          else
-            error ("errno: expecting character string argument");
+          retval = octave_errno::lookup (nm);
         }
       else
         {
@@ -974,7 +1044,7 @@
           if (! error_state)
             retval = octave_errno::set (val);
           else
-            error ("errno: expecting integer argument");
+            error ("errno: argument must be string or integer");
         }
     }
   else if (nargin == 0)
@@ -1286,11 +1356,16 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} isindex (@var{ind})\n\
 @deftypefnx {Built-in Function} {} isindex (@var{ind}, @var{n})\n\
-Return true if @var{ind} is a valid index.  Valid indices are\n\
-either positive integers (although possibly of real data type), or logical\n\
-arrays.  If present, @var{n} specifies the maximum extent of the dimension\n\
-to be indexed.  When possible the internal result is cached so that\n\
-subsequent indexing using @var{ind} will not perform the check again.\n\
+Return true if @var{ind} is a valid index.\n\
+\n\
+Valid indices are either positive integers (although possibly of real data\n\
+type), or logical arrays.  If present, @var{n} specifies the maximum extent\n\
+of the dimension to be indexed.  When possible the internal result is cached\n\
+so that subsequent indexing using @var{ind} will not perform the check again.\n\
+\n\
+Implementation Note: Strings are first converted to double values before the\n\
+checks for valid indices are made.  Unless a string contains the NULL\n\
+character @nospell{\"\\0\"}, it will always be a valid index.\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -1306,9 +1381,6 @@
     {
       unwind_protect frame;
 
-      frame.protect_var (Vallow_noninteger_range_as_index);
-      Vallow_noninteger_range_as_index = false;
-
       frame.protect_var (error_state);
 
       frame.protect_var (discard_error_messages);
@@ -1316,7 +1388,8 @@
 
       try
         {
-          idx_vector idx = args(0).index_vector ();
+          idx_vector idx = args(0).index_vector (true);
+
           if (! error_state)
             {
               if (nargin == 2)
@@ -1339,9 +1412,11 @@
 /*
 %!assert (isindex ([1, 2, 3]))
 %!assert (isindex (1:3))
+%!assert (isindex (1:3, 2), false)
 %!assert (isindex ([1, 2, -3]), false)
 
 %!error isindex ()
+%!error isindex (1:3, 2, 3)
 */
 
 octave_value_list
@@ -1443,3 +1518,25 @@
   stream.width (owidth);
   stream.fill (ofill);
 }
+
+DEFUN (isstudent, args, ,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} isstudent ()\n\
+Return true if running in the student edition of @sc{matlab}.\n\
+\n\
+@code{isstudent} always returns false in Octave.\n\
+\n\
+@seealso{false}\n\
+@end deftypefn")
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  return octave_value (false);
+}
+
+/*
+%!assert (isstudent (), false)
+
+%!error isstudent (1)
+*/
--- a/libinterp/corefcn/utils.h
+++ b/libinterp/corefcn/utils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -66,6 +66,11 @@
 extern OCTINTERP_API std::string
 file_in_path (const std::string&, const std::string&);
 
+extern OCTINTERP_API std::string
+find_data_file_in_load_path  (const std::string& fcn,
+                              const std::string& file,
+                              bool require_regular_file = false);
+
 extern OCTINTERP_API std::string contents_file_in_path (const std::string&);
 
 extern OCTINTERP_API std::string fcn_file_in_path (const std::string&);
--- a/libinterp/corefcn/variables.cc
+++ b/libinterp/corefcn/variables.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -128,10 +128,7 @@
     {
       fcn_name = arg.string_value ();
 
-      if (! error_state)
-        ans = is_valid_function (fcn_name, warn_for, warn);
-      else if (warn)
-        error ("%s: expecting function name as argument", warn_for.c_str ());
+      ans = is_valid_function (fcn_name, warn_for, warn);
     }
   else if (warn)
     error ("%s: expecting function name as argument", warn_for.c_str ());
@@ -150,14 +147,14 @@
 
   if (! retval)
     {
-      std::string s = arg.string_value ();
-
-      std::string cmd = header;
-      cmd.append (s);
-      cmd.append (trailer);
-
-      if (! error_state)
+      if (arg.is_string ())
         {
+          std::string s = arg.string_value ();
+
+          std::string cmd = header;
+          cmd.append (s);
+          cmd.append (trailer);
+
           int parse_status;
 
           eval_string (cmd, true, parse_status, 0);
@@ -283,7 +280,8 @@
 
           frame.run ();
 
-          if (tmp.is_defined () && (tmp.is_map () || tmp.is_java ()))
+          if (tmp.is_defined ()
+              && (tmp.is_map () || tmp.is_java () || tmp.is_classdef_object ()))
             names = tmp.map_keys ();
         }
     }
@@ -340,14 +338,14 @@
       return retval;
     }
 
-  std::string name = args(0).string_value ();
-
-  if (error_state)
+  if (! args(0).is_string ())
     {
       error ("isglobal: NAME must be a string");
       return retval;
     }
 
+  std::string name = args(0).string_value ();
+
   return symbol_table::is_global (name);
 }
 
@@ -388,17 +386,7 @@
 int
 symbol_exist (const std::string& name, const std::string& type)
 {
-  std::string struct_elts;
-  std::string symbol_name = name;
-
-  size_t pos = name.find ('.');
-
-  if (pos != std::string::npos && pos > 0)
-    {
-      struct_elts = name.substr (pos+1);
-      symbol_name = name.substr (0, pos);
-    }
-  else if (is_keyword (symbol_name))
+  if (is_keyword (name))
     return 0;
 
   bool search_any = type == "any";
@@ -409,21 +397,38 @@
 
   if (search_any || search_var)
     {
-      bool not_a_struct = struct_elts.empty ();
-      bool var_ok = not_a_struct; // || val.is_map_element (struct_elts)
-
       octave_value val = symbol_table::varval (name);
 
-      if (var_ok && (val.is_constant () || val.is_object ()
-                     || val.is_function_handle ()
-                     || val.is_anonymous_function ()
-                     || val.is_inline_function ()))
+      if (val.is_constant () || val.is_object ()
+          || val.is_function_handle ()
+          || val.is_anonymous_function ()
+          || val.is_inline_function ())
         return 1;
 
       if (search_var)
         return 0;
     }
 
+  // We shouldn't need to look in the global symbol table, since any name
+  // that is visible in the current scope will be in the local symbol table.
+
+  octave_value val;
+
+  if (search_any || search_builtin)
+    {
+      // FIXME: safe_symbol_lookup will attempt unsafe load of .oct/.mex file.
+      // This can cause a segfault.  To catch this would require temporarily
+      // diverting the SIGSEGV exception handler and then restoring it.
+      // See bug #36067.
+      val = safe_symbol_lookup (name);
+
+      if (val.is_defined () && val.is_builtin_function ())
+        return 5;
+
+      if (search_builtin)
+        return 0;
+    }
+
   if (search_any || search_file || search_dir)
     {
       std::string file_name = lookup_autoload (name);
@@ -455,7 +460,18 @@
       if (fs)
         {
           if (search_any || search_file)
-            return fs.is_dir () ? 7 : 2;
+            {
+              if (fs.is_dir ())
+                return 7;
+
+              len = file_name.length ();
+
+              if (len > 4 && (file_name.substr (len-4) == ".oct"
+                              || file_name.substr (len-4) == ".mex"))
+                return 3;
+              else
+                return 2;
+            }
           else if (search_dir && fs.is_dir ())
             return 7;
         }
@@ -464,27 +480,9 @@
         return 0;
     }
 
-  // We shouldn't need to look in the global symbol table, since any
-  // name that is visible in the current scope will be in the local
-  // symbol table.
-
-  octave_value val = safe_symbol_lookup (symbol_name);
-
-  if (val.is_defined () && struct_elts.empty ())
-    {
-      if ((search_any || search_builtin)
-          && val.is_builtin_function ())
-        return 5;
-
-      if ((search_any || search_file)
-          && (val.is_user_function () || val.is_dld_function ()))
-        {
-          octave_function *f = val.function_value (true);
-          std::string s = f ? f->fcn_file_name () : std::string ();
-
-          return s.empty () ? 103 : (val.is_user_function () ? 2 : 3);
-        }
-    }
+  // Command line function which Matlab does not support
+  if (search_any && val.is_defined () && val.is_user_function ())
+    return 103;
 
   return 0;
 }
@@ -515,21 +513,38 @@
 
 DEFUN (exist, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} exist (@var{name}, @var{type})\n\
-Return 1 if the name exists as a variable, 2 if the name is an\n\
-absolute file name, an ordinary file in Octave's @code{path}, or (after\n\
-appending @samp{.m}) a function file in Octave's @code{path}, 3 if the\n\
-name is a @samp{.oct} or @samp{.mex} file in Octave's @code{path},\n\
-5 if the name is a built-in function, 7 if the name is a directory, or 103\n\
-if the name is a function not associated with a file (entered on\n\
-the command line).\n\
+@deftypefn  {Built-in Function} {@var{c} =} exist (@var{name})\n\
+@deftypefnx {Built-in Function} {@var{c} =} exist (@var{name}, @var{type})\n\
+Check for the existence of @var{name} as a variable, function, file,\n\
+directory, or class.\n\
+\n\
+The return code @var{c} is one of\n\
+\n\
+@table @asis\n\
+@item 1\n\
+@var{name} is a variable.\n\
+\n\
+@item 2\n\
+@var{name} is an absolute file name, an ordinary file in Octave's\n\
+@code{path}, or (after appending @samp{.m}) a function file in Octave's\n\
+@code{path}.\n\
 \n\
-Otherwise, return 0.\n\
+@item 3\n\
+@var{name} is a @samp{.oct} or @samp{.mex} file in Octave's @code{path}.\n\
+\n\
+@item 5\n\
+@var{name} is a built-in function.\n\
 \n\
-This function also returns 2 if a regular file called @var{name}\n\
-exists in Octave's search path.  If you want information about\n\
-other types of files, you should use some combination of the functions\n\
-@code{file_in_path} and @code{stat} instead.\n\
+@item 7\n\
+@var{name} is a directory.\n\
+\n\
+@item 103\n\
+@var{name} is a function not associated with a file (entered on the command\n\
+line).\n\
+\n\
+@item 0\n\
+@var{name} does not exist.\n\
+@end table\n\
 \n\
 If the optional argument @var{type} is supplied, check only for\n\
 symbols of the specified type.  Valid types are\n\
@@ -541,14 +556,27 @@
 @item @qcode{\"builtin\"}\n\
 Check only for built-in functions.\n\
 \n\
+@item @qcode{\"dir\"}\n\
+Check only for directories.\n\
+\n\
 @item @qcode{\"file\"}\n\
 Check only for files and directories.\n\
 \n\
-@item @qcode{\"dir\"}\n\
-Check only for directories.\n\
+@item @qcode{\"class\"}\n\
+Check only for classes.  (Note: This option is accepted, but not currently\n\
+implemented)\n\
 @end table\n\
 \n\
-@seealso{file_in_loadpath, file_in_path, find_dir_in_path, stat}\n\
+If no type is given, and there are multiple possible matches for name,\n\
+@code{exist} will return a code according to the following priority list:\n\
+variable, built-in function, oct-file, directory, file, class. \n\
+\n\
+@code{exist} returns 2 if a regular file called @var{name} is present in\n\
+Octave's search path.  If you want information about other types of files\n\
+not on the search path you should use some combination of the functions\n\
+@code{file_in_path} and @code{stat} instead.\n\
+\n\
+@seealso{file_in_loadpath, file_in_path, dir_in_loadpath, stat}\n\
 @end deftypefn")
 {
   octave_value retval = false;
@@ -557,16 +585,21 @@
 
   if (nargin == 1 || nargin == 2)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
+          std::string name = args(0).string_value ();
+
           if (nargin == 2)
             {
-              std::string type = args(1).string_value ();
-
-              if (! error_state)
-                retval = symbol_exist (name, type);
+              if (args(1).is_string ())
+                {
+                  std::string type = args(1).string_value ();
+
+                  if (type == "class")
+                    warning ("exist: \"class\" type argument is not implemented");
+
+                  retval = symbol_exist (name, type);
+                }
               else
                 error ("exist: TYPE must be a string");
             }
@@ -583,18 +616,72 @@
 }
 
 /*
+%!shared dirtmp, __var1
+%! dirtmp = P_tmpdir ();
+%! __var1 = 1;
+
+%!assert (exist ("__%Highly_unlikely_name%__"), 0)
+%!assert (exist ("__var1"), 1)
+%!assert (exist ("__var1", "var"), 1)
+%!assert (exist ("__var1", "builtin"), 0)
+%!assert (exist ("__var1", "dir"), 0)
+%!assert (exist ("__var1", "file"), 0)
+
 %!test
 %! if (isunix ())
-%!   assert (exist ("/tmp") == 7);
-%!   assert (exist ("/tmp", "file") == 7);
-%!   assert (exist ("/tmp", "dir") == 7);
-%!   assert (exist ("/bin/sh") == 2);
-%!   assert (exist ("/bin/sh", "file") == 2);
-%!   assert (exist ("/bin/sh", "dir") == 0);
-%!   assert (exist ("/dev/null") == 2);
-%!   assert (exist ("/dev/null", "file") == 2);
-%!   assert (exist ("/dev/null", "dir") == 0);
+%!   assert (exist ("/bin/sh"), 2);
+%!   assert (exist ("/bin/sh", "file"), 2);
+%!   assert (exist ("/bin/sh", "dir"), 0);
+%!   assert (exist ("/dev/null"), 2);
+%!   assert (exist ("/dev/null", "file"), 2);
+%!   assert (exist ("/dev/null", "dir"), 0);
 %! endif
+
+%!assert (exist ("print_usage"), 2)
+%!assert (exist ("print_usage.m"), 2)
+%!assert (exist ("print_usage", "file"), 2)
+%!assert (exist ("print_usage", "dir"), 0)
+
+## Don't search path for rooted relative file names
+%!assert (exist ("plot.m", "file"), 2);
+%!assert (exist ("./plot.m", "file"), 0);
+%!assert (exist ("./%nonexistentfile%", "file"), 0);
+%!assert (exist ("%nonexistentfile%", "file"), 0);
+ 
+## Don't search path for absolute file names
+%!test
+%! tname = tempname (pwd ()); 
+%! unwind_protect
+%!   ## open/close file to create it, equivalent of touch
+%!   fid = fopen (tname, "w");
+%!   fclose (fid);
+%!   [~, fname] = fileparts (tname);
+%!   assert (exist (fullfile (pwd (), fname), "file"), 2);
+%! unwind_protect_cleanup
+%!   unlink (tname);
+%! end_unwind_protect
+%! assert (exist (fullfile (pwd (), "%nonexistentfile%"), "file"), 0);
+
+%!testif HAVE_CHOLMOD
+%! assert (exist ("chol"), 3);
+%! assert (exist ("chol.oct"), 3);
+%! assert (exist ("chol", "file"), 3);
+%! assert (exist ("chol", "builtin"), 0);
+
+%!assert (exist ("sin"), 5)
+%!assert (exist ("sin", "builtin"), 5)
+%!assert (exist ("sin", "file"), 0)
+
+%!assert (exist (dirtmp), 7)
+%!assert (exist (dirtmp, "dir"), 7)
+%!assert (exist (dirtmp, "file"), 7)
+
+%!error exist ()
+%!error exist (1,2,3)
+%!warning <"class" type argument is not implemented> exist ("a", "class");
+%!error <TYPE must be a string> exist ("a", 1)
+%!error <NAME must be a string> exist (1)
+
 */
 
 octave_value
@@ -856,17 +943,17 @@
 
   if (nargin == 1)
     {
-      std::string sval = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
+          std::string sval = args(0).string_value ();
+
           if (empty_ok || ! sval.empty ())
             var = sval;
           else
             error ("%s: value must not be empty", nm);
         }
       else
-        error ("%s: expecting arg to be a character string", nm);
+        error ("%s: first argument must be a string", nm);
     }
   else if (nargin > 1)
     print_usage ();
@@ -897,10 +984,10 @@
 
   if (nargin == 1)
     {
-      std::string sval = args(0).string_value ();
-
-      if (! error_state)
+      if (args(0).is_string ())
         {
+          std::string sval = args(0).string_value ();
+
           int i = 0;
           for (; i < nchoices; i++)
             {
@@ -914,7 +1001,7 @@
             error ("%s: value not allowed (\"%s\")", nm, sval.c_str ());
         }
       else
-        error ("%s: expecting arg to be a character string", nm);
+        error ("%s: first argument must be a string", nm);
     }
   else if (nargin > 1)
     print_usage ();
@@ -1033,6 +1120,7 @@
 // and if val is an object, expect that dims will call size if it is
 // overloaded by a user-defined method.  But there are currently some
 // unresolved const issues that prevent that solution from working.
+// This same kluge is done in symtab.cc (do_workspace_info), fix there too.
 
 std::string
 get_dims_str (const octave_value& val)
@@ -1405,7 +1493,9 @@
             param.modifier = 'r';
             param.parameter_length = 0;
 
-            int a = 0, b = -1, balance = 1;
+            int a = 0;
+            int b = -1;
+            int balance = 1;
             unsigned int items;
             size_t pos;
             std::string cmd;
@@ -1994,10 +2084,11 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
-        munlock (name);
+      if (args(0).is_string ())
+        {
+          std::string name = args(0).string_value ();
+          munlock (name);
+        }
       else
         error ("munlock: FCN must be a string");
     }
@@ -2030,10 +2121,11 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).string_value ();
-
-      if (! error_state)
-        retval = mislocked (name);
+      if (args(0).is_string ())
+        {
+          std::string name = args(0).string_value ();
+          retval = mislocked (name);
+        }
       else
         error ("mislocked: FCN must be a string");
     }
@@ -2255,6 +2347,7 @@
         {
           symbol_table::clear_objects ();
           octave_class::clear_exemplar_map ();
+          symbol_table::clear_all ();
         }
       else
         {
@@ -2464,6 +2557,7 @@
                     {
                       symbol_table::clear_objects ();
                       octave_class::clear_exemplar_map ();
+                      symbol_table::clear_all ();
                     }
                   else
                     {
@@ -2543,8 +2637,9 @@
 leftmost column.  @code{left-min} specifies the minimum field width to the\n\
 left of the specified balance column.\n\
 \n\
-The default format is\n\
-@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\\n\"}.\n\
+The default format is:\n\
+\n\
+@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;@xbackslashchar{}n\"}\n\
 \n\
 When called from inside a function with the @qcode{\"local\"} option, the\n\
 variable is changed locally for the function and any subroutines it calls.  \n\
--- a/libinterp/corefcn/variables.h
+++ b/libinterp/corefcn/variables.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/workspace-element.h
+++ b/libinterp/corefcn/workspace-element.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/xdiv.cc
+++ b/libinterp/corefcn/xdiv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague
 
@@ -42,6 +42,7 @@
 #include "fDiagMatrix.h"
 #include "CDiagMatrix.h"
 #include "fCDiagMatrix.h"
+#include "lo-array-gripes.h"
 #include "quit.h"
 
 #include "error.h"
@@ -58,8 +59,7 @@
 static void
 solve_singularity_warning (double rcond)
 {
-  warning_with_id ("Octave:singular-matrix-div",
-                   "matrix singular to machine precision, rcond = %g", rcond);
+  gripe_singular_matrix (rcond);
 }
 
 template <class T1, class T2>
@@ -405,8 +405,7 @@
 static void
 solve_singularity_warning (float rcond)
 {
-  warning ("matrix singular to machine precision, rcond = %g", rcond);
-  warning ("attempting to find minimum norm solution");
+  gripe_singular_matrix (rcond);
 }
 
 INSTANTIATE_MX_LEFTDIV_CONFORM (FloatMatrix, FloatMatrix);
@@ -713,7 +712,9 @@
   if (! mx_div_conform (a, d))
     return MT ();
 
-  octave_idx_type m = a.rows (), n = d.rows (), l = d.length ();
+  octave_idx_type m = a.rows ();
+  octave_idx_type n = d.rows ();
+  octave_idx_type l = d.length ();
   MT x (m, n);
   typedef typename DMT::element_type S;
   typedef typename MT::element_type T;
@@ -794,7 +795,10 @@
   if (! mx_leftdiv_conform (d, a, blas_no_trans))
     return MT ();
 
-  octave_idx_type m = d.cols (), n = a.cols (), k = a.rows (), l = d.length ();
+  octave_idx_type m = d.cols ();
+  octave_idx_type n = a.cols ();
+  octave_idx_type k = a.rows ();
+  octave_idx_type l = d.length ();
   MT x (m, n);
   typedef typename DMT::element_type S;
   typedef typename MT::element_type T;
@@ -871,8 +875,11 @@
   if (! mx_div_conform (a, d))
     return MT ();
 
-  octave_idx_type m = a.rows (), n = d.rows (), k = d.cols ();
-  octave_idx_type l = std::min (m, n), lk = std::min (l, k);
+  octave_idx_type m = a.rows ();
+  octave_idx_type n = d.rows ();
+  octave_idx_type k = d.cols ();
+  octave_idx_type l = std::min (m, n);
+  octave_idx_type lk = std::min (l, k);
   MT x (m, n);
   typedef typename DMT::element_type S;
   typedef typename MT::element_type T;
@@ -943,8 +950,11 @@
   if (! mx_leftdiv_conform (d, a, blas_no_trans))
     return MT ();
 
-  octave_idx_type m = d.cols (), n = a.cols (), k = d.rows ();
-  octave_idx_type l = std::min (m, n), lk = std::min (l, k);
+  octave_idx_type m = d.cols ();
+  octave_idx_type n = a.cols ();
+  octave_idx_type k = d.rows ();
+  octave_idx_type l = std::min (m, n);
+  octave_idx_type lk = std::min (l, k);
   MT x (m, n);
   typedef typename DMT::element_type S;
   typedef typename MT::element_type T;
--- a/libinterp/corefcn/xdiv.h
+++ b/libinterp/corefcn/xdiv.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 
 This file is part of Octave.
--- a/libinterp/corefcn/xgl2ps.c
+++ b/libinterp/corefcn/xgl2ps.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/xnorm.cc
+++ b/libinterp/corefcn/xnorm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 VZLU Prague, a.s.
+Copyright (C) 2008-2015 VZLU Prague, a.s.
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/xnorm.h
+++ b/libinterp/corefcn/xnorm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 VZLU Prague, a.s.
+Copyright (C) 2008-2015 VZLU Prague, a.s.
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/xpow.cc
+++ b/libinterp/corefcn/xpow.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -33,6 +33,7 @@
 #include "CColVector.h"
 #include "CDiagMatrix.h"
 #include "fCDiagMatrix.h"
+#include "fCMatrix.h"
 #include "CMatrix.h"
 #include "EIG.h"
 #include "fEIG.h"
@@ -41,6 +42,7 @@
 #include "dMatrix.h"
 #include "PermMatrix.h"
 #include "mx-cm-cdm.h"
+#include "mx-fcm-fcdm.h"
 #include "oct-cmplx.h"
 #include "Range.h"
 #include "quit.h"
@@ -52,10 +54,6 @@
 
 #include "bsxfun.h"
 
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
 static inline int
 xisint (double x)
 {
--- a/libinterp/corefcn/xpow.h
+++ b/libinterp/corefcn/xpow.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/corefcn/zfstream.cc
+++ b/libinterp/corefcn/zfstream.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 Ludwig Schwardt, Kevin Ruland
+Copyright (C) 2005-2015 Ludwig Schwardt, Kevin Ruland
 
 
 This file is part of Octave.
--- a/libinterp/corefcn/zfstream.h
+++ b/libinterp/corefcn/zfstream.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 Ludwig Schwardt, Kevin Ruland
+Copyright (C) 2005-2015 Ludwig Schwardt, Kevin Ruland
 
 This file is part of Octave.
 
@@ -178,7 +178,7 @@
   virtual pos_type
   seekoff (off_type off, std::ios_base::seekdir way,
            std::ios_base::openmode mode =
-           std::ios_base::in|std::ios_base::out);
+             std::ios_base::in|std::ios_base::out);
 
   /**
    *  @brief  Alters the stream positions.
@@ -187,7 +187,7 @@
    */
   virtual pos_type
   seekpos (pos_type sp, std::ios_base::openmode mode =
-           std::ios_base::in|std::ios_base::out);
+             std::ios_base::in|std::ios_base::out);
 
   virtual int_type
   pbackfail (int_type c = traits_type::eof ());
--- a/libinterp/dldfcn/__delaunayn__.cc
+++ b/libinterp/dldfcn/__delaunayn__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 Kai Habel
+Copyright (C) 2000-2015 Kai Habel
 
 This file is part of Octave.
 
@@ -45,6 +45,8 @@
 #include <iostream>
 #include <string>
 
+#include "oct-locbuf.h"
+
 #include "Cell.h"
 #include "defun-dld.h"
 #include "error.h"
@@ -175,7 +177,8 @@
 
           facetT *facet;
           vertexT *vertex, **vertexp;
-          octave_idx_type nf = 0, i = 0;
+          octave_idx_type nf = 0;
+          octave_idx_type i = 0;
 
           FORALLfacets
             {
--- a/libinterp/dldfcn/__eigs__.cc
+++ b/libinterp/dldfcn/__eigs__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -211,7 +211,7 @@
         {
           std::string name = args(0).string_value ();
           std::string fname = "function y = ";
-          fcn_name = unique_symbol_name ("__eigs_fcn_");
+          fcn_name = unique_symbol_name ("__eigs_fcn__");
           fname.append (fcn_name);
           fname.append ("(x) y = ");
           eigs_fcn = extract_function (args(0), "eigs", fcn_name, fname,
@@ -270,8 +270,8 @@
 
   // Note hold off reading B till later to avoid issues of double
   // copies of the matrix if B is full/real while A is complex.
-  if (!error_state && nargin > 1 + arg_offset &&
-      !(args(1 + arg_offset).is_real_scalar ()))
+  if (! error_state && nargin > 1 + arg_offset
+      && ! (args(1 + arg_offset).is_real_scalar ()))
     {
       if (args(1+arg_offset).is_complex_type ())
         {
--- a/libinterp/dldfcn/__fltk_uigetfile__.cc
+++ b/libinterp/dldfcn/__fltk_uigetfile__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 Kai Habel
+Copyright (C) 2010-2015 Kai Habel
 
 This file is part of Octave.
 
@@ -102,7 +102,7 @@
 
       //fltk uses forward slash even for windows
       std::string sep = "/";
-      std::size_t idx;
+      size_t idx;
 
       if (file_count == 1 && multi_type != Fl_File_Chooser::DIRECTORY)
         {
@@ -123,10 +123,11 @@
         }
 
       if (multi_type == Fl_File_Chooser::DIRECTORY)
-        retval(0) = std::string (fc.value ());
+        retval(0) = file_ops::native_separator_path (std::string (fc.value ()));
       else
         {
-          retval(1) = std::string (fc.directory ()) + sep;
+          retval(1) = file_ops::native_separator_path (
+                        std::string (fc.directory ()) + sep);
           retval(2) = fc.filter_value () + 1;
         }
     }
--- a/libinterp/dldfcn/__glpk__.cc
+++ b/libinterp/dldfcn/__glpk__.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2005-2013 Nicolo' Giorgetti
-Copyright (C) 2013 Sébastien Villemot <sebastien@debian.org>
+Copyright (C) 2005-2015 Nicolo' Giorgetti
+Copyright (C) 2013-2015 Sébastien Villemot <sebastien@debian.org>
 
 This file is part of Octave.
 
@@ -716,7 +716,8 @@
   ColumnVector lambda (mrowsA, octave_NA);
   ColumnVector redcosts (mrowsc, octave_NA);
   double time;
-  int status, errnum = 0;
+  int status;
+  volatile int errnum = 0;
 
   int jmpret = setjmp (mark);
 
--- a/libinterp/dldfcn/__init_fltk__.cc
+++ b/libinterp/dldfcn/__init_fltk__.cc
@@ -1,6 +1,8 @@
 /*
 
-Copyright (C) 2007-2013 Shai Ayal
+
+Copyright (C) 2007-2015 Shai Ayal
+Copyright (C) 2014-2015 Andreas Weber
 
 This file is part of Octave.
 
@@ -61,6 +63,7 @@
 #include <FL/Fl_Choice.H>
 #include <FL/Fl_File_Chooser.H>
 #include <FL/Fl_Gl_Window.H>
+#include <FL/names.h>
 #include <FL/Fl_Menu_Bar.H>
 #include <FL/Fl_Menu_Button.H>
 #include <FL/Fl_Output.H>
@@ -85,15 +88,11 @@
 #include "gl2ps-renderer.h"
 #include "graphics.h"
 #include "parse.h"
-#include "sysdep.h"
 #include "toplev.h"
 #include "variables.h"
 
 #define FLTK_GRAPHICS_TOOLKIT_NAME "fltk"
 
-// Give FLTK no more than 0.01 sec to do its stuff.
-static double fltk_maxtime = 1e-2;
-
 const char* help_text = "\
 Keyboard Shortcuts\n\
 a - autoscale\n\
@@ -113,7 +112,7 @@
 public:
   OpenGL_fltk (int xx, int yy, int ww, int hh, double num)
     : Fl_Gl_Window (xx, yy, ww, hh, 0), number (num), renderer (),
-      in_zoom (false), zoom_box (),  print_mode (false)
+      in_zoom (false), zoom_box ()
   {
     // Ask for double buffering and a depth buffer.
     mode (FL_DEPTH | FL_DOUBLE | FL_MULTISAMPLE);
@@ -133,16 +132,14 @@
 
   void print (const std::string& cmd, const std::string& term)
   {
-    print_mode  = true;
-    print_cmd = cmd;
-    print_term  = term;
+    //std::cout << "OpenGL_fltk::print(cmd=" << cmd << ", term=" << term << ") canvas size = " << w () << "x" << h () << std::endl;
+
+    gl2ps_print (gh_manager::get_object (number), cmd, term);
   }
 
   void resize (int xx, int yy, int ww, int hh)
   {
     Fl_Gl_Window::resize (xx, yy, ww, hh);
-    setup_viewport (ww, hh);
-    redraw ();
   }
 
   bool renumber (double new_number)
@@ -165,48 +162,19 @@
   // (x1,y1,x2,y2)
   Matrix zoom_box;
 
-  bool print_mode;
-  std::string print_cmd;
-  std::string print_term;
-
-  void setup_viewport (int ww, int hh)
-  {
-    glMatrixMode (GL_PROJECTION);
-    glLoadIdentity ();
-    glViewport (0, 0, ww, hh);
-  }
-
   void draw (void)
   {
     if (! valid ())
       {
-        valid (1);
-        setup_viewport (w (), h ());
+        glMatrixMode (GL_PROJECTION);
+        glLoadIdentity ();
+        glViewport (0, 0, w (), h ());
       }
 
-    if (print_mode)
-      {
-#ifdef HAVE_GL2PS_H
-        FILE *fp = octave_popen (print_cmd.c_str (), "w");
-        glps_renderer rend (fp, print_term);
-
-        rend.draw (gh_manager::get_object (number), print_cmd);
+    renderer.draw (gh_manager::get_object (number));
 
-        octave_pclose (fp);
-        print_mode = false;
-#else
-        print_mode = false;
-        error ("fltk: printing not available without gl2ps library");
-        return;
-#endif
-      }
-    else
-      {
-        renderer.draw (gh_manager::get_object (number));
-
-        if (zoom ())
-          overlay ();
-      }
+    if (zoom ())
+      overlay ();
   }
 
   void zoom_box_vertex (void)
@@ -249,28 +217,20 @@
 
   int handle (int event)
   {
-    int retval = Fl_Gl_Window::handle (event);
-
     switch (event)
       {
       case FL_ENTER:
-        window ()->cursor (FL_CURSOR_CROSS);
+        cursor (FL_CURSOR_CROSS);
         return 1;
 
       case FL_LEAVE:
-        window ()->cursor (FL_CURSOR_DEFAULT);
+        cursor (FL_CURSOR_DEFAULT);
         return 1;
       }
-
-    return retval;
+    return Fl_Gl_Window::handle (event);
   }
 };
 
-// Parameter controlling how fast we zoom when using the scrool wheel.
-static double Vwheel_zoom_speed = 0.05;
-// Parameter controlling the GUI mode.
-static enum { pan_zoom, rotate_zoom, none } gui_mode;
-
 void script_cb (Fl_Widget*, void* data)
 {
   static_cast<uimenu::properties*> (data)->execute_callback ();
@@ -282,8 +242,7 @@
 public:
   fltk_uimenu (int xx, int yy, int ww, int hh)
   {
-    menubar = new
-    Fl_Menu_Bar (xx, yy, ww, hh);
+    menubar = new Fl_Menu_Bar (xx, yy, ww, hh);
   }
 
   int items_to_show (void)
@@ -291,7 +250,7 @@
     //returns the number of visible menu items
     int len = menubar->size ();
     int n = 0;
-    for (int t = 0; t < len; t++ )
+    for (int t = 0; t < len; t++)
       {
         const Fl_Menu_Item *m = static_cast<const Fl_Menu_Item*> (&
                                 (menubar->menu ()[t]));
@@ -305,11 +264,13 @@
   void show (void)
   {
     menubar->show ();
+    menubar->redraw ();
   }
 
   void hide (void)
   {
     menubar->hide ();
+    menubar->redraw ();
   }
 
   bool is_visible (void)
@@ -326,7 +287,7 @@
     // Kai Habel (14.10.2010)
 
     std::string menupath;
-    for (int t = 0; t < menubar->size (); t++ )
+    for (int t = 0; t < menubar->size (); t++)
       {
         Fl_Menu_Item *m = const_cast<Fl_Menu_Item*> (&(menubar->menu ()[t]));
         if (m->submenu ())
@@ -336,7 +297,7 @@
               menupath += "/";
             menupath += m->label ();
 
-            if (menupath.compare (findname) == 0 )
+            if (menupath.compare (findname) == 0)
               return (t);
           }
         else
@@ -344,7 +305,7 @@
             // End of submenu? Pop back one level.
             if (! m->label ())
               {
-                std::size_t idx = menupath.find_last_of ("/");
+                size_t idx = menupath.find_last_of ("/");
                 if (idx != std::string::npos)
                   menupath.erase (idx);
                 else
@@ -543,6 +504,11 @@
       }
   }
 
+  void update_position (uimenu::properties& uimenup, int pos)
+  {
+    uimenup.get_property ("position").set (octave_value (static_cast<double> (pos)), true, false);
+  }
+
   void add_entry (uimenu::properties& uimenup)
   {
 
@@ -559,8 +525,8 @@
             if (item)
               {
                 //avoid duplicate menulabels
-                std::size_t idx1 = fltk_label.find_last_of ("(");
-                std::size_t idx2 = fltk_label.find_last_of (")");
+                size_t idx1 = fltk_label.find_last_of ("(");
+                size_t idx2 = fltk_label.find_last_of (")");
                 int len = idx2 - idx1;
                 int val = 1;
                 if (len > 0)
@@ -595,9 +561,11 @@
 
   void add_to_menu (uimenu::properties& uimenup)
   {
+    std::vector<int> delayed_menus;
     Matrix kids = find_uimenu_children (uimenup);
     int len = kids.length ();
     std::string fltk_label = uimenup.get_fltk_label ();
+    int count = 0;
 
     add_entry (uimenup);
     update_foregroundcolor (uimenup);
@@ -614,15 +582,39 @@
           {
             uimenu::properties& kprop = dynamic_cast<uimenu::properties&>
                                         (kgo.get_properties ());
+
+            // if no pos yet, delay adding menu until after other menus
+            int pos = kprop.get_position ();
+            if (pos <= 0)
+              delayed_menus.push_back ((len - (ii + 1))); 
+            else
+             {
+               add_to_menu (kprop);
+             }
+          }
+      }
+
+    // create any delayed menus
+    for (size_t ii = 0; ii < delayed_menus.size (); ii++)
+      {
+        graphics_object kgo = gh_manager::get_object (kids (delayed_menus[ii]));
+
+        if (kgo.valid_object ())
+          {
+            uimenu::properties& kprop = dynamic_cast<uimenu::properties&>
+                                        (kgo.get_properties ());
             add_to_menu (kprop);
+            update_position (kprop, ++count);
           }
       }
   }
 
   void add_to_menu (figure::properties& figp)
   {
+    std::vector<int> delayed_menus;
     Matrix kids = find_uimenu_children (figp);
     int len = kids.length ();
+    int count = 0;
     menubar->clear ();
     for (octave_idx_type ii = 0; ii < len; ii++)
       {
@@ -632,7 +624,30 @@
           {
             uimenu::properties& kprop = dynamic_cast<uimenu::properties&>
                                         (kgo.get_properties ());
+
+            // if no pos yet, delay adding menu until after other menus
+            int pos = kprop.get_position ();
+            if (pos <= 0)
+              delayed_menus.push_back ((len - (ii + 1))); 
+            else
+             {
+               add_to_menu (kprop);
+               update_position (kprop, ++count);
+             }
+          }
+      }
+
+    // create any delayed menus
+    for (size_t ii = 0; ii < delayed_menus.size (); ii++)
+      {
+        graphics_object kgo = gh_manager::get_object (kids (delayed_menus[ii]));
+
+        if (kgo.valid_object ())
+          {
+            uimenu::properties& kprop = dynamic_cast<uimenu::properties&>
+                                        (kgo.get_properties ());
             add_to_menu (kprop);
+            update_position (kprop, ++count);
           }
       }
   }
@@ -691,14 +706,21 @@
 {
   friend class fltk_uimenu;
 public:
-  plot_window (int xx, int yy, int ww, int hh, figure::properties& xfp)
-    : Fl_Window (xx, yy - menu_h, ww, hh + menu_h + status_h, "octave"),
-      window_label (), shift (0), ndim (2), fp (xfp), canvas (0),
+  plot_window (int xx, int yy, int ww, int hh, figure::properties& xfp,
+               bool internal)
+    : Fl_Window (xx, yy, ww, hh + menu_h + status_h + 2, "octave"),
+      window_label (), fp (xfp), canvas (0),
       autoscale (0), togglegrid (0), panzoom (0), rotate (0), help (0),
-      status (0), ax_obj (), pos_x (0), pos_y (0)
+      status (0), resize_dummy (0), ax_obj (), pos_x (0), pos_y (0)
   {
     callback (window_close, static_cast<void*> (this));
-    size_range (4*status_h, 2*status_h);
+
+    // The size of the resize_dummy box also determines the minimum window size
+    resize_dummy = new Fl_Box (5 * status_h + 1, menu_h + 1,
+                               ww - 5 * status_h - 1, hh);
+    // See http://fltk.org/articles.php?L415+I0+T+M1000+P1
+    // for how resizable works
+    resizable (resize_dummy);
 
     // FIXME: The function below is only available in FLTK >= 1.3
     // At some point support for FLTK 1.1 will be dropped in Octave.
@@ -708,115 +730,84 @@
     // windows.  Otherwise, the class is just "FLTK"
     //default_xclass ("Octave");
 
-    begin ();
-    {
-      // bbox of plot canvas = [xx, yy, ww, hh];
-      // (xx, yy) = UL coordinate relative to UL window.
+    uimenu = new fltk_uimenu (0, 0, ww, menu_h);
+    canvas = new OpenGL_fltk (0, menu_h, ww, hh, number ());
 
-      canvas = new OpenGL_fltk (0, menu_h, ww, hh, number ());
+    // The bottom toolbar is a composite of "autoscale", "togglegrid",
+    // "panzoom", "rotate", "help", and "status".
+    // Only "status" should be resized.
 
-      uimenu = new fltk_uimenu (0, 0, ww, menu_h);
-      uimenu->hide ();
-
-      // Toolbar is a composite of "bottom", "autoscale", "togglegrid",
-      // "panzoom", "rotate", "help", and "status".
+    int toolbar_y = menu_h + hh + 1;
+    status = new Fl_Output (5 * status_h + 1, toolbar_y,
+                            ww - 5 * status_h - 1, status_h, "");
 
-      yy = hh + menu_h;
-      bottom = new Fl_Box (0, yy, ww, status_h);
-      bottom->box (FL_FLAT_BOX);
-
-      ndim = calc_dimensions (gh_manager::get_object (fp.get___myhandle__ ()));
-
-      autoscale = new Fl_Button (0, yy, status_h, status_h, "A");
-      autoscale->callback (button_callback, static_cast<void*> (this));
-      autoscale->tooltip ("Autoscale");
+    status->textcolor (FL_BLACK);
+    status->color (FL_GRAY);
+    status->textfont (FL_COURIER);
+    status->textsize (10);
+    status->box (FL_ENGRAVED_BOX);
 
-      togglegrid = new Fl_Button (status_h, yy, status_h,
-                                  status_h, "G");
-      togglegrid->callback (button_callback, static_cast<void*> (this));
-      togglegrid->tooltip ("Toggle Grid");
+    autoscale = new Fl_Button (0, toolbar_y, status_h, status_h, "A");
+    autoscale->callback (button_callback, static_cast<void*> (this));
+    autoscale->tooltip ("Autoscale");
 
-      panzoom = new Fl_Button (2 * status_h, yy, status_h,
-                               status_h, "P");
-      panzoom->callback (button_callback, static_cast<void*> (this));
-      panzoom->tooltip ("Mouse Pan/Zoom");
+    togglegrid = new Fl_Button (status_h, toolbar_y, status_h, status_h, "G");
+    togglegrid->callback (button_callback, static_cast<void*> (this));
+    togglegrid->tooltip ("Toggle Grid");
+
+    panzoom = new Fl_Button (2* status_h, toolbar_y, status_h, status_h, "P");
+    panzoom->callback (button_callback, static_cast<void*> (this));
+    panzoom->tooltip ("Mouse Pan/Zoom");
 
-      rotate = new Fl_Button (3 * status_h, yy, status_h,
-                              status_h, "R");
-      rotate->callback (button_callback, static_cast<void*> (this));
-      rotate->tooltip ("Mouse Rotate");
-
-      if (ndim == 2)
-        rotate->deactivate ();
+    rotate = new Fl_Button (3 * status_h, toolbar_y, status_h, status_h, "R");
+    rotate->callback (button_callback, static_cast<void*> (this));
+    rotate->tooltip ("Mouse Rotate");
 
-      help = new Fl_Button (4 * status_h, yy, status_h,
-                            status_h, "?");
-      help->callback (button_callback, static_cast<void*> (this));
-      help->tooltip ("Help");
+    help = new Fl_Button (4 * status_h, toolbar_y, status_h, status_h, "?");
+    help->callback (button_callback, static_cast<void*> (this));
+    help->tooltip ("Help");
 
-      status = new Fl_Output (5 * status_h, yy,
-                              ww > 2*status_h ? ww - status_h : 0,
-                              status_h, "");
+    end ();
 
-      status->textcolor (FL_BLACK);
-      status->color (FL_GRAY);
-      status->textfont (FL_COURIER);
-      status->textsize (10);
-      status->box (FL_ENGRAVED_BOX);
+    set_name ();
+    uimenu->add_to_menu (fp);
+    if (fp.menubar_is ("none") || !uimenu->items_to_show ())
+      hide_menubar ();
+
+    update_boundingbox (internal);
 
-      // This allows us to have a valid OpenGL context right away.
-      canvas->mode (FL_DEPTH | FL_DOUBLE | FL_MULTISAMPLE);
-      if (fp.is_visible ())
-        {
-          // FIXME: This code should be removed when Octave drops support
-          // for FLTK 1.1.  Search for default_xclass in this file to find
-          // code that should be uncommented to take its place.
-          //
-          // Set WM_CLASS which allows window managers to properly group
-          // related windows.  Otherwise, the class is just "FLTK"
-          xclass ("Octave");
+    if (fp.is_visible ())
+      {
+        // FIXME: This code should be removed when Octave drops support
+        // for FLTK 1.1.  Search for default_xclass in this file to find
+        // code that should be uncommented to take its place.
+        //
+        // Set WM_CLASS which allows window managers to properly group
+        // related windows.  Otherwise, the class is just "FLTK"
+        xclass ("Octave");
 
-          show ();
+        show ();
 
 #if defined (HAVE_X_WINDOWS)
-          std::string show_gui_msgs
-            = octave_env::getenv ("OCTAVE_SHOW_GUI_MESSAGES");
+        std::string show_gui_msgs
+          = octave_env::getenv ("OCTAVE_SHOW_GUI_MESSAGES");
 
-          // Installing our handler suppresses the messages.
-          if (show_gui_msgs.empty ())
-            XSetErrorHandler (xerror_handler);
+        // Installing our handler suppresses the messages.
+        if (show_gui_msgs.empty ())
+          XSetErrorHandler (xerror_handler);
 #endif
 
-          if (fp.get_currentaxes ().ok ())
-            show_canvas ();
-          else
-            hide_canvas ();
-        }
-    }
-    end ();
-
-    status->show ();
-    autoscale->show ();
-    togglegrid->show ();
-    panzoom->show ();
-    rotate->show ();
-
-    set_name ();
-    resizable (canvas);
-    gui_mode = (ndim == 3 ? rotate_zoom : pan_zoom);
-    uimenu->add_to_menu (fp);
-    if (uimenu->items_to_show ())
-      show_menubar ();
-    else
-      hide_menubar ();
+        if (fp.get_currentaxes ().ok ())
+          show_canvas ();
+        else
+          hide_canvas ();
+      }
   }
 
   ~plot_window (void)
   {
-    canvas->hide ();
-    status->hide ();
-    uimenu->hide ();
     this->hide ();
+    Fl::check ();
   }
 
   double number (void) { return fp.get___myhandle__ ().value (); }
@@ -835,31 +826,18 @@
   void print (const std::string& cmd, const std::string& term)
   {
     canvas->print (cmd, term);
-
-    // Print immediately so the output file will exist when the drawnow
-    // command is done.
-    mark_modified ();
-    Fl::wait (fltk_maxtime);
   }
 
   void show_menubar (void)
   {
-    if (!uimenu->is_visible ())
-      {
-        // FIXME: Toolbar and menubar do not update
-        uimenu->show ();
-        mark_modified ();
-      }
+    uimenu->show ();
+    update_toolbar_position ();
   }
 
   void hide_menubar (void)
   {
-    if (uimenu->is_visible ())
-      {
-        // FIXME: Toolbar and menubar do not update
-        uimenu->hide ();
-        mark_modified ();
-      }
+    uimenu->hide ();
+    update_toolbar_position ();
   }
 
   void uimenu_update (const graphics_handle& gh, int id)
@@ -922,8 +900,6 @@
           show_menubar ();
         else
           hide_menubar ();
-
-        mark_modified ();
       }
   }
 
@@ -943,19 +919,63 @@
     canvas->hide ();
   }
 
+  // Move the toolbar at the bottom of the plot_window.
+  // The only reason for moving the toolbar is hiding and
+  // showing the menubar. All other resizing is done by fltk.
+
+  void update_toolbar_position ()
+  {
+    int old_canvas_h = canvas->h ();
+
+    // keep position fix, change outerposition accordingly
+    update_boundingbox (true);
+    canvas->resize (0, menu_dy (), w (), old_canvas_h);
+
+    int toolbar_y = canvas->h () + menu_dy () + 1;
+    autoscale->position (0, toolbar_y);
+    togglegrid->position (status_h, toolbar_y);
+    panzoom->position (2 * status_h, toolbar_y);
+    rotate->position (3 * status_h, toolbar_y);
+    help->position (4 * status_h, toolbar_y);
+    status->resize (5 * status_h + 1, toolbar_y,
+                    w () - 5 * status_h - 1, status_h);
+
+    init_sizes ();
+    redraw ();
+  }
+
+  Matrix outerposition2position (const Matrix& outerpos)
+  {
+    Matrix pos = outerpos;
+    pos(1) += menu_dy ();
+    pos(3) -= menu_dy () + status_h + 2;
+    return pos;
+  }
+
+  Matrix position2outerposition (const Matrix& pos)
+  {
+    Matrix outerpos = pos;
+    outerpos(1) -= menu_dy ();
+    outerpos(3) += menu_dy () + status_h + 2;
+    return outerpos;
+  }
+
+  // Called from figure::properties::ID_POSITION if internal = true
+  // or ID_OUTERPOSITION if false.
+  // (someone has requested a position change with set (h, "position", [...])
+  // or set (h, "outerposition", [...])
+
+  void update_boundingbox (bool internal)
+  {
+    Matrix bb = fp.get_boundingbox (internal);
+    if (internal)
+      bb = position2outerposition (bb);
+    resize (bb(0), bb(1), bb(2), bb(3));
+  }
+
   void mark_modified (void)
   {
-    damage (FL_DAMAGE_ALL);
-    canvas->damage (FL_DAMAGE_ALL);
-    ndim = calc_dimensions (gh_manager::get_object (fp.get___myhandle__ ()));
-
-    if (ndim == 3)
-      rotate->activate ();
-    else if (ndim == 2 && gui_mode == rotate_zoom)
-      {
-        rotate->deactivate ();
-        gui_mode = pan_zoom;
-      }
+    canvas->redraw ();
   }
 
   void set_name (void)
@@ -976,12 +996,6 @@
   // life
   std::string window_label;
 
-  // Mod keys status
-  int shift;
-
-  // Number of dimensions, 2 or 3.
-  int ndim;
-
   // Figure properties.
   figure::properties& fp;
 
@@ -989,7 +1003,7 @@
   static const int status_h = 20;
 
   // Menu height
-  static const int menu_h = 20;
+  static const int menu_h = 25;
 
   // Window callback.
   static void window_close (Fl_Widget*, void* data)
@@ -1009,40 +1023,62 @@
   {
     if (widg == autoscale)
       axis_auto ();
-
-    if (widg == togglegrid)
+    else if (widg == togglegrid)
       toggle_grid ();
+    else if (widg == panzoom)
+      fp.set___mouse_mode__ ("pan");
+    else if (widg == rotate)
+      fp.set___mouse_mode__ ("rotate");
+    else if (widg == help)
+      fl_message ("%s", help_text);
+  }
 
-    if (widg == panzoom)
-      gui_mode = pan_zoom;
-
-    if (widg == rotate && ndim == 3)
-      gui_mode = rotate_zoom;
-
-    if (widg == help)
-      fl_message ("%s", help_text);
+  void set_on_ax_obj (const std::string& name, const std::string& value)
+  {
+    // ax_obj is the last clicked axes object
+    if (ax_obj && ax_obj.isa ("axes"))
+      {
+        axes::properties& ap =
+          dynamic_cast<axes::properties&>(ax_obj.get_properties ());
+        ap.set (name, value);
+      }
+    else // no axes object clicked so far, take currentaxes
+      {
+        graphics_handle gh = fp.get_currentaxes ();
+        if (gh.ok ())
+          {
+            graphics_object go = gh_manager::get_object (gh);
+            axes::properties& ap =
+              dynamic_cast<axes::properties&>(go.get_properties ());
+            ap.set (name, value);
+          }
+      }
   }
 
   fltk_uimenu* uimenu;
   OpenGL_fltk* canvas;
-  Fl_Box*    bottom;
   Fl_Button* autoscale;
   Fl_Button* togglegrid;
   Fl_Button* panzoom;
   Fl_Button* rotate;
   Fl_Button* help;
   Fl_Output* status;
+  Fl_Box* resize_dummy;
   graphics_object ax_obj;
   int pos_x;
   int pos_y;
 
+
   void axis_auto (void)
   {
     octave_value_list args;
-    args(0) = fp.get_currentaxes ().as_octave_value ();
-    args(1) = "auto";
-    feval ("axis", args);
-    mark_modified ();
+    if (fp.get_currentaxes ().ok ())
+      {
+        args(0) = fp.get_currentaxes ().as_octave_value ();
+        args(1) = "auto";
+        feval ("axis", args);
+        mark_modified ();
+      }
   }
 
   void toggle_grid (void)
@@ -1058,7 +1094,7 @@
   void pixel2pos (const graphics_handle& ax, int px, int py, double& xx,
                   double& yy) const
   {
-    pixel2pos ( gh_manager::get_object (ax), px, py, xx, yy);
+    pixel2pos (gh_manager::get_object (ax), px, py, xx, yy);
   }
 
   void pixel2pos (graphics_object ax, int px, int py, double& xx,
@@ -1074,7 +1110,7 @@
       }
   }
 
-  graphics_handle pixel2axes_or_ca (int px, int py )
+  graphics_handle pixel2axes_or_ca (int px, int py)
   {
     Matrix kids = fp.get_children ();
     int len = kids.length ();
@@ -1089,7 +1125,7 @@
 
             if (kid.valid_object () && kid.isa ("axes"))
               {
-                Matrix bb = kid.get_properties ().get_boundingbox (true);
+                Matrix bb = kid.get_properties ().get_boundingbox (false);
 
                 if (bb(0) <= px && px < (bb(0)+bb(2))
                     && bb(1) <= py && py < (bb(1)+bb(3)))
@@ -1125,7 +1161,6 @@
       }
 
     status->value (cbuf.str ().c_str ());
-    status->redraw ();
   }
 
   void view2status (graphics_object ax)
@@ -1142,7 +1177,6 @@
         cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << "]";
 
         status->value (cbuf.str ().c_str ());
-        status->redraw ();
       }
   }
 
@@ -1150,9 +1184,7 @@
   {
     if (!fp.is_beingdeleted ())
       {
-        Matrix pos (1,2,0);
-        pos(0) = px;
-        pos(1) = h () - (py + status_h + menu_dy ());
+        Matrix pos = fp.map_from_boundingbox (px, py);
         fp.set_currentpoint (pos);
         graphics_object robj = gh_manager::get_object (fp.get_parent ());
         root_figure::properties& rp =
@@ -1163,19 +1195,25 @@
 
   void set_axes_currentpoint (graphics_object ax, int px, int py)
   {
-    if (ax.valid_object ())
+    if (ax.valid_object () && ax.isa ("axes"))
       {
         axes::properties& ap =
           dynamic_cast<axes::properties&> (ax.get_properties ());
 
-        double xx, yy;
-        pixel2pos (ax, px, py, xx, yy);
+        Matrix x_zlim = ap.get_transform_zlim ();
+        Matrix pos (2, 3, 0.0);
 
-        Matrix pos (2,3,0);
-        pos(0,0) = xx;
-        pos(1,0) = yy;
-        pos(0,1) = xx;
-        pos(1,1) = yy;
+        // front point (nearest to the viewer)
+        ColumnVector tmp = ap.get_transform ().untransform (px, py, x_zlim(0));
+        pos(0,0) = tmp(0);
+        pos(0,1) = tmp(1);
+        pos(0,2) = tmp(2);
+
+        // back point (furthest from the viewer)
+        tmp = ap.get_transform ().untransform (px, py, x_zlim(1));
+        pos(1,0) = tmp(0);
+        pos(1,1) = tmp(1);
+        pos(1,2) = tmp(2);
 
         ap.set_currentpoint (pos);
         fp.set_currentaxes (ap.get___myhandle__ ().value ());
@@ -1190,348 +1228,539 @@
       return 0;
   }
 
-  int key2shift (int key)
+  octave_scalar_map format_key_event (int e_key, const char* e_text, int e_state)
   {
-    if (key == FL_Shift_L || key == FL_Shift_R)
-      return FL_SHIFT;
+    octave_scalar_map evt;
 
-    if (key == FL_Control_L || key == FL_Control_R)
-      return FL_CTRL;
+    evt.assign ("Character", octave_value (e_text));
+    evt.assign ("Modifier", octave_value (modifier2cell (e_state)));
+
+    std::string key_str;
+    std::ostringstream tmp_str;
 
-    if (key == FL_Alt_L || key == FL_Alt_R)
-      return FL_ALT;
+    if (e_key == FL_Escape)
+      key_str = "escape";
+    else if (e_key == FL_Tab)
+      key_str = "tab";
+    else if (e_key == FL_Caps_Lock)
+      key_str = "capslock";
+    else if (e_key == FL_Shift_L || e_key == FL_Shift_R)
+      key_str = "shift";
+    else if (e_key == FL_Control_L || e_key == FL_Control_R)
+      key_str = "control";
+    else if (e_key == FL_Meta_L || e_key == FL_Meta_R)
+      key_str = "windows";
+    else if (e_key == FL_Alt_L || e_key == FL_Alt_R)
+      key_str = "alt";
+    else if (e_key == 32)
+      key_str = "space";
+    else if (e_key == FL_Enter)
+      key_str = "return";
+    else if (e_key == FL_BackSpace)
+      key_str = "backspace";
+    else if (e_key == FL_Print)
+      key_str = "printscreen";
+    else if (e_key == FL_Pause)
+      key_str = "pause";
+    else if (e_key == FL_Home)
+      key_str = "home";
+    else if (e_key == FL_End)
+      key_str = "end";
+    else if (e_key == FL_Insert)
+      key_str = "insert";
+    else if (e_key == FL_Page_Up)
+      key_str = "pageup";
+    else if (e_key == FL_Delete)
+      key_str = "delete";
+    else if (e_key == FL_Page_Down)
+      key_str = "pagedown";
+    else if (e_key == FL_Left)
+      key_str = "leftarrow";
+    else if (e_key == FL_Up)
+      key_str = "uparrow";
+    else if (e_key == FL_Right)
+      key_str = "rightarrow";
+    else if (e_key == FL_Down)
+      key_str = "downarrow";
+    else if (e_key == FL_Num_Lock)
+      key_str = "numlock";
+    else if (e_key == 0xffaf)
+      key_str = "divide";
+    else if (e_key == 0xffaa)
+      key_str = "multiply";
+    else if (e_key == 0xffad)
+      key_str = "subtract";
+    else if (e_key == 0xffab)
+      key_str = "add";
+    else if (e_key == 0xff8d)
+      key_str = "return";
+    else if (e_key == 0xffac)
+      key_str = "separator";
+    else if (e_key >= 0xffb0 && e_key <= 0xffb9)
+      {
+        tmp_str << "numpad" << (e_key - 0xffb0);
+        key_str = tmp_str.str ();
+      }
+    else if (e_key >= (FL_F + 1) && e_key <= (FL_F + 12))
+      {
+        tmp_str << "f" << (e_key - FL_F);
+        key_str = tmp_str.str ();
+      }
+    else if (e_key == ',')
+      key_str = "comma";
+    else if (e_key == '.')
+      key_str = "period";
+    else if (e_key == '-')
+      key_str = "hyphen";
+    else if (e_key == '^' || e_key == '+' || e_key == '#'
+             || e_key == '<' || e_key == 0xfe03 /*AltGr*/)
+      key_str = "0";
+    else if (isalnum (e_key))
+      key_str = std::tolower (e_key);
+    else if (isprint (e_text[0]))
+      key_str = "0";
 
-    if (key == FL_Meta_L || key == FL_Meta_R)
-      return FL_META;
-
-    return 0;
+    evt.assign ("Key", octave_value (key_str));
+    return evt;
   }
 
-  int key2ascii (int key)
-  {
-    if (key < 256) return key;
-    if (key == FL_Tab) return '\t';
-    if (key == FL_Enter) return 0x0a;
-    if (key == FL_BackSpace) return 0x08;
-    if (key == FL_Escape) return 0x1b;
-
-    return 0;
-  }
-
-  Cell modifier2cell ()
+  Cell modifier2cell (int e_state)
   {
     string_vector mod;
 
-    if (shift & FL_SHIFT)
+    if (e_state & FL_SHIFT)
       mod.append (std::string ("shift"));
-    if (shift & FL_CTRL)
+    if (e_state & FL_CTRL)
       mod.append (std::string ("control"));
-    if (shift & FL_ALT || shift & FL_META)
+    if (e_state & FL_ALT)
       mod.append (std::string ("alt"));
-
+    if (e_state & FL_COMMAND)
+      mod.append (std::string ("command"));
     return Cell (mod);
   }
 
-  void resize (int xx,int yy,int ww,int hh)
+  void resize (int xx, int yy, int ww, int hh)
   {
     Fl_Window::resize (xx, yy, ww, hh);
 
-    Matrix pos (1,4,0);
-    pos(0) = xx;
-    pos(1) = yy + menu_dy ();
-    pos(2) = ww;
-    pos(3) = hh - menu_dy () - status_h;
+    Matrix bb (1, 4);
+    bb(0) = xx;
+    bb(1) = yy;
+    bb(2) = ww;
+    bb(3) = hh;
 
-    fp.set_boundingbox (pos, true);
+    // update outerposition
+    fp.set_boundingbox (bb, false, false);
+
+    // update position
+    fp.set_boundingbox (outerposition2position (bb), true, false);
   }
 
-  void draw (void)
+  bool pan_enabled (void)
   {
-    // FIXME: Toolbar and menubar do not update properly
-    Matrix pos = fp.get_boundingbox (true);
-    int canvas_h = pos(3);
-    int canvas_w = pos(2);
-    int canvas_y = menu_dy ();
-    int toolbar_y = menu_dy () + canvas_h;
-    pos(1) = pos(1) - menu_dy ();
-    pos(3) = pos(3) + menu_dy () + status_h;
+    // Getting pan mode property:
+    octave_value ov_pm = fp.get___pan_mode__ ();
+
+    octave_scalar_map pm = ov_pm.scalar_map_value ();
+
+    return pm.contents ("Enable").string_value () == "on";
+  }
 
-    Fl_Window::resize (pos(0), pos(1), pos(2), pos(3));
+  std::string pan_mode (void)
+  {
+    // Getting pan mode property:
+    octave_value ov_pm = fp.get___pan_mode__ ();
+
+    octave_scalar_map pm = ov_pm.scalar_map_value ();
 
-    bottom->resize (0, toolbar_y, status_h, status_h);
-    autoscale->resize (0, toolbar_y, status_h, status_h);
-    togglegrid->resize (status_h, toolbar_y, status_h, status_h);
-    panzoom->resize (2 * status_h, toolbar_y, status_h, status_h);
-    rotate->resize (3 * status_h, toolbar_y, status_h, status_h);
-    help->resize (4 * status_h, toolbar_y, status_h, status_h);
-    status->resize (5 * status_h, toolbar_y, pos(2) - 4 * status_h, status_h);
-    if (canvas->valid ())
-      canvas->resize (0, canvas_y, canvas_w, canvas_h);
+    return pm.contents ("Motion").string_value ();
+  }
 
-    return Fl_Window::draw ();
+  bool rotate_enabled (void)
+  {
+    // Getting rotate mode property:
+    octave_value ov_rm = fp.get___rotate_mode__ ();
+
+    octave_scalar_map rm = ov_rm.scalar_map_value ();
+
+    return rm.contents ("Enable").string_value () == "on";
   }
 
   int handle (int event)
   {
-    graphics_handle gh;
+    if (event == FL_FOCUS)
+      return 1;
 
-    graphics_object fig = gh_manager::get_object (fp.get___myhandle__ ());
-    int retval = Fl_Window::handle (event);
-
-    // We only handle events which are in the canvas area.
-    if (!Fl::event_inside (canvas))
-      return retval;
+    graphics_handle gh;
 
     if (!fp.is_beingdeleted ())
       {
+        //std::cout << "plot_window::handle event = " <<  fl_eventnames[event] << std::endl;
+
+        // FLTK resends keyboard events with flipped case if all
+        // widgets rejects the event.
+        // See Event Propagation http://www.fltk.org/doc-1.3/events.html
+        static bool key_resent_detected = false;
+
         switch (event)
           {
+          case FL_SHORTCUT:
+            {
+              // check if it a resent event with switched case
+              static int last_event_key = 0;
+              static char last_event_text = 0;
+
+              int e_key = Fl::event_key ();
+              char e_text = Fl::event_text ()[0];
+              key_resent_detected = (e_key == last_event_key
+                  && std::tolower (last_event_text) == std::tolower (e_text)
+                  && ((islower (last_event_text) && isupper (e_text))
+                      || (isupper (last_event_text) && islower (e_text))));
+
+              last_event_key = e_key;
+              last_event_text = e_text;
+            }
+            break;
+
           case FL_KEYDOWN:
             {
-              int key = Fl::event_key ();
+              int e_key = Fl::event_key ();
+              const char *e_text = Fl::event_text ();
+              int e_state = Fl::event_state ();
+              octave_scalar_map evt = format_key_event (e_key, e_text, e_state);
+
+              fp.set_currentcharacter (std::string (e_text));
 
-              shift |= key2shift (key);
-              int key_a = key2ascii (key);
-              if (key_a && fp.get_keypressfcn ().is_defined ())
+              if (! fp.get_keypressfcn ().is_empty ()
+                  && (evt.contents ("Key").length () > 0))
                 {
-                  octave_scalar_map evt;
-                  evt.assign ("Character", octave_value (key_a));
-                  evt.assign ("Key", octave_value (std::tolower (key_a)));
-                  evt.assign ("Modifier", octave_value (modifier2cell ()));
+                  // Update CurrentPoint before callback
+                  if (Fl::event_inside (canvas))
+                    {
+                      pos_x = Fl::event_x ();
+                      pos_y = Fl::event_y () - menu_dy ();
+
+                      set_currentpoint (pos_x, pos_y);
+
+                      gh = pixel2axes_or_ca (pos_x, pos_y);
+
+                      if (gh.ok ())
+                        {
+                          ax_obj = gh_manager::get_object (gh);
+                          set_axes_currentpoint (ax_obj, pos_x, pos_y);
+                        }
+                     }
+
                   fp.execute_keypressfcn (evt);
                 }
-              switch (key)
+
+              // Handle special keys used in toolbar
+              switch (e_key)
                 {
                 case 'a':
                 case 'A':
                   axis_auto ();
-                  break;
+                  return 1;
 
                 case 'g':
                 case 'G':
                   toggle_grid ();
-                  break;
+                  return 1;
 
                 case 'p':
                 case 'P':
-                  gui_mode = pan_zoom;
-                  break;
+                  fp.set___mouse_mode__ ("pan");
+                  return 1;
 
                 case 'r':
                 case 'R':
-                  gui_mode = rotate_zoom;
-                  break;
+                  fp.set___mouse_mode__ ("rotate");
+                  return 1;
                 }
             }
             break;
 
           case FL_KEYUP:
             {
-              int key = Fl::event_key ();
-
-              shift &= (~key2shift (key));
-              int key_a = key2ascii (key);
-              if (key_a && fp.get_keyreleasefcn ().is_defined ())
+              int e_key = Fl::event_key ();
+              int e_state = Fl::event_state ();
+              octave_scalar_map evt;
+              if (key_resent_detected && Fl::event_length () == 1)
                 {
-                  octave_scalar_map evt;
-                  evt.assign ("Character", octave_value (key_a));
-                  evt.assign ("Key", octave_value (std::tolower (key_a)));
-                  evt.assign ("Modifier", octave_value (modifier2cell ()));
-                  fp.execute_keyreleasefcn (evt);
+                  // FLTK flipped the case of Fl::event_text because no
+                  // widget wanted the FL_KEYDOWN event.
+                  char tmp_e_text[2];
+                  tmp_e_text[0] = Fl::event_text ()[0];
+                  tmp_e_text[1] = 0;
+                  // Undo the case flip
+                  if (std::islower (tmp_e_text[0]))
+                    tmp_e_text[0] = std::toupper (tmp_e_text[0]);
+                  else
+                    tmp_e_text[0] = std::tolower (tmp_e_text[0]);
+                  evt = format_key_event (e_key, tmp_e_text, e_state);
                 }
+              else
+                {
+                  const char *e_text = Fl::event_text ();
+                  evt = format_key_event (e_key, e_text, e_state);
+                }
+
+              if (! fp.get_keyreleasefcn ().is_empty ()
+                  && (evt.contents ("Key").length () > 0))
+                fp.execute_keyreleasefcn (evt);
+              return 1;
             }
             break;
-
-          case FL_MOVE:
-            pixel2status (pixel2axes_or_ca (Fl::event_x (),
-                                            Fl::event_y () - menu_dy ()),
-                          Fl::event_x (), Fl::event_y () - menu_dy ());
-            break;
-
-          case FL_PUSH:
-            pos_x = Fl::event_x ();
-            pos_y = Fl::event_y () - menu_dy ();
+          }
 
-            set_currentpoint (Fl::event_x (), Fl::event_y () - menu_dy ());
-
-            gh = pixel2axes_or_ca (pos_x, pos_y);
-
-            if (gh.ok ())
-              {
-                ax_obj = gh_manager::get_object (gh);
-                set_axes_currentpoint (ax_obj, pos_x, pos_y);
-              }
-
-            fp.execute_windowbuttondownfcn (Fl::event_button());
-
-            if (Fl::event_button () == 1 || Fl::event_button () == 3)
+        // Events we only handle if they are in the canvas area.
+        if (Fl::event_inside (canvas))
+          switch (event)
+            {
+            case FL_MOVE:
+              pixel2status (pixel2axes_or_ca (Fl::event_x (),
+                                              Fl::event_y () - menu_dy ()),
+                            Fl::event_x (), Fl::event_y () - menu_dy ());
               return 1;
 
-            break;
+            case FL_PUSH:
+              pos_x = Fl::event_x ();
+              pos_y = Fl::event_y () - menu_dy ();
+
+              set_currentpoint (pos_x, pos_y);
 
-          case FL_DRAG:
-            if (fp.get_windowbuttonmotionfcn ().is_defined ())
-              {
-                set_currentpoint (Fl::event_x (), Fl::event_y () - menu_dy ());
-                fp.execute_windowbuttonmotionfcn ();
-              }
+              if (Fl::event_clicks ())
+                fp.set_selectiontype ("open");
+              else if (Fl::event_button () == FL_MIDDLE_MOUSE
+                       || (Fl::event_button () == FL_LEFT_MOUSE
+                           && Fl::event_shift ()))
+                fp.set_selectiontype ("extend");
+              else if (Fl::event_button () == FL_RIGHT_MOUSE
+                       || (Fl::event_button () == FL_LEFT_MOUSE
+                           && Fl::event_ctrl ()))
+                fp.set_selectiontype ("alt");
+              else
+                fp.set_selectiontype ("normal");
+
+              gh = pixel2axes_or_ca (pos_x, pos_y);
+
+              if (gh.ok ())
+                {
+                  ax_obj = gh_manager::get_object (gh);
+                  set_axes_currentpoint (ax_obj, pos_x, pos_y);
+                }
+
+              // Ensure windowbuttondownfcn is called after currentpoint
+              // is updated but before calling buttondownfcn.
+              if (! fp.get_windowbuttondownfcn ().is_empty ())
+                fp.execute_windowbuttondownfcn (Fl::event_button ());
+
+              if (gh.ok ())
+                {
+                  int ndim = calc_dimensions (ax_obj);
 
-            if (Fl::event_button () == 1)
-              {
-                if (ax_obj && ax_obj.isa ("axes"))
-                  {
-                    if (gui_mode == pan_zoom)
-                      pixel2status (ax_obj, pos_x, pos_y,
-                                    Fl::event_x (),
-                                    Fl::event_y () - menu_dy ());
-                    else
-                      view2status (ax_obj);
-                    axes::properties& ap =
-                      dynamic_cast<axes::properties&>
-                      (ax_obj.get_properties ());
+                  if (ndim == 3)
+                    rotate->activate ();
+                  else // ndim == 2
+                    rotate->deactivate ();
+
+                  fp.set_currentobject (ax_obj.get_handle ().value ());
+
+                  base_properties& props = ax_obj.get_properties ();
+                  if (! props.get_buttondownfcn ().is_empty ())
+                    props.execute_buttondownfcn (Fl::event_button ());
+
+                  return 1;
+                }
+              else if (! fp.get_buttondownfcn ().is_empty ())
+                fp.execute_buttondownfcn (Fl::event_button ());
+
+              break;
 
-                    double x0, y0, x1, y1;
-                    Matrix pos = fp.get_boundingbox (true);
-                    pixel2pos (ax_obj, pos_x, pos_y, x0, y0);
-                    pixel2pos (ax_obj, Fl::event_x (),
-                                       Fl::event_y () - menu_dy (),
-                                       x1, y1);
+            case FL_DRAG:
+              if (! fp.get_windowbuttonmotionfcn ().is_empty ())
+                {
+                  set_currentpoint (Fl::event_x (), Fl::event_y () - menu_dy ());
+                  fp.execute_windowbuttonmotionfcn ();
+                }
+
+              if (Fl::event_button () == 1)
+                {
+                  if (ax_obj && ax_obj.isa ("axes"))
+                    {
+                      axes::properties& ap =
+                        dynamic_cast<axes::properties&>
+                        (ax_obj.get_properties ());
+
+                      // Don't pan or rotate legend
+                      if (ap.get_tag ().compare ("legend") < 0)
+                        {
+                          if (rotate_enabled ())
+                            view2status (ax_obj);
+                          else
+                            pixel2status (ax_obj, pos_x, pos_y,
+                                          Fl::event_x (),
+                                          Fl::event_y () - menu_dy ());
 
-                    if (gui_mode == pan_zoom)
-                      ap.translate_view (x0, x1, y0, y1);
-                    else if (gui_mode == rotate_zoom)
-                      {
-                        double daz, del;
-                        daz = (Fl::event_x () - pos_x) / pos(2) * 360;
-                        del = (Fl::event_y () - menu_dy () - pos_y)
-                              / pos(3) * 360;
-                        ap.rotate_view (del, daz);
-                      }
+                          double x0, y0, x1, y1;
+                          Matrix pos = fp.get_boundingbox (true);
+                          pixel2pos (ax_obj, pos_x, pos_y, x0, y0);
+                          pixel2pos (ax_obj, Fl::event_x (),
+                                     Fl::event_y () - menu_dy (),
+                                     x1, y1);
+
+                          if (pan_enabled ())
+                          {
+                            std::string mode = pan_mode ();
+
+                            ap.translate_view (mode, x0, x1, y0, y1);
+                          }
+                          else if (rotate_enabled ())
+                            {
+                              double daz, del;
+                              daz = (Fl::event_x () - pos_x) / pos(2) * 360;
+                              del = (Fl::event_y () - menu_dy () - pos_y)
+                                    / pos(3) * 360;
+                              ap.rotate_view (del, daz);
+                            }
+                        }
+                      else
+                        {
+                          // move the position of the legend
+                          Matrix pos = ap.get_position ().matrix_value ();
+                          pos(0) += double (Fl::event_x () - pos_x)
+                                    / canvas->w ();
+                          pos(1) -= double (Fl::event_y () - menu_dy () - pos_y)
+                                    / canvas->h ();
+                          ap.set_position (pos);
+                        }
 
-                    pos_x = Fl::event_x ();
-                    pos_y = Fl::event_y () - menu_dy ();
+                      pos_x = Fl::event_x ();
+                      pos_y = Fl::event_y () - menu_dy ();
+                      mark_modified ();
+                    }
+                  return 1;
+                }
+              else if (Fl::event_button () == 3)
+                {
+                  pixel2status (ax_obj, pos_x, pos_y,
+                                Fl::event_x (), Fl::event_y () - menu_dy ());
+                  Matrix zoom_box (1,4,0);
+                  zoom_box (0) = pos_x;
+                  zoom_box (1) = pos_y;
+                  zoom_box (2) =  Fl::event_x ();
+                  zoom_box (3) =  Fl::event_y () - menu_dy ();
+                  canvas->set_zoom_box (zoom_box);
+                  canvas->zoom (true);
+                  mark_modified ();
+                  return 1;
+                }
+
+              break;
+
+            case FL_MOUSEWHEEL:
+              {
+                graphics_object ax =
+                  gh_manager::get_object (pixel2axes_or_ca (Fl::event_x (),
+                                          Fl::event_y ()
+                                          - menu_dy ()));
+                if (ax && ax.isa ("axes"))
+                  {
+                    axes::properties& ap =
+                      dynamic_cast<axes::properties&> (ax.get_properties ());
+
+                    // Control how fast to zoom when using scroll wheel.
+                    double wheel_zoom_speed = ap.get_mousewheelzoom ();
+
+                    // Determine if we're zooming in or out.
+                    const double factor = (Fl::event_dy () < 0
+                                           ? 1 / (1.0 - wheel_zoom_speed)
+                                           : 1.0 - wheel_zoom_speed);
+
+
+                    // Get the point we're zooming about.
+                    double x1, y1;
+                    pixel2pos (ax, Fl::event_x (), Fl::event_y () - menu_dy (),
+                               x1, y1);
+
+                    // FIXME: should we only zoom about point for 2D plots?
+
+                    ap.zoom_about_point ("both", x1, y1, factor, false);
                     mark_modified ();
+                    return 1;
                   }
-                return 1;
-              }
-            else if (Fl::event_button () == 3)
-              {
-                pixel2status (ax_obj, pos_x, pos_y,
-                              Fl::event_x (), Fl::event_y () - menu_dy ());
-                Matrix zoom_box (1,4,0);
-                zoom_box (0) = pos_x;
-                zoom_box (1) = pos_y;
-                zoom_box (2) =  Fl::event_x ();
-                zoom_box (3) =  Fl::event_y () - menu_dy ();
-                canvas->set_zoom_box (zoom_box);
-                canvas->zoom (true);
-                canvas->redraw ();
               }
 
-            break;
-
-          case FL_MOUSEWHEEL:
-            {
-              graphics_object ax =
-                gh_manager::get_object (pixel2axes_or_ca (Fl::event_x (),
-                                                          Fl::event_y ()
-                                                          - menu_dy ()));
-              if (ax && ax.isa ("axes"))
+            case FL_RELEASE:
+              if (! fp.get_windowbuttonupfcn ().is_empty ())
                 {
-                  axes::properties& ap =
-                    dynamic_cast<axes::properties&> (ax.get_properties ());
-
-                  // Determine if we're zooming in or out.
-                  const double factor =
-                    (Fl::event_dy () > 0) ? 1 / (1.0 - Vwheel_zoom_speed)
-                                          : 1.0 - Vwheel_zoom_speed;
-
-                  // Get the point we're zooming about.
-                  double x1, y1;
-                  pixel2pos (ax, Fl::event_x (), Fl::event_y () - menu_dy (),
-                             x1, y1);
-
-                  ap.zoom_about_point (x1, y1, factor, false);
-                  mark_modified ();
+                  set_currentpoint (Fl::event_x (), Fl::event_y () - menu_dy ());
+                  fp.execute_windowbuttonupfcn ();
                 }
-            }
-            return 1;
-
-          case FL_RELEASE:
-            if (fp.get_windowbuttonupfcn ().is_defined ())
-              {
-                set_currentpoint (Fl::event_x (), Fl::event_y () - menu_dy ());
-                fp.execute_windowbuttonupfcn ();
-              }
 
-            if (Fl::event_button () == 1)
-              {
-                if ( Fl::event_clicks () == 1)
-                  {
-                    if (ax_obj && ax_obj.isa ("axes"))
-                      {
-                        axes::properties& ap = dynamic_cast<axes::properties&>
-                                               (ax_obj.get_properties ());
-                        ap.set_xlimmode ("auto");
-                        ap.set_ylimmode ("auto");
-                        ap.set_zlimmode ("auto");
-                        mark_modified ();
-                      }
-                  }
-              }
-            if (Fl::event_button () == 3)
-              {
-                // End of drag -- zoom.
-                if (canvas->zoom ())
-                  {
-                    canvas->zoom (false);
-                    double x0,y0,x1,y1;
-                    if (ax_obj && ax_obj.isa ("axes"))
-                      {
-                        axes::properties& ap = dynamic_cast<axes::properties&>
-                                               (ax_obj.get_properties ());
-                        pixel2pos (ax_obj, pos_x, pos_y, x0, y0);
-                        int pos_x1 = Fl::event_x ();
-                        int pos_y1 = Fl::event_y () - menu_dy ();
-                        pixel2pos (ax_obj, pos_x1, pos_y1, x1, y1);
-                        Matrix xl (1,2,0);
-                        Matrix yl (1,2,0);
-                        int dx = abs (pos_x - pos_x1);
-                        int dy = abs (pos_y - pos_y1);
-                        // Smallest zoom box must be 4 pixels square
-                        if ((dx > 4) && (dy > 4))
-                          {
-                            if (x0 < x1)
-                              {
-                                xl(0) = x0;
-                                xl(1) = x1;
-                              }
-                            else
-                              {
-                                xl(0) = x1;
-                                xl(1) = x0;
-                              }
-                            if (y0 < y1)
-                              {
-                                yl(0) = y0;
-                                yl(1) = y1;
-                              }
-                            else
-                              {
-                                yl(0) = y1;
-                                yl(1) = y0;
-                              }
-                            ap.zoom (xl, yl);
-                          }
-                        mark_modified ();
-                      }
-                  }
-              }
-            break;
-          }
+              if ((Fl::event_button () == 1) && Fl::event_clicks ())
+                {
+                  // Double click
+                  set_on_ax_obj ("xlimmode", "auto");
+                  set_on_ax_obj ("ylimmode", "auto");
+                  set_on_ax_obj ("zlimmode", "auto");
+                  mark_modified ();
+                  return 1;
+                }
+              if (Fl::event_button () == 3)
+                {
+                  // End of drag -- zoom.
+                  if (canvas->zoom ())
+                    {
+                      canvas->zoom (false);
+                      double x0,y0,x1,y1;
+                      if (ax_obj && ax_obj.isa ("axes"))
+                        {
+                          axes::properties& ap = dynamic_cast<axes::properties&>
+                                                 (ax_obj.get_properties ());
+                          pixel2pos (ax_obj, pos_x, pos_y, x0, y0);
+                          int pos_x1 = Fl::event_x ();
+                          int pos_y1 = Fl::event_y () - menu_dy ();
+                          pixel2pos (ax_obj, pos_x1, pos_y1, x1, y1);
+                          Matrix xl (1,2,0);
+                          Matrix yl (1,2,0);
+                          int dx = abs (pos_x - pos_x1);
+                          int dy = abs (pos_y - pos_y1);
+                          // Smallest zoom box must be 4 pixels square
+                          if ((dx > 4) && (dy > 4))
+                            {
+                              if (x0 < x1)
+                                {
+                                  xl(0) = x0;
+                                  xl(1) = x1;
+                                }
+                              else
+                                {
+                                  xl(0) = x1;
+                                  xl(1) = x0;
+                                }
+                              if (y0 < y1)
+                                {
+                                  yl(0) = y0;
+                                  yl(1) = y1;
+                                }
+                              else
+                                {
+                                  yl(0) = y1;
+                                  yl(1) = y0;
+                                }
+                              ap.zoom ("both", xl, yl);
+                            }
+                          mark_modified ();
+                          return 1;
+                        }
+                    }
+                }
+              break;
+            }
       }
-
-    return retval;
+    //std::cout << "plot_window::handle wasn't interested in event " <<  fl_eventnames[event] << std::endl;
+    return Fl_Window::handle (event);
   }
 };
 
@@ -1655,16 +1884,19 @@
       instance->do_update_canvas (hnd2idx (gh), ca);
   }
 
-  static void toggle_menubar_visibility (int fig_idx, bool menubar_is_figure)
+  static void update_boundingbox (const std::string& fig_idx_str,
+                                  bool internal)
   {
     if (instance_ok ())
-      instance->do_toggle_menubar_visibility (fig_idx, menubar_is_figure);
+      instance->do_update_boundingbox (str2idx (fig_idx_str), internal);
   }
 
   static void toggle_menubar_visibility (const std::string& fig_idx_str,
                                          bool menubar_is_figure)
   {
-    toggle_menubar_visibility (str2idx (fig_idx_str), menubar_is_figure);
+    if (instance_ok ())
+      instance->do_toggle_menubar_visibility (str2idx (fig_idx_str),
+                                              menubar_is_figure);
   }
 
 private:
@@ -1700,16 +1932,24 @@
 
     if (idx >= 0 && windows.find (idx) == windows.end ())
       {
-        Matrix pos = fp.get_boundingbox (true);
-
-        int x = pos(0);
-        int y = pos(1);
-        int w = pos(2);
-        int h = pos(3);
+        Matrix pos = fp.get_outerposition ().matrix_value ();
+        bool internal = false;
+        // check if figure::properties::outerposition is default -1.0
+        if (pos(2) != -1.0 && pos(3) != -1.0)
+          {
+            pos = fp.get_boundingbox (internal);
+          }
+        else
+          {
+            // use position
+            internal = true;
+            pos = fp.get_boundingbox (internal);
+          }
 
         idx2figprops (curr_index, fp);
 
-        windows[curr_index++] = new plot_window (x, y, w, h, fp);
+        windows[curr_index++] = new plot_window (pos(0), pos(1), pos(2), pos(3),
+                                                 fp, internal);
       }
   }
 
@@ -1739,11 +1979,13 @@
     if (win != windows.end ())
       {
         if (is_visible)
-          win->second->show ();
+          {
+            win->second->show ();
+            win->second->show_canvas ();
+          }
         else
           win->second->hide ();
 
-        win->second->redraw ();
       }
   }
 
@@ -1767,7 +2009,9 @@
     wm_iterator win = windows.find (idx);
 
     if (win != windows.end ())
-      win->second->mark_modified ();
+      {
+        win->second->mark_modified ();
+      }
   }
 
   void do_set_name (int idx)
@@ -1822,6 +2066,14 @@
       }
   }
 
+  void do_update_boundingbox (int idx, bool internal)
+  {
+    wm_iterator win = windows.find (idx);
+
+    if (win != windows.end ())
+      win->second->update_boundingbox (internal);
+  }
+
   static int str2idx (const caseless_str& clstr)
   {
     int ind;
@@ -1882,47 +2134,15 @@
 
 static bool toolkit_loaded = false;
 
-static int
-__fltk_redraw__ (void)
-{
-  if (toolkit_loaded)
-    {
-      // We scan all figures and add those which use FLTK.
-      graphics_object obj = gh_manager::get_object (0);
-      if (obj && obj.isa ("root"))
-        {
-          base_properties& props = obj.get_properties ();
-          Matrix children = props.get_all_children ();
-
-          for (octave_idx_type n = 0; n < children.numel (); n++)
-            {
-              graphics_object fobj = gh_manager::get_object (children (n));
-              if (fobj && fobj.isa ("figure"))
-                {
-                  figure::properties& fp =
-                    dynamic_cast<figure::properties&> (fobj.get_properties ());
-                  if (fp.get___graphics_toolkit__ ()
-                      == FLTK_GRAPHICS_TOOLKIT_NAME)
-                    figure_manager::new_window (fp);
-                }
-            }
-        }
-
-      // it seems that we have to call Fl::check twice to get everything drawn
-      Fl::check ();
-      Fl::check ();
-    }
-
-  return 0;
-}
-
 class fltk_graphics_toolkit : public base_graphics_toolkit
 {
 public:
   fltk_graphics_toolkit (void)
     : base_graphics_toolkit (FLTK_GRAPHICS_TOOLKIT_NAME),
       input_event_hook_fcn_id ()
-  { }
+  {
+    Fl::visual (FL_RGB);
+  }
 
   ~fltk_graphics_toolkit (void) { }
 
@@ -1966,7 +2186,7 @@
                        (go.get_properties ()).get_fltk_label ()
                        + "/"
                        + fltk_label;
-        else if (go.isa ("figure"))
+        else if (go.isa ("figure") || go.isa ("uicontextmenu"))
           ;
         else
           error ("unexpected parent object\n");
@@ -2016,6 +2236,14 @@
                   figure_manager::set_name (tmp);
                 }
                 break;
+
+              case figure::properties::ID_POSITION:
+                figure_manager::update_boundingbox (ov.string_value (), true);
+                break;
+
+              case figure::properties::ID_OUTERPOSITION:
+                figure_manager::update_boundingbox (ov.string_value (), false);
+                break;
               }
           }
       }
@@ -2031,9 +2259,29 @@
 
   void redraw_figure (const graphics_object& go) const
   {
-    figure_manager::mark_modified (go.get_handle ());
+    // We scan all figures and add those which use FLTK.
+    graphics_object obj = gh_manager::get_object (0);
+    if (obj && obj.isa ("root"))
+      {
+        base_properties& props = obj.get_properties ();
+        Matrix children = props.get_all_children ();
 
-    __fltk_redraw__ ();
+        for (octave_idx_type n = 0; n < children.numel (); n++)
+          {
+            graphics_object fobj = gh_manager::get_object (children (n));
+            if (fobj && fobj.isa ("figure"))
+              {
+                figure::properties& fp =
+                  dynamic_cast<figure::properties&> (fobj.get_properties ());
+                if (fp.get___graphics_toolkit__ ()
+                    == FLTK_GRAPHICS_TOOLKIT_NAME)
+                  figure_manager::new_window (fp);
+              }
+          }
+      }
+
+    figure_manager::mark_modified (go.get_handle ());
+    Fl::check ();
   }
 
   void print_figure (const graphics_object& go,
@@ -2042,7 +2290,6 @@
                      const std::string& /*debug_file*/) const
   {
     figure_manager::print (go.get_handle (), file_cmd, term);
-    redraw_figure (go);
   }
 
   Matrix get_canvas_size (const graphics_handle& fh) const
@@ -2050,11 +2297,16 @@
     return figure_manager::get_size (fh);
   }
 
+/*
   double get_screen_resolution (void) const
   {
     // FLTK doesn't give this info.
     return 72.0;
+
+    // FIXME: FLTK >= 1.3.0 could do this with  Fl::screen_dpi (h, v, n)
+    // but do we need it?
   }
+*/
 
   Matrix get_screen_size (void) const
   {
@@ -2070,16 +2322,12 @@
       {
         munlock ("__init_fltk__");
 
-        figure_manager::close_all ();
-
         octave_value_list args = input_event_hook_fcn_id;
         args.append (false);
         Fremove_input_event_hook (args, 0);
-
         input_event_hook_fcn_id = octave_value_list ();
 
-        // FIXME: ???
-        Fl::wait (fltk_maxtime);
+        figure_manager::close_all ();
       }
   }
 
@@ -2094,16 +2342,19 @@
 
 #endif
 
-DEFUN_DLD (__fltk_redraw__, , ,
+DEFUN_DLD (__fltk_check__, , ,
            "-*- texinfo -*-\n\
-@deftypefn {Loadable Function} {} __fltk_redraw__ ()\n\
-Undocumented internal function.\n\
+@deftypefn {Loadable Function} {} __fltk_check__ ()\n\
+Undocumented internal function.  Calls Fl::check ()\n\
 @end deftypefn")
 {
 #ifdef HAVE_FLTK
-  __fltk_redraw__ ();
+  Fl::check ();
+
+  if (Vdrawnow_requested)
+    Fdrawnow ();
 #else
-  error ("__fltk_redraw__: not available without OpenGL and FLTK libraries");
+  error ("__fltk_check__: not available without OpenGL and FLTK libraries");
 #endif
 
   return octave_value ();
@@ -2129,8 +2380,8 @@
       gtk_manager::load_toolkit (tk);
       toolkit_loaded = true;
 
-      octave_value fcn (new octave_builtin (F__fltk_redraw__));
-      octave_value fcn_handle (new octave_fcn_handle (fcn, "@__fltk_redraw__"));
+      octave_value fcn (new octave_builtin (F__fltk_check__));
+      octave_value fcn_handle (new octave_fcn_handle (fcn, "@__fltk_check__"));
       octave_value_list id = Fadd_input_event_hook (fcn_handle, 1);
 
       fltk->set_input_event_hook_id (id);
@@ -2142,31 +2393,6 @@
   return octave_value ();
 }
 
-DEFUN_DLD (__fltk_maxtime__, args, ,
-           "-*- texinfo -*-\n\
-@deftypefn  {Loadable Function} {@var{maxtime} =} __fltk_maxtime__ ()\n\
-@deftypefnx {Loadable Function} {} __fltk_maxtime__ (@var{maxtime})\n\
-Undocumented internal function.\n\
-@end deftypefn")
-{
-#ifdef HAVE_FLTK
-  octave_value retval = fltk_maxtime;
-
-  if (args.length () == 1)
-    {
-      if (args(0).is_real_scalar ())
-        fltk_maxtime = args(0).double_value ();
-      else
-        error ("argument must be a real scalar");
-    }
-
-  return retval;
-#else
-  error ("__fltk_maxtime__: not available without OpenGL and FLTK libraries");
-  return octave_value ();
-#endif
-}
-
 DEFUN_DLD (__have_fltk__, , ,
            "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{FLTK_available} =} __have_fltk__ ()\n\
@@ -2183,101 +2409,3 @@
 
   return retval;
 }
-
-// FIXME: This function should be abstracted and made potentially
-// available to all graphics toolkits.  This suggests putting it in
-// graphics.cc as is done for drawnow() and having the master
-// mouse_wheel_zoom function call fltk_mouse_wheel_zoom.  The same
-// should be done for gui_mode and fltk_gui_mode.  For now (2011.01.30),
-// just changing function names and docstrings.
-
-DEFUN_DLD (mouse_wheel_zoom, args, nargout,
-           "-*- texinfo -*-\n\
-@deftypefn  {Loadable Function} {@var{val} =} mouse_wheel_zoom ()\n\
-@deftypefnx {Loadable Function} {@var{old_val} =} mouse_wheel_zoom (@var{new_val})\n\
-@deftypefnx {Loadable Function} {} mouse_wheel_zoom (@var{new_val}, \"local\")\n\
-Query or set the mouse wheel zoom factor.\n\
-\n\
-The zoom factor is a number in the range (0,1) which is the percentage of the\n\
-current axis limits that will be used when zooming.  For example, if the\n\
-current x-axis limits are [0, 50] and @code{mouse_wheel_zoom} is 0.4 (40%),\n\
-then a zoom operation will change the limits by 20.\n\
-\n\
-When called from inside a function with the @qcode{\"local\"} option, the\n\
-variable is changed locally for the function and any subroutines it calls.  \n\
-The original variable value is restored when exiting the function.\n\
-\n\
-This function is currently implemented only for the FLTK graphics toolkit.\n\
-@seealso{gui_mode}\n\
-@end deftypefn")
-{
-#ifdef HAVE_FLTK
-  return SET_INTERNAL_VARIABLE_WITH_LIMITS(wheel_zoom_speed, 0.0001, 0.9999);
-#else
-  error ("mouse_wheel_zoom: not available without OpenGL and FLTK libraries");
-  return octave_value ();
-#endif
-}
-
-DEFUN_DLD (gui_mode, args, ,
-           "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{mode} =} gui_mode ()\n\
-@deftypefnx {Built-in Function} {} gui_mode (@var{mode})\n\
-Query or set the GUI mode for the current graphics toolkit.\n\
-The @var{mode} argument can be one of the following strings:\n\
-\n\
-@table @asis\n\
-@item @qcode{\"2d\"}\n\
-Allows panning and zooming of current axes.\n\
-\n\
-@item @qcode{\"3d\"}\n\
-Allows rotating and zooming of current axes.\n\
-\n\
-@item @qcode{\"none\"}\n\
-Mouse inputs have no effect.\n\
-@end table\n\
-\n\
-This function is currently implemented only for the FLTK graphics toolkit.\n\
-@seealso{mouse_wheel_zoom}\n\
-@end deftypefn")
-{
-#ifdef HAVE_FLTK
-  caseless_str mode_str;
-
-  if (gui_mode == pan_zoom)
-    mode_str = "2d";
-  else if (gui_mode == rotate_zoom)
-    mode_str = "3d";
-  else
-    mode_str = "none";
-
-  bool failed = false;
-
-  if (args.length () == 1)
-    {
-      if (args(0).is_string ())
-        {
-          mode_str = args(0).string_value ();
-
-          if (mode_str.compare ("2d"))
-            gui_mode = pan_zoom;
-          else if (mode_str.compare ("3d"))
-            gui_mode = rotate_zoom;
-          else if (mode_str.compare ("none"))
-            gui_mode = none;
-          else
-            failed = true;
-        }
-      else
-        failed = true;
-    }
-
-  if (failed)
-    error ("MODE must be one of the strings: \"2D\", \"3D\", or \"none\"");
-
-  return octave_value (mode_str);
-#else
-  error ("gui_mode: not available without OpenGL and FLTK libraries");
-  return octave_value ();
-#endif
-}
--- a/libinterp/dldfcn/__init_gnuplot__.cc
+++ b/libinterp/dldfcn/__init_gnuplot__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,11 +36,15 @@
 #include "builtins.h"
 #include "defun-dld.h"
 #include "error.h"
+#include "file-stat.h"
 #include "graphics.h"
+#include "oct-conf.h"
+#include "oct-env.h"
 #include "parse.h"
+#include "utils.h"
 #include "variables.h"
 
-// PKG_ADD: register_graphics_toolkit ("gnuplot");
+// PKG_ADD: if (__have_gnuplot__ ()) register_graphics_toolkit ("gnuplot"); endif
 
 static bool toolkit_loaded = false;
 
@@ -166,13 +170,41 @@
   }
 };
 
-// Initialize the fltk graphics toolkit.
+static bool
+have_gnuplot_binary (void)
+{
+  const std::string exeext = std::string (OCTAVE_CONF_EXEEXT);
+  const std::string path = octave_env::getenv ("PATH");
+
+  octave_value_list tmp = feval ("gnuplot_binary", octave_value_list ());
+  std::string gnuplot_binary = tmp(0).string_value ();
+
+  string_vector args (gnuplot_binary);
+  std::string gnuplot_path = search_path_for_file (path, args);
+
+  file_stat fs (gnuplot_path);
+
+  if (! fs.exists () && ! exeext.empty ())
+    {
+      args[0] += exeext;
+
+      gnuplot_path = search_path_for_file (path, args);
+
+      fs = file_stat (gnuplot_path);
+    }
+
+  return fs.exists ();
+}
+
+// Initialize the gnuplot graphics toolkit.
 
 DEFUN_DLD (__init_gnuplot__, , , "")
 {
   octave_value retval;
 
-  if (! toolkit_loaded)
+  if (! have_gnuplot_binary ())
+    error ("__init_gnuplot__: the gnuplot program is not available, see 'gnuplot_binary'");
+  else if (! toolkit_loaded)
     {
       mlock ();
 
@@ -185,3 +217,16 @@
   return retval;
 }
 
+DEFUN_DLD (__have_gnuplot__, , ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{gnuplot_available} =} __have_gnuplot__ ()\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  retval = have_gnuplot_binary ();
+
+  return retval;
+}
+
--- a/libinterp/dldfcn/__magick_read__.cc
+++ b/libinterp/dldfcn/__magick_read__.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 Carnë Draug
-Copyright (C) 2002-2013 Andy Adler
+Copyright (C) 2013-2015 Carnë Draug
+Copyright (C) 2002-2015 Andy Adler
 Copyright (C) 2008 Thomas L. Scofield
 Copyright (C) 2010 David Grundberg
 
@@ -710,8 +710,9 @@
       setlocale (LC_ALL, locale.c_str ());
 
       if (QuantumDepth < 32)
-        warning ("your version of %s limits images to %d bits per pixel",
-                 MagickPackageName, QuantumDepth);
+        warning_with_id ("Octave:GraphicsMagic-Quantum-Depth",
+                         "your version of %s limits images to %d bits per pixel",
+                         MagickPackageName, QuantumDepth);
 
       initialized = true;
     }
@@ -800,8 +801,8 @@
     const octave_idx_type n = frameidx.nelem ();
     for (octave_idx_type frame = 0; frame < n; frame++)
       {
-        if (nRows != imvec[frameidx(frame)].rows () ||
-            nCols != imvec[frameidx(frame)].columns ())
+        if (nRows != imvec[frameidx(frame)].rows ()
+            || nCols != imvec[frameidx(frame)].columns ())
           {
             error ("imread: all frames must have the same size but frame %i is different",
                    frameidx(frame) +1);
@@ -1108,8 +1109,8 @@
               {
                 for (octave_idx_type row = 0; row < nRows; row++)
                   {
-                    Magick::Color c;
-                    c.redQuantum (double (*img_fvec) / divisor);
+                    const double grey = double (*img_fvec) / divisor;
+                    Magick::Color c (grey, grey, grey);
                     pix[GM_idx] = c;
                     img_fvec++;
                     GM_idx += nCols;
@@ -1492,8 +1493,10 @@
   const octave_idx_type nFrames = imvec.size ();
 
   const octave_idx_type quality = options.getfield ("quality").int_value ();
-  const ColumnVector delaytime = options.getfield ("delaytime").column_vector_value ();
-  const Array<std::string> disposalmethod = options.getfield ("disposalmethod").cellstr_value ();
+  const ColumnVector delaytime =
+    options.getfield ("delaytime").column_vector_value ();
+  const Array<std::string> disposalmethod =
+    options.getfield ("disposalmethod").cellstr_value ();
   for (octave_idx_type i = 0; i < nFrames; i++)
     {
       imvec[i].quality (quality);
@@ -1870,7 +1873,7 @@
     "Copyright",          // actually an Exif tag
     "DigitalCamera",
     "GPSInfo",
-    // Notes for the future: GM allows to get many attributes, and even has
+    // Notes for the future: GM allows one to get many attributes, and even has
     // attribute() to obtain arbitrary ones, that may exist in only some
     // cases. The following is a list of some methods and into what possible
     // Matlab compatible values they may be converted.
new file mode 100644
--- /dev/null
+++ b/libinterp/dldfcn/__osmesa_print__.cc
@@ -0,0 +1,297 @@
+/*
+
+Copyright (C) 2015 Andreas Weber <andy.weber.aw@gmail.com>
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+This code is based on Brian Pauls' src/osdemos/osdemo.c
+from git://anongit.freedesktop.org/mesa/demos
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "oct-locbuf.h"
+#include "unwind-prot.h"
+
+#include "defun-dld.h"
+#include "gl-render.h"
+#include "gl2ps-renderer.h"
+#include "graphics.h"
+#include "gripes.h"
+
+#if defined (HAVE_OSMESA_H)
+#include "osmesa.h"
+#elif defined (HAVE_GL_OSMESA_H)
+#include "GL/osmesa.h"
+#endif
+
+#if defined (HAVE_OSMESA) && defined (HAVE_OPENGL)
+static void
+close_fcn (FILE *f)
+{
+  gnulib::fclose (f);
+}
+
+static void
+reset_visibility (figure::properties *fp)
+{
+  fp->set_visible ("on");
+}
+#endif
+
+DEFUN_DLD(__osmesa_print__, args, ,
+          "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {} __osmesa_print__ (@var{h}, @var{file}, @var{term})\n\
+@deftypefnx {Loadable Function} {@var{img} =} __osmesa_print__ (@var{h})\n\
+Print figure @var{h} using OSMesa and gl2ps for vector formats.\n\
+\n\
+This is a private internal function.\n\
+\n\
+The first method calls gl2ps with the appropriate @var{term} and writes\n\
+the output of gl2ps to @var{file}.  If the first character of @var{file}\n\
+is @qcode{|}, then a process is started and the output of gl2ps is piped\n\
+to it.\n\
+\n\
+Valid options for @var{term}, which can be concatenated in one string, are:\n\
+\n\
+@table @asis\n\
+@item @qcode{eps}, @qcode{pdf}, @qcode{ps}, @qcode{svg}, @qcode{pgf}, @qcode{tex}\n\
+Select output format.\n\
+\n\
+@item @qcode{is2D}\n\
+Use GL2PS_SIMPLE_SORT instead of GL2PS_BSP_SORT as Z-depth sorting algorithm.\n\
+\n\
+@item @qcode{notext}\n\
+Don't render text.\n\
+@end table\n\
+\n\
+The second method doesn't use gl2ps and returns a RGB image in @var{img}\n\
+instead.\n\
+\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+#if ! defined (HAVE_OSMESA)
+  gripe_disabled_feature ("__osmesa_print__", "offscreen rendering");
+#else
+
+  int nargin = args.length ();
+
+  if (! (nargin == 1 || nargin == 3))
+    {
+      print_usage ();
+      return retval;
+    }
+
+  if (nargin == 3)
+    {
+      if (! (args(1).is_string () && args(2).is_string ()))
+        {
+          error ("__osmesa_print__: FILE and TERM must be strings");
+          return retval;
+        }
+
+#ifndef HAVE_GL2PS_H
+      error ("__osmesa_print__: Octave has been compiled without gl2ps");
+      return retval;
+#endif
+    }
+
+  int h = args(0).double_value ();
+  graphics_object fobj = gh_manager::get_object (h);
+  if (! (fobj && fobj.isa ("figure")))
+    {
+      error ("__osmesa_print__: H must be a valid figure handle");
+      return retval;
+    }
+
+  figure::properties& fp =
+    dynamic_cast<figure::properties&> (fobj.get_properties ());
+
+  bool internal = true;
+  Matrix bb = fp.get_boundingbox (internal);
+
+  GLsizei Width = static_cast<GLsizei> (bb(2));
+  GLsizei Height = static_cast<GLsizei> (bb(3));
+
+  // Create an RGBA-mode context, specify Z=16, stencil=0, accum=0 sizes
+  OSMesaContext ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, NULL);
+  if (! ctx)
+    {
+      error ("__osmesa_print__: OSMesaCreateContext failed!\n");
+      return retval;
+    }
+
+  // Allocate the image buffer
+  OCTAVE_LOCAL_BUFFER (GLubyte, buffer, 4 * Width * Height);
+
+  // Bind the buffer to the context and make it current
+  if (! OSMesaMakeCurrent (ctx, buffer, GL_UNSIGNED_BYTE, Width, Height))
+    {
+      error ("__osmesa_print__: OSMesaMakeCurrent failed!\n");
+      return retval;
+    }
+
+  // Test for a bug in OSMesa with version < 9.0
+  //
+  // Unfortunately the macros OSMESA_MAJOR_VERSION and OSMESA_MINOR_VERSION
+  // weren't updated between many releases and can't be used for detection.
+  // (Version 8.0 until 9.1.4 all return MAJOR 6, MINOR 5)
+  GLint z, s;
+  glGetIntegerv (GL_DEPTH_BITS, &z);
+  glGetIntegerv (GL_STENCIL_BITS, &s);
+  if (z != 16 || s != 0)
+    error ("__osmesa_print__: Depth and stencil doesn't match,"
+           " are you sure you are using OSMesa >= 9.0?");
+
+  unwind_protect outer_frame;
+
+  bool v = fp.is_visible ();
+
+  if (v)
+    {
+      outer_frame.add_fcn (reset_visibility, &fp);
+
+      fp.set_visible ("off");
+    }
+
+  if (nargin == 3)
+    {
+      // use gl2ps
+#ifndef HAVE_GL2PS_H
+      gripe_disabled_feature ("__osmesa_print__", "gl2ps");
+#else
+      std::string file = args(1).string_value ();
+      std::string term = args(2).string_value ();
+
+      if (! error_state)
+        {
+          size_t pos_p = file.find_first_of ("|");
+          size_t pos_c = file.find_first_not_of ("| ");
+
+          if (pos_p == std::string::npos && pos_c == std::string::npos)
+            error ("__osmesa_print__: empty output ''");
+          else if (pos_c == std::string::npos)
+            error ("__osmesa_print__: empty pipe '|'");
+          else if (pos_p != std::string::npos && pos_p < pos_c)
+            {
+              // create process and pipe gl2ps output to it
+              std::string cmd = file.substr (pos_c);
+              gl2ps_print (fobj, cmd, term);
+            }
+          else
+            {
+              // write gl2ps output directly to file
+              FILE *filep = gnulib::fopen (file.substr (pos_c).c_str (), "w");
+
+              if (filep)
+                {
+                  unwind_protect frame;
+
+                  frame.add_fcn (close_fcn, filep);
+
+                  glps_renderer rend (filep, term);
+                  rend.draw (fobj, "");
+
+                  // Make sure buffered commands are finished!!!
+                  glFinish ();
+                }
+              else
+                error ("__osmesa_print__: Couldn't create file \"%s\"", file.c_str ());
+            }
+        }
+#endif
+    }
+  else
+    {
+      // return RGB image
+      opengl_renderer rend;
+      rend.draw (fobj);
+
+      // Make sure buffered commands are finished!!!
+      glFinish ();
+
+      dim_vector dv (4, Width, Height);
+
+      // FIXME: We expect that GLubyte is 1 Byte long.
+      // Adapt code if this isn't always true
+      assert (sizeof (GLubyte) == 1);
+      uint8NDArray img (dv);
+      unsigned char *p = reinterpret_cast<unsigned char*>(img.fortran_vec ());
+      memcpy (p, buffer, (4 * Width * Height));
+
+      Array<octave_idx_type> perm (dim_vector (3, 1));
+      perm(0) = 2;
+      perm(1) = 1;
+      perm(2) = 0;
+
+      Array<idx_vector> idx (dim_vector (3, 1));
+
+      // Flip Y
+      idx(0) = idx_vector::make_range (Height - 1, -1, Height);
+      idx(1) = idx_vector::colon;
+
+      // Remove alpha channel
+      idx(2) = idx_vector (0, 3);
+      retval = octave_value (img.permute (perm). index(idx));
+    }
+
+  OSMesaDestroyContext (ctx);
+
+#endif
+  return retval;
+}
+
+/*
+## FIXME: osmesa does not work correctly on Windows platforms.
+##        This is not critical, since this facility will mostly be used in
+##        the future for generating the images in Octave's own documentation.
+##        For the moment, disable these tests on PC's and Macs.
+%!testif HAVE_OSMESA, HAVE_GL2PS_H
+%! if (isunix ())
+%!   h = figure ("visible", "off");
+%!   fn = tempname ();
+%!   sombrero ();
+%!   __osmesa_print__ (h, fn, "svg");
+%!   assert (stat (fn).size, 2692270, -0.1);
+%!   unlink (fn);
+%!   img = __osmesa_print__ (h);
+%!   assert (size (img), [get(h, "position")([4, 3]), 3])
+%!   ## Use pixel sum per RGB channel as fingerprint
+%!   img_fp = squeeze (sum (sum (img), 2));
+%!   assert (img_fp, [52942515; 54167797; 56158178], -0.05);
+%! endif
+
+%!testif HAVE_OSMESA, HAVE_GL2PS_H
+%! if (isunix ())
+%!   h = figure ("visible", "off");
+%!   fn = tempname ();
+%!   plot (sin (0:0.1:2*pi));
+%!   __osmesa_print__ (h, fn, "svgis2d");
+%!   assert (stat (fn).size, 7438, -0.1);
+%!   unlink (fn);
+%!   img = __osmesa_print__ (h);
+%!   assert (size (img), [get(h, "position")([4, 3]), 3])
+%!   ## Use pixel sum per RGB channel as fingerprint
+%!   img_fp = squeeze (sum (sum (img), 2));
+%!   assert (img_fp, [59281711; 59281711; 59482179], -0.05);
+%! endif
+*/
--- a/libinterp/dldfcn/__voronoi__.cc
+++ b/libinterp/dldfcn/__voronoi__.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 Kai Habel
+Copyright (C) 2000-2015 Kai Habel
 
 This file is part of Octave.
 
@@ -38,6 +38,7 @@
 
 #include <list>
 
+#include "oct-locbuf.h"
 #include "lo-ieee.h"
 
 #include "Cell.h"
--- a/libinterp/dldfcn/amd.cc
+++ b/libinterp/dldfcn/amd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 David Bateman
+Copyright (C) 2008-2015 David Bateman
 
 This file is part of Octave.
 
@@ -67,8 +67,8 @@
 @table @asis\n\
 @item @var{opts}.dense\n\
 Determines what @code{amd} considers to be a dense row or column of the\n\
-input matrix.  Rows or columns with more than @code{max(16, (dense *\n\
-sqrt (@var{n})} entries, where @var{n} is the order of the matrix @var{S},\n\
+input matrix.  Rows or columns with more than @code{max (16, (dense *\n\
+sqrt (@var{n})))} entries, where @var{n} is the order of the matrix @var{S},\n\
 are ignored by @code{amd} during the calculation of the permutation\n\
 The value of dense must be a positive scalar and its default value is 10.0\n\
 \n\
@@ -164,11 +164,11 @@
 
               // FIXME: how can we manage the memory allocation of amd
               //        in a cleaner manner?
-              amd_malloc = malloc;
-              amd_free = free;
-              amd_calloc = calloc;
-              amd_realloc = realloc;
-              amd_printf = printf;
+              SUITESPARSE_ASSIGN_FPTR (malloc_func, amd_malloc, malloc);
+              SUITESPARSE_ASSIGN_FPTR (free_func, amd_free, free);
+              SUITESPARSE_ASSIGN_FPTR (calloc_func, amd_calloc, calloc);
+              SUITESPARSE_ASSIGN_FPTR (realloc_func, amd_realloc, realloc);
+              SUITESPARSE_ASSIGN_FPTR (printf_func, amd_printf, printf);
 
               octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P,
                                                           Control, Info);
@@ -204,3 +204,19 @@
 
   return retval;
 }
+/*
+%!shared A, A2, opts
+%! A = ones (20, 30);
+%! A2 = ones (30, 30);
+%!
+%!testif HAVE_AMD
+%! assert(amd (A2), [1:30])
+%! opts.dense = 25;
+%! assert(amd (A2, opts), [1:30])
+%! opts.aggressive = 1;
+%! assert(amd (A2, opts), [1:30])
+
+%!error <matrix S must be square|not available in this version> amd (A)
+%!error amd (A2, 2)
+%!error <matrix S is corrupted|not available in this version> amd ([])
+*/
new file mode 100644
--- /dev/null
+++ b/libinterp/dldfcn/audiodevinfo.cc
@@ -0,0 +1,3266 @@
+/*
+
+Copyright (C) 2013-2015 Vytautas Jančauskas
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// <cstdint> requires c++11
+#include <stdint.h>
+
+#include <string>
+#include <vector>
+
+#include "mach-info.h"
+
+#include "defun-dld.h"
+#include "error.h"
+#include "gripes.h"
+#include "oct-locbuf.h"
+#include "oct-obj.h"
+#include "ov.h"
+#include "ov-int32.h"
+#include "ov-struct.h"
+#include "parse.h"
+#include "unwind-prot.h"
+
+#if defined (HAVE_PORTAUDIO)
+
+#include <portaudio.h>
+
+PaSampleFormat
+bits_to_format (int bits)
+{
+  if (bits == 8)
+    return paInt8;
+  else if (bits == 16)
+    return paInt16;
+  else if (bits == 24)
+    return paInt24;
+  else if (bits == 32)
+    return paInt32;
+  else if (bits == -1)
+    return paFloat32;
+  else
+    return 0;
+}
+
+#endif
+
+DEFUN_DLD (audiodevinfo, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{devinfo} =} audiodevinfo ()\n\
+\n\
+@deftypefnx {Loadable Function} {@var{devs} =} audiodevinfo (@var{io})\n\
+@deftypefnx {Loadable Function} {@var{name} =} audiodevinfo (@var{io}, @var{id})\n\
+@deftypefnx {Loadable Function} {@var{id} =} audiodevinfo (@var{io}, @var{name})\n\
+@deftypefnx {Loadable Function} {@var{id} =} audiodevinfo (@var{io}, @var{rate}, @var{bits}, @var{chans})\n\
+\n\
+@deftypefnx {Loadable Function} {@var{supports} =} audiodevinfo (@var{io}, @var{id}, @var{rate}, @var{bits}, @var{chans})\n\
+\n\
+Return a structure with fields \"input\" and \"output\".\n\
+The value of each field is a structure array with fields\n\
+\"Name\", @nospell{\"DriverVersion\"} and \"ID\" describing an audio device.\n\
+\n\
+If the optional argument @var{io} is 1, return information about input\n\
+devices only.  If it is 0, return information about output devices only.\n\
+\n\
+If the optional argument @var{id} is provided, return information about\n\
+corresponding device.\n\
+\n\
+If the optional argument @var{name} is provided, return the id of the\n\
+named device.\n\
+\n\
+Given a sampling rate, bits per sample, and number of channels for\n\
+an input or output device, return the ID of the first device that\n\
+supports playback or recording using the specified parameters.\n\
+\n\
+If also given a device ID, return true if the device supports playback\n\
+or recording using those parameters.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  int nargin = args.length ();
+
+  octave_scalar_map devinfo;
+  octave_value_list input;
+  octave_value_list output;
+
+  PaError err = Pa_Initialize ();
+
+  if (err != paNoError)
+    {
+      error ("audiodevinfo: PortAudio initialization failed");
+      return retval;
+    }
+
+  int num_devices = Pa_GetDeviceCount ();
+
+  if (num_devices < 0)
+    {
+      error ("audiodevinfo: no audio device found");
+      return retval;
+    }
+
+  octave_idx_type numinput = 0, numoutput = 0;
+  for (int i = 0; i < num_devices; i++)
+    {
+      const PaDeviceInfo *device_info = Pa_GetDeviceInfo (i);
+
+      if (! device_info)
+        {
+          warning ("Octave:invalid-audio-device",
+                   "invalid audio device ID = %d", i);
+          continue;
+        }
+
+      if (device_info->maxInputChannels != 0)
+        numinput++;
+
+      if (device_info->maxOutputChannels != 0)
+        numoutput++;
+    }
+
+  Cell input_name (dim_vector (1, numinput));
+  Cell input_driver_version (dim_vector (1, numinput));
+  Cell input_id (dim_vector (1, numinput));
+  Cell output_name (dim_vector (1, numoutput));
+  Cell output_driver_version (dim_vector (1, numoutput));
+  Cell output_id (dim_vector (1, numoutput));
+
+  octave_idx_type idx_i = 0, idx_o = 0;
+  for (int i = 0; i < num_devices; i++)
+    {
+      const PaDeviceInfo *device_info = Pa_GetDeviceInfo (i);
+
+      if (! device_info)
+        {
+          warning ("Octave:invalid-audio-device",
+                   "invalid audio device ID = %d", i);
+          continue;
+        }
+
+      const PaHostApiInfo *api_info = Pa_GetHostApiInfo (device_info->hostApi);
+
+      const char *driver = api_info ? api_info->name : "";
+
+      char name[128];
+      sprintf (name, "%s (%s)", device_info->name, driver);
+
+      if (device_info->maxInputChannels != 0)
+        {
+          input_name(idx_i) = name;
+          input_driver_version(idx_i) = driver;
+          input_id(idx_i) = i;
+          idx_i++;
+        }
+
+      if (device_info->maxOutputChannels != 0)
+        {
+          output_name(idx_o) = name;
+          output_driver_version(idx_o) = driver;
+          output_id(idx_o) = i;
+          idx_o++;
+        }
+    }
+
+  octave_map inputdev, outputdev;
+  inputdev.setfield ("Name", input_name);
+  inputdev.setfield ("DriverVersion", input_driver_version);
+  inputdev.setfield ("ID", input_id);
+  outputdev.setfield ("Name", output_name);
+  outputdev.setfield ("DriverVersion", output_driver_version);
+  outputdev.setfield ("ID", output_id);
+  devinfo.setfield ("input", inputdev);
+  devinfo.setfield ("output", outputdev);
+
+  // Return information about input and output audio devices and
+  // their properties.
+  if (nargin == 0)
+    retval = devinfo;
+  // Return the number of input or output devices
+  else if (nargin == 1)
+    {
+      if (args(0).int_value () == 0)
+        retval = numoutput;
+      else if (args(0).int_value () == 1)
+        retval = numinput;
+      else
+        {
+          error ("audiodevinfo: please specify 0 for output and 1 for input devices");
+          return retval;
+        }
+    }
+  // Return device name when given id or id when given device name.
+  else if (nargin == 2)
+    {
+      bool found = false;
+      int outin = args(0).int_value ();
+      if (args(1).is_string ())
+        {
+          if (outin == 0)
+            {
+              for (int i = 0; i < numoutput; i++)
+                {
+                  if (output_name(i).string_value () == args(1).string_value ())
+                    {
+                      retval = output_id(i);
+                      found = true;
+                      break;
+                    }
+                }
+            }
+          else if (outin == 1)
+            {
+              for (int i = 0; i < numinput; i++)
+                {
+                  if (input_name(i).string_value () == args(1).string_value ())
+                    {
+                      retval = input_id(i);
+                      found = true;
+                      break;
+                    }
+                }
+            }
+          else
+            {
+              error ("audiodevinfo: please specify 0 for output and 1 for input devices");
+              return retval;
+            }
+        }
+      else
+        {
+          if (outin == 0)
+            {
+              for (int i = 0; i < numoutput; i++)
+                {
+                  if (output_id(i).int_value () == args(1).int_value ())
+                    {
+                      retval = output_name(i);
+                      found = true;
+                      break;
+                    }
+                }
+            }
+          else if (outin == 1)
+            {
+              for (int i = 0; i < numinput; i++)
+                {
+                  if (input_id(i).int_value () == args(1).int_value ())
+                    {
+                      retval = input_name(i);
+                      found = true;
+                      break;
+                    }
+                }
+            }
+          else
+            {
+              error ("audiodevinfo: please specify 0 for output and 1 for input devices");
+              return retval;
+            }
+        }
+      if (! found)
+        error ("audiodevinfo: no device meeting the specified criteria found");
+    }
+  else if (nargin == 3)
+    {
+      // FIXME: what was supposed to happen here?
+    }
+  // Return the id of the first device meeting specified criteria.
+  else if (nargin == 4)
+    {
+      int io = args(0).int_value ();
+      int rate = args(1).int_value ();
+      int bits = args(2).int_value ();
+      int chans = args(3).int_value ();
+
+      for (int i = 0; i < num_devices; i++)
+        {
+          PaStreamParameters stream_parameters;
+          stream_parameters.device = i;
+          stream_parameters.channelCount = chans;
+          PaSampleFormat format = bits_to_format (bits);
+
+          if (format != 0)
+            stream_parameters.sampleFormat = format;
+          else
+            {
+              error ("audiodevinfo: no such bits per sample format");
+              return retval;
+            }
+
+          const PaDeviceInfo *device_info = Pa_GetDeviceInfo (i);
+
+          if (! device_info)
+            {
+              warning ("Octave:invalid-audio-device",
+                       "invalid audio device ID = %d", i);
+              continue;
+            }
+
+          stream_parameters.suggestedLatency
+            = device_info->defaultLowInputLatency;
+
+          stream_parameters.hostApiSpecificStreamInfo = 0;
+
+          if (io == 0)
+            {
+              if (device_info->maxOutputChannels < chans)
+                continue;
+
+              err = Pa_IsFormatSupported (0, &stream_parameters, rate);
+
+              if (err == paFormatIsSupported)
+                {
+                  retval = i;
+                  return retval;
+                }
+            }
+          else if (io == 1)
+            {
+              if (device_info->maxInputChannels < chans)
+                continue;
+
+              err = Pa_IsFormatSupported (&stream_parameters, 0, rate);
+              if (err == paFormatIsSupported)
+                {
+                  retval = i;
+                  return retval;
+                }
+            }
+        }
+      retval = -1;
+    }
+  // Check if given device supports specified playback or recording modes.
+  else if (nargin == 5)
+    {
+      int io = args(0).int_value ();
+      int id = args(1).int_value ();
+      int rate = args(2).int_value ();
+      int bits = args(3).int_value ();
+      int chans = args(4).int_value ();
+      PaStreamParameters stream_parameters;
+      stream_parameters.device = id;
+      stream_parameters.channelCount = chans;
+      PaSampleFormat format = bits_to_format (bits);
+      if (format != 0)
+        stream_parameters.sampleFormat = format;
+      else
+        {
+          error ("audiodevinfo: no such bits per sample format");
+          return retval;
+        }
+
+      const PaDeviceInfo *device_info = Pa_GetDeviceInfo (id);
+
+      if (! device_info)
+        {
+          error ("invalid audio device ID = %d", id);
+          return retval;
+        }
+
+      stream_parameters.suggestedLatency
+        = device_info->defaultLowInputLatency;
+
+      stream_parameters.hostApiSpecificStreamInfo = 0;
+      if (io == 0)
+        {
+          if (device_info->maxOutputChannels < chans)
+            {
+              retval = 0;
+              return retval;
+            }
+          err = Pa_IsFormatSupported (0, &stream_parameters, rate);
+          if (err == paFormatIsSupported)
+            {
+              retval = 1;
+              return retval;
+            }
+        }
+      else if (io == 1)
+        {
+          if (device_info->maxInputChannels < chans)
+            {
+              retval = 0;
+              return retval;
+            }
+          err = Pa_IsFormatSupported (&stream_parameters, 0, rate);
+          if (err == paFormatIsSupported)
+            {
+              retval = 1;
+              return retval;
+            }
+        }
+      else
+        {
+          error ("audiodevinfo: please specify 0 for output and 1 for input devices");
+          return retval;
+        }
+      retval = 0;
+    }
+  else
+    {
+      error ("audiodevinfo: wrong number of arguments");
+      return retval;
+    }
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+/*
+%!testif HAVE_PORTAUDIO
+%! devinfo = audiodevinfo;
+%! assert (rows (devinfo.input), 1);
+%! assert (rows (devinfo.output), 1);
+
+%!testif HAVE_PORTAUDIO
+%! devinfo = audiodevinfo;
+%! nout = audiodevinfo (0);
+%! nin = audiodevinfo (1);
+%! assert (columns (devinfo.output), nout);
+%! assert (columns (devinfo.input), nin);
+
+%!testif HAVE_PORTAUDIO
+%! devinfo = audiodevinfo;
+%! nout = audiodevinfo (0);
+%! nin = audiodevinfo (1);
+%! for i = 1:nout,
+%!   assert (devinfo.output(i).Name, audiodevinfo (0, devinfo.output(i).ID))
+%! endfor
+%! for i=1:nin,
+%!   assert (devinfo.input(i).Name, audiodevinfo (1, devinfo.input(i).ID))
+%! endfor
+
+%!testif HAVE_PORTAUDIO
+%! devinfo = audiodevinfo;
+%! nout = audiodevinfo (0);
+%! nin = audiodevinfo (1);
+%! for i = 1:nout,
+%!   assert (devinfo.output(i).ID, audiodevinfo (0, devinfo.output(i).Name))
+%! endfor
+%! for i = 1:nin,
+%!   assert (devinfo.input(i).ID, audiodevinfo (1, devinfo.input(i).Name))
+%! endfor
+*/
+
+#ifdef HAVE_PORTAUDIO
+
+enum audio_type { TYPE_INT8, TYPE_UINT8, TYPE_UINT16, TYPE_DOUBLE };
+
+class audioplayer : public octave_base_value
+{
+public:
+  audioplayer (void);
+  ~audioplayer (void);
+
+  // Overloaded base functions
+  double player_value (void) const { return 0; }
+  virtual double scalar_value (bool = false) const { return 0; }
+  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print_raw (std::ostream& os, bool pr_as_read_syntax) const;
+
+  // Properties
+  bool is_constant (void) const { return true; }
+  bool is_defined (void) const { return true; }
+  bool print_as_scalar (void) const { return true; }
+
+  void init (void);
+  void init_fn (void);
+  void set_y (const octave_value& y);
+  void set_y (octave_function *fn);
+  void set_y (std::string fn);
+  Matrix& get_y (void);
+  RowVector get_left (void) const;
+  RowVector get_right (void) const;
+  void set_fs (int fs);
+  int get_fs (void);
+  void set_nbits (int nbits);
+  int get_nbits (void);
+  void set_id (int id);
+  int get_id (void);
+  int get_channels (void);
+  audio_type get_type (void);
+
+  void set_sample_number (unsigned int sample);
+  unsigned int get_sample_number (void);
+  unsigned int get_total_samples (void);
+  void set_end_sample (unsigned int sample);
+  unsigned int get_end_sample (void);
+  void reset_end_sample (void);
+  void set_tag (const charMatrix& tag);
+  charMatrix get_tag (void);
+  void set_userdata (const octave_value& userdata);
+  octave_value get_userdata (void);
+  PaStream *get_stream (void);
+
+  void playblocking (void);
+  void play (void);
+  void pause (void);
+  void resume (void);
+  void stop (void);
+  bool isplaying (void);
+
+  octave_function *octave_callback_function;
+
+private:
+  int id;
+  int fs;
+  int nbits;
+  int channels;
+  unsigned int sample_number;
+  unsigned int end_sample;
+  charMatrix tag;
+  Matrix y;
+  octave_value userdata;
+  RowVector left;
+  RowVector right;
+  PaStream *stream;
+  PaStreamParameters output_parameters;
+  audio_type type;
+
+  DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
+};
+
+DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (audioplayer, "audioplayer", "audioplayer");
+
+static int
+octave_play_callback (const void *, void *output, unsigned long frames,
+                      const PaStreamCallbackTimeInfo *,
+                      PaStreamCallbackFlags, void *data)
+{
+  audioplayer *player = static_cast<audioplayer *> (data);
+
+  if (! player)
+    {
+      error ("audio player callback function called without player");
+      return paAbort;
+    }
+
+  octave_value_list retval = feval (player->octave_callback_function,
+                                    ovl (static_cast<double> (frames)), 1);
+
+  if (error_state || retval.length () < 2)
+    {
+      error ("audio player callback function failed");
+      return paAbort;
+    }
+
+  const Matrix sound = retval(0).matrix_value ();
+  int return_status = retval(1).int_value ();
+
+  if (error_state || (frames - sound.rows () != 0)
+      || sound.columns () < 1 || sound.columns () > 2)
+    {
+      error ("audio player callback function failed");
+      return paAbort;
+    }
+
+  // Don't multiply the audio data by scale_factor here.  Although it
+  // does move the operation outside of the loops below, it also causes
+  // a second copy of the data array to be made.
+
+  const ColumnVector sound_l = sound.column (0);
+  const ColumnVector sound_r = (sound.columns () == 1
+                                ? sound_l : sound.column (1));
+
+  const double *p_l = sound_l.data ();
+  const double *p_r = sound_r.data ();
+
+  switch (player->get_nbits ())
+    {
+    case 8:
+      {
+        static double scale_factor = std::pow (2.0, 7) - 1.0;
+
+        int8_t *buffer = static_cast<int8_t *> (output);
+
+        for (unsigned long i = 0; i < frames; i++)
+          {
+            buffer[2*i] = p_l[i] * scale_factor;
+            buffer[2*i+1] = p_r[i] * scale_factor;
+          }
+      }
+      break;
+
+    case 16:
+      {
+        static double scale_factor = std::pow (2.0, 15) - 1.0;
+
+        int16_t *buffer = static_cast<int16_t *> (output);
+
+        for (unsigned long i = 0; i < frames; i++)
+          {
+            buffer[2*i] = p_l[i] * scale_factor;
+            buffer[2*i+1] = p_r[i] * scale_factor;
+          }
+      }
+      break;
+
+    case 24:
+      {
+        static double scale_factor = std::pow (2.0, 23) - 1.0;
+
+        static int big_endian = oct_mach_info::words_big_endian ();
+
+        uint8_t *buffer = static_cast<uint8_t *> (output);
+
+        for (unsigned long i = 0; i < frames; i++)
+          {
+            int32_t sample_l = p_l[i];
+            int32_t sample_r = p_r[i];
+
+            sample_l &= 0x00ffffff;
+            sample_r &= 0x00ffffff;
+
+            // FIXME: Would a mask work better?
+            uint8_t *_sample_l = reinterpret_cast<uint8_t *> (&sample_l);
+            uint8_t *_sample_r = reinterpret_cast<uint8_t *> (&sample_r);
+
+            unsigned long offset = i * 6;
+
+            buffer[offset+0] = _sample_l[0+big_endian] * scale_factor;
+            buffer[offset+1] = _sample_l[1+big_endian] * scale_factor;
+            buffer[offset+2] = _sample_l[2+big_endian] * scale_factor;
+
+            buffer[offset+3] = _sample_r[0+big_endian] * scale_factor;
+            buffer[offset+4] = _sample_r[1+big_endian] * scale_factor;
+            buffer[offset+5] = _sample_r[2+big_endian] * scale_factor;
+          }
+      }
+      break;
+
+    default:
+      error ("invalid player bit depth in callback function");
+      break;
+    }
+
+  return return_status;
+}
+
+static int
+portaudio_play_callback (const void *, void *output, unsigned long frames,
+                         const PaStreamCallbackTimeInfo*,
+                         PaStreamCallbackFlags, void *data)
+{
+  audioplayer *player = static_cast<audioplayer *> (data);
+
+  if (! player)
+    {
+      error ("audio player callback function called without player");
+      return paAbort;
+    }
+
+  // Don't multiply the audio data by scale_factor here.  Although it
+  // would move the operation outside of the loops below, it also causes
+  // a second copy of the *entire* data array to be made when only a
+  // small portion (buffer_size elements) is usually needed for this
+  // callback.
+
+  const RowVector sound_l = player->get_left ();
+  const RowVector sound_r = player->get_right ();
+
+  const double *pl = sound_l.data ();
+  const double *pr = sound_r.data ();
+
+  if (player->get_type () == TYPE_DOUBLE)
+    {
+      switch (player->get_nbits ())
+        {
+        case 8:
+          {
+            static double scale_factor = std::pow (2.0, 7) - 1.0;
+
+            int8_t *buffer = static_cast<int8_t *> (output);
+
+            for (unsigned long j = 0; j < frames; j++)
+              {
+                unsigned int sample_number = player->get_sample_number ();
+
+                if (sample_number >= player->get_end_sample ())
+                  return paComplete;
+
+                unsigned long offset = j * 2;
+
+                buffer[offset+0] = pl[sample_number] * scale_factor;
+                buffer[offset+1] = pr[sample_number] * scale_factor;
+
+                player->set_sample_number (sample_number + 1);
+              }
+          }
+          break;
+
+        case 16:
+          {
+            static double scale_factor = std::pow (2.0, 15) - 1.0;
+
+            int16_t *buffer = static_cast<int16_t *> (output);
+
+            for (unsigned long j = 0; j < frames; j++)
+              {
+                unsigned int sample_number = player->get_sample_number ();
+
+                if (sample_number >= player->get_end_sample ())
+                  return paComplete;
+
+                unsigned long offset = j * 2;
+
+                buffer[offset+0] = pl[sample_number] * scale_factor;
+                buffer[offset+1] = pr[sample_number] * scale_factor;
+
+                player->set_sample_number (sample_number + 1);
+              }
+          }
+          break;
+
+        case 24:
+          {
+            static double scale_factor = std::pow (2.0, 23) - 1.0;
+
+            static int big_endian = oct_mach_info::words_big_endian ();
+
+            uint8_t *buffer = static_cast<uint8_t *> (output);
+
+            for (unsigned long j = 0; j < frames; j++)
+              {
+                unsigned int sample_number = player->get_sample_number ();
+
+                if (sample_number >= player->get_end_sample ())
+                  return paComplete;
+
+                int32_t sample_l = pl[sample_number] * scale_factor;
+                int32_t sample_r = pr[sample_number] * scale_factor;
+
+                sample_l &= 0x00ffffff;
+                sample_r &= 0x00ffffff;
+
+                // FIXME: Would a mask work better?
+                uint8_t *_sample_l = reinterpret_cast<uint8_t *> (&sample_l);
+                uint8_t *_sample_r = reinterpret_cast<uint8_t *> (&sample_r);
+
+                unsigned long offset = j * 6;
+
+                buffer[offset+0] = _sample_l[0+big_endian];
+                buffer[offset+1] = _sample_l[1+big_endian];
+                buffer[offset+2] = _sample_l[2+big_endian];
+
+                buffer[offset+3] = _sample_r[0+big_endian];
+                buffer[offset+4] = _sample_r[1+big_endian];
+                buffer[offset+5] = _sample_r[2+big_endian];
+
+                player->set_sample_number (sample_number + 1);
+              }
+          }
+          break;
+
+        default:
+          error ("invalid player bit depth in callback function");
+          break;
+        }
+    }
+  else if (player->get_type () == TYPE_INT8)
+    {
+      int8_t *buffer = static_cast<int8_t *> (output);
+
+      for (unsigned long j = 0; j < frames; j++)
+        {
+          unsigned int sample_number = player->get_sample_number ();
+
+          if (sample_number >= player->get_end_sample ())
+            return paComplete;
+
+          unsigned long offset = j * 2;
+
+          buffer[offset+0] = pl[sample_number];
+          buffer[offset+1] = pr[sample_number];
+
+          player->set_sample_number (sample_number + 1);
+        }
+    }
+  else if (player->get_type () == TYPE_UINT8)
+    {
+      uint8_t *buffer = static_cast<uint8_t *> (output);
+
+      for (unsigned long j = 0; j < frames; j++)
+        {
+          unsigned int sample_number = player->get_sample_number ();
+
+          if (sample_number >= player->get_end_sample ())
+            return paComplete;
+
+          unsigned long offset = j * 2;
+
+          buffer[offset+0] = pl[sample_number];
+          buffer[offset+1] = pr[sample_number];
+
+          player->set_sample_number (sample_number + 1);
+        }
+    }
+  else if (player->get_type () == TYPE_UINT16)
+    {
+      int16_t *buffer = static_cast<int16_t *> (output);
+
+      for (unsigned long j = 0; j < frames; j++)
+        {
+          unsigned int sample_number = player->get_sample_number ();
+
+          if (sample_number >= player->get_end_sample ())
+            return paComplete;
+
+          unsigned long offset = j * 2;
+
+          buffer[offset+0] = pl[sample_number];
+          buffer[offset+1] = pr[sample_number];
+
+          player->set_sample_number (sample_number + 1);
+        }
+    }
+
+  return paContinue;
+}
+
+static void
+safe_audioplayer_stop (audioplayer *player)
+{
+  player->stop ();
+}
+
+audioplayer::audioplayer (void)
+  : octave_callback_function (0),
+    id (-1), fs (0), nbits (16), channels (0), sample_number (0),
+    end_sample (-1), tag (""), y (), userdata (Matrix ()),
+    left (), right (), stream (0), output_parameters (), type ()
+{ }
+
+audioplayer::~audioplayer (void)
+{
+  if (isplaying ())
+    {
+      warning ("Octave:audio-interrupt",
+               "interrupting playing audioplayer");
+      stop ();
+    }
+}
+
+void
+audioplayer::print (std::ostream& os, bool pr_as_read_syntax) const
+{
+  print_raw (os, pr_as_read_syntax);
+  newline (os);
+}
+
+void
+audioplayer::print_raw (std::ostream& os, bool) const
+{
+  os << 0;
+}
+
+void
+audioplayer::init_fn (void)
+{
+  if (Pa_Initialize () != paNoError)
+    {
+      error ("audioplayer: initialization error!");
+      return;
+    }
+
+  if (Pa_GetDeviceCount () < 1)
+    {
+      error ("audioplayer: no audio devices found or available!");
+      return;
+    }
+
+  int device = get_id ();
+
+  if (device == -1)
+    device = Pa_GetDefaultOutputDevice ();
+
+  output_parameters.device = device;
+  output_parameters.channelCount = 2;
+  output_parameters.sampleFormat = bits_to_format (get_nbits ());
+
+  const PaDeviceInfo *device_info = Pa_GetDeviceInfo (device);
+
+  if (! device_info)
+    warning ("Octave:invalid-default-audio-device",
+             "invalid default audio device ID = %d", device);
+
+  output_parameters.suggestedLatency
+    = device_info ? device_info->defaultHighOutputLatency : -1;
+
+  output_parameters.hostApiSpecificStreamInfo = 0;
+}
+
+void
+audioplayer::init (void)
+{
+  // Both of these variables are unused.  Should they be
+  // eliminated or is something not yet implemented?
+  //
+  // int channels = y.rows ();
+  // RowVector *sound_l = get_left ();
+
+  if (Pa_Initialize () != paNoError)
+    {
+      error ("audioplayer: initialization error!");
+      return;
+    }
+
+  if (Pa_GetDeviceCount () < 1)
+    {
+      error ("audioplayer: no audio devices found or available!");
+      return;
+    }
+
+  int device = get_id ();
+
+  if (device == -1)
+    device = Pa_GetDefaultOutputDevice ();
+
+  output_parameters.device = device;
+  output_parameters.channelCount = 2;
+
+  if (type == TYPE_DOUBLE)
+    output_parameters.sampleFormat = bits_to_format (get_nbits ());
+  else if (type == TYPE_INT8)
+    output_parameters.sampleFormat = paInt8;
+  else if (type == TYPE_UINT8)
+    output_parameters.sampleFormat = paUInt8;
+  else if (type == TYPE_UINT16)
+    output_parameters.sampleFormat = paInt16;
+
+  const PaDeviceInfo *device_info = Pa_GetDeviceInfo (device);
+
+  if (! device_info)
+    warning ("Octave:invalid-default-audio-device",
+             "invalid default audio device ID = %d", device);
+
+  output_parameters.suggestedLatency
+    = device_info ? device_info->defaultHighOutputLatency : -1;
+
+  output_parameters.hostApiSpecificStreamInfo = 0;
+}
+
+void
+audioplayer::set_y (const octave_value& y_arg)
+{
+  if (y_arg.is_int8_type ())
+    type = TYPE_INT8;
+  else if (y_arg.is_uint8_type ())
+    type = TYPE_UINT8;
+  else if (y_arg.is_int16_type ())
+    type = TYPE_UINT16;
+  else
+    type = TYPE_DOUBLE;
+
+  y = y_arg.matrix_value ();
+
+  if (y.rows () > 2)
+    y = y.transpose ();
+
+  channels = y.rows ();
+  left = y.row (0);
+
+  if (channels == 2)
+    right = y.row (1);
+
+  reset_end_sample ();
+}
+
+void
+audioplayer::set_y (octave_function *fn)
+{
+  octave_callback_function = fn;
+  channels = 2;
+  reset_end_sample ();
+}
+
+Matrix&
+audioplayer::get_y (void)
+{
+  return y;
+}
+
+RowVector
+audioplayer::get_left (void) const
+{
+  return left;
+}
+
+RowVector
+audioplayer::get_right (void) const
+{
+  return channels == 1 ? left : right;
+}
+
+void
+audioplayer::set_fs (int fs_arg)
+{
+  fs = fs_arg;
+}
+
+int
+audioplayer::get_fs (void)
+{
+  return fs;
+}
+
+void
+audioplayer::set_nbits (int nbits_arg)
+{
+  nbits = nbits_arg;
+}
+
+int
+audioplayer::get_nbits (void)
+{
+  return nbits;
+}
+
+void
+audioplayer::set_id (int id_arg)
+{
+  id = id_arg;
+}
+
+int
+audioplayer::get_id (void)
+{
+  return id;
+}
+
+int
+audioplayer::get_channels (void)
+{
+  return channels;
+}
+
+audio_type
+audioplayer::get_type (void)
+{
+  return type;
+}
+
+void
+audioplayer::set_sample_number (unsigned int sample_number_arg)
+{
+  sample_number = sample_number_arg;
+}
+
+unsigned int
+audioplayer::get_sample_number (void)
+{
+  return sample_number;
+}
+
+unsigned int
+audioplayer::get_total_samples (void)
+{
+  return left.length ();
+}
+
+void
+audioplayer::set_end_sample (unsigned int end_sample_arg)
+{
+  end_sample = end_sample_arg;
+}
+
+unsigned int
+audioplayer::get_end_sample (void)
+{
+  return end_sample;
+}
+
+void
+audioplayer::reset_end_sample (void)
+{
+  set_end_sample (left.length ());
+}
+
+void
+audioplayer::set_tag (const charMatrix& tag_arg)
+{
+  tag = tag_arg;
+}
+
+charMatrix
+audioplayer::get_tag (void)
+{
+  return tag;
+}
+
+void
+audioplayer::set_userdata (const octave_value& userdata_arg)
+{
+  userdata = userdata_arg;
+}
+
+octave_value
+audioplayer::get_userdata (void)
+{
+  return userdata;
+}
+
+void
+audioplayer::playblocking (void)
+{
+  if (get_stream ())
+    stop ();
+
+  const unsigned int buffer_size = get_fs () / 20;
+  OCTAVE_LOCAL_BUFFER (uint32_t, buffer, buffer_size * 2);
+
+  PaError err;
+  err = Pa_OpenStream (&stream, 0, &(output_parameters), get_fs (),
+                       buffer_size, paClipOff, 0, 0);
+  if (err != paNoError)
+    {
+      error ("audioplayer: unable to open audio playback stream");
+      return;
+    }
+
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audioplayer: unable to start start audio playback stream");
+      return;
+    }
+
+  unsigned int start, end;
+  start = get_sample_number ();
+  end = get_end_sample ();
+
+  unwind_protect frame;
+
+  frame.add_fcn (safe_audioplayer_stop, this);
+
+  for (unsigned int i = start; i < end; i += buffer_size)
+    {
+      OCTAVE_QUIT;
+      if (octave_callback_function != 0)
+        octave_play_callback (0, buffer, buffer_size, 0, 0, this);
+      else
+        portaudio_play_callback (0, buffer, buffer_size, 0, 0, this);
+
+      err = Pa_WriteStream (stream, buffer, buffer_size);
+    }
+}
+
+void
+audioplayer::play (void)
+{
+  if (get_stream ())
+    stop ();
+
+  const unsigned int buffer_size = get_fs () / 20;
+
+  PaError err;
+  if (octave_callback_function != 0)
+    err = Pa_OpenStream (&stream, 0, &(output_parameters),
+                         get_fs (), buffer_size, paClipOff,
+                         octave_play_callback, this);
+  else
+    err = Pa_OpenStream (&stream, 0, &(output_parameters),
+                         get_fs (), buffer_size, paClipOff,
+                         portaudio_play_callback, this);
+
+  if (err != paNoError)
+    {
+      error ("audioplayer: failed to open audio playback stream");
+      return;
+    }
+
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audioplayer: failed to start audio playback stream");
+      return;
+    }
+}
+
+void
+audioplayer::pause (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  err = Pa_StopStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: failed to stop audio recording stream");
+      return;
+    }
+}
+
+void
+audioplayer::resume (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: failed to start audio recording stream");
+      return;
+    }
+}
+
+PaStream *
+audioplayer::get_stream (void)
+{
+  return stream;
+}
+
+void
+audioplayer::stop (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  set_sample_number (0);
+  reset_end_sample ();
+  if (! Pa_IsStreamStopped (get_stream ()))
+    {
+      err = Pa_AbortStream (get_stream ());
+      if (err != paNoError)
+        {
+          error ("audioplayer: failed to stop audio playback stream");
+          return;
+        }
+    }
+
+  err = Pa_CloseStream (get_stream ());
+  if (err != paNoError)
+    {
+      error ("audioplayer: failed to close audio playback stream");
+      return;
+    }
+
+  stream = 0;
+}
+
+bool
+audioplayer::isplaying (void)
+{
+  if (get_stream () == 0)
+    return false;
+
+  PaError err;
+  err = Pa_IsStreamActive (stream);
+  if (err != 0 && err != 1)
+    {
+      error ("audiorecorder: checking stream activity status failed");
+      return false;
+    }
+
+  return (err == 1);
+}
+
+class audiorecorder : public octave_base_value
+{
+public:
+  audiorecorder (void);
+  ~audiorecorder (void);
+
+  // Overloaded base functions
+  double player_value (void) const { return 0; }
+  virtual double scalar_value (bool = false) const { return 0; }
+  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print_raw (std::ostream& os, bool pr_as_read_syntax) const;
+
+  // Properties
+  bool is_constant (void) const { return true; }
+  bool is_defined (void) const { return true; }
+  bool print_as_scalar (void) const { return true; }
+
+  void init (void);
+  void set_fs (int fs);
+  int get_fs (void);
+  void set_nbits (int nbits);
+  int get_nbits (void);
+  void set_id (int id);
+  int get_id (void);
+  void set_channels (int channels);
+  int get_channels (void);
+  audio_type get_type (void);
+
+  void set_sample_number (unsigned int sample);
+  unsigned int get_sample_number (void);
+  unsigned int get_total_samples (void);
+  void set_end_sample (unsigned int sample);
+  unsigned int get_end_sample (void);
+  void reset_end_sample (void);
+  void set_tag (const charMatrix& tag);
+  charMatrix get_tag (void);
+  void set_userdata (const octave_value& userdata);
+  octave_value get_userdata (void);
+  PaStream *get_stream (void);
+
+  octave_value getaudiodata (void);
+  audioplayer *getplayer (void);
+  bool isrecording (void);
+  audioplayer play (void);
+  void record (void);
+  void recordblocking (float seconds);
+  void pause (void);
+  void resume (void);
+  void stop (void);
+  void append (float sample_l, float sample_r);
+
+  octave_function *octave_callback_function;
+
+private:
+  int id;
+  int fs;
+  int nbits;
+  int channels;
+  unsigned int sample_number;
+  unsigned int end_sample;
+  charMatrix tag;
+  Matrix y;
+  octave_value userdata;
+  std::vector<float> left;
+  std::vector<float> right;
+  PaStream *stream;
+  PaStreamParameters input_parameters;
+  audio_type type;
+
+  DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
+};
+
+DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (audiorecorder, "audiorecorder", "audiorecorder");
+
+static int
+octave_record_callback (const void *input, void *, unsigned long frames,
+                        const PaStreamCallbackTimeInfo *,
+                        PaStreamCallbackFlags, void *data)
+{
+  audiorecorder *recorder = static_cast<audiorecorder *> (data);
+
+  if (! recorder)
+    {
+      error ("audio recorder callback function called without player");
+      return paAbort;
+    }
+
+  int channels = recorder->get_channels ();
+
+  Matrix sound (frames, 2);
+  sound.resize (frames, 2);
+
+  if (recorder->get_nbits () == 8)
+    {
+      static double scale_factor = std::pow (2.0, 7) - 1.0;
+
+      const int8_t *input8 = static_cast<const int8_t *> (input);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          float sample_l = input8[i*channels] / scale_factor;
+          float sample_r = input8[i*channels + (channels - 1)] / scale_factor;
+
+          sound(i,0) = sample_l;
+          sound(i,1) = sample_r;
+        }
+    }
+  else if (recorder->get_nbits () == 16)
+    {
+      static double scale_factor = std::pow (2.0, 15) - 1.0;
+
+      const int16_t *input16 = static_cast<const int16_t *> (input);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          float sample_l = input16[i*channels] / scale_factor;
+          float sample_r = input16[i*channels + (channels - 1)] / scale_factor;
+
+          sound(i,0) = sample_l;
+          sound(i,1) = sample_r;
+        }
+    }
+  else if (recorder->get_nbits () == 24)
+    {
+      static double scale_factor = std::pow (2.0, 23);
+
+      // FIXME: Is there a better way?
+      const uint8_t *input24 = static_cast<const uint8_t *> (input);
+
+      int32_t sample_l32 = 0, sample_r32 = 0;
+
+      uint8_t *sample_l = reinterpret_cast<uint8_t *> (&sample_l32);
+      uint8_t *sample_r = reinterpret_cast<uint8_t *> (&sample_r32);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          for (int j = 0; j < 3; j++)
+            {
+              sample_l[j] = input24[i*channels*3 + j];
+              sample_r[j] = input24[i*channels*3 + (channels - 1)*3 + j];
+            }
+
+          if (sample_l32 & 0x00800000)
+            sample_l32 |= 0xff000000;
+
+          if (sample_r32 & 0x00800000)
+            sample_r32 |= 0xff000000;
+
+          sound(i,0) = sample_l32 / scale_factor;
+          sound(i,1) = sample_r32 / scale_factor;
+        }
+    }
+
+  octave_value_list retval
+    = feval (recorder->octave_callback_function, ovl (sound), 1);
+
+  return retval(0).int_value ();
+}
+
+static int
+portaudio_record_callback (const void *input, void *, unsigned long frames,
+                           const PaStreamCallbackTimeInfo *,
+                           PaStreamCallbackFlags, void *data)
+{
+  audiorecorder *recorder = static_cast<audiorecorder *> (data);
+
+  if (! recorder)
+    {
+      error ("audio recorder callback function called without player");
+      return paAbort;
+    }
+
+  int channels = recorder->get_channels ();
+
+  if (recorder->get_nbits () == 8)
+    {
+      static float scale_factor = std::pow (2.0f, 7) - 1.0f;
+
+      const int8_t *input8 = static_cast<const int8_t *> (input);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          float sample_l = input8[i*channels] / scale_factor;
+          float sample_r = input8[i*channels + (channels - 1)] / scale_factor;
+
+          recorder->append (sample_l, sample_r);
+        }
+    }
+  else if (recorder->get_nbits () == 16)
+    {
+      static float scale_factor = std::pow (2.0f, 15) - 1.0f;
+
+      const int16_t *input16 = static_cast<const int16_t *> (input);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          float sample_l = input16[i*channels] / scale_factor;
+          float sample_r = input16[i*channels + (channels - 1)] / scale_factor;
+
+          recorder->append (sample_l, sample_r);
+        }
+    }
+  else if (recorder->get_nbits () == 24)
+    {
+      static float scale_factor = std::pow (2.0f, 23);
+
+      // FIXME: Is there a better way?
+      const uint8_t *input24 = static_cast<const uint8_t *> (input);
+
+      int32_t sample_l32 = 0, sample_r32 = 0;
+
+      uint8_t *sample_l = reinterpret_cast<uint8_t *> (&sample_l32);
+      uint8_t *sample_r = reinterpret_cast<uint8_t *> (&sample_r32);
+
+      for (unsigned long i = 0; i < frames; i++)
+        {
+          for (int j = 0; j < 3; j++)
+            {
+              sample_l[j] = input24[i*channels*3 + j];
+              sample_r[j] = input24[i*channels*3 + (channels - 1)*3 + j];
+            }
+
+          if (sample_l32 & 0x00800000)
+            sample_l32 |= 0xff000000;
+
+          if (sample_r32 & 0x00800000)
+            sample_r32 |= 0xff000000;
+
+          recorder->append (sample_l32 / scale_factor,
+                            sample_r32 / scale_factor);
+        }
+    }
+
+  if (recorder->get_sample_number () >= recorder->get_end_sample ())
+    return paComplete;
+
+  return paContinue;
+}
+
+static void
+safe_audiorecorder_stop (audiorecorder *recorder)
+{
+  recorder->stop ();
+}
+
+audiorecorder::audiorecorder (void)
+  : octave_callback_function (0),
+    id (-1), fs (44100), nbits (16), channels (2), sample_number (0),
+    end_sample (-1), tag (""), y (), userdata (Matrix ()),
+    left (), right (), stream (0), input_parameters (), type ()
+{ }
+
+audiorecorder::~audiorecorder (void)
+{
+  if (isrecording ())
+    {
+      warning ("Octave:audio-interrupt",
+               "interrupting recording audiorecorder");
+      stop ();
+    }
+}
+
+void
+audiorecorder::print (std::ostream& os, bool pr_as_read_syntax) const
+{
+  print_raw (os, pr_as_read_syntax);
+  newline (os);
+}
+
+void
+audiorecorder::print_raw (std::ostream& os, bool) const
+{
+  os << 0;
+}
+
+void
+audiorecorder::init (void)
+{
+  if (Pa_Initialize () != paNoError)
+    {
+      error ("audiorecorder: initialization error!");
+      return;
+    }
+
+  if (Pa_GetDeviceCount () < 1)
+    {
+      error ("audiorecorder: no audio devices found or available!");
+      return;
+    }
+
+  int device = get_id ();
+
+  if (device == -1)
+    device = Pa_GetDefaultInputDevice ();
+
+  input_parameters.device = device;
+  input_parameters.channelCount = get_channels ();
+  input_parameters.sampleFormat = bits_to_format (get_nbits ());
+
+  const PaDeviceInfo *device_info = Pa_GetDeviceInfo (device);
+
+  if (! device_info)
+    warning ("Octave:invalid-default-audio-device",
+             "invalid default audio device ID = %d", device);
+
+  input_parameters.suggestedLatency
+    = device_info ? device_info->defaultHighInputLatency : -1;
+
+  input_parameters.hostApiSpecificStreamInfo = 0;
+}
+
+void
+audiorecorder::set_fs (int fs_arg)
+{
+  fs = fs_arg;
+}
+
+int
+audiorecorder::get_fs (void)
+{
+  return fs;
+}
+
+void
+audiorecorder::set_nbits (int nbits_arg)
+{
+  nbits = nbits_arg;
+}
+
+int
+audiorecorder::get_nbits (void)
+{
+  return nbits;
+}
+
+void
+audiorecorder::set_id (int id_arg)
+{
+  id = id_arg;
+}
+
+int
+audiorecorder::get_id (void)
+{
+  return id;
+}
+
+void
+audiorecorder::set_channels (int channels_arg)
+{
+  assert (channels_arg == 1 || channels_arg == 2);
+  channels = channels_arg;
+}
+
+int
+audiorecorder::get_channels (void)
+{
+  return channels;
+}
+
+audio_type
+audiorecorder::get_type (void)
+{
+  return type;
+}
+
+void
+audiorecorder::set_sample_number (unsigned int sample_number_arg)
+{
+  sample_number = sample_number_arg;
+}
+
+unsigned int
+audiorecorder::get_sample_number (void)
+{
+  return sample_number;
+}
+
+unsigned int
+audiorecorder::get_total_samples (void)
+{
+  return left.size ();
+}
+
+void
+audiorecorder::set_end_sample (unsigned int end_sample_arg)
+{
+  end_sample = end_sample_arg;
+}
+
+unsigned int
+audiorecorder::get_end_sample (void)
+{
+  return end_sample;
+}
+
+void
+audiorecorder::reset_end_sample (void)
+{
+  set_end_sample (left.size ());
+}
+
+void
+audiorecorder::set_tag (const charMatrix& tag_arg)
+{
+  tag = tag_arg;
+}
+
+charMatrix
+audiorecorder::get_tag (void)
+{
+  return tag;
+}
+
+void
+audiorecorder::set_userdata (const octave_value& userdata_arg)
+{
+  userdata = userdata_arg;
+}
+
+octave_value
+audiorecorder::get_userdata (void)
+{
+  return userdata;
+}
+
+octave_value
+audiorecorder::getaudiodata (void)
+{
+  Matrix audio (2, left.size ());
+
+  for (unsigned int i = 0; i < left.size (); i++)
+    {
+      audio(0,i) = left[i];
+      audio(1,i) = right[i];
+    }
+
+  return audio;
+}
+
+audioplayer *
+audiorecorder::getplayer (void)
+{
+  audioplayer *player = new audioplayer ();
+
+  player->set_y (getaudiodata ());
+  player->set_fs (get_fs ());
+  player->set_nbits (get_nbits ());
+  player->init ();
+
+  return player;
+}
+
+bool
+audiorecorder::isrecording (void)
+{
+  if (get_stream () == 0)
+    return false;
+
+  PaError err;
+  err = Pa_IsStreamActive (stream);
+  if (err != 0 && err != 1)
+    {
+      error ("audiorecorder: checking stream activity status failed");
+      return false;
+    }
+
+  return (err == 1);
+}
+
+void
+audiorecorder::record (void)
+{
+  if (get_stream ())
+    stop ();
+
+  left.clear ();
+  right.clear ();
+
+  const unsigned int buffer_size = get_fs () / 20;
+
+  PaError err;
+  if (octave_callback_function != 0)
+    {
+      err = Pa_OpenStream (&stream, &(input_parameters), 0,
+                           get_fs (), buffer_size, paClipOff,
+                           octave_record_callback, this);
+    }
+  else
+    {
+      err = Pa_OpenStream (&stream, &(input_parameters), 0,
+                           get_fs (), buffer_size, paClipOff,
+                           portaudio_record_callback, this);
+    }
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to open audio recording stream");
+      return;
+    }
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to start audio recording stream");
+      return;
+    }
+}
+
+void
+audiorecorder::recordblocking (float seconds)
+{
+  if (get_stream ())
+    stop ();
+
+  left.clear ();
+  right.clear ();
+
+  const unsigned int buffer_size = get_fs () / 20;
+  OCTAVE_LOCAL_BUFFER (uint8_t, buffer, buffer_size * 2 * 3);
+
+  PaError err;
+  err = Pa_OpenStream (&stream, &(input_parameters), 0,
+                       get_fs (), buffer_size, paClipOff, 0, this);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to open audio recording stream");
+      return;
+    }
+
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to start audio recording stream");
+      return;
+    }
+
+  unsigned int frames = seconds * get_fs ();
+
+  unwind_protect frame;
+
+  frame.add_fcn (safe_audiorecorder_stop, this);
+
+  for (unsigned int i = 0; i < frames; i += buffer_size)
+    {
+      OCTAVE_QUIT;
+      Pa_ReadStream (get_stream (), buffer, buffer_size);
+
+      if (octave_callback_function != 0)
+        octave_record_callback (buffer, 0, buffer_size, 0, 0, this);
+      else
+        portaudio_record_callback (buffer, 0, buffer_size, 0, 0, this);
+    }
+}
+
+void
+audiorecorder::pause (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  err = Pa_StopStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to stop audio recording stream");
+      return;
+    }
+}
+
+void
+audiorecorder::resume (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  err = Pa_StartStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to start audio recording stream");
+      return;
+    }
+}
+
+void
+audiorecorder::stop (void)
+{
+  if (get_stream () == 0)
+    return;
+
+  PaError err;
+  if (! Pa_IsStreamStopped (get_stream ()))
+    {
+      err = Pa_AbortStream (get_stream ());
+      if (err != paNoError)
+        {
+          error ("audioplayer: unable to stop audio playback stream");
+          return;
+        }
+    }
+
+  err = Pa_CloseStream (stream);
+  if (err != paNoError)
+    {
+      error ("audiorecorder: unable to close audio recording stream");
+      return;
+    }
+
+  set_sample_number (0);
+  reset_end_sample ();
+  stream = 0;
+}
+
+void
+audiorecorder::append (float sample_l, float sample_r)
+{
+  left.push_back (sample_l);
+  right.push_back (sample_r);
+  set_sample_number (get_sample_number () + 1);
+}
+
+PaStream *
+audiorecorder::get_stream (void)
+{
+  return stream;
+}
+
+#endif
+
+DEFUN_DLD (__recorder_audiorecorder__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels})\n\
+@deftypefnx {Loadable Function} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels}, @var{id})\n\
+@deftypefnx {Loadable Function} {@var{recorder} =} __recorder_audiorecorder__ (@var{fcn}, @dots{})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  int nargin = args.length ();
+
+  audiorecorder* recorder = new audiorecorder ();
+
+  int offset = 0;
+
+  if (nargin > 0)
+    {
+      bool is_function = (args(0).is_string () || args(0).is_function_handle ()
+                          || args(0).is_inline_function ());
+
+      if (is_function)
+        {
+          error ("audioplayer: callbacks not yet implemented");
+          return retval;
+
+          // recorder->octave_callback_function = args(0).function_value ();
+          // offset = 1;
+        }
+    }
+
+  switch (nargin - offset)
+    {
+    case 3:
+      recorder->set_fs (args(0 + offset).int_value ());
+      recorder->set_nbits (args(1 + offset).int_value ());
+      recorder->set_channels (args(2 + offset).int_value ());
+      break;
+
+    case 4:
+      recorder->set_fs (args(0 + offset).int_value ());
+      recorder->set_nbits (args(1 + offset).int_value ());
+      recorder->set_channels (args(2 + offset).int_value ());
+      recorder->set_id (args(3 + offset).int_value ());
+      break;
+    }
+
+  recorder->init ();
+
+  retval = recorder;
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+#ifdef HAVE_PORTAUDIO
+
+static audiorecorder *
+get_recorder (const octave_value& ov)
+{
+  const octave_base_value& rep = ov.get_rep ();
+
+  octave_base_value *ncrep = const_cast<octave_base_value *> (&rep);
+
+  return dynamic_cast<audiorecorder *> (ncrep);
+}
+
+#endif
+
+DEFUN_DLD (__recorder_getaudiodata__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{data}} __recorder_getaudiodata__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  audiorecorder *recorder = get_recorder (args(0));
+
+  if (! recorder)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  retval = recorder->getaudiodata ();
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_channels__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __recorder_get_channels__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_channels ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_fs__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{fs} =} __recorder_get_fs__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_fs ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_id__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{id} =} __recorder_get_id__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_id ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_nbits__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{nbits} =} __recorder_get_nbits__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_nbits ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_sample_number__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __recorder_get_sample_number__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_sample_number ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_tag__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{tag} =} __recorder_get_tag__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_tag ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_total_samples__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __recorder_get_total_samples__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_total_samples ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_get_userdata__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{data} =} __recorder_get_userdata__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->get_userdata ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_isrecording__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_isrecording__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = recorder->isrecording () ? true : false;
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_pause__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_pause__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      recorder->pause ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_recordblocking__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_recordblocking__ (@var{recorder}, @var{seconds})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  audiorecorder *recorder = get_recorder (args(0));
+
+  if (! recorder)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  recorder->recordblocking (args(1).float_value ());
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_record__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {} __recorder_record__ (@var{recorder})\n\
+@deftypefnx {Loadable Function} {} __recorder_record__ (@var{recorder}, @var{seconds})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  audiorecorder *recorder = get_recorder (args(0));
+
+  if (! recorder)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  if (args.length () == 1)
+    recorder->record ();
+  else if (args.length () == 2)
+    {
+      recorder->set_end_sample (args(1).int_value () * recorder->get_fs ());
+      recorder->record ();
+    }
+  else
+    error ("audiorecorder: wrong number of arguments passed to record");
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_resume__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_resume__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      recorder->resume ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_set_fs__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_set_fs__ (@var{recorder}, @var{fs})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      recorder->set_fs (args(1).int_value ());
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_set_tag__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_set_tag__ (@var{recorder}, @var{tag})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      recorder->set_tag (args(1).char_matrix_value ());
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_set_userdata__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_set_userdata__ (@var{recorder}, @var{data})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audiorecorder *recorder = get_recorder (args(0));
+
+      if (! recorder)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      recorder->set_userdata (args(1));
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__recorder_stop__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __recorder_stop__ (@var{recorder})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  audiorecorder *recorder = get_recorder (args(0));
+
+  if (! recorder)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  recorder->stop ();
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_audioplayer__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs})\n\
+@deftypefnx {Loadable Function} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits})\n\
+@deftypefnx {Loadable Function} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits}, @var{id})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  int nargin = args.length ();
+
+  if (nargin < 2 || nargin > 4)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  audioplayer* recorder = new audioplayer ();
+
+  if (! recorder)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  bool is_function = (args(0).is_string () || args(0).is_function_handle ()
+                      || args(0).is_inline_function ());
+
+  if (is_function)
+    {
+      error ("audioplayer: callbacks not yet implemented");
+      return retval;
+
+      // recorder->set_y (args(0).function_value ());
+    }
+  else
+    recorder->set_y (args(0));
+
+  recorder->set_fs (args(1).int_value ());
+
+  switch (nargin)
+    {
+    case 3:
+      recorder->set_nbits (args(2).int_value ());
+      break;
+
+    case 4:
+      recorder->set_nbits (args(2).int_value ());
+      recorder->set_id (args(3).int_value ());
+      break;
+    }
+
+  if (is_function)
+    recorder->init_fn ();
+  else
+    recorder->init ();
+
+  retval = recorder;
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+#ifdef HAVE_PORTAUDIO
+
+static audioplayer *
+get_player (const octave_value& ov)
+{
+  const octave_base_value& rep = ov.get_rep ();
+
+  octave_base_value *ncrep = const_cast<octave_base_value *> (&rep);
+
+  return dynamic_cast<audioplayer *> (ncrep);
+}
+
+#endif
+
+DEFUN_DLD (__player_get_channels__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __player_get_channels__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_channels ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_fs__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{fs} =} __player_get_fs__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_fs ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_id__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{id} =} __player_get_id__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_id ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_nbits__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{nbits} =} __player_get_nbits__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_nbits ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_sample_number__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __player_get_sample_number__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_sample_number ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_tag__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{tag} =} __player_get_tag__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_tag ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_total_samples__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{n} =} __player_get_total_samples__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_total_samples ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_get_userdata__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{data} =} __player_get_userdata__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->get_userdata ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_isplaying__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_isplaying__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      retval = player->isplaying () ? true : false;
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_pause__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_pause__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->pause ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_playblocking__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {} __player_playblocking__ (@var{player})\n\
+@deftypefnx {Loadable Function} {} __player_playblocking__ (@var{player}, @var{start})\n\
+@deftypefnx {Loadable Function} {} __player_playblocking__ (@var{player}, [@var{start}, @var{end}])\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  audioplayer *player = get_player (args(0));
+
+  if (! player)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  if (args.length () == 1)
+    player->playblocking ();
+  else
+    {
+      if (args(1).is_matrix_type ())
+        {
+          RowVector range = args(1).row_vector_value ();
+
+          unsigned int start = range.elem (0) - 1;
+          unsigned int end = range.elem (1) - 1;
+
+          if (start > player->get_total_samples ()
+              || start > end || end > player->get_total_samples ())
+            {
+              error ("audioplayer: invalid range specified for playback");
+              return retval;
+            }
+
+          player->set_sample_number (start);
+          player->set_end_sample (end);
+        }
+      else
+        {
+          unsigned int start = args(1).int_value () - 1;
+
+          if (start > player->get_total_samples ())
+            {
+              error ("audioplayer: invalid range specified for playback");
+              return retval;
+            }
+
+          player->set_sample_number (start);
+        }
+
+      player->playblocking ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_play__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {} __player_play__ (@var{player})\n\
+@deftypefnx {Loadable Function} {} __player_play__ (@var{player}, @var{start})\n\
+@deftypefnx {Loadable Function} {} __player_play__ (@var{player}, [@var{start}, @var{end}])\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->play ();
+    }
+  else
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (args(1).is_matrix_type ())
+        {
+          RowVector range = args(1).row_vector_value ();
+
+          unsigned int start = range.elem (0) - 1;
+          unsigned int end = range.elem (1) - 1;
+
+          if (start > player->get_total_samples ()
+              || start > end || end > player->get_total_samples ())
+            {
+              error ("audioplayer: invalid range specified for playback");
+              return retval;
+            }
+
+          player->set_sample_number (start);
+          player->set_end_sample (end);
+        }
+      else
+        {
+          unsigned int start = args(1).int_value () - 1;
+
+          if (start > player->get_total_samples ())
+            {
+              error ("audioplayer: invalid range specified for playback");
+              return retval;
+            }
+
+          player->set_sample_number (start);
+        }
+
+      player->play ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_resume__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_resume__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->resume ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_set_fs__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_set_fs__ (@var{player}, @var{fs})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->set_fs (args(1).int_value ());
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_set_tag__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_set_tag__ (@var{player}, @var{tag})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->set_tag (args(1).char_matrix_value ());
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_set_userdata__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_set_userdata__ (@var{player}, @var{data})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 2)
+    {
+      audioplayer *player = get_player (args(0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->set_userdata (args(1));
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (__player_stop__, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} __player_stop__ (@var{player})\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_PORTAUDIO
+
+  if (args.length () == 1)
+    {
+      audioplayer *player = get_player (args (0));
+
+      if (! player)
+        {
+          print_usage ();
+          return retval;
+        }
+
+      player->stop ();
+    }
+
+#else
+
+  error ("portaudio not found on your system and thus audio functionality is not present");
+
+#endif
+
+  return retval;
+}
new file mode 100644
--- /dev/null
+++ b/libinterp/dldfcn/audioread.cc
@@ -0,0 +1,570 @@
+/*
+
+Copyright (C) 2013-2015 Vytautas Jančauskas
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string>
+#include <map>
+
+#include "oct-locbuf.h"
+#include "unwind-prot.h"
+
+#include "defun-dld.h"
+#include "error.h"
+#include "gripes.h"
+#include "oct-obj.h"
+#include "ov.h"
+#include "ov-struct.h"
+
+#ifdef HAVE_SNDFILE
+#include <sndfile.h>
+#endif
+
+#ifdef HAVE_SNDFILE
+static void
+safe_close (SNDFILE *file)
+{
+  sf_close (file);
+}
+#endif
+
+DEFUN_DLD (audioread, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename})\n\
+@deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples})\n\
+\n\
+@deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{datatype})\n\
+@deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples}, @var{datatype})\n\
+Read the audio file @var{filename} and return the audio data and sampling\n\
+rate.  The audio data is stored as matrix with rows corresponding\n\
+to audio frames and columns corresponding to channels.\n\
+\n\
+The optional two-element vector argument @var{samples} specifies starting\n\
+and ending frames.\n\
+\n\
+The optional argument @var{datatype} specifies the datatype to return.\n\
+If it is @qcode{\"native\"}, then the type of data depends on how the\n\
+data is stored in the audio file.\n\
+\n\
+Read a file and return a specified range of frames in an array of specified\n\
+type.\n\
+\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+#ifdef HAVE_SNDFILE
+
+  int nargin = args.length ();
+
+  if (nargin < 1 || nargin > 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  std::string filename = args(0).string_value ();
+
+  if (error_state)
+    return retval;
+
+  SF_INFO info;
+  info.format = 0;
+  SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info);
+
+  if (! file)
+    {
+      error ("audioread: failed to open input file %s", filename.c_str ());
+      return retval;
+    }
+
+  unwind_protect frame;
+
+  frame.add_fcn (safe_close, file);
+
+  OCTAVE_LOCAL_BUFFER (float, data, info.frames * info.channels);
+
+  sf_read_float (file, data, info.frames * info.channels);
+
+  sf_count_t start = 0;
+  sf_count_t end = info.frames;
+
+  if ((nargin == 2 && ! args(1).is_string ()) || nargin == 3)
+    {
+      RowVector range = args(1).row_vector_value ();
+
+      if (error_state)
+        return retval;
+
+      if (range.nelem () != 2)
+        {
+          error ("audioread: invalid specification for range of frames");
+          return retval;
+        }
+
+      double dstart = xisinf (range(0)) ? info.frames : range(0);
+      double dend = xisinf (range(1)) ? info.frames : range(1);
+
+      if (dstart < 1 || dstart > dend || dend > info.frames
+          || D_NINT (dstart) != dstart || D_NINT (dend) != dend)
+        {
+          error ("audioread: invalid specification for range of frames");
+          return retval;
+        }
+
+      start = dstart - 1;
+      end = dend;
+    }
+
+  sf_count_t items = end - start;
+
+  Matrix audio (items, info.channels);
+
+  double *paudio = audio.fortran_vec ();
+
+  data += start * info.channels;
+
+  for (int i = 0; i < items; i++)
+    {
+      for (int channel = 0; channel < info.channels; channel++)
+        paudio[items*channel+i] = *data++;
+    }
+
+  octave_value ret_audio;
+
+  if ((nargin == 2 && args(1).is_string ()) || nargin == 3)
+    {
+      std::string type;
+      if (nargin == 3)
+        type = args(2).string_value ();
+      else
+        type = args(1).string_value ();
+
+      if (error_state)
+        return retval;
+
+      if (type == "native")
+        {
+          switch (info.format & SF_FORMAT_SUBMASK)
+            {
+            case SF_FORMAT_PCM_S8:
+              ret_audio = int8NDArray (audio * 127);
+              break;
+            case SF_FORMAT_PCM_U8:
+              ret_audio = uint8NDArray (audio * 127 + 127);
+              break;
+            case SF_FORMAT_PCM_16:
+              ret_audio = int16NDArray (audio * 32767);
+              break;
+            case SF_FORMAT_PCM_24:
+              ret_audio = int32NDArray (audio * 8388608);
+              break;
+            case SF_FORMAT_PCM_32:
+              ret_audio = int32NDArray (audio * 2147483648);
+              break;
+            default:
+              ret_audio = audio;
+              break;
+            }
+        }
+      else
+        ret_audio = audio;
+    }
+  else
+    ret_audio = audio;
+
+  retval(1) = info.samplerate;
+  retval(0) = ret_audio;
+
+#else
+
+  error ("sndfile not found on your system and thus audioread is not functional");
+
+#endif
+
+  return retval;
+}
+
+#ifdef HAVE_SNDFILE
+
+static int
+extension_to_format (const std::string& ext)
+{
+  static bool initialized = false;
+
+  static std::map<std::string, int> table;
+
+  if (! initialized)
+    {
+      table["wav"] = SF_FORMAT_WAV;
+      table["aiff"] = SF_FORMAT_AIFF;
+      table["au"] = SF_FORMAT_AU;
+      table["raw"] = SF_FORMAT_RAW;
+      table["paf"] = SF_FORMAT_PAF;
+      table["svx"] = SF_FORMAT_SVX;
+      table["nist"] = SF_FORMAT_NIST;
+      table["voc"] = SF_FORMAT_VOC;
+      table["ircam"] = SF_FORMAT_IRCAM;
+      table["w64"] = SF_FORMAT_W64;
+      table["mat4"] = SF_FORMAT_MAT4;
+      table["mat5"] = SF_FORMAT_MAT5;
+      table["pvf"] = SF_FORMAT_PVF;
+      table["xi"] = SF_FORMAT_XI;
+      table["htk"] = SF_FORMAT_HTK;
+      table["sds"] = SF_FORMAT_SDS;
+      table["avr"] = SF_FORMAT_AVR;
+      table["wavex"] = SF_FORMAT_WAVEX;
+      table["sd2"] = SF_FORMAT_SD2;
+      table["flac"] = SF_FORMAT_FLAC;
+      table["caf"] = SF_FORMAT_CAF;
+      table["wve"] = SF_FORMAT_WVE;
+      table["ogg"] = SF_FORMAT_OGG;
+      table["mpc2k"] = SF_FORMAT_MPC2K;
+      table["rf64"] = SF_FORMAT_RF64;
+
+      initialized = true;
+    }
+
+  std::map<std::string, int>::const_iterator it = table.find (ext);
+
+  return (it != table.end ()) ? it->second : 0;
+}
+
+#endif
+
+DEFUN_DLD (audiowrite, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn  {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs})\n\
+@deftypefnx {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs}, @var{name}, @var{value}, @dots{})\n\
+\n\
+Write audio data from the matrix @var{y} to @var{filename} with the file\n\
+format determined by the file extension.\n\
+\n\
+Additional name and value argument pairs may be used to specify the\n\
+following options:\n\
+\n\
+@table @samp\n\
+@item BitsPerSample\n\
+Number of bits per sample, valid values are 8, 16, 24 and 32.  Default is 16.\n\
+\n\
+@item BitRate\n\
+Valid argument name, but ignored.  Left for compatibility with @sc{matlab}.\n\
+\n\
+@item Quality\n\
+Quality setting for the Ogg Vorbis compressor.  Values can range between 0\n\
+and 100 with 100 being the highest quality setting.  Default is 75.\n\
+\n\
+@item Title\n\
+Title for the audio file.\n\
+\n\
+@item Artist\n\
+Artist name.\n\
+\n\
+@item Comment\n\
+Comment.\n\
+@end table\n\
+@end deftypefn")
+{
+  // FIXME: shouldn't we return something to indicate whether the file
+  // was written successfully?
+
+  octave_value retval;
+
+#ifdef HAVE_SNDFILE
+
+  int nargin = args.length ();
+
+  if (nargin < 3)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  std::string filename = args(0).string_value ();
+
+  if (error_state)
+    return retval;
+
+  Matrix audio = args(1).matrix_value ();
+
+  if (error_state)
+    return retval;
+
+  double bias = 0.0;
+  double scale = 1.0;
+
+  if (args(1).is_uint8_type ())
+    bias = scale = std::pow (2.0, 7);
+  else if (args(1).is_int16_type ())
+    scale = std::pow (2.0, 15);
+  else if (args(1).is_int32_type ())
+    scale = std::pow (2.0, 31);
+  else if (args(1).is_integer_type ())
+    {
+      gripe_wrong_type_arg ("audiowrite", args(1));
+      return retval;
+    }
+
+  int samplerate = args(2).int_value ();
+
+  if (error_state)
+    return retval;
+
+  std::string ext;
+  size_t dotpos = filename.find_last_of (".");
+  if (dotpos != std::string::npos)
+    ext = filename.substr (dotpos + 1);
+  std::transform (ext.begin (), ext.end (), ext.begin (), ::tolower);
+
+  sf_count_t items_to_write = audio.rows () * audio.columns ();
+
+  if (audio.rows () == 1)
+    audio = audio.transpose ();
+
+  OCTAVE_LOCAL_BUFFER (float, data, items_to_write);
+
+  sf_count_t idx = 0;
+  for (int i = 0; i < audio.rows (); i++)
+    {
+      for (int j = 0; j < audio.columns (); j++)
+        {
+          double elem = (audio.xelem (i, j) - bias) / scale;
+          data[idx++] = std::min (std::max (elem, -1.0), 1.0);
+        }
+    }
+
+  SF_INFO info;
+
+  memset (&info, 0, sizeof (info)) ;
+
+  sf_count_t chunk_size = 0;
+
+  if (ext == "ogg")
+    {
+      info.format = SF_FORMAT_VORBIS;
+
+      // FIXME: there seems to be a bug writing ogg files in one shot
+      // that causes a segfault.  Breaking it up into a series of
+      // smaller chunks seems to avoid the problem and produce valid
+      // files.
+      chunk_size = 0x1FFFFE;
+    }
+  else
+    info.format = SF_FORMAT_PCM_16;
+
+  info.channels = audio.columns ();
+  info.samplerate = samplerate;
+  info.channels = audio.cols ();
+  info.format |= extension_to_format (ext);
+
+  std::string title = "";
+  std::string artist = "";
+  std::string comment = "";
+  // Quality is currently unused?
+  //
+  // float quality = 0.75;
+  for (int i = 3; i < nargin; i += 2)
+    {
+      if (args(i).string_value () == "BitsPerSample")
+        {
+          info.format &= ~SF_FORMAT_SUBMASK;
+          int bits = args(i + 1).int_value ();
+          if (bits == 8)
+            {
+              if ((info.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV)
+                info.format |= SF_FORMAT_PCM_U8;
+              else
+                info.format |= SF_FORMAT_PCM_S8;
+            }
+          else if (bits == 16)
+            info.format |= SF_FORMAT_PCM_16;
+          else if (bits == 24)
+            info.format |= SF_FORMAT_PCM_24;
+          else if (bits == 32)
+            info.format |= SF_FORMAT_PCM_32;
+          else
+            {
+              error ("audiowrite: wrong number of bits specified");
+              return retval;
+            }
+        }
+      else if (args(i).string_value () == "BitRate")
+        ;
+      // Quality is currently unused?
+      //
+      // else if (args(i).string_value () == "Quality")
+      //   quality = args(i + 1).int_value () * 0.01;
+      else if (args(i).string_value () == "Title")
+        title = args(i + 1).string_value ();
+      else if (args(i).string_value () == "Artist")
+        artist = args(i + 1).string_value ();
+      else if (args(i).string_value () == "Comment")
+        comment = args(i + 1).string_value ();
+      else
+        {
+          error ("audiowrite: wrong argument name");
+          return retval;
+        }
+    }
+
+  SNDFILE *file = sf_open (filename.c_str (), SFM_WRITE, &info);
+
+  if (! file)
+    {
+      error ("audiowrite: failed to open output file %s", filename.c_str ());
+      return retval;
+    }
+
+  unwind_protect frame;
+
+  frame.add_fcn (safe_close, file);
+
+  if (title != "")
+    sf_set_string (file, SF_STR_TITLE, title.c_str ());
+
+  if (artist != "")
+    sf_set_string (file, SF_STR_ARTIST, artist.c_str ());
+
+  if (comment != "")
+    sf_set_string (file, SF_STR_COMMENT, comment.c_str ());
+
+  sf_count_t total_items_written = 0;
+  sf_count_t offset = 0;
+
+  if (chunk_size == 0)
+    chunk_size = items_to_write;
+
+  while (total_items_written < items_to_write)
+    {
+      if (items_to_write - offset < chunk_size)
+        chunk_size = items_to_write - offset;
+
+      sf_count_t items_written = sf_write_float (file, data+offset, chunk_size);
+
+      if (items_written != chunk_size)
+        {
+          error ("audiowrite: write failed, wrote %ld of %ld items\n",
+                 items_written, chunk_size);
+          return retval;
+        }
+
+      total_items_written += items_written;
+      offset += chunk_size;
+    }
+
+#else
+
+  error ("sndfile not found on your system and thus audiowrite is not functional");
+
+#endif
+
+  return retval;
+}
+
+DEFUN_DLD (audioinfo, args, ,
+           "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {@var{info} =} audioinfo (@var{filename})\n\
+Return information about an audio file specified by @var{filename}.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#ifdef HAVE_SNDFILE
+
+  if (args.length () != 1)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  std::string filename = args(0).string_value ();
+
+  if (error_state)
+    return retval;
+
+  SF_INFO info;
+  info.format = 0;
+  SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info);
+
+  if (! file)
+    {
+      error ("audioinfo: failed to open file %s", filename.c_str ());
+      return retval;
+    }
+
+  unwind_protect frame;
+
+  frame.add_fcn (safe_close, file);
+
+  octave_scalar_map result;
+
+  result.assign ("Filename", filename);
+  result.assign ("CompressionMethod", "");
+  result.assign ("NumChannels", info.channels);
+  result.assign ("SampleRate", info.samplerate);
+  result.assign ("TotalSamples", info.frames);
+
+  double dframes = info.frames;
+  double drate = info.samplerate;
+  result.assign ("Duration", dframes / drate);
+
+  int bits;
+  switch (info.format & SF_FORMAT_SUBMASK)
+    {
+    case SF_FORMAT_PCM_S8:
+      bits = 8;
+      break;
+    case SF_FORMAT_PCM_U8:
+      bits = 8;
+      break;
+    case SF_FORMAT_PCM_16:
+      bits = 16;
+      break;
+    case SF_FORMAT_PCM_24:
+      bits = 24;
+      break;
+    case SF_FORMAT_PCM_32:
+      bits = 32;
+      break;
+    default:
+      bits = -1;
+      break;
+    }
+
+  result.assign ("BitsPerSample", bits);
+  result.assign ("BitRate", -1);
+  result.assign ("Title", sf_get_string (file, SF_STR_TITLE));
+  result.assign ("Artist", sf_get_string (file, SF_STR_ARTIST));
+  result.assign ("Comment", sf_get_string (file, SF_STR_COMMENT));
+
+  retval = result;
+
+#else
+
+  error ("sndfile not found on your system and thus audioinfo is not functional");
+
+#endif
+
+  return retval;
+}
--- a/libinterp/dldfcn/ccolamd.cc
+++ b/libinterp/dldfcn/ccolamd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -100,10 +100,9 @@
 @var{cmember} is an optional vector of length @math{n}.  It defines the\n\
 constraints on the column ordering.  If @code{@var{cmember}(j) = @var{c}},\n\
 then column @var{j} is in constraint set @var{c} (@var{c} must be in the\n\
-range 1 to\n\
-n).  In the output permutation @var{p}, all columns in set 1 appear\n\
-first, followed by all columns in set 2, and so on.  @code{@var{cmember} =\n\
-ones (1,n)} if not present or empty.\n\
+range 1 to n).  In the output permutation @var{p}, all columns in set 1\n\
+appear first, followed by all columns in set 2, and so on.\n\
+@code{@var{cmember} = ones (1,n)} if not present or empty.\n\
 @code{ccolamd (@var{S}, [], 1 : n)} returns @code{1 : n}\n\
 \n\
 @code{@var{p} = ccolamd (@var{S})} is about the same as\n\
@@ -133,11 +132,12 @@
 or out-of-order row indices.  @code{@var{stats}(8 : 20)} is always zero in\n\
 the current version of @sc{ccolamd} (reserved for future use).\n\
 \n\
-The authors of the code itself are S. Larimore, T. Davis (Univ. of Florida)\n\
-and S. Rajamanickam in collaboration with J. Bilbert and E. Ng.  Supported\n\
-by the National Science Foundation\n\
-@nospell{(DMS-9504974, DMS-9803599, CCR-0203270)}, and a grant from Sandia\n\
-National Lab.  See @url{http://www.cise.ufl.edu/research/sparse} for\n\
+The authors of the code itself are @nospell{S. Larimore, T. Davis}\n\
+(Univ. of Florida) and @nospell{S. Rajamanickam} in collaboration with\n\
+@nospell{J. Bilbert and E. Ng}.  Supported by the National Science Foundation\n\
+@nospell{(DMS-9504974, DMS-9803599, CCR-0203270)}, and a grant from\n\
+@nospell{Sandia} National Lab.\n\
+See @url{http://www.cise.ufl.edu/research/sparse} for\n\
 ccolamd, csymamd, amd, colamd, symamd, and other related orderings.\n\
 @seealso{colamd, csymamd}\n\
 @end deftypefn")
@@ -390,11 +390,12 @@
 or out-of-order row indices.  @code{@var{stats}(8:20)} is always zero in\n\
 the current version of @sc{ccolamd} (reserved for future use).\n\
 \n\
-The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)\n\
-and S. Rajamanickam in collaboration with J. Bilbert and E. Ng.  Supported\n\
-by the National Science Foundation\n\
-@nospell{(DMS-9504974, DMS-9803599, CCR-0203270)}, and a grant from Sandia\n\
-National Lab.  See @url{http://www.cise.ufl.edu/research/sparse} for\n\
+The authors of the code itself are @nospell{S. Larimore, T. Davis}\n\
+(Univ. of Florida) and @nospell{S. Rajamanickam} in collaboration with\n\
+@nospell{J. Bilbert and E. Ng}.  Supported by the National Science Foundation\n\
+@nospell{(DMS-9504974, DMS-9803599, CCR-0203270)}, and a grant from\n\
+@nospell{Sandia} National Lab.\n\
+See @url{http://www.cise.ufl.edu/research/sparse} for\n\
 ccolamd, csymamd, amd, colamd, symamd, and other related orderings.\n\
 @seealso{symamd, ccolamd}\n\
 @end deftypefn")
--- a/libinterp/dldfcn/chol.cc
+++ b/libinterp/dldfcn/chol.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2008-2009 VZLU Prague
 
@@ -135,7 +135,7 @@
 \n\
 In general the lower triangular factorization is significantly faster for\n\
 sparse matrices.\n\
-@seealso{hess, lu, qr, qz, schur, svd, cholinv, chol2inv, cholupdate, cholinsert, choldelete, cholshift}\n\
+@seealso{hess, lu, qr, qz, schur, svd, ichol, cholinv, chol2inv, cholupdate, cholinsert, choldelete, cholshift}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -155,7 +155,7 @@
     {
       std::string tmp = args(n++).string_value ();
 
-      if (! error_state )
+      if (! error_state)
         {
           if (tmp.compare ("vector") == 0)
             vecout = true;
@@ -1271,8 +1271,8 @@
           if (j > 0 && j <= n+1 && i > 0 && i <= n+1)
             {
 
-              if (argr.is_single_type () && argi.is_single_type () &&
-                  argj.is_single_type ())
+              if (argr.is_single_type () && argi.is_single_type ()
+                  && argj.is_single_type ())
                 {
                   if (argr.is_real_type ())
                     {
--- a/libinterp/dldfcn/colamd.cc
+++ b/libinterp/dldfcn/colamd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -270,10 +270,9 @@
 \n\
 The ordering is followed by a column elimination tree post-ordering.\n\
 \n\
-The authors of the code itself are Stefan I. Larimore and Timothy A.\n\
-Davis @email{davis@@cise.ufl.edu}, University of Florida.  The algorithm was\n\
-developed in collaboration with John Gilbert, Xerox PARC, and Esmond\n\
-Ng, Oak Ridge National Laboratory.  (see\n\
+The authors of the code itself are @nospell{Stefan I. Larimore} and\n\
+@nospell{Timothy A. Davis @email{davis@@cise.ufl.edu}}, University of Florida.  The algorithm was developed in collaboration with @nospell{John Gilbert},\n\
+Xerox PARC, and @nospell{Esmond Ng}, Oak Ridge National Laboratory.  (see\n\
 @url{http://www.cise.ufl.edu/research/sparse/colamd})\n\
 @seealso{colperm, symamd, ccolamd}\n\
 @end deftypefn")
@@ -506,10 +505,9 @@
 \n\
 The ordering is followed by a column elimination tree post-ordering.\n\
 \n\
-The authors of the code itself are Stefan I. Larimore and Timothy A.\n\
-Davis @email{davis@@cise.ufl.edu}, University of Florida.  The algorithm was\n\
-developed in collaboration with John Gilbert, Xerox PARC, and Esmond\n\
-Ng, Oak Ridge National Laboratory.  (see\n\
+The authors of the code itself are @nospell{Stefan I. Larimore} and\n\
+@nospell{Timothy A. Davis @email{davis@@cise.ufl.edu}}, University of Florida.  The algorithm was developed in collaboration with @nospell{John Gilbert},\n\
+Xerox PARC, and @nospell{Esmond Ng}, Oak Ridge National Laboratory.  (see\n\
 @url{http://www.cise.ufl.edu/research/sparse/colamd})\n\
 @seealso{colperm, colamd}\n\
 @end deftypefn")
--- a/libinterp/dldfcn/config-module.awk
+++ b/libinterp/dldfcn/config-module.awk
@@ -38,18 +38,9 @@
   print "## Use stamp files to avoid problems with checking timestamps";
   print "## of symbolic links";
   print "";
-  for (i = 1; i <= nfiles; i++) {
-    basename = files[i];
-    sub (/\.cc$/, "", basename);
-    printf ("dldfcn/$(am__leading_dot)%s.oct-stamp: dldfcn/%s.la\n", basename, basename);
-    print "\trm -f $(<:.la=.oct)";
-    print "\tla=$(<F) && \\";
-    print "\t  of=$(<F:.la=.oct) && \\";
-    print "\t  cd dldfcn && \\";
-    print "\t  $(LN_S) .libs/`$(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $$la` $$of && \\";
-    print "\t  touch $(@F)";
-    print "";
-  }
+  print "%.oct : %.la"
+  print "	$(AM_V_GEN)$(INSTALL_PROGRAM) dldfcn/.libs/$(shell $(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $<) $@"
+  print ""
   print "else";
   print "";
   print "noinst_LTLIBRARIES += $(DLDFCN_LIBS)";
@@ -66,7 +57,7 @@
       {
         printf ("dldfcn/%s.df: CPPFLAGS += %s\n",
                 basename, cppflags[i]);
-        printf ("dldfcn_%s_la_CPPFLAGS = %s $(AM_CPPFLAGS)\n",
+        printf ("dldfcn_%s_la_CPPFLAGS = $(AM_CPPFLAGS) %s\n",
                 basename, cppflags[i]);
       }
     printf ("dldfcn_%s_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED_LDFLAG) %s $(OCT_LINK_OPTS)\n",
--- a/libinterp/dldfcn/convhulln.cc
+++ b/libinterp/dldfcn/convhulln.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 Kai Habel
+Copyright (C) 2000-2015 Kai Habel
 
 This file is part of Octave.
 
@@ -33,7 +33,7 @@
 #include <config.h>
 #endif
 
-#include <sstream>
+#include "oct-locbuf.h"
 
 #include "Cell.h"
 #include "defun-dld.h"
--- a/libinterp/dldfcn/dmperm.cc
+++ b/libinterp/dldfcn/dmperm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
@@ -136,8 +136,10 @@
 @deftypefn  {Loadable Function} {@var{p} =} dmperm (@var{S})\n\
 @deftypefnx {Loadable Function} {[@var{p}, @var{q}, @var{r}, @var{S}] =} dmperm (@var{S})\n\
 \n\
-@cindex Dulmage-Mendelsohn decomposition\n\
-Perform a Dulmage-Mendelsohn permutation of the sparse matrix @var{S}.\n\
+@cindex @nospell{Dulmage-Mendelsohn} decomposition\n\
+Perform a @nospell{Dulmage-Mendelsohn} permutation of the sparse matrix\n\
+@var{S}.\n\
+\n\
 With a single output argument @code{dmperm} performs the row permutations\n\
 @var{p} such that @code{@var{S}(@var{p},:)} has no zero elements on the\n\
 diagonal.\n\
@@ -147,9 +149,9 @@
 triangular form.  The values of @var{r} and @var{S} define the boundaries\n\
 of the blocks.  If @var{S} is square then @code{@var{r} == @var{S}}.\n\
 \n\
-The method used is described in: A. Pothen & C.-J. Fan. @cite{Computing the\n\
-Block Triangular Form of a Sparse Matrix}. ACM Trans. Math. Software,\n\
-16(4):303-324, 1990.\n\
+The method used is described in: @nospell{A. Pothen & C.-J. Fan.}\n\
+@cite{Computing the Block Triangular Form of a Sparse Matrix}.\n\
+ACM Trans. Math. Software, 16(4):303-324, 1990.\n\
 @seealso{colamd, ccolamd}\n\
 @end deftypefn")
 {
@@ -194,8 +196,8 @@
 \n\
 Calculate the structural rank of the sparse matrix @var{S}.  Note that\n\
 only the structure of the matrix is used in this calculation based on\n\
-a Dulmage-Mendelsohn permutation to block triangular form.  As such the\n\
-numerical rank of the matrix @var{S} is bounded by\n\
+a @nospell{Dulmage-Mendelsohn} permutation to block triangular form.  As\n\
+such the numerical rank of the matrix @var{S} is bounded by\n\
 @code{sprank (@var{S}) >= rank (@var{S})}.  Ignoring floating point errors\n\
 @code{sprank (@var{S}) == rank (@var{S})}.\n\
 @seealso{dmperm}\n\
--- a/libinterp/dldfcn/fftw.cc
+++ b/libinterp/dldfcn/fftw.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 David Bateman
+Copyright (C) 2006-2015 David Bateman
 
 This file is part of Octave.
 
@@ -32,6 +32,8 @@
 #include "error.h"
 #include "ov.h"
 
+#include "gripes.h"
+
 DEFUN_DLD (fftw, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {Loadable Function} {@var{method} =} fftw (\"planner\")\n\
@@ -142,202 +144,200 @@
   if (args(0).is_string ())
     {
       std::string arg0 = args(0).string_value ();
-      if (!error_state)
+
+      if (arg0 == "planner")
         {
-          if (arg0 == "planner")
+          if (nargin == 2)  //planner setter
             {
-              if (nargin == 2)  //planner setter
+              if (args(1).is_string ())
                 {
-                  if (args(1).is_string ())
+                  // Use STL function to convert to lower case
+                  std::transform (arg0.begin (), arg0.end (), arg0.begin (),
+                                  tolower);
+                  std::string arg1 = args(1).string_value ();
+                  if (!error_state)
                     {
-                      // Use STL function to convert to lower case
-                      std::transform (arg0.begin (), arg0.end (), arg0.begin (),
-                                      tolower);
-                      std::string arg1 = args(1).string_value ();
+                      std::transform (arg1.begin (), arg1.end (),
+                                      arg1.begin (), tolower);
+                      octave_fftw_planner::FftwMethod meth
+                        = octave_fftw_planner::UNKNOWN;
+                      octave_float_fftw_planner::FftwMethod methf
+                        = octave_float_fftw_planner::UNKNOWN;
+
+                      if (arg1 == "estimate")
+                        {
+                          meth = octave_fftw_planner::ESTIMATE;
+                          methf = octave_float_fftw_planner::ESTIMATE;
+                        }
+                      else if (arg1 == "measure")
+                        {
+                          meth = octave_fftw_planner::MEASURE;
+                          methf = octave_float_fftw_planner::MEASURE;
+                        }
+                      else if (arg1 == "patient")
+                        {
+                          meth = octave_fftw_planner::PATIENT;
+                          methf = octave_float_fftw_planner::PATIENT;
+                        }
+                      else if (arg1 == "exhaustive")
+                        {
+                          meth = octave_fftw_planner::EXHAUSTIVE;
+                          methf = octave_float_fftw_planner::EXHAUSTIVE;
+                        }
+                      else if (arg1 == "hybrid")
+                        {
+                          meth = octave_fftw_planner::HYBRID;
+                          methf = octave_float_fftw_planner::HYBRID;
+                        }
+                      else
+                        error ("fftw: unrecognized planner METHOD");
+
                       if (!error_state)
                         {
-                          std::transform (arg1.begin (), arg1.end (),
-                                          arg1.begin (), tolower);
-                          octave_fftw_planner::FftwMethod meth
-                            = octave_fftw_planner::UNKNOWN;
-                          octave_float_fftw_planner::FftwMethod methf
-                            = octave_float_fftw_planner::UNKNOWN;
-
-                          if (arg1 == "estimate")
-                            {
-                              meth = octave_fftw_planner::ESTIMATE;
-                              methf = octave_float_fftw_planner::ESTIMATE;
-                            }
-                          else if (arg1 == "measure")
-                            {
-                              meth = octave_fftw_planner::MEASURE;
-                              methf = octave_float_fftw_planner::MEASURE;
-                            }
-                          else if (arg1 == "patient")
-                            {
-                              meth = octave_fftw_planner::PATIENT;
-                              methf = octave_float_fftw_planner::PATIENT;
-                            }
-                          else if (arg1 == "exhaustive")
-                            {
-                              meth = octave_fftw_planner::EXHAUSTIVE;
-                              methf = octave_float_fftw_planner::EXHAUSTIVE;
-                            }
-                          else if (arg1 == "hybrid")
-                            {
-                              meth = octave_fftw_planner::HYBRID;
-                              methf = octave_float_fftw_planner::HYBRID;
-                            }
-                          else
-                            error ("unrecognized planner METHOD");
-
-                          if (!error_state)
-                            {
-                              meth = octave_fftw_planner::method (meth);
-                              octave_float_fftw_planner::method (methf);
+                          meth = octave_fftw_planner::method (meth);
+                          octave_float_fftw_planner::method (methf);
 
-                              if (meth == octave_fftw_planner::MEASURE)
-                                retval = octave_value ("measure");
-                              else if (meth == octave_fftw_planner::PATIENT)
-                                retval = octave_value ("patient");
-                              else if (meth == octave_fftw_planner::EXHAUSTIVE)
-                                retval = octave_value ("exhaustive");
-                              else if (meth == octave_fftw_planner::HYBRID)
-                                retval = octave_value ("hybrid");
-                              else
-                                retval = octave_value ("estimate");
-                            }
-                        }
-                    }
-                  else
-                    error ("fftw planner expects a string value as METHOD");
-                }
-              else //planner getter
-                {
-                  octave_fftw_planner::FftwMethod meth =
-                    octave_fftw_planner::method ();
-
-                  if (meth == octave_fftw_planner::MEASURE)
-                    retval = octave_value ("measure");
-                  else if (meth == octave_fftw_planner::PATIENT)
-                    retval = octave_value ("patient");
-                  else if (meth == octave_fftw_planner::EXHAUSTIVE)
-                    retval = octave_value ("exhaustive");
-                  else if (meth == octave_fftw_planner::HYBRID)
-                    retval = octave_value ("hybrid");
-                  else
-                    retval = octave_value ("estimate");
-                }
-            }
-          else if (arg0 == "dwisdom")
-            {
-              if (nargin == 2)  //dwisdom setter
-                {
-                  if (args(1).is_string ())
-                    {
-                      // Use STL function to convert to lower case
-                      std::transform (arg0.begin (), arg0.end (), arg0.begin (),
-                                      tolower);
-                      std::string arg1 = args(1).string_value ();
-                      if (!error_state)
-                        {
-                          char *str = fftw_export_wisdom_to_string ();
-
-                          if (arg1.length () < 1)
-                            fftw_forget_wisdom ();
-                          else if (! fftw_import_wisdom_from_string (arg1.c_str ()))
-                            error ("could not import supplied WISDOM");
-
-                          if (!error_state)
-                            retval = octave_value (std::string (str));
-
-                          free (str);
+                          if (meth == octave_fftw_planner::MEASURE)
+                            retval = octave_value ("measure");
+                          else if (meth == octave_fftw_planner::PATIENT)
+                            retval = octave_value ("patient");
+                          else if (meth == octave_fftw_planner::EXHAUSTIVE)
+                            retval = octave_value ("exhaustive");
+                          else if (meth == octave_fftw_planner::HYBRID)
+                            retval = octave_value ("hybrid");
+                          else
+                            retval = octave_value ("estimate");
                         }
                     }
                 }
-              else //dwisdom getter
-                {
-                  char *str = fftw_export_wisdom_to_string ();
-                  retval = octave_value (std::string (str));
-                  free (str);
-                }
+              else
+                error ("fftw: planner expects a string value as METHOD");
             }
-          else if (arg0 == "swisdom")
+          else //planner getter
             {
-              //swisdom uses fftwf_ functions (float), dwisdom fftw_ (real)
-              if (nargin == 2)  //swisdom setter
+              octave_fftw_planner::FftwMethod meth =
+                octave_fftw_planner::method ();
+
+              if (meth == octave_fftw_planner::MEASURE)
+                retval = octave_value ("measure");
+              else if (meth == octave_fftw_planner::PATIENT)
+                retval = octave_value ("patient");
+              else if (meth == octave_fftw_planner::EXHAUSTIVE)
+                retval = octave_value ("exhaustive");
+              else if (meth == octave_fftw_planner::HYBRID)
+                retval = octave_value ("hybrid");
+              else
+                retval = octave_value ("estimate");
+            }
+        }
+      else if (arg0 == "dwisdom")
+        {
+          if (nargin == 2)  //dwisdom setter
+            {
+              if (args(1).is_string ())
                 {
-                  if (args(1).is_string ())
+                  // Use STL function to convert to lower case
+                  std::transform (arg0.begin (), arg0.end (), arg0.begin (),
+                                  tolower);
+                  std::string arg1 = args(1).string_value ();
+                  if (!error_state)
                     {
-                      // Use STL function to convert to lower case
-                      std::transform (arg0.begin (), arg0.end (), arg0.begin (),
-                                      tolower);
-                      std::string arg1 = args(1).string_value ();
+                      char *str = fftw_export_wisdom_to_string ();
+
+                      if (arg1.length () < 1)
+                        fftw_forget_wisdom ();
+                      else if (! fftw_import_wisdom_from_string (arg1.c_str ()))
+                        error ("fftw: could not import supplied WISDOM");
+
                       if (!error_state)
-                        {
-                          char *str = fftwf_export_wisdom_to_string ();
-
-                          if (arg1.length () < 1)
-                            fftwf_forget_wisdom ();
-                          else if (! fftwf_import_wisdom_from_string (arg1.c_str ()))
-                            error ("could not import supplied WISDOM");
+                        retval = octave_value (std::string (str));
 
-                          if (!error_state)
-                            retval = octave_value (std::string (str));
-
-                          free (str);
-                        }
+                      free (str);
                     }
                 }
-              else //swisdom getter
-                {
-                  char *str = fftwf_export_wisdom_to_string ();
-                  retval = octave_value (std::string (str));
-                  free (str);
-                }
             }
-          else if (arg0 == "threads")
+          else //dwisdom getter
             {
-              if (nargin == 2)  //threads setter
+              char *str = fftw_export_wisdom_to_string ();
+              retval = octave_value (std::string (str));
+              free (str);
+            }
+        }
+      else if (arg0 == "swisdom")
+        {
+          //swisdom uses fftwf_ functions (float), dwisdom fftw_ (real)
+          if (nargin == 2)  //swisdom setter
+            {
+              if (args(1).is_string ())
                 {
-                  if (args(1).is_real_scalar ())
+                  // Use STL function to convert to lower case
+                  std::transform (arg0.begin (), arg0.end (), arg0.begin (),
+                                  tolower);
+                  std::string arg1 = args(1).string_value ();
+                  if (!error_state)
                     {
-                      int nthreads = args(1).int_value();
-                      if ( nthreads >= 1)
-                        {
+                      char *str = fftwf_export_wisdom_to_string ();
+
+                      if (arg1.length () < 1)
+                        fftwf_forget_wisdom ();
+                      else if (! fftwf_import_wisdom_from_string (arg1.c_str ()))
+                        error ("fftw: could not import supplied WISDOM");
+
+                      if (!error_state)
+                        retval = octave_value (std::string (str));
+
+                      free (str);
+                    }
+                }
+            }
+          else //swisdom getter
+            {
+              char *str = fftwf_export_wisdom_to_string ();
+              retval = octave_value (std::string (str));
+              free (str);
+            }
+        }
+      else if (arg0 == "threads")
+        {
+          if (nargin == 2)  //threads setter
+            {
+              if (args(1).is_real_scalar ())
+                {
+                  int nthreads = args(1).int_value();
+                  if (nthreads >= 1)
+                    {
 #if defined (HAVE_FFTW3_THREADS)
-                          octave_fftw_planner::threads (nthreads);
+                      octave_fftw_planner::threads (nthreads);
 #else
-                          warning ("this copy of Octave was not configured to use the multithreaded fftw libraries.");
+                      gripe_disabled_feature ("fftw", "multithreaded FFTW");
 #endif
 #if defined (HAVE_FFTW3F_THREADS)
-                          octave_float_fftw_planner::threads (nthreads);
+                      octave_float_fftw_planner::threads (nthreads);
 #else
-                          warning ("this copy of Octave was not configured to use the multithreaded fftwf libraries.");
+                      gripe_disabled_feature ("fftw", "multithreaded FFTW");
 #endif
-                        }
-                      else
-                        error ("number of threads must be >=1");
                     }
                   else
-                    error ("setting threads needs one integer argument.");
+                    error ("fftw: number of threads must be >=1");
                 }
-              else //threads getter
+              else
+                error ("fftw: setting threads needs one integer argument");
+            }
+          else //threads getter
 #if defined (HAVE_FFTW3_THREADS)
-                retval = octave_value (octave_fftw_planner::threads());
+            retval = octave_value (octave_fftw_planner::threads());
 #else
-                retval = 1;
+            retval = 1;
 #endif
-            }
-          else
-            error ("unrecognized argument");
         }
+      else
+        error ("fftw: unrecognized argument");
     }
   else
-    error ("unrecognized argument");
+    error ("fftw: unrecognized argument");
 #else
 
-  warning ("fftw: this copy of Octave was not configured to use the FFTW3 planner");
+  gripe_disabled_feature ("fftw", "the FFTW3 planner");
 
 #endif
 
@@ -367,8 +367,22 @@
 %!   fftw ("planner", def_method);
 %! end_unwind_protect
 
-%!error <Invalid call to fftw> fftw ();
-%!error <Invalid call to fftw> fftw ("planner", "estimate", "measure");
+%!testif HAVE_FFTW
+%! def_dwisdom = fftw ("dwisdom");
+%! def_swisdom = fftw ("swisdom");
+%! unwind_protect
+%!   wisdom = fftw ("dwisdom");
+%!   assert (ischar (wisdom));
+%!   fftw ("dwisdom", wisdom);
+%!   assert (fftw ("dwisdom"), wisdom);
+%!   wisdom = fftw ("swisdom");
+%!   assert (ischar (wisdom));
+%!   fftw ("swisdom", wisdom);
+%!   assert (fftw ("swisdom"), wisdom);
+%! unwind_protect_cleanup
+%!   fftw ("dwisdom", def_dwisdom);
+%!   fftw ("swisdom", def_swisdom);
+%! end_unwind_protect
 
 %!testif HAVE_FFTW3_THREADS
 %! n = fftw ("threads");
@@ -378,4 +392,15 @@
 %! unwind_protect_cleanup
 %!   fftw ("threads", n);
 %! end_unwind_protect
+
+%!error <Invalid call to fftw> fftw ();
+%!error <Invalid call to fftw> fftw ("planner", "estimate", "measure");
+%!error fftw (3);
+%!error fftw ("invalid");
+%!error fftw ("planner", "invalid");
+%!error fftw ("planner", 2);
+%!error fftw ("dwisdom", "invalid");
+%!error fftw ("swisdom", "invalid");
+%!error fftw ("threads", "invalid");
+%!error fftw ("threads", -3);
  */
--- a/libinterp/dldfcn/module-files
+++ b/libinterp/dldfcn/module-files
@@ -1,12 +1,12 @@
 # FILE|CPPFLAGS|LDFLAGS|LIBRARIES
 __delaunayn__.cc|$(QHULL_CPPFLAGS)|$(QHULL_LDFLAGS)|$(QHULL_LIBS)
-__dsearchn__.cc
 __eigs__.cc|$(ARPACK_CPPFLAGS) $(SPARSE_XCPPFLAGS)|$(ARPACK_LDFLAGS) $(SPARSE_XLDFLAGS)|$(ARPACK_LIBS) $(SPARSE_XLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
-__fltk_uigetfile__.cc|$(GRAPHICS_CFLAGS) $(FT2_CPPFLAGS)|$(GRAPHICS_LDFLAGS) $(FT2_LDFLAGS)|$(GRAPHICS_LIBS) $(FT2_LIBS)
+__fltk_uigetfile__.cc|$(FLTK_CPPFLAGS) $(FT2_CPPFLAGS)|$(FLTK_LDFLAGS) $(FT2_LDFLAGS)|$(FLTK_LIBS) $(FT2_LIBS)
 __glpk__.cc|$(GLPK_CPPFLAGS)|$(GLPK_LDFLAGS)|$(GLPK_LIBS)
-__init_fltk__.cc|$(GRAPHICS_CFLAGS) $(FT2_CPPFLAGS) $(FONTCONFIG_CPPFLAGS)|$(GRAPHICS_LDFLAGS) $(FT2_LDFLAGS)|$(GRAPHICS_LIBS) $(FT2_LIBS) $(OPENGL_LIBS)
+__init_fltk__.cc|$(FLTK_CPPFLAGS) $(FT2_CPPFLAGS) $(FONTCONFIG_CPPFLAGS)|$(FLTK_LDFLAGS) $(FT2_LDFLAGS)|$(FLTK_LIBS) $(FT2_LIBS) $(OPENGL_LIBS)
 __init_gnuplot__.cc|$(FT2_CPPFLAGS) $(FONTCONFIG_CPPFLAGS)||
 __magick_read__.cc|$(MAGICK_CPPFLAGS)|$(MAGICK_LDFLAGS)|$(MAGICK_LIBS)
+__osmesa_print__.cc|$(OSMESA_CPPFLAGS) $(FT2_CPPFLAGS)|$(OSMESA_LDFLAGS)|$(OSMESA_LIBS)
 __voronoi__.cc|$(QHULL_CPPFLAGS)|$(QHULL_LDFLAGS)|$(QHULL_LIBS)
 amd.cc|$(SPARSE_XCPPFLAGS)|$(SPARSE_XLDFLAGS)|$(SPARSE_XLIBS)
 ccolamd.cc|$(SPARSE_XCPPFLAGS)|$(SPARSE_XLDFLAGS)|$(SPARSE_XLIBS)
@@ -18,4 +18,5 @@
 qr.cc|$(QRUPDATE_CPPFLAGS) $(SPARSE_XCPPFLAGS)|$(QRUPDATE_LDFLAGS) $(SPARSE_XLDFLAGS)|$(QRUPDATE_LIBS) $(SPARSE_XLIBS)
 symbfact.cc|$(SPARSE_XCPPFLAGS)|$(SPARSE_XLDFLAGS)|$(SPARSE_XLIBS)
 symrcm.cc|$(SPARSE_XCPPFLAGS)|$(SPARSE_XLDFLAGS)|$(SPARSE_XLIBS)
-tsearch.cc
+audioread.cc|$(SNDFILE_CPPFLAGS)|$(SNDFILE_LDFLAGS)|$(SNDFILE_LIBS)
+audiodevinfo.cc|$(PORTAUDIO_CPPFLAGS)|$(PORTAUDIO_LDFLAGS)|$(PORTAUDIO_LIBS)
--- a/libinterp/dldfcn/oct-qhull.h
+++ b/libinterp/dldfcn/oct-qhull.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/dldfcn/qr.cc
+++ b/libinterp/dldfcn/qr.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2008-2009 VZLU Prague
 
@@ -744,7 +744,9 @@
 bool check_qr_dims (const octave_value& q, const octave_value& r,
                     bool allow_ecf = false)
 {
-  octave_idx_type m = q.rows (), k = r.rows (), n = r.columns ();
+  octave_idx_type m = q.rows ();
+  octave_idx_type k = r.rows ();
+  octave_idx_type n = r.columns ();
   return ((q.ndims () == 2 && r.ndims () == 2 && k == q.columns ())
           && (m == k || (allow_ecf && k == n && k < m)));
 }
--- a/libinterp/dldfcn/symbfact.cc
+++ b/libinterp/dldfcn/symbfact.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
@@ -114,17 +114,17 @@
   if (spu == 0.)
     {
       cm->print = -1;
-      cm->print_function = 0;
+      SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
     }
   else
     {
       cm->print = static_cast<int> (spu) + 2;
-      cm->print_function =&SparseCholPrint;
+      SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
     }
 
   cm->error_handler = &SparseCholError;
-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
-  cm->hypotenuse = CHOLMOD_NAME(hypot);
+  SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+  SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
   double dummy;
   cholmod_sparse Astore;
--- a/libinterp/dldfcn/symrcm.cc
+++ b/libinterp/dldfcn/symrcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 Michael Weitzel
+Copyright (C) 2007-2015 Michael Weitzel
 
 This file is part of Octave.
 
@@ -322,7 +322,7 @@
   return x.id;
 }
 
-// Calculates the node's degrees. This means counting the non-zero elements
+// Calculates the node's degrees. This means counting the nonzero elements
 // in the symmetric matrix' rows. This works for non-symmetric matrices
 // as well.
 
@@ -341,7 +341,7 @@
         {
           OCTAVE_QUIT;
           octave_idx_type k = ridx[i];
-          // there is a non-zero element (k,j)
+          // there is a nonzero element (k,j)
           D[k]++;
           if (D[k] > max_deg)
             max_deg = D[k];
@@ -414,7 +414,7 @@
 DEFUN_DLD (symrcm, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{p} =} symrcm (@var{S})\n\
-Return the symmetric reverse Cuthill-McKee permutation of @var{S}.\n\
+Return the symmetric reverse @nospell{Cuthill-McKee} permutation of @var{S}.\n\
 @var{p} is a permutation vector such that\n\
 @code{@var{S}(@var{p}, @var{p})} tends to have its diagonal elements\n\
 closer to the diagonal than @var{S}.  This is a good preordering for LU\n\
@@ -425,11 +425,11 @@
 bandwidth minimization problem.  The implementation is based in the\n\
 descriptions found in\n\
 \n\
-E. Cuthill, J. McKee. @cite{Reducing the Bandwidth of Sparse Symmetric\n\
-Matrices}. Proceedings of the 24th ACM National Conference, 157--172\n\
-1969, Brandon Press, New Jersey.\n\
+@nospell{E. Cuthill, J. McKee}. @cite{Reducing the Bandwidth of Sparse\n\
+Symmetric Matrices}. Proceedings of the 24th ACM National Conference,\n\
+157--172 1969, Brandon Press, New Jersey.\n\
 \n\
-A. George, J.W.H. Liu. @cite{Computer Solution of Large Sparse\n\
+@nospell{A. George, J.W.H. Liu}. @cite{Computer Solution of Large Sparse\n\
 Positive Definite Systems}, Prentice Hall Series in Computational\n\
 Mathematics, ISBN 0-13-165274-5, 1981.\n\
 \n\
@@ -487,7 +487,8 @@
   octave_idx_type s = 0;
 
   // head- and tail-indices for the queue
-  octave_idx_type qt = 0, qh = 0;
+  octave_idx_type qt = 0;
+  octave_idx_type qh = 0;
   CMK_Node v, w;
   // dimension of the matrix
   octave_idx_type N = nr;
--- a/libinterp/gendoc.pl
+++ b/libinterp/gendoc.pl
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 #
-# Copyright (C) 2012-2013 Rik Wehbring
+# Copyright (C) 2012-2015 Rik Wehbring
 #
 # This file is part of Octave.
 #
--- a/libinterp/genprops.awk
+++ b/libinterp/genprops.awk
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -290,7 +290,7 @@
   if (class_name && ! base)
     emit_common_declarations();
 
-  printf ("public:\n\n\n  static std::set<std::string> core_property_names (void);\n\n  static bool has_core_property (const caseless_str& pname);\n\n  std::set<std::string> all_property_names (void) const;\n\n");
+  printf ("public:\n\n\n  static std::set<std::string> core_property_names (void);\n\n  static std::set<std::string> readonly_property_names (void);\n\n  static bool has_core_property (const caseless_str& pname);\n\n  static bool has_readonly_property (const caseless_str& pname);\n\n  std::set<std::string> all_property_names (void) const;\n\n");
 
   if (! base)
     printf ("  bool has_property (const caseless_str& pname) const;\n\n");
@@ -470,7 +470,7 @@
               class_name);
 
     if (! base)
-      printf ("  const std::set<std::string>& pnames = all_property_names ();\n\n  caseless_str pname = validate_property_name (\"get\", go_name, pnames, pname_arg);\n\n  if (error_state)\n    return;\n\n");
+        printf ("  const std::set<std::string>& pnames = all_property_names ();\n\n  caseless_str pname = validate_property_name (\"set\", go_name, pnames, pname_arg);\n\n  if (error_state)\n    return;\n  else if (has_readonly_property (pname))\n    {\n      error (\"set: \\\"%%s\\\" is read-only\", pname.c_str ());\n      return;\n    }\n\n");
 
     first = 1;
 
@@ -611,6 +611,7 @@
       printf ("std::string %s::properties::go_name (\"%s\");\n\n",
               class_name, object_name);
 
+    ## core_property_names
     printf ("std::set<std::string>\n");
     if (base)
       printf ("base_properties");
@@ -622,7 +623,7 @@
     if (! base)
       printf ("\n      std::set<std::string> base_pnames = base_properties::core_property_names ();\n      all_pnames.insert (base_pnames.begin (), base_pnames.end ());\n");
     printf ("\n      initialized = true;\n    }\n\n  return all_pnames;\n}\n\n");
-
+    ## has_core_property
     printf ("bool\n");
     if (base)
       printf ("base_properties");
@@ -630,6 +631,30 @@
       printf ("%s::properties", class_name);
     printf ("::has_core_property (const caseless_str& pname)\n{\n  std::set<std::string> pnames = core_property_names ();\n\n  return pnames.find (pname) != pnames.end ();\n}\n\n", class_name);
 
+    ## readonly_property_names
+    printf ("std::set<std::string>\n");
+    if (base)
+      printf ("base_properties");
+    else
+      printf ("%s::properties", class_name);
+    printf ("::readonly_property_names (void)\n{\n  static std::set<std::string> all_pnames;\n\n  static bool initialized = false;\n\n  if (! initialized)\n    {\n");
+    for (i = 1; i <= idx; i++)
+        if (readonly[i])
+        {
+            printf ("      all_pnames.insert (\"%s\");\n", name[i]);
+        }
+    if (! base)
+      printf ("\n      std::set<std::string> base_pnames = base_properties::readonly_property_names ();\n      all_pnames.insert (base_pnames.begin (), base_pnames.end ());\n");
+    printf ("\n      initialized = true;\n    }\n\n  return all_pnames;\n}\n\n");
+    ## has_readonly_property
+    printf ("bool\n");
+    if (base)
+      printf ("base_properties");
+    else
+      printf ("%s::properties", class_name);
+    printf ("::has_readonly_property (const caseless_str& pname)\n{\n  std::set<std::string> pnames = readonly_property_names ();\n\n  return pnames.find (pname) != pnames.end ();\n}\n\n", class_name);
+
+    ## all_property_names
     printf ("std::set<std::string>\n");
     if (base)
         printf ("base_properties");
--- a/libinterp/mk-errno-list
+++ b/libinterp/mk-errno-list
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2005-2013 John W. Eaton
+# Copyright (C) 2005-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/mk-pkg-add
+++ b/libinterp/mk-pkg-add
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2005-2013 John W. Eaton
+# Copyright (C) 2005-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/mkbuiltins
+++ b/libinterp/mkbuiltins
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1996-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/mkdefs
+++ b/libinterp/mkdefs
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 1996-2013 John W. Eaton
+# Copyright (C) 1996-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/mkdocs
+++ b/libinterp/mkdocs
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 1999-2013 John W. Eaton
+# Copyright (C) 1999-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/mkops
+++ b/libinterp/mkops
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 1997-2013 John W. Eaton
+# Copyright (C) 1997-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/libinterp/oct-conf.in.h
+++ b/libinterp/oct-conf.in.h
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -278,16 +278,32 @@
 #define OCTAVE_CONF_FLIBS %OCTAVE_CONF_FLIBS%
 #endif
 
-#ifndef OCTAVE_CONF_FONTCONFIG_CFLAGS
-#define OCTAVE_CONF_FONTCONFIG_CFLAGS %OCTAVE_CONF_FONTCONFIG_CFLAGS%
+#ifndef OCTAVE_CONF_FLTK_CPPFLAGS
+#define OCTAVE_CONF_FLTK_CPPFLAGS %OCTAVE_CONF_FLTK_CPPFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_FLTK_LDFLAGS
+#define OCTAVE_CONF_FLTK_LDFLAGS %OCTAVE_CONF_FLTK_LDFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_FLTK_LIBS
+#define OCTAVE_CONF_FLTK_LIBS %OCTAVE_CONF_FLTK_LIBS%
+#endif
+
+#ifndef OCTAVE_CONF_FONTCONFIG_CPPFLAGS
+#define OCTAVE_CONF_FONTCONFIG_CPPFLAGS %OCTAVE_CONF_FONTCONFIG_CPPFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_FONTCONFIG_LIBS
+#define OCTAVE_CONF_FONTCONFIG_LIBS %OCTAVE_CONF_FONTCONFIG_LIBS%
 #endif
 
 #ifndef OCTAVE_CONF_FPICFLAG
 #define OCTAVE_CONF_FPICFLAG %OCTAVE_CONF_FPICFLAG%
 #endif
 
-#ifndef OCTAVE_CONF_FT2_CFLAGS
-#define OCTAVE_CONF_FT2_CFLAGS %OCTAVE_CONF_FT2_CFLAGS%
+#ifndef OCTAVE_CONF_FT2_CPPFLAGS
+#define OCTAVE_CONF_FT2_CPPFLAGS %OCTAVE_CONF_FT2_CPPFLAGS%
 #endif
 
 #ifndef OCTAVE_CONF_FT2_LIBS
@@ -310,14 +326,6 @@
 #define OCTAVE_CONF_GNUPLOT %OCTAVE_CONF_GNUPLOT%
 #endif
 
-#ifndef OCTAVE_CONF_GRAPHICS_CFLAGS
-#define OCTAVE_CONF_GRAPHICS_CFLAGS %OCTAVE_CONF_GRAPHICS_CFLAGS%
-#endif
-
-#ifndef OCTAVE_CONF_GRAPHICS_LIBS
-#define OCTAVE_CONF_GRAPHICS_LIBS %OCTAVE_CONF_GRAPHICS_LIBS%
-#endif
-
 #ifndef OCTAVE_CONF_HDF5_CPPFLAGS
 #define OCTAVE_CONF_HDF5_CPPFLAGS %OCTAVE_CONF_HDF5_CPPFLAGS%
 #endif
@@ -382,10 +390,6 @@
 #define OCTAVE_CONF_LIBOCTINTERP %OCTAVE_CONF_LIBOCTINTERP%
 #endif
 
-#ifndef OCTAVE_CONF_LIBPLPLOT
-#define OCTAVE_CONF_LIBPLPLOT %OCTAVE_CONF_LIBPLPLOT%
-#endif
-
 #ifndef OCTAVE_CONF_LIBS
 #define OCTAVE_CONF_LIBS %OCTAVE_CONF_LIBS%
 #endif
@@ -450,6 +454,18 @@
 #define OCTAVE_CONF_OPENGL_LIBS %OCTAVE_CONF_OPENGL_LIBS%
 #endif
 
+#ifndef OCTAVE_CONF_OSMESA_CPPFLAGS
+#define OCTAVE_CONF_OSMESA_CPPFLAGS %OCTAVE_CONF_OSMESA_CPPFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_OSMESA_LDFLAGS
+#define OCTAVE_CONF_OSMESA_LDFLAGS %OCTAVE_CONF_OSMESA_LDFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_OSMESA_LIBS
+#define OCTAVE_CONF_OSMESA_LIBS %OCTAVE_CONF_OSMESA_LIBS%
+#endif
+
 #ifndef OCTAVE_CONF_PCRE_CPPFLAGS
 #define OCTAVE_CONF_PCRE_CPPFLAGS %OCTAVE_CONF_PCRE_CPPFLAGS%
 #endif
--- a/libinterp/octave-value/module.mk
+++ b/libinterp/octave-value/module.mk
@@ -36,6 +36,7 @@
   octave-value/ov-cell.h \
   octave-value/ov-ch-mat.h \
   octave-value/ov-class.h \
+  octave-value/ov-classdef.h \
   octave-value/ov-colon.h \
   octave-value/ov-complex.h \
   octave-value/ov-cs-list.h \
@@ -94,6 +95,7 @@
   octave-value/ov-cell.cc \
   octave-value/ov-ch-mat.cc \
   octave-value/ov-class.cc \
+  octave-value/ov-classdef.cc \
   octave-value/ov-colon.cc \
   octave-value/ov-complex.cc \
   octave-value/ov-cs-list.cc \
@@ -135,13 +137,15 @@
 
 ## Special rules for Java .df files so that not all .df files are built with
 ## JAVA_CPPFLAGS
-$(OV_JAVA_DF) : octave-value/%.df : octave-value/%.cc
+$(OV_JAVA_DF) : octave-value/%.df : octave-value/%.cc $(GENERATED_MAKE_BUILTINS_INCS)
+	$(AM_V_GEN)rm -f $@-t $@-t1 $@ && \
 	$(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	  $(AM_CPPFLAGS) $(JAVA_CPPFLAGS) $(CPPFLAGS) \
 	  $(AM_CXXFLAGS) $(CXXFLAGS) \
-	  -DMAKE_BUILTINS $< > $@-t
-	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@
-	rm $@-t
+	  -DMAKE_BUILTINS $< > $@-t1 && \
+	$(srcdir)/mkdefs $(srcdir) $< < $@-t1 > $@-t && \
+	mv $@-t $@ && \
+	rm -f $@-t1
 
 noinst_LTLIBRARIES += octave-value/liboctave-value.la
 
--- a/libinterp/octave-value/ov-base-diag.cc
+++ b/libinterp/octave-value/ov-base-diag.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -100,7 +100,6 @@
                                         bool resize_ok)
 {
   octave_value retval;
-  typedef typename DMT::element_type el_type;
 
   if (idx.length () == 2 && ! resize_ok)
     {
@@ -412,9 +411,9 @@
 
 template <class DMT, class MT>
 idx_vector
-octave_base_diag<DMT, MT>::index_vector (void) const
+octave_base_diag<DMT, MT>::index_vector (bool require_integers) const
 {
-  return to_dense ().index_vector ();
+  return to_dense ().index_vector (require_integers);
 }
 
 template <class DMT, class MT>
@@ -441,7 +440,8 @@
 bool
 octave_base_diag<DMT, MT>::load_ascii (std::istream& is)
 {
-  octave_idx_type r = 0, c = 0;
+  octave_idx_type r = 0;
+  octave_idx_type c = 0;
   bool success = true;
 
   if (extract_keyword (is, "rows", r, true)
@@ -505,8 +505,7 @@
 
 template <class DMT, class MT>
 void
-octave_base_diag<DMT, MT>::print (std::ostream& os,
-                                  bool pr_as_read_syntax) const
+octave_base_diag<DMT, MT>::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -531,6 +530,23 @@
 
 template <class DMT, class MT>
 octave_value
+octave_base_diag<DMT, MT>::fast_elem_extract (octave_idx_type n) const
+{
+  if (n < matrix.numel ())
+    {
+      octave_idx_type nr = matrix.rows ();
+
+      octave_idx_type r = n % nr;
+      octave_idx_type c = n / nr;
+
+      return octave_value (matrix.elem (r, c));
+    }
+  else
+    return octave_value ();
+}
+
+template <class DMT, class MT>
+octave_value
 octave_base_diag<DMT, MT>::to_dense (void) const
 {
   if (! dense_cache.is_defined ())
--- a/libinterp/octave-value/ov-base-diag.h
+++ b/libinterp/octave-value/ov-base-diag.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -133,7 +133,7 @@
   double scalar_value (bool frc_str_conv = false) const
   { return double_value (frc_str_conv); }
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool /* require_integers */ = false) const;
 
   Matrix matrix_value (bool = false) const;
 
@@ -203,10 +203,12 @@
 
   bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_info (std::ostream& os, const std::string& prefix) const;
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
 protected:
 
   DMT matrix;
--- a/libinterp/octave-value/ov-base-int.cc
+++ b/libinterp/octave-value/ov-base-int.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -38,6 +38,7 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-base.h"
@@ -266,7 +267,7 @@
 template <class T>
 bool
 octave_base_int_matrix<T>::load_binary (std::istream& is, bool swap,
-                                        oct_mach_info::float_format )
+                                        oct_mach_info::float_format)
 {
   int32_t mdims;
   if (! is.read (reinterpret_cast<char *> (&mdims), 4))
@@ -333,21 +334,23 @@
   return true;
 }
 
-#if defined (HAVE_HDF5)
-
 template <class T>
 bool
-octave_base_int_matrix<T>::save_hdf5 (hid_t loc_id, const char *name, bool)
+octave_base_int_matrix<T>::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   hid_t save_type_hid = HDF5_SAVE_TYPE;
-  bool retval = true;
   dim_vector dv = this->dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
 
   // Octave uses column-major, while HDF5 uses row-major ordering
@@ -376,15 +379,22 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  this->gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 template <class T>
 bool
-octave_base_int_matrix<T>::load_hdf5 (hid_t loc_id, const char *name)
+octave_base_int_matrix<T>::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   hid_t save_type_hid = HDF5_SAVE_TYPE;
-  bool retval = false;
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -438,11 +448,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  this->gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 template <class T>
 void
 octave_base_int_matrix<T>::print_raw (std::ostream& os,
@@ -541,16 +553,18 @@
   return true;
 }
 
-#if defined (HAVE_HDF5)
-
 template <class T>
 bool
-octave_base_int_scalar<T>::save_hdf5 (hid_t loc_id, const char *name, bool)
+octave_base_int_scalar<T>::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   hid_t save_type_hid = HDF5_SAVE_TYPE;
-  bool retval = true;
   hsize_t dimens[3];
-  hid_t space_hid = -1, data_hid = -1;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;
@@ -574,13 +588,19 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  this->gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 template <class T>
 bool
-octave_base_int_scalar<T>::load_hdf5 (hid_t loc_id, const char *name)
+octave_base_int_scalar<T>::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
   hid_t save_type_hid = HDF5_SAVE_TYPE;
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
@@ -610,6 +630,10 @@
   H5Dclose (data_hid);
 
   return true;
+
+#else
+  this->gripe_load ("hdf5");
+  return false;
+#endif
 }
 
-#endif
--- a/libinterp/octave-value/ov-base-int.h
+++ b/libinterp/octave-value/ov-base-int.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -29,7 +29,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -74,16 +73,14 @@
 
   bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool& );
+  bool save_binary (std::ostream& os, bool&);
 
   bool load_binary (std::istream& is, bool swap,
-                    oct_mach_info::float_format );
+                    oct_mach_info::float_format);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 };
 
 // base int scalar values.
@@ -109,6 +106,8 @@
 
   bool is_real_type (void) const { return true; }
 
+  bool is_real_scalar (void) const { return true; }
+
   //  void increment (void) { scalar += 1; }
 
   //  void decrement (void) { scalar -= 1; }
@@ -119,16 +118,14 @@
 
   bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool& );
+  bool save_binary (std::ostream& os, bool&);
 
   bool load_binary (std::istream& is, bool swap,
-                    oct_mach_info::float_format );
+                    oct_mach_info::float_format);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool );
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 };
 
 #endif
--- a/libinterp/octave-value/ov-base-mat.cc
+++ b/libinterp/octave-value/ov-base-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -27,6 +27,8 @@
 
 #include <iostream>
 
+#include "Array-util.h"
+
 #include "Cell.h"
 #include "oct-obj.h"
 #include "oct-map.h"
@@ -351,7 +353,8 @@
               {
                 // optimize all scalar indices. Don't construct an index array,
                 // but rather calc a scalar index directly.
-                octave_idx_type k = 1, j = 0;
+                octave_idx_type k = 1;
+                octave_idx_type j = 0;
                 for (octave_idx_type i = 0; i < n_idx; i++)
                   {
                     j += idx_vec(i)(0) * k;
@@ -435,7 +438,7 @@
 
 template <class MT>
 void
-octave_base_matrix<MT>::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_base_matrix<MT>::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -476,7 +479,10 @@
               octave_print_internal (buf, matrix(j*nr+i));
               std::string tmp = buf.str ();
               size_t pos = tmp.find_first_not_of (" ");
-              os << tmp.substr (pos);
+              if (pos != std::string::npos)
+                os << tmp.substr (pos);
+              else if (! tmp.empty ())
+                os << tmp[0];
 
               if (++elts >= max_elts)
                 goto done;
--- a/libinterp/octave-value/ov-base-mat.h
+++ b/libinterp/octave-value/ov-base-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1998-2013 John W. Eaton
+Copyright (C) 1998-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -153,7 +153,7 @@
 
   bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_info (std::ostream& os, const std::string& prefix) const;
 
--- a/libinterp/octave-value/ov-base-scalar.cc
+++ b/libinterp/octave-value/ov-base-scalar.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -143,7 +143,7 @@
 
 template <class ST>
 void
-octave_base_scalar<ST>::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_base_scalar<ST>::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -176,7 +176,17 @@
   octave_print_internal (buf, scalar);
   std::string tmp = buf.str ();
   size_t pos = tmp.find_first_not_of (" ");
-  os << tmp.substr (pos);
+  if (pos != std::string::npos)
+    os << tmp.substr (pos);
+  else if (! tmp.empty ())
+    os << tmp[0];
+}
+
+template <class ST>
+octave_value
+octave_base_scalar<ST>::fast_elem_extract (octave_idx_type n) const
+{
+  return (n == 0) ? octave_value (scalar) : octave_value ();
 }
 
 template <class ST>
--- a/libinterp/octave-value/ov-base-scalar.h
+++ b/libinterp/octave-value/ov-base-scalar.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,7 +30,6 @@
 
 #include "lo-mappers.h"
 #include "lo-utils.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 #include "MatrixType.h"
 
@@ -132,7 +131,7 @@
 
   bool is_true (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -148,6 +147,8 @@
 
   ST& scalar_ref (void) { return scalar; }
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
   bool fast_elem_insert_self (void *where, builtin_type_t btyp) const;
 
 protected:
--- a/libinterp/octave-value/ov-base-sparse.cc
+++ b/libinterp/octave-value/ov-base-sparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -288,7 +288,7 @@
 
 template <class T>
 void
-octave_base_sparse<T>::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_base_sparse<T>::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -411,9 +411,9 @@
   octave_idx_type nc = 0;
   bool success = true;
 
-  if (extract_keyword (is, "nnz", nz, true) &&
-      extract_keyword (is, "rows", nr, true) &&
-      extract_keyword (is, "columns", nc, true))
+  if (extract_keyword (is, "nnz", nz, true)
+      && extract_keyword (is, "rows", nr, true)
+      && extract_keyword (is, "columns", nc, true))
     {
       T tmp (nr, nc, nz);
 
@@ -436,31 +436,73 @@
   return success;
 }
 
+
+template <class T>
+octave_value
+octave_base_sparse<T>::fast_elem_extract (octave_idx_type n) const
+{
+  octave_idx_type nr = matrix.rows ();
+  octave_idx_type nc = matrix.cols ();
+
+  octave_idx_type i = n % nr;
+  octave_idx_type j = n / nr;
+
+  return (i < nr && j < nc) ? octave_value (matrix(i,j)) : octave_value ();
+}
+
 template <class T>
 octave_value
 octave_base_sparse<T>::map (octave_base_value::unary_mapper_t umap) const
 {
+  if (umap == umap_xtolower || umap == umap_xtoupper)
+    return matrix;
+
   // Try the map on the dense value.
+  // FIXME: We should probably be smarter about this, especially for the
+  // cases that are expected to return sparse matrices.
   octave_value retval = this->full_value ().map (umap);
 
   // Sparsify the result if possible.
-  // FIXME: intentionally skip this step for string mappers. Is this wanted?
-  if (umap >= umap_xisalnum && umap <= umap_xtoupper)
-    return retval;
 
-  switch (retval.builtin_type ())
+  switch (umap)
     {
-    case btyp_double:
-      retval = retval.sparse_matrix_value ();
+    case umap_xisalnum:
+    case umap_xisalpha:
+    case umap_xisascii:
+    case umap_xiscntrl:
+    case umap_xisdigit:
+    case umap_xisgraph:
+    case umap_xislower:
+    case umap_xisprint:
+    case umap_xispunct:
+    case umap_xisspace:
+    case umap_xisupper:
+    case umap_xisxdigit:
+    case umap_xtoascii:
+      // FIXME: intentionally skip this step for string mappers.
+      // Is this wanted?
       break;
-    case btyp_complex:
-      retval = retval.sparse_complex_matrix_value ();
-      break;
-    case btyp_bool:
-      retval = retval.sparse_bool_matrix_value ();
-      break;
+
     default:
-      break;
+      {
+        switch (retval.builtin_type ())
+          {
+          case btyp_double:
+            retval = retval.sparse_matrix_value ();
+            break;
+
+          case btyp_complex:
+            retval = retval.sparse_complex_matrix_value ();
+            break;
+
+          case btyp_bool:
+            retval = retval.sparse_bool_matrix_value ();
+            break;
+
+          default:
+            break;
+          }
+      }
     }
 
   return retval;
--- a/libinterp/octave-value/ov-base-sparse.h
+++ b/libinterp/octave-value/ov-base-sparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -147,7 +147,7 @@
 
   bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_info (std::ostream& os, const std::string& prefix) const;
 
@@ -165,6 +165,8 @@
 
   octave_idx_type *mex_get_jc (void) const { return matrix.mex_get_jc (); }
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
 protected:
 
   octave_value map (octave_base_value::unary_mapper_t umap) const;
--- a/libinterp/octave-value/ov-base.cc
+++ b/libinterp/octave-value/ov-base.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -36,6 +36,7 @@
 #include "mxarray.h"
 #include "oct-map.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-lvalue.h"
 #include "oct-stream.h"
 #include "ops.h"
@@ -52,6 +53,7 @@
 #include "parse.h"
 #include "pr-output.h"
 #include "utils.h"
+#include "toplev.h"
 #include "variables.h"
 
 builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y)
@@ -214,7 +216,7 @@
 }
 
 idx_vector
-octave_base_value::index_vector (void) const
+octave_base_value::index_vector (bool /* require_integers */) const
 {
   std::string nm = type_name ();
   error ("%s type invalid as index value", nm.c_str ());
@@ -396,7 +398,7 @@
 }
 
 void
-octave_base_value::print (std::ostream&, bool) const
+octave_base_value::print (std::ostream&, bool)
 {
   gripe_wrong_type_arg ("octave_base_value::print ()", type_name ());
 }
@@ -1089,10 +1091,8 @@
   return false;
 }
 
-#if defined (HAVE_HDF5)
-
 bool
-octave_base_value::save_hdf5 (hid_t, const char *, bool)
+octave_base_value::save_hdf5 (octave_hdf5_id, const char *, bool)
 {
   gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ());
 
@@ -1100,15 +1100,13 @@
 }
 
 bool
-octave_base_value::load_hdf5 (hid_t, const char *)
+octave_base_value::load_hdf5 (octave_hdf5_id, const char *)
 {
   gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ());
 
   return false;
 }
 
-#endif
-
 int
 octave_base_value::write (octave_stream&, int, oct_data_conv::data_type,
                           int, oct_mach_info::float_format) const
@@ -1256,6 +1254,24 @@
     return names[umap];
 }
 
+void
+octave_base_value::gripe_load (const char *type) const
+{
+  warning_with_id
+    ("Octave:load-save-unavailable",
+     "%s: loading %s files not available in this version of Octave",
+     t_name.c_str (), type);
+}
+
+void
+octave_base_value::gripe_save (const char *type) const
+{
+  warning_with_id
+    ("Octave:load-save-unavailable",
+     "%s: saving %s files not available in this version of Octave",
+     t_name.c_str (), type);
+}
+
 octave_value
 octave_base_value::map (unary_mapper_t umap) const
 {
@@ -1536,6 +1552,111 @@
   return new octave_cell ();
 }
 
+static inline octave_value_list
+sanitize (const octave_value_list& ovl)
+{
+  octave_value_list retval = ovl;
+
+  for (octave_idx_type i = 0; i < ovl.length (); i++)
+    {
+      if (retval(i).is_magic_colon ())
+        retval(i) = ":";
+    }
+
+  return retval;
+}
+
+octave_value
+make_idx_args (const std::string& type,
+               const std::list<octave_value_list>& idx,
+               const std::string& who)
+{
+  octave_value retval;
+
+  size_t len = type.length ();
+
+  if (len == idx.size ())
+    {
+      Cell type_field (1, len);
+      Cell subs_field (1, len);
+
+      std::list<octave_value_list>::const_iterator p = idx.begin ();
+
+      for (size_t i = 0; i < len; i++)
+        {
+          char t = type[i];
+
+          switch (t)
+            {
+            case '(':
+              type_field(i) = "()";
+              subs_field(i) = Cell (sanitize (*p++));
+              break;
+
+            case '{':
+              type_field(i) = "{}";
+              subs_field(i) = Cell (sanitize (*p++));
+              break;
+
+            case '.':
+              {
+                type_field(i) = ".";
+
+                octave_value_list vlist = *p++;
+
+                if (vlist.length () == 1)
+                  {
+                    octave_value val = vlist(0);
+
+                    if (val.is_string ())
+                      subs_field(i) = val;
+                    else
+                      {
+                        error ("string argument required for '.' index");
+                        return retval;
+                      }
+                  }
+                else
+                  {
+                    error ("only single argument permitted for '.' index");
+                    return retval;
+                  }
+              }
+              break;
+
+            default:
+              panic_impossible ();
+              break;
+            }
+        }
+
+      octave_map m;
+
+      m.assign ("type", type_field);
+      m.assign ("subs", subs_field);
+
+      retval = m;
+    }
+  else
+    error ("invalid index for %s", who.c_str ());
+
+  return retval;
+}
+
+bool
+called_from_builtin (void)
+{
+  octave_function *fcn = octave_call_stack::caller ();
+
+  // FIXME: we probably need a better check here, or some other
+  // mechanism to avoid overloaded functions when builtin is used.
+  // For example, what if someone overloads the builtin function?
+  // Also, are there other places where using builtin is not properly
+  // avoiding dispatch?
+
+  return (fcn && fcn->name () == "builtin");
+}
+
 void
 install_base_type_conversions (void)
 {
--- a/libinterp/octave-value/ov-base.h
+++ b/libinterp/octave-value/ov-base.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -36,7 +36,7 @@
 #include "str-vec.h"
 
 #include "error.h"
-#include "oct-hdf5.h"
+#include "oct-hdf5-id.h"
 
 class Cell;
 class mxArray;
@@ -219,7 +219,7 @@
   virtual octave_base_value *
   empty_clone (void) const;
 
-  // Unique clone. Usually clones, but may be overriden to fake the
+  // Unique clone. Usually clones, but may be overridden to fake the
   // cloning when sharing copies is to be controlled from within an
   // instance (see octave_class).
   virtual octave_base_value *
@@ -287,7 +287,7 @@
                   const std::list<octave_value_list>& idx,
                   const octave_value& rhs);
 
-  virtual idx_vector index_vector (void) const;
+  virtual idx_vector index_vector (bool require_integers = false) const;
 
   virtual dim_vector dims (void) const { return dim_vector (); }
 
@@ -366,6 +366,8 @@
 
   virtual bool is_object (void) const { return false; }
 
+  virtual bool is_classdef_object (void) const { return false; }
+
   virtual bool is_java (void) const { return false; }
 
   virtual bool is_cs_list (void) const { return false; }
@@ -583,6 +585,9 @@
   virtual octave_base_value *unique_parent_class (const std::string&)
   { return 0; }
 
+  virtual bool is_instance_of (const std::string&) const
+  { return false; }
+
   virtual octave_function *function_value (bool silent = false);
 
   virtual octave_user_function *user_function_value (bool silent = false);
@@ -606,7 +611,7 @@
 
   virtual bool print_as_scalar (void) const { return false; }
 
-  virtual void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  virtual void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   virtual void
   print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
@@ -631,13 +636,11 @@
   virtual bool load_binary (std::istream& is, bool swap,
                             oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
   virtual bool
-  save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
   virtual bool
-  load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   virtual int
   write (octave_stream& os, int block_size,
@@ -761,7 +764,7 @@
   virtual bool
   fast_elem_insert (octave_idx_type n, const octave_value& x);
 
-  // This is a helper for the above, to be overriden in scalar types.  The
+  // This is a helper for the above, to be overridden in scalar types.  The
   // whole point is to handle the insertion efficiently with just *two* VM
   // calls, which is basically the theoretical minimum.
   virtual bool
@@ -816,6 +819,9 @@
 
   static const char *get_umap_name (unary_mapper_t);
 
+  void gripe_load (const char *type) const;
+  void gripe_save (const char *type) const;
+
 private:
 
   static int curr_print_indent_level;
@@ -828,4 +834,16 @@
 // is memory to be saved
 extern OCTINTERP_API bool Vsparse_auto_mutate;
 
+// Utility function to convert C++ arguments used in subsref/subsasgn into an
+// octave_value_list object that can be used to call a function/method in the
+// interpreter.
+extern OCTINTERP_API octave_value
+make_idx_args (const std::string& type,
+               const std::list<octave_value_list>& idx,
+               const std::string& who);
+
+// Tells whether some regular octave_value_base methods are being called from
+// within the "builtin" function.
+extern OCTINTERP_API bool called_from_builtin (void);
+
 #endif
--- a/libinterp/octave-value/ov-bool-mat.cc
+++ b/libinterp/octave-value/ov-bool-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -36,6 +36,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 #include "ov-base-mat.h"
@@ -52,7 +53,6 @@
 
 template class octave_base_matrix<boolNDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_bool_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_bool_matrix,
                                      "bool matrix", "logical");
@@ -79,7 +79,7 @@
 
   if (matrix.ndims () == 2)
     {
-      boolMatrix bm = matrix.matrix_value ();
+      boolMatrix bm (matrix);
 
       octave_idx_type nr = bm.rows ();
       octave_idx_type nc = bm.cols ();
@@ -409,20 +409,22 @@
   return true;
 }
 
+bool
+octave_bool_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                               bool /* save_as_floats */)
+{
+  bool retval = true;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_bool_matrix::save_hdf5 (hid_t loc_id, const char *name,
-                               bool /* save_as_floats */)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   boolNDArray m = bool_array_value ();
 
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
@@ -459,14 +461,20 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_bool_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_bool_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -524,11 +532,13 @@
 
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_bool_matrix::as_mxArray (void) const
 {
@@ -551,7 +561,7 @@
 @deftypefn {Built-in Function} {} logical (@var{x})\n\
 Convert the numeric object @var{x} to logical type.\n\
 \n\
-Any non-zero values will be converted to true (1) while zero values\n\
+Any nonzero values will be converted to true (1) while zero values\n\
 will be converted to false (0).  The non-numeric value NaN cannot be\n\
 converted and will produce an error.\n\
 \n\
--- a/libinterp/octave-value/ov-bool-mat.h
+++ b/libinterp/octave-value/ov-bool-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 
 #include "error.h"
 #include "oct-stream.h"
@@ -88,8 +87,10 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  idx_vector index_vector (void) const
-  { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); }
+  idx_vector index_vector (bool /* require_integers */ = false) const
+  {
+    return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix));
+  }
 
   builtin_type_t builtin_type (void) const { return btyp_bool; }
 
@@ -133,10 +134,10 @@
   { return double_value (frc_str_conv); }
 
   Matrix matrix_value (bool = false) const
-  { return Matrix (matrix.matrix_value ()); }
+  { return Matrix (boolMatrix (matrix)); }
 
   FloatMatrix float_matrix_value (bool = false) const
-  { return FloatMatrix (matrix.matrix_value ()); }
+  { return FloatMatrix (boolMatrix (matrix)); }
 
   NDArray array_value (bool = false) const
   { return NDArray (matrix); }
@@ -149,10 +150,10 @@
   FloatComplex float_complex_value (bool = false) const;
 
   ComplexMatrix complex_matrix_value (bool = false) const
-  { return ComplexMatrix (matrix.matrix_value ( )); }
+  { return ComplexMatrix (boolMatrix (matrix)); }
 
   FloatComplexMatrix float_complex_matrix_value (bool = false) const
-  { return FloatComplexMatrix (matrix.matrix_value ( )); }
+  { return FloatComplexMatrix (boolMatrix (matrix)); }
 
   ComplexNDArray complex_array_value (bool = false) const
   { return ComplexNDArray (matrix); }
@@ -174,19 +175,19 @@
   }
 
   boolMatrix bool_matrix_value (bool = false) const
-  { return matrix.matrix_value (); }
+  { return boolMatrix (matrix); }
 
   boolNDArray bool_array_value (bool = false) const
   { return matrix; }
 
   SparseMatrix sparse_matrix_value (bool = false) const
-  { return SparseMatrix (Matrix (matrix.matrix_value ())); }
+  { return SparseMatrix (Matrix (boolMatrix (matrix))); }
 
   SparseComplexMatrix sparse_complex_matrix_value (bool = false) const
-  { return SparseComplexMatrix (ComplexMatrix (matrix.matrix_value ())); }
+  { return SparseComplexMatrix (ComplexMatrix (boolMatrix (matrix))); }
 
   SparseBoolMatrix sparse_bool_matrix_value (bool = false) const
-  { return SparseBoolMatrix (matrix.matrix_value ()); }
+  { return SparseBoolMatrix (boolMatrix (matrix)); }
 
   octave_value convert_to_str_internal (bool pad, bool force, char type) const;
 
@@ -204,11 +205,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -230,7 +229,6 @@
 
 protected:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-bool-sparse.cc
+++ b/libinterp/octave-value/ov-bool-sparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -40,6 +40,8 @@
 #include "ops.h"
 #include "oct-locbuf.h"
 
+#include "oct-hdf5.h"
+
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 #include "ov-bool-sparse.h"
@@ -49,7 +51,6 @@
 
 template class OCTINTERP_API octave_base_sparse<SparseBoolMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_sparse_bool_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_bool_matrix,
                                      "sparse bool matrix", "logical");
@@ -225,16 +226,16 @@
 
   int32_t itmp;
   // Use negative value for ndims to be consistent with other formats
-  itmp= -2;
+  itmp = -2;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nr;
+  itmp = nr;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nc;
+  itmp = nc;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nz;
+  itmp = nz;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
   // add one to the printed indices to go from
@@ -337,11 +338,13 @@
   return true;
 }
 
+bool
+octave_sparse_bool_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_sparse_bool_matrix::save_hdf5 (hid_t loc_id, const char *name, bool)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
@@ -358,8 +361,8 @@
   if (group_hid < 0)
     return false;
 
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   SparseBoolMatrix m = sparse_bool_matrix_value ();
   octave_idx_type tmp;
   hsize_t hdims[2];
@@ -545,12 +548,20 @@
   H5Sclose (space_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+  
   return retval;
 }
 
 bool
-octave_sparse_bool_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_sparse_bool_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   octave_idx_type nr, nc, nz;
   hid_t group_hid, data_hid, space_hid;
   hsize_t rank;
@@ -567,7 +578,7 @@
 #else
   group_hid = H5Gopen (loc_id, name);
 #endif
-  if (group_hid < 0 ) return false;
+  if (group_hid < 0) return false;
 
 #if HAVE_HDF5_18
   data_hid = H5Dopen (group_hid, "nr", H5P_DEFAULT);
@@ -759,7 +770,7 @@
     }
 
   OCTAVE_LOCAL_BUFFER (hbool_t, htmp, nz);
-  bool retval = false;
+
   if (H5Dread (data_hid, H5T_NATIVE_HBOOL, H5S_ALL, H5S_ALL,
                H5P_DEFAULT, htmp) >= 0
       && m.indices_ok ())
@@ -776,11 +787,13 @@
   H5Dclose (data_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_sparse_bool_matrix::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-bool-sparse.h
+++ b/libinterp/octave-value/ov-bool-sparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -86,8 +85,10 @@
   octave_base_value *try_narrowing_conversion (void);
 
   // FIXME Adapt idx_vector to allow sparse logical indexing without overflow!!
-  idx_vector index_vector (void) const
-  { return idx_vector (matrix); }
+  idx_vector index_vector (bool /* require_integers */ = false) const
+  {
+    return idx_vector (matrix);
+  }
 
   builtin_type_t builtin_type (void) const { return btyp_bool; }
 
@@ -134,11 +135,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -151,7 +150,6 @@
 
 protected:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-bool.cc
+++ b/libinterp/octave-value/ov-bool.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,6 +30,7 @@
 
 #include "gripes.h"
 #include "mxarray.h"
+#include "oct-hdf5.h"
 #include "oct-obj.h"
 #include "ops.h"
 #include "ov-bool.h"
@@ -46,7 +47,6 @@
 
 template class octave_base_scalar<bool>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_bool);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_bool, "bool", "logical");
 
@@ -158,15 +158,17 @@
   return true;
 }
 
+bool
+octave_bool::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                        bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_bool::save_hdf5 (hid_t loc_id, const char *name,
-                        bool /* save_as_floats */)
-{
   hsize_t dimens[3];
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;
@@ -190,12 +192,18 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_bool::load_hdf5 (hid_t loc_id, const char *name)
+octave_bool::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -223,11 +231,13 @@
 
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return true;
 }
 
-#endif
-
 mxArray *
 octave_bool::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-bool.h
+++ b/libinterp/octave-value/ov-bool.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,7 +30,6 @@
 
 #include "lo-utils.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "oct-stream.h"
@@ -72,7 +71,7 @@
   octave_value do_index_op (const octave_value_list& idx,
                             bool resize_ok = false);
 
-  idx_vector index_vector (void) const { return idx_vector (scalar); }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (scalar); }
 
   builtin_type_t builtin_type (void) const { return btyp_bool; }
 
@@ -219,11 +218,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -244,7 +241,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-builtin.cc
+++ b/libinterp/octave-value/ov-builtin.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,7 +33,6 @@
 #include "toplev.h"
 #include "unwind-prot.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_builtin);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_builtin,
                                      "built-in function",
@@ -127,7 +126,7 @@
 
       try
         {
-          BEGIN_PROFILER_BLOCK (profiler_name ())
+          BEGIN_PROFILER_BLOCK (octave_builtin)
 
           retval = (*f) (args, nargout);
           // Do not allow null values to be returned from functions.
--- a/libinterp/octave-value/ov-builtin.h
+++ b/libinterp/octave-value/ov-builtin.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -110,7 +110,6 @@
 
   octave_builtin& operator = (const octave_builtin& ob);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-cell.cc
+++ b/libinterp/octave-value/ov-cell.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -42,6 +42,7 @@
 #include "mxarray.h"
 #include "ov-cell.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "unwind-prot.h"
 #include "utils.h"
 #include "ov-base-mat.h"
@@ -124,7 +125,6 @@
 
 template class octave_base_matrix<Cell>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_cell);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_cell, "cell", "cell");
 
@@ -687,7 +687,7 @@
 }
 
 void
-octave_cell::print (std::ostream& os, bool) const
+octave_cell::print (std::ostream& os, bool)
 {
   print_raw (os);
 }
@@ -1066,18 +1066,19 @@
   return matrix.mex_get_data ();
 }
 
+bool
+octave_cell::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats)
+{
 #if defined (HAVE_HDF5)
 
-bool
-octave_cell::save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   hsize_t rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1, size_hid = -1;
+  hid_t space_hid, data_hid, size_hid;
+  space_hid = data_hid = size_hid = -1;
 
 #if HAVE_HDF5_18
   data_hid = H5Gcreate (loc_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1156,15 +1157,22 @@
   H5Gclose (data_hid);
 
   return true;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_cell::load_hdf5 (hid_t loc_id, const char *name)
+octave_cell::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   clear_cellstr_cache ();
 
-  bool retval = false;
-
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -1260,11 +1268,13 @@
       retval = true;
     }
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 DEFUN (iscell, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} iscell (@var{x})\n\
--- a/libinterp/octave-value/ov-cell.h
+++ b/libinterp/octave-value/ov-cell.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -31,7 +31,6 @@
 #include <memory>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "Cell.h"
@@ -147,7 +146,7 @@
 
   bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -162,11 +161,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   octave_value map (unary_mapper_t umap) const;
 
@@ -183,7 +180,6 @@
 
   mutable std::auto_ptr<Array<std::string> > cellstr_cache;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-ch-mat.cc
+++ b/libinterp/octave-value/ov-ch-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -42,7 +42,7 @@
 template class octave_base_matrix<charNDArray>;
 
 idx_vector
-octave_char_matrix::index_vector (void) const
+octave_char_matrix::index_vector (bool /* require_integers */) const
 {
   const char *p = matrix.data ();
   if (numel () == 1 && *p == ':')
--- a/libinterp/octave-value/ov-ch-mat.h
+++ b/libinterp/octave-value/ov-ch-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -87,7 +86,7 @@
   octave_base_value *empty_clone (void) const
   { return new octave_char_matrix (); }
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool require_integers = false) const;
 
   builtin_type_t builtin_type (void) const { return btyp_char; }
 
@@ -107,10 +106,10 @@
   { return float_value (frc_str_conv); }
 
   Matrix matrix_value (bool = false) const
-  { return Matrix (matrix.matrix_value ()); }
+  { return Matrix (charMatrix (matrix)); }
 
   FloatMatrix float_matrix_value (bool = false) const
-  { return FloatMatrix (matrix.matrix_value ()); }
+  { return FloatMatrix (charMatrix (matrix)); }
 
   NDArray array_value (bool = false) const
   { return NDArray (matrix); }
@@ -123,10 +122,10 @@
   FloatComplex float_complex_value (bool = false) const;
 
   ComplexMatrix complex_matrix_value (bool = false) const
-  { return ComplexMatrix (matrix.matrix_value ()); }
+  { return ComplexMatrix (charMatrix (matrix)); }
 
   FloatComplexMatrix float_complex_matrix_value (bool = false) const
-  { return FloatComplexMatrix (matrix.matrix_value ()); }
+  { return FloatComplexMatrix (charMatrix (matrix)); }
 
   ComplexNDArray complex_array_value (bool = false) const
   { return ComplexNDArray (matrix); }
@@ -135,7 +134,7 @@
   { return FloatComplexNDArray (matrix); }
 
   charMatrix char_matrix_value (bool = false) const
-  { return matrix.matrix_value (); }
+  { return charMatrix (matrix); }
 
   charNDArray char_array_value (bool = false) const
   { return matrix; }
--- a/libinterp/octave-value/ov-class.cc
+++ b/libinterp/octave-value/ov-class.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -44,6 +44,7 @@
 #include "ls-utils.h"
 #include "mxarray.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ov-class.h"
 #ifdef HAVE_JAVA
 #include "ov-java.h"
@@ -57,7 +58,6 @@
 #include "unwind-prot.h"
 #include "variables.h"
 
-DEFINE_OCTAVE_ALLOCATOR(octave_class);
 
 int octave_class::t_id (-1);
 
@@ -268,97 +268,6 @@
   error ("assignment to class element failed");
 }
 
-static inline octave_value_list
-sanitize (const octave_value_list& ovl)
-{
-  octave_value_list retval = ovl;
-
-  for (octave_idx_type i = 0; i < ovl.length (); i++)
-    {
-      if (retval(i).is_magic_colon ())
-        retval(i) = ":";
-    }
-
-  return retval;
-}
-
-static inline octave_value
-make_idx_args (const std::string& type,
-               const std::list<octave_value_list>& idx,
-               const std::string& who)
-{
-  octave_value retval;
-
-  size_t len = type.length ();
-
-  if (len == idx.size ())
-    {
-      Cell type_field (1, len);
-      Cell subs_field (1, len);
-
-      std::list<octave_value_list>::const_iterator p = idx.begin ();
-
-      for (size_t i = 0; i < len; i++)
-        {
-          char t = type[i];
-
-          switch (t)
-            {
-            case '(':
-              type_field(i) = "()";
-              subs_field(i) = Cell (sanitize (*p++));
-              break;
-
-            case '{':
-              type_field(i) = "{}";
-              subs_field(i) = Cell (sanitize (*p++));
-              break;
-
-            case '.':
-              {
-                type_field(i) = ".";
-
-                octave_value_list vlist = *p++;
-
-                if (vlist.length () == 1)
-                  {
-                    octave_value val = vlist(0);
-
-                    if (val.is_string ())
-                      subs_field(i) = val;
-                    else
-                      {
-                        error ("expecting character string argument for '.' index");
-                        return retval;
-                      }
-                  }
-                else
-                  {
-                    error ("expecting single argument for '.' index");
-                    return retval;
-                  }
-              }
-              break;
-
-            default:
-              panic_impossible ();
-              break;
-            }
-        }
-
-      octave_map m;
-
-      m.assign ("type", type_field);
-      m.assign ("subs", subs_field);
-
-      retval = m;
-    }
-  else
-    error ("invalid index for %s", who.c_str ());
-
-  return retval;
-}
-
 Cell
 octave_class::dotref (const octave_value_list& idx)
 {
@@ -398,20 +307,6 @@
   return retval;
 }
 
-static bool
-called_from_builtin (void)
-{
-  octave_function *fcn = octave_call_stack::caller ();
-
-  // FIXME: we probably need a better check here, or some other
-  // mechanism to avoid overloaded functions when builtin is used.
-  // For example, what if someone overloads the builtin function?
-  // Also, are there other places where using builtin is not properly
-  // avoiding dispatch?
-
-  return (fcn && fcn->name () == "builtin");
-}
-
 Matrix
 octave_class::size (void)
 {
@@ -991,7 +886,7 @@
 }
 
 idx_vector
-octave_class::index_vector (void) const
+octave_class::index_vector (bool require_integers) const
 {
   idx_vector retval;
 
@@ -1014,7 +909,7 @@
             // add one to the value returned as the index_vector method
             // expects it to be one based.
             retval = do_binary_op (octave_value::op_add, tmp (0),
-                                   octave_value (1.0)).index_vector ();
+                                   octave_value (1.0)).index_vector (require_integers);
         }
     }
   else
@@ -1120,6 +1015,35 @@
   return retval;
 }
 
+bool
+octave_class::is_instance_of (const std::string& cls_name) const
+{
+  bool retval = false;
+
+  if (cls_name == class_name ())
+    retval = true;
+  else
+    {
+      for (std::list<std::string>::const_iterator pit = parent_list.begin ();
+           pit != parent_list.end ();
+           pit++)
+        {
+          octave_map::const_iterator smap = map.seek (*pit);
+
+          const Cell& tmp = map.contents (smap);
+
+          const octave_value& vtmp = tmp(0);
+
+          retval = vtmp.is_instance_of (cls_name);
+
+          if (retval)
+            break;
+        }
+    }
+
+  return retval;
+}
+
 string_vector
 octave_class::all_strings (bool pad) const
 {
@@ -1139,7 +1063,7 @@
           if (tmp(0).is_string ())
             retval = tmp(0).all_strings (pad);
           else
-            error ("cname/char method did not return a character string");
+            error ("cname/char method did not return a string");
         }
     }
   else
@@ -1150,7 +1074,7 @@
 
 
 void
-octave_class::print (std::ostream& os, bool) const
+octave_class::print (std::ostream& os, bool)
 {
   print_raw (os);
 }
@@ -1279,7 +1203,8 @@
 bool
 octave_class::reconstruct_parents (void)
 {
-  bool retval = true, might_have_inheritance = false;
+  bool retval = true;
+  bool might_have_inheritance = false;
   std::string dbgstr = "dork";
 
   // First, check to see if there might be an issue with inheritance.
@@ -1287,10 +1212,10 @@
     {
       std::string  key = map.key (p);
       Cell         val = map.contents (p);
-      if ( val(0).is_object () )
+      if (val(0).is_object ())
         {
           dbgstr = "blork";
-          if ( key == val(0).class_name () )
+          if (key == val(0).class_name ())
             {
               might_have_inheritance = true;
               dbgstr = "cork";
@@ -1429,7 +1354,7 @@
                   success = false;
                 }
             }
-          else if (len == 0 )
+          else if (len == 0)
             {
               map = octave_map (dim_vector (1, 1));
               c_name = classname;
@@ -1573,7 +1498,7 @@
           success = false;
         }
     }
-  else if (len == 0 )
+  else if (len == 0)
     map = octave_map (dim_vector (1, 1));
   else
     panic_impossible ();
@@ -1581,11 +1506,11 @@
   return success;
 }
 
+bool
+octave_class::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats)
+{
 #if defined (HAVE_HDF5)
 
-bool
-octave_class::save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats)
-{
   hsize_t hdims[3];
   hid_t group_hid = -1;
   hid_t type_hid = -1;
@@ -1677,13 +1602,20 @@
     H5Gclose (group_hid);
 
   return true;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_class::load_hdf5 (hid_t loc_id, const char *name)
+octave_class::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   hid_t group_hid = -1;
   hid_t data_hid = -1;
   hid_t type_hid = -1;
@@ -1817,11 +1749,13 @@
   if (data_hid > 0)
     H5Gclose (group_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_class::as_mxArray (void) const
 {
@@ -1950,10 +1884,10 @@
       // Called as class constructor
       octave_function *fcn = octave_call_stack::caller ();
 
-      std::string id = args(1).string_value ();
+      if (args(1).is_string ())
+        {
+          std::string id = args(1).string_value ();
 
-      if (! error_state)
-        {
           if (fcn)
             {
               if (fcn->is_class_constructor (id) || fcn->is_class_method (id))
@@ -1998,7 +1932,7 @@
             error ("class: invalid call from outside class constructor or method");
         }
       else
-        error ("class: ID (class name) must be a character string");
+        error ("class: ID (class name) must be a string");
     }
 
   return retval;
@@ -2016,32 +1950,121 @@
 %!error class ()
 */
 
-DEFUN (__isa_parent__, args, ,
+DEFUN (isa, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} __isa_parent__ (@var{class}, @var{name})\n\
-Undocumented internal function.\n\
+@deftypefn {Function File} {} isa (@var{obj}, @var{classname})\n\
+Return true if @var{obj} is an object from the class @var{classname}.\n\
+\n\
+@var{classname} may also be one of the following class categories:\n\
+\n\
+@table @asis\n\
+@item @qcode{\"float\"}\n\
+Floating point value comprising classes @qcode{\"double\"} and\n\
+@qcode{\"single\"}.\n\
+\n\
+@item @qcode{\"integer\"}\n\
+Integer value comprising classes (u)int8, (u)int16, (u)int32, (u)int64.\n\
+\n\
+@item @qcode{\"numeric\"}\n\
+Numeric value comprising either a floating point or integer value.\n\
+@end table\n\
+\n\
+If @var{classname} is a cell array of string, a logical array of the same\n\
+size is returned, containing true for each class to which @var{obj}\n\
+belongs to.\n\
+\n\
+@seealso{class, typeinfo}\n\
 @end deftypefn")
 {
-  octave_value retval = false;
+  octave_value retval;
+
+  if (args.length () != 2)
+    {
+      print_usage ();
+      return retval;
+    }
 
-  if (args.length () == 2)
+  octave_value obj = args(0); // not const because of find_parent_class ()
+  const Array<std::string> cls = args(1).cellstr_value ();
+  if (error_state)
     {
-      octave_value cls = args(0);
-      octave_value nm = args(1);
+      error ("isa: CLASSNAME must be a string or cell array of strings");
+      return retval;
+    }
+
+  boolNDArray matches (cls.dims (), false);
+  const octave_idx_type n = cls.numel ();
+  for (octave_idx_type idx = 0; idx < n; idx++)
+    {
+      const std::string cl = cls(idx);
+      if ((cl == "float"   && obj.is_float_type   ())
+          || (cl == "integer" && obj.is_integer_type ())
+          || (cl == "numeric" && obj.is_numeric_type ())
+          || obj.class_name () == cl || obj.is_instance_of (cl))
+        matches(idx) = true;
+    }
+  return octave_value (matches);
+}
 
-      if (! error_state)
-        {
-          if (cls.find_parent_class (nm.string_value ()))
-            retval = true;
-        }
-      else
-        error ("__isa_parent__: expecting arguments to be character strings");
-    }
-  else
-    print_usage ();
+/*
+%!assert (isa ("char", "float"), false)
+%!assert (isa (logical (1), "float"), false)
+%!assert (isa (double (13), "float"), true)
+%!assert (isa (single (13), "float"), true)
+%!assert (isa (int8 (13), "float"), false)
+%!assert (isa (int16 (13), "float"), false)
+%!assert (isa (int32 (13), "float"), false)
+%!assert (isa (int64 (13), "float"), false)
+%!assert (isa (uint8 (13), "float"), false)
+%!assert (isa (uint16 (13), "float"), false)
+%!assert (isa (uint32 (13), "float"), false)
+%!assert (isa (uint64 (13), "float"), false)
+%!assert (isa ("char", "numeric"), false)
+%!assert (isa (logical (1), "numeric"), false)
+%!assert (isa (double (13), "numeric"), true)
+%!assert (isa (single (13), "numeric"), true)
+%!assert (isa (int8 (13), "numeric"), true)
+%!assert (isa (int16 (13), "numeric"), true)
+%!assert (isa (int32 (13), "numeric"), true)
+%!assert (isa (int64 (13), "numeric"), true)
+%!assert (isa (uint8 (13), "numeric"), true)
+%!assert (isa (uint16 (13), "numeric"), true)
+%!assert (isa (uint32 (13), "numeric"), true)
+%!assert (isa (uint64 (13), "numeric"), true)
+%!assert (isa (uint8 (13), "integer"), true)
+%!assert (isa (double (13), "integer"), false)
+%!assert (isa (single (13), "integer"), false)
+%!assert (isa (single (13), {"integer", "float", "single"}), [false true true])
 
-  return retval;
-}
+%!assert (isa (double (13), "double"))
+%!assert (isa (single (13), "single"))
+%!assert (isa (int8 (13), "int8"))
+%!assert (isa (int16 (13), "int16"))
+%!assert (isa (int32 (13), "int32"))
+%!assert (isa (int64 (13), "int64"))
+%!assert (isa (uint8 (13), "uint8"))
+%!assert (isa (uint16 (13), "uint16"))
+%!assert (isa (uint32 (13), "uint32"))
+%!assert (isa (uint64 (13), "uint64"))
+%!assert (isa ("string", "char"))
+%!assert (isa (true, "logical"))
+%!assert (isa (false, "logical"))
+%!assert (isa ({1, 2}, "cell"))
+%!assert (isa ({1, 2}, {"numeric", "integer", "cell"}), [false false true])
+
+%!testif HAVE_JAVA
+%! ## The first and last assert() are equal on purpose.  The assert() in
+%! ## the middle with an invalid class name will cause the java code to
+%! ## throw exceptions which we then must clear properly (or all other calls
+%! ## will fail).  So we test this too.
+%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number"))
+%! assert (isa (javaObject ("java.lang.Double", 10), "not_a_class"), false)
+%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number"))
+
+%!test
+%! a.b = 1;
+%! assert (isa (a, "struct"));
+*/
 
 DEFUN (__parent_classes__, args, ,
        "-*- texinfo -*-\n\
@@ -2068,7 +2091,7 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} isobject (@var{x})\n\
 Return true if @var{x} is a class object.\n\
-@seealso{class, typeinfo, isa, ismethod}\n\
+@seealso{class, typeinfo, isa, ismethod, isprop}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -2083,8 +2106,8 @@
 
 DEFUN (ismethod, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} ismethod (@var{x}, @var{method})\n\
-Return true if @var{x} is a class object and the string @var{method}\n\
+@deftypefn {Built-in Function} {} ismethod (@var{obj}, @var{method})\n\
+Return true if @var{obj} is a class object and the string @var{method}\n\
 is a method of this class.\n\
 @seealso{isprop, isobject}\n\
 @end deftypefn")
--- a/libinterp/octave-value/ov-class.h
+++ b/libinterp/octave-value/ov-class.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -33,7 +33,6 @@
 #include "str-vec.h"
 
 #include "error.h"
-#include "oct-alloc.h"
 #include "oct-map.h"
 #include "ov-base.h"
 #include "ov-typeinfo.h"
@@ -115,7 +114,7 @@
                                const std::list<octave_value_list>& idx,
                                const octave_value& rhs);
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool require_integers = false) const;
 
   dim_vector dims (void) const { return map.dims (); }
 
@@ -167,9 +166,11 @@
 
   octave_base_value *unique_parent_class (const std::string&);
 
+  bool is_instance_of (const std::string&) const;
+
   string_vector all_strings (bool pad) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -193,11 +194,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -205,7 +204,6 @@
 
   octave_map map;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
 public:
   int type_id (void) const { return t_id; }
new file mode 100644
--- /dev/null
+++ b/libinterp/octave-value/ov-classdef.cc
@@ -0,0 +1,4082 @@
+/*
+
+Copyright (C) 2012-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <algorithm>
+
+#include "defun.h"
+#include "load-path.h"
+#include "ov-builtin.h"
+#include "ov-classdef.h"
+#include "ov-fcn-handle.h"
+#include "ov-typeinfo.h"
+#include "ov-usr-fcn.h"
+#include "pt-assign.h"
+#include "pt-classdef.h"
+#include "pt-funcall.h"
+#include "pt-misc.h"
+#include "pt-stmt.h"
+#include "pt-walk.h"
+#include "singleton-cleanup.h"
+#include "symtab.h"
+#include "toplev.h"
+
+#include "Array.cc"
+
+// Define to 1 to enable debugging statements.
+#define DEBUG_TRACE 0
+
+static void
+gripe_method_access (const std::string& from, const cdef_method& meth)
+{
+  octave_value acc = meth.get ("Access");
+  std::string acc_s;
+
+  if (acc.is_string ())
+    acc_s = acc.string_value ();
+  else
+    acc_s = "class-restricted";
+
+  error ("%s: method `%s' has %s access and cannot be run in this context",
+         from.c_str (), meth.get_name ().c_str (), acc_s.c_str ());
+}
+
+static void
+gripe_property_access (const std::string& from, const cdef_property& prop,
+                       bool is_set = false)
+{
+  octave_value acc = prop.get (is_set ? "SetAccess" : "GetAccess");
+  std::string acc_s;
+
+  if (acc.is_string ())
+    acc_s = acc.string_value ();
+  else
+    acc_s = "class-restricted";
+
+  if (is_set)
+    error ("%s: property `%s' has %s access and cannot be set in this context",
+           from.c_str (), prop.get_name ().c_str (), acc_s.c_str ());
+  else
+    error ("%s: property `%s' has %s access and cannot be obtained in this context",
+           from.c_str (), prop.get_name ().c_str (), acc_s.c_str ());
+}
+
+static std::string
+get_base_name (const std::string& nm)
+{
+  std::string::size_type pos = nm.find_last_of ('.');
+
+  if (pos != std::string::npos)
+    return nm.substr (pos + 1);
+
+  return nm;
+}
+
+static void
+make_function_of_class (const std::string& class_name,
+                        const octave_value& fcn)
+{
+  octave_function *of = fcn.function_value ();
+
+  if (! error_state)
+    {
+      of->stash_dispatch_class (class_name);
+
+      octave_user_function *uf = of->user_function_value (true);
+
+      if (! error_state && uf)
+        {
+          if (get_base_name (class_name) == uf->name ())
+            {
+              uf->mark_as_class_constructor ();
+              uf->mark_as_classdef_constructor ();
+            }
+          else
+            uf->mark_as_class_method ();
+        }
+    }
+}
+
+static void
+make_function_of_class (const cdef_class& cls, const octave_value& fcn)
+{
+  make_function_of_class (cls.get_name (), fcn);
+}
+
+static octave_value
+make_fcn_handle (octave_builtin::fcn ff, const std::string& nm)
+{
+  octave_value fcn (new octave_builtin (ff, nm));
+
+  octave_value fcn_handle (new octave_fcn_handle (fcn, nm));
+
+  return fcn_handle;
+}
+
+static octave_value
+make_fcn_handle (const octave_value& fcn, const std::string& nm)
+{
+  octave_value retval;
+
+  if (fcn.is_defined ())
+    retval = octave_value (new octave_fcn_handle (fcn, nm));
+
+  return retval;
+}
+
+inline octave_value_list
+execute_ov (octave_value val, const octave_value_list& args, int nargout)
+{
+  std::list<octave_value_list> idx (1, args);
+
+  std::string type ("(");
+
+  return val.subsref (type, idx, nargout);
+}
+
+static cdef_class
+lookup_class (const std::string& name, bool error_if_not_found = true,
+              bool load_if_not_found = true)
+{
+  return cdef_manager::find_class (name, error_if_not_found,
+                                   load_if_not_found);
+}
+
+static cdef_class
+lookup_class (const cdef_class& cls)
+{
+  // FIXME: placeholder for the time being, the purpose
+  //        is to centralized any class update activity here.
+
+  return cls;
+}
+
+static cdef_class
+lookup_class (const octave_value& ov)
+{
+  if (ov.is_string())
+    return lookup_class (ov.string_value ());
+  else
+    {
+      cdef_class cls (to_cdef (ov));
+
+      if (! error_state)
+        return lookup_class (cls);
+    }
+
+  return cdef_class ();
+}
+
+static std::list<cdef_class>
+lookup_classes (const Cell& cls_list)
+{
+  std::list<cdef_class> retval;
+
+  for (int i = 0; i < cls_list.numel (); i++)
+    {
+      cdef_class c = lookup_class (cls_list(i));
+
+      if (! error_state)
+        retval.push_back (c);
+      else
+        {
+          retval.clear ();
+          break;
+        }
+    }
+
+  return retval;
+}
+
+static octave_value
+to_ov (const std::list<cdef_class>& class_list)
+{
+  Cell cls (class_list.size (), 1);
+  int i = 0;
+
+  for (std::list<cdef_class>::const_iterator it = class_list.begin ();
+       it != class_list.end (); ++it, ++i)
+    cls(i) = to_ov (*it);
+
+  return octave_value (cls);
+}
+
+static bool
+is_superclass (const cdef_class& clsa, const cdef_class& clsb,
+               bool allow_equal = true, int max_depth = -1)
+{
+  bool retval = false;
+
+  if (allow_equal && clsa == clsb)
+    retval = true;
+  else if (max_depth != 0)
+    {
+      Cell c = clsb.get ("SuperClasses").cell_value ();
+
+      for (int i = 0; ! error_state && ! retval && i < c.numel (); i++)
+        {
+          cdef_class cls = lookup_class (c(i));
+
+          if (! error_state)
+            retval = is_superclass (clsa, cls, true,
+                                    max_depth < 0 ? max_depth : max_depth-1);
+        }
+    }
+
+  return retval;
+}
+
+inline bool
+is_strict_superclass (const cdef_class& clsa, const cdef_class& clsb)
+{ return is_superclass (clsa, clsb, false); }
+
+inline bool
+is_direct_superclass (const cdef_class& clsa, const cdef_class& clsb)
+{ return is_superclass (clsa, clsb, false, 1); }
+
+static octave_value_list
+class_get_properties (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1 && args(0).type_name () == "object")
+    {
+      cdef_class cls (to_cdef (args(0)));
+
+      retval(0) = cls.get_properties ();
+    }
+
+  return retval;
+}
+
+static cdef_class
+get_class_context (std::string& name, bool& in_constructor)
+{
+  cdef_class cls;
+
+  octave_function* fcn = octave_call_stack::current ();
+
+  in_constructor = false;
+
+  if (fcn && (fcn->is_class_method ()
+              || fcn->is_classdef_constructor ()
+              || fcn->is_anonymous_function_of_class ()
+              || (fcn->is_private_function ()
+                  && ! fcn->dispatch_class ().empty ())))
+    {
+      cls = lookup_class (fcn->dispatch_class ());
+      if (! error_state)
+        {
+          name = fcn->name ();
+          in_constructor = fcn->is_classdef_constructor ();
+        }
+    }
+
+  return cls;
+}
+
+inline cdef_class
+get_class_context (void)
+{
+  std::string dummy_string;
+  bool dummy_bool;
+
+  return get_class_context (dummy_string, dummy_bool);
+}
+
+static bool
+in_class_method (const cdef_class& cls)
+{
+  cdef_class ctx = get_class_context ();
+
+  return (ctx.ok () && is_superclass (ctx, cls));
+}
+
+static bool
+check_access (const cdef_class& cls, const octave_value& acc,
+              const std::string& meth_name = std::string (),
+              const std::string& prop_name = std::string (),
+              bool is_prop_set = false)
+{
+  if (acc.is_string ())
+    {
+      std::string acc_s = acc.string_value ();
+
+      if (acc_s == "public")
+        return true;
+
+      cdef_class ctx = get_class_context ();
+
+      // The access is private or protected, this requires a
+      // valid class context.
+
+      if (! error_state && ctx.ok ())
+        {
+          if (acc_s == "private")
+            return (ctx == cls);
+          else if (acc_s == "protected")
+            {
+              if (is_superclass (cls, ctx))
+                // Calling a protected method in a superclass.
+                return true;
+              else if (is_strict_superclass (ctx, cls))
+                {
+                  // Calling a protected method or property in a derived class.
+                  // This is only allowed if the context class knows about it
+                  // and has access to it.
+
+                  if (! meth_name.empty ())
+                    {
+                      cdef_method m = ctx.find_method (meth_name);
+
+                      if (m.ok ())
+                        return check_access (ctx, m.get ("Access"), meth_name);
+
+                      return false;
+                    }
+                  else if (! prop_name.empty ())
+                    {
+                      cdef_property p = ctx.find_property (prop_name);
+
+                      if (p.ok ())
+                        {
+                          octave_value p_access = p.get (is_prop_set ?
+                                                         "SetAccess" :
+                                                         "GetAccess");
+
+                          return check_access (ctx, p_access, meth_name,
+                                               prop_name, is_prop_set);
+                        }
+
+                      return false;
+                    }
+                  else
+                    panic_impossible ();
+                }
+
+              return false;
+            }
+          else
+            panic_impossible ();
+        }
+    }
+  else if (acc.is_cell ())
+    {
+      Cell acc_c = acc.cell_value ();
+
+      cdef_class ctx = get_class_context ();
+
+      // At this point, a class context is always required.
+
+      if (! error_state && ctx.ok ())
+        {
+          if (ctx == cls)
+            return true;
+
+          for (int i = 0; ! error_state && i < acc.numel (); i++)
+            {
+              cdef_class acc_cls (to_cdef (acc_c(i)));
+
+              if (! error_state)
+                {
+                  if (is_superclass (acc_cls, ctx))
+                    return true;
+                }
+            }
+        }
+    }
+  else
+    error ("invalid property/method access in class `%s'",
+           cls.get_name ().c_str ());
+
+  return false;
+}
+
+static bool
+is_dummy_method (const octave_value& fcn)
+{
+  bool retval = false;
+
+  if (fcn.is_defined ())
+    {
+      if (fcn.is_user_function ())
+        {
+          octave_user_function *uf = fcn.user_function_value (true);
+
+          if (! uf || ! uf->body ())
+            retval = true;
+        }
+    }
+  else
+    retval = true;
+
+  return retval;
+}
+
+bool
+is_method_executing (const octave_value& ov, const cdef_object& obj)
+{
+  octave_function* stack_fcn = octave_call_stack::current ();
+
+  octave_function* method_fcn = ov.function_value (true);
+
+  // Does the top of the call stack match our target function?
+
+  if (stack_fcn && stack_fcn == method_fcn)
+    {
+      octave_user_function* uf = method_fcn->user_function_value (true);
+
+      // We can only check the context object for user-function (not builtin),
+      // where we have access to the parameters (arguments and return values).
+      // That's ok as there's no need to call this function for builtin
+      // methods.
+
+      if (uf)
+        {
+          // At this point, the method is executing, but we still need to
+          // check the context object for which the method is executing. For
+          // methods, it's the first argument of the function; for ctors, it
+          // is the first return value.
+
+          tree_parameter_list* pl = uf->is_classdef_constructor ()
+            ? uf->return_list () : uf->parameter_list ();
+
+          if (pl && pl->size () > 0)
+            {
+              octave_value arg0 = pl->front ()->lvalue ().value ();
+
+              if (arg0.is_defined () && arg0.type_name () == "object")
+                {
+                  cdef_object arg0_obj = to_cdef (arg0);
+
+                  return obj.is (arg0_obj);
+                }
+            }
+        }
+    }
+
+  return false;
+}
+
+static octave_value_list
+class_get_methods (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1 && args(0).type_name () == "object")
+    {
+      cdef_class cls (to_cdef (args(0)));
+
+      retval(0) = cls.get_methods ();
+    }
+
+  return retval;
+}
+
+static octave_value_list
+class_get_superclasses (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.class")
+    {
+      cdef_class cls (to_cdef (args(0)));
+
+      Cell classes = cls.get ("SuperClasses").cell_value ();
+
+      retval(0) = to_ov (lookup_classes (classes));
+    }
+
+  return retval;
+}
+
+static octave_value_list
+class_get_inferiorclasses (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.class")
+    {
+      cdef_class cls (to_cdef (args(0)));
+
+      Cell classes = cls.get ("InferiorClasses").cell_value ();
+
+      retval(0) = to_ov (lookup_classes (classes));
+    }
+
+  return retval;
+}
+
+static octave_value_list
+class_fromName (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1)
+    {
+      std::string name = args(0).string_value ();
+
+      if (! error_state)
+        retval(0) = to_ov (lookup_class (name));
+      else
+        error ("fromName: invalid class name, expected a string value");
+    }
+  else
+    error ("fromName: invalid number of parameters");
+
+  return retval;
+}
+
+static octave_value_list
+class_fevalStatic (const octave_value_list& args, int nargout)
+{
+  octave_value_list retval;
+
+  if (args.length () > 1 && args(0).type_name () == "object")
+    {
+      cdef_class cls (to_cdef (args(0)));
+
+      if (! error_state)
+        {
+          std::string meth_name = args(1).string_value ();
+
+          if (! error_state)
+            {
+              cdef_method meth = cls.find_method (meth_name);
+
+              if (meth.ok ())
+                {
+                  if (meth.is_static ())
+                    retval = meth.execute (args.splice (0, 2), nargout,
+                                           true, "fevalStatic");
+                  else
+                    error ("fevalStatic: method `%s' is not static",
+                           meth_name.c_str ());
+                }
+              else
+                error ("fevalStatic: method not found: %s",
+                       meth_name.c_str ());
+            }
+          else
+            error ("fevalStatic: invalid method name, expected a string value");
+        }
+      error ("fevalStatic: invalid object, expected a meta.class object");
+    }
+  else
+    error ("fevalStatic: invalid arguments");
+
+  return retval;
+}
+
+static octave_value_list
+class_getConstant (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 2 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.class")
+    {
+      cdef_class cls = to_cdef (args(0));
+
+      if (! error_state)
+        {
+          std::string prop_name = args(1).string_value ();
+
+          if (! error_state)
+            {
+              cdef_property prop = cls.find_property (prop_name);
+
+              if (prop.ok ())
+                {
+                  if (prop.is_constant ())
+                    retval(0) = prop.get_value (true, "getConstant");
+                  else
+                    error ("getConstant: property `%s' is not constant",
+                           prop_name.c_str ());
+                }
+              else
+                error ("getConstant: property not found: %s",
+                       prop_name.c_str ());
+            }
+          else
+            error ("getConstant: invalid property name, expected a string value");
+        }
+      else
+        error ("getConstant: invalid object, expected a meta.class object");
+    }
+  else
+    error ("getConstant: invalid arguments");
+
+  return retval;
+}
+
+#define META_CLASS_CMP(OP, CLSA, CLSB, FUN) \
+static octave_value_list \
+class_ ## OP (const octave_value_list& args, int /* nargout */) \
+{ \
+  octave_value_list retval; \
+\
+  if (args.length () == 2 \
+      && args(0).type_name () == "object" \
+      && args(1).type_name () == "object" \
+      && args(0).class_name () == "meta.class" \
+      && args(1).class_name () == "meta.class") \
+    { \
+      cdef_class clsa = to_cdef (args(0)); \
+\
+      cdef_class clsb = to_cdef (args(1)); \
+\
+      if (! error_state) \
+        retval(0) = FUN (CLSA, CLSB); \
+      else \
+        error (#OP ": invalid objects, expected meta.class objects"); \
+    } \
+  else \
+    error (#OP ": invalid arguments"); \
+\
+  return retval; \
+}
+
+META_CLASS_CMP (lt, clsb, clsa, is_strict_superclass)
+META_CLASS_CMP (le, clsb, clsa, is_superclass)
+META_CLASS_CMP (gt, clsa, clsb, is_strict_superclass)
+META_CLASS_CMP (ge, clsa, clsb, is_superclass)
+META_CLASS_CMP (eq, clsa, clsb, operator==)
+META_CLASS_CMP (ne, clsa, clsb, operator!=)
+
+octave_value_list
+property_get_defaultvalue (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1 && args(0).type_name () == "object")
+    {
+      cdef_property prop (to_cdef (args(0)));
+
+      retval(0) = prop.get ("DefaultValue");
+
+      if (! retval(0).is_defined ())
+        error_with_id ("Octave:class:NotDefaultDefined",
+                       "no default value for property `%s'",
+                       prop.get_name ().c_str ());
+    }
+
+  return retval;
+}
+
+static octave_value_list
+handle_delete (const octave_value_list& /* args */, int /* nargout */)
+{
+  octave_value_list retval;
+
+  // FIXME: implement this
+
+  return retval;
+}
+
+static cdef_class
+make_class (const std::string& name,
+            const std::list<cdef_class>& super_list = std::list<cdef_class> ())
+{
+  cdef_class cls (name, super_list);
+
+  cls.set_class (cdef_class::meta_class ());
+  cls.put ("Abstract", false);
+  cls.put ("ConstructOnLoad", false);
+  cls.put ("ContainingPackage", Matrix ());
+  cls.put ("Description", std::string ());
+  cls.put ("DetailedDescription", std::string ());
+  cls.put ("Events", Cell ());
+  cls.put ("Hidden", false);
+  cls.put ("InferiorClasses", Cell ());
+  cls.put ("Methods", Cell ());
+  cls.put ("Properties", Cell ());
+  cls.put ("Sealed", false);
+
+  if (name == "handle")
+    {
+      cls.put ("HandleCompatible", true);
+      cls.mark_as_handle_class ();
+    }
+  else if (super_list.empty ())
+    {
+      cls.put ("HandleCompatible", false);
+    }
+  else
+    {
+      bool all_handle_compatible = true;
+      bool has_handle_class = false;
+
+      for (std::list<cdef_class>::const_iterator it = super_list.begin ();
+           it != super_list.end (); ++it)
+        {
+          all_handle_compatible = all_handle_compatible
+                                  && it->get ("HandleCompatible").bool_value ();
+          has_handle_class = has_handle_class || it->is_handle_class ();
+        }
+
+      if (has_handle_class && ! all_handle_compatible)
+        ::error ("%s: cannot mix handle and non-HandleCompatible classes",
+                 name.c_str ());
+      else
+        {
+          cls.put ("HandleCompatible", all_handle_compatible);
+          if (has_handle_class)
+            cls.mark_as_handle_class ();
+        }
+    }
+
+  if (error_state)
+    return cdef_class ();
+
+  if (! name.empty ())
+    cdef_manager::register_class (cls);
+
+  return cls;
+}
+
+static cdef_class
+make_class (const std::string& name, const cdef_class& super)
+{
+  return make_class (name, std::list<cdef_class> (1, super));
+}
+
+static cdef_class
+make_meta_class (const std::string& name, const cdef_class& super)
+{
+  cdef_class cls = make_class (name, super);
+
+  cls.put ("Sealed", true);
+  cls.mark_as_meta_class ();
+
+  return cls;
+}
+
+static cdef_property
+make_property (const cdef_class& cls, const std::string& name,
+               const octave_value& get_method = Matrix (),
+               const std::string& get_access = "public",
+               const octave_value& set_method = Matrix (),
+               const std::string& set_access = "public")
+{
+  cdef_property prop (name);
+
+  prop.set_class (cdef_class::meta_property ());
+  prop.put ("Description", std::string ());
+  prop.put ("DetailedDescription", std::string ());
+  prop.put ("Abstract", false);
+  prop.put ("Constant", false);
+  prop.put ("GetAccess", get_access);
+  prop.put ("SetAccess", set_access);
+  prop.put ("Dependent", false);
+  prop.put ("Transient", false);
+  prop.put ("Hidden", false);
+  prop.put ("GetObservable", false);
+  prop.put ("SetObservable", false);
+  prop.put ("GetMethod", get_method);
+  prop.put ("SetMethod", set_method);
+  prop.put ("DefiningClass", to_ov (cls));
+  prop.put ("DefaultValue", octave_value ());
+  prop.put ("HasDefault", false);
+
+  std::string class_name = cls.get_name ();
+
+  if (! get_method.is_empty ())
+    make_function_of_class (class_name, get_method);
+  if (! set_method.is_empty ())
+    make_function_of_class (class_name, set_method);
+
+  return prop;
+}
+
+inline cdef_property
+make_attribute (const cdef_class& cls, const std::string& name)
+{
+  return make_property (cls, name, Matrix (), "public", Matrix (), "private");
+}
+
+static cdef_method
+make_method (const cdef_class& cls, const std::string& name,
+             const octave_value& fcn,const std::string& m_access = "public",
+             bool is_static = false)
+{
+  cdef_method meth (name);
+
+  meth.set_class (cdef_class::meta_method ());
+  meth.put ("Abstract", false);
+  meth.put ("Access", m_access);
+  meth.put ("DefiningClass", to_ov (cls));
+  meth.put ("Description", std::string ());
+  meth.put ("DetailedDescription", std::string ());
+  meth.put ("Hidden", false);
+  meth.put ("Sealed", true);
+  meth.put ("Static", is_static);
+
+  if (fcn.is_defined ())
+    make_function_of_class (cls, fcn);
+
+  meth.set_function (fcn);
+
+  if (is_dummy_method (fcn))
+    meth.mark_as_external (cls.get_name ());
+
+  return meth;
+}
+
+inline cdef_method
+make_method (const cdef_class& cls, const std::string& name,
+             octave_builtin::fcn ff, const std::string& m_access = "public",
+             bool is_static = false)
+{
+  octave_value fcn (new octave_builtin (ff, name));
+
+  return make_method (cls, name, fcn, m_access, is_static);
+}
+
+static cdef_package
+make_package (const std::string& nm,
+              const std::string& parent = std::string ())
+{
+  cdef_package pack (nm);
+
+  pack.set_class (cdef_class::meta_package ());
+  if (parent.empty ())
+    pack.put ("ContainingPackage", Matrix ());
+  else
+    pack.put ("ContainingPackage", to_ov (cdef_manager::find_package (parent)));
+
+  if (! nm.empty ())
+    cdef_manager::register_package (pack);
+
+  return pack;
+}
+
+//----------------------------------------------------------------------------
+
+
+int octave_classdef::t_id (-1);
+
+const std::string octave_classdef::t_name ("object");
+
+void
+octave_classdef::register_type (void)
+{
+  t_id = octave_value_typeinfo::register_type
+    (octave_classdef::t_name, "<unknown>",
+     octave_value (new octave_classdef ()));
+}
+
+octave_value_list
+octave_classdef::subsref (const std::string& type,
+                          const std::list<octave_value_list>& idx,
+                          int nargout)
+{
+  size_t skip = 0;
+  octave_value_list retval;
+
+  cdef_class cls = object.get_class ();
+
+  if (! in_class_method (cls) && ! called_from_builtin ())
+    {
+      cdef_method meth = cls.find_method ("subsref");
+
+      if (meth.ok ())
+        {
+          octave_value_list args;
+
+          args(1) = make_idx_args (type, idx, "subsref");
+
+          if (! error_state)
+            {
+              count++;
+              args(0) = octave_value (this);
+
+              retval = meth.execute (args, nargout, true, "subsref");
+            }
+
+          return retval;
+        }
+    }
+
+  // At this point, the default subsref mechanism must be used.
+
+  retval = object.subsref (type, idx, nargout, skip, cdef_class ());
+
+  if (! error_state)
+    {
+      if (type.length () > skip && idx.size () > skip)
+        retval = retval(0).next_subsref (nargout, type, idx, skip);
+    }
+
+  return retval;
+}
+
+octave_value
+octave_classdef::subsref (const std::string& type,
+                          const std::list<octave_value_list>& idx,
+                          bool auto_add)
+{
+  size_t skip = 0;
+  octave_value_list retval;
+
+  // This variant of subsref is used to create temporary values when doing
+  // assignment with multi-level indexing. AFAIK this is only used for internal
+  // purpose (not sure we should even implement this) and any overload subsref
+  // should not be called.
+
+  retval = object.subsref (type, idx, 1, skip, cdef_class (), auto_add);
+
+  if (! error_state)
+    {
+      if (type.length () > skip && idx.size () > skip)
+        retval = retval(0).next_subsref (1, type, idx, skip);
+    }
+
+  return retval.length () > 0 ? retval(0) : octave_value ();
+}
+
+octave_value
+octave_classdef::subsasgn (const std::string& type,
+                           const std::list<octave_value_list>& idx,
+                           const octave_value& rhs)
+{
+  octave_value retval;
+
+  cdef_class cls = object.get_class ();
+
+  if (! in_class_method (cls) && ! called_from_builtin ())
+    {
+      cdef_method meth = cls.find_method ("subsasgn");
+
+      if (meth.ok ())
+        {
+          octave_value_list args;
+
+          args(1) = make_idx_args (type, idx, "subsasgn");
+
+          if (! error_state)
+            {
+              count++;
+              args(0) = octave_value (this);
+              args(2) = rhs;
+
+              octave_value_list retlist;
+
+              retlist = meth.execute (args, 1, true, "subsasgn");
+
+              if (! error_state)
+                {
+                  if (retlist.length () > 0)
+                    retval = retlist(0);
+                  else
+                    ::error ("overloaded method `subsasgn' did not return any value");
+                }
+            }
+        }
+    }
+
+  if (! error_state && ! retval.is_defined ())
+    retval = object.subsasgn (type, idx, rhs);
+
+  return retval;
+}
+
+octave_value
+octave_classdef::undef_subsasgn (const std::string& type,
+                                 const std::list<octave_value_list>& idx,
+                                 const octave_value& rhs)
+{
+  if (type.length () == 1 && type[0] == '(')
+    {
+      object = object.make_array ();
+
+      if (! error_state)
+        return subsasgn (type, idx, rhs);
+    }
+  else
+    return octave_base_value::undef_subsasgn (type, idx, rhs);
+
+  return octave_value ();
+}
+
+void
+octave_classdef::print (std::ostream& os, bool)
+{
+  if (! called_from_builtin ())
+    {
+      cdef_method meth = object.get_class ().find_method ("disp");
+
+      if (meth.ok ())
+        {
+          octave_value_list args;
+
+          count++;
+          args(0) = octave_value (this);
+
+          indent (os);
+          meth.execute (args, 0, true, "disp");
+
+          return;
+        }
+    }
+
+  print_raw (os);
+}
+
+void
+octave_classdef::print_raw (std::ostream& os, bool) const
+{
+  indent (os);
+  os << "<object ";
+  if (object.is_array ())
+    os << "array ";
+  os << class_name () << ">";
+  newline (os);
+}
+
+bool
+octave_classdef::print_name_tag (std::ostream& os,
+                                 const std::string& name) const
+{
+  return octave_base_value::print_name_tag (os, name);
+}
+
+void
+octave_classdef::print_with_name (std::ostream& os, const std::string& name,
+                                  bool print_padding)
+{
+  cdef_method meth = object.get_class ().find_method ("display");
+
+  if (meth.ok ())
+    {
+      octave_value_list args;
+
+      count++;
+      args(0) = octave_value (this);
+
+      string_vector arg_names (1);
+
+      arg_names[0] = name;
+      args.stash_name_tags (arg_names);
+
+      indent (os);
+      meth.execute (args, 0, true, "display");
+    }
+  else
+    octave_base_value::print_with_name (os, name, print_padding);
+}
+
+bool
+octave_classdef::is_instance_of (const std::string& cls_name) const
+{
+  cdef_class cls = lookup_class (cls_name, false, false);
+
+  if (cls.ok ())
+    return is_superclass (cls, object.get_class ());
+
+  return false;
+}
+
+//----------------------------------------------------------------------------
+
+class octave_classdef_meta : public octave_function
+{
+public:
+  octave_classdef_meta (const cdef_meta_object& obj)
+    : object (obj) { }
+
+  ~octave_classdef_meta (void)
+  { object.meta_release (); }
+
+  octave_function* function_value (bool = false) { return this; }
+
+  octave_value_list
+  subsref (const std::string& type,
+           const std::list<octave_value_list>& idx,
+           int nargout)
+  { return object.meta_subsref (type, idx, nargout); }
+
+  octave_value
+  subsref (const std::string& type,
+           const std::list<octave_value_list>& idx)
+  {
+    octave_value_list retval;
+
+    retval = subsref (type, idx, 1);
+
+    return (retval.length () > 0 ? retval(0) : octave_value ());
+  }
+
+  octave_value_list
+  do_multi_index_op (int nargout, const octave_value_list& idx)
+  {
+    // Emulate ()-type meta subsref
+
+    std::list<octave_value_list> l (1, idx);
+    std::string type ("(");
+
+    return subsref (type, l, nargout);
+  }
+
+  bool is_postfix_index_handled (char type) const
+  { return object.meta_is_postfix_index_handled (type); }
+
+  bool
+  is_classdef_constructor (const std::string& cname = std::string ()) const
+  {
+    bool retval = false;
+
+    if (object.is_class ())
+      {
+        if (cname.empty ())
+          retval = true;
+        else
+          {
+            cdef_class cls (object);
+
+            if (cls.get_name () == cname)
+              retval = true;
+          }
+      }
+
+    return retval;
+  }
+
+private:
+  cdef_meta_object object;
+};
+
+//----------------------------------------------------------------------------
+
+class octave_classdef_superclass_ref : public octave_function
+{
+public:
+  octave_classdef_superclass_ref (const octave_value_list& a)
+    : octave_function (), args (a) { }
+
+  ~octave_classdef_superclass_ref (void) { }
+
+  octave_function* function_value (bool = false) { return this; }
+
+  octave_value_list
+  subsref (const std::string& type,
+           const std::list<octave_value_list>& idx,
+           int nargout)
+  {
+    size_t skip = 0;
+    octave_value_list retval;
+
+    switch (type[0])
+      {
+      case '(':
+        skip = 1;
+        retval = do_multi_index_op (type.length () > 1 ? 1 : nargout,
+                                    idx.front ());
+        break;
+      default:
+        retval = do_multi_index_op (1, octave_value_list ());
+        break;
+      }
+
+    if (! error_state)
+      {
+        if (type.length () > skip && idx.size () > skip
+            && retval.length () > 0)
+          retval = retval(0).next_subsref (nargout, type, idx, skip);
+      }
+
+    return retval;
+  }
+
+  octave_value
+  subsref (const std::string& type,
+           const std::list<octave_value_list>& idx)
+  {
+    octave_value_list retval;
+
+    retval = subsref (type, idx, 1);
+
+    return (retval.length () > 0 ? retval(0) : octave_value ());
+  }
+
+  octave_value_list
+  do_multi_index_op (int nargout, const octave_value_list& idx)
+  {
+    octave_value_list retval;
+
+    std::string meth_name;
+    bool in_constructor;
+    cdef_class ctx;
+
+    ctx = get_class_context (meth_name, in_constructor);
+
+    if (! error_state && ctx.ok ())
+      {
+        std::string mname = args(0).string_value ();
+        std::string cname = args(1).string_value ();
+
+        cdef_class cls = lookup_class (cname);
+
+        if (! error_state)
+          {
+            if (in_constructor)
+              {
+                if (is_direct_superclass (cls, ctx))
+                  {
+                    if (is_constructed_object (mname))
+                      {
+                        octave_value sym = symbol_table::varval (mname);
+
+                        cls.run_constructor (to_cdef_ref (sym), idx);
+
+                        retval(0) = sym;
+                      }
+                    else
+                      ::error ("cannot call superclass constructor with "
+                               "variable `%s'", mname.c_str ());
+                  }
+                else
+                  ::error ("`%s' is not a direct superclass of `%s'",
+                           cname.c_str (), ctx.get_name ().c_str ());
+              }
+            else
+              {
+                if (mname == meth_name)
+                  {
+                    if (is_strict_superclass (cls, ctx))
+                      {
+                        // I see 2 possible implementations here:
+                        // 1) use cdef_object::subsref with a different class
+                        //    context; this avoids duplicating code, but
+                        //    assumes the object is always the first argument
+                        // 2) lookup the method manually and call
+                        //    cdef_method::execute; this duplicates part of
+                        //    logic in cdef_object::subsref, but avoid the
+                        //    assumption of 1)
+                        // Not being sure about the assumption of 1), I
+                        // go with option 2) for the time being.
+
+                        cdef_method meth = cls.find_method (meth_name, false);
+
+                        if (meth.ok ())
+                          retval = meth.execute (idx, nargout, true,
+                                                 meth_name);
+                        else
+                          ::error ("no method `%s' found in superclass `%s'",
+                                   meth_name.c_str (), cname.c_str ());
+                      }
+                    else
+                      ::error ("`%s' is not a superclass of `%s'",
+                               cname.c_str (), ctx.get_name ().c_str ());
+                  }
+                else
+                  ::error ("method name mismatch (`%s' != `%s')",
+                           mname.c_str (), meth_name.c_str ());
+              }
+          }
+      }
+    else if (! error_state)
+      ::error ("superclass calls can only occur in methods or constructors");
+
+    return retval;
+  }
+
+private:
+  bool is_constructed_object (const std::string nm)
+  {
+    octave_function *of = octave_call_stack::current ();
+
+    if (of->is_classdef_constructor ())
+      {
+        octave_user_function *uf = of->user_function_value (true);
+
+        if (uf)
+          {
+            tree_parameter_list *ret_list = uf->return_list ();
+
+            if (ret_list && ret_list->length () == 1)
+              return (ret_list->front ()->name () == nm);
+          }
+      }
+
+    return false;
+  }
+
+private:
+  octave_value_list args;
+};
+
+//----------------------------------------------------------------------------
+
+octave_map
+cdef_object::map_value (void) const
+{
+  octave_map retval;
+
+  warning_with_id ("Octave:classdef-to-struct",
+                   "struct: converting a classdef object into a struct "
+                   "overrides the access restrictions defined for properties. "
+                   "All properties are returned, including private and "
+                   "protected ones.");
+
+  cdef_class cls = get_class ();
+
+  if (cls.ok ())
+    {
+      std::map<std::string, cdef_property> props;
+
+      props = cls.get_property_map (cdef_class::property_all);
+
+      for (std::map<std::string, cdef_property>::iterator it = props.begin ();
+           it != props.end (); ++it)
+        {
+          octave_value pvalue;
+
+          if (is_array ())
+            {
+              Array<cdef_object> a_obj = array_value ();
+
+              Cell cvalue (a_obj.dims ());
+
+              for (octave_idx_type i = 0; i < a_obj.numel (); i++)
+                {
+                  cvalue (i) = it->second.get_value (a_obj(i), false);
+
+                  if (error_state)
+                    break;
+                }
+
+              if (! error_state)
+                retval.setfield (it->first, cvalue);
+            }
+          else
+            {
+              Cell cvalue (dim_vector (1, 1),
+                           it->second.get_value (*this, false));
+
+              if (! error_state)
+                retval.setfield (it->first, cvalue);
+            }
+
+          if (error_state)
+            break;
+        }
+    }
+
+  return retval;
+}
+
+string_vector
+cdef_object_rep::map_keys (void) const
+{
+  cdef_class cls = get_class ();
+
+  if (cls.ok ())
+    return cls.get_names ();
+
+  return string_vector ();
+}
+
+octave_value_list
+cdef_object_scalar::subsref (const std::string& type,
+                             const std::list<octave_value_list>& idx,
+                             int nargout, size_t& skip,
+                             const cdef_class& context, bool auto_add)
+{
+  skip = 0;
+
+  cdef_class cls = (context.ok () ? context : get_class ());
+
+  octave_value_list retval;
+
+  if (! cls.ok ())
+    return retval;
+
+  switch (type[0])
+    {
+    case '.':
+      {
+        std::string name = (idx.front ())(0).string_value ();
+
+        cdef_method meth = cls.find_method (name);
+
+        if (meth.ok ())
+          {
+            int _nargout = (type.length () > 2 ? 1 : nargout);
+
+            octave_value_list args;
+
+            skip = 1;
+
+            if (type.length () > 1 && type[1] == '(')
+              {
+                std::list<octave_value_list>::const_iterator it = idx.begin ();
+
+                args = *++it;
+
+                skip++;
+              }
+
+            if (meth.is_static ())
+              retval = meth.execute (args, _nargout, true, "subsref");
+            else
+              {
+                refcount++;
+                retval = meth.execute (cdef_object (this), args, _nargout,
+                                       true, "subsref");
+              }
+          }
+
+        if (skip == 0 && ! error_state)
+          {
+            cdef_property prop = cls.find_property (name);
+
+            if (prop.ok ())
+              {
+                if (prop.is_constant ())
+                  retval(0) = prop.get_value (true, "subsref");
+                else
+                  {
+                    refcount++;
+                    retval(0) = prop.get_value (cdef_object (this),
+                                                true, "subsref");
+                  }
+
+                skip = 1;
+              }
+            else
+              error ("subsref: unknown method or property: %s", name.c_str ());
+          }
+        break;
+      }
+
+    case '(':
+      {
+        refcount++;
+
+        cdef_object this_obj (this);
+
+        Array<cdef_object> arr (dim_vector (1, 1), this_obj);
+
+        cdef_object new_obj = cdef_object (new cdef_object_array (arr));
+
+        new_obj.set_class (get_class ());
+
+        retval = new_obj.subsref (type, idx, nargout, skip, cls, auto_add);
+      }
+      break;
+
+    default:
+      error ("object cannot be indexed with `%c'", type[0]);
+      break;
+    }
+
+  return retval;
+}
+
+octave_value
+cdef_object_scalar::subsasgn (const std::string& type,
+                              const std::list<octave_value_list>& idx,
+                              const octave_value& rhs)
+{
+  octave_value retval;
+
+  cdef_class cls = get_class ();
+
+  switch (type[0])
+    {
+    case '.':
+      {
+        std::string name = (idx.front ())(0).string_value ();
+
+        if (! error_state)
+          {
+            cdef_property prop = cls.find_property (name);
+
+            if (prop.ok ())
+              {
+                if (prop.is_constant ())
+                  error ("subsasgn: cannot assign constant property: %s",
+                         name.c_str ());
+                else
+                  {
+                    refcount++;
+
+                    cdef_object obj (this);
+
+                    if (type.length () == 1)
+                      {
+                        prop.set_value (obj, rhs, true, "subsasgn");
+
+                        if (! error_state)
+                          retval = to_ov (obj);
+                      }
+                    else
+                      {
+                        octave_value val =
+                          prop.get_value (obj, true, "subsasgn");
+
+                        if (! error_state)
+                          {
+                            std::list<octave_value_list> args (idx);
+
+                            args.erase (args.begin ());
+
+                            val = val.assign (octave_value::op_asn_eq,
+                                              type.substr (1), args, rhs);
+
+                            if (! error_state)
+                              {
+                                if (val.class_name () != "object"
+                                    || ! to_cdef (val).is_handle_object ())
+                                  prop.set_value (obj, val, true, "subsasgn");
+
+                                if (! error_state)
+                                  retval = to_ov (obj);
+                              }
+                          }
+                      }
+                  }
+              }
+            else
+              error ("subsasgn: unknown property: %s", name.c_str ());
+          }
+      }
+      break;
+
+    case '(':
+      {
+        refcount++;
+
+        cdef_object this_obj (this);
+
+        Array<cdef_object> arr (dim_vector (1, 1), this_obj);
+
+        cdef_object new_obj = cdef_object (new cdef_object_array (arr));
+
+        new_obj.set_class (get_class ());
+
+        octave_value tmp = new_obj.subsasgn (type, idx, rhs);
+
+        if (! error_state)
+          retval = tmp;
+      }
+      break;
+
+    default:
+      error ("subsasgn: object cannot be index with `%c'", type[0]);
+      break;
+    }
+
+  return retval;
+}
+
+void
+cdef_object_scalar::mark_for_construction (const cdef_class& cls)
+{
+  std::string cls_name = cls.get_name ();
+
+  Cell supcls = cls.get ("SuperClasses").cell_value ();
+
+  if (! error_state)
+    {
+      std::list<cdef_class> supcls_list = lookup_classes (supcls);
+
+      if (! error_state)
+        ctor_list[cls] = supcls_list;
+    }
+}
+
+octave_value_list
+cdef_object_array::subsref (const std::string& type,
+                            const std::list<octave_value_list>& idx,
+                            int /* nargout */, size_t& skip,
+                            const cdef_class& /* context */, bool auto_add)
+{
+  octave_value_list retval;
+
+  skip = 1;
+
+  switch (type[0])
+    {
+    case '(':
+      {
+        const octave_value_list& ival = idx.front ();
+        bool is_scalar = true;
+        Array<idx_vector> iv (dim_vector (1, ival.length ()));
+
+        if (ival.empty ())
+          {
+            ::error ("can't index %s object(s) with empty parentheses",
+                     class_name ().c_str ());
+            break;
+          }
+
+        for (int i = 0; ! error_state && i < ival.length (); i++)
+          {
+            iv(i) = ival(i).index_vector ();
+            if (! error_state)
+              is_scalar = is_scalar && iv(i).is_scalar ();
+          }
+
+        if (! error_state)
+          {
+            Array<cdef_object> ires = array.index (iv, auto_add);
+
+            if (! error_state)
+              {
+                // If resizing is enabled (auto_add = true), it's possible
+                // indexing was out-of-bound and the result array contains
+                // invalid cdef_objects.
+
+                if (auto_add)
+                  fill_empty_values (ires);
+
+                if (is_scalar)
+                  retval(0) = to_ov (ires(0));
+                else
+                  {
+                    cdef_object array_obj (new cdef_object_array (ires));
+
+                    array_obj.set_class (get_class ());
+
+                    retval(0) = to_ov (array_obj);
+                  }
+              }
+          }
+      }
+      break;
+
+    case '.':
+      if (type.size () == 1 && idx.size () == 1)
+        {
+          Cell c (dims ());
+
+          octave_idx_type n = array.numel ();
+
+          // dummy variables
+          size_t dummy_skip;
+          cdef_class dummy_cls;
+
+          for (octave_idx_type i = 0; i < n; i++)
+            {
+              octave_value_list r = array(i).subsref (type, idx, 1, dummy_skip,
+                                                      dummy_cls);
+
+              if (! error_state)
+                {
+                  if (r.length () > 0)
+                    c(i) = r(0);
+                }
+              else
+                break;
+            }
+
+          if (! error_state)
+            retval(0) = octave_value (c, true);
+
+          break;
+        }
+      // fall through "default"
+
+    default:
+      ::error ("can't perform indexing operation on array of %s objects",
+               class_name ().c_str ());
+      break;
+    }
+
+  return retval;
+}
+
+octave_value
+cdef_object_array::subsasgn (const std::string& type,
+                             const std::list<octave_value_list>& idx,
+                             const octave_value& rhs)
+{
+  octave_value retval;
+
+  switch (type[0])
+    {
+    case '(':
+      if (type.length () == 1)
+        {
+          cdef_object rhs_obj = to_cdef (rhs);
+
+          if (! error_state)
+            {
+              if (rhs_obj.get_class () == get_class ())
+                {
+                  const octave_value_list& ival = idx.front ();
+                  bool is_scalar = true;
+                  Array<idx_vector> iv (dim_vector (1, ival.length ()));
+
+                  for (int i = 0; ! error_state && i < ival.length (); i++)
+                    {
+                      iv(i) = ival(i).index_vector ();
+                      if (! error_state)
+                        is_scalar = is_scalar && iv(i).is_scalar ();
+                    }
+
+                  if (! error_state)
+                    {
+                      Array<cdef_object> rhs_mat;
+
+                      if (! rhs_obj.is_array ())
+                        {
+                          rhs_mat = Array<cdef_object> (dim_vector (1, 1));
+                          rhs_mat(0) = rhs_obj;
+                        }
+                      else
+                        rhs_mat = rhs_obj.array_value ();
+
+                      if (! error_state)
+                        {
+                          octave_idx_type n = array.numel ();
+
+                          array.assign (iv, rhs_mat, cdef_object ());
+
+                          if (! error_state)
+                            {
+                              if (array.numel () > n)
+                                fill_empty_values ();
+
+                              if (! error_state)
+                                {
+                                  refcount++;
+                                  retval = to_ov (cdef_object (this));
+                                }
+                            }
+                        }
+                    }
+                }
+              else
+                ::error ("can't assign %s object into array of %s objects.",
+                         rhs_obj.class_name ().c_str (),
+                         class_name ().c_str ());
+            }
+        }
+      else
+        {
+          const octave_value_list& ival = idx.front ();
+
+          bool is_scalar = true;
+
+          Array<idx_vector> iv (dim_vector (1, ival.length ()));
+
+          for (int i = 0; ! error_state && i < ival.length (); i++)
+            {
+              iv(i) = ival(i).index_vector ();
+
+              if (! error_state)
+                {
+                  is_scalar = is_scalar && iv(i).is_scalar ();
+
+                  if (! is_scalar)
+                    error ("subsasgn: invalid indexing for object array "
+                           "assignment, the index must reference a single "
+                           "object in the array.");
+                }
+            }
+
+          if (! error_state)
+            {
+              Array<cdef_object> a = array.index (iv, true);
+
+              if (a.numel () != 1)
+                error ("subsasgn: invalid indexing for object array "
+                       "assignment");
+
+              if (! error_state)
+                {
+                  cdef_object obj = a(0);
+
+                  int ignore_copies = 0;
+
+                  // If the object in 'a' is not valid, this means the index
+                  // was out-of-bound and we need to create a new object.
+
+                  if (! obj.ok ())
+                    obj = get_class ().construct_object (octave_value_list ());
+                  else
+                    // Optimize the subsasgn call to come. There are 2 copies
+                    // that we can safely ignore:
+                    // - 1 in "array"
+                    // - 1 in "a"
+                    ignore_copies = 2;
+
+                  std::list<octave_value_list> next_idx (idx);
+
+                  next_idx.erase (next_idx.begin ());
+
+                  octave_value tmp = obj.subsasgn (type.substr (1), next_idx,
+                                                   rhs, ignore_copies);
+
+                  if (! error_state)
+                    {
+                      cdef_object robj = to_cdef (tmp);
+
+                      if (robj.ok ()
+                          && ! robj.is_array ()
+                          && robj.get_class () == get_class ())
+                        {
+                          // Small optimization, when dealing with handle
+                          // objects, we don't need to re-assign the result
+                          // of subsasgn back into the array.
+
+                          if (! robj.is (a(0)))
+                            {
+                              Array<cdef_object> rhs_a (dim_vector (1, 1),
+                                                        robj);
+
+                              octave_idx_type n = array.numel ();
+
+                              array.assign (iv, rhs_a);
+
+                              if (array.numel () > n)
+                                fill_empty_values ();
+                            }
+
+                          refcount++;
+
+                          retval = to_ov (cdef_object (this));
+                        }
+                      else
+                        error ("subasgn: invalid assignment into array of %s "
+                               "objects", class_name ().c_str ());
+                    }
+                }
+            }
+        }
+      break;
+
+    default:
+      ::error ("can't perform indexing operation on array of %s objects",
+               class_name ().c_str ());
+      break;
+    }
+
+  return retval;
+}
+
+void
+cdef_object_array::fill_empty_values (Array<cdef_object>& arr)
+{
+  cdef_class cls = get_class ();
+
+  if (! error_state)
+    {
+      cdef_object obj;
+
+      int n = arr.numel ();
+
+      for (int i = 0; ! error_state && i < n; i++)
+        {
+          if (! arr.xelem (i).ok ())
+            {
+              if (! obj.ok ())
+                {
+                  obj = cls.construct_object (octave_value_list ());
+
+                  if (! error_state)
+                    arr.xelem (i) = obj;
+                }
+              else
+                arr.xelem (i) = obj.copy ();
+            }
+        }
+    }
+}
+
+bool
+cdef_object_scalar::is_constructed_for (const cdef_class& cls) const
+{
+  return (is_constructed ()
+          || ctor_list.find (cls) == ctor_list.end ());
+}
+
+bool
+cdef_object_scalar::is_partially_constructed_for (const cdef_class& cls) const
+{
+  std::map< cdef_class, std::list<cdef_class> >::const_iterator it;
+
+  if (is_constructed ())
+    return true;
+  else if ((it = ctor_list.find (cls)) == ctor_list.end ()
+           || it->second.empty ())
+    return true;
+
+  for (std::list<cdef_class>::const_iterator lit = it->second.begin ();
+       lit != it->second.end (); ++lit)
+    if (! is_constructed_for (*lit))
+      return false;
+
+  return true;
+}
+
+handle_cdef_object::~handle_cdef_object (void)
+{
+#if DEBUG_TRACE
+  std::cerr << "deleting " << get_class ().get_name ()
+            << " object (handle)" << std::endl;
+#endif
+}
+
+value_cdef_object::~value_cdef_object (void)
+{
+#if DEBUG_TRACE
+  std::cerr << "deleting " << get_class ().get_name ()
+            << " object (value)" << std::endl;
+#endif
+}
+
+cdef_class::cdef_class_rep::cdef_class_rep (const std::list<cdef_class>&
+                                            superclasses)
+  : cdef_meta_object_rep (), member_count (0), handle_class (false),
+    object_count (0), meta (false)
+{
+  put ("SuperClasses", to_ov (superclasses));
+  implicit_ctor_list = superclasses;
+}
+
+cdef_method
+cdef_class::cdef_class_rep::find_method (const std::string& nm, bool local)
+{
+  method_iterator it = method_map.find (nm);
+
+  if (it == method_map.end ())
+    {
+      // FIXME: look into class directory
+    }
+  else
+    {
+      cdef_method& meth = it->second;
+
+      // FIXME: check if method reload needed
+
+      if (meth.ok ())
+        return meth;
+    }
+
+  if (! local)
+    {
+      // Look into superclasses
+
+      Cell super_classes = get ("SuperClasses").cell_value ();
+
+      for (int i = 0; i < super_classes.numel (); i++)
+        {
+          cdef_class cls = lookup_class (super_classes(i));
+
+          if (! error_state)
+            {
+              cdef_method meth = cls.find_method (nm);
+
+              if (meth.ok ())
+                return meth;
+            }
+        }
+    }
+
+  return cdef_method ();
+}
+
+class ctor_analyzer : public tree_walker
+{
+public:
+  ctor_analyzer (const std::string& ctor, const std::string& obj)
+    : tree_walker (), who (ctor), obj_name (obj) { }
+
+  void visit_statement_list (tree_statement_list& t)
+  {
+    for (tree_statement_list::const_iterator it = t.begin ();
+         ! error_state && it != t.end (); ++it)
+      (*it)->accept (*this);
+  }
+
+  void visit_statement (tree_statement& t)
+  {
+    if (t.is_expression ())
+      t.expression ()->accept (*this);
+  }
+
+  void visit_simple_assignment (tree_simple_assignment& t)
+  {
+    t.right_hand_side ()->accept (*this);
+  }
+
+  void visit_multi_assignment (tree_multi_assignment& t)
+  {
+    t.right_hand_side ()->accept (*this);
+  }
+
+  void visit_index_expression (tree_index_expression& t)
+  {
+    t.expression ()->accept (*this);
+  }
+
+  void visit_funcall (tree_funcall& t)
+  {
+    octave_value fcn = t.function ();
+
+    if (fcn.is_function ())
+      {
+        octave_function *of = fcn.function_value (true);
+
+        if (of)
+          {
+            if (of->name () == "__superclass_reference__")
+              {
+                octave_value_list args = t.arguments ();
+
+                if (args(0).string_value () == obj_name)
+                  {
+                    std::string class_name = args(1).string_value ();
+
+                    cdef_class cls = lookup_class (class_name, false);
+
+                    if (cls.ok ())
+                      ctor_list.push_back (cls);
+                  }
+              }
+          }
+      }
+  }
+
+  std::list<cdef_class> get_constructor_list (void) const
+  { return ctor_list; }
+
+  // NO-OP
+  void visit_anon_fcn_handle (tree_anon_fcn_handle&) { }
+  void visit_argument_list (tree_argument_list&) { }
+  void visit_binary_expression (tree_binary_expression&) { }
+  void visit_break_command (tree_break_command&) { }
+  void visit_colon_expression (tree_colon_expression&) { }
+  void visit_continue_command (tree_continue_command&) { }
+  void visit_global_command (tree_global_command&) { }
+  void visit_persistent_command (tree_persistent_command&) { }
+  void visit_decl_elt (tree_decl_elt&) { }
+  void visit_decl_init_list (tree_decl_init_list&) { }
+  void visit_simple_for_command (tree_simple_for_command&) { }
+  void visit_complex_for_command (tree_complex_for_command&) { }
+  void visit_octave_user_script (octave_user_script&) { }
+  void visit_octave_user_function (octave_user_function&) { }
+  void visit_function_def (tree_function_def&) { }
+  void visit_identifier (tree_identifier&) { }
+  void visit_if_clause (tree_if_clause&) { }
+  void visit_if_command (tree_if_command&) { }
+  void visit_if_command_list (tree_if_command_list&) { }
+  void visit_switch_case (tree_switch_case&) { }
+  void visit_switch_case_list (tree_switch_case_list&) { }
+  void visit_switch_command (tree_switch_command&) { }
+  void visit_matrix (tree_matrix&) { }
+  void visit_cell (tree_cell&) { }
+  void visit_no_op_command (tree_no_op_command&) { }
+  void visit_constant (tree_constant&) { }
+  void visit_fcn_handle (tree_fcn_handle&) { }
+  void visit_parameter_list (tree_parameter_list&) { }
+  void visit_postfix_expression (tree_postfix_expression&) { }
+  void visit_prefix_expression (tree_prefix_expression&) { }
+  void visit_return_command (tree_return_command&) { }
+  void visit_return_list (tree_return_list&) { }
+  void visit_try_catch_command (tree_try_catch_command&) { }
+  void visit_unwind_protect_command (tree_unwind_protect_command&) { }
+  void visit_while_command (tree_while_command&) { }
+  void visit_do_until_command (tree_do_until_command&) { }
+
+private:
+  /* The name of the constructor being analyzed */
+  std::string who;
+
+  /* The name of the first output argument of the constructor */
+  std::string obj_name;
+
+  /* The list of superclass constructors that are explicitly called */
+  std::list<cdef_class> ctor_list;
+};
+
+void
+cdef_class::cdef_class_rep::install_method (const cdef_method& meth)
+{
+  method_map[meth.get_name ()] = meth;
+
+  member_count++;
+
+  if (meth.is_constructor ())
+    {
+      // Analyze the constructor code to determine what superclass
+      // constructors are called explicitly.
+
+      octave_function *of = meth.get_function ().function_value (true);
+
+      if (of)
+        {
+          octave_user_function *uf = of->user_function_value (true);
+
+          if (uf)
+            {
+              tree_parameter_list *ret_list = uf->return_list ();
+              tree_statement_list *body = uf->body ();
+
+              if (ret_list && ret_list->size () == 1)
+                {
+                  std::string obj_name = ret_list->front ()->name ();
+                  ctor_analyzer a (meth.get_name (), obj_name);
+
+                  body->accept (a);
+                  if (! error_state)
+                    {
+                      std::list<cdef_class> explicit_ctor_list
+                        = a.get_constructor_list ();
+
+                      for (std::list<cdef_class>::const_iterator
+                           it = explicit_ctor_list.begin ();
+                           ! error_state && it != explicit_ctor_list.end ();
+                           ++it)
+                        {
+#if DEBUG_TRACE
+                          std::cerr << "explicit superclass constructor: "
+                                    << it->get_name () << std::endl;
+#endif
+
+                          implicit_ctor_list.remove (*it);
+                        }
+                    }
+                }
+              else
+                ::error ("%s: invalid constructor output arguments",
+                         meth.get_name ().c_str ());
+            }
+        }
+    }
+}
+
+void
+cdef_class::cdef_class_rep::load_all_methods (void)
+{
+  // FIXME: re-scan class directory
+}
+
+Cell
+cdef_class::cdef_class_rep::get_methods (void)
+{
+  std::map<std::string,cdef_method> meths;
+
+  find_methods (meths, false);
+
+  if (! error_state)
+    {
+      Cell c (meths.size (), 1);
+
+      int idx = 0;
+
+      for (std::map<std::string,cdef_method>::const_iterator
+            it = meths.begin (); it != meths.end (); ++it, ++idx)
+        c (idx, 0) = to_ov (it->second);
+
+      return c;
+    }
+
+  return Cell ();
+}
+
+void
+cdef_class::cdef_class_rep::find_methods (std::map<std::string,
+                                          cdef_method>& meths,
+                                          bool only_inherited)
+{
+  load_all_methods ();
+
+  method_const_iterator it;
+
+  for (it = method_map.begin (); it != method_map.end (); ++it)
+    {
+      if (! it->second.is_constructor ())
+        {
+          std::string nm = it->second.get_name ();
+
+          if (meths.find (nm) == meths.end ())
+            {
+              if (only_inherited)
+                {
+                  octave_value acc = it->second.get ("Access");
+
+                  if (! acc.is_string ()
+                      || acc.string_value () == "private")
+                    continue;
+                }
+
+              meths[nm] = it->second;
+            }
+        }
+    }
+
+  // Look into superclasses
+
+  Cell super_classes = get ("SuperClasses").cell_value ();
+
+  for (int i = 0; i < super_classes.numel (); i++)
+    {
+      cdef_class cls = lookup_class (super_classes(i));
+
+      if (! error_state)
+        cls.get_rep ()->find_methods (meths, true);
+      else
+        break;
+    }
+}
+
+cdef_property
+cdef_class::cdef_class_rep::find_property (const std::string& nm)
+{
+  property_iterator it = property_map.find (nm);
+
+  if (it != property_map.end ())
+    {
+      cdef_property& prop = it->second;
+
+      if (prop.ok ())
+        return prop;
+    }
+
+  // Look into superclasses
+
+  Cell super_classes = get ("SuperClasses").cell_value ();
+
+  for (int i = 0; i < super_classes.numel (); i++)
+    {
+      cdef_class cls = lookup_class (super_classes(i));
+
+      if (! error_state)
+        {
+          cdef_property prop = cls.find_property (nm);
+
+          if (prop.ok ())
+            return prop;
+        }
+    }
+
+  return cdef_property ();
+}
+
+void
+cdef_class::cdef_class_rep::install_property (const cdef_property& prop)
+{
+  property_map[prop.get_name ()] = prop;
+
+  member_count++;
+}
+
+Cell
+cdef_class::cdef_class_rep::get_properties (int mode)
+{
+  std::map<std::string,cdef_property> props;
+
+  props = get_property_map (mode);
+
+  if (! error_state)
+    {
+      Cell c (props.size (), 1);
+
+      int idx = 0;
+
+      for (std::map<std::string,cdef_property>::const_iterator
+            it = props.begin (); it != props.end (); ++it, ++idx)
+        c (idx, 0) = to_ov (it->second);
+
+      return c;
+    }
+
+  return Cell ();
+}
+
+std::map<std::string, cdef_property>
+cdef_class::cdef_class_rep::get_property_map (int mode)
+{
+  std::map<std::string,cdef_property> props;
+
+  find_properties (props, mode);
+
+  return props;
+}
+
+void
+cdef_class::cdef_class_rep::find_properties (std::map<std::string,
+                                             cdef_property>& props,
+                                             int mode)
+{
+  property_const_iterator it;
+
+  for (it = property_map.begin (); ! error_state && it != property_map.end ();
+       ++it)
+    {
+      std::string nm = it->second.get_name ();
+
+      if (props.find (nm) == props.end ())
+        {
+          if (mode == property_inherited)
+            {
+              octave_value acc = it->second.get ("GetAccess");
+
+              if (! acc.is_string ()
+                  || acc.string_value () == "private")
+                continue;
+            }
+
+          props[nm] = it->second;
+        }
+    }
+
+  // Look into superclasses
+
+  Cell super_classes = get ("SuperClasses").cell_value ();
+
+  for (int i = 0; ! error_state && i < super_classes.numel (); i++)
+    {
+      cdef_class cls = lookup_class (super_classes(i));
+
+      if (! error_state)
+        cls.get_rep ()->find_properties (props,
+                                         (mode == property_all ?
+                                          property_all :
+                                          property_inherited));
+      else
+        break;
+    }
+}
+
+void
+cdef_class::cdef_class_rep::find_names (std::set<std::string>& names,
+                                        bool all)
+{
+  load_all_methods ();
+
+  for (method_const_iterator it = method_map.begin ();
+       ! error_state && it != method_map.end(); ++it)
+    {
+      if (! it->second.is_constructor ())
+        {
+          std::string nm = it->second.get_name ();
+
+          if (! all)
+            {
+              octave_value acc = it->second.get ("Access");
+
+              if (! acc.is_string()
+                  || acc.string_value () != "public")
+                continue;
+            }
+
+          names.insert (nm);
+        }
+    }
+
+  for (property_const_iterator it = property_map.begin ();
+       ! error_state && it != property_map.end (); ++it)
+    {
+      std::string nm = it->second.get_name ();
+
+      if (! all)
+        {
+          octave_value acc = it->second.get ("GetAccess");
+
+          if (! acc.is_string()
+              || acc.string_value () != "public")
+            continue;
+        }
+
+      names.insert (nm);
+    }
+
+  // Look into superclasses
+
+  Cell super_classes = get ("SuperClasses").cell_value ();
+
+  for (int i = 0; ! error_state && i < super_classes.numel (); i++)
+    {
+      cdef_class cls = lookup_class (super_classes(i));
+
+      if (! error_state)
+        cls.get_rep ()->find_names (names, all);
+      else
+        break;
+    }
+}
+
+string_vector
+cdef_class::cdef_class_rep::get_names (void)
+{
+  std::set<std::string> names;
+
+  find_names (names, false);
+
+  if (! error_state)
+    {
+      string_vector v (names.size ());
+
+      int idx = 0;
+      for (std::set<std::string>::const_iterator it = names.begin ();
+           it != names.end (); ++it, ++idx)
+        v[idx] = *it;
+
+      return v.sort (true);
+    }
+
+  return string_vector ();
+}
+
+void
+cdef_class::cdef_class_rep::delete_object (cdef_object obj)
+{
+  method_iterator it = method_map.find ("delete");
+
+  if (it != method_map.end ())
+    {
+      cdef_class cls = obj.get_class ();
+
+      obj.set_class (wrap ());
+
+      it->second.execute (obj, octave_value_list (), 0, false);
+
+      obj.set_class (cls);
+    }
+
+  // FIXME: should we destroy corresponding properties here?
+
+  // Call "delete" in super classes
+
+  Cell super_classes = get ("SuperClasses").cell_value ();
+
+  for (int i = 0; i < super_classes.numel (); i++)
+    {
+      cdef_class cls = lookup_class (super_classes(i));
+
+      if (!error_state)
+        cls.delete_object (obj);
+    }
+}
+
+octave_value_list
+cdef_class::cdef_class_rep::meta_subsref (const std::string& type,
+                                          const std::list<octave_value_list>& idx,
+                                          int nargout)
+{
+  size_t skip = 1;
+
+  octave_value_list retval;
+
+  switch (type[0])
+    {
+    case '(':
+      // Constructor call
+
+#if DEBUG_TRACE
+      std::cerr << "constructor" << std::endl;
+#endif
+
+      retval(0) = construct (idx.front ());
+      break;
+
+    case '.':
+      // Static method, constant (or property?)
+
+#if DEBUG_TRACE
+      std::cerr << "static method/property" << std::endl;
+#endif
+
+      if (idx.front ().length () == 1)
+        {
+          std::string nm = idx.front ()(0).string_value ();
+
+          if (! error_state)
+            {
+              cdef_method meth = find_method (nm);
+
+              if (meth.ok ())
+                {
+                  if (meth.is_static ())
+                    {
+                      octave_value_list args;
+
+                      if (type.length () > 1 && idx.size () > 1
+                          && type[1] == '(')
+                        {
+                          args = *(++(idx.begin ()));
+                          skip++;
+                        }
+
+                      retval = meth.execute (args, (type.length () > skip
+                                                    ? 1 : nargout), true,
+                                             "meta.class");
+                    }
+                  else
+                    ::error ("method `%s' is not static", nm.c_str ());
+                }
+              else
+                {
+                  cdef_property prop = find_property (nm);
+
+                  if (prop.ok ())
+                    {
+                      if (prop.is_constant ())
+                        retval(0) = prop.get_value (true, "meta.class");
+                      else
+                        ::error ("property `%s' is not constant",
+                                 nm.c_str ());
+                    }
+                  else
+                    ::error ("no such method or property `%s'", nm.c_str ());
+                }
+            }
+          else
+            ::error ("invalid meta.class indexing, expected a method or property name");
+        }
+      else
+        ::error ("invalid meta.class indexing");
+      break;
+
+    default:
+      ::error ("invalid meta.class indexing");
+      break;
+    }
+
+  if (! error_state)
+    {
+      if (type.length () > skip && idx.size () > skip && ! retval.empty ())
+        retval = retval(0).next_subsref (nargout, type, idx, skip);
+    }
+
+  return retval;
+}
+
+void
+cdef_class::cdef_class_rep::meta_release (void)
+{
+  cdef_manager::unregister_class (wrap ());
+}
+
+void
+cdef_class::cdef_class_rep::initialize_object (cdef_object& obj)
+{
+  // Populate the object with default property values
+
+  std::list<cdef_class> super_classes = lookup_classes (
+                                          get ("SuperClasses").cell_value ());
+
+  if (! error_state)
+    {
+      for (std::list<cdef_class>::iterator it = super_classes.begin ();
+           ! error_state && it != super_classes.end (); ++it)
+        it->initialize_object (obj);
+
+      if (! error_state)
+        {
+          for (property_const_iterator it = property_map.begin ();
+               ! error_state && it != property_map.end (); ++it)
+            {
+              if (! it->second.get ("Dependent").bool_value ())
+                {
+                  octave_value pvalue = it->second.get ("DefaultValue");
+
+                  if (pvalue.is_defined ())
+                    obj.put (it->first, pvalue);
+                  else
+                    obj.put (it->first, octave_value (Matrix ()));
+                }
+            }
+
+          if (! error_state)
+            {
+              refcount++;
+              obj.mark_for_construction (cdef_class (this));
+            }
+        }
+    }
+}
+
+void
+cdef_class::cdef_class_rep::run_constructor (cdef_object& obj,
+                                             const octave_value_list& args)
+{
+  octave_value_list empty_args;
+
+  for (std::list<cdef_class>::const_iterator it = implicit_ctor_list.begin ();
+       ! error_state && it != implicit_ctor_list.end (); ++it)
+    {
+      cdef_class supcls = lookup_class (*it);
+
+      if (! error_state)
+        supcls.run_constructor (obj, empty_args);
+    }
+
+  if (error_state)
+    return;
+
+  std::string cls_name = get_name ();
+  std::string ctor_name = get_base_name (cls_name);
+
+  cdef_method ctor = find_method (ctor_name);
+
+  if (ctor.ok ())
+    {
+      octave_value_list ctor_args (args);
+      octave_value_list ctor_retval;
+
+      ctor_args.prepend (to_ov (obj));
+      ctor_retval = ctor.execute (ctor_args, 1, true, "constructor");
+
+      if (! error_state)
+        {
+          if (ctor_retval.length () == 1)
+            obj = to_cdef (ctor_retval(0));
+          else
+            {
+              ::error ("%s: invalid number of output arguments for classdef constructor",
+                       ctor_name.c_str ());
+              return;
+            }
+        }
+    }
+
+  obj.mark_as_constructed (wrap ());
+}
+
+octave_value
+cdef_class::cdef_class_rep::construct (const octave_value_list& args)
+{
+  cdef_object obj = construct_object (args);
+
+  if (! error_state && obj.ok ())
+    return to_ov (obj);
+
+  return octave_value ();
+}
+
+cdef_object
+cdef_class::cdef_class_rep::construct_object (const octave_value_list& args)
+{
+  if (! is_abstract ())
+    {
+      cdef_object obj;
+
+      if (is_meta_class ())
+        {
+          // This code path is only used to create empty meta objects
+          // as filler for the empty values within a meta object array.
+
+          cdef_class this_cls = wrap ();
+
+          static cdef_object empty_class;
+
+          if (this_cls == cdef_class::meta_class ())
+            {
+              if (! empty_class.ok ())
+                empty_class = make_class ("", std::list<cdef_class> ());
+              obj = empty_class;
+            }
+          else if (this_cls == cdef_class::meta_property ())
+            {
+              static cdef_property empty_property;
+
+              if (! empty_class.ok ())
+                empty_class = make_class ("", std::list<cdef_class> ());
+              if (! empty_property.ok ())
+                empty_property = make_property (empty_class, "");
+              obj = empty_property;
+            }
+          else if (this_cls == cdef_class::meta_method ())
+            {
+              static cdef_method empty_method;
+
+              if (! empty_class.ok ())
+                empty_class = make_class ("", std::list<cdef_class> ());
+              if (! empty_method.ok ())
+                empty_method = make_method (empty_class, "", octave_value ());
+              obj = empty_method;
+            }
+          else if (this_cls == cdef_class::meta_package ())
+            {
+              static cdef_package empty_package;
+
+              if (! empty_package.ok ())
+                empty_package = make_package ("");
+              obj = empty_package;
+            }
+          else
+            panic_impossible ();
+
+          return obj;
+        }
+      else
+        {
+          if (is_handle_class ())
+            obj = cdef_object (new handle_cdef_object ());
+          else
+            obj = cdef_object (new value_cdef_object ());
+          obj.set_class (wrap ());
+
+          initialize_object (obj);
+
+          if (! error_state)
+            {
+              run_constructor (obj, args);
+
+              if (! error_state)
+                return obj;
+            }
+        }
+    }
+  else
+    error ("cannot instantiate object for abstract class `%s'",
+           get_name ().c_str ());
+
+  return cdef_object ();
+}
+
+static octave_value
+compute_attribute_value (tree_classdef_attribute* t)
+{
+  if (t->expression ())
+    {
+      if (t->expression ()->is_identifier ())
+        {
+          std::string s = t->expression ()->name ();
+
+          if (s == "public")
+            return std::string ("public");
+          else if (s == "protected")
+            return std::string ("protected");
+          else if (s == "private")
+            return std::string ("private");
+        }
+
+      return t->expression ()->rvalue1 ();
+    }
+  else
+    return octave_value (true);
+}
+
+template<class T>
+static std::string
+attribute_value_to_string (T* t, octave_value v)
+{
+  if (v.is_string ())
+    return v.string_value ();
+  else if (t->expression ())
+    return t->expression ()->original_text ();
+  else
+    return std::string ("true");
+}
+
+cdef_class
+cdef_class::make_meta_class (tree_classdef* t, bool is_at_folder)
+{
+  cdef_class retval;
+  std::string class_name, full_class_name;
+
+  // Class creation
+
+  class_name = full_class_name = t->ident ()->name ();
+  if (! t->package_name ().empty ())
+    full_class_name = t->package_name () + "." + full_class_name;
+
+#if DEBUG_TRACE
+  std::cerr << "class: " << full_class_name << std::endl;
+#endif
+
+  std::list<cdef_class> slist;
+
+  if (t->superclass_list ())
+    {
+      for (tree_classdef_superclass_list::iterator it =
+             t->superclass_list ()->begin ();
+           ! error_state && it != t->superclass_list ()->end (); ++it)
+        {
+          std::string sclass_name = (*it)->class_name ();
+
+#if DEBUG_TRACE
+          std::cerr << "superclass: " << sclass_name << std::endl;
+#endif
+
+          cdef_class sclass = lookup_class (sclass_name);
+
+          if (! error_state)
+            {
+              if (! sclass.get ("Sealed").bool_value ())
+                slist.push_back (sclass);
+              else
+                {
+                  ::error ("`%s' cannot inherit from `%s', because it is sealed",
+                           full_class_name.c_str (), sclass_name.c_str ());
+                  return retval;
+                }
+            }
+          else
+            return retval;
+
+        }
+    }
+
+  retval = ::make_class (full_class_name, slist);
+
+  if (error_state)
+    return cdef_class ();
+
+  // Package owning this class
+
+  if (! t->package_name ().empty ())
+    {
+      cdef_package pack = cdef_manager::find_package (t->package_name ());
+
+      if (! error_state && pack.ok ())
+        retval.put ("ContainingPackage", to_ov (pack));
+    }
+
+  // Class attributes
+
+  if (t->attribute_list ())
+    {
+      for (tree_classdef_attribute_list::iterator
+           it = t->attribute_list ()->begin ();
+           it != t->attribute_list ()->end ();
+           ++it)
+        {
+          std::string aname = (*it)->ident ()->name ();
+          octave_value avalue = compute_attribute_value (*it);
+
+#if DEBUG_TRACE
+          std::cerr << "class attribute: " << aname << " = "
+                    << attribute_value_to_string (*it, avalue) << std::endl;
+#endif
+
+          retval.put (aname, avalue);
+        }
+    }
+
+  tree_classdef_body* b = t->body ();
+
+  if (b)
+    {
+      // Keep track of the get/set accessor methods. They will be used
+      // later on when creating properties.
+
+      std::map<std::string, octave_value> get_methods;
+      std::map<std::string, octave_value> set_methods;
+
+      // Method blocks
+
+      std::list<tree_classdef_methods_block *> mb_list = b->methods_list ();
+
+      for (tree_classdef_body::methods_list_iterator it = mb_list.begin ();
+           it != mb_list.end (); ++it)
+        {
+          std::map<std::string, octave_value> amap;
+
+#if DEBUG_TRACE
+          std::cerr << "method block" << std::endl;
+#endif
+
+          // Method attributes
+
+          if ((*it)->attribute_list ())
+            {
+              for (tree_classdef_attribute_list::iterator ait =
+                     (*it)->attribute_list ()->begin ();
+                   ait != (*it)->attribute_list ()->end (); ++ait)
+                {
+                  std::string aname = (*ait)->ident ()->name ();
+                  octave_value avalue = compute_attribute_value (*ait);
+
+#if DEBUG_TRACE
+                  std::cerr << "method attribute: " << aname << " = "
+                            << attribute_value_to_string (*ait, avalue)
+                            << std::endl;
+#endif
+
+                  amap[aname] = avalue;
+                }
+            }
+
+          // Methods
+
+          if ((*it)->element_list ())
+            {
+              for (tree_classdef_methods_list::iterator mit =
+                     (*it)->element_list ()->begin ();
+                   mit != (*it)->element_list ()->end (); ++mit)
+                {
+                  std::string mname = mit->function_value ()->name ();
+                  std::string mprefix = mname.substr (0, 4);
+
+                  if (mprefix == "get.")
+                    get_methods[mname.substr (4)] =
+                      make_fcn_handle (*mit, full_class_name + ">" + mname);
+                  else if (mprefix == "set.")
+                    set_methods[mname.substr (4)] =
+                      make_fcn_handle (*mit, full_class_name + ">" + mname);
+                  else
+                    {
+                      cdef_method meth = make_method (retval, mname, *mit);
+
+#if DEBUG_TRACE
+                      std::cerr << (mname == class_name ? "constructor"
+                                                        : "method")
+                                << ": " << mname << std::endl;
+#endif
+
+                      for (std::map<std::string, octave_value>::iterator
+                           ait = amap.begin (); ait != amap.end (); ++ait)
+                        meth.put (ait->first, ait->second);
+
+                      retval.install_method (meth);
+                    }
+                }
+            }
+        }
+
+      if (is_at_folder)
+        {
+          // Look for all external methods visible on octave path at the
+          // time of loading of the class.
+          //
+          // TODO: This is an "extension" to Matlab behavior, which only
+          // looks in the @-folder containing the original classdef
+          // file. However, this is easier to implement it that way at
+          // the moment.
+
+          std::list<std::string> external_methods =
+            load_path::methods (full_class_name);
+
+          for (std::list<std::string>::const_iterator
+               it = external_methods.begin ();
+               it != external_methods.end ();
+               ++it)
+            {
+              // TODO: should we issue a warning if the method is already
+              // defined in the classdef file?
+
+              if (*it != class_name
+                  && ! retval.find_method (*it, true).ok ())
+                {
+                  // Create a dummy method that is used until the actual
+                  // method is loaded.
+
+                  octave_user_function *fcn = new octave_user_function ();
+
+                  fcn->stash_function_name (*it);
+
+                  cdef_method meth = make_method (retval, *it,
+                                                  octave_value (fcn));
+
+                  retval.install_method (meth);
+                }
+            }
+        }
+
+      // Property blocks
+
+      // FIXME: default property expression should be able to call static
+      //        methods of the class being constructed. A restricted CLASSNAME
+      //        symbol should be added to the scope before evaluating default
+      //        value expressions.
+
+      std::list<tree_classdef_properties_block *> pb_list
+        = b->properties_list ();
+
+      for (tree_classdef_body::properties_list_iterator it = pb_list.begin ();
+           it != pb_list.end (); ++it)
+        {
+          std::map<std::string, octave_value> amap;
+
+#if DEBUG_TRACE
+          std::cerr << "property block" << std::endl;
+#endif
+
+          // Property attributes
+
+          if ((*it)->attribute_list ())
+            {
+              for (tree_classdef_attribute_list::iterator ait =
+                     (*it)->attribute_list ()->begin ();
+                   ait != (*it)->attribute_list ()->end (); ++ait)
+                {
+                  std::string aname = (*ait)->ident ()->name ();
+                  octave_value avalue = compute_attribute_value (*ait);
+
+#if DEBUG_TRACE
+                  std::cerr << "property attribute: " << aname << " = "
+                            << attribute_value_to_string (*ait, avalue)
+                            << std::endl;
+#endif
+
+                  if (aname == "Access")
+                    {
+                      amap["GetAccess"] = avalue;
+                      amap["SetAccess"] = avalue;
+                    }
+                  else
+                    amap[aname] = avalue;
+                }
+            }
+
+          // Properties
+
+          if ((*it)->element_list ())
+            {
+              for (tree_classdef_property_list::iterator pit =
+                     (*it)->element_list ()->begin ();
+                   pit != (*it)->element_list ()->end (); ++pit)
+                {
+                  std::string prop_name = (*pit)->ident ()->name ();
+
+                  cdef_property prop = ::make_property (retval, prop_name);
+
+#if DEBUG_TRACE
+                  std::cerr << "property: " << (*pit)->ident ()->name ()
+                            << std::endl;
+#endif
+
+                  if ((*pit)->expression ())
+                    {
+                      octave_value pvalue = (*pit)->expression ()->rvalue1 ();
+
+#if DEBUG_TRACE
+                      std::cerr << "property default: "
+                                << attribute_value_to_string (*pit, pvalue)
+                                << std::endl;
+#endif
+
+                      prop.put ("DefaultValue", pvalue);
+                    }
+
+                  // Install property attributes.  This is done before assigning
+                  // the property accessors so we can do validationby using
+                  // cdef_property methods.
+
+                  for (std::map<std::string, octave_value>::iterator ait = amap.begin ();
+                       ait != amap.end (); ++ait)
+                    prop.put (ait->first, ait->second);
+
+                  // Install property access methods, if any. Remove the
+                  // accessor methods from the temporary storage map, so we can 
+                  // detect which ones are invalid and do not correspond to a
+                  // defined property.
+
+                  std::map<std::string, octave_value>::iterator git =
+                    get_methods.find (prop_name);
+
+                  if (git != get_methods.end ())
+                    {
+                      make_function_of_class (retval, git->second);
+                      prop.put ("GetMethod", git->second);
+                      get_methods.erase (git);
+                    }
+
+                  std::map<std::string, octave_value>::iterator sit =
+                    set_methods.find (prop_name);
+
+                  if (sit != set_methods.end ())
+                    {
+                      make_function_of_class (retval, sit->second);
+                      prop.put ("SetMethod", sit->second);
+                      set_methods.erase (sit);
+                    }
+
+                  retval.install_property (prop);
+                }
+            }
+        }
+    }
+
+  return retval;
+}
+
+octave_function*
+cdef_class::get_method_function (const std::string& /* nm */)
+{
+  octave_classdef_meta* p = new octave_classdef_meta (*this);
+
+  return p;
+}
+
+octave_value
+cdef_property::cdef_property_rep::get_value (const cdef_object& obj,
+                                             bool do_check_access,
+                                             const std::string& who)
+{
+  octave_value retval;
+
+  if (do_check_access && ! check_get_access ())
+    {
+      gripe_property_access (who, wrap (), false);
+
+      return retval;
+    }
+
+  if (! obj.is_constructed ())
+    {
+      cdef_class cls (to_cdef (get ("DefiningClass")));
+
+      if (! obj.is_partially_constructed_for (cls))
+        {
+          ::error ("cannot reference properties of class `%s' for non-constructed object",
+                   cls.get_name ().c_str ());
+          return retval;
+        }
+    }
+
+  octave_value get_fcn = get ("GetMethod");
+
+  // FIXME: should check whether we're already in get accessor method
+
+  if (get_fcn.is_empty () || is_method_executing (get_fcn, obj))
+    retval = obj.get (get ("Name").string_value ());
+  else
+    {
+      octave_value_list args;
+
+      args(0) = to_ov (obj);
+
+      args = execute_ov (get_fcn, args, 1);
+
+      if (! error_state)
+        retval = args(0);
+    }
+
+  return retval;
+}
+
+octave_value
+cdef_property::cdef_property_rep::get_value (bool do_check_access,
+                                             const std::string& who)
+{
+  if (do_check_access && ! check_get_access ())
+    {
+      gripe_property_access (who, wrap (), false);
+
+      return octave_value ();
+    }
+
+  return get ("DefaultValue");
+}
+
+bool
+cdef_property::cdef_property_rep::is_recursive_set (const cdef_object& /* obj */) const
+{
+  // FIXME: implement
+  return false;
+}
+
+void
+cdef_property::cdef_property_rep::set_value (cdef_object& obj,
+                                             const octave_value& val,
+                                             bool do_check_access,
+                                             const std::string& who)
+{
+  if (do_check_access && ! check_set_access ())
+    {
+      gripe_property_access (who, wrap (), true);
+
+      return;
+    }
+
+  if (! obj.is_constructed ())
+    {
+      cdef_class cls (to_cdef (get ("DefiningClass")));
+
+      if (! obj.is_partially_constructed_for (cls))
+        {
+          ::error ("cannot reference properties of class `%s' for non-constructed object",
+                   cls.get_name ().c_str ());
+          return;
+        }
+    }
+
+  octave_value set_fcn = get ("SetMethod");
+
+  if (set_fcn.is_empty () || is_method_executing (set_fcn, obj))
+    obj.put (get ("Name").string_value (), val);
+  else
+    {
+      octave_value_list args;
+
+      args(0) = to_ov (obj);
+      args(1) = val;
+
+      args = execute_ov (set_fcn, args, 1);
+
+      if (! error_state)
+        {
+          if (args.length () > 0 && args(0).is_defined ())
+            {
+              if (args (0).is_classdef_object ())
+                {
+                  cdef_object new_obj = to_cdef (args(0));
+
+                  if (! error_state)
+                    obj = new_obj;
+                }
+              else
+                ::warning ("set-method of property `%s' returned a non-classdef object",
+                           get_name ().c_str ());
+            }
+        }
+    }
+}
+
+bool
+cdef_property::cdef_property_rep::check_get_access (void) const
+{
+  cdef_class cls (to_cdef (get ("DefiningClass")));
+
+  if (! error_state)
+    return ::check_access (cls, get ("GetAccess"), std::string (),
+                           get_name (), false);
+
+  return false;
+}
+
+bool
+cdef_property::cdef_property_rep::check_set_access (void) const
+{
+  cdef_class cls (to_cdef (get ("DefiningClass")));
+
+  if (! error_state)
+    return ::check_access (cls, get ("SetAccess"), std::string (),
+                           get_name (), true);
+
+  return false;
+}
+
+void
+cdef_method::cdef_method_rep::check_method (void)
+{
+  if (is_external ())
+    {
+      if (is_dummy_method (function))
+        {
+          std::string name = get_name ();
+          std::string cls_name = dispatch_type;
+          std::string pack_name;
+
+          size_t pos = cls_name.rfind ('.');
+
+          if (pos != std::string::npos)
+            {
+              pack_name = cls_name.substr (0, pos);
+              cls_name = cls_name.substr (pos + 1);
+            }
+
+          std::string dir_name;
+          std::string file_name = load_path::find_method (cls_name, name,
+                                                          dir_name, pack_name);
+
+          if (! file_name.empty ())
+            {
+              octave_function *fcn = load_fcn_from_file (file_name, dir_name,
+                                                         dispatch_type,
+                                                         pack_name);
+
+              if (fcn)
+                {
+                  function = octave_value (fcn);
+
+                  make_function_of_class (dispatch_type, function);
+                }
+            }
+        }
+      else
+        {
+          // FIXME: check out-of-date status
+        }
+
+      if (is_dummy_method (function))
+        ::error ("no definition found for method `%s' of class `%s'",
+                 get_name ().c_str (), dispatch_type.c_str ());
+    }
+}
+
+octave_value_list
+cdef_method::cdef_method_rep::execute (const octave_value_list& args,
+                                       int nargout, bool do_check_access,
+                                       const std::string& who)
+{
+  octave_value_list retval;
+
+  if (do_check_access && ! check_access ())
+    {
+      gripe_method_access (who, wrap ());
+
+      return retval;
+    }
+
+  if (! get ("Abstract").bool_value ())
+    {
+      check_method ();
+
+      if (! error_state && function.is_defined ())
+        {
+          retval = execute_ov (function, args, nargout);
+        }
+    }
+  else
+    error ("%s: cannot execute abstract method",
+           get ("Name").string_value ().c_str ());
+
+  return retval;
+}
+
+octave_value_list
+cdef_method::cdef_method_rep::execute (const cdef_object& obj,
+                                       const octave_value_list& args,
+                                       int nargout, bool do_check_access,
+                                       const std::string& who)
+{
+  octave_value_list retval;
+
+  if (do_check_access && ! check_access ())
+    {
+      gripe_method_access (who, wrap ());
+
+      return retval;
+    }
+
+  if (! get ("Abstract").bool_value ())
+    {
+      check_method ();
+
+      if (! error_state && function.is_defined ())
+        {
+          octave_value_list new_args;
+
+          new_args.resize (args.length () + 1);
+
+          new_args(0) = to_ov (obj);
+          for (int i = 0; i < args.length (); i++)
+            new_args(i+1) = args(i);
+
+          retval = execute_ov (function, new_args, nargout);
+        }
+    }
+  else
+    error ("%s: cannot execute abstract method",
+           get ("Name").string_value ().c_str ());
+
+  return retval;
+}
+
+bool
+cdef_method::cdef_method_rep::is_constructor (void) const
+{
+  if (function.is_function())
+    return function.function_value ()->is_classdef_constructor ();
+
+  return false;
+}
+
+bool
+cdef_method::cdef_method_rep::check_access (void) const
+{
+  cdef_class cls (to_cdef (get ("DefiningClass")));
+
+  if (! error_state)
+    return ::check_access (cls, get ("Access"), get_name ());
+
+  return false;
+}
+
+octave_value_list
+cdef_method::cdef_method_rep::meta_subsref
+  (const std::string& type, const std::list<octave_value_list>& idx,
+   int nargout)
+{
+  octave_value_list retval;
+
+  switch (type[0])
+    {
+    case '(':
+      retval = execute (idx.front (), type.length () > 1 ? 1 : nargout, true);
+      break;
+
+    default:
+      error ("invalid meta.method indexing");
+      break;
+    }
+
+  if (! error_state)
+    {
+      if (type.length () > 1 && idx.size () > 1 && ! retval.empty ())
+        retval = retval(0).next_subsref (nargout, type, idx, 1);
+    }
+
+  return retval;
+}
+
+static cdef_package
+lookup_package (const std::string& name)
+{
+  return cdef_manager::find_package (name);
+}
+
+static octave_value_list
+package_fromName (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval;
+
+  if (args.length () == 1)
+    {
+      std::string name = args(0).string_value ();
+
+      if (! error_state)
+        retval(0) = to_ov (lookup_package (name));
+      else
+        error ("fromName: invalid package name, expected a string value");
+    }
+  else
+    error ("fromName: invalid number of parameters");
+
+  return retval;
+}
+
+static octave_value_list
+package_get_classes (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval (1, Matrix ());
+
+  if (args.length () == 1 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.package")
+    {
+      cdef_package pack (to_cdef (args(0)));
+
+      retval(0) = pack.get_classes ();
+    }
+
+  return retval;
+}
+
+static octave_value_list
+package_get_functions (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval (1, Matrix ());
+
+  if (args.length () == 0 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.package")
+    {
+      cdef_package pack (to_cdef (args(0)));
+
+      retval(0) = pack.get_functions ();
+    }
+
+  return retval;
+}
+
+static octave_value_list
+package_get_packages (const octave_value_list& args, int /* nargout */)
+{
+  octave_value_list retval (1, Matrix ());
+
+  if (args.length () == 0 && args(0).type_name () == "object"
+      && args(0).class_name () == "meta.package")
+    {
+      cdef_package pack (to_cdef (args(0)));
+
+      retval(0) = pack.get_packages ();
+    }
+
+  return retval;
+}
+
+static octave_value_list
+package_getAllPackages (const octave_value_list& /* args */, int /* nargout */)
+{
+  std::map<std::string, cdef_package> toplevel_packages;
+
+  std::list<std::string> names = load_path::get_all_package_names ();
+
+  toplevel_packages["meta"] = cdef_manager::find_package ("meta", false,
+                                                          false);
+
+  for (std::list<std::string>::const_iterator it = names.begin ();
+       it != names.end (); ++it)
+    toplevel_packages[*it] = cdef_manager::find_package (*it, false, true);
+
+  Cell c (toplevel_packages.size (), 1);
+
+  int i = 0;
+
+  for (std::map<std::string, cdef_package>::const_iterator it =
+         toplevel_packages.begin ();
+       it != toplevel_packages.end (); ++it)
+    c(i++,0) = to_ov (it->second);
+
+  return octave_value_list (octave_value (c));
+}
+
+void
+cdef_package::cdef_package_rep::install_class (const cdef_class& cls,
+                                               const std::string& nm)
+{
+  class_map[nm] = cls;
+
+  member_count++;
+}
+
+void
+cdef_package::cdef_package_rep::install_function (const octave_value& fcn,
+                                                  const std::string& nm)
+{
+  function_map[nm] = fcn;
+}
+
+void
+cdef_package::cdef_package_rep::install_package (const cdef_package& pack,
+                                                 const std::string& nm)
+{
+  package_map[nm] = pack;
+
+  member_count++;
+}
+
+template<class T1, class T2>
+Cell
+map2Cell (const std::map<T1, T2>& m)
+{
+  Cell retval (1, m.size ());
+  int i = 0;
+
+  for (typename std::map<T1, T2>::const_iterator it = m.begin ();
+       it != m.end (); ++it, ++i)
+    {
+      retval(i) = to_ov (it->second);
+    }
+
+  return retval;
+}
+
+Cell
+cdef_package::cdef_package_rep::get_classes (void) const
+{ return map2Cell (class_map); }
+
+Cell
+cdef_package::cdef_package_rep::get_functions (void) const
+{ return map2Cell (function_map); }
+
+Cell
+cdef_package::cdef_package_rep::get_packages (void) const
+{ return map2Cell (package_map); }
+
+octave_value
+cdef_package::cdef_package_rep::find (const std::string& nm)
+{
+  std::string symbol_name = get_name () + "." + nm;
+
+  return symbol_table::find (symbol_name, octave_value_list (), true, false);
+}
+
+octave_value_list
+cdef_package::cdef_package_rep::meta_subsref
+  (const std::string& type, const std::list<octave_value_list>& idx,
+   int nargout)
+{
+  octave_value_list retval;
+
+  switch (type[0])
+    {
+    case '.':
+      if (idx.front ().length () == 1)
+        {
+          std::string nm = idx.front ()(0).string_value ();
+
+          if (! error_state)
+            {
+#if DEBUG_TRACE
+              std::cerr << "meta.package query: " << nm << std::endl;
+#endif
+
+              octave_value o = find (nm);
+
+              if (o.is_defined ())
+                {
+                  if (o.is_function ())
+                    {
+                      octave_function* fcn = o.function_value ();
+
+                      if (! error_state)
+                        {
+                          // NOTE: the case where the package query is the last
+                          // part of this subsref index is handled in the parse
+                          // tree, because there is some logic to handle magic
+                          // "end" that makes it impossible to execute the
+                          // function call at this stage.
+
+                          if (type.size () > 1
+                              && ! fcn->is_postfix_index_handled (type[1]))
+                            {
+                              octave_value_list tmp_args;
+
+                              retval = o.do_multi_index_op (nargout,
+                                                            tmp_args);
+                            }
+                          else
+                            retval(0) = o;
+
+                          if (type.size () > 1 && idx.size () > 1)
+                            retval = retval(0).next_subsref (nargout, type,
+                                                             idx, 1);
+                        }
+                    }
+                  else if (type.size () > 1 && idx.size () > 1)
+                    retval = o.next_subsref (nargout, type, idx, 1);
+                  else
+                    retval(0) = o;
+                }
+              else if (! error_state)
+                error ("member `%s' in package `%s' does not exist",
+                       nm.c_str (), get_name ().c_str ());
+            }
+          else
+            error ("invalid meta.package indexing, expected a symbol name");
+        }
+      else
+        error ("invalid meta.package indexing");
+      break;
+
+    default:
+      error ("invalid meta.package indexing");
+      break;
+    }
+
+  return retval;
+}
+
+void
+cdef_package::cdef_package_rep::meta_release (void)
+{
+  // FIXME: Do we really want to unregister the package, as it
+  //        could still be referenced by classes or sub-packages?
+  //        If the package object is recreated later on, it won't
+  //        match the one already referenced by those classes or
+  //        sub-packages.
+
+  //cdef_manager::unregister_package (wrap ());
+}
+
+cdef_class cdef_class::_meta_class = cdef_class ();
+cdef_class cdef_class::_meta_property = cdef_class ();
+cdef_class cdef_class::_meta_method = cdef_class ();
+cdef_class cdef_class::_meta_package = cdef_class ();
+
+cdef_package cdef_package::_meta = cdef_package ();
+
+void
+install_classdef (void)
+{
+  octave_classdef::register_type ();
+
+  /* bootstrap */
+  cdef_class handle = make_class ("handle");
+  cdef_class meta_class = cdef_class::_meta_class = make_meta_class ("meta.class", handle);
+  handle.set_class (meta_class);
+  meta_class.set_class (meta_class);
+
+  /* meta classes */
+  cdef_class meta_property = cdef_class::_meta_property = make_meta_class ("meta.property", handle);
+  cdef_class meta_method = cdef_class::_meta_method = make_meta_class ("meta.method", handle);
+  cdef_class meta_package = cdef_class::_meta_package = make_meta_class ("meta.package", handle);
+
+  cdef_class meta_event = make_meta_class ("meta.event", handle);
+  cdef_class meta_dynproperty = make_meta_class ("meta.dynamicproperty", handle);
+
+  /* meta.class properties */
+  meta_class.install_property (make_attribute (meta_class, "Abstract"));
+  meta_class.install_property (make_attribute (meta_class, "ConstructOnLoad"));
+  meta_class.install_property (make_property  (meta_class, "ContainingPackage"));
+  meta_class.install_property (make_property  (meta_class, "Description"));
+  meta_class.install_property (make_property  (meta_class, "DetailedDescription"));
+  meta_class.install_property (make_property  (meta_class, "Events"));
+  meta_class.install_property (make_attribute (meta_class, "HandleCompatible"));
+  meta_class.install_property (make_attribute (meta_class, "Hidden"));
+  meta_class.install_property
+      (make_property (meta_class, "InferiorClasses",
+                      make_fcn_handle (class_get_inferiorclasses, "meta.class>get.InferiorClasses"),
+                      "public", Matrix (), "private"));
+  meta_class.install_property
+      (make_property  (meta_class, "Methods",
+                       make_fcn_handle (class_get_methods, "meta.class>get.Methods"),
+                       "public", Matrix (), "private"));
+  meta_class.install_property
+      (make_property  (meta_class, "MethodList",
+                       make_fcn_handle (class_get_methods, "meta.class>get.MethodList"),
+                       "public", Matrix (), "private"));
+  meta_class.install_property (make_attribute (meta_class, "Name"));
+  meta_class.install_property
+      (make_property  (meta_class, "Properties",
+                       make_fcn_handle (class_get_properties, "meta.class>get.Properties"),
+                       "public", Matrix (), "private"));
+  meta_class.install_property
+      (make_property  (meta_class, "PropertyList",
+                       make_fcn_handle (class_get_properties, "meta.class>get.PropertyList"),
+                       "public", Matrix (), "private"));
+  meta_class.install_property (make_attribute (meta_class, "Sealed"));
+  meta_class.install_property
+      (make_property (meta_class, "SuperClasses",
+                      make_fcn_handle (class_get_superclasses, "meta.class>get.SuperClasses"),
+                      "public", Matrix (), "private"));
+  meta_class.install_property
+      (make_property (meta_class, "SuperClassList",
+                      make_fcn_handle (class_get_superclasses, "meta.class>get.SuperClassList"),
+                      "public", Matrix (), "private"));
+  /* meta.class methods */
+  meta_class.install_method (make_method (meta_class, "fromName", class_fromName,
+                                          "public", true));
+  meta_class.install_method (make_method (meta_class, "fevalStatic", class_fevalStatic,
+                                          "public", false));
+  meta_class.install_method (make_method (meta_class, "getConstant", class_getConstant,
+                                          "public", false));
+  meta_class.install_method (make_method (meta_class, "eq", class_eq));
+  meta_class.install_method (make_method (meta_class, "ne", class_ne));
+  meta_class.install_method (make_method (meta_class, "lt", class_lt));
+  meta_class.install_method (make_method (meta_class, "le", class_le));
+  meta_class.install_method (make_method (meta_class, "gt", class_gt));
+  meta_class.install_method (make_method (meta_class, "ge", class_ge));
+
+  /* meta.method properties */
+  meta_method.install_property (make_attribute (meta_method, "Abstract"));
+  meta_method.install_property (make_attribute (meta_method, "Access"));
+  meta_method.install_property (make_attribute (meta_method, "DefiningClass"));
+  meta_method.install_property (make_attribute (meta_method, "Description"));
+  meta_method.install_property (make_attribute (meta_method, "DetailedDescription"));
+  meta_method.install_property (make_attribute (meta_method, "Hidden"));
+  meta_method.install_property (make_attribute (meta_method, "Name"));
+  meta_method.install_property (make_attribute (meta_method, "Sealed"));
+  meta_method.install_property (make_attribute (meta_method, "Static"));
+
+  /* meta.property properties */
+  meta_property.install_property (make_attribute (meta_property, "Name"));
+  meta_property.install_property (make_attribute (meta_property, "Description"));
+  meta_property.install_property (make_attribute (meta_property, "DetailedDescription"));
+  meta_property.install_property (make_attribute (meta_property, "Abstract"));
+  meta_property.install_property (make_attribute (meta_property, "Constant"));
+  meta_property.install_property (make_attribute (meta_property, "GetAccess"));
+  meta_property.install_property (make_attribute (meta_property, "SetAccess"));
+  meta_property.install_property (make_attribute (meta_property, "Dependent"));
+  meta_property.install_property (make_attribute (meta_property, "Transient"));
+  meta_property.install_property (make_attribute (meta_property, "Hidden"));
+  meta_property.install_property (make_attribute (meta_property, "GetObservable"));
+  meta_property.install_property (make_attribute (meta_property, "SetObservable"));
+  meta_property.install_property (make_attribute (meta_property, "GetMethod"));
+  meta_property.install_property (make_attribute (meta_property, "SetMethod"));
+  meta_property.install_property (make_attribute (meta_property, "DefiningClass"));
+  meta_property.install_property
+      (make_property (meta_property, "DefaultValue",
+                      make_fcn_handle (property_get_defaultvalue, "meta.property>get.DefaultValue"),
+                      "public", Matrix (), "private"));
+  meta_property.install_property (make_attribute (meta_property, "HasDefault"));
+  /* meta.property events */
+  // FIXME: add events
+
+  /* handle methods */
+  handle.install_method (make_method (handle, "delete", handle_delete));
+
+  /* meta.package properties */
+  meta_package.install_property (make_attribute (meta_package, "Name"));
+  meta_package.install_property (make_property  (meta_package, "ContainingPackage"));
+  meta_package.install_property
+      (make_property (meta_package, "ClassList",
+                      make_fcn_handle (package_get_classes, "meta.package>get.ClassList"),
+                      "public", Matrix (), "private"));
+  meta_package.install_property
+      (make_property (meta_package, "Classes",
+                      make_fcn_handle (package_get_classes, "meta.package>get.Classes"),
+                      "public", Matrix (), "private"));
+  meta_package.install_property
+      (make_property (meta_package, "FunctionList",
+                      make_fcn_handle (package_get_functions, "meta.package>get.FunctionList"),
+                      "public", Matrix (), "private"));
+  meta_package.install_property
+      (make_property (meta_package, "Functions",
+                      make_fcn_handle (package_get_functions, "meta.package>get.Functions"),
+                      "public", Matrix (), "private"));
+  meta_package.install_property
+      (make_property (meta_package, "PackageList",
+                      make_fcn_handle (package_get_packages, "meta.package>get.PackageList"),
+                      "public", Matrix (), "private"));
+  meta_package.install_property
+      (make_property (meta_package, "Packages",
+                      make_fcn_handle (package_get_packages, "meta.package>get.Packages"),
+                      "public", Matrix (), "private"));
+  meta_package.install_method (make_method (meta_package, "fromName", package_fromName,
+                                            "public", true));
+  meta_package.install_method (make_method (meta_package, "getAllPackages", package_getAllPackages,
+                                            "public", true));
+
+  /* create "meta" package */
+  cdef_package package_meta = cdef_package::_meta = make_package ("meta");
+  package_meta.install_class (meta_class,       "class");
+  package_meta.install_class (meta_property,    "property");
+  package_meta.install_class (meta_method,      "method");
+  package_meta.install_class (meta_package,     "package");
+  package_meta.install_class (meta_event,       "event");
+  package_meta.install_class (meta_dynproperty, "dynproperty");
+
+  /* install built-in classes into the symbol table */
+  symbol_table::install_built_in_function
+    ("meta.class", octave_value (meta_class.get_constructor_function ()));
+  symbol_table::install_built_in_function
+    ("meta.method", octave_value (meta_method.get_constructor_function ()));
+  symbol_table::install_built_in_function
+    ("meta.property", octave_value (meta_property.get_constructor_function ()));
+  symbol_table::install_built_in_function
+    ("meta.package", octave_value (meta_package.get_constructor_function ()));
+  symbol_table::install_built_in_function
+    ("meta.event", octave_value (meta_event.get_constructor_function ()));
+  symbol_table::install_built_in_function
+    ("meta.dynproperty", octave_value (meta_dynproperty.get_constructor_function ()));
+}
+
+//----------------------------------------------------------------------------
+
+cdef_manager* cdef_manager::instance = 0;
+
+void
+cdef_manager::create_instance (void)
+{
+  instance = new cdef_manager ();
+
+  if (instance)
+    singleton_cleanup_list::add (cleanup_instance);
+}
+
+cdef_class
+cdef_manager::do_find_class (const std::string& name,
+                             bool error_if_not_found, bool load_if_not_found)
+{
+  std::map<std::string, cdef_class>::iterator it = all_classes.find (name);
+
+  if (it == all_classes.end ())
+    {
+      if (load_if_not_found)
+        {
+          octave_value ov_cls;
+
+          size_t pos = name.rfind ('.');
+
+          if (pos == std::string::npos)
+            ov_cls = symbol_table::find (name);
+          else
+            {
+              std::string pack_name = name.substr (0, pos);
+
+              cdef_package pack = do_find_package (pack_name, false, true);
+
+              if (pack.ok ())
+                ov_cls = pack.find (name.substr (pos+1));
+            }
+
+          if (ov_cls.is_defined ())
+            it = all_classes.find (name);
+        }
+    }
+
+  if (it == all_classes.end ())
+    {
+      if (error_if_not_found)
+        error ("class not found: %s", name.c_str ());
+    }
+  else
+    {
+      cdef_class cls = it->second;
+
+      if (! cls.is_builtin ())
+        cls = lookup_class (cls);
+
+      if (cls.ok ())
+        return cls;
+      else
+        all_classes.erase (it);
+    }
+
+  return cdef_class ();
+}
+
+octave_function*
+cdef_manager::do_find_method_symbol (const std::string& method_name,
+                                     const std::string& class_name)
+{
+  octave_function *retval = 0;
+
+  cdef_class cls = find_class (class_name, false, false);
+
+  if (cls.ok ())
+    {
+      cdef_method meth = cls.find_method (method_name);
+
+      if (meth.ok ())
+        retval = new octave_classdef_meta (meth);
+    }
+
+  return retval;
+}
+
+cdef_package
+cdef_manager::do_find_package (const std::string& name,
+                               bool error_if_not_found,
+                               bool load_if_not_found)
+{
+  cdef_package retval;
+
+  std::map<std::string, cdef_package>::const_iterator it
+    = all_packages.find (name);
+
+  if (it != all_packages.end ())
+    {
+      retval = it->second;
+
+      if (! retval.ok ())
+        error ("invalid package `%s'", name.c_str ());
+    }
+  else
+    {
+      if (load_if_not_found && load_path::find_package (name))
+        {
+          size_t pos = name.find ('.');
+
+          if (pos == std::string::npos)
+            retval = make_package (name, std::string ());
+          else
+            {
+              std::string parent_name = name.substr (0, pos);
+
+              retval = make_package (name, parent_name);
+            }
+        }
+      else if (error_if_not_found)
+        error ("unknown package `%s'", name.c_str ());
+    }
+
+  return retval;
+}
+
+octave_function*
+cdef_manager::do_find_package_symbol (const std::string& pack_name)
+{
+  octave_function* retval = 0;
+
+  cdef_package pack = find_package (pack_name, false);
+
+  if (pack.ok ())
+    retval = new octave_classdef_meta (pack);
+
+  return retval;
+}
+
+//----------------------------------------------------------------------------
+
+DEFUN (__meta_get_package__, args, , "")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      std::string cname = args(0).string_value ();
+
+      if (! error_state)
+        retval = to_ov (lookup_package (cname));
+      else
+        error ("invalid package name, expected a string value");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+DEFUN (__superclass_reference__, args, /* nargout */,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} __superclass_reference__ ()\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  return octave_value (new octave_classdef_superclass_ref (args));
+}
+
+DEFUN (__meta_class_query__, args, /* nargout */,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} __meta_class_query__ ()\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+#if DEBUG_TRACE
+  std::cerr << "__meta_class_query__ ("
+            << args(0).string_value () << ")"
+            << std::endl;
+#endif
+
+  if (args.length () == 1)
+    {
+      std::string cls = args(0).string_value ();
+
+      if (! error_state)
+        retval = to_ov (lookup_class (cls));
+      else
+        error ("invalid class name, expected a string value");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+DEFUN (metaclass, args, /* nargout */,
+       "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} metaclass (obj)\n\
+Returns the meta.class object corresponding to the class of @var{obj}.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    {
+      cdef_object obj = to_cdef (args(0));
+
+      if (! error_state)
+        retval = to_ov (obj.get_class ());
+      else
+        print_usage ();
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/libinterp/octave-value/ov-classdef.h
@@ -0,0 +1,1688 @@
+/*
+
+Copyright (C) 2012-2015 Michael Goffioul
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_classdef_h)
+#define octave_classdef_h 1
+
+#include <map>
+#include <set>
+#include <string>
+
+#include "oct-map.h"
+#include "oct-refcount.h"
+#include "ov-base.h"
+#include "symtab.h"
+
+class cdef_object;
+class cdef_class;
+class cdef_property;
+class cdef_method;
+class cdef_package;
+
+class tree_classdef;
+
+// This is mainly a boostrap class to declare the expected interface.
+// The actual base class is cdef_class_base, which is declared after
+// cdef_object, such that it can contain cdef_object objects.
+class
+cdef_object_rep
+{
+public:
+  friend class cdef_object;
+
+public:
+  cdef_object_rep (void) : refcount (1) { }
+
+  virtual ~cdef_object_rep (void) { }
+
+  virtual cdef_class get_class (void) const;
+
+  virtual void set_class (const cdef_class&)
+  { gripe_invalid_object ("set_class"); }
+
+  virtual cdef_object_rep* clone (void) const
+  {
+    gripe_invalid_object ("clone");
+    return new cdef_object_rep ();
+  }
+
+  virtual cdef_object_rep* empty_clone (void) const
+  {
+    gripe_invalid_object ("empty_clone");
+    return new cdef_object_rep ();
+  }
+
+  virtual cdef_object_rep* copy (void) const
+  {
+    gripe_invalid_object ("copy");
+    return new cdef_object_rep ();
+  }
+
+  virtual cdef_object_rep* make_array (void) const
+  {
+    gripe_invalid_object ("make_array");
+    return new cdef_object_rep ();
+  }
+
+  virtual bool is_array (void) const { return false; }
+
+  virtual bool is_value_object (void) const { return false; }
+
+  virtual bool is_handle_object (void) const { return false; }
+
+  virtual bool is_meta_object (void) const { return false; }
+
+  virtual Array<cdef_object> array_value (void) const
+  {
+    gripe_invalid_object ("array_value");
+    return Array<cdef_object> ();
+  }
+
+  virtual void put (const std::string&, const octave_value&)
+  { gripe_invalid_object ("put"); }
+
+  virtual octave_value get (const std::string&) const
+  {
+    gripe_invalid_object ("get");
+    return octave_value ();
+  }
+
+  virtual octave_value_list
+  subsref (const std::string&, const std::list<octave_value_list>&,
+           int, size_t&, const cdef_class&, bool)
+  {
+    gripe_invalid_object ("subsref");
+    return octave_value_list ();
+  }
+
+  virtual octave_value
+  subsasgn (const std::string&, const std::list<octave_value_list>&,
+            const octave_value&)
+  {
+    gripe_invalid_object ("subsasgn");
+    return octave_value ();
+  }
+
+  virtual string_vector map_keys (void) const;
+
+  virtual bool is_valid (void) const { return false; }
+
+  std::string class_name (void) const;
+
+  virtual void mark_for_construction (const cdef_class&)
+  { gripe_invalid_object ("mark_for_construction"); }
+
+  virtual bool is_constructed_for (const cdef_class&) const
+  {
+    gripe_invalid_object ("is_constructed_for");
+    return false;
+  }
+
+  virtual bool is_partially_constructed_for (const cdef_class&) const
+  {
+    gripe_invalid_object ("is_partially_constructed_for");
+    return false;
+  }
+
+  virtual void mark_as_constructed (void)
+  { gripe_invalid_object ("mark_as_constructed"); }
+
+  virtual void mark_as_constructed (const cdef_class&)
+  { gripe_invalid_object ("mark_as_constructed"); }
+
+  virtual bool is_constructed (void) const
+  {
+    gripe_invalid_object ("is_constructed");
+    return false;
+  }
+
+  virtual octave_idx_type static_count (void) const { return 0; }
+
+  virtual void destroy (void) { delete this; }
+
+  void release (void)
+  {
+    if (--refcount == static_count ())
+      destroy ();
+  }
+
+  virtual dim_vector dims (void) const { return dim_vector (); }
+
+protected:
+  /* reference count */
+  octave_refcount<octave_idx_type> refcount;
+
+protected:
+  /* Restricted copying */
+  cdef_object_rep (const cdef_object_rep&)
+    : refcount (1) { }
+
+private:
+  /* No assignment */
+  cdef_object_rep& operator = (const cdef_object_rep& );
+
+  void gripe_invalid_object (const char *who) const
+  { error ("%s: invalid object", who); }
+};
+
+class
+cdef_object
+{
+public:
+  /* FIXME: use a null object */
+  cdef_object (void)
+    : rep (new cdef_object_rep ()) { }
+
+  cdef_object (const cdef_object& obj)
+    : rep (obj.rep)
+  {
+    rep->refcount++;
+  }
+
+  cdef_object (cdef_object_rep *r)
+    : rep (r) { }
+
+  virtual ~cdef_object (void)
+  { rep->release (); }
+
+  cdef_object& operator = (const cdef_object& obj)
+  {
+    if (rep != obj.rep)
+      {
+        rep->release ();
+
+        rep = obj.rep;
+        rep->refcount++;
+      }
+
+    return *this;
+  }
+
+  cdef_class get_class (void) const;
+
+  void set_class (const cdef_class& cls) { rep->set_class (cls); }
+
+  std::string class_name (void) const
+  { return rep->class_name (); }
+
+  cdef_object clone (void) const
+  { return cdef_object (rep->clone ()); }
+
+  cdef_object empty_clone (void) const
+  { return cdef_object (rep->empty_clone ()); }
+
+  dim_vector dims (void) const { return rep->dims (); }
+
+  cdef_object make_array (void) const
+  { return cdef_object (rep->make_array ()); }
+
+  cdef_object copy (void) const
+  { return cdef_object (rep->copy ()); }
+
+  bool is_array (void) const { return rep->is_array (); }
+
+  bool is_value_object (void) const { return rep->is_value_object (); }
+
+  bool is_handle_object (void) const { return rep->is_handle_object (); }
+
+  bool is_meta_object (void) const { return rep->is_meta_object (); }
+
+  Array<cdef_object> array_value (void) const { return rep->array_value (); }
+
+  void put (const std::string& pname, const octave_value& val)
+  { rep->put (pname, val); }
+
+  octave_value get (const std::string& pname) const
+  { return rep->get (pname); }
+
+  octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout, size_t& skip, const cdef_class& context,
+           bool auto_add = false)
+  { return rep->subsref (type, idx, nargout, skip, context, auto_add); }
+
+  octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs, int ignore_copies = 0)
+  {
+    make_unique (ignore_copies);
+    return rep->subsasgn (type, idx, rhs);
+  }
+
+  string_vector map_keys (void) const { return rep->map_keys (); }
+
+  octave_map map_value (void) const;
+
+  const cdef_object_rep* get_rep (void) const { return rep; }
+
+  bool ok (void) const { return rep->is_valid (); }
+
+  void mark_for_construction (const cdef_class& cls)
+  { rep->mark_for_construction (cls); }
+
+  bool is_constructed (void) const { return rep->is_constructed (); }
+
+  bool is_constructed_for (const cdef_class& cls) const
+  { return rep->is_constructed_for (cls); }
+
+  bool is_partially_constructed_for (const cdef_class& cls) const
+  { return rep->is_partially_constructed_for (cls); }
+
+  void mark_as_constructed (void) { rep->mark_as_constructed (); }
+
+  void mark_as_constructed (const cdef_class& cls)
+  { rep->mark_as_constructed (cls); }
+
+  bool is (const cdef_object& obj) const { return rep == obj.rep; }
+
+protected:
+  cdef_object_rep* get_rep (void) { return rep; }
+
+  void make_unique (int ignore_copies)
+  {
+    if (rep->refcount > ignore_copies + 1)
+      *this = clone ();
+  }
+
+private:
+  cdef_object_rep *rep;
+};
+
+class
+cdef_object_base : public cdef_object_rep
+{
+public:
+  cdef_object_base (void)
+    : cdef_object_rep (), klass ()
+  {
+    register_object ();
+  }
+
+  ~cdef_object_base (void) { unregister_object (); }
+
+  cdef_class get_class (void) const;
+
+  void set_class (const cdef_class& cls);
+
+  cdef_object_rep* empty_clone (void) const
+  { return new cdef_object_base (*this); }
+
+  cdef_object_rep* make_array (void) const;
+
+protected:
+  // Restricted copying!
+  cdef_object_base (const cdef_object_base& obj)
+    : cdef_object_rep (obj), klass (obj.klass)
+  {
+    register_object ();
+  }
+
+private:
+  void register_object (void);
+
+  void unregister_object (void);
+
+private:
+  // The class of the object
+  cdef_object klass;
+
+private:
+  // No assignment!
+  cdef_object_base& operator = (const cdef_object_base&);
+};
+
+class
+cdef_object_array : public cdef_object_base
+{
+public:
+  cdef_object_array (void) : cdef_object_base () { }
+
+  cdef_object_array (const Array<cdef_object>& a)
+    : cdef_object_base (), array (a) { }
+
+  cdef_object_rep* clone (void) const
+  { return new cdef_object_array (*this); }
+
+  dim_vector dims (void) const { return array.dims (); }
+
+  bool is_valid (void) const { return true; }
+
+  bool is_array (void) const { return true; }
+
+  Array<cdef_object> array_value (void) const { return array; }
+
+  octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout, size_t& skip, const cdef_class& context,
+           bool auto_add);
+
+  octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
+
+private:
+  Array<cdef_object> array;
+
+private:
+  void fill_empty_values (void) { fill_empty_values (array); }
+
+  void fill_empty_values (Array<cdef_object>& arr);
+
+  // Private copying!
+  cdef_object_array (const cdef_object_array& obj)
+    : cdef_object_base (obj), array (obj.array) { }
+
+  // No assignment!
+  cdef_object_array& operator = (const cdef_object_array&);
+};
+
+class
+cdef_object_scalar : public cdef_object_base
+{
+public:
+  cdef_object_scalar (void) : cdef_object_base () { }
+
+  ~cdef_object_scalar (void) { }
+
+  dim_vector dims (void) const { return dim_vector (1, 1); }
+
+  void put (const std::string& pname, const octave_value& val)
+  { map.assign (pname, val); }
+
+  octave_value get (const std::string& pname) const
+  {
+    Cell val = map.contents (pname);
+
+    if (val.numel () > 0)
+      return val(0, 0);
+    else
+      {
+        error ("get: unknown slot: %s", pname.c_str ());
+        return octave_value ();
+      }
+  }
+
+  octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout, size_t& skip, const cdef_class& context,
+           bool auto_add);
+
+  octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
+
+  void mark_for_construction (const cdef_class&);
+
+  bool is_constructed_for (const cdef_class& cls) const;
+
+  bool is_partially_constructed_for (const cdef_class& cls) const;
+
+  void mark_as_constructed (void) { ctor_list.clear (); }
+
+  void mark_as_constructed (const cdef_class& cls) { ctor_list.erase (cls); }
+
+  bool is_constructed (void) const { return ctor_list.empty (); }
+
+protected:
+  // Object property values
+  octave_scalar_map map;
+
+  // Internal/temporary structure used during object construction
+  std::map< cdef_class, std::list<cdef_class> > ctor_list;
+
+protected:
+  // Restricted object copying!
+  cdef_object_scalar (const cdef_object_scalar& obj)
+    : cdef_object_base (obj), map (obj.map), ctor_list (obj.ctor_list) { }
+
+private:
+  // No assignment!
+  cdef_object_scalar& operator = (const cdef_object_scalar&);
+};
+
+class
+handle_cdef_object : public cdef_object_scalar
+{
+public:
+  handle_cdef_object (void)
+    : cdef_object_scalar () { }
+
+  ~handle_cdef_object (void);
+
+  cdef_object_rep* clone (void) const
+  {
+    handle_cdef_object *obj = const_cast<handle_cdef_object *> (this);
+    obj->refcount++;
+    return obj;
+  }
+
+  cdef_object_rep* copy (void) const
+  { return new handle_cdef_object (*this); }
+
+  bool is_valid (void) const { return true; }
+
+  bool is_handle_object (void) const { return true; }
+
+protected:
+  // Restricted copying!
+  handle_cdef_object (const handle_cdef_object& obj)
+    : cdef_object_scalar (obj) { }
+
+private:
+  // No assignment
+  handle_cdef_object& operator = (const handle_cdef_object&);
+};
+
+class
+value_cdef_object : public cdef_object_scalar
+{
+public:
+  value_cdef_object (void)
+    : cdef_object_scalar () { }
+
+  ~value_cdef_object (void);
+
+  cdef_object_rep* clone (void) const
+  { return new value_cdef_object (*this); }
+
+  cdef_object_rep* copy (void) const { return clone (); }
+
+  bool is_valid (void) const { return true; }
+
+  bool is_value_object (void) const { return true; }
+
+private:
+  // Private copying!
+  value_cdef_object (const value_cdef_object& obj)
+    : cdef_object_scalar (obj) { }
+
+  // No assignment!
+  value_cdef_object& operator = (const value_cdef_object&);
+};
+
+class
+cdef_meta_object_rep : public handle_cdef_object
+{
+public:
+  cdef_meta_object_rep (void)
+    : handle_cdef_object () { }
+
+  ~cdef_meta_object_rep (void) { }
+
+  cdef_object_rep* copy (void) const
+  { return new cdef_meta_object_rep (*this); }
+
+  bool is_meta_object (void) const { return true; }
+
+  virtual bool is_class (void) const { return false; }
+
+  virtual bool is_property (void) const { return false; }
+
+  virtual bool is_method (void) const { return false; }
+
+  virtual bool is_package (void) const { return false; }
+
+  virtual octave_value_list
+  meta_subsref (const std::string& /* type */,
+                const std::list<octave_value_list>& /* idx */,
+                int /* nargout */)
+  {
+    ::error ("subsref: invalid meta object");
+    return octave_value_list ();
+  }
+
+  virtual void meta_release (void) { }
+
+  virtual bool meta_is_postfix_index_handled (char /* type */) const
+  { return false; }
+
+protected:
+  // Restricted copying!
+  cdef_meta_object_rep (const cdef_meta_object_rep& obj)
+    : handle_cdef_object (obj) { }
+
+private:
+  // No assignment!
+  cdef_meta_object_rep& operator = (const cdef_meta_object_rep&);
+};
+
+class
+cdef_meta_object : public cdef_object
+{
+public:
+  cdef_meta_object (void)
+    : cdef_object () { }
+
+  cdef_meta_object (const cdef_meta_object& obj)
+    : cdef_object (obj) { }
+
+  cdef_meta_object (cdef_meta_object_rep *r)
+    : cdef_object (r) { }
+
+  // Object consistency is checked in sub-classes.
+  cdef_meta_object (const cdef_object& obj)
+    : cdef_object (obj) { }
+
+  ~cdef_meta_object (void) { }
+
+  bool is_class (void) const { return get_rep ()->is_class (); }
+
+  bool is_property (void) const { return get_rep ()->is_property (); }
+
+  bool is_method (void) const { return get_rep ()->is_method (); }
+
+  bool is_package (void) const { return get_rep ()->is_package (); }
+
+  octave_value_list
+  meta_subsref (const std::string& type,
+                const std::list<octave_value_list>& idx, int nargout)
+  { return get_rep ()->meta_subsref (type, idx, nargout); }
+
+  void meta_release (void) { get_rep ()->meta_release (); }
+
+  bool meta_is_postfix_index_handled (char type) const
+  { return get_rep ()->meta_is_postfix_index_handled (type); }
+
+private:
+  cdef_meta_object_rep* get_rep (void)
+  { return dynamic_cast<cdef_meta_object_rep *> (cdef_object::get_rep ()); }
+
+  const cdef_meta_object_rep* get_rep (void) const
+  { return dynamic_cast<const cdef_meta_object_rep *> (cdef_object::get_rep ()); }
+};
+
+class
+cdef_class : public cdef_meta_object
+{
+private:
+
+  class
+  cdef_class_rep : public cdef_meta_object_rep
+  {
+  public:
+    cdef_class_rep (void)
+      : cdef_meta_object_rep (), member_count (0), handle_class (false),
+        object_count (0), meta (false) { }
+
+    cdef_class_rep (const std::list<cdef_class>& superclasses);
+
+    cdef_object_rep* copy (void) const { return new cdef_class_rep (*this); }
+
+    bool is_class (void) const { return true; }
+
+    std::string get_name (void) const
+    { return get ("Name").string_value (); }
+
+    void set_name (const std::string& nm) { put ("Name", nm); }
+
+    bool is_abstract (void) const { return get ("Abstract").bool_value (); }
+
+    bool is_sealed (void) const { return get ("Sealed").bool_value (); }
+
+    cdef_method find_method (const std::string& nm, bool local = false);
+
+    void install_method (const cdef_method& meth);
+
+    Cell get_methods (void);
+
+    cdef_property find_property (const std::string& nm);
+
+    void install_property (const cdef_property& prop);
+
+    Cell get_properties (int mode);
+
+    std::map<std::string, cdef_property> get_property_map (int mode);
+
+    string_vector get_names (void);
+
+    void set_directory (const std::string& dir) { directory = dir; }
+
+    std::string get_directory (void) const { return directory; }
+
+    void delete_object (cdef_object obj);
+
+    octave_value_list
+    meta_subsref (const std::string& type,
+                  const std::list<octave_value_list>& idx, int nargout);
+
+    void meta_release (void);
+
+    bool meta_is_postfix_index_handled (char type) const
+    { return (type == '(' || type == '.'); }
+
+    octave_value construct (const octave_value_list& args);
+
+    cdef_object construct_object (const octave_value_list& args);
+
+    void initialize_object (cdef_object& obj);
+
+    void run_constructor (cdef_object& obj, const octave_value_list& args);
+
+    void mark_as_handle_class (void) { handle_class = true; }
+
+    bool is_handle_class (void) const { return handle_class; }
+
+    void register_object (void) { object_count++; }
+
+    void unregister_object (void) { object_count--; }
+
+    octave_idx_type static_count (void) const { return member_count; }
+
+    void destroy (void)
+    {
+      if (member_count)
+        {
+          refcount++;
+          cdef_class lock (this);
+
+          member_count = 0;
+          method_map.clear ();
+          property_map.clear ();
+        }
+      else
+        delete this;
+    }
+
+    void mark_as_meta_class (void) { meta = true; }
+
+    bool is_meta_class (void) const { return meta; }
+
+  private:
+    void load_all_methods (void);
+
+    void find_names (std::set<std::string>& names, bool all);
+
+    void find_properties (std::map<std::string,cdef_property>& props,
+                          int mode = 0);
+
+    void find_methods (std::map<std::string, cdef_method>& meths,
+                       bool only_inherited);
+
+    cdef_class wrap (void)
+    {
+      refcount++;
+      return cdef_class (this);
+    }
+
+  private:
+    // The @-directory were this class is loaded from.
+    // (not used yet)
+    std::string directory;
+
+    // The methods defined by this class.
+    std::map<std::string,cdef_method> method_map;
+
+    // The properties defined by this class.
+    std::map<std::string,cdef_property> property_map;
+
+    // The number of members in this class (methods, properties...)
+    octave_idx_type member_count;
+
+    // TRUE if this class is a handle class. A class is a handle
+    // class when the abstract "handle" class is one of its superclasses.
+    bool handle_class;
+
+    // The list of super-class constructors that are called implicitly by the
+    // the classdef engine when creating an object. These constructors are not
+    // called explicitly by the class constructor.
+    std::list<cdef_class> implicit_ctor_list;
+
+    // The number of objects of this class.
+    octave_refcount<octave_idx_type> object_count;
+
+    // TRUE if this class is a built-in meta class.
+    bool meta;
+
+    // Utility iterator typedef's.
+    typedef std::map<std::string,cdef_method>::iterator method_iterator;
+    typedef std::map<std::string,cdef_method>::const_iterator method_const_iterator;
+    typedef std::map<std::string,cdef_property>::iterator property_iterator;
+    typedef std::map<std::string,cdef_property>::const_iterator property_const_iterator;
+
+  private:
+    cdef_class_rep (const cdef_class_rep& c)
+      : cdef_meta_object_rep (c), directory (c.directory),
+        method_map (c.method_map), property_map (c.property_map),
+        member_count (c.member_count), handle_class (c.handle_class),
+        implicit_ctor_list (c.implicit_ctor_list),
+        object_count (c.object_count), meta (c.meta) { }
+  };
+
+public:
+  // Create and invalid class object
+  cdef_class (void)
+    : cdef_meta_object () { }
+
+  cdef_class (const std::string& nm,
+              const std::list<cdef_class>& superclasses)
+    : cdef_meta_object (new cdef_class_rep (superclasses))
+  { get_rep ()->set_name (nm); }
+
+  cdef_class (const cdef_class& cls)
+    : cdef_meta_object (cls) { }
+
+  cdef_class (const cdef_object& obj)
+    : cdef_meta_object (obj)
+  {
+    // This should never happen...
+    if (! is_class ())
+      error ("internal error: invalid assignment from %s to meta.class object",
+             class_name ().c_str ());
+  }
+
+  cdef_class& operator = (const cdef_class& cls)
+  {
+    cdef_object::operator= (cls);
+
+    return *this;
+  }
+
+  cdef_method find_method (const std::string& nm, bool local = false);
+
+  void install_method (const cdef_method& meth)
+  { get_rep ()->install_method (meth); }
+
+  Cell get_methods (void) { return get_rep ()->get_methods (); }
+
+  cdef_property find_property (const std::string& nm);
+
+  void install_property (const cdef_property& prop)
+  { get_rep ()->install_property (prop); }
+
+  Cell get_properties (int mode = property_normal)
+  { return get_rep ()->get_properties (mode); }
+
+  std::map<std::string, cdef_property>
+  get_property_map (int mode = property_normal)
+  { return get_rep ()->get_property_map (mode); }
+
+  string_vector get_names (void) { return get_rep ()->get_names (); }
+
+  bool is_abstract (void) const { return get_rep ()->is_abstract (); }
+
+  bool is_sealed (void) const { return get_rep ()->is_sealed (); }
+
+  void set_directory (const std::string& dir)
+  { get_rep ()->set_directory (dir); }
+
+  std::string get_directory (void) const
+  { return get_rep ()->get_directory (); }
+
+  std::string get_name (void) const
+  { return get_rep ()->get_name (); }
+
+  bool is_builtin (void) const
+  { return get_directory ().empty (); }
+
+  void delete_object (cdef_object obj)
+  { get_rep ()->delete_object (obj); }
+
+  static cdef_class make_meta_class (tree_classdef* t,
+                                     bool is_at_folder = false);
+
+  octave_function* get_method_function (const std::string& nm);
+
+  octave_function* get_constructor_function (void)
+  { return get_method_function (get_name ()); }
+
+  octave_value construct (const octave_value_list& args)
+  { return get_rep ()->construct (args); }
+
+  cdef_object construct_object (const octave_value_list& args)
+  { return get_rep ()->construct_object (args); }
+
+  void initialize_object (cdef_object& obj)
+  { get_rep ()->initialize_object (obj); }
+
+  void run_constructor (cdef_object& obj, const octave_value_list& args)
+  { get_rep ()->run_constructor (obj, args); }
+
+  void mark_as_handle_class (void)
+  { get_rep ()->mark_as_handle_class (); }
+
+  bool is_handle_class (void) const
+  { return get_rep ()->is_handle_class (); }
+
+  void mark_as_meta_class (void) { get_rep ()->mark_as_meta_class (); }
+
+  bool is_meta_class (void) const { return get_rep ()->is_meta_class (); }
+
+  static const cdef_class& meta_class (void) { return _meta_class; }
+  static const cdef_class& meta_property (void) { return _meta_property; }
+  static const cdef_class& meta_method (void) { return _meta_method; }
+  static const cdef_class& meta_package (void) { return _meta_package; }
+
+  void register_object (void) { get_rep ()->register_object (); }
+
+  void unregister_object (void) { get_rep ()->unregister_object (); }
+
+public:
+  enum
+  {
+    property_normal,
+    property_inherited,
+    property_all
+  };
+
+private:
+  cdef_class_rep* get_rep (void)
+  { return dynamic_cast<cdef_class_rep *> (cdef_object::get_rep ()); }
+
+  const cdef_class_rep* get_rep (void) const
+  { return dynamic_cast<const cdef_class_rep *> (cdef_object::get_rep ()); }
+
+  friend bool operator == (const cdef_class&, const cdef_class&);
+  friend bool operator != (const cdef_class&, const cdef_class&);
+  friend bool operator < (const cdef_class&, const cdef_class&);
+
+private:
+  static cdef_class _meta_class;
+  static cdef_class _meta_property;
+  static cdef_class _meta_method;
+  static cdef_class _meta_package;
+
+  friend void install_classdef (void);
+};
+
+inline bool
+operator == (const cdef_class& clsa, const cdef_class& clsb)
+// FIXME: is this really the right way to check class equality?
+{ return (clsa.get_rep () == clsb.get_rep ()); }
+
+inline bool
+operator != (const cdef_class& clsa, const cdef_class& clsb)
+{ return ! (clsa == clsb); }
+
+// This is only to be able to use cdef_class as map keys.
+inline bool
+operator < (const cdef_class& clsa, const cdef_class& clsb)
+{ return clsa.get_rep () < clsb.get_rep (); }
+
+class
+cdef_property : public cdef_meta_object
+{
+  friend class cdef_class;
+
+private:
+
+  class
+  cdef_property_rep : public cdef_meta_object_rep
+  {
+  public:
+    cdef_property_rep (void)
+      : cdef_meta_object_rep () { }
+
+    cdef_object_rep* copy (void) const { return new cdef_property_rep (*this); }
+
+    bool is_property (void) const { return true; }
+
+    std::string get_name (void) const { return get("Name").string_value (); }
+
+    void set_name (const std::string& nm) { put ("Name", nm); }
+
+    bool is_constant (void) const { return get("Constant").bool_value (); }
+
+    octave_value get_value (bool do_check_access = true,
+                            const std::string& who = std::string ());
+
+    octave_value get_value (const cdef_object& obj,
+                            bool do_check_access = true,
+                            const std::string& who = std::string ());
+
+    void set_value (cdef_object& obj, const octave_value& val,
+                    bool do_check_access = true,
+                    const std::string& who = std::string ());
+
+    bool check_get_access (void) const;
+
+    bool check_set_access (void) const;
+
+  private:
+    cdef_property_rep (const cdef_property_rep& p)
+      : cdef_meta_object_rep (p) { }
+
+    bool is_recursive_set (const cdef_object& obj) const;
+
+    cdef_property wrap (void)
+    {
+      refcount++;
+      return cdef_property (this);
+    }
+  };
+
+public:
+  cdef_property (void) : cdef_meta_object () { }
+
+  cdef_property (const std::string& nm)
+    : cdef_meta_object (new cdef_property_rep ())
+  { get_rep ()->set_name (nm); }
+
+  cdef_property (const cdef_property& prop)
+    : cdef_meta_object (prop) { }
+
+  cdef_property (const cdef_object& obj)
+    : cdef_meta_object (obj)
+  {
+    // This should never happen...
+    if (! is_property ())
+      error ("internal error: invalid assignment from %s to meta.property object",
+             class_name ().c_str ());
+  }
+
+  cdef_property& operator = (const cdef_property& prop)
+  {
+    cdef_object::operator= (prop);
+
+    return *this;
+  }
+
+  octave_value get_value (const cdef_object& obj, bool do_check_access = true,
+                          const std::string& who = std::string ())
+  { return get_rep ()->get_value (obj, do_check_access, who); }
+
+  octave_value get_value (bool do_check_access = true,
+                          const std::string& who = std::string ())
+  { return get_rep ()->get_value (do_check_access, who); }
+
+  void set_value (cdef_object& obj, const octave_value& val,
+                  bool do_check_access = true,
+                  const std::string& who = std::string ())
+  { get_rep ()->set_value (obj, val, do_check_access, who); }
+
+  bool check_get_access (void) const
+  { return get_rep ()->check_get_access (); }
+
+  bool check_set_access (void) const
+  { return get_rep ()->check_set_access (); }
+
+  std::string get_name (void) const { return get_rep ()->get_name (); }
+
+  bool is_constant (void) const { return get_rep ()->is_constant (); }
+
+private:
+  cdef_property_rep* get_rep (void)
+  { return dynamic_cast<cdef_property_rep *> (cdef_object::get_rep ()); }
+
+  const cdef_property_rep* get_rep (void) const
+  { return dynamic_cast<const cdef_property_rep *> (cdef_object::get_rep ()); }
+};
+
+class
+cdef_method : public cdef_meta_object
+{
+  friend class cdef_class;
+
+private:
+
+  class
+  cdef_method_rep : public cdef_meta_object_rep
+  {
+  public:
+    cdef_method_rep (void)
+      : cdef_meta_object_rep (), function (), dispatch_type ()
+    { }
+
+    cdef_object_rep* copy (void) const { return new cdef_method_rep(*this); }
+
+    bool is_method (void) const { return true; }
+
+    std::string get_name (void) const { return get("Name").string_value (); }
+
+    void set_name (const std::string& nm) { put ("Name", nm); }
+
+    bool is_static (void) const { return get("Static").bool_value (); }
+
+    octave_value get_function (void) const { return function; }
+
+    void set_function (const octave_value& fcn) { function = fcn; }
+
+    bool check_access (void) const;
+
+    bool is_external (void) const { return ! dispatch_type.empty (); }
+
+    void mark_as_external (const std::string& dtype)
+    { dispatch_type = dtype; }
+
+    octave_value_list execute (const octave_value_list& args, int nargout,
+                               bool do_check_access = true,
+                               const std::string& who = std::string ());
+
+    octave_value_list execute (const cdef_object& obj,
+                               const octave_value_list& args, int nargout,
+                               bool do_check_access = true,
+                               const std::string& who = std::string ());
+
+    bool is_constructor (void) const;
+
+    octave_value_list
+    meta_subsref (const std::string& type,
+                  const std::list<octave_value_list>& idx, int nargout);
+
+    bool meta_is_postfix_index_handled (char type) const
+    { return (type == '(' || type == '.'); }
+
+  private:
+    cdef_method_rep (const cdef_method_rep& m)
+      : cdef_meta_object_rep (m), function (m.function),
+        dispatch_type (m.dispatch_type)
+    { }
+
+    void check_method (void);
+
+    cdef_method wrap (void)
+    {
+      refcount++;
+      return cdef_method (this);
+    }
+
+  private:
+    octave_value function;
+
+    // When non-empty, the method is externally defined and this member
+    // is used to cache the dispatch type to look for the method.
+    std::string dispatch_type;
+  };
+
+public:
+  cdef_method (void) : cdef_meta_object () { }
+
+  cdef_method (const std::string& nm)
+    : cdef_meta_object (new cdef_method_rep ())
+  { get_rep ()->set_name (nm); }
+
+  cdef_method (const cdef_method& meth)
+    : cdef_meta_object (meth) { }
+
+  cdef_method (const cdef_object& obj)
+    : cdef_meta_object (obj)
+  {
+    // This should never happen...
+    if (! is_method ())
+      error ("internal error: invalid assignment from %s to meta.method object",
+             class_name ().c_str ());
+  }
+
+  cdef_method& operator = (const cdef_method& meth)
+  {
+    cdef_object::operator= (meth);
+
+    return *this;
+  }
+
+  /* normal invokation */
+  octave_value_list execute (const octave_value_list& args, int nargout,
+                             bool do_check_access = true,
+                             const std::string& who = std::string ())
+  { return get_rep ()->execute (args, nargout, do_check_access, who); }
+
+  /* dot-invokation: object is pushed as 1st argument */
+  octave_value_list execute (const cdef_object& obj,
+                             const octave_value_list& args, int nargout,
+                             bool do_check_access = true,
+                             const std::string& who = std::string ())
+  { return get_rep ()->execute (obj, args, nargout, do_check_access, who); }
+
+  bool check_access (void) const { return get_rep ()->check_access (); }
+
+  std::string get_name (void) const { return get_rep ()->get_name (); }
+
+  bool is_static (void) const { return get_rep ()->is_static (); }
+
+  void set_function (const octave_value& fcn)
+  { get_rep ()->set_function (fcn); }
+
+  octave_value get_function (void) const
+  { return get_rep ()->get_function (); }
+
+  bool is_constructor (void) const
+  { return get_rep ()->is_constructor (); }
+
+  bool is_external (void) const { return get_rep ()->is_external (); }
+
+  void mark_as_external (const std::string& dtype)
+  { get_rep ()->mark_as_external (dtype); }
+
+private:
+  cdef_method_rep* get_rep (void)
+  { return dynamic_cast<cdef_method_rep *> (cdef_object::get_rep ()); }
+
+  const cdef_method_rep* get_rep (void) const
+  { return dynamic_cast<const cdef_method_rep *> (cdef_object::get_rep ()); }
+};
+
+inline cdef_class
+cdef_object_rep::get_class (void) const
+{
+  gripe_invalid_object ("get_class");
+  return cdef_class ();
+}
+
+inline std::string
+cdef_object_rep::class_name (void) const
+{ return get_class ().get_name (); }
+
+inline cdef_class
+cdef_object::get_class (void) const
+{ return rep->get_class (); }
+
+inline cdef_class
+cdef_object_base::get_class (void) const
+{ return cdef_class (klass); }
+
+inline void
+cdef_object_base::set_class (const cdef_class& cls)
+{
+  if ((klass.ok () && cls.ok () && cls != get_class ())
+      || (klass.ok () && ! cls.ok ())
+      || (! klass.ok () && cls.ok ()))
+    {
+      unregister_object ();
+      klass = cls;
+      register_object ();
+    }
+}
+
+inline void
+cdef_object_base::register_object (void)
+{
+  if (klass.ok ())
+    {
+      cdef_class cls (get_class ());
+
+      if (! error_state && cls.ok ())
+        cls.register_object ();
+    }
+}
+
+inline void
+cdef_object_base::unregister_object (void)
+{
+  if (klass.ok ())
+    {
+      cdef_class cls (get_class ());
+
+      if (! error_state && cls.ok ())
+        cls.unregister_object ();
+    }
+}
+
+inline cdef_object_rep*
+cdef_object_base::make_array (void) const
+{
+  cdef_object_rep* r = new cdef_object_array ();
+
+  r->set_class (get_class ());
+
+  return r;
+}
+
+inline cdef_method
+cdef_class::find_method (const std::string& nm, bool local)
+{ return get_rep ()->find_method (nm, local); }
+
+inline cdef_property
+cdef_class::find_property (const std::string& nm)
+{ return get_rep ()->find_property (nm); }
+
+class
+cdef_package : public cdef_meta_object
+{
+  friend class cdef_class;
+
+private:
+
+  class
+  cdef_package_rep : public cdef_meta_object_rep
+  {
+  public:
+    cdef_package_rep (void)
+      : cdef_meta_object_rep (), member_count (0) { }
+
+    ~cdef_package_rep (void) { }
+
+    cdef_object_rep* copy (void) const { return new cdef_package_rep (*this); }
+
+    bool is_package (void) const { return true; }
+
+    std::string get_name (void) const { return get("Name").string_value (); }
+
+    void set_name (const std::string& nm) { put ("Name", nm); }
+
+    void install_class (const cdef_class& cls, const std::string& nm);
+
+    void install_function (const octave_value& fcn, const std::string& nm);
+
+    void install_package (const cdef_package& pack, const std::string& nm);
+
+    Cell get_classes (void) const;
+
+    Cell get_functions (void) const;
+
+    Cell get_packages (void) const;
+
+    octave_idx_type static_count (void) const { return member_count; }
+
+    void destroy (void)
+    {
+      if (member_count)
+        {
+          refcount++;
+          cdef_package lock (this);
+
+          member_count = 0;
+          class_map.clear ();
+          package_map.clear ();
+        }
+      else
+        delete this;
+    }
+
+    octave_value_list
+    meta_subsref (const std::string& type,
+                  const std::list<octave_value_list>& idx, int nargout);
+
+    void meta_release (void);
+
+    bool meta_is_postfix_index_handled (char type) const
+    { return (type == '.'); }
+
+    octave_value find (const std::string& nm);
+
+  private:
+    std::string full_name;
+    std::map<std::string, cdef_class> class_map;
+    std::map<std::string, octave_value> function_map;
+    std::map<std::string, cdef_package> package_map;
+
+    // The number of registered members in this package (classes, packages).
+    // This only accounts for the members that back-reference to this package.
+    octave_idx_type member_count;
+
+    typedef std::map<std::string, cdef_class>::iterator class_iterator;
+    typedef std::map<std::string, cdef_class>::const_iterator class_const_iterator;
+    typedef std::map<std::string, octave_value>::iterator function_iterator;
+    typedef std::map<std::string, octave_value>::const_iterator function_const_iterator;
+    typedef std::map<std::string, cdef_package>::iterator package_iterator;
+    typedef std::map<std::string, cdef_package>::const_iterator package_const_iterator;
+
+  private:
+    cdef_package_rep (const cdef_package_rep& p)
+      : cdef_meta_object_rep (p), full_name (p.full_name),
+        class_map (p.class_map), function_map (p.function_map),
+        package_map (p.package_map), member_count (p.member_count)
+    { }
+
+    cdef_package wrap (void)
+    {
+      refcount++;
+      return cdef_package (this);
+    }
+  };
+
+public:
+  cdef_package (void) : cdef_meta_object () { }
+
+  cdef_package (const std::string& nm)
+    : cdef_meta_object (new cdef_package_rep ())
+  { get_rep ()->set_name (nm); }
+
+  cdef_package (const cdef_package& pack)
+    : cdef_meta_object (pack) { }
+
+  cdef_package (const cdef_object& obj)
+    : cdef_meta_object (obj)
+  {
+    // This should never happen...
+    if (! is_package ())
+      error ("internal error: invalid assignment from %s to meta.package object",
+             class_name ().c_str ());
+  }
+
+  cdef_package& operator = (const cdef_package& pack)
+  {
+    cdef_object::operator= (pack);
+
+    return *this;
+  }
+
+  void install_class (const cdef_class& cls, const std::string& nm)
+  { get_rep ()->install_class (cls, nm); }
+
+  void install_function (const octave_value& fcn, const std::string& nm)
+  { get_rep ()->install_function (fcn, nm); }
+
+  void install_package (const cdef_package& pack, const std::string& nm)
+  { get_rep ()->install_package (pack, nm); }
+
+  Cell get_classes (void) const
+  { return get_rep ()->get_classes (); }
+
+  Cell get_functions (void) const
+  { return get_rep ()->get_functions (); }
+
+  Cell get_packages (void) const
+  { return get_rep ()->get_packages (); }
+
+  std::string get_name (void) const { return get_rep ()->get_name (); }
+
+  octave_value find (const std::string& nm) { return get_rep ()->find (nm); }
+
+  static const cdef_package& meta (void) { return _meta; }
+
+private:
+  cdef_package_rep* get_rep (void)
+  { return dynamic_cast<cdef_package_rep *> (cdef_object::get_rep ()); }
+
+  const cdef_package_rep* get_rep (void) const
+  { return dynamic_cast<const cdef_package_rep *> (cdef_object::get_rep ()); }
+
+private:
+  static cdef_package _meta;
+
+  friend void install_classdef (void);
+};
+
+class
+octave_classdef : public octave_base_value
+{
+public:
+  octave_classdef (void)
+    : octave_base_value (), object () { }
+
+  octave_classdef (const cdef_object& obj)
+    : octave_base_value (), object (obj) { }
+
+  octave_classdef (const octave_classdef& obj)
+    : octave_base_value (obj), object (obj.object) { }
+
+  octave_base_value* clone (void) const
+  { return new octave_classdef (object.clone ()); }
+
+  octave_base_value* empty_clone (void) const
+  { return new octave_classdef (object.empty_clone ()); }
+
+  cdef_object get_object (void) const { return object; }
+
+  cdef_object& get_object_ref (void) { return object; }
+
+  bool is_defined (void) const { return true; }
+
+  bool is_map (void) const { return false; }
+
+  bool is_object (void) const { return true; }
+
+  bool is_classdef_object (void) const { return true; }
+
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
+
+  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+
+  bool print_name_tag (std::ostream& os, const std::string& name) const;
+
+  void print_with_name (std::ostream& os, const std::string& name,
+                        bool print_padding = true);
+
+  bool is_instance_of (const std::string& cls_name) const;
+
+  octave_value_list subsref (const std::string& type,
+                             const std::list<octave_value_list>& idx,
+                             int nargout);
+
+  octave_value subsref (const std::string& type,
+                        const std::list<octave_value_list>& idx)
+  {
+    octave_value_list retval = subsref (type, idx, 1);
+    return (retval.length () > 0 ? retval(0) : octave_value ());
+  }
+
+  octave_value subsref (const std::string& type,
+                        const std::list<octave_value_list>& idx,
+                        bool auto_add);
+
+  octave_value subsasgn (const std::string& type,
+                         const std::list<octave_value_list>& idx,
+                         const octave_value& rhs);
+
+  octave_value
+  undef_subsasgn (const std::string& type,
+                  const std::list<octave_value_list>& idx,
+                  const octave_value& rhs);
+
+  string_vector map_keys (void) const { return object.map_keys (); }
+
+  octave_map map_value (void) const { return object.map_value (); }
+
+  dim_vector dims (void) const { return object.dims (); }
+
+private:
+  cdef_object object;
+
+private:
+
+public:
+  int type_id (void) const { return t_id; }
+  std::string type_name (void) const { return t_name; }
+  std::string class_name (void) const { return object.class_name (); }
+
+  static int static_type_id (void) { return t_id; }
+  static std::string static_type_name (void) { return t_name; }
+  static std::string static_class_name (void) { return "<unknown>"; }
+  static void register_type (void);
+
+private:
+  static int t_id;
+
+  static const std::string t_name;
+};
+
+inline octave_value
+to_ov (const cdef_object& obj)
+{
+  if (obj.ok ())
+    return octave_value (new octave_classdef (obj));
+  else
+    return octave_value (Matrix ());
+}
+
+inline octave_value
+to_ov (const octave_value& ov)
+{ return ov; }
+
+inline cdef_object
+to_cdef (const octave_value& val)
+{
+  if (val.type_name () == "object")
+    return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object ();
+  else
+    {
+      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
+      return cdef_object ();
+    }
+}
+
+inline cdef_object&
+to_cdef_ref (const octave_value& val)
+{
+  static cdef_object empty;
+
+  if (val.type_name () == "object")
+    return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object_ref ();
+  else
+    {
+      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
+      return empty;
+    }
+}
+
+inline cdef_object
+to_cdef (const cdef_object& obj)
+{ return obj; }
+
+OCTINTERP_API void install_classdef (void);
+
+class
+cdef_manager
+{
+public:
+
+  static cdef_class find_class (const std::string& name,
+                                bool error_if_not_found = true,
+                                bool load_if_not_found = true)
+  {
+    if (instance_ok ())
+      return instance->do_find_class (name, error_if_not_found,
+                                      load_if_not_found);
+
+    return cdef_class ();
+  }
+
+  static octave_function* find_method_symbol (const std::string& method_name,
+      const std::string& class_name)
+  {
+    if (instance_ok ())
+      return instance->do_find_method_symbol (method_name, class_name);
+
+    return 0;
+  }
+
+  static cdef_package find_package (const std::string& name,
+                                    bool error_if_not_found = true,
+                                    bool load_if_not_found = true)
+  {
+    if (instance_ok ())
+      return instance->do_find_package (name, error_if_not_found,
+                                        load_if_not_found);
+
+    return cdef_package ();
+  }
+
+  static octave_function* find_package_symbol (const std::string& pack_name)
+  {
+    if (instance_ok ())
+      return instance->do_find_package_symbol (pack_name);
+
+    return 0;
+  }
+
+  static void register_class (const cdef_class& cls)
+  {
+    if (instance_ok ())
+      instance->do_register_class (cls);
+  }
+
+  static void unregister_class (const cdef_class& cls)
+  {
+    if (instance_ok ())
+      instance->do_unregister_class (cls);
+  }
+
+  static void register_package (const cdef_package& pkg)
+  {
+    if (instance_ok ())
+      instance->do_register_package (pkg);
+  }
+
+  static void unregister_package (const cdef_package& pkg)
+  {
+    if (instance_ok ())
+      instance->do_unregister_package (pkg);
+  }
+
+private:
+
+  cdef_manager (void) { }
+
+  cdef_manager (const cdef_manager&);
+
+  cdef_manager& operator = (const cdef_manager&);
+
+  ~cdef_manager (void) { }
+
+  static void create_instance (void);
+
+  static bool instance_ok (void)
+  {
+    bool retval = true;
+
+    if (! instance)
+      create_instance ();
+
+    if (! instance)
+      {
+        ::error ("unable to create cdef_manager!");
+
+        retval = false;
+      }
+
+    return retval;
+  }
+
+  static void cleanup_instance (void)
+  {
+    delete instance;
+
+    instance = 0;
+  }
+
+  cdef_class do_find_class (const std::string& name, bool error_if_not_found,
+                            bool load_if_not_found);
+
+  octave_function* do_find_method_symbol (const std::string& method_name,
+                                          const std::string& class_name);
+
+  cdef_package do_find_package (const std::string& name,
+                                bool error_if_not_found,
+                                bool load_if_not_found);
+
+  octave_function* do_find_package_symbol (const std::string& pack_name);
+
+  void do_register_class (const cdef_class& cls)
+  { all_classes[cls.get_name ()] = cls; }
+
+  void do_unregister_class (const cdef_class& cls)
+  { all_classes.erase(cls.get_name ()); }
+
+  void do_register_package (const cdef_package& pkg)
+  { all_packages[pkg.get_name ()] = pkg; }
+
+  void do_unregister_package (const cdef_package& pkg)
+  { all_packages.erase(pkg.get_name ()); }
+
+private:
+
+  // The single cdef_manager instance
+  static cdef_manager *instance;
+
+  // All registered/loaded classes
+  std::map<std::string, cdef_class> all_classes;
+
+  // All registered/loaded packages
+  std::map<std::string, cdef_package> all_packages;
+};
+
+#endif
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
--- a/libinterp/octave-value/ov-colon.cc
+++ b/libinterp/octave-value/ov-colon.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,7 +35,7 @@
                                      "magic-colon", "magic-colon");
 
 void
-octave_magic_colon::print (std::ostream& os, bool) const
+octave_magic_colon::print (std::ostream& os, bool)
 {
   indent (os);
   print_raw (os);
--- a/libinterp/octave-value/ov-colon.h
+++ b/libinterp/octave-value/ov-colon.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -59,7 +59,7 @@
   octave_base_value *empty_clone (void) const
   { return new octave_magic_colon (); }
 
-  idx_vector index_vector (void) const { return idx_vector (':'); }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (':'); }
 
   bool is_defined (void) const { return true; }
 
@@ -67,7 +67,7 @@
 
   bool is_magic_colon (void) const { return true; }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
--- a/libinterp/octave-value/ov-complex.cc
+++ b/libinterp/octave-value/ov-complex.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,6 +32,7 @@
 
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-complex.h"
@@ -50,7 +51,6 @@
 
 template class octave_base_scalar<Complex>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_complex);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex,
                                      "complex scalar", "double");
@@ -105,7 +105,7 @@
 double
 octave_complex::double_value (bool force_conversion) const
 {
-  double retval = lo_ieee_nan_value ();
+  double retval;
 
   if (! force_conversion)
     gripe_implicit_conversion ("Octave:imag-to-real",
@@ -119,7 +119,7 @@
 float
 octave_complex::float_value (bool force_conversion) const
 {
-  float retval = lo_ieee_float_nan_value ();
+  float retval;
 
   if (! force_conversion)
     gripe_implicit_conversion ("Octave:imag-to-real",
@@ -308,15 +308,17 @@
   return true;
 }
 
+bool
+octave_complex::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                           bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_complex::save_hdf5 (hid_t loc_id, const char *name,
-                           bool /* save_as_floats */)
-{
   hsize_t dimens[3];
-  hid_t space_hid = -1, type_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, type_hid, data_hid;
+  space_hid = type_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0)
@@ -349,13 +351,20 @@
   H5Tclose (type_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_complex::load_hdf5 (hid_t loc_id, const char *name)
+octave_complex::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
+
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -396,11 +405,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_complex::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-complex.h
+++ b/libinterp/octave-value/ov-complex.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,7 +30,6 @@
 
 #include "lo-ieee.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "gripes.h"
@@ -80,7 +79,7 @@
                             bool resize_ok = false);
 
   // Use this to give a more specific error message
-  idx_vector index_vector (void) const
+  idx_vector index_vector (bool /* require_integers */ = false) const
   {
     error ("attempted to use a complex scalar as an index\n"
            "       (forgot to initialize i or j?)");
@@ -177,11 +176,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -198,7 +195,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-cs-list.cc
+++ b/libinterp/octave-value/ov-cs-list.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,7 +35,6 @@
 #include "ov-cs-list.h"
 #include "unwind-prot.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_cs_list);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_cs_list, "cs-list", "cs-list");
 
--- a/libinterp/octave-value/ov-cs-list.h
+++ b/libinterp/octave-value/ov-cs-list.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,7 +33,6 @@
 
 #include "Cell.h"
 #include "error.h"
-#include "oct-alloc.h"
 #include "oct-obj.h"
 #include "ov-typeinfo.h"
 
@@ -83,7 +82,6 @@
   // The list of Octave values.
   octave_value_list lst;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-cx-diag.cc
+++ b/libinterp/octave-value/ov-cx-diag.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -36,7 +36,6 @@
 
 template class octave_base_diag<ComplexDiagMatrix, ComplexMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_complex_diag_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex_diag_matrix,
                                      "complex diagonal matrix", "double");
@@ -167,7 +166,8 @@
 octave_complex_diag_matrix::save_binary (std::ostream& os, bool& save_as_floats)
 {
 
-  int32_t r = matrix.rows (), c = matrix.cols ();
+  int32_t r = matrix.rows ();
+  int32_t c = matrix.cols ();
   os.write (reinterpret_cast<char *> (&r), 4);
   os.write (reinterpret_cast<char *> (&c), 4);
 
--- a/libinterp/octave-value/ov-cx-diag.h
+++ b/libinterp/octave-value/ov-cx-diag.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -89,7 +89,6 @@
   bool chk_valid_scalar (const octave_value&,
                          Complex&) const;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-cx-mat.cc
+++ b/libinterp/octave-value/ov-cx-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -39,6 +39,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-base.h"
@@ -58,7 +59,6 @@
 
 template class octave_base_matrix<ComplexNDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_complex_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex_matrix,
                                      "complex matrix", "double");
@@ -143,6 +143,20 @@
   return retval;
 }
 
+NDArray
+octave_complex_matrix::array_value (bool force_conversion) const
+{
+  NDArray retval;
+
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+                               "complex matrix", "real matrix");
+
+  retval = ::real (matrix);
+
+  return retval;
+}
+
 Matrix
 octave_complex_matrix::matrix_value (bool force_conversion) const
 {
@@ -152,7 +166,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
                                "complex matrix", "real matrix");
 
-  retval = ::real (matrix.matrix_value ());
+  retval = ::real (ComplexMatrix (matrix));
 
   return retval;
 }
@@ -166,7 +180,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
                                "complex matrix", "real matrix");
 
-  retval = ::real (matrix.matrix_value ());
+  retval = ::real (ComplexMatrix (matrix));
 
   return retval;
 }
@@ -214,13 +228,13 @@
 ComplexMatrix
 octave_complex_matrix::complex_matrix_value (bool) const
 {
-  return matrix.matrix_value ();
+  return ComplexMatrix (matrix);
 }
 
 FloatComplexMatrix
 octave_complex_matrix::float_complex_matrix_value (bool) const
 {
-  return FloatComplexMatrix (matrix.matrix_value ());
+  return FloatComplexMatrix (ComplexMatrix (matrix));
 }
 
 boolNDArray
@@ -270,7 +284,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
                                "complex matrix", "real matrix");
 
-  retval = SparseMatrix (::real (matrix.matrix_value ()));
+  retval = SparseMatrix (::real (ComplexMatrix (matrix)));
 
   return retval;
 }
@@ -278,7 +292,7 @@
 SparseComplexMatrix
 octave_complex_matrix::sparse_complex_matrix_value (bool) const
 {
-  return SparseComplexMatrix (matrix.matrix_value ());
+  return SparseComplexMatrix (ComplexMatrix (matrix));
 }
 
 octave_value
@@ -302,7 +316,7 @@
   if (matrix.ndims () == 2
       && (matrix.rows () == 1 || matrix.columns () == 1))
     {
-      ComplexMatrix mat = matrix.matrix_value ();
+      ComplexMatrix mat (matrix);
 
       retval = mat.diag (m, n);
     }
@@ -549,19 +563,20 @@
   return true;
 }
 
+bool
+octave_complex_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                  bool save_as_floats)
+{
 #if defined (HAVE_HDF5)
 
-bool
-octave_complex_matrix::save_hdf5 (hid_t loc_id, const char *name,
-                                  bool save_as_floats)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1, type_hid = -1;
+  hid_t space_hid, data_hid, type_hid;
+  space_hid = data_hid = type_hid = -1;
   bool retval = true;
   ComplexNDArray m = complex_array_value ();
 
@@ -637,13 +652,20 @@
   H5Sclose (space_hid);
 
   return retval;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_complex_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_complex_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -711,11 +733,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 void
 octave_complex_matrix::print_raw (std::ostream& os,
                                   bool pr_as_read_syntax) const
--- a/libinterp/octave-value/ov-cx-mat.h
+++ b/libinterp/octave-value/ov-cx-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -111,6 +110,8 @@
   float float_scalar_value (bool frc_str_conv = false) const
   { return float_value (frc_str_conv); }
 
+  NDArray array_value (bool = false) const;
+
   Matrix matrix_value (bool = false) const;
 
   FloatMatrix float_matrix_value (bool = false) const;
@@ -154,11 +155,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -177,7 +176,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-cx-sparse.cc
+++ b/libinterp/octave-value/ov-cx-sparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -39,6 +39,8 @@
 #include "ov-complex.h"
 #include "gripes.h"
 
+#include "oct-hdf5.h"
+
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
@@ -49,7 +51,6 @@
 
 template class OCTINTERP_API octave_base_sparse<SparseComplexMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_sparse_complex_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_complex_matrix,
                                      "sparse complex matrix", "double");
@@ -241,16 +242,16 @@
 
   int32_t itmp;
   // Use negative value for ndims to be consistent with other formats
-  itmp= -2;
+  itmp = -2;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nr;
+  itmp = nr;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nc;
+  itmp = nc;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nz;
+  itmp = nz;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
   save_type st = LS_DOUBLE;
@@ -367,12 +368,14 @@
   return true;
 }
 
+bool
+octave_sparse_complex_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                         bool save_as_floats)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_sparse_complex_matrix::save_hdf5 (hid_t loc_id, const char *name,
-                                         bool save_as_floats)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
@@ -390,8 +393,8 @@
   if (group_hid < 0)
     return false;
 
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   SparseComplexMatrix m = sparse_complex_matrix_value ();
   octave_idx_type tmp;
   hsize_t hdims[2];
@@ -614,12 +617,20 @@
   H5Tclose (type_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_sparse_complex_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_sparse_complex_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   octave_idx_type nr, nc, nz;
   hid_t group_hid, data_hid, space_hid;
   hsize_t rank;
@@ -636,7 +647,7 @@
 #else
   group_hid = H5Gopen (loc_id, name);
 #endif
-  if (group_hid < 0 ) return false;
+  if (group_hid < 0) return false;
 
 #if HAVE_HDF5_18
   data_hid = H5Dopen (group_hid, "nr", H5P_DEFAULT);
@@ -840,7 +851,7 @@
     }
 
   Complex *ctmp = m.xdata ();
-  bool retval = false;
+
   if (H5Dread (data_hid, complex_type, H5S_ALL, H5S_ALL,
                H5P_DEFAULT, ctmp) >= 0
       && m.indices_ok ())
@@ -854,11 +865,13 @@
   H5Dclose (data_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_sparse_complex_matrix::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-cx-sparse.h
+++ b/libinterp/octave-value/ov-cx-sparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -142,11 +141,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -154,7 +151,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-dld-fcn.cc
+++ b/libinterp/octave-value/ov-dld-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,7 +33,6 @@
 #include "ov-dld-fcn.h"
 #include "ov.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_dld_function);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_dld_function,
                                      "dynamically-linked function",
--- a/libinterp/octave-value/ov-dld-fcn.h
+++ b/libinterp/octave-value/ov-dld-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -95,7 +95,6 @@
 
   octave_dld_function& operator = (const octave_dld_function& fn);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-fcn-handle.cc
+++ b/libinterp/octave-value/ov-fcn-handle.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 Copyright (C) 2010 Jaroslav Hajek
 
@@ -37,6 +37,7 @@
 #include "error.h"
 #include "gripes.h"
 #include "input.h"
+#include "oct-hdf5.h"
 #include "oct-map.h"
 #include "ov-base.h"
 #include "ov-fcn-handle.h"
@@ -64,7 +65,6 @@
 #include "ls-oct-binary.h"
 #include "ls-utils.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_fcn_handle);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_handle,
                                      "function handle",
@@ -270,7 +270,7 @@
           std::string dir_name = str.substr (0, xpos);
 
           octave_function *xfcn
-            = load_fcn_from_file (str, dir_name, "", nm);
+            = load_fcn_from_file (str, dir_name, "", "", nm);
 
           if (xfcn)
             {
@@ -300,7 +300,7 @@
 
           std::string dir_name = str.substr (0, xpos);
 
-          octave_function *xfcn = load_fcn_from_file (str, dir_name, "", nm);
+          octave_function *xfcn = load_fcn_from_file (str, dir_name, "", "", nm);
 
           if (xfcn)
             {
@@ -323,7 +323,7 @@
 
           std::string dir_name = fpath.substr (0, xpos);
 
-          octave_function *xfcn = load_fcn_from_file (fpath, dir_name, "", nm);
+          octave_function *xfcn = load_fcn_from_file (fpath, dir_name, "", "", nm);
 
           if (xfcn)
             {
@@ -705,11 +705,12 @@
   return success;
 }
 
-#if defined (HAVE_HDF5)
 bool
-octave_fcn_handle::save_hdf5 (hid_t loc_id, const char *name,
+octave_fcn_handle::save_hdf5 (octave_hdf5_id loc_id, const char *name,
                               bool save_as_floats)
 {
+#if defined (HAVE_HDF5)
+
   bool retval = true;
 
   hid_t group_hid = -1;
@@ -721,7 +722,8 @@
   if (group_hid < 0)
     return false;
 
-  hid_t space_hid = -1, data_hid = -1, type_hid = -1;;
+  hid_t space_hid, data_hid, type_hid;
+  space_hid = data_hid = type_hid = -1;
 
   // attach the type of the variable
   type_hid = H5Tcopy (H5T_C_S1);
@@ -931,11 +933,18 @@
   H5Gclose (group_hid);
 
   return retval;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_fcn_handle::load_hdf5 (hid_t loc_id, const char *name)
+octave_fcn_handle::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
   bool success = true;
 
   hid_t group_hid, data_hid, space_hid, type_hid, type_class_hid, st_id;
@@ -1291,10 +1300,13 @@
   H5Gclose (group_hid);
 
   return success;
+
+#else
+  gripe_load ("hdf5");
+  return false;
+#endif
 }
 
-#endif
-
 /*
 %!test
 %! a = 2;
@@ -1315,7 +1327,7 @@
 %! endif
 %! for i = 1:numel (modes)
 %!   mode = modes{i};
-%!   nm = tmpnam ();
+%!   nm = tempname ();
 %!   unwind_protect
 %!     f2 (1); # bug #33857
 %!     save (mode, nm, "f2", "g2", "hm2", "hdld2", "hbi2");
@@ -1368,7 +1380,7 @@
 %! endif
 %! for i = 1:numel (modes)
 %!   mode = modes{i};
-%!   nm = tmpnam ();
+%!   nm = tempname ();
 %!   unwind_protect
 %!     fcn_handle_save_recurse (2, mode, nm, f2, g2, hm2, hdld2, hbi2);
 %!     clear f2 g2 hm2 hdld2 hbi2
@@ -1386,7 +1398,7 @@
 */
 
 void
-octave_fcn_handle::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_fcn_handle::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -1572,7 +1584,8 @@
   // for any class.
   if (local_funcs && fptr
       && (fptr->is_subfunction () || fptr->is_private_function ()
-          || fptr->is_class_constructor ()))
+          || fptr->is_class_constructor ()
+          || fptr->is_classdef_constructor ()))
     {
       // Locally visible function.
       retval = octave_value (new octave_fcn_handle (f, tnm));
@@ -1848,10 +1861,11 @@
 
   if (nargin == 1 || nargin == 2)
     {
-      std::string nm = args(0).string_value ();
-
-      if (! error_state)
-        retval = make_fcn_handle (nm, nargin != 2);
+      if (args(0).is_string ())
+        {
+          std::string nm = args(0).string_value ();
+          retval = make_fcn_handle (nm, nargin != 2);
+        }
       else
         error ("str2func: FCN_NAME must be a string");
     }
--- a/libinterp/octave-value/ov-fcn-handle.h
+++ b/libinterp/octave-value/ov-fcn-handle.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -28,7 +28,6 @@
 #include <string>
 #include <memory>
 
-#include "oct-alloc.h"
 
 #include "ov-base.h"
 #include "ov-base-mat.h"
@@ -147,13 +146,11 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -164,7 +161,6 @@
 
   bool set_fcn (const std::string &octaveroot, const std::string& fpath);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 
--- a/libinterp/octave-value/ov-fcn-inline.cc
+++ b/libinterp/octave-value/ov-fcn-inline.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 
 This file is part of Octave.
 
@@ -38,6 +38,7 @@
 #include "defun.h"
 #include "error.h"
 #include "gripes.h"
+#include "oct-hdf5.h"
 #include "oct-map.h"
 #include "ov-base.h"
 #include "ov-fcn-inline.h"
@@ -53,7 +54,6 @@
 #include "ls-hdf5.h"
 #include "ls-utils.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_fcn_inline);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_inline,
                                      "inline function",
@@ -273,26 +273,30 @@
   return true;
 }
 
-#if defined (HAVE_HDF5)
 bool
-octave_fcn_inline::save_hdf5 (hid_t loc_id, const char *name,
+octave_fcn_inline::save_hdf5 (octave_hdf5_id loc_id, const char *name,
                               bool /* save_as_floats */)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   hid_t group_hid = -1;
+
 #if HAVE_HDF5_18
   group_hid = H5Gcreate (loc_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
 #else
   group_hid = H5Gcreate (loc_id, name, 0);
 #endif
-  if (group_hid < 0 ) return false;
+  if (group_hid < 0) return false;
 
   size_t len = 0;
   for (int i = 0; i < ifargs.length (); i++)
     if (len < ifargs(i).length ())
       len = ifargs(i).length ();
 
-  hid_t space_hid = -1, data_hid = -1, type_hid = -1;;
-  bool retval = true;
+  hid_t space_hid, data_hid, type_hid;
+  space_hid = data_hid = type_hid = -1;
 
   // FIXME: Is there a better way of saving string vectors,
   //        than a null padded matrix?
@@ -408,12 +412,18 @@
   H5Tclose (type_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_fcn_inline::load_hdf5 (hid_t loc_id, const char *name)
+octave_fcn_inline::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
   hid_t group_hid, data_hid, space_hid, type_hid, type_class_hid, st_id;
   hsize_t rank;
   int slen;
@@ -423,7 +433,7 @@
 #else
   group_hid = H5Gopen (loc_id, name);
 #endif
-  if (group_hid < 0 ) return false;
+  if (group_hid < 0) return false;
 
 #if HAVE_HDF5_18
   data_hid = H5Dopen (group_hid, "args", H5P_DEFAULT);
@@ -593,11 +603,15 @@
   fcn = ftmp.fcn;
 
   return true;
+
+#else
+  gripe_load ("hdf5");
+  return false;
+#endif
 }
-#endif
 
 void
-octave_fcn_inline::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_fcn_inline::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -745,11 +759,11 @@
                             break;
                           }
 
-                      if (! have_arg && tmp_arg != "i" && tmp_arg != "j" &&
-                          tmp_arg != "NaN" && tmp_arg != "nan" &&
-                          tmp_arg != "Inf" && tmp_arg != "inf" &&
-                          tmp_arg != "NA" && tmp_arg != "pi" &&
-                          tmp_arg != "e" && tmp_arg != "eps")
+                      if (! have_arg && tmp_arg != "i" && tmp_arg != "j"
+                          && tmp_arg != "NaN" && tmp_arg != "nan"
+                          && tmp_arg != "Inf" && tmp_arg != "inf"
+                          && tmp_arg != "NA" && tmp_arg != "pi"
+                          && tmp_arg != "e" && tmp_arg != "eps")
                         fargs.append (tmp_arg);
 
                       tmp_arg = std::string ();
@@ -852,9 +866,10 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} formula (@var{fun})\n\
 Return a character string representing the inline function @var{fun}.\n\
+\n\
 Note that @code{char (@var{fun})} is equivalent to\n\
 @code{formula (@var{fun})}.\n\
-@seealso{argnames, inline, vectorize}\n\
+@seealso{char, argnames, inline, vectorize}\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/octave-value/ov-fcn-inline.h
+++ b/libinterp/octave-value/ov-fcn-inline.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 
 This file is part of Octave.
 
@@ -26,7 +26,6 @@
 #include <iosfwd>
 #include <string>
 
-#include "oct-alloc.h"
 
 #include "ov-base.h"
 #include "ov-base-mat.h"
@@ -80,19 +79,16 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 
--- a/libinterp/octave-value/ov-fcn.cc
+++ b/libinterp/octave-value/ov-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -28,7 +28,6 @@
 #include "oct-obj.h"
 #include "ov-fcn.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_function);
 
 octave_base_value *
 octave_function::clone (void) const
--- a/libinterp/octave-value/ov-fcn.h
+++ b/libinterp/octave-value/ov-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -28,7 +28,6 @@
 #include "oct-time.h"
 #include "str-vec.h"
 
-#include "oct-alloc.h"
 #include "oct-obj.h"
 #include "ov-base.h"
 #include "ov-typeinfo.h"
@@ -46,7 +45,8 @@
 
   octave_function (void)
     : relative (false), locked (false), private_function (false),
-      xdispatch_class (), my_name (), my_dir_name (), doc () { }
+      xdispatch_class (), xpackage_name (), my_name (), my_dir_name (),
+      doc () { }
 
   ~octave_function (void) { }
 
@@ -85,6 +85,10 @@
   virtual bool is_class_constructor (const std::string& = std::string ()) const
   { return false; }
 
+  virtual bool
+  is_classdef_constructor (const std::string& = std::string ()) const
+  { return false; }
+
   virtual bool is_class_method (const std::string& = std::string ()) const
   { return false; }
 
@@ -96,6 +100,10 @@
 
   std::string dispatch_class (void) const { return xdispatch_class; }
 
+  void stash_package_name (const std::string& pack) { xpackage_name = pack; }
+
+  std::string package_name (void) const { return xpackage_name; }
+
   virtual void
   mark_as_private_function (const std::string& cname = std::string ())
   {
@@ -152,6 +160,14 @@
 
   std::string name (void) const { return my_name; }
 
+  std::string canonical_name (void) const
+  {
+    if (xpackage_name.empty ())
+      return my_name;
+    else
+      return xpackage_name + "." + my_name;
+  }
+
   void document (const std::string& ds) { doc = ds; }
 
   std::string doc_string (void) const { return doc; }
@@ -160,6 +176,9 @@
 
   virtual void accept (tree_walker&) { }
 
+  virtual bool is_postfix_index_handled (char type) const
+  { return (type == '(' || type == '{'); }
+
 protected:
 
   octave_function (const std::string& nm,
@@ -181,6 +200,10 @@
   // to which the method belongs.
   std::string xdispatch_class;
 
+  // If this function is part of a package, this is the full name
+  // of the package to which the function belongs.
+  std::string xpackage_name;
+
   // The name of this function.
   std::string my_name;
 
@@ -199,7 +222,6 @@
 
   octave_function& operator = (const octave_function& f);
 
-  DECLARE_OCTAVE_ALLOCATOR
 };
 
 #endif
--- a/libinterp/octave-value/ov-float.cc
+++ b/libinterp/octave-value/ov-float.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,6 +35,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ov-scalar.h"
 #include "ov-float.h"
@@ -53,7 +54,6 @@
 
 template class octave_base_scalar<float>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_scalar, "float scalar",
                                      "single");
@@ -184,15 +184,17 @@
   return true;
 }
 
+bool
+octave_float_scalar::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_float_scalar::save_hdf5 (hid_t loc_id, const char *name,
-                                bool /* save_as_floats */)
-{
   hsize_t dimens[3];
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;
@@ -216,12 +218,18 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_float_scalar::load_hdf5 (hid_t loc_id, const char *name)
+octave_float_scalar::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -250,10 +258,13 @@
   H5Dclose (data_hid);
 
   return true;
+
+#else
+  gripe_load ("hdf5");
+  return false;
+#endif
 }
 
-#endif
-
 mxArray *
 octave_float_scalar::as_mxArray (void) const
 {
@@ -326,6 +337,29 @@
       SCALAR_MAPPER (isnan, xisnan);
       SCALAR_MAPPER (xsignbit, xsignbit);
 
+    // Special cases for Matlab compatibility.
+    case umap_xtolower:
+    case umap_xtoupper:
+      return scalar;
+
+    case umap_xisalnum:
+    case umap_xisalpha:
+    case umap_xisascii:
+    case umap_xiscntrl:
+    case umap_xisdigit:
+    case umap_xisgraph:
+    case umap_xislower:
+    case umap_xisprint:
+    case umap_xispunct:
+    case umap_xisspace:
+    case umap_xisupper:
+    case umap_xisxdigit:
+    case umap_xtoascii:
+      {
+        octave_value str_conv = convert_to_str (true, true);
+        return error_state ? octave_value () : str_conv.map (umap);
+      }
+
     default:
       return octave_base_value::map (umap);
     }
--- a/libinterp/octave-value/ov-float.h
+++ b/libinterp/octave-value/ov-float.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,7 +32,6 @@
 #include "lo-mappers.h"
 #include "lo-utils.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "gripes.h"
@@ -77,7 +76,7 @@
   octave_value do_index_op (const octave_value_list& idx,
                             bool resize_ok = false);
 
-  idx_vector index_vector (void) const { return idx_vector (scalar); }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (scalar); }
 
   octave_value any (int = 0) const
   { return (scalar != 0 && ! lo_ieee_isnan (scalar)); }
@@ -232,11 +231,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -254,7 +251,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-flt-complex.cc
+++ b/libinterp/octave-value/ov-flt-complex.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,6 +32,7 @@
 
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-complex.h"
@@ -50,7 +51,6 @@
 
 template class octave_base_scalar<FloatComplex>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_complex);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex,
                                      "float complex scalar", "single");
@@ -81,7 +81,8 @@
   // 1x1 matrix back to a scalar value.  Need a better solution
   // to this problem.
 
-  octave_value tmp (new octave_float_complex_matrix (float_complex_matrix_value ()));
+  octave_value tmp (new octave_float_complex_matrix (
+                      float_complex_matrix_value ()));
 
   return tmp.do_index_op (idx, resize_ok);
 }
@@ -89,7 +90,7 @@
 double
 octave_float_complex::double_value (bool force_conversion) const
 {
-  double retval = lo_ieee_nan_value ();
+  double retval;
 
   if (! force_conversion)
     gripe_implicit_conversion ("Octave:imag-to-real",
@@ -103,7 +104,7 @@
 float
 octave_float_complex::float_value (bool force_conversion) const
 {
-  float retval = lo_ieee_float_nan_value ();
+  float retval;
 
   if (! force_conversion)
     gripe_implicit_conversion ("Octave:imag-to-real",
@@ -293,15 +294,17 @@
   return true;
 }
 
+bool
+octave_float_complex::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                 bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_float_complex::save_hdf5 (hid_t loc_id, const char *name,
-                                 bool /* save_as_floats */)
-{
   hsize_t dimens[3];
-  hid_t space_hid = -1, type_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, type_hid, data_hid;
+  space_hid = type_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0)
@@ -334,13 +337,20 @@
   H5Tclose (type_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_float_complex::load_hdf5 (hid_t loc_id, const char *name)
+octave_float_complex::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
+
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -381,11 +391,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_float_complex::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-flt-complex.h
+++ b/libinterp/octave-value/ov-flt-complex.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,7 +30,6 @@
 
 #include "lo-ieee.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "gripes.h"
@@ -168,11 +167,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -189,7 +186,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-flt-cx-diag.cc
+++ b/libinterp/octave-value/ov-flt-cx-diag.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -35,7 +35,6 @@
 
 template class octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_complex_diag_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex_diag_matrix,
                                      "float complex diagonal matrix", "single");
@@ -150,7 +149,8 @@
                                                bool& /* save_as_floats */)
 {
 
-  int32_t r = matrix.rows (), c = matrix.cols ();
+  int32_t r = matrix.rows ();
+  int32_t c = matrix.cols ();
   os.write (reinterpret_cast<char *> (&r), 4);
   os.write (reinterpret_cast<char *> (&c), 4);
 
--- a/libinterp/octave-value/ov-flt-cx-diag.h
+++ b/libinterp/octave-value/ov-flt-cx-diag.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -87,7 +87,6 @@
   bool chk_valid_scalar (const octave_value&,
                          FloatComplex&) const;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-flt-cx-mat.cc
+++ b/libinterp/octave-value/ov-flt-cx-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -39,6 +39,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-base.h"
@@ -62,7 +63,6 @@
 
 template class octave_base_matrix<FloatComplexNDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_complex_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex_matrix,
                                      "float complex matrix", "single");
@@ -140,7 +140,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
                                "complex matrix", "real matrix");
 
-  retval = ::real (matrix.matrix_value ());
+  retval = ::real (FloatComplexMatrix (matrix));
 
   return retval;
 }
@@ -154,7 +154,7 @@
     gripe_implicit_conversion ("Octave:imag-to-real",
                                "complex matrix", "real matrix");
 
-  retval = ::real (matrix.matrix_value ());
+  retval = ::real (FloatComplexMatrix (matrix));
 
   return retval;
 }
@@ -202,13 +202,13 @@
 ComplexMatrix
 octave_float_complex_matrix::complex_matrix_value (bool) const
 {
-  return matrix.matrix_value ();
+  return FloatComplexMatrix (matrix);
 }
 
 FloatComplexMatrix
 octave_float_complex_matrix::float_complex_matrix_value (bool) const
 {
-  return FloatComplexMatrix (matrix.matrix_value ());
+  return FloatComplexMatrix (matrix);
 }
 
 boolNDArray
@@ -290,7 +290,7 @@
   if (matrix.ndims () == 2
       && (matrix.rows () == 1 || matrix.columns () == 1))
     {
-      FloatComplexMatrix mat = matrix.matrix_value ();
+      FloatComplexMatrix mat (matrix);
 
       retval = mat.diag (m, n);
     }
@@ -525,19 +525,21 @@
   return true;
 }
 
+bool
+octave_float_complex_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_float_complex_matrix::save_hdf5 (hid_t loc_id, const char *name, bool)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1, type_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid, type_hid;
+  space_hid = data_hid = type_hid = -1;
   FloatComplexNDArray m = complex_array_value ();
 
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
@@ -601,14 +603,20 @@
   H5Tclose (type_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_float_complex_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_float_complex_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -676,11 +684,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 void
 octave_float_complex_matrix::print_raw (std::ostream& os,
                                         bool pr_as_read_syntax) const
--- a/libinterp/octave-value/ov-flt-cx-mat.h
+++ b/libinterp/octave-value/ov-flt-cx-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -152,11 +151,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -175,7 +172,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-flt-re-diag.cc
+++ b/libinterp/octave-value/ov-flt-re-diag.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -34,7 +34,6 @@
 
 template class octave_base_diag<FloatDiagMatrix, FloatMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_diag_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_diag_matrix,
                                      "float diagonal matrix", "single");
@@ -119,7 +118,8 @@
                                        bool& /* save_as_floats*/)
 {
 
-  int32_t r = matrix.rows (), c = matrix.cols ();
+  int32_t r = matrix.rows ();
+  int32_t c = matrix.cols ();
   os.write (reinterpret_cast<char *> (&r), 4);
   os.write (reinterpret_cast<char *> (&c), 4);
 
--- a/libinterp/octave-value/ov-flt-re-diag.h
+++ b/libinterp/octave-value/ov-flt-re-diag.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -87,7 +87,6 @@
   bool chk_valid_scalar (const octave_value&,
                          float&) const;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-flt-re-mat.cc
+++ b/libinterp/octave-value/ov-flt-re-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -44,6 +44,7 @@
 #include "mxarray.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-base.h"
@@ -70,7 +71,6 @@
 
 template class octave_base_matrix<FloatNDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_float_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_matrix, "float matrix",
                                      "single");
@@ -127,13 +127,13 @@
 Matrix
 octave_float_matrix::matrix_value (bool) const
 {
-  return Matrix (matrix.matrix_value ());
+  return Matrix (FloatMatrix (matrix));
 }
 
 FloatMatrix
 octave_float_matrix::float_matrix_value (bool) const
 {
-  return matrix.matrix_value ();
+  return FloatMatrix (matrix);
 }
 
 Complex
@@ -181,13 +181,13 @@
 ComplexMatrix
 octave_float_matrix::complex_matrix_value (bool) const
 {
-  return ComplexMatrix (matrix.matrix_value ());
+  return ComplexMatrix (FloatMatrix (matrix));
 }
 
 FloatComplexMatrix
 octave_float_matrix::float_complex_matrix_value (bool) const
 {
-  return FloatComplexMatrix (matrix.matrix_value ());
+  return FloatComplexMatrix (FloatMatrix (matrix));
 }
 
 ComplexNDArray
@@ -268,7 +268,7 @@
   if (matrix.ndims () == 2
       && (matrix.rows () == 1 || matrix.columns () == 1))
     {
-      FloatMatrix mat = matrix.matrix_value ();
+      FloatMatrix mat (matrix);
 
       retval = mat.diag (m, n);
     }
@@ -552,19 +552,21 @@
   return true;
 }
 
+bool
+octave_float_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_float_matrix::save_hdf5 (hid_t loc_id, const char *name, bool)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   FloatNDArray m = array_value ();
 
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
@@ -610,14 +612,20 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_float_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_float_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -672,11 +680,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 void
 octave_float_matrix::print_raw (std::ostream& os,
                                 bool pr_as_read_syntax) const
@@ -811,6 +821,29 @@
       ARRAY_MAPPER (isna, bool, octave_is_NA);
       ARRAY_MAPPER (xsignbit, float, xsignbit);
 
+    // Special cases for Matlab compatibility.
+    case umap_xtolower:
+    case umap_xtoupper:
+      return matrix;
+
+    case umap_xisalnum:
+    case umap_xisalpha:
+    case umap_xisascii:
+    case umap_xiscntrl:
+    case umap_xisdigit:
+    case umap_xisgraph:
+    case umap_xislower:
+    case umap_xisprint:
+    case umap_xispunct:
+    case umap_xisspace:
+    case umap_xisupper:
+    case umap_xisxdigit:
+    case umap_xtoascii:
+      {
+        octave_value str_conv = convert_to_str (true, true);
+        return error_state ? octave_value () : str_conv.map (umap);
+      }
+
     default:
       return octave_base_value::map (umap);
     }
--- a/libinterp/octave-value/ov-flt-re-mat.h
+++ b/libinterp/octave-value/ov-flt-re-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -89,8 +88,10 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  idx_vector index_vector (void) const
-  { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); }
+  idx_vector index_vector (bool /* require_integers */ = false) const
+  {
+    return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix));
+  }
 
   builtin_type_t builtin_type (void) const { return btyp_float; }
 
@@ -188,11 +189,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -208,7 +207,6 @@
   octave_value map (unary_mapper_t umap) const;
 
 private:
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-int-traits.h
+++ b/libinterp/octave-value/ov-int-traits.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-int16.cc
+++ b/libinterp/octave-value/ov-int16.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_INT16
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-int16.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<int16NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int16_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int16_matrix,
                                      "int16 matrix", "int16");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_int16>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int16_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int16_scalar,
                                      "int16 scalar", "int16");
--- a/libinterp/octave-value/ov-int16.h
+++ b/libinterp/octave-value/ov-int16.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-int32.cc
+++ b/libinterp/octave-value/ov-int32.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_INT32
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-int32.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<int32NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int32_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int32_matrix,
                                      "int32 matrix", "int32");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_int32>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int32_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int32_scalar,
                                      "int32 scalar", "int32");
--- a/libinterp/octave-value/ov-int32.h
+++ b/libinterp/octave-value/ov-int32.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-int64.cc
+++ b/libinterp/octave-value/ov-int64.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_INT64
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-int64.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<int64NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int64_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_matrix,
                                      "int64 matrix", "int64");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_int64>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int64_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_scalar,
                                      "int64 scalar", "int64");
--- a/libinterp/octave-value/ov-int64.h
+++ b/libinterp/octave-value/ov-int64.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-int8.cc
+++ b/libinterp/octave-value/ov-int8.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_INT8
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-int8.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<int8NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int8_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_matrix,
                                      "int8 matrix", "int8");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_int8>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_int8_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_scalar,
                                      "int8 scalar", "int8");
--- a/libinterp/octave-value/ov-int8.h
+++ b/libinterp/octave-value/ov-int8.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-intx.h
+++ b/libinterp/octave-value/ov-intx.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -27,7 +27,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -303,8 +302,10 @@
     matrix_ref ().changesign ();
   }
 
-  idx_vector index_vector (void) const
-  { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); }
+  idx_vector index_vector (bool /* require_integers */ = false) const
+  {
+    return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix));
+  }
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -356,8 +357,15 @@
       case umap_finite:
         return boolNDArray (matrix.dims (), true);
 
+      // Special cases for Matlab compatibility.
+      case umap_xtolower:
+      case umap_xtoupper:
+        return matrix;
+
       default:
         {
+          // FIXME: we should be able to do better than converting to
+          // double here.
           octave_matrix m (array_value ());
           return m.map (umap);
         }
@@ -366,7 +374,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
@@ -606,7 +613,7 @@
     scalar -= OCTAVE_INT_T (1);
   }
 
-  idx_vector index_vector (void) const { return idx_vector (scalar); }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (scalar); }
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, octave_idx_type skip,
@@ -656,6 +663,11 @@
       case umap_finite:
         return true;
 
+      // Special cases for Matlab compatibility.
+      case umap_xtolower:
+      case umap_xtoupper:
+        return scalar;
+
       default:
         {
           octave_scalar m (scalar_value ());
@@ -666,7 +678,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-java.cc
+++ b/libinterp/octave-value/ov-java.cc
@@ -42,6 +42,7 @@
 #include <map>
 #include <iostream>
 #include <fstream>
+#include <string>
 
 #include <clocale>
 
@@ -57,8 +58,10 @@
 #include "parse.h"
 #include "variables.h"
 
-typedef jint (JNICALL *JNI_CreateJavaVM_t) (JavaVM **pvm, JNIEnv **penv, void *args);
-typedef jint (JNICALL *JNI_GetCreatedJavaVMs_t) (JavaVM **pvm, jsize bufLen, jsize *nVMs);
+typedef jint (JNICALL *JNI_CreateJavaVM_t) (JavaVM **pvm, JNIEnv **penv,
+                                            void *args);
+typedef jint (JNICALL *JNI_GetCreatedJavaVMs_t) (JavaVM **pvm, jsize bufLen,
+                                                 jsize *nVMs);
 
 extern "C"
 {
@@ -457,7 +460,8 @@
           std::string regval = read_registry_string (key,value);
 
           if (regval.empty ())
-            throw std::string ("unable to find Java Runtime Environment: ") + key + "::" + value;
+            throw std::string ("unable to find Java Runtime Environment: ")
+                  + key + "::" + value;
           value = regval;
         }
 
@@ -465,7 +469,8 @@
       value = "RuntimeLib";
       jvm_lib_path = read_registry_string (key, value);
       if (jvm_lib_path.empty ())
-        throw std::string ("unable to find Java Runtime Environment: ") + key + "::" + value;
+        throw std::string ("unable to find Java Runtime Environment: ")
+              + key + "::" + value;
 
       std::string jvm_bin_path;
 
@@ -500,7 +505,8 @@
   octave_shlib lib (jvm_lib_path);
 
   if (!lib)
-    throw std::string ("unable to load Java Runtime Environment from ") + jvm_lib_path;
+    throw std::string ("unable to load Java Runtime Environment from ")
+          + jvm_lib_path;
 
 #if defined (__WIN32__)
 
@@ -520,7 +526,8 @@
     throw std::string ("unable to find JNI_CreateJavaVM in ") + jvm_lib_path;
 
   if (!get_vm)
-    throw std::string ("unable to find JNI_GetCreatedJavaVMs in ") + jvm_lib_path;
+    throw std::string ("unable to find JNI_GetCreatedJavaVMs in ")
+          + jvm_lib_path;
 
   if (get_vm (&jvm, 1, &nVMs) == 0 && nVMs > 0)
 
@@ -537,7 +544,8 @@
     {
       // At least one JVM exists, try to attach to it
 
-      switch (jvm->GetEnv (reinterpret_cast<void **> (&current_env), JNI_VERSION_1_2))
+      switch (jvm->GetEnv (reinterpret_cast<void **> (&current_env),
+                           JNI_VERSION_1_2))
         {
         case JNI_EDETACHED:
           // Attach the current thread
@@ -571,7 +579,8 @@
       vm_args.add ("-Djava.class.path=" + initial_class_path ());
       vm_args.add ("-Xrs");
       vm_args.add ("-Djava.system.class.loader=org.octave.OctClassLoader");
-      vm_args.read_java_opts (initial_java_dir () + file_ops::dir_sep_str () + "java.opts");
+      vm_args.read_java_opts (initial_java_dir () + file_ops::dir_sep_str () +
+                              "java.opts");
 
 # if !defined (__APPLE__) && !defined (__MACH__)
 
@@ -663,6 +672,25 @@
   return false;
 }
 
+bool
+octave_java::is_instance_of (const std::string& cls_name) const
+{
+  JNIEnv *current_env = thread_jni_env ();
+
+  std::string cls_cpp = cls_name;
+  std::replace (cls_cpp.begin (), cls_cpp.end (), '.', '/');
+
+  if (current_env && java_object)
+    {
+      jclass_ref cls (current_env, current_env->FindClass (cls_cpp.c_str ()));
+      if (current_env->ExceptionCheck ())
+        current_env->ExceptionClear();
+      else
+        return current_env->IsInstanceOf (java_object, cls);
+    }
+  return false;
+}
+
 static octave_value
 check_exception (JNIEnv* jni_env)
 {
@@ -714,7 +742,8 @@
               jstring_ref js (jni_env, jni_env->NewStringUTF ("octave.class.loader"));
               js = reinterpret_cast<jstring> (jni_env->CallStaticObjectMethod (syscls, mID, jstring (js)));
               class_loader = jstring_to_string (jni_env, jstring (js));
-              std::replace (class_loader.begin (), class_loader.end (), '.', '/');
+              std::replace (class_loader.begin (), class_loader.end (),
+                            '.', '/');
             }
 
           jclass_ref uicls (jni_env, jni_env->FindClass (class_loader.c_str ()));
@@ -724,11 +753,13 @@
               jni_env->ExceptionClear ();
 
               /* Try the netbeans way */
-              std::replace (class_loader.begin (), class_loader.end (), '/', '.');
+              std::replace (class_loader.begin (), class_loader.end (),
+                            '/', '.');
               jclass_ref jcls2 (jni_env, jni_env->FindClass ("org/openide/util/Lookup"));
               jmethodID mID = jni_env->GetStaticMethodID (jcls2, "getDefault", "()Lorg/openide/util/Lookup;");
               jobject_ref lObj (jni_env, jni_env->CallStaticObjectMethod (jcls2, mID));
-              mID = jni_env->GetMethodID (jcls2, "lookup", "(Ljava/lang/Class;)Ljava/lang/Object;");
+              mID = jni_env->GetMethodID (jcls2, "lookup",
+                                          "(Ljava/lang/Class;)Ljava/lang/Object;");
               jclass_ref cLoaderCls (jni_env, jni_env->FindClass ("java/lang/ClassLoader"));
               jobject_ref cLoader (jni_env, jni_env->CallObjectMethod (lObj, mID, jclass (cLoaderCls)));
               mID = jni_env->GetMethodID (cLoaderCls, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
@@ -1016,6 +1047,30 @@
           break;
         }
 
+#define BOX_PRIMITIVE_ARRAY(JAVA_TYPE, JAVA_ID, JAVA_TYPE_CAP, OCTAVE_ID) \
+      cls = jni_env->FindClass (JAVA_ID); \
+      if (jni_env->IsInstanceOf (jobj, cls)) \
+        { \
+          const JAVA_TYPE ## Array jarr = reinterpret_cast<JAVA_TYPE ## Array> (jobj); \
+          const jsize len = jni_env->GetArrayLength (jarr); \
+          OCTAVE_ID ## NDArray d (dim_vector (len, 1)); \
+          JAVA_TYPE * buffer = reinterpret_cast<JAVA_TYPE *> (d.fortran_vec ()); \
+          jni_env->Get ## JAVA_TYPE_CAP ## ArrayRegion (jarr, 0, len, buffer); \
+          retval = d; \
+          break; \
+        }
+
+BOX_PRIMITIVE_ARRAY (jboolean, "[Z", Boolean, bool)
+BOX_PRIMITIVE_ARRAY (jchar,    "[C", Char,    char)
+BOX_PRIMITIVE_ARRAY (jbyte,    "[B", Byte,    int8)
+BOX_PRIMITIVE_ARRAY (jshort,   "[S", Short,   int16)
+BOX_PRIMITIVE_ARRAY (jint,     "[I", Int,     int32)
+BOX_PRIMITIVE_ARRAY (jlong,    "[J", Long,    int64)
+BOX_PRIMITIVE_ARRAY (jfloat,   "[F", Float,   Float)
+BOX_PRIMITIVE_ARRAY (jdouble,  "[D", Double,  )
+
+#undef BOX_PRIMITIVE_ARRAY
+
       if (Vjava_matrix_autoconversion)
         {
           cls = find_octave_class (jni_env, "org/octave/Matrix");
@@ -1150,7 +1205,8 @@
           if (jni_env->IsInstanceOf (jobj, cls))
             {
               jobjectArray jarr = reinterpret_cast<jobjectArray> (jobj);
-              int rows = jni_env->GetArrayLength (jarr), cols = 0;
+              int rows = jni_env->GetArrayLength (jarr);
+              int cols = 0;
 
               if (rows > 0)
                 {
@@ -1205,11 +1261,11 @@
   return retval;
 }
 
-int
+bool
 unbox (JNIEnv* jni_env, const octave_value& val, jobject_ref& jobj,
        jclass_ref& jcls)
 {
-  int found = 1;
+  bool found = true;
 
   if (val.is_java ())
     {
@@ -1225,44 +1281,60 @@
       jobj = jni_env->NewStringUTF (s.c_str ());
       jcls = jni_env->GetObjectClass (jobj);
     }
-  else if (val.is_real_scalar ())
+  else if (val.numel () > 1 && val.dims ().is_vector ())
     {
-      if (val.is_double_type ())
-        {
-          double dval = val.double_value ();
-          jclass_ref dcls (jni_env, jni_env->FindClass ("java/lang/Double"));
-          jfieldID fid = jni_env->GetStaticFieldID (dcls, "TYPE", "Ljava/lang/Class;");
-          jmethodID mid = jni_env->GetMethodID (dcls, "<init>", "(D)V");
-          jcls = reinterpret_cast<jclass> (jni_env->GetStaticObjectField (dcls, fid));
-          jobj = jni_env->NewObject (dcls, mid, dval);
+#define IF_UNBOX_PRIMITIVE_ARRAY(CHECK_TYPE, METHOD_TYPE, OCTAVE_TYPE, JAVA_TYPE, JAVA_TYPE_CAP) \
+      if (val.is_ ## CHECK_TYPE ## _type ()) \
+        { \
+          const OCTAVE_TYPE ## NDArray v = val.METHOD_TYPE ## array_value (); \
+          JAVA_TYPE ## Array jarr = jni_env->New ## JAVA_TYPE_CAP ## Array (v.numel ()); \
+          const JAVA_TYPE* jv = reinterpret_cast<const JAVA_TYPE*> (v.data ()); \
+          jni_env->Set ## JAVA_TYPE_CAP ## ArrayRegion (jarr, 0, v.numel (), jv); \
+          jobj = reinterpret_cast<jobject> (jarr); \
+          jcls = jni_env->GetObjectClass (jobj); \
         }
-      else if (val.is_bool_type ())
-        {
-          bool bval = val.bool_value ();
-          jclass_ref bcls (jni_env, jni_env->FindClass ("java/lang/Boolean"));
-          jfieldID fid = jni_env->GetStaticFieldID (bcls, "TYPE", "Ljava/lang/Class;");
-          jmethodID mid = jni_env->GetMethodID (bcls, "<init>", "(Z)V");
-          jcls = reinterpret_cast<jclass> (jni_env->GetStaticObjectField (bcls, fid));
-          jobj = jni_env->NewObject (bcls, mid, bval);
-        }
-      else
-        {
-          float fval = val.float_scalar_value ();
-          jclass_ref fcls (jni_env, jni_env->FindClass ("java/lang/Float"));
-          jfieldID fid = jni_env->GetStaticFieldID (fcls, "TYPE", "Ljava/lang/Class;");
-          jmethodID mid = jni_env->GetMethodID (fcls, "<init>", "(F)V");
-          jcls = reinterpret_cast<jclass> (jni_env->GetStaticObjectField (fcls, fid));
-          jobj = jni_env->NewObject (fcls, mid, fval);
-        }
+
+      // Note that we do NOT handle char here because they are unboxed
+      // into a String[], not into a char array
+           IF_UNBOX_PRIMITIVE_ARRAY(bool,   bool_,   bool,   jboolean, Boolean)
+      else IF_UNBOX_PRIMITIVE_ARRAY(float,  float_,  Float,  jfloat,   Float)
+      else IF_UNBOX_PRIMITIVE_ARRAY(int8,   int8_,   int8,   jbyte,    Byte)
+      else IF_UNBOX_PRIMITIVE_ARRAY(uint8,  uint8_,  uint8,  jbyte,    Byte)
+      else IF_UNBOX_PRIMITIVE_ARRAY(int16,  int16_,  int16,  jshort,   Short)
+      else IF_UNBOX_PRIMITIVE_ARRAY(uint16, uint16_, uint16, jshort,   Short)
+      else IF_UNBOX_PRIMITIVE_ARRAY(int32,  int32_,  int32,  jint,     Int)
+      else IF_UNBOX_PRIMITIVE_ARRAY(uint32, uint32_, uint32, jint,     Int)
+      else IF_UNBOX_PRIMITIVE_ARRAY(int64,  int64_,  int64,  jlong,    Long)
+      else IF_UNBOX_PRIMITIVE_ARRAY(uint64, uint64_, uint64, jlong,    Long)
+
+#undef IF_UNBOX_PRIMITIVE_ARRAY
     }
-  else if (val.is_integer_type () && val.is_scalar_type ())
+  else if (val.is_real_scalar () || val.is_bool_scalar ())
     {
-      int32_t ival = val.int32_scalar_value ();
-      jclass_ref icls (jni_env, jni_env->FindClass ("java/lang/Integer"));
-      jfieldID fid = jni_env->GetStaticFieldID (icls, "TYPE", "Ljava/lang/Class;");
-      jmethodID mid = jni_env->GetMethodID (icls, "<init>", "(I)V");
-      jcls = reinterpret_cast<jclass> (jni_env->GetStaticObjectField (icls, fid));
-      jobj = jni_env->NewObject (icls, mid, ival);
+#define IF_UNBOX_PRIMITIVE_SCALAR(CHECK_TYPE, OCTAVE_TYPE, METHOD_TYPE, JAVA_TYPE, JAVA_CON) \
+      if (val.is_ ## CHECK_TYPE ## _type ()) \
+        { \
+          const OCTAVE_TYPE ov = val.METHOD_TYPE ## _value (); \
+          jclass_ref dcls (jni_env, jni_env->FindClass (JAVA_TYPE)); \
+          const jfieldID fid = jni_env->GetStaticFieldID (dcls, "TYPE", "Ljava/lang/Class;"); \
+          const jmethodID mid = jni_env->GetMethodID (dcls, "<init>", JAVA_CON); \
+          jcls = reinterpret_cast<jclass> (jni_env->GetStaticObjectField (dcls, fid)); \
+          jobj = jni_env->NewObject (dcls, mid, ov); \
+         }
+
+           IF_UNBOX_PRIMITIVE_SCALAR(double, double,   double,        "java/lang/Double",  "(D)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(float,  float,    float,         "java/lang/Float",   "(F)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(bool,   bool,     bool,          "java/lang/Boolean", "(Z)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(int8,   int8_t,   int8_scalar,   "java/lang/Byte",    "(B)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(uint8,  uint8_t,  uint8_scalar,  "java/lang/Byte",    "(B)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(int16,  int16_t,  int16_scalar,  "java/lang/Short",   "(S)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(uint16, uint16_t, uint16_scalar, "java/lang/Short",   "(S)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(int32,  int32_t,  int32_scalar,  "java/lang/Int",     "(I)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(uint32, uint32_t, uint32_scalar, "java/lang/Int",     "(I)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(int64,  int64_t,  int64_scalar,  "java/lang/Long",    "(L)V")
+      else IF_UNBOX_PRIMITIVE_SCALAR(uint64, uint64_t, uint64_scalar, "java/lang/Long",    "(L)V")
+
+#undef IF_UNBOX_PRIMITIVE_SCALAR
     }
   else if (val.is_empty ())
     {
@@ -1337,7 +1409,7 @@
         }
       else
         {
-          found = 0;
+          found = false;
           error ("cannot convert matrix of type '%s'", val.class_name ().c_str ());
         }
     }
@@ -1369,11 +1441,11 @@
   return found;
 }
 
-int
+bool
 unbox (JNIEnv* jni_env, const octave_value_list& args,
        jobjectArray_ref& jobjs, jobjectArray_ref& jclss)
 {
-  int found = 1;
+  bool found = true;
 
   jclass_ref ocls (jni_env, jni_env->FindClass ("java/lang/Object"));
   jclass_ref ccls (jni_env, jni_env->FindClass ("java/lang/Class"));
@@ -1389,11 +1461,9 @@
       jobject_ref jobj (jni_env);
       jclass_ref jcls (jni_env);
 
-      if (! unbox (jni_env, args(i), jobj, jcls))
-        {
-          found = 0;
-          break;
-        }
+      found = unbox (jni_env, args(i), jobj, jcls);
+      if (! found)
+        break;
 
       jni_env->SetObjectArrayElement (jobjs, i, jobj);
       jni_env->SetObjectArrayElement (jclss, i, jcls);
@@ -1481,18 +1551,12 @@
     varargin(i) = box (env, env->GetObjectArrayElement (argin, i), 0);
 
   varargout = feval (fname, varargin, nargout);
-
-  if (! error_state)
-    {
-      jobjectArray_ref out_objs (env, argout), out_clss (env);
-
-      out_objs.detach ();
-
-      if (unbox (env, varargout, out_objs, out_clss))
-        return true;
-    }
-
-  return false;
+  if (error_state)
+    return false;
+
+  jobjectArray_ref out_objs (env, argout), out_clss (env);
+  out_objs.detach ();
+  return unbox (env, varargout, out_objs, out_clss);
 }
 
 JNIEXPORT void JNICALL
@@ -1568,7 +1632,6 @@
 
 // octave_java class definition
 
-DEFINE_OCTAVE_ALLOCATOR (octave_java);
 
 int octave_java::t_id (-1);
 
@@ -1761,7 +1824,7 @@
 }
 
 void
-octave_java::print (std::ostream& os, bool) const
+octave_java::print (std::ostream& os, bool)
 {
   print_raw (os);
   newline (os);
@@ -2049,9 +2112,10 @@
 
       if (args.length () > 0)
         {
-          std::string classname = args(0).string_value ();
-          if (! error_state)
+          if (args(0).is_string ())
             {
+              std::string classname = args(0).string_value ();
+
               octave_value_list tmp;
               for (int i=1; i<args.length (); i++)
                 tmp(i-1) = args(i);
@@ -2113,9 +2177,10 @@
 
       if (args.length () > 1)
         {
-          std::string methodname = args(0).string_value ();
-          if (! error_state)
+          if (args(0).is_string ())
             {
+              std::string methodname = args(0).string_value ();
+
               octave_value_list tmp;
               for (int i=2; i<args.length (); i++)
                 tmp(i-2) = args(i);
@@ -2186,9 +2251,10 @@
 
       if (args.length () == 2)
         {
-          std::string name = args(1).string_value ();
-          if (! error_state)
+          if (args(1).is_string ())
             {
+              std::string name = args(1).string_value ();
+
               if (args(0).is_java ())
                 {
                   octave_java *jobj = TO_JAVA (args(0));
@@ -2248,9 +2314,10 @@
 
       if (args.length () == 3)
         {
-          std::string name = args(1).string_value ();
-          if (! error_state)
+          if (args(1).is_string ())
             {
+              std::string name = args(1).string_value ();
+
               if (args(0).is_java ())
                 {
                   octave_java *jobj = TO_JAVA (args(0));
@@ -2402,3 +2469,22 @@
   return retval;
 }
 
+/*
+## Check automatic conversion of java primitive arrays into octave types
+%!assert (javaObject ("java.lang.String", "hello").getBytes (),
+%!        int8 ([104 101 108 108 111]'))
+
+## Check automatic conversion of octave types into java primitive arrays
+## Note that uint8 are casted into int8
+%!assert (javaMethod ("binarySearch", "java.util.Arrays", [90 100 255], 255), 2)
+%!assert (javaMethod ("binarySearch", "java.util.Arrays", uint8  ([90 100 255]), uint8  (255)) < 0)
+%!assert (javaMethod ("binarySearch", "java.util.Arrays", uint8  ([90 100 128]), uint8  (128)) < 0)
+%!assert (javaMethod ("binarySearch", "java.util.Arrays", uint8  ([90 100 127]), uint8  (127)), 2)
+%!assert (javaMethod ("binarySearch", "java.util.Arrays", uint16 ([90 100 128]), uint16 (128)), 2)
+
+## Check we can create objects that wrap java literals (bug #38821)
+%!assert (class (javaObject ("java.lang.Byte", uint8 (1))), "java.lang.Byte");
+%!assert (class (javaObject ("java.lang.Byte", int8 (1))), "java.lang.Byte");
+%!assert (class (javaObject ("java.lang.Short", uint16 (1))), "java.lang.Short");
+%!assert (class (javaObject ("java.lang.Short", int16 (1))), "java.lang.Short");
+*/
--- a/libinterp/octave-value/ov-java.h
+++ b/libinterp/octave-value/ov-java.h
@@ -95,11 +95,11 @@
 extern OCTINTERP_API octave_value
 box_more (JNIEnv* jni_env, jobject jobj, jclass jcls = 0);
 
-extern OCTINTERP_API int
+extern OCTINTERP_API bool
 unbox (JNIEnv* jni_env, const octave_value& val, jobject_ref& jobj,
        jclass_ref& jcls);
 
-extern OCTINTERP_API int
+extern OCTINTERP_API bool
 unbox (JNIEnv* jni_env, const octave_value_list& args,
        jobjectArray_ref& jobjs, jobjectArray_ref& jclss);
 
@@ -139,8 +139,12 @@
   octave_base_value* clone (void) const { return new octave_java (*this); }
   octave_base_value* empty_clone (void) const { return new octave_java (); }
 
+  bool is_instance_of (const std::string&) const;
+
   bool is_defined (void) const { return true; }
 
+  bool is_constant (void) const { return true; }
+
   bool is_map (void) const { return false; }
 
   bool is_java (void) const { return true; }
@@ -149,7 +153,7 @@
 
   dim_vector dims (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -294,7 +298,6 @@
 
   std::string java_classname;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
 public:
   int type_id (void) const { return t_id; }
--- a/libinterp/octave-value/ov-lazy-idx.cc
+++ b/libinterp/octave-value/ov-lazy-idx.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -70,6 +70,12 @@
 }
 
 octave_value
+octave_lazy_index::fast_elem_extract (octave_idx_type n) const
+{
+  return double (index.checkelem (n) + 1);
+}
+
+octave_value
 octave_lazy_index::reshape (const dim_vector& new_dims) const
 {
   return idx_vector (index.as_array ().reshape (new_dims),
--- a/libinterp/octave-value/ov-lazy-idx.h
+++ b/libinterp/octave-value/ov-lazy-idx.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -53,14 +53,15 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
   size_t byte_size (void) const { return numel () * sizeof (octave_idx_type); }
 
   octave_value squeeze (void) const;
 
   octave_value full_value (void) const { return make_value (); }
 
-  idx_vector index_vector (void) const
-  { return index; }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return index; }
 
   builtin_type_t builtin_type (void) const { return btyp_double; }
 
@@ -129,7 +130,7 @@
   bool print_as_scalar (void) const
   { return make_value ().print_as_scalar (); }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const
+  void print (std::ostream& os, bool pr_as_read_syntax = false)
   { make_value ().print (os, pr_as_read_syntax); }
 
   void print_info (std::ostream& os, const std::string& prefix) const
@@ -204,7 +205,6 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-  // HDF5 functions not defined.
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -249,4 +249,3 @@
 };
 
 #endif
-
--- a/libinterp/octave-value/ov-mex-fcn.cc
+++ b/libinterp/octave-value/ov-mex-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -37,7 +37,6 @@
 #include "toplev.h"
 #include "unwind-prot.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_mex_function);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_mex_function,
                                      "mex function", "mex function");
@@ -148,8 +147,10 @@
 
       try
         {
-          BEGIN_PROFILER_BLOCK (profiler_name ())
+          BEGIN_PROFILER_BLOCK (octave_mex_function)
+
           retval = call_mex (have_fmex, mex_fcn_ptr, args, nargout, this);
+
           END_PROFILER_BLOCK
         }
       catch (octave_execution_exception)
--- a/libinterp/octave-value/ov-mex-fcn.h
+++ b/libinterp/octave-value/ov-mex-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -114,7 +114,6 @@
 
   octave_mex_function& operator = (const octave_mex_function& fn);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-null-mat.cc
+++ b/libinterp/octave-value/ov-null-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-null-mat.h
+++ b/libinterp/octave-value/ov-null-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-oncleanup.cc
+++ b/libinterp/octave-value/ov-oncleanup.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -98,14 +98,9 @@
       error ("onCleanup: internal error: unhandled exception in cleanup action");
     }
 
-  // We don't want to ignore errors that occur in the cleanup code, so
-  // if an error is encountered there, leave error_state alone.
-  // Otherwise, set it back to what it was before.
+  // FIXME: can this happen now?
   if (error_state)
-    {
-      frame.discard_first ();
-      octave_call_stack::backtrace_error_message ();
-    }
+    frame.discard_first ();
 }
 
 octave_scalar_map
@@ -152,9 +147,9 @@
   return true;
 }
 
-#if defined (HAVE_HDF5)
 bool
-octave_oncleanup::save_hdf5 (hid_t /* loc_id */, const char * /* name */,
+octave_oncleanup::save_hdf5 (octave_hdf5_id /* loc_id */,
+                             const char * /* name */,
                              bool /* save_as_floats */)
 {
   warn_save_load ();
@@ -162,15 +157,15 @@
 }
 
 bool
-octave_oncleanup::load_hdf5 (hid_t /* loc_id */, const char * /* name */)
+octave_oncleanup::load_hdf5 (octave_hdf5_id /* loc_id */,
+                             const char * /* name */)
 {
   warn_save_load ();
   return true;
 }
-#endif
 
 void
-octave_oncleanup::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_oncleanup::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
--- a/libinterp/octave-value/ov-oncleanup.h
+++ b/libinterp/octave-value/ov-oncleanup.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -81,13 +81,11 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
--- a/libinterp/octave-value/ov-perm.cc
+++ b/libinterp/octave-value/ov-perm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -112,11 +112,8 @@
   // if error_state is set, we've already griped.
   if (! error_state && ! retval.is_defined ())
     {
-      if (nidx == 2 && ! resize_ok &&
-          idx0.is_scalar () && idx1.is_scalar ())
-        {
-          retval = matrix.checkelem (idx0(0), idx1(0));
-        }
+      if (nidx == 2 && ! resize_ok && idx0.is_scalar () && idx1.is_scalar ())
+        retval = matrix.checkelem (idx0(0), idx1(0));
       else
         retval = to_dense ().do_index_op (idx, resize_ok);
     }
@@ -245,9 +242,9 @@
 FORWARD_MATRIX_VALUE (charNDArray, char_array)
 
 idx_vector
-octave_perm_matrix::index_vector (void) const
+octave_perm_matrix::index_vector (bool require_integers) const
 {
-  return to_dense ().index_vector ();
+  return to_dense ().index_vector (require_integers);
 }
 
 octave_value
@@ -260,12 +257,10 @@
 bool
 octave_perm_matrix::save_ascii (std::ostream& os)
 {
-  typedef octave_int<octave_idx_type> idx_int_type;
+  os << "# size: " << matrix.rows () << "\n";
+  os << "# orient: c\n";
 
-  os << "# size: " << matrix.rows () << "\n";
-  os << "# orient: " << (matrix.is_col_perm () ? 'c' : 'r') << '\n';
-
-  Array<octave_idx_type> pvec = matrix.pvec ();
+  Array<octave_idx_type> pvec = matrix.col_perm_vec ();
   octave_idx_type n = pvec.length ();
   ColumnVector tmp (n);
   for (octave_idx_type i = 0; i < n; i++) tmp(i) = pvec(i) + 1;
@@ -277,7 +272,6 @@
 bool
 octave_perm_matrix::load_ascii (std::istream& is)
 {
-  typedef octave_int<octave_idx_type> idx_int_type;
   octave_idx_type n;
   bool success = true;
   char orient;
@@ -317,18 +311,19 @@
 {
 
   int32_t sz = matrix.rows ();
-  bool colp = matrix.is_col_perm ();
+  bool colp = true;
   os.write (reinterpret_cast<char *> (&sz), 4);
   os.write (reinterpret_cast<char *> (&colp), 1);
-  os.write (reinterpret_cast<const char *> (matrix.data ()),
-                                            matrix.byte_size ());
+  const Array<octave_idx_type>& col_perm = matrix.col_perm_vec ();
+  os.write (reinterpret_cast<const char *> (col_perm.data ()),
+                                            col_perm.byte_size ());
 
   return true;
 }
 
 bool
 octave_perm_matrix::load_binary (std::istream& is, bool swap,
-                                 oct_mach_info::float_format )
+                                 oct_mach_info::float_format)
 {
   int32_t sz;
   bool colp;
@@ -389,7 +384,7 @@
 }
 
 void
-octave_perm_matrix::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_perm_matrix::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -420,7 +415,6 @@
   return dense_cache;
 }
 
-DEFINE_OCTAVE_ALLOCATOR (octave_perm_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_perm_matrix,
                                      "permutation matrix", "double");
@@ -451,3 +445,18 @@
   return retval;
 }
 
+octave_value
+octave_perm_matrix::fast_elem_extract (octave_idx_type n) const
+{
+  if (n < matrix.numel ())
+    {
+      octave_idx_type nr = matrix.rows ();
+
+      octave_idx_type r = n % nr;
+      octave_idx_type c = n / nr;
+
+      return octave_value (matrix.elem (r, c));
+    }
+  else
+    return octave_value ();
+}
--- a/libinterp/octave-value/ov-perm.h
+++ b/libinterp/octave-value/ov-perm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -131,7 +131,7 @@
   double scalar_value (bool frc_str_conv = false) const
   { return double_value (frc_str_conv); }
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool require_integers = false) const;
 
   PermMatrix perm_matrix_value (void) const
   { return matrix; }
@@ -211,13 +211,15 @@
 
   bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_info (std::ostream& os, const std::string& prefix) const;
 
   octave_value map (unary_mapper_t umap) const
   { return to_dense ().map (umap); }
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
 protected:
 
   PermMatrix matrix;
@@ -228,7 +230,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-range.cc
+++ b/libinterp/octave-value/ov-range.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,6 +35,7 @@
 #include "mxarray.h"
 #include "ops.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "ov-range.h"
 #include "ov-re-mat.h"
 #include "ov-scalar.h"
@@ -46,9 +47,8 @@
 #include "ls-utils.h"
 
 // If TRUE, allow ranges with non-integer elements as array indices.
-bool Vallow_noninteger_range_as_index = false;
+static bool Vallow_noninteger_range_as_index = true;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_range);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_range, "range", "double");
 
@@ -148,13 +148,14 @@
 }
 
 idx_vector
-octave_range::index_vector (void) const
+octave_range::index_vector (bool require_integers) const
 {
   if (idx_cache)
     return *idx_cache;
   else
     {
-      if (! Vallow_noninteger_range_as_index
+      if (require_integers
+          || ! Vallow_noninteger_range_as_index
           || range.all_elements_are_ints ())
         return set_idx_cache (idx_vector (range));
       else
@@ -351,7 +352,7 @@
 }
 
 void
-octave_range::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_range::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
@@ -543,13 +544,19 @@
   return type_id;
 }
 
+#endif
+
 bool
-octave_range::save_hdf5 (hid_t loc_id, const char *name,
+octave_range::save_hdf5 (octave_hdf5_id loc_id, const char *name,
                          bool /* save_as_floats */)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   hsize_t dimens[3];
-  hid_t space_hid = -1, type_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, type_hid, data_hid;
+  space_hid = type_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;
@@ -593,14 +600,20 @@
   H5Tclose (type_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_range::load_hdf5 (hid_t loc_id, const char *name)
+octave_range::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -651,11 +664,13 @@
   H5Sclose (space_hid);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_range::as_mxArray (void) const
 {
@@ -675,6 +690,13 @@
   return retval;
 }
 
+octave_value
+octave_range::fast_elem_extract (octave_idx_type n) const
+{
+  return (n < range.nelem ()) ? octave_value (range.elem (n))
+                              : octave_value ();
+}
+
 DEFUN (allow_noninteger_range_as_index, args, nargout,
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} allow_noninteger_range_as_index ()\n\
@@ -690,6 +712,14 @@
 The original variable value is restored when exiting the function.\n\
 @end deftypefn")
 {
+  static bool warned = false;
+  if (! warned)
+    {
+      warned = true;
+      warning_with_id ("Octave:deprecated-function",
+                       "allow_noninteger_range_as_index is obsolete and will be removed from a future version of Octave");
+    }
+
   return SET_INTERNAL_VARIABLE (allow_noninteger_range_as_index);
 }
 
--- a/libinterp/octave-value/ov-range.h
+++ b/libinterp/octave-value/ov-range.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,7 +33,6 @@
 #include "lo-mappers.h"
 #include "lo-utils.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -104,7 +103,7 @@
   octave_value do_index_op (const octave_value_list& idx,
                             bool resize_ok = false);
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool require_integers = false) const;
 
   dim_vector dims (void) const
   {
@@ -249,7 +248,7 @@
 
   octave_value convert_to_str_internal (bool pad, bool force, char type) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -266,11 +265,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -290,6 +287,8 @@
     return m.map (umap);
   }
 
+  octave_value fast_elem_extract (octave_idx_type n) const;
+
 private:
 
   Range range;
@@ -312,12 +311,8 @@
 
   octave_range& operator = (const octave_range&);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
 
-// If TRUE, allow ranges with non-integer elements as array indices.
-extern bool Vallow_noninteger_range_as_index;
-
 #endif
--- a/libinterp/octave-value/ov-re-diag.cc
+++ b/libinterp/octave-value/ov-re-diag.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -35,7 +35,6 @@
 
 template class octave_base_diag<DiagMatrix, Matrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_diag_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_diag_matrix, "diagonal matrix",
                                      "double");
@@ -179,7 +178,8 @@
 octave_diag_matrix::save_binary (std::ostream& os, bool& save_as_floats)
 {
 
-  int32_t r = matrix.rows (), c = matrix.cols ();
+  int32_t r = matrix.rows ();
+  int32_t c = matrix.cols ();
   os.write (reinterpret_cast<char *> (&r), 4);
   os.write (reinterpret_cast<char *> (&c), 4);
 
--- a/libinterp/octave-value/ov-re-diag.h
+++ b/libinterp/octave-value/ov-re-diag.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -92,7 +92,6 @@
   bool chk_valid_scalar (const octave_value&,
                          double&) const;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-re-mat.cc
+++ b/libinterp/octave-value/ov-re-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -44,6 +44,7 @@
 #include "mxarray.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-base.h"
@@ -70,7 +71,6 @@
 
 template class octave_base_matrix<NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_matrix, "matrix", "double");
 
@@ -142,13 +142,13 @@
 Matrix
 octave_matrix::matrix_value (bool) const
 {
-  return matrix.matrix_value ();
+  return Matrix (matrix);
 }
 
 FloatMatrix
 octave_matrix::float_matrix_value (bool) const
 {
-  return FloatMatrix (matrix.matrix_value ());
+  return FloatMatrix (Matrix (matrix));
 }
 
 Complex
@@ -196,13 +196,13 @@
 ComplexMatrix
 octave_matrix::complex_matrix_value (bool) const
 {
-  return ComplexMatrix (matrix.matrix_value ());
+  return ComplexMatrix (Matrix (matrix));
 }
 
 FloatComplexMatrix
 octave_matrix::float_complex_matrix_value (bool) const
 {
-  return FloatComplexMatrix (matrix.matrix_value ());
+  return FloatComplexMatrix (Matrix (matrix));
 }
 
 ComplexNDArray
@@ -244,7 +244,7 @@
 SparseMatrix
 octave_matrix::sparse_matrix_value (bool) const
 {
-  return SparseMatrix (matrix.matrix_value ());
+  return SparseMatrix (Matrix (matrix));
 }
 
 SparseComplexMatrix
@@ -277,7 +277,7 @@
   if (matrix.ndims () == 2
       && (matrix.rows () == 1 || matrix.columns () == 1))
     {
-      Matrix mat = matrix.matrix_value ();
+      Matrix mat (matrix);
 
       retval = mat.diag (m, n);
     }
@@ -664,19 +664,21 @@
   return true;
 }
 
+bool
+octave_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_matrix::save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   NDArray m = array_value ();
 
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
@@ -733,14 +735,20 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -795,11 +803,13 @@
   H5Sclose (space_id);
   H5Dclose (data_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 void
 octave_matrix::print_raw (std::ostream& os,
                           bool pr_as_read_syntax) const
@@ -934,14 +944,31 @@
       ARRAY_MAPPER (isna, bool, octave_is_NA);
       ARRAY_MAPPER (xsignbit, double, xsignbit);
 
+    // Special cases for Matlab compatibility.
+    case umap_xtolower:
+    case umap_xtoupper:
+      return matrix;
+
+    case umap_xisalnum:
+    case umap_xisalpha:
+    case umap_xisascii:
+    case umap_xiscntrl:
+    case umap_xisdigit:
+    case umap_xisgraph:
+    case umap_xislower:
+    case umap_xisprint:
+    case umap_xispunct:
+    case umap_xisspace:
+    case umap_xisupper:
+    case umap_xisxdigit:
+    case umap_xtoascii:
+      {
+        octave_value str_conv = convert_to_str (true, true);
+        return error_state ? octave_value () : str_conv.map (umap);
+      }
+
     default:
-      if (umap >= umap_xisalnum && umap <= umap_xtoupper)
-        {
-          octave_value str_conv = convert_to_str (true, true);
-          return error_state ? octave_value () : str_conv.map (umap);
-        }
-      else
-        return octave_base_value::map (umap);
+      return octave_base_value::map (umap);
     }
 }
 
--- a/libinterp/octave-value/ov-re-mat.h
+++ b/libinterp/octave-value/ov-re-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -104,7 +103,7 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  idx_vector index_vector (void) const
+  idx_vector index_vector (bool /* require_integers */ = false) const
   { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); }
 
   builtin_type_t builtin_type (void) const { return btyp_double; }
@@ -214,11 +213,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -234,7 +231,6 @@
   octave_value map (unary_mapper_t umap) const;
 
 private:
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-re-sparse.cc
+++ b/libinterp/octave-value/ov-re-sparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -38,6 +38,7 @@
 #include "ov-scalar.h"
 #include "gripes.h"
 
+#include "oct-hdf5.h"
 #include "ls-hdf5.h"
 
 #include "ov-re-sparse.h"
@@ -49,13 +50,12 @@
 
 template class OCTINTERP_API octave_base_sparse<SparseMatrix>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_sparse_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_matrix, "sparse matrix",
                                      "double");
 
 idx_vector
-octave_sparse_matrix::index_vector (void) const
+octave_sparse_matrix::index_vector (bool /* require_integers */) const
 {
   if (matrix.numel () == matrix.nnz ())
     return idx_vector (array_value ());
@@ -274,16 +274,16 @@
 
   int32_t itmp;
   // Use negative value for ndims to be consistent with other formats
-  itmp= -2;
+  itmp = -2;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nr;
+  itmp = nr;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nc;
+  itmp = nc;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
-  itmp= nz;
+  itmp = nz;
   os.write (reinterpret_cast<char *> (&itmp), 4);
 
   save_type st = LS_DOUBLE;
@@ -398,12 +398,14 @@
   return true;
 }
 
+bool
+octave_sparse_matrix::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                 bool save_as_floats)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_sparse_matrix::save_hdf5 (hid_t loc_id, const char *name,
-                                 bool save_as_floats)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
@@ -421,8 +423,8 @@
   if (group_hid < 0)
     return false;
 
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   SparseMatrix m = sparse_matrix_value ();
   octave_idx_type tmp;
   hsize_t hdims[2];
@@ -627,12 +629,20 @@
   H5Sclose (space_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_sparse_matrix::load_hdf5 (hid_t loc_id, const char *name)
+octave_sparse_matrix::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+  bool retval = false;
+
+#if defined (HAVE_HDF5)
+
   octave_idx_type nr, nc, nz;
   hid_t group_hid, data_hid, space_hid;
   hsize_t rank;
@@ -839,7 +849,7 @@
     }
 
   double *dtmp = m.xdata ();
-  bool retval = false;
+
   if (H5Dread (data_hid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL,
                H5P_DEFAULT, dtmp) >= 0
       && m.indices_ok ())
@@ -852,11 +862,13 @@
   H5Dclose (data_hid);
   H5Gclose (group_hid);
 
+#else
+  gripe_load ("hdf5");
+#endif
+  
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_sparse_matrix::as_mxArray (void) const
 {
--- a/libinterp/octave-value/ov-re-sparse.h
+++ b/libinterp/octave-value/ov-re-sparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -30,7 +30,6 @@
 #include <string>
 
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "error.h"
@@ -92,7 +91,7 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  idx_vector index_vector (void) const;
+  idx_vector index_vector (bool require_integers = false) const;
 
   builtin_type_t builtin_type (void) const { return btyp_double; }
 
@@ -145,11 +144,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -158,7 +155,6 @@
 private:
   octave_value map (double (*fcn) (double)) const;
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-scalar.cc
+++ b/libinterp/octave-value/ov-scalar.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,6 +35,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ov-scalar.h"
 #include "ov-float.h"
@@ -53,7 +54,6 @@
 
 template class octave_base_scalar<double>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_scalar, "scalar", "double");
 
@@ -199,15 +199,17 @@
   return true;
 }
 
+bool
+octave_scalar::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                          bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_scalar::save_hdf5 (hid_t loc_id, const char *name,
-                          bool /* save_as_floats */)
-{
   hsize_t dimens[3];
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;
@@ -232,12 +234,18 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_scalar::load_hdf5 (hid_t loc_id, const char *name)
+octave_scalar::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
+#if defined (HAVE_HDF5)
+
 #if HAVE_HDF5_18
   hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
 #else
@@ -266,10 +274,13 @@
   H5Dclose (data_hid);
 
   return true;
+
+#else
+  gripe_load ("hdf5");
+  return false;
+#endif
 }
 
-#endif
-
 mxArray *
 octave_scalar::as_mxArray (void) const
 {
@@ -342,14 +353,31 @@
       SCALAR_MAPPER (isnan, xisnan);
       SCALAR_MAPPER (xsignbit, xsignbit);
 
+    // Special cases for Matlab compatibility.
+    case umap_xtolower:
+    case umap_xtoupper:
+      return scalar;
+
+    case umap_xisalnum:
+    case umap_xisalpha:
+    case umap_xisascii:
+    case umap_xiscntrl:
+    case umap_xisdigit:
+    case umap_xisgraph:
+    case umap_xislower:
+    case umap_xisprint:
+    case umap_xispunct:
+    case umap_xisspace:
+    case umap_xisupper:
+    case umap_xisxdigit:
+    case umap_xtoascii:
+      {
+        octave_value str_conv = convert_to_str (true, true);
+        return error_state ? octave_value () : str_conv.map (umap);
+      }
+
     default:
-      if (umap >= umap_xisalnum && umap <= umap_xtoupper)
-        {
-          octave_value str_conv = convert_to_str (true, true);
-          return error_state ? octave_value () : str_conv.map (umap);
-        }
-      else
-        return octave_base_value::map (umap);
+      return octave_base_value::map (umap);
     }
 }
 
--- a/libinterp/octave-value/ov-scalar.h
+++ b/libinterp/octave-value/ov-scalar.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,7 +32,6 @@
 #include "lo-mappers.h"
 #include "lo-utils.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "str-vec.h"
 
 #include "gripes.h"
@@ -76,7 +75,7 @@
 
   type_conv_info numeric_demotion_function (void) const;
 
-  idx_vector index_vector (void) const { return idx_vector (scalar); }
+  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (scalar); }
 
   octave_value any (int = 0) const
   { return (scalar != 0 && ! lo_ieee_isnan (scalar)); }
@@ -231,11 +230,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -253,7 +250,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-str-mat.cc
+++ b/libinterp/octave-value/ov-str-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -44,6 +44,7 @@
 #include "ls-oct-ascii.h"
 #include "ls-utils.h"
 #include "oct-obj.h"
+#include "oct-hdf5.h"
 #include "oct-stream.h"
 #include "ops.h"
 #include "ov-scalar.h"
@@ -53,8 +54,6 @@
 #include "pt-mat.h"
 #include "utils.h"
 
-DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_str);
-DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_sq_str);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_char_matrix_str, "string", "char");
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_char_matrix_sq_str, "sq_string",
@@ -211,7 +210,7 @@
 
   if (matrix.ndims () == 2)
     {
-      charMatrix chm = matrix.matrix_value ();
+      charMatrix chm (matrix);
 
       octave_idx_type n = chm.rows ();
 
@@ -233,7 +232,7 @@
 
   if (matrix.ndims () == 2)
     {
-      charMatrix chm = matrix.matrix_value ();
+      charMatrix chm (matrix);
 
       retval = chm.row_as_string (0);  // FIXME?
     }
@@ -250,7 +249,7 @@
 
   if (matrix.ndims () == 2)
     {
-      const charMatrix chm = matrix.matrix_value ();
+      const charMatrix chm (matrix);
       octave_idx_type nr = chm.rows ();
       retval.clear (nr, 1);
       for (octave_idx_type i = 0; i < nr; i++)
@@ -571,20 +570,22 @@
   return true;
 }
 
+bool
+octave_char_matrix_str::save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                                   bool /* save_as_floats */)
+{
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
-bool
-octave_char_matrix_str::save_hdf5 (hid_t loc_id, const char *name,
-                                   bool /* save_as_floats */)
-{
   dim_vector dv = dims ();
   int empty = save_hdf5_empty (loc_id, name, dv);
   if (empty)
     return (empty > 0);
 
   int rank = dv.length ();
-  hid_t space_hid = -1, data_hid = -1;
-  bool retval = true;
+  hid_t space_hid, data_hid;
+  space_hid = data_hid = -1;
   charNDArray m = char_array_value ();
 
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
@@ -620,14 +621,20 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
+#else
+  gripe_save ("hdf5");
+#endif
+
   return retval;
 }
 
 bool
-octave_char_matrix_str::load_hdf5 (hid_t loc_id, const char *name)
+octave_char_matrix_str::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   dim_vector dv;
   int empty = load_hdf5_empty (loc_id, name, dv);
   if (empty > 0)
@@ -789,7 +796,9 @@
         }
     }
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
-
-#endif
--- a/libinterp/octave-value/ov-str-mat.h
+++ b/libinterp/octave-value/ov-str-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -153,11 +153,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -171,7 +169,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
@@ -255,7 +252,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-struct.cc
+++ b/libinterp/octave-value/ov-struct.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,6 +32,7 @@
 #include "gripes.h"
 #include "mxarray.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ov-struct.h"
 #include "unwind-prot.h"
 #include "utils.h"
@@ -47,7 +48,6 @@
 #include "ls-utils.h"
 #include "pr-output.h"
 
-DEFINE_OCTAVE_ALLOCATOR(octave_struct);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_struct, "struct", "struct");
 
@@ -123,11 +123,11 @@
   if (! valid_identifier (key))
     {
       if (who)
-        warning_with_id ("Octave:matlab-incompatible",
+        warning_with_id ("Octave:language-extension",
                          "%s: invalid structure field name '%s'",
                          who, key.c_str ());
       else
-        warning_with_id ("Octave:matlab-incompatible",
+        warning_with_id ("Octave:language-extension",
                          "invalid structure field name '%s'",
                          key.c_str ());
     }
@@ -648,7 +648,7 @@
 }
 
 void
-octave_struct::print (std::ostream& os, bool) const
+octave_struct::print (std::ostream& os, bool)
 {
   print_raw (os);
 }
@@ -844,7 +844,7 @@
               success = false;
             }
         }
-      else if (len == 0 )
+      else if (len == 0)
         map = octave_map (dv);
       else
         panic_impossible ();
@@ -980,11 +980,11 @@
   return success;
 }
 
+bool
+octave_struct::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats)
+{
 #if defined (HAVE_HDF5)
 
-bool
-octave_struct::save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats)
-{
   hid_t data_hid = -1;
 
 #if HAVE_HDF5_18
@@ -1019,13 +1019,20 @@
   H5Gclose (data_hid);
 
   return true;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_struct::load_hdf5 (hid_t loc_id, const char *name)
+octave_struct::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   hdf5_callback_data dsub;
 
   herr_t retval2 = 0;
@@ -1067,11 +1074,13 @@
       retval = true;
     }
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_struct::as_mxArray (void) const
 {
@@ -1132,7 +1141,6 @@
 
   return retval;
 }
-DEFINE_OCTAVE_ALLOCATOR(octave_scalar_struct);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_scalar_struct, "scalar struct",
                                     "struct");
@@ -1359,7 +1367,7 @@
 }
 
 void
-octave_scalar_struct::print (std::ostream& os, bool) const
+octave_scalar_struct::print (std::ostream& os, bool)
 {
   print_raw (os);
 }
@@ -1616,12 +1624,12 @@
   return success;
 }
 
-#if defined (HAVE_HDF5)
-
 bool
-octave_scalar_struct::save_hdf5 (hid_t loc_id, const char *name,
+octave_scalar_struct::save_hdf5 (octave_hdf5_id loc_id, const char *name,
                                  bool save_as_floats)
 {
+#if defined (HAVE_HDF5)
+
   hid_t data_hid = -1;
 
 #if HAVE_HDF5_18
@@ -1656,13 +1664,20 @@
   H5Gclose (data_hid);
 
   return true;
+
+#else
+  gripe_save ("hdf5");
+  return false;
+#endif
 }
 
 bool
-octave_scalar_struct::load_hdf5 (hid_t loc_id, const char *name)
+octave_scalar_struct::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
   bool retval = false;
 
+#if defined (HAVE_HDF5)
+
   hdf5_callback_data dsub;
 
   herr_t retval2 = 0;
@@ -1702,11 +1717,13 @@
       retval = true;
     }
 
+#else
+  gripe_load ("hdf5");
+#endif
+
   return retval;
 }
 
-#endif
-
 mxArray *
 octave_scalar_struct::as_mxArray (void) const
 {
@@ -1814,7 +1831,7 @@
 \n\
 Finally, if the value is a non-scalar cell array, then @code{struct}\n\
 produces a struct @strong{array}.\n\
-@seealso{cell2struct, fieldnames, orderfields, getfield, setfield, rmfield, structfun}\n\
+@seealso{cell2struct, fieldnames, getfield, setfield, rmfield, isfield, orderfields, isstruct, structfun}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -2012,8 +2029,10 @@
 @deftypefn  {Built-in Function} {} isfield (@var{x}, \"@var{name}\")\n\
 @deftypefnx {Built-in Function} {} isfield (@var{x}, @var{name})\n\
 Return true if the @var{x} is a structure and it includes an element named\n\
-@var{name}.  If @var{name} is a cell array of strings then a logical array of\n\
-equal dimension is returned.\n\
+@var{name}.\n\
+\n\
+If @var{name} is a cell array of strings then a logical array of equal\n\
+dimension is returned.\n\
 @seealso{fieldnames}\n\
 @end deftypefn")
 {
@@ -2066,9 +2085,9 @@
   return retval;
 }
 
-DEFUN (nfields, args, ,
+DEFUN (numfields, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} nfields (@var{s})\n\
+@deftypefn {Built-in Function} {} numfields (@var{s})\n\
 Return the number of fields of the structure @var{s}.\n\
 @seealso{fieldnames}\n\
 @end deftypefn")
@@ -2237,12 +2256,14 @@
 
 DEFUN (rmfield, args, ,
        "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{s} =} rmfield (@var{s}, \"@var{f}\")\n\
-@deftypefnx {Built-in Function} {@var{s} =} rmfield (@var{s}, @var{f})\n\
+@deftypefn  {Built-in Function} {@var{sout} =} rmfield (@var{s}, \"@var{f}\")\n\
+@deftypefnx {Built-in Function} {@var{sout} =} rmfield (@var{s}, @var{f})\n\
 Return a @emph{copy} of the structure (array) @var{s} with the field @var{f}\n\
-removed.  If @var{f} is a cell array of strings or a character array, remove\n\
-each of the named fields.\n\
-@seealso{orderfields, fieldnames}\n\
+removed.\n\
+\n\
+If @var{f} is a cell array of strings or a character array, remove each of\n\
+the named fields.\n\
+@seealso{orderfields, fieldnames, isfield}\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/octave-value/ov-struct.h
+++ b/libinterp/octave-value/ov-struct.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,7 +32,6 @@
 #include "str-vec.h"
 
 #include "error.h"
-#include "oct-alloc.h"
 #include "oct-map.h"
 #include "ov-base.h"
 #include "ov-typeinfo.h"
@@ -126,7 +125,7 @@
 
   string_vector map_keys (void) const { return map.fieldnames (); }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -141,11 +140,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -162,7 +159,6 @@
 
 private:
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
@@ -249,7 +245,7 @@
 
   string_vector map_keys (void) const { return map.fieldnames (); }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
@@ -264,11 +260,9 @@
   bool load_binary (std::istream& is, bool swap,
                     oct_mach_info::float_format fmt);
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (hid_t loc_id, const char *name);
-#endif
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   mxArray *as_mxArray (void) const;
 
@@ -283,7 +277,6 @@
 
   octave_value to_array (void);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-type-conv.h
+++ b/libinterp/octave-value/ov-type-conv.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-typeinfo.cc
+++ b/libinterp/octave-value/ov-typeinfo.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-typeinfo.h
+++ b/libinterp/octave-value/ov-typeinfo.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-uint16.cc
+++ b/libinterp/octave-value/ov-uint16.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_UINT16
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-uint16.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<uint16NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint16_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint16_matrix,
                                      "uint16 matrix", "uint16");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_uint16>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint16_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint16_scalar,
                                      "uint16 scalar", "uint16");
--- a/libinterp/octave-value/ov-uint16.h
+++ b/libinterp/octave-value/ov-uint16.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-uint32.cc
+++ b/libinterp/octave-value/ov-uint32.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_UINT32
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-uint32.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<uint32NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint32_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint32_matrix,
                                      "uint32 matrix", "uint32");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_uint32>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint32_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint32_scalar,
                                      "uint32 scalar", "uint32");
--- a/libinterp/octave-value/ov-uint32.h
+++ b/libinterp/octave-value/ov-uint32.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-uint64.cc
+++ b/libinterp/octave-value/ov-uint64.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_UINT64
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-uint64.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<uint64NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint64_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint64_matrix,
                                      "uint64 matrix", "uint64");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_uint64>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint64_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint64_scalar,
                                      "uint64 scalar", "uint64");
--- a/libinterp/octave-value/ov-uint64.h
+++ b/libinterp/octave-value/ov-uint64.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-uint8.cc
+++ b/libinterp/octave-value/ov-uint8.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,13 +36,10 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "oct-lvalue.h"
+#include "oct-hdf5.h"
 #include "ops.h"
 #include "ov-base.h"
 
-#ifdef HAVE_HDF5
-#define HDF5_SAVE_TYPE H5T_NATIVE_UINT8
-#endif
-
 #include "ov-base-int.h"
 #include "ov-base-int.cc"
 #include "ov-uint8.h"
@@ -59,7 +56,6 @@
 
 template class octave_base_int_matrix<uint8NDArray>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint8_matrix);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_matrix,
                                      "uint8 matrix", "uint8");
@@ -68,7 +64,6 @@
 
 template class octave_base_int_scalar<octave_uint8>;
 
-DEFINE_OCTAVE_ALLOCATOR (octave_uint8_scalar);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_scalar,
                                      "uint8 scalar", "uint8");
--- a/libinterp/octave-value/ov-uint8.h
+++ b/libinterp/octave-value/ov-uint8.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/octave-value/ov-usr-fcn.cc
+++ b/libinterp/octave-value/ov-usr-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -69,7 +69,6 @@
 
 // User defined scripts.
 
-DEFINE_OCTAVE_ALLOCATOR (octave_user_script);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_script,
                                      "user-defined script",
@@ -149,8 +148,10 @@
                   frame.protect_var (tree_evaluator::statement_context);
                   tree_evaluator::statement_context = tree_evaluator::script;
 
-                  BEGIN_PROFILER_BLOCK (profiler_name ())
+                  BEGIN_PROFILER_BLOCK (octave_user_script)
+
                   cmd_list->accept (*current_evaluator);
+
                   END_PROFILER_BLOCK
 
                   if (tree_return_command::returning)
@@ -158,9 +159,6 @@
 
                   if (tree_break_command::breaking)
                     tree_break_command::breaking--;
-
-                  if (error_state)
-                    octave_call_stack::backtrace_error_message ();
                 }
               else
                 ::error ("max_recursion_depth exceeded");
@@ -181,7 +179,6 @@
 
 // User defined functions.
 
-DEFINE_OCTAVE_ALLOCATOR (octave_user_function);
 
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_function,
                                      "user-defined function",
@@ -203,7 +200,7 @@
     num_named_args (param_list ? param_list->length () : 0),
     subfunction (false), inline_function (false),
     anonymous_function (false), nested_function (false),
-    class_constructor (false), class_method (false),
+    class_constructor (none), class_method (false),
     parent_scope (-1), local_scope (sid),
     curr_unwind_protect_frame (0)
 #ifdef HAVE_LLVM
@@ -319,14 +316,18 @@
 {
   std::ostringstream result;
 
-  if (is_inline_function ())
-    result << "inline@" << fcn_file_name ()
-           << ":" << location_line << ":" << location_column;
-  else if (is_anonymous_function ())
+  if (is_anonymous_function ())
     result << "anonymous@" << fcn_file_name ()
            << ":" << location_line << ":" << location_column;
   else if (is_subfunction ())
     result << parent_fcn_name () << ">" << name ();
+  else if (is_class_method ())
+    result << "@" << dispatch_class () << "/" << name ();
+  else if (is_class_constructor () || is_classdef_constructor ())
+    result << "@" << name ();
+  else if (is_inline_function ())
+    result << "inline@" << fcn_file_name ()
+           << ":" << location_line << ":" << location_column;
   else
     result << name ();
 
@@ -470,7 +471,7 @@
 
 octave_value_list
 octave_user_function::do_multi_index_op (int nargout,
-                                         const octave_value_list& args,
+                                         const octave_value_list& _args,
                                          const std::list<octave_lvalue>* lvalue_list)
 {
   octave_value_list retval;
@@ -481,6 +482,23 @@
   if (! cmd_list)
     return retval;
 
+  // If this function is a classdef constructor, extract the first input
+  // argument, which must be the partially constructed object instance.
+
+  octave_value_list args (_args);
+  octave_value_list ret_args;
+
+  if (is_classdef_constructor ())
+    {
+      if (args.length () > 0)
+        {
+          ret_args = args.slice (0, 1, true);
+          args = args.slice (1, args.length () - 1, true);
+        }
+      else
+        panic_impossible ();
+    }
+
 #ifdef HAVE_LLVM
   if (is_special_expr ()
       && tree_jit::execute (*this, args, retval))
@@ -524,6 +542,25 @@
         return retval;
     }
 
+  // For classdef constructor, pre-populate the output arguments
+  // with the pre-initialized object instance, extracted above.
+
+  if (is_classdef_constructor ())
+    {
+      if (ret_list)
+        {
+          ret_list->define_from_arg_vector (ret_args);
+          if (error_state)
+            return retval;
+        }
+      else
+        {
+          ::error ("%s: invalid classdef constructor, no output argument defined",
+                   dispatch_class ().c_str ());
+          return retval;
+        }
+    }
+
   // Force parameter list to be undefined when this function exits.
   // Doing so decrements the reference counts on the values of local
   // variables that are also named function parameters.
@@ -574,7 +611,7 @@
   frame.protect_var (tree_evaluator::statement_context);
   tree_evaluator::statement_context = tree_evaluator::function;
 
-  BEGIN_PROFILER_BLOCK (profiler_name ())
+  BEGIN_PROFILER_BLOCK (octave_user_function)
 
   if (is_special_expr ())
     {
@@ -600,10 +637,7 @@
     tree_break_command::breaking--;
 
   if (error_state)
-    {
-      octave_call_stack::backtrace_error_message ();
-      return retval;
-    }
+    return retval;
 
   // Copy return values out.
 
@@ -744,7 +778,8 @@
         {
           // Only assign the hidden variable if black holes actually present.
           Matrix bh (1, nbh);
-          octave_idx_type k = 0, l = 0;
+          octave_idx_type k = 0;
+          octave_idx_type l = 0;
           for (std::list<octave_lvalue>::const_iterator
                p = lvalue_list->begin (); p != lvalue_list->end (); p++)
             {
@@ -791,9 +826,11 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} nargin ()\n\
 @deftypefnx {Built-in Function} {} nargin (@var{fcn})\n\
-Within a function, return the number of arguments passed to the function.\n\
-At the top level, return the number of command line arguments passed to\n\
-Octave.\n\
+Report the number of input arguments to a function.\n\
+\n\
+Called from within a function, return the number of arguments passed to the\n\
+function.  At the top level, return the number of command line arguments\n\
+passed to Octave.\n\
 \n\
 If called with the optional argument @var{fcn}---a function name or handle---\n\
 return the declared number of arguments that the function can accept.\n\
@@ -813,7 +850,7 @@
 @end example\n\
 \n\
 Programming Note: @code{nargin} does not work on built-in functions.\n\
-@seealso{nargout, varargin, isargout, varargout, nthargout}\n\
+@seealso{nargout, narginchk, varargin, inputname}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -849,7 +886,7 @@
             {
               // Matlab gives up for histc,
               // so maybe it's ok that that we give up somtimes too?
-              error ("nargin: nargin information not available for builtin functions");
+              error ("nargin: nargin information not available for built-in functions");
             }
         }
       else
@@ -872,11 +909,18 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} nargout ()\n\
 @deftypefnx {Built-in Function} {} nargout (@var{fcn})\n\
-Within a function, return the number of values the caller expects to\n\
-receive.  If called with the optional argument @var{fcn}---a function\n\
-name or handle---return the number of declared output values that the\n\
-function can produce.  If the final output argument is @var{varargout}\n\
-the returned value is negative.\n\
+Report the number of output arguments from a function.\n\
+\n\
+Called from within a function, return the number of values the caller expects\n\
+to receive.  At the top level, @code{nargout} with no argument is undefined\n\
+and will produce an error.\n\
+\n\
+If called with the optional argument @var{fcn}---a function name or\n\
+handle---return the number of declared output values that the function can\n\
+produce.\n\
+\n\
+If the final output argument is @var{varargout} the returned value is\n\
+negative.\n\
 \n\
 For example,\n\
 \n\
@@ -911,10 +955,9 @@
 will return -2, because @code{imread} has two outputs and the second is\n\
 @var{varargout}.\n\
 \n\
-At the top level, @code{nargout} with no argument is undefined and will\n\
-produce an error.  @code{nargout} does not work for built-in functions and\n\
+Programming Note.  @code{nargout} does not work for built-in functions and\n\
 returns -1 for all anonymous functions.\n\
-@seealso{nargin, varargin, isargout, varargout, nthargout}\n\
+@seealso{nargin, varargout, isargout, nthargout}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -971,7 +1014,7 @@
               // without making intrusive changes to Octave.
               // Matlab gives up for histc,
               // so maybe it's ok that we give up somtimes too?
-              error ("nargout: nargout information not available for builtin functions.");
+              error ("nargout: nargout information not available for built-in functions.");
             }
         }
       else
@@ -1037,16 +1080,18 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} isargout (@var{k})\n\
 Within a function, return a logical value indicating whether the argument\n\
-@var{k} will be assigned to a variable on output.  If the result is false,\n\
-the argument has been ignored during the function call through the use of\n\
-the tilde (~) special output argument.  Functions can use @code{isargout} to\n\
-avoid performing unnecessary calculations for outputs which are unwanted.\n\
+@var{k} will be assigned to a variable on output.\n\
+\n\
+If the result is false, the argument has been ignored during the function\n\
+call through the use of the tilde (~) special output argument.  Functions\n\
+can use @code{isargout} to avoid performing unnecessary calculations for\n\
+outputs which are unwanted.\n\
 \n\
 If @var{k} is outside the range @code{1:max (nargout)}, the function returns\n\
 false.  @var{k} can also be an array, in which case the function works\n\
 element-by-element and a logical array is returned.  At the top level,\n\
 @code{isargout} returns an error.\n\
-@seealso{nargout, nargin, varargin, varargout, nthargout}\n\
+@seealso{nargout, varargout, nthargout}\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/octave-value/ov-usr-fcn.h
+++ b/libinterp/octave-value/ov-usr-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -165,7 +165,6 @@
 
   octave_user_script& operator = (const octave_user_script& f);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
@@ -327,12 +326,20 @@
 
   void mark_as_nested_function (void) { nested_function = true; }
 
-  void mark_as_class_constructor (void) { class_constructor = true; }
+  void mark_as_class_constructor (void) { class_constructor = legacy; }
+
+  void mark_as_classdef_constructor (void) { class_constructor = classdef; }
 
   bool is_class_constructor (const std::string& cname = std::string ()) const
   {
-    return class_constructor
-           ? (cname.empty () ? true : cname == dispatch_class ()) : false;
+    return class_constructor == legacy
+      ? (cname.empty () ? true : cname == dispatch_class ()) : false;
+  }
+
+  bool is_classdef_constructor (const std::string& cname = std::string ()) const
+  {
+    return class_constructor == classdef
+      ? (cname.empty () ? true : cname == dispatch_class ()) : false;
   }
 
   void mark_as_class_method (void) { class_method = true; }
@@ -408,6 +415,13 @@
 
 private:
 
+  enum class_ctor_type
+  {
+    none,
+    legacy,
+    classdef
+  };
+
   // List of arguments for this function.  These are local variables.
   tree_parameter_list *param_list;
 
@@ -470,8 +484,8 @@
   // TRUE means this is a nested function. (either a child or parent)
   bool nested_function;
 
-  // TRUE means this function is the constructor for class object.
-  bool class_constructor;
+  // Enum describing whether this function is the constructor for class object.
+  class_ctor_type class_constructor;
 
   // TRUE means this function is a method for a class.
   bool class_method;
@@ -506,7 +520,6 @@
 
   octave_user_function& operator = (const octave_user_function& fn);
 
-  DECLARE_OCTAVE_ALLOCATOR
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov.cc
+++ b/libinterp/octave-value/ov.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -65,6 +65,7 @@
 #include "ov-range.h"
 #include "ov-struct.h"
 #include "ov-class.h"
+#include "ov-classdef.h"
 #include "ov-oncleanup.h"
 #include "ov-cs-list.h"
 #include "ov-colon.h"
@@ -92,7 +93,18 @@
 
 // We are likely to have a lot of octave_value objects to allocate, so
 // make the grow_size large.
-DEFINE_OCTAVE_ALLOCATOR2(octave_value, 1024);
+
+// If TRUE, don't create special diagonal matrix objects.
+
+static bool Vdisable_diagonal_matrix = false;
+
+// If TRUE, don't create special permutation matrix objects.
+
+static bool Vdisable_permutation_matrix = false;
+
+// If TRUE, don't create special range objects.
+
+static bool Vdisable_range = false;
 
 // FIXME
 
@@ -673,37 +685,49 @@
 }
 
 octave_value::octave_value (const DiagArray2<double>& d)
-  : rep (new octave_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_matrix (Matrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const DiagArray2<float>& d)
-  : rep (new octave_float_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_float_matrix (FloatMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_float_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const DiagArray2<Complex>& d)
-  : rep (new octave_complex_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_complex_matrix (ComplexMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_complex_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const DiagArray2<FloatComplex>& d)
-  : rep (new octave_float_complex_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_float_complex_matrix (FloatComplexMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_float_complex_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const DiagMatrix& d)
-  : rep (new octave_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_matrix (Matrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const FloatDiagMatrix& d)
-  : rep (new octave_float_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_float_matrix (FloatMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_float_diag_matrix (d)))
 {
   maybe_mutate ();
 }
@@ -781,13 +805,17 @@
 }
 
 octave_value::octave_value (const ComplexDiagMatrix& d)
-  : rep (new octave_complex_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_complex_matrix (ComplexMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_complex_diag_matrix (d)))
 {
   maybe_mutate ();
 }
 
 octave_value::octave_value (const FloatComplexDiagMatrix& d)
-  : rep (new octave_float_complex_diag_matrix (d))
+  : rep (Vdisable_diagonal_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_float_complex_matrix (FloatComplexMatrix (d)))
+         : dynamic_cast<octave_base_value *> (new octave_float_complex_diag_matrix (d)))
 {
   maybe_mutate ();
 }
@@ -817,7 +845,9 @@
 }
 
 octave_value::octave_value (const PermMatrix& p)
-  : rep (new octave_perm_matrix (p))
+  : rep (Vdisable_permutation_matrix
+         ? dynamic_cast<octave_base_value *> (new octave_matrix (Matrix (p)))
+         : dynamic_cast<octave_base_value *> (new octave_perm_matrix (p)))
 {
   maybe_mutate ();
 }
@@ -1176,8 +1206,10 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const Range& r)
-  : rep (new octave_range (r))
+octave_value::octave_value (const Range& r, bool force_range)
+  : rep (force_range || ! Vdisable_range
+         ? dynamic_cast<octave_base_value *> (new octave_range (r))
+         : dynamic_cast<octave_base_value *> (new octave_matrix (r.matrix_value ())))
 {
   maybe_mutate ();
 }
@@ -1193,13 +1225,14 @@
 {
 }
 
-octave_value::octave_value (const Octave_map& m)
-  : rep (new octave_struct (m))
+octave_value::octave_value (const octave_map& m, const std::string& id,
+                            const std::list<std::string>& plist)
+  : rep (new octave_class (m, id, plist))
 {
   maybe_mutate ();
 }
 
-octave_value::octave_value (const Octave_map& m, const std::string& id,
+octave_value::octave_value (const octave_scalar_map& m, const std::string& id,
                             const std::list<std::string>& plist)
   : rep (new octave_class (m, id, plist))
 {
@@ -1951,7 +1984,9 @@
   int t2 = v2.type_id ();
 
   if (t1 == octave_class::static_type_id ()
-      || t2 == octave_class::static_type_id ())
+      || t2 == octave_class::static_type_id ()
+      || t1 == octave_classdef::static_type_id ()
+      || t2 == octave_classdef::static_type_id ())
     {
       octave_value_typeinfo::binary_class_op_fcn f
         = octave_value_typeinfo::lookup_binary_class_op (op);
@@ -2001,8 +2036,9 @@
             v2.numeric_conversion_function ();
 
           // Try biased (one-sided) conversions first.
-          if (cf2.type_id () >= 0 &&
-              octave_value_typeinfo::lookup_binary_op (op, t1, cf2.type_id ()))
+          if (cf2.type_id () >= 0
+              && octave_value_typeinfo::lookup_binary_op (op, t1,
+                                                          cf2.type_id ()))
             cf1 = 0;
           else if (cf1.type_id () >= 0
                    && octave_value_typeinfo::lookup_binary_op (op,
@@ -2062,10 +2098,10 @@
                   && octave_value_typeinfo::lookup_binary_op (op, t1,
                                                               cf2.type_id ()))
                 cf1 = 0;
-              else if (cf1.type_id () >= 0 &&
-                       octave_value_typeinfo::lookup_binary_op (op,
-                                                                cf1.type_id (),
-                                                                t2))
+              else if (cf1.type_id () >= 0
+                       && octave_value_typeinfo::lookup_binary_op (op,
+                                                                   cf1.type_id (),
+                                                                   t2))
                 cf2 = 0;
 
               if (cf1)
@@ -2207,7 +2243,9 @@
   int t2 = v2.type_id ();
 
   if (t1 == octave_class::static_type_id ()
-      || t2 == octave_class::static_type_id ())
+      || t2 == octave_class::static_type_id ()
+      || t1 == octave_classdef::static_type_id ()
+      || t2 == octave_classdef::static_type_id ())
     {
       octave_value_typeinfo::binary_class_op_fcn f
         = octave_value_typeinfo::lookup_binary_class_op (op);
@@ -2351,6 +2389,101 @@
   return retval;
 }
 
+octave_value
+do_colon_op (const octave_value& base, const octave_value& increment,
+             const octave_value& limit, bool is_for_cmd_expr)
+{
+  octave_value retval;
+
+  if (base.is_object () || increment.is_object () || limit.is_object ())
+    {
+      std::string dispatch_type;
+
+      if (base.is_object ())
+        dispatch_type = base.class_name ();
+      else if (increment.is_defined () && increment.is_object ())
+        dispatch_type = increment.class_name ();
+      else
+        dispatch_type = limit.class_name ();
+
+      octave_value meth = symbol_table::find_method ("colon", dispatch_type);
+
+      if (meth.is_defined ())
+        {
+          octave_value_list args;
+
+          if (increment.is_defined ())
+            {
+              args(2) = limit;
+              args(1) = increment;
+            }
+          else
+            args(1) = limit;
+
+          args(0) = base;
+
+          octave_value_list tmp = feval (meth.function_value (), args, 1);
+
+          if (tmp.length () > 0)
+            retval = tmp(0);
+        }
+      else
+        error ("colon method not defined for %s class", dispatch_type.c_str ());
+    }
+  else
+    {
+      bool result_is_str = (base.is_string () && limit.is_string ());
+      bool dq_str = (base.is_dq_string () || limit.is_dq_string ());
+
+      Matrix m_base = base.matrix_value (true);
+
+      if (error_state)
+        {
+          error ("invalid base value in colon expression");
+          return retval;
+        }
+
+      Matrix m_limit = limit.matrix_value (true);
+
+      if (error_state)
+        {
+          error ("invalid limit value in colon expression");
+          return retval;
+        }
+
+      Matrix m_increment = (increment.is_defined ()
+                            ? increment.matrix_value (true)
+                            : Matrix (1, 1, 1.0));
+
+      if (error_state)
+        {
+          error ("invalid increment value in colon expression");
+          return retval;
+        }
+
+      bool base_empty = m_base.is_empty ();
+      bool limit_empty = m_limit.is_empty ();
+      bool increment_empty = m_increment.is_empty ();
+
+      if (base_empty || limit_empty || increment_empty)
+        retval = Range ();
+      else
+        {
+          Range r (m_base(0), m_limit(0), m_increment(0));
+
+          // For compatibility with Matlab, don't allow the range used in
+          // a FOR loop expression to be converted to a Matrix.
+
+          retval = octave_value (r, is_for_cmd_expr);
+
+          if (result_is_str)
+            retval = retval.convert_to_str (false, true, dq_str ? '"' : '\'');
+        }
+    }
+
+  return retval;
+}
+
 void
 octave_value::print_info (std::ostream& os, const std::string& prefix) const
 {
@@ -2381,7 +2514,8 @@
 
   int t = v.type_id ();
 
-  if (t == octave_class::static_type_id ())
+  if (t == octave_class::static_type_id ()
+      || t == octave_classdef::static_type_id ())
     {
       octave_value_typeinfo::unary_class_op_fcn f
         = octave_value_typeinfo::lookup_unary_class_op (op);
@@ -2835,10 +2969,9 @@
 
       for (int k = 0; k < nel; k++)
         {
-          std::string item = type(k).string_value ();
-
-          if (! error_state)
+          if (type(k).is_string ())
             {
+              std::string item = type(k).string_value ();
               if (item == "{}")
                 type_string[k] = '{';
               else if (item == "()")
@@ -2853,8 +2986,7 @@
             }
           else
             {
-              error ("%s: expecting type(%d) to be a character string",
-                     name, k+1);
+              error ("%s: type(%d) must be a string", name, k+1);
               return;
             }
 
@@ -2877,8 +3009,7 @@
             }
           else
             {
-              error ("%s: expecting subs(%d) to be a character string or cell array",
-                     name, k+1);
+              error ("%s: subs(%d) must be a string or cell array", name, k+1);
               return;
             }
 
@@ -3141,3 +3272,107 @@
 %!error is_dq_string ()
 %!error is_dq_string ("foo", 2)
 */
+
+DEFUN (disable_permutation_matrix, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{val} =} disable_permutation_matrix ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} disable_permutation_matrix (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} disable_permutation_matrix (@var{new_val}, \"local\")\n\
+Query or set the internal variable that controls whether permutation\n\
+matrices are stored in a special space-efficient format.  The default\n\
+value is true.  If this option is disabled Octave will store permutation\n\
+matrices as full matrices.\n\
+\n\
+When called from inside a function with the @qcode{\"local\"} option, the\n\
+variable is changed locally for the function and any subroutines it calls.\n\
+The original variable value is restored when exiting the function.\n\
+@seealso{disable_range, disable_diagonal_matrix}\n\
+@end deftypefn")
+{
+  return SET_INTERNAL_VARIABLE (disable_permutation_matrix);
+}
+
+/*
+%!function p = __test_dpm__ (dpm)
+%!  disable_permutation_matrix (dpm, "local");
+%!  [~, ~, p] = lu ([1,2;3,4]);
+%!endfunction
+
+%!assert (typeinfo (__test_dpm__ (false)), "permutation matrix");
+%!assert (typeinfo (__test_dpm__ (true)), "matrix");
+*/
+
+DEFUN (disable_diagonal_matrix, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{val} =} disable_diagonal_matrix ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} disable_diagonal_matrix (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} disable_diagonal_matrix (@var{new_val}, \"local\")\n\
+Query or set the internal variable that controls whether diagonal\n\
+matrices are stored in a special space-efficient format.  The default\n\
+value is true.  If this option is disabled Octave will store diagonal\n\
+matrices as full matrices.\n\
+\n\
+When called from inside a function with the @qcode{\"local\"} option, the\n\
+variable is changed locally for the function and any subroutines it calls.\n\
+The original variable value is restored when exiting the function.\n\
+@seealso{disable_range, disable_permutation_matrix}\n\
+@end deftypefn")
+{
+  return SET_INTERNAL_VARIABLE (disable_diagonal_matrix);
+}
+
+/*
+%!function [x, xi, fx, fxi] = __test_ddm__ (ddm)
+%!  disable_diagonal_matrix (ddm, "local");
+%!  x = eye (2);
+%!  xi = x*i;
+%!  fx = single (x);
+%!  fxi = single (xi);
+%!endfunction
+
+%!shared x, xi, fx, fxi
+%!  [x, xi, fx, fxi] = __test_ddm__ (false);
+%!assert (typeinfo (x), "diagonal matrix");
+%!assert (typeinfo (xi), "complex diagonal matrix");
+%!assert (typeinfo (fx), "float diagonal matrix");
+%!assert (typeinfo (fxi), "float complex diagonal matrix");
+
+%!shared x, xi, fx, fxi
+%!  [x, xi, fx, fxi] = __test_ddm__ (true);
+%!assert (typeinfo (x), "matrix");
+%!assert (typeinfo (xi), "complex matrix");
+%!assert (typeinfo (fx), "float matrix");
+%!assert (typeinfo (fxi), "float complex matrix");
+*/
+
+DEFUN (disable_range, args, nargout,
+       "-*- texinfo -*-\n\
+@deftypefn  {Built-in Function} {@var{val} =} disable_range ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} disable_range (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} disable_range (@var{new_val}, \"local\")\n\
+Query or set the internal variable that controls whether ranges are stored\n\
+in a special space-efficient format.  The default value is true.  If this\n\
+option is disabled Octave will store ranges as full matrices.\n\
+\n\
+When called from inside a function with the @qcode{\"local\"} option, the\n\
+variable is changed locally for the function and any subroutines it calls.\n\
+The original variable value is restored when exiting the function.\n\
+@seealso{disable_diagonal_matrix, disable_permutation_matrix}\n\
+@end deftypefn")
+{
+  return SET_INTERNAL_VARIABLE (disable_range);
+}
+
+/*
+%!function r = __test_dr__ (dr)
+%!  disable_range (dr, "local");
+%!  ## Constant folding will produce range for 1:13.
+%!  base = 1;
+%!  limit = 13;
+%!  r = base:limit;
+%!endfunction
+
+%!assert (typeinfo (__test_dr__ (false)), "range");
+%!assert (typeinfo (__test_dr__ (true)), "matrix");
+*/
+
--- a/libinterp/octave-value/ov.h
+++ b/libinterp/octave-value/ov.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
@@ -35,18 +35,15 @@
 #include "idx-vector.h"
 #include "mach-info.h"
 #include "mx-base.h"
-#include "oct-alloc.h"
 #include "oct-time.h"
 #include "str-vec.h"
 
-#include "oct-hdf5.h"
 #include "oct-sort.h"
 
 class Cell;
 class mxArray;
 class octave_map;
 class octave_scalar_map;
-class Octave_map;
 class octave_stream;
 class octave_function;
 class octave_user_function;
@@ -57,9 +54,16 @@
 
 #include "ov-base.h"
 
-// Constants.
+// Forward declarations of friend functions that have default arguments.
 
-class octave_value;
+OCTINTERP_API octave_value do_colon_op (const octave_value& base,
+                                        const octave_value& limit,
+                                        bool is_for_cmd_expr = false);
+
+OCTINTERP_API octave_value do_colon_op (const octave_value& base,
+                                        const octave_value& increment,
+                                        const octave_value& limit,
+                                        bool is_for_cmd_expr = false);
 
 class
 OCTINTERP_API
@@ -282,11 +286,12 @@
   octave_value (const Array<std::string>& cellstr);
   octave_value (const idx_vector& idx, bool lazy = true);
   octave_value (double base, double limit, double inc);
-  octave_value (const Range& r);
+  octave_value (const Range& r, bool force_range = false);
   octave_value (const octave_map& m);
   octave_value (const octave_scalar_map& m);
-  octave_value (const Octave_map& m);
-  octave_value (const Octave_map& m, const std::string& id,
+  octave_value (const octave_map& m, const std::string& id,
+                const std::list<std::string>& plist);
+  octave_value (const octave_scalar_map& m, const std::string& id,
                 const std::list<std::string>& plist);
   octave_value (const octave_value_list& m, bool = false);
   octave_value (octave_value::magic_colon);
@@ -455,8 +460,10 @@
 
   octave_value& assign (assign_op, const octave_value& rhs);
 
-  idx_vector index_vector (void) const
-  { return rep->index_vector (); }
+  idx_vector index_vector (bool require_integers = false) const
+  {
+    return rep->index_vector (require_integers);
+  }
 
   // Size.
 
@@ -570,6 +577,9 @@
   bool is_object (void) const
   { return rep->is_object (); }
 
+  bool is_classdef_object (void) const
+  { return rep->is_classdef_object (); }
+
   bool is_java (void) const
   { return rep->is_java (); }
 
@@ -913,6 +923,9 @@
   find_parent_class (const std::string& parent_class_name)
   { return rep->find_parent_class (parent_class_name); }
 
+  bool is_instance_of (const std::string& cls_name) const
+  { return rep->is_instance_of (cls_name); }
+
   octave_function *function_value (bool silent = false) const;
 
   octave_user_function *user_function_value (bool silent = false) const;
@@ -1015,7 +1028,7 @@
   bool print_as_scalar (void) const
   { return rep->print_as_scalar (); }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const
+  void print (std::ostream& os, bool pr_as_read_syntax = false)
   { rep->print (os, pr_as_read_syntax); }
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const
@@ -1057,6 +1070,18 @@
                                                const octave_value& b,
                                                const Array<octave_idx_type>& ra_idx);
 
+  friend OCTINTERP_API octave_value do_colon_op (const octave_value& base,
+                                                 const octave_value& limit,
+                                                 bool is_for_cmd_expr)
+  {
+    return do_colon_op (base, octave_value (), limit, is_for_cmd_expr);
+  }
+
+  friend OCTINTERP_API octave_value do_colon_op (const octave_value& base,
+                                                 const octave_value& increment,
+                                                 const octave_value& limit,
+                                                 bool is_for_cmd_expr);
+
   const octave_base_value& get_rep (void) const { return *rep; }
 
   bool is_copy_of (const octave_value &val) const { return rep == val.rep; }
@@ -1075,13 +1100,12 @@
                     oct_mach_info::float_format fmt)
   { return rep->load_binary (is, swap, fmt); }
 
-#if defined (HAVE_HDF5)
-  bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats)
+  bool save_hdf5 (octave_hdf5_id loc_id, const char *name,
+                  bool save_as_floats)
   { return rep->save_hdf5 (loc_id, name, save_as_floats); }
 
-  bool load_hdf5 (hid_t loc_id, const char *name)
+  bool load_hdf5 (octave_hdf5_id loc_id, const char *name)
   { return rep->load_hdf5 (loc_id, name); }
-#endif
 
   int write (octave_stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -1233,7 +1257,6 @@
   // const octave_base_value* which actually silently calls octave_value (bool).
   octave_value (const octave_base_value *);
 
-  DECLARE_OCTAVE_ALLOCATOR
 };
 
 // Publish externally used friend functions.
--- a/libinterp/octave.cc
+++ b/libinterp/octave.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -68,6 +68,7 @@
 #include "ops.h"
 #include "options-usage.h"
 #include "ov.h"
+#include "ov-classdef.h"
 #include "ov-range.h"
 #include "toplev.h"
 #include "parse.h"
@@ -95,8 +96,7 @@
 static string_vector octave_argv;
 
 // The name used to invoke Octave.
-static std::string
-octave_program_invocation_name;
+static std::string octave_program_invocation_name;
 
 // The last component of octave_program_invocation_name.
 static std::string octave_program_name;
@@ -157,18 +157,26 @@
 // (--no-window-system, -W)
 static bool no_window_system = false;
 
-// The code to evaluate at startup (--eval CODE)
+// The code to evaluate at startup
+// (--eval CODE)
 static std::string code_to_eval;
 
 // If TRUE, don't exit after evaluating code given by --eval option.
+// (--persist)
 static bool persist = false;
 
 // If TRUE, the GUI should be started.
 static bool start_gui = false;
 
-// If TRUE use traditional settings (--traditional)
+// If TRUE use traditional (maximally MATLAB compatible) settings
+// (--traditional)
 static bool traditional = false;
 
+// TRUE if this is a program and no interpreter and interaction is
+// needed.  For example, an octave program with shebang line, or code
+// from eval without persist.
+static bool an_octave_program = false;
+
 // Store the command-line options for later use.
 
 static void
@@ -256,10 +264,10 @@
             << std::endl;
 }
 
-// Execute commands from a file and catch potential exceptions in a
-// consistent way.  This function should be called anywhere we might
-// parse and execute commands from a file before before we have entered
-// the main loop in toplev.cc.
+// Execute commands from a file and catch potential exceptions in a consistent
+// way.  This function should be called anywhere we might parse and execute
+// commands from a file before before we have entered the main loop in
+// toplev.cc.
 
 static void
 safe_source_file (const std::string& file_name,
@@ -314,8 +322,8 @@
   if (read_init_files)
     {
       // Try to execute commands from $HOME/$OCTAVE_INITFILE and
-      // $OCTAVE_INITFILE.  If $OCTAVE_INITFILE is not set, .octaverc
-      // is assumed.
+      // $OCTAVE_INITFILE.  If $OCTAVE_INITFILE is not set,
+      // .octaverc is assumed.
 
       bool home_rc_already_executed = false;
 
@@ -472,7 +480,7 @@
   set_liboctave_warning_with_id_handler (warning_with_id);
 }
 
-// What happens on --traditional.
+// What internal options get configured by --traditional.
 
 static void
 maximum_braindamage (void)
@@ -482,25 +490,23 @@
   FPS1 (octave_value (">> "));
   FPS2 (octave_value (""));
   FPS4 (octave_value (""));
-  Fallow_noninteger_range_as_index (octave_value (true));
   Fbeep_on_error (octave_value (true));
   Fconfirm_recursive_rmdir (octave_value (false));
   Fcrash_dumps_octave_core (octave_value (false));
-  Fsave_default_options (octave_value ("-mat-binary"));
-  Fdo_braindead_shortcircuit_evaluation (octave_value (true));
+  Fdisable_diagonal_matrix (octave_value (true));
+  Fdisable_permutation_matrix (octave_value (true));
+  Fdisable_range (octave_value (true));
   Ffixed_point_format (octave_value (true));
   Fhistory_timestamp_format_string (octave_value ("%%-- %D %I:%M %p --%%"));
   Fpage_screen_output (octave_value (false));
   Fprint_empty_dimensions (octave_value (false));
+  Fsave_default_options (octave_value ("-mat-binary"));
+  Fstruct_levels_to_print (octave_value (0));
 
   disable_warning ("Octave:abbreviated-property-match");
-  disable_warning ("Octave:fopen-file-in-path");
+  disable_warning ("Octave:data-file-in-path");
   disable_warning ("Octave:function-name-clash");
-  disable_warning ("Octave:load-file-in-path");
   disable_warning ("Octave:possible-matlab-short-circuit-operator");
-
-  // Initialized to "error" by default.
-  set_warning_state ("Octave:noninteger-range-as-index", "on");
 }
 
 // EMBEDDED is declared int instead of bool because this function is
@@ -538,9 +544,8 @@
       switch (optc)
         {
         case '?':
-          // Unrecognized option.  getopt_long already printed a
-          // message about that, so we will just print the usage string
-          // and exit.
+          // Unrecognized option.  getopt_long already printed a message about
+          // it, so we will just print the usage string and exit.
           octave_print_terse_usage_and_exit ();
           break;
 
@@ -685,21 +690,32 @@
           break;
 
         default:
-          // getopt_long should print a message about unrecognized
-          // options and return '?', which is handled above.  So if we
-          // end up here, it is because there was an option but we
-          // forgot to handle it.  That should be fatal.
+          // getopt_long should print a message about unrecognized options and
+          // return '?', which is handled above.  If we end up here, it is
+          // because there was an option but we forgot to handle it.
+          // That should be fatal.
           panic_impossible ();
           break;
         }
     }
 
+  // Check for various incompatible argument pairs
   if (force_gui_option && no_gui_option)
     {
-      error ("error: only one of --force-gui and --no-gui may be used");
+      error ("only one of --force-gui and --no-gui may be used");
 
       octave_print_terse_usage_and_exit ();
     }
+
+  bool script_file = (argc - optind) > 0;
+  if (! code_to_eval.empty () && script_file)
+    {
+      error ("--eval \"CODE\" and script file are mutually exclusive options");
+
+      octave_print_terse_usage_and_exit ();
+    }
+  an_octave_program = (script_file || ! code_to_eval.empty ()) && ! persist;
+
 }
 
 // EMBEDDED is declared int instead of bool because this function is
@@ -711,6 +727,8 @@
   // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting
   setlocale (LC_NUMERIC, "C");
   setlocale (LC_TIME, "C");
+  octave_env::putenv ("LC_NUMERIC", "C");
+  octave_env::putenv ("LC_TIME", "C");
 
   octave_embedded = embedded;
 
@@ -723,8 +741,8 @@
 
   set_default_prompts ();
 
-  // Initialize default warning state before --traditional option may
-  // reset them.
+  // Initialize default warning state before --traditional option
+  // that may reset them.
 
   initialize_default_warning_state ();
 
@@ -735,10 +753,9 @@
 
   octave_ieee_init ();
 
-  // The idea here is to force xerbla to be referenced so that we will
-  // link to our own version instead of the one provided by the BLAS
-  // library.  But octave_NaN should never be -1, so we should never
-  // actually call xerbla.
+  // The idea here is to force xerbla to be referenced so that we will link to
+  // our own version instead of the one provided by the BLAS library.  But
+  // octave_NaN should never be -1, so we should never actually call xerbla.
 
   if (octave_NaN == -1)
     F77_FUNC (xerbla, XERBLA) ("octave", 13 F77_CHAR_ARG_LEN (6));
@@ -758,6 +775,8 @@
 
   install_builtins ();
 
+  install_classdef ();
+
   for (std::list<std::string>::const_iterator it = command_line_path.begin ();
        it != command_line_path.end (); it++)
     load_path::set_command_line_path (*it);
@@ -771,19 +790,32 @@
   if (no_window_system)
     display_info::no_window_system ();
 
-  // Is input coming from a terminal?  If so, we are probably
-  // interactive.
+  // Is input coming from a terminal?  If so, we are probably interactive.
 
   // If stdin is not a tty, then we are reading commands from a pipe or
   // a redirected file.
   bool stdin_is_tty = gnulib::isatty (fileno (stdin));
 
-  interactive = (! embedded && stdin_is_tty
+  interactive = (! embedded && ! an_octave_program && stdin_is_tty
                  && gnulib::isatty (fileno (stdout)));
 
-  if (! interactive && ! forced_line_editing)
+  // Check if the user forced an interactive session.  If he
+  // unnecessarily did so, reset forced_interactive to false.
+  if (forced_interactive)
+    {
+      if (interactive)
+        forced_interactive = false;
+      else
+        interactive = true;
+    }
+
+  if ((! interactive || forced_interactive) && ! forced_line_editing)
     line_editing = false;
 
+  // Also skip start-up message unless session is interactive.
+  if (! interactive)
+    inhibit_startup_message = true;
+
   // Force default line editor if we don't want readline editing.
   if (! line_editing)
     command_editor::force_default_editor ();
@@ -821,19 +853,12 @@
   if (! inhibit_startup_message && reading_startup_message_printed)
     std::cout << std::endl;
 
-  // If there is an extra argument, see if it names a file to read.
-  // Additional arguments are taken as command line options for the
-  // script.
-
-  int last_arg_idx = optind;
-
-  int remaining_args = octave_cmdline_argc - last_arg_idx;
-
+  // Execute any code specified with --eval 'CODE'
   if (! code_to_eval.empty ())
     {
       int parse_status = execute_eval_option_code (code_to_eval);
 
-      if (! (persist || remaining_args > 0))
+      if (! persist)
         {
           quitting_gracefully = true;
 
@@ -841,6 +866,12 @@
         }
     }
 
+  // If there is an extra argument, see if it names a file to read.
+  // Additional arguments are taken as command line options for the script.
+
+  int last_arg_idx = optind;
+  int remaining_args = octave_cmdline_argc - last_arg_idx;
+
   if (remaining_args > 0)
     {
       // If we are running an executable script (#! /bin/octave) then
@@ -865,23 +896,22 @@
   // Now argv should have the full set of args.
   intern_argv (octave_cmdline_argc, octave_cmdline_argv);
 
-  // Force input to be echoed if not really interactive, but the user
-  // has forced interactive behavior.
+  // Force input to be echoed if not really interactive,
+  // but the user has forced interactive behavior.
 
-  if (! interactive && forced_interactive)
+  if (forced_interactive)
     {
       command_editor::blink_matching_paren (false);
 
       // FIXME: is this the right thing to do?
-
       Fecho_executing_commands (octave_value (ECHO_CMD_LINE));
     }
 
   if (octave_embedded)
     {
-      // FIXME: do we need to do any cleanup here before
-      // returning?  If we don't, what will happen to Octave functions
-      // that have been registered to execute with atexit, for example?
+      // FIXME: Do we need to do any cleanup here before returning?
+      // If we don't, what will happen to Octave functions that have been
+      // registered to execute with atexit, for example?
 
       return 1;
     }
@@ -919,17 +949,16 @@
   if (persist)
     return true;
 
-  // If stdin is not a tty, then assume we are reading commands from a
-  // pipe or a redirected file and the GUI should not start.  If this is
-  // not the case (for example, starting from a desktop "launcher" with
-  // no terminal) and you want to start the GUI, you may use the
-  // --force-gui option to start the GUI.
+  // If stdin is not a tty, then assume we are reading commands from a pipe or
+  // a redirected file and the GUI should not start.  If this is not the case
+  // (for example, starting from a desktop "launcher" with no terminal) and you
+  // want to start the GUI, you may use the --force-gui option to start the GUI.
 
   if (! gnulib::isatty (fileno (stdin)))
     return false;
 
-  // If we have code to eval or execute from a file, and we are going to
-  // exit immediately after executing it, don't start the gui.
+  // If we have code to eval or execute from a file, and we are going to exit
+  // immediately after executing it, don't start the gui.
 
   int last_arg_idx = optind;
   int remaining_args = octave_cmdline_argc - last_arg_idx;
@@ -940,8 +969,7 @@
   return true;
 }
 
-// Return int instead of bool because this function is declared
-// extern "C".
+// Return int instead of bool because this function is declared extern "C".
 
 int
 octave_starting_gui (void)
@@ -954,6 +982,7 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} isguirunning ()\n\
 Return true if Octave is running in GUI mode and false otherwise.\n\
+@seealso{have_window_system}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -974,8 +1003,9 @@
 DEFUN (argv, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} argv ()\n\
-Return the command line arguments passed to Octave.  For example,\n\
-if you invoked Octave using the command\n\
+Return the command line arguments passed to Octave.\n\
+\n\
+For example, if you invoked Octave using the command\n\
 \n\
 @example\n\
 octave --no-line-editing --silent\n\
@@ -985,9 +1015,9 @@
 @code{argv} would return a cell array of strings with the elements\n\
 @option{--no-line-editing} and @option{--silent}.\n\
 \n\
-If you write an executable Octave script, @code{argv} will return the\n\
-list of arguments passed to the script.  @xref{Executable Octave Programs},\n\
-for an example of how to create an executable Octave script.\n\
+If you write an executable Octave script, @code{argv} will return the list\n\
+of arguments passed to the script.  @xref{Executable Octave Programs}, for\n\
+an example of how to create an executable Octave script.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/octave.h
+++ b/libinterp/octave.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/module.mk
+++ b/libinterp/operators/module.mk
@@ -139,6 +139,7 @@
 
 ## Special rules for sources which must be built before rest of compilation.
 operators/ops.cc: $(OPERATORS_SRC) mkops
-	$(srcdir)/mkops $(OPERATORS_SRC) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mkops $(OPERATORS_SRC) > $@-t && \
 	mv $@-t $@
 
--- a/libinterp/operators/op-b-b.cc
+++ b/libinterp/operators/op-b-b.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,6 +33,7 @@
 #include "ov-float.h"
 #include "ov-re-mat.h"
 #include "ov-typeinfo.h"
+#include "ov-null-mat.h"
 #include "ops.h"
 #include "xdiv.h"
 #include "xpow.h"
@@ -92,4 +93,8 @@
   INSTALL_CATOP (octave_float_scalar, octave_bool, f_b);
 
   INSTALL_ASSIGNCONV (octave_bool, octave_bool, octave_bool_matrix);
+
+  INSTALL_ASSIGNCONV (octave_bool, octave_null_matrix, octave_bool_matrix);
+  INSTALL_ASSIGNCONV (octave_bool, octave_null_str, octave_bool_matrix);
+  INSTALL_ASSIGNCONV (octave_bool, octave_null_sq_str, octave_bool_matrix);
 }
--- a/libinterp/operators/op-b-bm.cc
+++ b/libinterp/operators/op-b-bm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-b-sbm.cc
+++ b/libinterp/operators/op-b-sbm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-bm-b.cc
+++ b/libinterp/operators/op-bm-b.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Cai Jianming
+Copyright (C) 2001-2015 Cai Jianming
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-bm-bm.cc
+++ b/libinterp/operators/op-bm-bm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-bm-sbm.cc
+++ b/libinterp/operators/op-bm-sbm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-cdm-cdm.cc
+++ b/libinterp/operators/op-cdm-cdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cdm-cm.cc
+++ b/libinterp/operators/op-cdm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cdm-cs.cc
+++ b/libinterp/operators/op-cdm-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cdm-dm.cc
+++ b/libinterp/operators/op-cdm-dm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cdm-m.cc
+++ b/libinterp/operators/op-cdm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cdm-s.cc
+++ b/libinterp/operators/op-cdm-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cell.cc
+++ b/libinterp/operators/op-cell.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-chm.cc
+++ b/libinterp/operators/op-chm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-class.cc
+++ b/libinterp/operators/op-class.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-cdm.cc
+++ b/libinterp/operators/op-cm-cdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-cm.cc
+++ b/libinterp/operators/op-cm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-cs.cc
+++ b/libinterp/operators/op-cm-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-dm.cc
+++ b/libinterp/operators/op-cm-dm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-m.cc
+++ b/libinterp/operators/op-cm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-pm.cc
+++ b/libinterp/operators/op-cm-pm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-s.cc
+++ b/libinterp/operators/op-cm-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cm-scm.cc
+++ b/libinterp/operators/op-cm-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-cm-sm.cc
+++ b/libinterp/operators/op-cm-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -106,8 +106,8 @@
                    const octave_sparse_matrix&);
 
   return octave_value
-         (elem_xpow ( SparseComplexMatrix (v1.complex_matrix_value ()),
-                      v2.sparse_matrix_value ()));
+         (elem_xpow (SparseComplexMatrix (v1.complex_matrix_value ()),
+                     v2.sparse_matrix_value ()));
 }
 
 DEFBINOP (el_ldiv, complex_matrix, sparse_matrix)
--- a/libinterp/operators/op-cs-cm.cc
+++ b/libinterp/operators/op-cs-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cs-cs.cc
+++ b/libinterp/operators/op-cs-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cs-m.cc
+++ b/libinterp/operators/op-cs-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cs-s.cc
+++ b/libinterp/operators/op-cs-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-cs-scm.cc
+++ b/libinterp/operators/op-cs-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-cs-sm.cc
+++ b/libinterp/operators/op-cs-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-dm-cdm.cc
+++ b/libinterp/operators/op-dm-cdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-cm.cc
+++ b/libinterp/operators/op-dm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-cs.cc
+++ b/libinterp/operators/op-dm-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-dm.cc
+++ b/libinterp/operators/op-dm-dm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-m.cc
+++ b/libinterp/operators/op-dm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-s.cc
+++ b/libinterp/operators/op-dm-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-scm.cc
+++ b/libinterp/operators/op-dm-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jason Riedy, Jaroslav Hajek
+Copyright (C) 2009-2015 Jason Riedy, Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -24,6 +24,15 @@
 #include <config.h>
 #endif
 
+#include "mx-cm-s.h"
+#include "mx-s-cm.h"
+
+#include "mx-dm-cs.h"
+#include "mx-cs-dm.h"
+
+#include "mx-m-cs.h"
+#include "mx-cs-m.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-dm-sm.cc
+++ b/libinterp/operators/op-dm-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jason Riedy, Jaroslav Hajek
+Copyright (C) 2009-2015 Jason Riedy, Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-dm-template.cc
+++ b/libinterp/operators/op-dm-template.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -24,6 +24,10 @@
 #include <config.h>
 #endif
 
+// FIXME: it might be nice to only include the declarations of the
+// operators that are actually needed instead of including all of them.
+#include "mx-ops.h"
+
 #include "ops.h"
 #include "xdiv.h"
 #include LINCLUDE
--- a/libinterp/operators/op-dms-template.cc
+++ b/libinterp/operators/op-dms-template.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-double-conv.cc
+++ b/libinterp/operators/op-double-conv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fcdm.cc
+++ b/libinterp/operators/op-fcdm-fcdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fcm.cc
+++ b/libinterp/operators/op-fcdm-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fcs.cc
+++ b/libinterp/operators/op-fcdm-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fdm.cc
+++ b/libinterp/operators/op-fcdm-fdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fm.cc
+++ b/libinterp/operators/op-fcdm-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcdm-fs.cc
+++ b/libinterp/operators/op-fcdm-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcm-fcdm.cc
+++ b/libinterp/operators/op-fcm-fcdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcm-fcm.cc
+++ b/libinterp/operators/op-fcm-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcm-fcs.cc
+++ b/libinterp/operators/op-fcm-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -52,7 +52,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_complex_array_value () / d);
@@ -97,7 +97,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_complex_array_value () / d);
--- a/libinterp/operators/op-fcm-fdm.cc
+++ b/libinterp/operators/op-fcm-fdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcm-fm.cc
+++ b/libinterp/operators/op-fcm-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcm-fs.cc
+++ b/libinterp/operators/op-fcm-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,8 +24,7 @@
 #include <config.h>
 #endif
 
-#include "mx-cm-s.h"
-#include "mx-cnda-s.h"
+#include "mx-fcnda-fs.h"
 
 #include "gripes.h"
 #include "oct-obj.h"
--- a/libinterp/operators/op-fcm-pm.cc
+++ b/libinterp/operators/op-fcm-pm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcn.cc
+++ b/libinterp/operators/op-fcn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fcs-fcm.cc
+++ b/libinterp/operators/op-fcs-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -69,7 +69,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_complex_array_value () / d);
@@ -102,7 +102,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_complex_array_value () / d);
--- a/libinterp/operators/op-fcs-fcs.cc
+++ b/libinterp/operators/op-fcs-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -73,7 +73,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_complex_value () / d);
@@ -87,7 +87,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_complex_value () / d);
@@ -108,7 +108,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_complex_value () / d);
@@ -122,7 +122,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_complex_value () / d);
@@ -132,16 +132,16 @@
 {
   CAST_BINOP_ARGS (const octave_float_complex&, const octave_float_complex&);
 
-  return (v1.float_complex_value () != static_cast<float>(0.0) &&
-          v2.float_complex_value () != static_cast<float>(0.0));
+  return (v1.float_complex_value () != 0.0f
+          && v2.float_complex_value () != 0.0f);
 }
 
 DEFBINOP (el_or, float_complex, float_complex)
 {
   CAST_BINOP_ARGS (const octave_float_complex&, const octave_float_complex&);
 
-  return (v1.float_complex_value () != static_cast<float>(0.0) ||
-          v2.float_complex_value () != static_cast<float>(0.0));
+  return (v1.float_complex_value () != 0.0f
+          || v2.float_complex_value () != 0.0f);
 }
 
 DEFNDCATOP_FN (fcs_fcs, float_complex, float_complex, float_complex_array,
--- a/libinterp/operators/op-fcs-fm.cc
+++ b/libinterp/operators/op-fcs-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,10 +24,8 @@
 #include <config.h>
 #endif
 
-#include "mx-cs-nda.h"
-#include "mx-nda-cs.h"
-#include "mx-cs-nda.h"
-#include "mx-nda-cs.h"
+#include "mx-fcs-fnda.h"
+#include "mx-fnda-fcs.h"
 
 #include "gripes.h"
 #include "oct-obj.h"
@@ -71,7 +69,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_array_value () / d);
@@ -103,7 +101,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_array_value () / d);
--- a/libinterp/operators/op-fcs-fs.cc
+++ b/libinterp/operators/op-fcs-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -64,7 +64,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_value () / d);
@@ -99,7 +99,7 @@
 
   FloatComplex d = v1.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v2.float_value () / d);
@@ -109,16 +109,14 @@
 {
   CAST_BINOP_ARGS (const octave_float_complex&, const octave_float_scalar&);
 
-  return (v1.float_complex_value () != static_cast<float>(0.0) &&
-          v2.float_value ());
+  return (v1.float_complex_value () != 0.0f && v2.float_value ());
 }
 
 DEFBINOP (el_or, float_complex, float)
 {
   CAST_BINOP_ARGS (const octave_float_complex&, const octave_float_scalar&);
 
-  return (v1.float_complex_value () != static_cast<float>(0.0) ||
-          v2.float_value ());
+  return (v1.float_complex_value () != 0.0f || v2.float_value ());
 }
 
 DEFNDCATOP_FN (fcs_fs, float_complex, float_scalar, float_complex_array,
--- a/libinterp/operators/op-fdm-fcdm.cc
+++ b/libinterp/operators/op-fdm-fcdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fdm-fcm.cc
+++ b/libinterp/operators/op-fdm-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fdm-fcs.cc
+++ b/libinterp/operators/op-fdm-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fdm-fdm.cc
+++ b/libinterp/operators/op-fdm-fdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fdm-fm.cc
+++ b/libinterp/operators/op-fdm-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fdm-fs.cc
+++ b/libinterp/operators/op-fdm-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-float-conv.cc
+++ b/libinterp/operators/op-float-conv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-fcdm.cc
+++ b/libinterp/operators/op-fm-fcdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-fcm.cc
+++ b/libinterp/operators/op-fm-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-fcs.cc
+++ b/libinterp/operators/op-fm-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -55,7 +55,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_array_value () / d);
@@ -99,7 +99,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_array_value () / d);
--- a/libinterp/operators/op-fm-fdm.cc
+++ b/libinterp/operators/op-fm-fdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-fm.cc
+++ b/libinterp/operators/op-fm-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-fs.cc
+++ b/libinterp/operators/op-fm-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fm-pm.cc
+++ b/libinterp/operators/op-fm-pm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fs-fcm.cc
+++ b/libinterp/operators/op-fs-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fs-fcs.cc
+++ b/libinterp/operators/op-fs-fcs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -50,7 +50,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_value () / d);
@@ -85,7 +85,7 @@
 
   FloatComplex d = v2.float_complex_value ();
 
-  if (d == static_cast<float>(0.0))
+  if (d == 0.0f)
     gripe_divide_by_zero ();
 
   return octave_value (v1.float_value () / d);
@@ -110,8 +110,7 @@
   CAST_BINOP_ARGS (const octave_float_scalar&, const octave_float_complex&);
 
   return octave_value (v1.float_scalar_value ()
-                       && (v2.float_complex_value ()
-                            != static_cast<float>(0.0)));
+                       && (v2.float_complex_value () != 0.0f));
 }
 
 DEFBINOP (el_or, float_scalar, float_complex)
@@ -119,8 +118,7 @@
   CAST_BINOP_ARGS (const octave_float_scalar&, const octave_float_complex&);
 
   return octave_value (v1.float_scalar_value ()
-                       || (v2.float_complex_value ()
-                            != static_cast<float>(0.0)));
+                       || (v2.float_complex_value () != 0.0f));
 }
 
 DEFNDCATOP_FN (fs_fcs, float_scalar, float_complex, float_array,
--- a/libinterp/operators/op-fs-fm.cc
+++ b/libinterp/operators/op-fs-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-fs-fs.cc
+++ b/libinterp/operators/op-fs-fs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-i16-i16.cc
+++ b/libinterp/operators/op-i16-i16.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-i16-nda.h"
 #include "mx-nda-i16.h"
 
+#include "mx-i16nda-fs.h"
+#include "mx-fs-i16nda.h"
+
+#include "mx-i16nda-fnda.h"
+#include "mx-fnda-i16nda.h"
+
+#include "mx-i16-fnda.h"
+#include "mx-fnda-i16.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-i32-i32.cc
+++ b/libinterp/operators/op-i32-i32.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-i32-nda.h"
 #include "mx-nda-i32.h"
 
+#include "mx-i32nda-fs.h"
+#include "mx-fs-i32nda.h"
+
+#include "mx-i32nda-fnda.h"
+#include "mx-fnda-i32nda.h"
+
+#include "mx-i32-fnda.h"
+#include "mx-fnda-i32.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-i64-i64.cc
+++ b/libinterp/operators/op-i64-i64.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-i64-nda.h"
 #include "mx-nda-i64.h"
 
+#include "mx-i64nda-fs.h"
+#include "mx-fs-i64nda.h"
+
+#include "mx-i64nda-fnda.h"
+#include "mx-fnda-i64nda.h"
+
+#include "mx-i64-fnda.h"
+#include "mx-fnda-i64.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-i8-i8.cc
+++ b/libinterp/operators/op-i8-i8.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-i8-nda.h"
 #include "mx-nda-i8.h"
 
+#include "mx-i8nda-fs.h"
+#include "mx-fs-i8nda.h"
+
+#include "mx-i8nda-fnda.h"
+#include "mx-fnda-i8nda.h"
+
+#include "mx-i8-fnda.h"
+#include "mx-fnda-i8.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-int-concat.cc
+++ b/libinterp/operators/op-int-concat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-int-conv.cc
+++ b/libinterp/operators/op-int-conv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-int.h
+++ b/libinterp/operators/op-int.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -224,7 +224,7 @@
  \
     octave_value retval = octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
     return retval; \
-  } \
+  }
 
 #define OCTAVE_SS_INT_BOOL_OPS(PFX, T1, T2, Z1, Z2) \
   DEFBINOP (PFX ## _el_and, T2, T2) \
@@ -1160,7 +1160,10 @@
 #define OCTAVE_INSTALL_INT_NULL_ASSIGN_OPS(TYPE) \
   INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_matrix, TYPE ## null_assign) \
   INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_str, TYPE ## null_assign) \
-  INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_sq_str, TYPE ## null_assign)
+  INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_sq_str, TYPE ## null_assign) \
+  INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_null_matrix, octave_ ## TYPE ## _matrix) \
+  INSTALL_ASSIGNCONV (octave_## TYPE ## _scalar, octave_null_str, octave_ ## TYPE ## _matrix) \
+  INSTALL_ASSIGNCONV (octave_## TYPE ## _scalar, octave_null_sq_str, octave_ ## TYPE ## _matrix)
 
 #define OCTAVE_INSTALL_INT_OPS(TYPE) \
   OCTAVE_INSTALL_SS_INT_OPS (TYPE) \
--- a/libinterp/operators/op-m-cdm.cc
+++ b/libinterp/operators/op-m-cdm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-cm.cc
+++ b/libinterp/operators/op-m-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-cs.cc
+++ b/libinterp/operators/op-m-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-dm.cc
+++ b/libinterp/operators/op-m-dm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-m.cc
+++ b/libinterp/operators/op-m-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-pm.cc
+++ b/libinterp/operators/op-m-pm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-s.cc
+++ b/libinterp/operators/op-m-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-m-scm.cc
+++ b/libinterp/operators/op-m-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-m-sm.cc
+++ b/libinterp/operators/op-m-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-pm-cm.cc
+++ b/libinterp/operators/op-pm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-fcm.cc
+++ b/libinterp/operators/op-pm-fcm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-fm.cc
+++ b/libinterp/operators/op-pm-fm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-m.cc
+++ b/libinterp/operators/op-pm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-pm.cc
+++ b/libinterp/operators/op-pm-pm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-scm.cc
+++ b/libinterp/operators/op-pm-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jason Riedy
+Copyright (C) 2009-2015 Jason Riedy
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-pm-sm.cc
+++ b/libinterp/operators/op-pm-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jason Riedy
+Copyright (C) 2009-2015 Jason Riedy
 
 This file is part of Octave.
 
@@ -32,49 +32,6 @@
 
 #include "ov-perm.h"
 #include "ov-re-sparse.h"
-#include "ov-bool-sparse.h"
-
-// Unary permutation ops, some cast to sparse
-
-//Avoid casting to a full matrix
-DEFUNOP_OP (uplus, perm_matrix, /* no-op */)
-
-// Not calling standard CAST_UNOP_ARG for these next two because a
-// dynamic_cast would fail.
-DEFUNOP (not, perm_matrix)
-{
-  // Obviously negation of a permutation matrix destroys sparsity
-  return octave_value ( ! a.bool_array_value ());
-}
-
-DEFUNOP (uminus, perm_matrix)
-{
-  return octave_value ( - a.sparse_matrix_value ());
-}
-
-// Most other logical operations cast to SparseBoolMatrix
-DEFBINOP (eq_pm, perm_matrix, perm_matrix)
-{
-  CAST_BINOP_ARGS (const octave_perm_matrix&, const octave_perm_matrix&);
-  return v1.sparse_bool_matrix_value () == v2.sparse_bool_matrix_value ();
-}
-DEFBINOP (ne_pm, perm_matrix, perm_matrix)
-{
-  CAST_BINOP_ARGS (const octave_perm_matrix&, const octave_perm_matrix&);
-  return v1.sparse_bool_matrix_value () != v2.sparse_bool_matrix_value ();
-}
-DEFBINOP (el_and_pm, perm_matrix, perm_matrix)
-{
-  CAST_BINOP_ARGS (const octave_perm_matrix&, const octave_perm_matrix&);
-  return mx_el_and(v1.sparse_bool_matrix_value (),
-                   v2.sparse_bool_matrix_value ());
-}
-DEFBINOP (el_or_pm,  perm_matrix, perm_matrix)
-{
-  CAST_BINOP_ARGS (const octave_perm_matrix&, const octave_perm_matrix&);
-  return mx_el_or(v1.sparse_bool_matrix_value (),
-                  v2.sparse_bool_matrix_value ());
-}
 
 // permutation matrix by sparse matrix ops
 
@@ -129,11 +86,6 @@
 void
 install_pm_sm_ops (void)
 {
-  INSTALL_UNOP (op_not, octave_perm_matrix, not);
-  INSTALL_UNOP (op_uplus, octave_perm_matrix, uplus);
-  INSTALL_UNOP (op_uminus, octave_perm_matrix, uminus);
-
-
   INSTALL_BINOP (op_mul, octave_perm_matrix, octave_sparse_matrix,
                  mul_pm_sm);
   INSTALL_BINOP (op_ldiv, octave_perm_matrix, octave_sparse_matrix,
@@ -142,9 +94,4 @@
                  mul_sm_pm);
   INSTALL_BINOP (op_div, octave_sparse_matrix, octave_perm_matrix,
                  div_sm_pm);
-
-  INSTALL_BINOP (op_eq, octave_perm_matrix, octave_perm_matrix, eq_pm);
-  INSTALL_BINOP (op_ne, octave_perm_matrix, octave_perm_matrix, ne_pm);
-  INSTALL_BINOP (op_el_and, octave_perm_matrix, octave_perm_matrix, el_and_pm);
-  INSTALL_BINOP (op_el_or,  octave_perm_matrix, octave_perm_matrix, el_or_pm);
 }
--- a/libinterp/operators/op-pm-template.cc
+++ b/libinterp/operators/op-pm-template.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -24,6 +24,10 @@
 #include <config.h>
 #endif
 
+// FIXME: it might be nice to only include the declarations of the
+// operators that are actually needed instead of including all of them.
+#include "mx-ops.h"
+
 #include "ov-perm.h"
 #include MINCLUDE
 #include "ops.h"
--- a/libinterp/operators/op-range.cc
+++ b/libinterp/operators/op-range.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-s-cm.cc
+++ b/libinterp/operators/op-s-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-s-cs.cc
+++ b/libinterp/operators/op-s-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-s-m.cc
+++ b/libinterp/operators/op-s-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-s-s.cc
+++ b/libinterp/operators/op-s-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-s-scm.cc
+++ b/libinterp/operators/op-s-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-s-sm.cc
+++ b/libinterp/operators/op-s-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sbm-b.cc
+++ b/libinterp/operators/op-sbm-b.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sbm-bm.cc
+++ b/libinterp/operators/op-sbm-bm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sbm-sbm.cc
+++ b/libinterp/operators/op-sbm-sbm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -49,7 +49,7 @@
 DEFUNOP (uminus, sparse_bool_matrix)
 {
   CAST_UNOP_ARG (const octave_sparse_bool_matrix&);
-  return octave_value ( - v.sparse_matrix_value ());
+  return octave_value (- v.sparse_matrix_value ());
 }
 
 DEFUNOP (transpose, sparse_bool_matrix)
--- a/libinterp/operators/op-scm-cm.cc
+++ b/libinterp/operators/op-scm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-scm-cs.cc
+++ b/libinterp/operators/op-scm-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-scm-m.cc
+++ b/libinterp/operators/op-scm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-scm-s.cc
+++ b/libinterp/operators/op-scm-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-scm-scm.cc
+++ b/libinterp/operators/op-scm-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-scm-sm.cc
+++ b/libinterp/operators/op-scm-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-cm.cc
+++ b/libinterp/operators/op-sm-cm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-cs.cc
+++ b/libinterp/operators/op-sm-cs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-m.cc
+++ b/libinterp/operators/op-sm-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-s.cc
+++ b/libinterp/operators/op-sm-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-scm.cc
+++ b/libinterp/operators/op-sm-scm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-sm-sm.cc
+++ b/libinterp/operators/op-sm-sm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/libinterp/operators/op-str-m.cc
+++ b/libinterp/operators/op-str-m.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-str-s.cc
+++ b/libinterp/operators/op-str-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-str-str.cc
+++ b/libinterp/operators/op-str-str.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-struct.cc
+++ b/libinterp/operators/op-struct.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/operators/op-ui16-ui16.cc
+++ b/libinterp/operators/op-ui16-ui16.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-ui16-nda.h"
 #include "mx-nda-ui16.h"
 
+#include "mx-ui16nda-fs.h"
+#include "mx-fs-ui16nda.h"
+
+#include "mx-ui16nda-fnda.h"
+#include "mx-fnda-ui16nda.h"
+
+#include "mx-ui16-fnda.h"
+#include "mx-fnda-ui16.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-ui32-ui32.cc
+++ b/libinterp/operators/op-ui32-ui32.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-ui32-nda.h"
 #include "mx-nda-ui32.h"
 
+#include "mx-ui32nda-fs.h"
+#include "mx-fs-ui32nda.h"
+
+#include "mx-ui32nda-fnda.h"
+#include "mx-fnda-ui32nda.h"
+
+#include "mx-ui32-fnda.h"
+#include "mx-fnda-ui32.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-ui64-ui64.cc
+++ b/libinterp/operators/op-ui64-ui64.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-ui64-nda.h"
 #include "mx-nda-ui64.h"
 
+#include "mx-ui64nda-fs.h"
+#include "mx-fs-ui64nda.h"
+
+#include "mx-ui64nda-fnda.h"
+#include "mx-fnda-ui64nda.h"
+
+#include "mx-ui64-fnda.h"
+#include "mx-fnda-ui64.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/op-ui8-ui8.cc
+++ b/libinterp/operators/op-ui8-ui8.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,15 @@
 #include "mx-ui8-nda.h"
 #include "mx-nda-ui8.h"
 
+#include "mx-ui8nda-fs.h"
+#include "mx-fs-ui8nda.h"
+
+#include "mx-ui8nda-fnda.h"
+#include "mx-fnda-ui8nda.h"
+
+#include "mx-ui8-fnda.h"
+#include "mx-fnda-ui8.h"
+
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov.h"
--- a/libinterp/operators/ops.h
+++ b/libinterp/operators/ops.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
--- a/libinterp/options-usage.h
+++ b/libinterp/options-usage.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -65,7 +65,8 @@
 #define PERSIST_OPTION 17
 #define TEXI_MACROS_FILE_OPTION 18
 #define TRADITIONAL_OPTION 19
-struct option long_opts[] = {
+struct option long_opts[] =
+{
   { "braindead",                no_argument,       0, TRADITIONAL_OPTION },
   { "built-in-docstrings-file", required_argument, 0, BUILT_IN_DOCSTRINGS_FILE_OPTION },
   { "debug",                    no_argument,       0, 'd' },
--- a/libinterp/parse-tree/lex.h
+++ b/libinterp/parse-tree/lex.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -261,16 +261,18 @@
       looking_at_matrix_or_assign_lhs (false),
       looking_for_object_index (false),
       looking_at_indirect_ref (false), parsing_class_method (false),
-      maybe_classdef_get_set_method (false), parsing_classdef (false),
+      parsing_classdef (false), maybe_classdef_get_set_method (false),
+      parsing_classdef_get_method (false),
+      parsing_classdef_set_method (false),
       quote_is_transpose (false), force_script (false),
       reading_fcn_file (false), reading_script_file (false),
       reading_classdef_file (false),
       input_line_number (1), current_input_column (1),
       bracketflag (0), braceflag (0),
       looping (0), defining_func (0), looking_at_function_handle (0),
-      block_comment_nesting_level (0), token_count (0),
-      current_input_line (), comment_text (), help_text (),
-      string_text (), string_line (0), string_column (0),
+      block_comment_nesting_level (0), command_arg_paren_count (0),
+      token_count (0), current_input_line (), comment_text (),
+      help_text (), string_text (), string_line (0), string_column (0),
       fcn_file_name (), fcn_file_full_name (), looking_at_object_index (),
       parsed_function_name (), pending_local_variables (),
       symtab_context (), nesting_level (), tokens ()
@@ -341,13 +343,19 @@
   // true means we are parsing a class method in function or classdef file.
   bool parsing_class_method;
 
+  // true means we are parsing a classdef file
+  bool parsing_classdef;
+
   // true means we are parsing a class method declaration line in a
   // classdef file and can accept a property get or set method name.
   // for example, "get.propertyname" is recognized as a function name.
   bool maybe_classdef_get_set_method;
 
-  // true means we are parsing a classdef file
-  bool parsing_classdef;
+  // TRUE means we are parsing a classdef get.method.
+  bool parsing_classdef_get_method;
+
+  // TRUE means we are parsing a classdef set.method.
+  bool parsing_classdef_set_method;
 
   // return transpose or start a string?
   bool quote_is_transpose;
@@ -389,6 +397,9 @@
   // nestng level for blcok comments.
   int block_comment_nesting_level;
 
+  // Parenthesis count for command argument parsing.
+  int command_arg_paren_count;
+
   // Count of tokens recognized by this lexer since initialized or
   // since the last reset.
   size_t token_count;
@@ -569,6 +580,8 @@
 
   int is_keyword_token (const std::string& s);
 
+  bool fq_identifier_contains_keyword (const std::string& s);
+
   bool whitespace_is_significant (void);
 
   void handle_number (void);
@@ -587,19 +600,21 @@
 
   int handle_meta_identifier (void);
 
+  int handle_fq_identifier (void);
+
   int handle_identifier (void);
 
   void maybe_warn_separator_insert (char sep);
 
   void gripe_single_quote_string (void);
 
-  void gripe_matlab_incompatible (const std::string& msg);
+  void gripe_language_extension (const std::string& msg);
 
-  void maybe_gripe_matlab_incompatible_comment (char c);
+  void maybe_gripe_language_extension_comment (char c);
 
-  void gripe_matlab_incompatible_continuation (void);
+  void gripe_language_extension_continuation (void);
 
-  void gripe_matlab_incompatible_operator (const std::string& op);
+  void gripe_language_extension_operator (const std::string& op);
 
   void push_token (token *);
 
@@ -648,17 +663,18 @@
 
   int handle_op (const char *pattern, int tok, bool bos = false);
 
-  int handle_incompatible_op (const char *pattern, int tok, bool bos = false);
+  int handle_language_extension_op (const char *pattern, int tok,
+                                    bool bos = false);
 
   bool maybe_unput_comma_before_unary_op (int tok);
 
   int handle_unary_op (int tok, bool bos = false);
 
-  int handle_incompatible_unary_op (int tok, bool bos = false);
+  int handle_language_extension_unary_op (int tok, bool bos = false);
 
   int handle_assign_op (const char *pattern, int tok);
 
-  int handle_incompatible_assign_op (const char *pattern, int tok);
+  int handle_language_extension_assign_op (const char *pattern, int tok);
 
   int handle_op_internal (int tok, bool bos, bool compat);
 
@@ -672,6 +688,8 @@
 
   int show_token (int tok);
 
+  void enable_fq_identifier (void);
+
 protected:
 
   std::stack<int> start_state_stack;
--- a/libinterp/parse-tree/lex.ll
+++ b/libinterp/parse-tree/lex.ll
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,6 +36,10 @@
 %option reentrant
 %option bison-bridge
 
+%option noyyalloc
+%option noyyrealloc
+%option noyyfree
+
 %top {
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -43,7 +47,7 @@
 
 }
 
-%s COMMAND_START
+%x COMMAND_START
 %s MATRIX_START
 
 %x INPUT_FILE_START
@@ -54,6 +58,8 @@
 %x DQ_STRING_START
 %x SQ_STRING_START
 
+%x FQ_IDENT_START
+
 %{
 
 #include <cctype>
@@ -167,14 +173,16 @@
     { \
       curr_lexer->lexer_debug (PATTERN); \
  \
-      if (curr_lexer->previous_token_may_be_command ()) \
+      if (curr_lexer->previous_token_may_be_command () \
+          && curr_lexer->space_follows_previous_token ()) \
         { \
           yyless (0); \
           curr_lexer->push_start_state (COMMAND_START); \
         } \
       else \
         { \
-          return curr_lexer->handle_incompatible_op (PATTERN, TOK, false); \
+          return curr_lexer->handle_language_extension_op (PATTERN, TOK, \
+                                                           false); \
         } \
     } \
   while (0)
@@ -202,7 +210,7 @@
           int tok \
             = (COMPAT \
                ? curr_lexer->handle_unary_op (TOK) \
-               : curr_lexer->handle_incompatible_unary_op (TOK)); \
+               : curr_lexer->handle_language_extension_unary_op (TOK)); \
  \
           if (tok < 0) \
             { \
@@ -243,6 +251,64 @@
     } \
   while (0)
 
+// When a command argument boundary is detected, push out the
+// current argument being built.  This one seems like a good
+// candidate for a function call.
+
+#define COMMAND_ARG_FINISH \
+  do \
+    { \
+      if (curr_lexer->string_text.empty ()) \
+        break; \
+ \
+      int retval = curr_lexer->handle_token (curr_lexer->string_text, \
+                                             SQ_STRING); \
+ \
+      curr_lexer->string_text = ""; \
+      curr_lexer->command_arg_paren_count = 0; \
+ \
+      yyless (0); \
+ \
+      return retval; \
+    } \
+  while (0)
+
+#define HANDLE_IDENTIFIER(pattern, get_set) \
+  do \
+    { \
+      curr_lexer->lexer_debug (pattern); \
+ \
+      int tok = curr_lexer->previous_token_value (); \
+ \
+      if (curr_lexer->whitespace_is_significant () \
+          && curr_lexer->space_follows_previous_token () \
+          && ! (tok == '[' || tok == '{' \
+                || curr_lexer->previous_token_is_binop ())) \
+        { \
+          yyless (0); \
+          unput (','); \
+        } \
+      else \
+        { \
+          if (! curr_lexer->looking_at_decl_list \
+              && curr_lexer->previous_token_may_be_command ()) \
+            { \
+              yyless (0); \
+              curr_lexer->push_start_state (COMMAND_START); \
+            } \
+          else \
+            { \
+              if (get_set) \
+                curr_lexer->maybe_classdef_get_set_method = false; \
+ \
+              int id_tok = curr_lexer->handle_identifier (); \
+ \
+              if (id_tok >= 0) \
+                return curr_lexer->count_token_internal (id_tok); \
+            } \
+        } \
+    } \
+  while (0)
 
 static bool Vdisplay_tokens = false;
 
@@ -251,11 +317,6 @@
 // Internal variable for lexer debugging state.
 static bool lexer_debug_flag = false;
 
-// Forward declarations for functions defined at the bottom of this
-// file that are needed inside the lexer actions.
-
-static std::string strip_trailing_whitespace (char *s);
-
 %}
 
 D       [0-9]
@@ -264,6 +325,7 @@
 Im      [iIjJ]
 CCHAR   [#%]
 IDENT   ([_$a-zA-Z][_$a-zA-Z0-9]*)
+FQIDENT ({IDENT}(\.{IDENT})*)
 EXPON   ([DdEe][+-]?{D}+)
 NUMBER  (({D}+\.?{D}*{EXPON}?)|(\.{D}+{EXPON}?)|(0[xX][0-9a-fA-F]+))
 
@@ -307,54 +369,129 @@
 // Help and other command-style functions.
 %}
 
-<COMMAND_START>{NL} {
-    curr_lexer->lexer_debug ("<COMMAND_START>{NL}");
+%{
+// Commands can be continued on a second line using the ellipsis.
+// If an argument is in construction, it is completed.
+%}
+
+<COMMAND_START>(\.\.\.){ANY_EXCEPT_NL}*{NL} {
+    curr_lexer->lexer_debug ("<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
+
+    COMMAND_ARG_FINISH;
+
+    curr_lexer->input_line_number++;
+    curr_lexer->current_input_column = 1;
+
+    HANDLE_STRING_CONTINUATION;
+  }
+
+%{
+// Commands normally end at the end of a line or a semicolon.
+%}
+
+<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL} {
+    curr_lexer->lexer_debug ("<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");
+
+    COMMAND_ARG_FINISH;
 
     curr_lexer->input_line_number++;
     curr_lexer->current_input_column = 1;
-
     curr_lexer->looking_for_object_index = false;
     curr_lexer->at_beginning_of_statement = true;
-
     curr_lexer->pop_start_state ();
 
-    return curr_lexer->count_token ('\n');
+    return curr_lexer->handle_token ('\n');
+  }
+
+<COMMAND_START>[\,\;] {
+    curr_lexer->lexer_debug ("<COMMAND_START>[\\,\\;]");
+
+    if (yytext[0] != ',' || curr_lexer->command_arg_paren_count == 0)
+      {
+        COMMAND_ARG_FINISH;
+        curr_lexer->looking_for_object_index = false;
+        curr_lexer->at_beginning_of_statement = true;
+        curr_lexer->pop_start_state ();
+        return curr_lexer->handle_token (yytext[0]);
+      }
+    else
+      curr_lexer->string_text += yytext;
+
+    curr_lexer->current_input_column += yyleng;
   }
 
-<COMMAND_START>[\;\,] {
-    curr_lexer->lexer_debug ("<COMMAND_START>[\\;\\,]");
-
-    curr_lexer->looking_for_object_index = false;
-    curr_lexer->at_beginning_of_statement = true;
-
-    curr_lexer->pop_start_state ();
-
-    if (strcmp (yytext, ",") == 0)
-      return curr_lexer->handle_token (',');
-    else
-      return curr_lexer->handle_token (';');
+%{
+// Unbalanced parentheses serve as pseudo-quotes: they are included in
+// the final argument string, but they cause parentheses and quotes to
+// be slurped into that argument as well.
+%}
+
+<COMMAND_START>[\(\[\{]* {
+    curr_lexer->lexer_debug ("<COMMAND_START>[\\(\\[\\{]+");
+
+    curr_lexer->command_arg_paren_count += yyleng;
+    curr_lexer->string_text += yytext;
+    curr_lexer->current_input_column += yyleng;
   }
 
+<COMMAND_START>[\)\]\}]* {
+   curr_lexer->lexer_debug ("<COMMAND_START>[\\)\\]\\}]+");
+
+   curr_lexer->command_arg_paren_count -= yyleng;
+   curr_lexer->string_text += yytext;
+   curr_lexer->current_input_column += yyleng;
+}
+
+%{
+// Handle quoted strings.  Quoted strings that are not separated by
+// whitespace from other argument text are combined with that previous
+// text.  For instance,
+//
+//   command 'text1'"text2"
+//
+// has a single argument text1text2, not two separate arguments.
+// That's why we must test to see if we are in command argument mode
+// when processing the end of a string.
+%}
+
 <COMMAND_START>[\"\'] {
     curr_lexer->lexer_debug ("<COMMAND_START>[\\\"\\']");
 
-    curr_lexer->at_beginning_of_statement = false;
-
-    curr_lexer->current_input_column++;
-
-    curr_lexer->begin_string (yytext[0] == '"'
-                              ? DQ_STRING_START : SQ_STRING_START);
+    if (curr_lexer->command_arg_paren_count == 0)
+      curr_lexer->begin_string (yytext[0] == '"'
+                                ? DQ_STRING_START : SQ_STRING_START);
+    else
+      curr_lexer->string_text += yytext;
+
+    curr_lexer->current_input_column += yyleng;
   }
 
-<COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}* {
-    curr_lexer->lexer_debug ("<COMMAND_START>[^#% \\t\\r\\n\\;\\,\\\"\\'][^ \\t\\r\\n\\;\\,]*{S}*");
-
-    std::string tok = strip_trailing_whitespace (yytext);
-
-    curr_lexer->looking_for_object_index = false;
-    curr_lexer->at_beginning_of_statement = false;
-
-    return curr_lexer->handle_token (tok, SQ_STRING);
+%{
+// In standard command argument processing, whitespace separates
+// arguments.  In the presence of unbalanced parentheses, it is
+// incorporated into the argument.
+%}
+
+<COMMAND_START>{S}* {
+    curr_lexer->lexer_debug ("<COMMAND_START>{S}*");
+
+    if (curr_lexer->command_arg_paren_count == 0)
+      COMMAND_ARG_FINISH;
+    else
+      curr_lexer->string_text += yytext;
+
+    curr_lexer->current_input_column += yyleng;
+  }
+
+%{
+// Everything else is slurped into the command arguments.
+%}
+
+<COMMAND_START>([\.]|[^#% \t\r\n\.\,\;\"\'\(\[\{\}\]\)]*) {
+    curr_lexer->lexer_debug ("<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");
+
+    curr_lexer->string_text += yytext;
+    curr_lexer->current_input_column += yyleng;
   }
 
 <MATRIX_START>{S}* {
@@ -370,7 +507,7 @@
     curr_lexer->current_input_column = 1;
 
     if (curr_lexer->nesting_level.is_paren ())
-      curr_lexer->gripe_matlab_incompatible ("bare newline inside parentheses");
+      curr_lexer->gripe_language_extension ("bare newline inside parentheses");
     else
       {
         int tok = curr_lexer->previous_token_value ();
@@ -702,17 +839,20 @@
 
     curr_lexer->pop_start_state ();
 
-    curr_lexer->looking_for_object_index = true;
-    curr_lexer->at_beginning_of_statement = false;
-
-    curr_lexer->push_token (new token (DQ_STRING,
-                                       curr_lexer->string_text,
-                                       curr_lexer->string_line,
-                                       curr_lexer->string_column));
-
-    curr_lexer->string_text = "";
-
-    return curr_lexer->count_token_internal (DQ_STRING);
+    if (curr_lexer->start_state() != COMMAND_START)
+      {
+        curr_lexer->looking_for_object_index = true;
+        curr_lexer->at_beginning_of_statement = false;
+
+        curr_lexer->push_token (new token (DQ_STRING,
+                                           curr_lexer->string_text,
+                                           curr_lexer->string_line,
+                                           curr_lexer->string_column));
+
+        curr_lexer->string_text = "";
+
+        return curr_lexer->count_token_internal (DQ_STRING);
+      }
   }
 
 <DQ_STRING_START>\\[0-7]{1,3} {
@@ -883,17 +1023,20 @@
 
     curr_lexer->pop_start_state ();
 
-    curr_lexer->looking_for_object_index = true;
-    curr_lexer->at_beginning_of_statement = false;
-
-    curr_lexer->push_token (new token (SQ_STRING,
-                                       curr_lexer->string_text,
-                                       curr_lexer->string_line,
-                                       curr_lexer->string_column));
-
-    curr_lexer->string_text = "";
-
-    return curr_lexer->count_token_internal (SQ_STRING);
+    if (curr_lexer->start_state() != COMMAND_START)
+      {
+        curr_lexer->looking_for_object_index = true;
+        curr_lexer->at_beginning_of_statement = false;
+
+        curr_lexer->push_token (new token (SQ_STRING,
+                                           curr_lexer->string_text,
+                                           curr_lexer->string_line,
+                                           curr_lexer->string_column));
+
+        curr_lexer->string_text = "";
+
+        return curr_lexer->count_token_internal (SQ_STRING);
+      }
   }
 
 <SQ_STRING_START>[^\'\n\r]+ {
@@ -915,6 +1058,35 @@
   }
 
 %{
+// Fully-qualified identifiers (used for classdef).
+%}
+
+<FQ_IDENT_START>{FQIDENT} {
+    curr_lexer->lexer_debug ("<FQ_IDENT_START>{FQIDENT}");
+    curr_lexer->pop_start_state ();
+
+    int id_tok = curr_lexer->handle_fq_identifier ();
+
+    if (id_tok >= 0)
+      {
+        curr_lexer->looking_for_object_index = true;
+
+        return curr_lexer->count_token_internal (id_tok);
+      }
+  }
+
+<FQ_IDENT_START>{S}+ {
+    curr_lexer->current_input_column += yyleng;
+
+    curr_lexer->mark_previous_token_trailing_space ();
+  }
+
+<FQ_IDENT_START>. {
+    yyless (0);
+    curr_lexer->pop_start_state ();
+  }
+
+%{
 // Imaginary numbers.
 %}
 
@@ -1035,46 +1207,25 @@
 
 %{
 // Identifiers.
+
+// Don't allow get and set to be recognized as keywords if they are
+// followed by "(".
 %}
 
+(set|get)/{S}*\( {
+    HANDLE_IDENTIFIER ("(set|get)/{S}*\\(", true);
+  }
+
 {IDENT} {
-    curr_lexer->lexer_debug ("{IDENT}");
-
-    int tok = curr_lexer->previous_token_value ();
-
-    if (curr_lexer->whitespace_is_significant ()
-        && curr_lexer->space_follows_previous_token ()
-        && ! (tok == '[' || tok == '{'
-              || curr_lexer->previous_token_is_binop ()))
-      {
-        yyless (0);
-        unput (',');
-      }
-    else
-      {
-        if (! curr_lexer->looking_at_decl_list
-            && curr_lexer->previous_token_may_be_command ())
-          {
-            yyless (0);
-            curr_lexer->push_start_state (COMMAND_START);
-          }
-        else
-          {
-            int id_tok = curr_lexer->handle_identifier ();
-
-            if (id_tok >= 0)
-              return curr_lexer->count_token_internal (id_tok);
-          }
-      }
+    HANDLE_IDENTIFIER ("{IDENT}", false);
   }
 
 %{
 // Superclass method identifiers.
 %}
 
-{IDENT}@{IDENT} |
-{IDENT}@{IDENT}.{IDENT} {
-    curr_lexer->lexer_debug ("{IDENT}@{IDENT}|{IDENT}@{IDENT}.{IDENT}");
+{IDENT}@{FQIDENT} {
+    curr_lexer->lexer_debug ("{IDENT}@{FQIDENT}");
 
     if (curr_lexer->previous_token_may_be_command ())
       {
@@ -1089,7 +1240,7 @@
           {
             curr_lexer->looking_for_object_index = true;
 
-            return curr_lexer->count_token_internal (SUPERCLASSREF);
+            return curr_lexer->count_token_internal (id_tok);
           }
       }
   }
@@ -1098,9 +1249,8 @@
 // Metaclass query
 %}
 
-\?{IDENT} |
-\?{IDENT}\.{IDENT} {
-    curr_lexer->lexer_debug ("\\?{IDENT}|\\?{IDENT}\\.{IDENT}");
+\?{FQIDENT} {
+    curr_lexer->lexer_debug ("\\?{FQIDENT}");
 
     if (curr_lexer->previous_token_may_be_command ()
         &&  curr_lexer->space_follows_previous_token ())
@@ -1116,7 +1266,7 @@
           {
             curr_lexer->looking_for_object_index = true;
 
-            return curr_lexer->count_token_internal (METAQUERY);
+            return curr_lexer->count_token_internal (id_tok);
           }
       }
   }
@@ -1170,7 +1320,7 @@
     if (curr_lexer->nesting_level.is_paren ())
       {
         curr_lexer->at_beginning_of_statement = false;
-        curr_lexer->gripe_matlab_incompatible
+        curr_lexer->gripe_language_extension
           ("bare newline inside parentheses");
       }
     else if (curr_lexer->nesting_level.none ()
@@ -1568,6 +1718,24 @@
 
 %%
 
+void *
+octave_alloc (yy_size_t size, yyscan_t)
+{
+  return malloc (size);
+}
+
+void *
+octave_realloc (void *ptr, yy_size_t size, yyscan_t)
+{
+  return realloc (ptr, size);
+}
+
+void
+octave_free (void *ptr, yyscan_t)
+{
+  free (ptr);
+}
+
 static void
 display_character (char c)
 {
@@ -1784,21 +1952,6 @@
 
 */
 
-// Used to delete trailing white space from tokens.
-
-static std::string
-strip_trailing_whitespace (char *s)
-{
-  std::string retval = s;
-
-  size_t pos = retval.find_first_of (" \t");
-
-  if (pos != std::string::npos)
-    retval.resize (pos);
-
-  return retval;
-}
-
 DEFUN (__display_tokens__, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __display_tokens__ ()\n\
@@ -1864,8 +2017,10 @@
   looking_for_object_index = false;
   looking_at_indirect_ref = false;
   parsing_class_method = false;
+  parsing_classdef = false;
   maybe_classdef_get_set_method = false;
-  parsing_classdef = false;
+  parsing_classdef_get_method = false;
+  parsing_classdef_set_method = false;
   force_script = false;
   reading_fcn_file = false;
   reading_script_file = false;
@@ -1889,6 +2044,7 @@
   fcn_file_full_name = "";
   looking_at_object_index.clear ();
   looking_at_object_index.push_front (false);
+  command_arg_paren_count = 0;
 
   while (! parsed_function_name.empty ())
     parsed_function_name.pop ();
@@ -2081,7 +2237,7 @@
   // input.
 
   if (! quitting_gracefully
-      && (interactive || forced_interactive)
+      && interactive
       && ! (reading_fcn_file
             || reading_classdef_file
             || reading_script_file
@@ -2266,20 +2422,6 @@
           at_beginning_of_statement = true;
           break;
 
-        case static_kw:
-          if ((reading_fcn_file || reading_script_file
-               || reading_classdef_file)
-              && ! fcn_file_full_name.empty ())
-            warning_with_id ("Octave:deprecated-keyword",
-                             "the 'static' keyword is obsolete and will be removed from a future version of Octave; please use 'persistent' instead; near line %d of file '%s'",
-                             input_line_number,
-                             fcn_file_full_name.c_str ());
-          else
-            warning_with_id ("Octave:deprecated-keyword",
-                             "the 'static' keyword is obsolete and will be removed from a future version of Octave; please use 'persistent' instead; near line %d",
-                             input_line_number);
-          // fall through ...
-
         case persistent_kw:
         case global_kw:
           looking_at_decl_list = true;
@@ -2292,10 +2434,9 @@
 
         case end_kw:
           if (inside_any_object_index ()
-              || (! reading_classdef_file
-                  && (defining_func
-                      && ! (looking_at_return_list
-                            || parsed_function_name.top ()))))
+              || (defining_func
+                  && ! (looking_at_return_list
+                        || parsed_function_name.top ())))
             {
               at_beginning_of_statement = previous_at_bos;
               return 0;
@@ -2480,6 +2621,34 @@
 }
 
 bool
+octave_base_lexer::fq_identifier_contains_keyword (const std::string& s)
+{
+  size_t p1 = 0;
+  size_t p2;
+
+  std::string s_part;
+
+  do
+    {
+      p2 = s.find ('.', p1);
+
+      if (p2 != std::string::npos)
+        {
+          s_part = s.substr (p1, p2 - p1);
+          p1 = p2 + 1;
+        }
+      else
+        s_part = s.substr (p1);
+
+      if (is_keyword_token (s_part))
+        return true;
+    }
+  while (p2 != std::string::npos);
+
+  return false;
+}
+
+bool
 octave_base_lexer::whitespace_is_significant (void)
 {
   return (nesting_level.is_bracket ()
@@ -2544,7 +2713,7 @@
 
   int offset = 1;
   if (yytxt[0] == '\\')
-    gripe_matlab_incompatible_continuation ();
+    gripe_language_extension_continuation ();
   else
     offset = 3;
 
@@ -2651,36 +2820,23 @@
 int
 octave_base_lexer::handle_superclass_identifier (void)
 {
-  std::string pkg;
-  char *yytxt = flex_yytext ();
-  std::string meth = strip_trailing_whitespace (yytxt);
+  std::string meth = flex_yytext ();
+
   size_t pos = meth.find ("@");
-  std::string cls = meth.substr (pos).substr (1);
-  meth = meth.substr (0, pos - 1);
-
-  pos = cls.find (".");
-  if (pos != std::string::npos)
-    {
-      pkg = cls.substr (pos).substr (1);
-      cls = cls.substr (0, pos - 1);
-    }
-
-  int kw_token = (is_keyword_token (meth) || is_keyword_token (cls)
-                  || is_keyword_token (pkg));
+  std::string cls = meth.substr (pos + 1);
+  meth = meth.substr (0, pos);
+
+  bool kw_token = (is_keyword_token (meth)
+                   || fq_identifier_contains_keyword (cls));
+
   if (kw_token)
     {
-      error ("method, class and package names may not be keywords");
+      error ("method, class, and package names may not be keywords");
       return LEXICAL_ERROR;
     }
 
-  symbol_table::scope_id sid = symtab_context.curr_scope ();
-
-  push_token (new token
-              (SUPERCLASSREF,
-               meth.empty () ? 0 : &(symbol_table::insert (meth, sid)),
-               cls.empty () ? 0 : &(symbol_table::insert (cls, sid)),
-               pkg.empty () ? 0 : &(symbol_table::insert (pkg, sid)),
-               input_line_number, current_input_column));
+  push_token (new token (SUPERCLASSREF, meth, cls,
+                         input_line_number, current_input_column));
 
   current_input_column += flex_yyleng ();
 
@@ -2690,37 +2846,41 @@
 int
 octave_base_lexer::handle_meta_identifier (void)
 {
-  std::string pkg;
-  char *yytxt = flex_yytext ();
-  std::string cls = strip_trailing_whitespace (yytxt).substr (1);
-  size_t pos = cls.find (".");
-
-  if (pos != std::string::npos)
+  std::string cls = std::string(flex_yytext ()).substr (1);
+
+  if (fq_identifier_contains_keyword (cls))
     {
-      pkg = cls.substr (pos).substr (1);
-      cls = cls.substr (0, pos - 1);
-    }
-
-  int kw_token = is_keyword_token (cls) || is_keyword_token (pkg);
-  if (kw_token)
-    {
-       error ("class and package names may not be keywords");
+      error ("class and package names may not be keywords");
       return LEXICAL_ERROR;
     }
 
-  symbol_table::scope_id sid = symtab_context.curr_scope ();
-
-  push_token (new token
-              (METAQUERY,
-               cls.empty () ? 0 : &(symbol_table::insert (cls, sid)),
-               pkg.empty () ? 0 : &(symbol_table::insert (pkg, sid)),
-               input_line_number, current_input_column));
+  push_token (new token (METAQUERY, cls, input_line_number,
+                         current_input_column));
 
   current_input_column += flex_yyleng ();
 
   return METAQUERY;
 }
 
+int
+octave_base_lexer::handle_fq_identifier (void)
+{
+  std::string tok = flex_yytext ();
+
+  if (fq_identifier_contains_keyword (tok))
+    {
+      error ("function, method, class, and package names may not be keywords");
+      return LEXICAL_ERROR;
+    }
+
+  push_token (new token (FQ_IDENT, tok, input_line_number,
+                         current_input_column));
+
+  current_input_column += flex_yyleng ();
+
+  return FQ_IDENT;
+}
+
 // Figure out exactly what kind of token to return when we have seen
 // an identifier.  Handles keywords.  Return -1 if the identifier
 // should be ignored.
@@ -2863,41 +3023,41 @@
 }
 
 void
-octave_base_lexer::gripe_matlab_incompatible (const std::string& msg)
+octave_base_lexer::gripe_language_extension (const std::string& msg)
 {
   std::string nm = fcn_file_full_name;
 
   if (nm.empty ())
-    warning_with_id ("Octave:matlab-incompatible",
-                     "potential Matlab compatibility problem: %s",
+    warning_with_id ("Octave:language-extension",
+                     "Octave language extension used: %s",
                      msg.c_str ());
   else
-    warning_with_id ("Octave:matlab-incompatible",
-                     "potential Matlab compatibility problem: %s near line %d offile %s",
+    warning_with_id ("Octave:language-extension",
+                     "Octave language extension used: %s near line %d offile %s",
                      msg.c_str (), input_line_number, nm.c_str ());
 }
 
 void
-octave_base_lexer::maybe_gripe_matlab_incompatible_comment (char c)
+octave_base_lexer::maybe_gripe_language_extension_comment (char c)
 {
   if (c == '#')
-    gripe_matlab_incompatible ("# used as comment character");
+    gripe_language_extension ("# used as comment character");
 }
 
 void
-octave_base_lexer::gripe_matlab_incompatible_continuation (void)
+octave_base_lexer::gripe_language_extension_continuation (void)
 {
-  gripe_matlab_incompatible ("\\ used as line continuation marker");
+  gripe_language_extension ("\\ used as line continuation marker");
 }
 
 void
-octave_base_lexer::gripe_matlab_incompatible_operator (const std::string& op)
+octave_base_lexer::gripe_language_extension_operator (const std::string& op)
 {
   std::string t = op;
   int n = t.length ();
   if (t[n-1] == '\n')
     t.resize (n-1);
-  gripe_matlab_incompatible (t + " used as operator");
+  gripe_language_extension (t + " used as operator");
 }
 
 void
@@ -3158,8 +3318,8 @@
 }
 
 int
-octave_base_lexer::handle_incompatible_op (const char *pattern, int tok,
-                                           bool bos)
+octave_base_lexer::handle_language_extension_op (const char *pattern, int tok,
+                                                 bool bos)
 {
   lexer_debug (pattern);
 
@@ -3197,7 +3357,7 @@
 }
 
 int
-octave_base_lexer::handle_incompatible_unary_op (int tok, bool bos)
+octave_base_lexer::handle_language_extension_unary_op (int tok, bool bos)
 {
   return maybe_unput_comma_before_unary_op (tok)
     ? -1 : handle_op_internal (tok, bos, false);
@@ -3207,7 +3367,7 @@
 octave_base_lexer::handle_op_internal (int tok, bool bos, bool compat)
 {
   if (! compat)
-    gripe_matlab_incompatible_operator (flex_yytext ());
+    gripe_language_extension_operator (flex_yytext ());
 
   push_token (new token (tok, input_line_number, current_input_column));
 
@@ -3278,6 +3438,12 @@
   return tok;
 }
 
+void
+octave_base_lexer::enable_fq_identifier (void)
+{
+  push_start_state (FQ_IDENT_START);
+}
+
 int
 octave_lexer::fill_flex_buffer (char *buf, unsigned max_size)
 {
@@ -3293,12 +3459,7 @@
   if (! input_buf.empty ())
     status = input_buf.copy_chunk (buf, max_size);
   else
-    {
-      status = YY_NULL;
-
-      if (! input_buf.at_eof ())
-        fatal_error ("octave_base_lexer::fill_flex_buffer failed");
-    }
+    status = YY_NULL;
 
   return status;
 }
@@ -3314,12 +3475,8 @@
   if (! input_buf.empty ())
     status = input_buf.copy_chunk (buf, max_size);
   else
-    {
-      status = YY_NULL;
-
-      if (! input_buf.at_eof ())
-        fatal_error ("octave_base_lexer::fill_flex_buffer failed");
-    }
+    status = YY_NULL;
 
   return status;
 }
+
--- a/libinterp/parse-tree/module.mk
+++ b/libinterp/parse-tree/module.mk
@@ -21,6 +21,7 @@
   parse-tree/pt-cbinop.h \
   parse-tree/pt-cell.h \
   parse-tree/pt-check.h \
+  parse-tree/pt-classdef.h \
   parse-tree/pt-cmd.h \
   parse-tree/pt-colon.h \
   parse-tree/pt-const.h \
@@ -29,6 +30,7 @@
   parse-tree/pt-except.h \
   parse-tree/pt-exp.h \
   parse-tree/pt-fcn-handle.h \
+  parse-tree/pt-funcall.h \
   parse-tree/pt-id.h \
   parse-tree/pt-idx.h \
   parse-tree/pt-jump.h \
@@ -52,6 +54,7 @@
   parse-tree/pt-cbinop.cc \
   parse-tree/pt-cell.cc \
   parse-tree/pt-check.cc \
+  parse-tree/pt-classdef.cc \
   parse-tree/pt-cmd.cc \
   parse-tree/pt-colon.cc \
   parse-tree/pt-const.cc \
@@ -60,6 +63,7 @@
   parse-tree/pt-except.cc \
   parse-tree/pt-exp.cc \
   parse-tree/pt-fcn-handle.cc \
+  parse-tree/pt-funcall.cc \
   parse-tree/pt-id.cc \
   parse-tree/pt-idx.cc \
   parse-tree/pt-jump.cc \
@@ -80,41 +84,16 @@
 ## will still be success and we will end up creating an empty
 ## oct-gperf.h file.
 parse-tree/oct-gperf.h: parse-tree/octave.gperf
-	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1
-	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t
-	mv $@-t $@
+	$(AM_V_GEN)rm -f $@-t $@t1 $@ && \
+	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1 && \
+	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t && \
+	mv $@-t $@ && \
 	rm -f $@-t1
 
+parse-tree/oct-parse.h: parse-tree/oct-parse.cc
+
 parse-tree/oct-parse.yy: parse-tree/oct-parse.in.yy
-	case "$(BISON_API_PREFIX_DECL_STYLE)" in \
-	  *api*) \
-	    case "$(BISON_API_PREFIX_DECL_STYLE)" in \
-	     *brace*) \
-	       api_prefix_decl='%define api.prefix {octave_}'; ;; \
-	     *) \
-	       api_prefix_decl='%define api.prefix "octave_"'; ;; \
-             esac; \
-            ;; \
-	  *name*) \
-	    case "$(BISON_API_PREFIX_DECL_STYLE)" in \
-	      *brace*) \
-	        api_prefix_decl='%name-prefix {octave_}'; ;; \
-	      *) \
-	        api_prefix_decl='%name-prefix="octave_"'; ;; \
-            esac; \
-          ;; \
-	esac; \
-	case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
-	  *quote*) quote='"' ;; \
-	  *) quote="" ;; \
-	esac; \
-	case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
-	  *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \
-	  *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \
-	esac; \
-	$(SED) -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \
-	       -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t
-	mv $@-t $@
+	$(AM_V_GEN)$(call subst-bison-api-decls,octave_)
 
 noinst_LTLIBRARIES += \
   parse-tree/libparse-tree.la \
--- a/libinterp/parse-tree/oct-parse.in.yy
+++ b/libinterp/parse-tree/oct-parse.in.yy
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 David Grundberg
 Copyright (C) 2009-2010 VZLU Prague
 
@@ -62,6 +62,7 @@
 #include "load-path.h"
 #include "oct-hist.h"
 #include "oct-map.h"
+#include "ov-classdef.h"
 #include "ov-fcn-handle.h"
 #include "ov-usr-fcn.h"
 #include "ov-null-mat.h"
@@ -70,6 +71,7 @@
 #include "parse.h"
 #include "pt-all.h"
 #include "pt-eval.h"
+#include "pt-funcall.h"
 #include "symtab.h"
 #include "token.h"
 #include "unwind-prot.h"
@@ -109,8 +111,7 @@
   do \
     { \
       yyerrok; \
-      if ((interactive || forced_interactive) \
-          && ! lexer.input_from_eval_string ()) \
+      if (interactive && ! lexer.input_from_eval_string ()) \
         YYACCEPT; \
       else \
         YYABORT; \
@@ -147,6 +148,8 @@
 
 %union
 {
+  int dummy_type;
+
   // The type of the basic tokens returned by the lexer.
   token *tok_val;
 
@@ -154,13 +157,15 @@
   octave_comment_list *comment_type;
 
   // Types for the nonterminals we generate.
-  char sep_type;
+  char punct_type;
   tree *tree_type;
   tree_matrix *tree_matrix_type;
   tree_cell *tree_cell_type;
   tree_expression *tree_expression_type;
   tree_constant *tree_constant_type;
   tree_fcn_handle *tree_fcn_handle_type;
+  tree_funcall *tree_funcall_type;
+  tree_function_def *tree_function_def_type;
   tree_anon_fcn_handle *tree_anon_fcn_handle_type;
   tree_identifier *tree_identifier_type;
   tree_index_expression *tree_index_expression_type;
@@ -180,7 +185,24 @@
   tree_statement *tree_statement_type;
   tree_statement_list *tree_statement_list_type;
   octave_user_function *octave_user_function_type;
-  void *dummy_type;
+
+  tree_classdef *tree_classdef_type;
+  tree_classdef_attribute* tree_classdef_attribute_type;
+  tree_classdef_attribute_list* tree_classdef_attribute_list_type;
+  tree_classdef_superclass* tree_classdef_superclass_type;
+  tree_classdef_superclass_list* tree_classdef_superclass_list_type;
+  tree_classdef_body* tree_classdef_body_type;
+  tree_classdef_property* tree_classdef_property_type;
+  tree_classdef_property_list* tree_classdef_property_list_type;
+  tree_classdef_properties_block* tree_classdef_properties_block_type;
+  tree_classdef_methods_list* tree_classdef_methods_list_type;
+  tree_classdef_methods_block* tree_classdef_methods_block_type;
+  tree_classdef_event* tree_classdef_event_type;
+  tree_classdef_events_list* tree_classdef_events_list_type;
+  tree_classdef_events_block* tree_classdef_events_block_type;
+  tree_classdef_enum* tree_classdef_enum_type;
+  tree_classdef_enum_list* tree_classdef_enum_list_type;
+  tree_classdef_enum_block* tree_classdef_enum_block_type;
 }
 
 // Tokens with line and column information.
@@ -207,22 +229,27 @@
 %token <tok_val> TRY CATCH
 %token <tok_val> GLOBAL PERSISTENT
 %token <tok_val> FCN_HANDLE
+%token <tok_val> CLASSDEF
 %token <tok_val> PROPERTIES METHODS EVENTS ENUMERATION
 %token <tok_val> METAQUERY
 %token <tok_val> SUPERCLASSREF
+%token <tok_val> FQ_IDENT
 %token <tok_val> GET SET
 %token <tok_val> FCN
 
 // Other tokens.
-%token END_OF_INPUT LEXICAL_ERROR
-%token INPUT_FILE CLASSDEF
+%token<dummy_type> END_OF_INPUT LEXICAL_ERROR
+%token<dummy_type> INPUT_FILE
 // %token VARARGIN VARARGOUT
 
+%token<dummy_type> '(' ')' '[' ']' '{' '}' '.' ',' ';' '@' '\n'
+
 // Nonterminals we construct.
-%type <tok_val> function_beg
-%type <comment_type> stash_comment classdef_beg
-%type <comment_type> properties_beg methods_beg events_beg enum_beg
-%type <sep_type> sep_no_nl opt_sep_no_nl nl opt_nl sep opt_sep
+%type <dummy_type> indirect_ref_op decl_param_init push_fcn_symtab
+%type <dummy_type> param_list_beg param_list_end stmt_begin parse_error
+%type <comment_type> stash_comment
+%type <tok_val> function_beg classdef_beg
+%type <punct_type> sep_no_nl opt_sep_no_nl nl opt_nl sep opt_sep
 %type <tree_type> input
 %type <tree_constant_type> string constant magic_colon
 %type <tree_anon_fcn_handle_type> anon_fcn_handle
@@ -233,18 +260,19 @@
 %type <tree_expression_type> primary_expr oper_expr power_expr
 %type <tree_expression_type> simple_expr colon_expr assign_expr expression
 %type <tree_identifier_type> identifier fcn_name magic_tilde
-%type <tree_identifier_type> superclass_identifier meta_identifier
-%type <octave_user_function_type> function1 function2 classdef1
+%type <tree_funcall_type> superclass_identifier meta_identifier
+%type <octave_user_function_type> function1 function2
 %type <tree_index_expression_type> word_list_cmd
 %type <tree_colon_expression_type> colon_expr1
 %type <tree_argument_list_type> arg_list word_list assign_lhs
 %type <tree_argument_list_type> cell_or_matrix_row
 %type <tree_parameter_list_type> param_list param_list1 param_list2
 %type <tree_parameter_list_type> return_list return_list1
-%type <tree_parameter_list_type> superclasses opt_superclasses
 %type <tree_command_type> command select_command loop_command
-%type <tree_command_type> jump_command except_command function
-%type <tree_command_type> file classdef
+%type <tree_command_type> jump_command except_command
+%type <tree_function_def_type> function
+%type <tree_classdef_type> classdef
+%type <tree_command_type> file
 %type <tree_if_command_type> if_command
 %type <tree_if_clause_type> elseif_clause else_clause
 %type <tree_if_command_list_type> if_cmd_list1 if_cmd_list
@@ -254,25 +282,27 @@
 %type <tree_decl_elt_type> decl2 param_list_elt
 %type <tree_decl_init_list_type> decl1
 %type <tree_decl_command_type> declaration
-%type <tree_statement_type> statement function_end classdef_end
+%type <tree_statement_type> statement function_end
 %type <tree_statement_list_type> simple_list simple_list1 list list1
 %type <tree_statement_list_type> opt_list
-// These types need to be specified.
-%type <dummy_type> attr
-%type <dummy_type> class_event
-%type <dummy_type> class_enum
-%type <dummy_type> class_property
-%type <dummy_type> properties_list
-%type <dummy_type> properties_block
-%type <dummy_type> methods_list
-%type <dummy_type> methods_block
-%type <dummy_type> opt_attr_list
-%type <dummy_type> attr_list
-%type <dummy_type> events_list
-%type <dummy_type> events_block
-%type <dummy_type> enum_list
-%type <dummy_type> enum_block
-%type <dummy_type> class_body
+%type <tree_classdef_attribute_type> attr
+%type <tree_classdef_attribute_list_type> attr_list opt_attr_list
+%type <tree_classdef_superclass_type> superclass
+%type <tree_classdef_superclass_list_type> superclass_list opt_superclass_list
+%type <tree_classdef_body_type> class_body
+%type <tree_classdef_property_type> class_property
+%type <tree_classdef_property_list_type> property_list
+%type <tree_classdef_properties_block_type> properties_block
+%type <tree_classdef_methods_list_type> methods_list
+%type <tree_classdef_methods_block_type> methods_block
+%type <tree_classdef_event_type> class_event
+%type <tree_classdef_events_list_type> events_list
+%type <tree_classdef_events_block_type> events_block
+%type <tree_classdef_enum_type> class_enum
+%type <tree_classdef_enum_list_type> enum_list
+%type <tree_classdef_enum_block_type> enum_block
+%type <tree_function_def_type> method_decl method
+%type <octave_user_function_type> method_decl1
 
 // Precedence and associativity.
 %right '=' ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ OR_EQ AND_EQ LSHIFT_EQ RSHIFT_EQ
@@ -297,10 +327,9 @@
 // cases (for example, a new semantic type is added but not handled
 // here).
 
-%destructor { } <sep_type>
 %destructor { } <tok_val>
+%destructor { } <punct_type>
 %destructor { } <comment_type>
-%destructor { } <dummy_type>
 %destructor { } <>
 
 %destructor { delete $$; } <tree_type>
@@ -309,6 +338,8 @@
 %destructor { delete $$; } <tree_expression_type>
 %destructor { delete $$; } <tree_constant_type>
 %destructor { delete $$; } <tree_fcn_handle_type>
+%destructor { delete $$; } <tree_funcall_type>
+%destructor { delete $$; } <tree_function_def_type>
 %destructor { delete $$; } <tree_anon_fcn_handle_type>
 %destructor { delete $$; } <tree_identifier_type>
 %destructor { delete $$; } <tree_index_expression_type>
@@ -329,11 +360,32 @@
 %destructor { delete $$; } <tree_statement_list_type>
 %destructor { delete $$; } <octave_user_function_type>
 
-%destructor {
-    warning_with_id
-      ("Octave:parser-destructor",
-       "possible memory leak in cleanup following parse error");
- } <*>
+%destructor { delete $$; } <tree_classdef_type>
+%destructor { delete $$; } <tree_classdef_attribute_type>
+%destructor { delete $$; } <tree_classdef_attribute_list_type>
+%destructor { delete $$; } <tree_classdef_superclass_type>
+%destructor { delete $$; } <tree_classdef_superclass_list_type>
+%destructor { delete $$; } <tree_classdef_body_type>
+%destructor { delete $$; } <tree_classdef_property_type>
+%destructor { delete $$; } <tree_classdef_property_list_type>
+%destructor { delete $$; } <tree_classdef_properties_block_type>
+%destructor { delete $$; } <tree_classdef_methods_list_type>
+%destructor { delete $$; } <tree_classdef_methods_block_type>
+%destructor { delete $$; } <tree_classdef_event_type>
+%destructor { delete $$; } <tree_classdef_events_list_type>
+%destructor { delete $$; } <tree_classdef_events_block_type>
+%destructor { delete $$; } <tree_classdef_enum_type>
+%destructor { delete $$; } <tree_classdef_enum_list_type>
+%destructor { delete $$; } <tree_classdef_enum_block_type>
+
+// Defining a generic destructor generates a warning if destructors are
+// already explicitly declared for all types.
+//
+// %destructor {
+//    warning_with_id
+//      ("Octave:parser-destructor",
+//       "possible memory leak in cleanup following parse error");
+// } <*>
 
 // Where to start.
 %start input
@@ -346,21 +398,30 @@
 
 input           : simple_list '\n'
                   {
+                    $$ = 0;
                     parser.stmt_list = $1;
                     YYACCEPT;
                   }
                 | simple_list END_OF_INPUT
                   {
+                    $$ = 0;
                     lexer.end_of_input = true;
                     parser.stmt_list = $1;
                     YYACCEPT;
                   }
                 | parse_error
-                  { ABORT_PARSE; }
+                  {
+                    $$ = 0;
+                    ABORT_PARSE;
+                  }
                 ;
 
 simple_list     : opt_sep_no_nl
-                  { $$ = 0; }
+                  {
+                    YYUSE ($1);
+
+                    $$ = 0;
+                  }
                 | simple_list1 opt_sep_no_nl
                   { $$ = parser.set_stmt_print_flag ($1, $2, false); }
                 ;
@@ -436,11 +497,20 @@
 
 superclass_identifier
                 : SUPERCLASSREF
-                  { $$ = new tree_identifier ($1->line (), $1->column ()); }
+                  {
+                    std::string method_nm = $1->superclass_method_name ();
+                    std::string class_nm = $1->superclass_class_name ();
+
+                    $$ = parser.make_superclass_ref (method_nm, class_nm);
+                  }
                 ;
 
 meta_identifier : METAQUERY
-                  { $$ = new tree_identifier ($1->line (), $1->column ()); }
+                  {
+                    std::string class_nm = $1->text ();
+
+                    $$ = parser.make_meta_class_query (class_nm);
+                  }
                 ;
 
 string          : DQ_STRING
@@ -552,6 +622,8 @@
 
 magic_colon     : ':'
                   {
+                    YYUSE ($1);
+
                     octave_value tmp (octave_value::magic_colon_t);
                     $$ = new tree_constant (tmp);
                   }
@@ -559,6 +631,8 @@
 
 magic_tilde     : EXPR_NOT
                   {
+                    YYUSE ($1);
+
                     $$ = new tree_black_hole ();
                   }
                 ;
@@ -587,7 +661,10 @@
                 ;
 
 indirect_ref_op : '.'
-                  { lexer.looking_at_indirect_ref = true; }
+                  {
+                    $$ = 0;
+                    lexer.looking_at_indirect_ref = true;
+                  }
                 ;
 
 oper_expr       : primary_expr
@@ -742,6 +819,8 @@
                   { $$ = new tree_colon_expression ($1); }
                 | colon_expr1 ':' oper_expr
                   {
+                    YYUSE ($2);
+
                     if (! ($$ = $1->append ($3)))
                       {
                         delete $1;
@@ -864,8 +943,6 @@
                   { $$ = $1; }
                 | file
                   { $$ = $1; }
-                | classdef
-                  { $$ = $1; }
                 ;
 
 // =====================
@@ -894,12 +971,17 @@
                 ;
 
 decl_param_init : // empty
-                { lexer.looking_at_initializer_expression = true; }
+                  {
+                    $$ = 0;
+                    lexer.looking_at_initializer_expression = true;
+                  }
 
 decl2           : identifier
                   { $$ = new tree_decl_elt ($1); }
                 | identifier '=' decl_param_init expression
                   {
+                    YYUSE ($2);
+
                     lexer.looking_at_initializer_expression = false;
                     $$ = new tree_decl_elt ($1, $4);
                   }
@@ -940,7 +1022,9 @@
 
 if_cmd_list1    : expression stmt_begin opt_sep opt_list
                   {
-                    $1->mark_braindead_shortcircuit (lexer.fcn_file_full_name);
+                    YYUSE ($3);
+
+                    $1->mark_braindead_shortcircuit ();
 
                     $$ = parser.start_if_command ($1, $4);
                   }
@@ -953,14 +1037,22 @@
 
 elseif_clause   : ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list
                   {
-                    $4->mark_braindead_shortcircuit (lexer.fcn_file_full_name);
+                    YYUSE ($3);
+                    YYUSE ($6);
+
+                    $4->mark_braindead_shortcircuit ();
 
                     $$ = parser.make_elseif_clause ($1, $4, $7, $2);
                   }
                 ;
 
 else_clause     : ELSE stash_comment opt_sep opt_list
-                  { $$ = new tree_if_clause ($4, $2); }
+                  {
+                    YYUSE ($1);
+                    YYUSE ($3);
+
+                    $$ = new tree_if_clause ($4, $2);
+                  }
                 ;
 
 // ================
@@ -969,6 +1061,8 @@
 
 switch_command  : SWITCH stash_comment expression opt_sep case_list END
                   {
+                    YYUSE ($4);
+
                     if (! ($$ = parser.finish_switch_command ($1, $3, $5, $6, $2)))
                       {
                         // finish_switch_command deleted $3 adn $5.
@@ -1000,11 +1094,19 @@
                 ;
 
 switch_case     : CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list
-                  { $$ = parser.make_switch_case ($1, $4, $7, $2); }
+                  {
+                    YYUSE ($3);
+                    YYUSE ($6);
+
+                    $$ = parser.make_switch_case ($1, $4, $7, $2);
+                  }
                 ;
 
 default_case    : OTHERWISE stash_comment opt_sep opt_list
                   {
+                    YYUSE ($1);
+                    YYUSE ($3);
+
                     $$ = new tree_switch_case ($4, $2);
                   }
                 ;
@@ -1015,7 +1117,9 @@
 
 loop_command    : WHILE stash_comment expression stmt_begin opt_sep opt_list END
                   {
-                    $3->mark_braindead_shortcircuit (lexer.fcn_file_full_name);
+                    YYUSE ($5);
+
+                    $3->mark_braindead_shortcircuit ();
 
                     if (! ($$ = parser.make_while_command ($1, $3, $6, $7, $2)))
                       {
@@ -1025,10 +1129,16 @@
                   }
                 | DO stash_comment opt_sep opt_list UNTIL expression
                   {
+                    YYUSE ($1);
+                    YYUSE ($3);
+
                     $$ = parser.make_do_until_command ($5, $4, $6, $2);
                   }
                 | FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
                   {
+                    YYUSE ($4);
+                    YYUSE ($7);
+
                     if (! ($$ = parser.make_for_command (FOR, $1, $3, $5, 0,
                                                          $8, $9, $2)))
                       {
@@ -1038,6 +1148,9 @@
                   }
                 | FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END
                   {
+                    YYUSE ($5);
+                    YYUSE ($8);
+
                     if (! ($$ = parser.make_for_command (FOR, $1, $4, $6, 0,
                                                          $9, $10, $2)))
                       {
@@ -1047,6 +1160,9 @@
                   }
                 | PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
                   {
+                    YYUSE ($4);
+                    YYUSE ($7);
+
                     if (! ($$ = parser.make_for_command (PARFOR, $1, $3, $5,
                                                          0, $8, $9, $2)))
                       {
@@ -1056,6 +1172,9 @@
                   }
                 | PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END
                   {
+                    YYUSE ($5);
+                    YYUSE ($10);
+
                     if (! ($$ = parser.make_for_command (PARFOR, $1, $4, $6,
                                                          $8, $11, $12, $2)))
                       {
@@ -1084,6 +1203,10 @@
 except_command  : UNWIND stash_comment opt_sep opt_list CLEANUP
                   stash_comment opt_sep opt_list END
                   {
+                    YYUSE ($3);
+                    YYUSE ($5);
+                    YYUSE ($7);
+
                     if (! ($$ = parser.make_unwind_command ($1, $4, $8, $9, $2, $6)))
                       {
                         // make_unwind_command deleted $4 and $8.
@@ -1093,6 +1216,10 @@
                 | TRY stash_comment opt_sep opt_list CATCH stash_comment
                   opt_sep opt_list END
                   {
+                    YYUSE ($3);
+                    YYUSE ($5);
+                    YYUSE ($7);
+
                     if (! ($$ = parser.make_try_command ($1, $4, $7, $8, $9, $2, $6)))
                       {
                         // make_try_command deleted $4 and $8.
@@ -1101,6 +1228,8 @@
                   }
                 | TRY stash_comment opt_sep opt_list END
                   {
+                    YYUSE ($3);
+
                     if (! ($$ = parser.make_try_command ($1, $4, 0, 0, $5, $2, 0)))
                       {
                         // make_try_command deleted $4.
@@ -1115,6 +1244,8 @@
 
 push_fcn_symtab : // empty
                   {
+                    $$ = 0;
+
                     parser.curr_fcn_depth++;
 
                     if (parser.max_fcn_depth < parser.curr_fcn_depth)
@@ -1143,6 +1274,7 @@
 
 param_list_beg  : '('
                   {
+                    $$ = 0;
                     lexer.looking_at_parameter_list = true;
 
                     if (lexer.looking_at_function_handle)
@@ -1156,6 +1288,7 @@
 
 param_list_end  : ')'
                   {
+                    $$ = 0;
                     lexer.looking_at_parameter_list = false;
                     lexer.looking_for_object_index = false;
                   }
@@ -1269,6 +1402,8 @@
 
 file            : INPUT_FILE opt_nl opt_list END_OF_INPUT
                   {
+                    YYUSE ($2);
+
                     if (lexer.reading_fcn_file)
                       {
                         // Delete the dummy statement_list we created
@@ -1291,6 +1426,16 @@
 
                     $$ = 0;
                   }
+                | INPUT_FILE opt_nl classdef opt_sep END_OF_INPUT
+                  {
+                    YYUSE ($2);
+                    YYUSE ($4);
+
+                    if (lexer.reading_classdef_file)
+                      parser.classdef_object = $3;
+
+                    $$ = 0;
+                  }
                 ;
 
 // ===================
@@ -1314,6 +1459,8 @@
                   }
                 | function_beg stash_comment return_list '=' function1
                   {
+                    YYUSE ($4);
+
                     $$ = parser.finish_function ($3, $5, $2, $1->line (),
                                                  $1->column ());
                     parser.recover_from_parsing_function ();
@@ -1331,14 +1478,20 @@
                   }
                 | GET '.' identifier
                   {
+                    YYUSE ($1);
+
                     lexer.parsed_function_name.top () = true;
                     lexer.maybe_classdef_get_set_method = false;
+                    lexer.parsing_classdef_get_method = true;
                     $$ = $3;
                   }
                 | SET '.' identifier
                   {
+                    YYUSE ($1);
+
                     lexer.parsed_function_name.top () = true;
                     lexer.maybe_classdef_get_set_method = false;
+                    lexer.parsing_classdef_set_method = true;
                     $$ = $3;
                   }
                 ;
@@ -1349,14 +1502,30 @@
 
                     delete $1;
 
+                    if (lexer.parsing_classdef_get_method)
+                      fname.insert (0, "get.");
+                    else if (lexer.parsing_classdef_set_method)
+                      fname.insert (0, "set.");
+
+                    lexer.parsing_classdef_get_method = false;
+                    lexer.parsing_classdef_set_method = false;
+
                     $$ = parser.frob_function (fname, $2);
                   }
                 ;
 
 function2       : param_list opt_sep opt_list function_end
-                  { $$ = parser.start_function ($1, $3, $4); }
+                  {
+                    YYUSE ($2);
+
+                    $$ = parser.start_function ($1, $3, $4);
+                  }
                 | opt_sep opt_list function_end
-                  { $$ = parser.start_function (0, $2, $3); }
+                  {
+                    YYUSE ($1);
+
+                    $$ = parser.start_function (0, $2, $3);
+                  }
                 ;
 
 function_end    : END
@@ -1408,158 +1577,358 @@
 // Classdef
 // ========
 
-classdef_beg    : CLASSDEF stash_comment
+classdef_beg    : CLASSDEF
                   {
-                    $$ = 0;
+                    if (! lexer.reading_classdef_file)
+                      {
+                        parser.bison_error ("classdef must appear inside a file containing only a class definition");
+                        YYABORT;
+                      }
+
                     lexer.parsing_classdef = true;
+                    $$ = $1;
                   }
                 ;
 
-classdef_end    : END
+classdef        : classdef_beg stash_comment opt_attr_list identifier opt_superclass_list opt_sep class_body opt_sep END
                   {
+                    YYUSE ($6);
+                    YYUSE ($8);
+
                     lexer.parsing_classdef = false;
 
-                    if (parser.end_token_ok ($1, token::classdef_end))
-                      $$ = parser.make_end ("endclassdef", false,
-                                            $1->line (), $1->column ());
-                    else
-                      ABORT_PARSE;
+                    if (! ($$ = parser.make_classdef ($1, $3, $4, $5, $7, $9, $2)))
+                      {
+                        // make_classdef deleted $3, $4, $5, and $7.
+                        ABORT_PARSE;
+                      }
                   }
-                ;
-
-classdef1       : classdef_beg opt_attr_list identifier opt_superclasses
-                  { $$ = 0; }
-                ;
-
-classdef        : classdef1 opt_sep class_body opt_sep stash_comment classdef_end
-                  { $$ = 0; }
+                | classdef_beg stash_comment opt_attr_list identifier opt_superclass_list opt_sep END
+                  {
+                    YYUSE ($6);
+
+                    lexer.parsing_classdef = false;
+
+                    if (! ($$ = parser.make_classdef ($1, $3, $4, $5, 0, $7, $2)))
+                      {
+                        // make_classdef deleted $3, $4, and $5.
+                        ABORT_PARSE;
+                      }
+                  }
                 ;
 
 opt_attr_list   : // empty
                   { $$ = 0; }
                 | '(' attr_list ')'
-                  { $$ = 0; }
+                  { $$ = $2; }
                 ;
 
 attr_list       : attr
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_attribute_list ($1); }
                 | attr_list ',' attr
-                  { $$ = 0; }
+                  {
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 ;
 
 attr            : identifier
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_attribute ($1); }
                 | identifier '=' decl_param_init expression
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    lexer.looking_at_initializer_expression = false;
+                    $$ = new tree_classdef_attribute ($1, $4);
+                  }
                 | EXPR_NOT identifier
-                  { $$ = 0; }
+                  {
+                    YYUSE ($1);
+
+                    $$ = new tree_classdef_attribute ($2, false);
+                  }
                 ;
 
-opt_superclasses
+opt_superclass_list
                 : // empty
                   { $$ = 0; }
-                | superclasses
-                  { $$ = 0; }
+                | superclass_list
+                  { $$ = $1; }
                 ;
 
-superclasses    : EXPR_LT identifier '.' identifier
-                  { $$ = 0; }
-                | EXPR_LT identifier
-                  { $$ = 0; }
-                | superclasses EXPR_AND identifier '.' identifier
-                  { $$ = 0; }
-                | superclasses EXPR_AND identifier
-                  { $$ = 0; }
+superclass_list : EXPR_LT
+                  {
+                    YYUSE ($1);
+
+                    lexer.enable_fq_identifier ();
+                  }
+                  superclass
+                  { $$ = new tree_classdef_superclass_list ($3); }
+                | superclass_list EXPR_AND
+                  {
+                    YYUSE ($2);
+
+                    lexer.enable_fq_identifier ();
+                  }
+                  superclass
+                  {
+                    $1->append ($4);
+                    $$ = $1;
+                  }
+                ;
+
+superclass      : FQ_IDENT
+                  { $$ = new tree_classdef_superclass ($1->text ()); }
                 ;
 
 class_body      : properties_block
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_body ($1); }
                 | methods_block
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_body ($1); }
                 | events_block
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_body ($1); }
                 | enum_block
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_body ($1); }
                 | class_body opt_sep properties_block
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 | class_body opt_sep methods_block
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 | class_body opt_sep events_block
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 | class_body opt_sep enum_block
-                  { $$ = 0; }
-                ;
-
-properties_beg  : PROPERTIES stash_comment
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 ;
 
 properties_block
-                : properties_beg opt_attr_list opt_sep properties_list opt_sep END
-                  { $$ = 0; }
+                : PROPERTIES stash_comment opt_attr_list opt_sep property_list opt_sep END
+                  {
+                    YYUSE ($4);
+                    YYUSE ($6);
+
+                    if (! ($$ = parser.make_classdef_properties_block
+                           ($1, $3, $5, $7, $2)))
+                      {
+                        // make_classdef_properties_block delete $3 and $5.
+                        ABORT_PARSE;
+                      }
+                  }
+                | PROPERTIES stash_comment opt_attr_list opt_sep END
+                  {
+                    YYUSE ($4);
+
+                    if (! ($$ = parser.make_classdef_properties_block
+                           ($1, $3, 0, $5, $2)))
+                      {
+                        // make_classdef_properties_block delete $3.
+                        ABORT_PARSE;
+                      }
+                  }
                 ;
 
-properties_list
+property_list
                 : class_property
-                  { $$ = 0; }
-                | properties_list opt_sep class_property
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_property_list ($1); }
+                | property_list opt_sep class_property
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 ;
 
 class_property  : identifier
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_property ($1); }
                 | identifier '=' decl_param_init expression ';'
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    lexer.looking_at_initializer_expression = false;
+                    $$ = new tree_classdef_property ($1, $4);
+                  }
                 ;
 
-methods_beg     : METHODS stash_comment
-                  { $$ = 0; }
+methods_block   : METHODS stash_comment opt_attr_list opt_sep methods_list opt_sep END
+                  {
+                    YYUSE ($4);
+                    YYUSE ($6);
+
+                    if (! ($$ = parser.make_classdef_methods_block
+                           ($1, $3, $5, $7, $2)))
+                      {
+                        // make_classdef_methods_block deleted $3 and $5.
+                        ABORT_PARSE;
+                      }
+                  }
+                | METHODS stash_comment opt_attr_list opt_sep END
+                  {
+                    YYUSE ($4);
+
+                    if (! ($$ = parser.make_classdef_methods_block
+                           ($1, $3, 0, $5, $2)))
+                      {
+                        // make_classdef_methods_block deleted $3.
+                        ABORT_PARSE;
+                      }
+                  }
                 ;
-
-methods_block   : methods_beg opt_attr_list opt_sep methods_list opt_sep END
-                  { $$ = 0; }
+                ;
+
+method_decl1    : identifier
+                  {
+                    if (! ($$ = parser.start_classdef_external_method ($1, 0)))
+                      ABORT_PARSE;
+                  }
+                | identifier param_list
+                  {
+                    if (! ($$ = parser.start_classdef_external_method ($1, $2)))
+                      ABORT_PARSE;
+                  }
                 ;
 
-methods_list    : function
-                  { $$ = 0; }
-                | methods_list opt_sep function
-                  { $$ = 0; }
+method_decl     : stash_comment method_decl1
+                  { $$ = parser.finish_classdef_external_method ($2, 0, $1); }
+                | stash_comment return_list '='
+                  {
+                    YYUSE ($3);
+
+                    lexer.defining_func++;
+                    lexer.parsed_function_name.push (false);
+                  }
+                  method_decl1
+                  {
+                    lexer.defining_func--;
+                    lexer.parsed_function_name.pop ();
+                    $$ = parser.finish_classdef_external_method ($5, $2, $1);
+                  }
+                ;
+
+method          : method_decl
+                  { $$ = $1; }
+                | function
+                  { $$ = $1; }
                 ;
 
-events_beg      : EVENTS stash_comment
-                  { $$ = 0; }
+methods_list    : method
+                  {
+                    octave_value fcn;
+                    if ($1)
+                      fcn = $1->function ();
+                    delete $1;
+                    $$ = new tree_classdef_methods_list (fcn);
+                  }
+                | methods_list opt_sep method
+                  {
+                    YYUSE ($2);
+
+                    octave_value fcn;
+                    if ($3)
+                      fcn = $3->function ();
+                    delete $3;
+
+                    $1->append (fcn);
+                    $$ = $1;
+                  }
                 ;
 
-events_block    : events_beg opt_attr_list opt_sep events_list opt_sep END
-                  { $$ = 0; }
+events_block    : EVENTS stash_comment opt_attr_list opt_sep events_list opt_sep END
+                  {
+                    YYUSE ($4);
+                    YYUSE ($6);
+
+                    if (! ($$ = parser.make_classdef_events_block
+                           ($1, $3, $5, $7, $2)))
+                      {
+                        // make_classdef_events_block deleted $3 and $5.
+                        ABORT_PARSE;
+                      }
+                  }
+                | EVENTS stash_comment opt_attr_list opt_sep END
+                  {
+                    YYUSE ($4);
+
+                    if (! ($$ = parser.make_classdef_events_block
+                           ($1, $3, 0, $5, $2)))
+                      {
+                        // make_classdef_events_block deleted $3.
+                        ABORT_PARSE;
+                      }
+                  }
                 ;
 
 events_list     : class_event
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_events_list ($1); }
                 | events_list opt_sep class_event
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 ;
 
 class_event     : identifier
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_event ($1); }
                 ;
 
-enum_beg        : ENUMERATION stash_comment
-                  { $$ = 0; }
-                ;
-
-enum_block      : enum_beg opt_attr_list opt_sep enum_list opt_sep END
-                  { $$ = 0; }
+enum_block      : ENUMERATION stash_comment opt_attr_list opt_sep enum_list opt_sep END
+                  {
+                    YYUSE ($4);
+                    YYUSE ($6);
+
+                    if (! ($$ = parser.make_classdef_enum_block
+                           ($1, $3, $5, $7, $2)))
+                      {
+                        // make_classdef_enum_block deleted $3 and $5.
+                        ABORT_PARSE;
+                      }
+                  }
+                | ENUMERATION stash_comment opt_attr_list opt_sep END
+                  {
+                    YYUSE ($4);
+
+                    if (! ($$ = parser.make_classdef_enum_block
+                           ($1, $3, 0, $5, $2)))
+                      {
+                        // make_classdef_enum_block deleted $3.
+                        ABORT_PARSE;
+                      }
+                  }
                 ;
 
 enum_list       : class_enum
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_enum_list ($1); }
                 | enum_list opt_sep class_enum
-                  { $$ = 0; }
+                  {
+                    YYUSE ($2);
+
+                    $1->append ($3);
+                    $$ = $1;
+                  }
                 ;
 
 class_enum      : identifier '(' expression ')'
-                  { $$ = 0; }
+                  { $$ = new tree_classdef_enum ($1, $3); }
                 ;
 
 // =============
@@ -1567,7 +1936,10 @@
 // =============
 
 stmt_begin      : // empty
-                  { lexer.at_beginning_of_statement = true; }
+                  {
+                    $$ = 0;
+                    lexer.at_beginning_of_statement = true;
+                  }
                 ;
 
 stash_comment   : // empty
@@ -1575,8 +1947,12 @@
                 ;
 
 parse_error     : LEXICAL_ERROR
-                  { parser.bison_error ("parse error"); }
+                  {
+                    $$ = 0;
+                    parser.bison_error ("parse error");
+                  }
                 | error
+                  { $$ = 0; }
                 ;
 
 sep_no_nl       : ','
@@ -1657,6 +2033,7 @@
   curr_fcn_depth = 0;
   primary_fcn_scope = -1;
   curr_class_name = "";
+  curr_package_name = "";
   function_scopes.clear ();
   primary_fcn_ptr  = 0;
   subfunction_names.clear ();
@@ -1682,6 +2059,18 @@
       error (fmt, type, "end", l, c);
       break;
 
+    case token::classdef_end:
+      error (fmt, type, "endclassdef", l, c);
+      break;
+
+    case token::enumeration_end:
+      error (fmt, type, "endenumeration", l, c);
+      break;
+
+    case token::events_end:
+      error (fmt, type, "endevents", l, c);
+      break;
+
     case token::for_end:
       error (fmt, type, "endfor", l, c);
       break;
@@ -1690,22 +2079,26 @@
       error (fmt, type, "endfunction", l, c);
       break;
 
-    case token::classdef_end:
-      error (fmt, type, "endclassdef", l, c);
-      break;
-
     case token::if_end:
       error (fmt, type, "endif", l, c);
       break;
 
+    case token::methods_end:
+      error (fmt, type, "endmethods", l, c);
+      break;
+
+    case token::parfor_end:
+      error (fmt, type, "endparfor", l, c);
+      break;
+
+    case token::properties_end:
+      error (fmt, type, "endproperties", l, c);
+      break;
+
     case token::switch_end:
       error (fmt, type, "endswitch", l, c);
       break;
 
-    case token::while_end:
-      error (fmt, type, "endwhile", l, c);
-      break;
-
     case token::try_catch_end:
       error (fmt, type, "end_try_catch", l, c);
       break;
@@ -1714,6 +2107,10 @@
       error (fmt, type, "end_unwind_protect", l, c);
       break;
 
+    case token::while_end:
+      error (fmt, type, "endwhile", l, c);
+      break;
+
     default:
       panic_impossible ();
       break;
@@ -1744,14 +2141,18 @@
           end_error ("classdef", ettype, l, c);
           break;
 
+        case token::enumeration_end:
+          end_error ("enumeration", ettype, l, c);
+          break;
+
+        case token::events_end:
+          end_error ("events", ettype, l, c);
+          break;
+
         case token::for_end:
           end_error ("for", ettype, l, c);
           break;
 
-        case token::enumeration_end:
-          end_error ("enumeration", ettype, l, c);
-          break;
-
         case token::function_end:
           end_error ("function", ettype, l, c);
           break;
@@ -1760,18 +2161,26 @@
           end_error ("if", ettype, l, c);
           break;
 
+        case token::methods_end:
+          end_error ("methods", ettype, l, c);
+          break;
+
         case token::parfor_end:
           end_error ("parfor", ettype, l, c);
           break;
 
+        case token::properties_end:
+          end_error ("properties", ettype, l, c);
+          break;
+
+        case token::switch_end:
+          end_error ("switch", ettype, l, c);
+          break;
+
         case token::try_catch_end:
           end_error ("try", ettype, l, c);
           break;
 
-        case token::switch_end:
-          end_error ("switch", ettype, l, c);
-          break;
-
         case token::unwind_protect_end:
           end_error ("unwind_protect", ettype, l, c);
           break;
@@ -1828,95 +2237,6 @@
     }
 }
 
-static tree_expression *
-fold (tree_binary_expression *e)
-{
-  tree_expression *retval = e;
-
-  unwind_protect frame;
-
-  frame.protect_var (error_state);
-  frame.protect_var (warning_state);
-
-  frame.protect_var (discard_error_messages);
-  frame.protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  tree_expression *op1 = e->lhs ();
-  tree_expression *op2 = e->rhs ();
-
-  if (op1->is_constant () && op2->is_constant ())
-    {
-      octave_value tmp = e->rvalue1 ();
-
-      if (! (error_state || warning_state))
-        {
-          tree_constant *tc_retval
-            = new tree_constant (tmp, op1->line (), op1->column ());
-
-          std::ostringstream buf;
-
-          tree_print_code tpc (buf);
-
-          e->accept (tpc);
-
-          tc_retval->stash_original_text (buf.str ());
-
-          delete e;
-
-          retval = tc_retval;
-        }
-    }
-
-  return retval;
-}
-
-static tree_expression *
-fold (tree_unary_expression *e)
-{
-  tree_expression *retval = e;
-
-  unwind_protect frame;
-
-  frame.protect_var (error_state);
-  frame.protect_var (warning_state);
-
-  frame.protect_var (discard_error_messages);
-  frame.protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  tree_expression *op = e->operand ();
-
-  if (op->is_constant ())
-    {
-      octave_value tmp = e->rvalue1 ();
-
-      if (! (error_state || warning_state))
-        {
-          tree_constant *tc_retval
-            = new tree_constant (tmp, op->line (), op->column ());
-
-          std::ostringstream buf;
-
-          tree_print_code tpc (buf);
-
-          e->accept (tpc);
-
-          tc_retval->stash_original_text (buf.str ());
-
-          delete e;
-
-          retval = tc_retval;
-        }
-    }
-
-  return retval;
-}
-
 // Finish building a range.
 
 tree_expression *
@@ -1972,8 +2292,6 @@
           e->preserve_base ();
           delete e;
 
-          // FIXME -- need to attempt constant folding here
-          // too (we need a generic way to do that).
           retval = base;
         }
     }
@@ -2186,10 +2504,7 @@
   int l = tok_val->line ();
   int c = tok_val->column ();
 
-  tree_binary_expression *e
-    = maybe_compound_binary_expression (op1, op2, l, c, t);
-
-  return fold (e);
+  return maybe_compound_binary_expression (op1, op2, l, c, t);
 }
 
 // Build a boolean expression.
@@ -2218,10 +2533,7 @@
   int l = tok_val->line ();
   int c = tok_val->column ();
 
-  tree_boolean_expression *e
-    = new tree_boolean_expression (op1, op2, l, c, t);
-
-  return fold (e);
+  return new tree_boolean_expression (op1, op2, l, c, t);
 }
 
 // Build a prefix expression.
@@ -2262,10 +2574,7 @@
   int l = tok_val->line ();
   int c = tok_val->column ();
 
-  tree_prefix_expression *e
-    = new tree_prefix_expression (op1, l, c, t);
-
-  return fold (e);
+  return new tree_prefix_expression (op1, l, c, t);
 }
 
 // Build a postfix expression.
@@ -2302,10 +2611,7 @@
   int l = tok_val->line ();
   int c = tok_val->column ();
 
-  tree_postfix_expression *e
-    = new tree_postfix_expression (op1, l, c, t);
-
-  return fold (e);
+  return new tree_postfix_expression (op1, l, c, t);
 }
 
 // Build an unwind-protect command.
@@ -2463,6 +2769,8 @@
 
   if (end_token_ok (end_tok, parfor ? token::parfor_end : token::for_end))
     {
+      expr->mark_as_for_cmd_expr ();
+
       octave_comment_list *tc = lexer.comment_buf.get_comment ();
 
       lexer.looping--;
@@ -2999,6 +3307,272 @@
   lexer.looking_at_parameter_list = false;
 }
 
+tree_funcall *
+octave_base_parser::make_superclass_ref (const std::string& method_nm,
+                                         const std::string& class_nm)
+{
+  octave_value_list args;
+
+  args(1) = class_nm;
+  args(0) = method_nm;
+
+  octave_value fcn
+    = symbol_table::find_built_in_function ("__superclass_reference__");
+
+  return new tree_funcall (fcn, args);
+}
+
+tree_funcall *
+octave_base_parser::make_meta_class_query (const std::string& class_nm)
+{
+  octave_value_list args;
+
+  args(0) = class_nm;
+
+  octave_value fcn
+    = symbol_table::find_built_in_function ("__meta_class_query__");
+
+  return new tree_funcall (fcn, args);
+}
+
+// A CLASSDEF block defines a class that has a constructor and other
+// methods, but it is not an executable command.  Parsing the block
+// makes some changes in the symbol table (inserting the constructor
+// and methods, and adding to the list of known objects) and creates
+// a parse tree containing meta information about the class.
+
+tree_classdef *
+octave_base_parser::make_classdef (token *tok_val,
+                                   tree_classdef_attribute_list *a,
+                                   tree_identifier *id,
+                                   tree_classdef_superclass_list *sc,
+                                   tree_classdef_body *body, token *end_tok,
+                                   octave_comment_list *lc)
+{
+  tree_classdef *retval = 0;
+
+  std::string cls_name = id->name ();
+
+  std::string nm = lexer.fcn_file_name;
+
+  size_t pos = nm.find_last_of (file_ops::dir_sep_chars ());
+
+  if (pos != std::string::npos)
+    nm = lexer.fcn_file_name.substr (pos+1);
+
+  if (nm != cls_name)
+    bison_error ("invalid classdef definition, the class name must match the file name");
+  else if (end_token_ok (end_tok, token::classdef_end))
+    {
+      octave_comment_list *tc = lexer.comment_buf.get_comment ();
+
+      int l = tok_val->line ();
+      int c = tok_val->column ();
+
+      if (! body)
+        body = new tree_classdef_body ();
+
+      retval = new tree_classdef (a, id, sc, body, lc, tc,
+                                  curr_package_name, l, c);
+    }
+
+  if (! retval)
+    {
+      delete a;
+      delete id;
+      delete sc;
+      delete body;
+    }
+
+  return retval;
+}
+
+tree_classdef_properties_block *
+octave_base_parser::make_classdef_properties_block (token *tok_val,
+                                                    tree_classdef_attribute_list *a,
+                                                    tree_classdef_property_list *plist,
+                                                    token *end_tok,
+                                                    octave_comment_list *lc)
+{
+  tree_classdef_properties_block *retval = 0;
+
+  if (end_token_ok (end_tok, token::properties_end))
+    {
+      octave_comment_list *tc = lexer.comment_buf.get_comment ();
+
+      int l = tok_val->line ();
+      int c = tok_val->column ();
+
+      if (! plist)
+        plist = new tree_classdef_property_list ();
+
+      retval = new tree_classdef_properties_block (a, plist, lc, tc, l, c);
+    }
+  else
+    {
+      delete a;
+      delete plist;
+    }
+
+  return retval;
+}
+
+tree_classdef_methods_block *
+octave_base_parser::make_classdef_methods_block (token *tok_val,
+                                                 tree_classdef_attribute_list *a,
+                                                 tree_classdef_methods_list *mlist,
+                                                 token *end_tok,
+                                                 octave_comment_list *lc)
+{
+  tree_classdef_methods_block *retval = 0;
+
+  if (end_token_ok (end_tok, token::methods_end))
+    {
+      octave_comment_list *tc = lexer.comment_buf.get_comment ();
+
+      int l = tok_val->line ();
+      int c = tok_val->column ();
+
+      if (! mlist)
+        mlist = new tree_classdef_methods_list ();
+
+      retval = new tree_classdef_methods_block (a, mlist, lc, tc, l, c);
+    }
+  else
+    {
+      delete a;
+      delete mlist;
+    }
+
+  return retval;
+}
+
+tree_classdef_events_block *
+octave_base_parser::make_classdef_events_block (token *tok_val,
+                                                tree_classdef_attribute_list *a,
+                                                tree_classdef_events_list *elist,
+                                                token *end_tok,
+                                                octave_comment_list *lc)
+{
+  tree_classdef_events_block *retval = 0;
+
+  if (end_token_ok (end_tok, token::events_end))
+    {
+      octave_comment_list *tc = lexer.comment_buf.get_comment ();
+
+      int l = tok_val->line ();
+      int c = tok_val->column ();
+
+      if (! elist)
+        elist = new tree_classdef_events_list ();
+
+      retval = new tree_classdef_events_block (a, elist, lc, tc, l, c);
+    }
+  else
+    {
+      delete a;
+      delete elist;
+    }
+
+  return retval;
+}
+
+tree_classdef_enum_block *
+octave_base_parser::make_classdef_enum_block (token *tok_val,
+                                              tree_classdef_attribute_list *a,
+                                              tree_classdef_enum_list *elist,
+                                              token *end_tok,
+                                              octave_comment_list *lc)
+{
+  tree_classdef_enum_block *retval = 0;
+
+  if (end_token_ok (end_tok, token::enumeration_end))
+    {
+      octave_comment_list *tc = lexer.comment_buf.get_comment ();
+
+      int l = tok_val->line ();
+      int c = tok_val->column ();
+
+      if (! elist)
+        elist = new tree_classdef_enum_list ();
+
+      retval = new tree_classdef_enum_block (a, elist, lc, tc, l, c);
+    }
+  else
+    {
+      delete a;
+      delete elist;
+    }
+
+  return retval;
+}
+
+octave_user_function*
+octave_base_parser::start_classdef_external_method (tree_identifier *id,
+                                                    tree_parameter_list *pl)
+{
+  octave_user_function* retval = 0;
+
+  // External methods are only allowed within @-folders. In this case,
+  // curr_class_name will be non-empty.
+
+  if (! curr_class_name.empty ())
+    {
+
+      std::string mname = id->name ();
+
+      // Methods that cannot be declared outside the classdef file:
+      // - methods with '.' character (e.g. property accessors)
+      // - class constructor
+      // - `delete'
+
+      if (mname.find_first_of (".") == std::string::npos
+          && mname != "delete"
+          && mname != curr_class_name)
+        {
+          // Create a dummy function that is used until the real method
+          // is loaded.
+
+          retval = new octave_user_function (-1, pl);
+
+          retval->stash_function_name (mname);
+
+          int l = id->line ();
+          int c = id->column ();
+
+          retval->stash_fcn_location (l, c);
+        }
+      else
+        bison_error ("invalid external method declaration, an external "
+                     "method cannot be the class constructor, `delete' "
+                     "or have a dot (.) character in its name");
+    }
+  else
+    bison_error ("external methods are only allowed in @-folders");
+
+  if (! retval)
+    delete id;
+
+  return retval;
+}
+
+tree_function_def *
+octave_base_parser::finish_classdef_external_method (octave_user_function *fcn,
+                                                     tree_parameter_list *ret_list,
+                                                     octave_comment_list *cl)
+{
+  if (ret_list)
+    fcn->define_ret_list (ret_list);
+
+  if (cl)
+    fcn->stash_leading_comment (cl);
+
+  int l = fcn->beginning_line ();
+  int c = fcn->beginning_column ();
+
+  return new tree_function_def (fcn, l, c);
+}
+
 // Make an index expression.
 
 tree_index_expression *
@@ -3021,7 +3595,8 @@
   int l = expr->line ();
   int c = expr->column ();
 
-  expr->mark_postfix_indexed ();
+  if (! expr->is_postfix_indexed ())
+    expr->set_postfix_index (type);
 
   if (expr->is_index_expression ())
     {
@@ -3048,6 +3623,9 @@
   int l = expr->line ();
   int c = expr->column ();
 
+  if (! expr->is_postfix_indexed ())
+    expr->set_postfix_index ('.');
+
   if (expr->is_index_expression ())
     {
       tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
@@ -3067,13 +3645,17 @@
 // Make an indirect reference expression with dynamic field name.
 
 tree_index_expression *
-octave_base_parser::make_indirect_ref (tree_expression *expr, tree_expression *elt)
+octave_base_parser::make_indirect_ref (tree_expression *expr,
+                                       tree_expression *elt)
 {
   tree_index_expression *retval = 0;
 
   int l = expr->line ();
   int c = expr->column ();
 
+  if (! expr->is_postfix_indexed ())
+    expr->set_postfix_index ('.');
+
   if (expr->is_index_expression ())
     {
       tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
@@ -3461,6 +4043,7 @@
 static octave_function *
 parse_fcn_file (const std::string& full_file, const std::string& file,
                 const std::string& dispatch_type,
+                const std::string& package_name,
                 bool require_file, bool force_script, bool autoload,
                 bool relative_lookup, const std::string& warn_for)
 {
@@ -3484,16 +4067,17 @@
   if (! full_file.empty ())
     ffile = gnulib::fopen (full_file.c_str (), "rb");
 
-  frame.add_fcn (safe_fclose, ffile);
-
   if (ffile)
     {
+      frame.add_fcn (safe_fclose, ffile);
+
       // octave_base_parser constructor sets this for us.
       frame.protect_var (LEXER);
 
       octave_parser parser (ffile);
 
       parser.curr_class_name = dispatch_type;
+      parser.curr_package_name = package_name;
       parser.autoloading = autoload;
       parser.fcn_file_from_relative_lookup = relative_lookup;
 
@@ -3508,20 +4092,37 @@
 
       fcn_ptr = parser.primary_fcn_ptr;
 
-      if (fcn_ptr)
+      if (status == 0)
         {
-          fcn_ptr->maybe_relocate_end ();
-
-          if (parser.parsing_subfunctions)
+          if (parser.lexer.reading_classdef_file
+              && parser.classdef_object)
             {
-              if (! parser.endfunction_found)
-                parser.subfunction_names.reverse ();
-
-              fcn_ptr->stash_subfunction_names (parser.subfunction_names);
+              // Convert parse tree for classdef object to
+              // meta.class info (and stash it in the symbol
+              // table?).  Return pointer to constructor?
+
+              if (fcn_ptr)
+                panic_impossible ();
+
+              bool is_at_folder = ! dispatch_type.empty ();
+
+              fcn_ptr =
+                parser.classdef_object->make_meta_class (is_at_folder);
+            }
+          else if (fcn_ptr)
+            {
+              fcn_ptr->maybe_relocate_end ();
+
+              if (parser.parsing_subfunctions)
+                {
+                  if (! parser.endfunction_found)
+                    parser.subfunction_names.reverse ();
+
+                  fcn_ptr->stash_subfunction_names (parser.subfunction_names);
+                }
             }
         }
-
-      if (status != 0)
+      else
         error ("parse error while reading file %s", full_file.c_str ());
     }
   else if (require_file)
@@ -3562,7 +4163,8 @@
       symbol_found = true;
 
       octave_function *fcn
-        = parse_fcn_file (full_file, file, "", true, false, false, false, "");
+        = parse_fcn_file (full_file, file, "", "", true, false, false, false,
+                          "");
 
       if (fcn)
         {
@@ -3626,6 +4228,7 @@
 octave_function *
 load_fcn_from_file (const std::string& file_name, const std::string& dir_name,
                     const std::string& dispatch_type,
+                    const std::string& package_name,
                     const std::string& fcn_name, bool autoload)
 {
   octave_function *retval = 0;
@@ -3673,7 +4276,8 @@
       // to get the help-string to use.
 
       octave_function *tmpfcn = parse_fcn_file (file.substr (0, len - 2),
-                                                nm, dispatch_type, false,
+                                                nm, dispatch_type,
+                                                package_name, false,
                                                 autoload, autoload,
                                                 relative_lookup, "");
 
@@ -3685,13 +4289,14 @@
     }
   else if (len > 2)
     {
-      retval = parse_fcn_file (file, nm, dispatch_type, true, autoload,
-                               autoload, relative_lookup, "");
+      retval = parse_fcn_file (file, nm, dispatch_type, package_name, true,
+                               autoload, autoload, relative_lookup, "");
     }
 
   if (retval)
     {
       retval->stash_dir_name (dir_name);
+      retval->stash_package_name (package_name);
 
       if (retval->is_user_function ())
         {
@@ -3901,7 +4506,7 @@
   if (! error_state)
     {
       octave_function *fcn = parse_fcn_file (file_full_name, file_name,
-                                             "", require_file, true,
+                                             "", "", require_file, true,
                                              false, false, warn_for);
 
       if (! error_state)
@@ -4632,7 +5237,7 @@
           if (nargin == 2)
             octave_stdout << "parsing " << full_file << std::endl;
 
-          octave_function *fcn = parse_fcn_file (full_file, file, "",
+          octave_function *fcn = parse_fcn_file (full_file, file, "", "",
                                                  true, false, false,
                                                  false, "__parse_file__");
 
--- a/libinterp/parse-tree/octave.gperf
+++ b/libinterp/parse-tree/octave.gperf
@@ -1,7 +1,7 @@
 %{
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -64,7 +64,6 @@
   properties_kw,
   return_kw,
   set_kw,
-  static_kw,
   switch_kw,
   try_kw,
   until_kw,
@@ -111,7 +110,6 @@
 properties, PROPERTIES, properties_kw
 return, FUNC_RET, return_kw
 set, SET, set_kw
-static, PERSISTENT, static_kw
 switch, SWITCH, switch_kw
 try, TRY, try_kw
 until, UNTIL, until_kw
--- a/libinterp/parse-tree/parse.h
+++ b/libinterp/parse-tree/parse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -43,6 +43,18 @@
 class tree_argument_list;
 class tree_array_list;
 class tree_cell;
+class tree_classdef;
+class tree_classdef_attribute_list;
+class tree_classdef_body;
+class tree_classdef_enum_block;
+class tree_classdef_enum_list;
+class tree_classdef_events_block;
+class tree_classdef_events_list;
+class tree_classdef_methods_block;
+class tree_classdef_methods_list;
+class tree_classdef_properties_block;
+class tree_classdef_property_list;
+class tree_classdef_superclass_list;
 class tree_colon_expression;
 class tree_command;
 class tree_constant;
@@ -50,6 +62,7 @@
 class tree_decl_init_list;
 class tree_expression;
 class tree_fcn_handle;
+class tree_funcall;
 class tree_function_def;
 class tree_identifier;
 class tree_if_clause;
@@ -92,6 +105,7 @@
 load_fcn_from_file (const std::string& file_name,
                     const std::string& dir_name = std::string (),
                     const std::string& dispatch_type = std::string (),
+                    const std::string& package_name = std::string (),
                     const std::string& fcn_name = std::string (),
                     bool autoload = false);
 
@@ -136,9 +150,9 @@
       autoloading (false), fcn_file_from_relative_lookup (false),
       parsing_subfunctions (false), max_fcn_depth (0),
       curr_fcn_depth (0), primary_fcn_scope (-1),
-      curr_class_name (), function_scopes (), primary_fcn_ptr (0),
-      subfunction_names (), stmt_list (0),
-      lexer (lxr)
+      curr_class_name (), curr_package_name (), function_scopes (),
+      primary_fcn_ptr (0), subfunction_names (), classdef_object (0),
+      stmt_list (0), lexer (lxr)
   { }
 
   ~octave_base_parser (void);
@@ -284,6 +298,52 @@
   void
   recover_from_parsing_function (void);
 
+  tree_funcall *
+  make_superclass_ref (const std::string& method_nm,
+                       const std::string& class_nm);
+
+  tree_funcall *
+  make_meta_class_query (const std::string& class_nm);
+
+  tree_classdef *
+  make_classdef (token *tok_val, tree_classdef_attribute_list *a,
+                 tree_identifier *id, tree_classdef_superclass_list *sc,
+                 tree_classdef_body *body, token *end_tok,
+                 octave_comment_list *lc);
+
+  tree_classdef_properties_block *
+  make_classdef_properties_block (token *tok_val,
+                                  tree_classdef_attribute_list *a,
+                                  tree_classdef_property_list *plist,
+                                  token *end_tok, octave_comment_list *lc);
+
+  tree_classdef_methods_block *
+  make_classdef_methods_block (token *tok_val,
+                               tree_classdef_attribute_list *a,
+                               tree_classdef_methods_list *mlist,
+                               token *end_tok, octave_comment_list *lc);
+
+  tree_classdef_events_block *
+  make_classdef_events_block (token *tok_val,
+                              tree_classdef_attribute_list *a,
+                              tree_classdef_events_list *elist,
+                              token *end_tok, octave_comment_list *lc);
+
+  tree_classdef_enum_block *
+  make_classdef_enum_block (token *tok_val,
+                            tree_classdef_attribute_list *a,
+                            tree_classdef_enum_list *elist,
+                            token *end_tok, octave_comment_list *lc);
+
+  octave_user_function *
+  start_classdef_external_method (tree_identifier *id,
+                                  tree_parameter_list *pl);
+
+  tree_function_def *
+  finish_classdef_external_method (octave_user_function *fcn,
+                                   tree_parameter_list *ret_list,
+                                   octave_comment_list *cl);
+
   // Make an index expression.
   tree_index_expression *
   make_index_expression (tree_expression *expr,
@@ -372,6 +432,10 @@
   // constructors.
   std::string curr_class_name;
 
+  // Name of the current package when we are parsing an element contained
+  // in a package directory (+-directory).
+  std::string curr_package_name;
+
   // A stack holding the nested function scopes being parsed.
   // We don't use std::stack, because we want the clear method. Also, we
   // must access one from the top
@@ -385,6 +449,9 @@
   // file.  Eventually stashed in the primary function object.
   std::list<std::string> subfunction_names;
 
+  // Pointer to the classdef object we just parsed, if any.
+  tree_classdef *classdef_object;
+
   // Result of parsing input.
   tree_statement_list *stmt_list;
 
--- a/libinterp/parse-tree/pt-all.h
+++ b/libinterp/parse-tree/pt-all.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -30,6 +30,7 @@
 #include "pt-binop.h"
 #include "pt-cbinop.h"
 #include "pt-check.h"
+#include "pt-classdef.h"
 #include "pt-cmd.h"
 #include "pt-colon.h"
 #include "pt-const.h"
@@ -37,6 +38,7 @@
 #include "pt-except.h"
 #include "pt-exp.h"
 #include "pt-fcn-handle.h"
+#include "pt-funcall.h"
 #include "pt-id.h"
 #include "pt-idx.h"
 #include "pt-jump.h"
--- a/libinterp/parse-tree/pt-arg-list.cc
+++ b/libinterp/parse-tree/pt-arg-list.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-arg-list.h
+++ b/libinterp/parse-tree/pt-arg-list.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-array-list.cc
+++ b/libinterp/parse-tree/pt-array-list.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-array-list.h
+++ b/libinterp/parse-tree/pt-array-list.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-assign.cc
+++ b/libinterp/parse-tree/pt-assign.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-assign.h
+++ b/libinterp/parse-tree/pt-assign.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-binop.cc
+++ b/libinterp/parse-tree/pt-binop.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -36,7 +36,7 @@
 
 // TRUE means we mark | and & expressions for braindead short-circuit
 // behavior.
-static bool Vdo_braindead_shortcircuit_evaluation;
+static bool Vdo_braindead_shortcircuit_evaluation = true;
 
 // Binary expressions.
 
@@ -54,6 +54,16 @@
   return retval;
 }
 
+void
+tree_binary_expression::matlab_style_short_circuit_warning (const char *op)
+{
+  warning_with_id ("Octave:possible-matlab-short-circuit-operator",
+                   "Matlab-style short-circuit operation performed for operator %s",
+                   op);
+
+  braindead_shortcircuit_warning_issued = true;
+}
+
 octave_value
 tree_binary_expression::rvalue1 (int)
 {
@@ -83,6 +93,7 @@
                         {
                           if (etype == octave_value::op_el_or)
                             {
+                              matlab_style_short_circuit_warning ("|");
                               result = true;
                               goto done;
                             }
@@ -90,7 +101,10 @@
                       else
                         {
                           if (etype == octave_value::op_el_and)
-                            goto done;
+                            {
+                              matlab_style_short_circuit_warning ("&");
+                              goto done;
+                            }
                         }
 
                       if (op_rhs)
@@ -121,7 +135,7 @@
 
           if (! error_state && b.is_defined ())
             {
-              BEGIN_PROFILER_BLOCK ("binary " + oper ())
+              BEGIN_PROFILER_BLOCK (tree_binary_expression)
 
               // Note: The profiler does not catch the braindead
               // short-circuit evaluation code above, but that should be
@@ -298,6 +312,14 @@
 The original variable value is restored when exiting the function.\n\
 @end deftypefn")
 {
+  static bool warned = false;
+  if (! warned)
+    {
+      warned = true;
+      warning_with_id ("Octave:deprecated-function",
+                       "do_braindead_shortcircuit_evaluation is obsolete and will be removed from a future version of Octave");
+    }
+
   return SET_INTERNAL_VARIABLE (do_braindead_shortcircuit_evaluation);
 }
 
--- a/libinterp/parse-tree/pt-binop.h
+++ b/libinterp/parse-tree/pt-binop.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -46,14 +46,16 @@
                           octave_value::binary_op t
                             = octave_value::unknown_binary_op)
     : tree_expression (l, c), op_lhs (0), op_rhs (0), etype (t),
-      eligible_for_braindead_shortcircuit (false) { }
+      eligible_for_braindead_shortcircuit (false),
+      braindead_shortcircuit_warning_issued (false) { }
 
   tree_binary_expression (tree_expression *a, tree_expression *b,
                           int l = -1, int c = -1,
                           octave_value::binary_op t
                             = octave_value::unknown_binary_op)
     : tree_expression (l, c), op_lhs (a), op_rhs (b), etype (t),
-      eligible_for_braindead_shortcircuit (false) { }
+      eligible_for_braindead_shortcircuit (false),
+      braindead_shortcircuit_warning_issued (false) { }
 
   ~tree_binary_expression (void)
   {
@@ -61,23 +63,14 @@
     delete op_rhs;
   }
 
-  void mark_braindead_shortcircuit (const std::string& file)
+  void mark_braindead_shortcircuit (void)
   {
     if (etype == octave_value::op_el_and || etype == octave_value::op_el_or)
       {
-        if (file.empty ())
-          warning_with_id ("Octave:possible-matlab-short-circuit-operator",
-                           "possible Matlab-style short-circuit operator at line %d, column %d",
-                           line (), column ());
-        else
-          warning_with_id ("Octave:possible-matlab-short-circuit-operator",
-                           "%s: possible Matlab-style short-circuit operator at line %d, column %d",
-                           file.c_str (), line (), column ());
-
         eligible_for_braindead_shortcircuit = true;
 
-        op_lhs->mark_braindead_shortcircuit (file);
-        op_rhs->mark_braindead_shortcircuit (file);
+        op_lhs->mark_braindead_shortcircuit ();
+        op_rhs->mark_braindead_shortcircuit ();
       }
   }
 
@@ -107,6 +100,9 @@
 
   void accept (tree_walker& tw);
 
+  std::string profiler_name (void) const { return "binary " + oper (); }
+
+
 protected:
 
   // The operands for the expression.
@@ -122,6 +118,12 @@
   // or WHILE statement.
   bool eligible_for_braindead_shortcircuit;
 
+  // TRUE if we have already issued a warning about short circuiting
+  // for this operator.
+  bool braindead_shortcircuit_warning_issued;
+
+  void matlab_style_short_circuit_warning (const char *op);
+
   // No copying!
 
   tree_binary_expression (const tree_binary_expression&);
--- a/libinterp/parse-tree/pt-bp.cc
+++ b/libinterp/parse-tree/pt-bp.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Ben Sapp
+Copyright (C) 2001-2015 Ben Sapp
 
 This file is part of Octave.
 
@@ -293,6 +293,12 @@
 }
 
 void
+tree_breakpoint::visit_funcall (tree_funcall&)
+{
+  panic_impossible ();
+}
+
+void
 tree_breakpoint::visit_parameter_list (tree_parameter_list&)
 {
   panic_impossible ();
--- a/libinterp/parse-tree/pt-bp.h
+++ b/libinterp/parse-tree/pt-bp.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 Ben Sapp
+Copyright (C) 2001-2015 Ben Sapp
 
 This file is part of Octave.
 
@@ -106,6 +106,8 @@
 
   void visit_fcn_handle (tree_fcn_handle&);
 
+  void visit_funcall (tree_funcall&);
+
   void visit_parameter_list (tree_parameter_list&);
 
   void visit_postfix_expression (tree_postfix_expression&);
--- a/libinterp/parse-tree/pt-cbinop.cc
+++ b/libinterp/parse-tree/pt-cbinop.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -32,6 +32,49 @@
 #include "pt-unop.h"
 #include "pt-walk.h"
 
+octave_value_list
+tree_compound_binary_expression::rvalue (int nargout)
+{
+  octave_value_list retval;
+
+  if (nargout > 1)
+    error ("binary operator '%s': invalid number of output arguments",
+           oper () . c_str ());
+  else
+    retval = rvalue1 (nargout);
+
+  return retval;
+}
+
+octave_value
+tree_compound_binary_expression::rvalue1 (int)
+{
+  octave_value retval;
+
+  if (error_state)
+    return retval;
+
+  if (op_lhs)
+    {
+      octave_value a = op_lhs->rvalue1 ();
+
+      if (! error_state && a.is_defined () && op_rhs)
+        {
+          octave_value b = op_rhs->rvalue1 ();
+
+          if (! error_state && b.is_defined ())
+            {
+              retval = ::do_binary_op (etype, a, b);
+
+              if (error_state)
+                retval = octave_value ();
+            }
+        }
+    }
+
+  return retval;
+}
+
 // If a tree expression is a transpose or hermitian transpose, return
 // the argument and corresponding operator.
 
@@ -162,7 +205,8 @@
 maybe_compound_binary_expression (tree_expression *a, tree_expression *b,
                                   int l, int c, octave_value::binary_op t)
 {
-  tree_expression *ca = a, *cb = b;
+  tree_expression *ca = a;
+  tree_expression *cb = b;
   octave_value::compound_binary_op ct;
 
   switch (t)
--- a/libinterp/parse-tree/pt-cbinop.h
+++ b/libinterp/parse-tree/pt-cbinop.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -52,6 +52,12 @@
 
   octave_value::compound_binary_op cop_type (void) const { return etype; }
 
+  bool rvalue_ok (void) const { return true; }
+
+  octave_value rvalue1 (int nargout = 1);
+
+  octave_value_list rvalue (int nargout);
+
 private:
 
   tree_expression *op_lhs;
--- a/libinterp/parse-tree/pt-cell.cc
+++ b/libinterp/parse-tree/pt-cell.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -44,7 +44,7 @@
 
   Cell val;
 
-  int i = 0;
+  octave_idx_type i = 0;
 
   for (iterator p = begin (); p != end (); p++)
     {
@@ -65,10 +65,15 @@
         {
           octave_idx_type this_nc = row.length ();
 
-          if (nc != this_nc)
+          if (this_nc != nc)
             {
-              ::error ("number of columns must match");
-              return retval;
+              if (this_nc == 0)
+                continue;  // blank line
+              else
+                {
+                  ::error ("number of columns must match");
+                  return retval;
+                }
             }
         }
 
@@ -78,6 +83,8 @@
       i++;
     }
 
+  if (i < nr)
+    val.resize (dim_vector (i, nc));  // there were blank rows
   retval = val;
 
   return retval;
--- a/libinterp/parse-tree/pt-cell.h
+++ b/libinterp/parse-tree/pt-cell.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-check.cc
+++ b/libinterp/parse-tree/pt-check.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -357,6 +357,11 @@
 }
 
 void
+tree_checker::visit_funcall (tree_funcall& /* fc */)
+{
+}
+
+void
 tree_checker::visit_parameter_list (tree_parameter_list& lst)
 {
   tree_parameter_list::iterator p = lst.begin ();
--- a/libinterp/parse-tree/pt-check.h
+++ b/libinterp/parse-tree/pt-check.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -91,6 +91,8 @@
 
   void visit_fcn_handle (tree_fcn_handle&);
 
+  void visit_funcall (tree_funcall&);
+
   void visit_parameter_list (tree_parameter_list&);
 
   void visit_postfix_expression (tree_postfix_expression&);
new file mode 100644
--- /dev/null
+++ b/libinterp/parse-tree/pt-classdef.cc
@@ -0,0 +1,259 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ov-classdef.h"
+#include "pt-classdef.h"
+
+// Classdef attribute
+
+void
+tree_classdef_attribute::accept (tree_walker& tw)
+{
+  tw.visit_classdef_attribute (*this);
+}
+
+// Classdef attribute_list
+
+tree_classdef_attribute_list::~tree_classdef_attribute_list (void)
+{
+  while (! empty ())
+    {
+      iterator p = begin ();
+      delete *p;
+      erase (p);
+    }
+}
+
+void
+tree_classdef_attribute_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_attribute_list (*this);
+}
+
+// Classdef superclass
+
+void
+tree_classdef_superclass::accept (tree_walker& tw)
+{
+  tw.visit_classdef_superclass (*this);
+}
+
+// Classdef superclass_list
+
+tree_classdef_superclass_list::~tree_classdef_superclass_list (void)
+{
+  while (! empty ())
+    {
+      iterator p = begin ();
+      delete *p;
+      erase (p);
+    }
+}
+
+void
+tree_classdef_superclass_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_superclass_list (*this);
+}
+
+// Classdef property
+
+void
+tree_classdef_property::accept (tree_walker& tw)
+{
+  tw.visit_classdef_property (*this);
+}
+
+// Classdef property_list
+
+tree_classdef_property_list::~tree_classdef_property_list (void)
+{
+  while (! empty ())
+    {
+      iterator p = begin ();
+      delete *p;
+      erase (p);
+    }
+}
+
+void
+tree_classdef_property_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_property_list (*this);
+}
+
+// Classdef properties_block
+
+void
+tree_classdef_properties_block::accept (tree_walker& tw)
+{
+  tw.visit_classdef_properties_block (*this);
+}
+
+// Classdef methods_list
+
+void
+tree_classdef_methods_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_methods_list (*this);
+}
+
+// Classdef methods_block
+
+void
+tree_classdef_methods_block::accept (tree_walker& tw)
+{
+  tw.visit_classdef_methods_block (*this);
+}
+
+// Classdef event
+
+void
+tree_classdef_event::accept (tree_walker& tw)
+{
+  tw.visit_classdef_event (*this);
+}
+
+// Classdef events_list
+
+tree_classdef_events_list::~tree_classdef_events_list (void)
+{
+  while (! empty ())
+    {
+      iterator p = begin ();
+      delete *p;
+      erase (p);
+    }
+}
+
+void
+tree_classdef_events_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_events_list (*this);
+}
+
+// Classdef events_block
+
+void
+tree_classdef_events_block::accept (tree_walker& tw)
+{
+  tw.visit_classdef_events_block (*this);
+}
+
+// Classdef enum
+
+void
+tree_classdef_enum::accept (tree_walker& tw)
+{
+  tw.visit_classdef_enum (*this);
+}
+
+// Classdef enum_list
+
+tree_classdef_enum_list::~tree_classdef_enum_list (void)
+{
+  while (! empty ())
+    {
+      iterator p = begin ();
+      delete *p;
+      erase (p);
+    }
+}
+
+void
+tree_classdef_enum_list::accept (tree_walker& tw)
+{
+  tw.visit_classdef_enum_list (*this);
+}
+
+// Classdef enum_block
+
+void
+tree_classdef_enum_block::accept (tree_walker& tw)
+{
+  tw.visit_classdef_enum_block (*this);
+}
+
+// Classdef body
+
+tree_classdef_body::~tree_classdef_body (void)
+{
+  while (! properties_lst.empty ())
+    {
+      properties_list_iterator p = properties_lst.begin ();
+      delete *p;
+      properties_lst.erase (p);
+    }
+
+  while (! methods_lst.empty ())
+    {
+      methods_list_iterator p = methods_lst.begin ();
+      delete *p;
+      methods_lst.erase (p);
+    }
+
+  while (! events_lst.empty ())
+    {
+      events_list_iterator p = events_lst.begin ();
+      delete *p;
+      events_lst.erase (p);
+    }
+
+  while (! enum_lst.empty ())
+    {
+      enum_list_iterator p = enum_lst.begin ();
+      delete *p;
+      enum_lst.erase (p);
+    }
+}
+
+// Classdef
+
+octave_function*
+tree_classdef::make_meta_class (bool is_at_folder)
+{
+  octave_value retval;
+  cdef_class cls = cdef_class::make_meta_class (this, is_at_folder);
+
+  if (cls.ok ())
+    return cls.get_constructor_function ();
+
+  return 0;
+}
+
+tree_classdef *
+tree_classdef::dup (symbol_table::scope_id,
+                    symbol_table::context_id) const
+{
+  // FIXME
+  return 0;
+}
+
+void
+tree_classdef::accept (tree_walker& tw)
+{
+  tw.visit_classdef (*this);
+}
new file mode 100644
--- /dev/null
+++ b/libinterp/parse-tree/pt-classdef.h
@@ -0,0 +1,653 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_tree_classdef_h)
+#define octave_tree_classdef_h 1
+
+class octave_value;
+
+class tree_walker;
+
+#include "pt-cmd.h"
+#include "pt-exp.h"
+#include "pt-id.h"
+
+#include "base-list.h"
+
+#include <list>
+
+class tree_classdef_attribute
+{
+public:
+
+  tree_classdef_attribute (tree_identifier *i = 0, tree_expression *e = 0)
+    : id (i), expr (e), neg (false) { }
+
+  tree_classdef_attribute (tree_identifier *i, bool b)
+    : id (i), expr (0), neg (b) { }
+
+  ~tree_classdef_attribute (void)
+  {
+    delete id;
+    delete expr;
+  }
+
+  tree_identifier *ident (void) { return id; }
+
+  tree_expression *expression (void) { return expr; }
+
+  bool negate (void) { return neg; }
+
+  void accept (tree_walker&);
+
+private:
+
+  tree_identifier *id;
+  tree_expression *expr;
+  bool neg;
+
+  // No copying!
+
+  tree_classdef_attribute (const tree_classdef_attribute&);
+
+  tree_classdef_attribute& operator = (const tree_classdef_attribute&);
+};
+
+class tree_classdef_attribute_list : public octave_base_list<tree_classdef_attribute *>
+{
+public:
+
+  tree_classdef_attribute_list (void) { }
+
+  tree_classdef_attribute_list (tree_classdef_attribute *a) { append (a); }
+
+  tree_classdef_attribute_list (const octave_base_list<tree_classdef_attribute *>& a)
+    : octave_base_list<tree_classdef_attribute *> (a) { }
+
+  ~tree_classdef_attribute_list (void);
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_attribute_list (const tree_classdef_attribute_list&);
+
+  tree_classdef_attribute_list& operator = (const tree_classdef_attribute_list&);
+};
+
+class tree_classdef_superclass
+{
+public:
+
+  tree_classdef_superclass (const std::string& cname)
+    : cls_name (cname) { }
+
+  ~tree_classdef_superclass (void) { }
+
+  std::string class_name (void) { return cls_name; }
+
+  void accept (tree_walker&);
+
+private:
+
+  std::string cls_name;
+
+  // No copying!
+
+  tree_classdef_superclass (const tree_classdef_superclass&);
+
+  tree_classdef_superclass& operator = (const tree_classdef_superclass&);
+};
+
+class tree_classdef_superclass_list : public octave_base_list<tree_classdef_superclass *>
+{
+public:
+
+  tree_classdef_superclass_list (void) { }
+
+  tree_classdef_superclass_list (tree_classdef_superclass *sc) { append (sc); }
+
+  tree_classdef_superclass_list (const octave_base_list<tree_classdef_superclass *>& a)
+    : octave_base_list<tree_classdef_superclass *> (a) { }
+
+  ~tree_classdef_superclass_list (void);
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_superclass_list (const tree_classdef_superclass_list&);
+
+  tree_classdef_superclass_list& operator = (const tree_classdef_superclass_list&);
+};
+
+template <typename T>
+class tree_classdef_element : public tree
+{
+public:
+
+  tree_classdef_element (tree_classdef_attribute_list *a,
+                         octave_base_list<T> *elist,
+                         octave_comment_list *lc, octave_comment_list *tc,
+                         int l = -1, int c = -1)
+    : tree (l, c), attr_list (a), elt_list (elist),
+      lead_comm (lc), trail_comm (tc)
+  { }
+
+  ~tree_classdef_element (void)
+  {
+    delete attr_list;
+    delete elt_list;
+    delete lead_comm;
+    delete trail_comm;
+  }
+
+  tree_classdef_attribute_list *attribute_list (void) { return attr_list; }
+
+  octave_base_list<T> *element_list (void) { return elt_list; }
+
+  octave_comment_list *leading_comment (void) { return lead_comm; }
+
+  octave_comment_list *trailing_comment (void) { return trail_comm; }
+
+  void accept (tree_walker&) { }
+
+private:
+
+  // List of attributes that apply to this class.
+  tree_classdef_attribute_list *attr_list;
+
+  // The list of objects contained in this block.
+  octave_base_list<T> *elt_list;
+
+  // Comment preceding the token marking the beginning of the block.
+  octave_comment_list *lead_comm;
+
+  // Comment preceding END token.
+  octave_comment_list *trail_comm;
+
+  // No copying!
+
+  tree_classdef_element (const tree_classdef_element&);
+
+  tree_classdef_element& operator = (const tree_classdef_element&);
+};
+
+class tree_classdef_property
+{
+public:
+
+  tree_classdef_property (tree_identifier *i = 0, tree_expression *e = 0)
+    : id (i), expr (e) { }
+
+  ~tree_classdef_property (void)
+  {
+    delete id;
+    delete expr;
+  }
+
+  tree_identifier *ident (void) { return id; }
+
+  tree_expression *expression (void) { return expr; }
+
+  void accept (tree_walker&);
+
+private:
+
+  tree_identifier *id;
+  tree_expression *expr;
+
+  // No copying!
+
+  tree_classdef_property (const tree_classdef_property&);
+
+  tree_classdef_property& operator = (const tree_classdef_property&);
+};
+
+class tree_classdef_property_list : public octave_base_list<tree_classdef_property *>
+{
+public:
+
+  tree_classdef_property_list (void) { }
+
+  tree_classdef_property_list (tree_classdef_property* p) { append (p); }
+
+  tree_classdef_property_list (const octave_base_list<tree_classdef_property *>& a)
+    : octave_base_list<tree_classdef_property *> (a) { }
+
+  ~tree_classdef_property_list (void);
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_property_list (const tree_classdef_property_list&);
+
+  tree_classdef_property_list& operator = (const tree_classdef_property_list&);
+};
+
+class tree_classdef_properties_block
+  : public tree_classdef_element<tree_classdef_property *>
+{
+public:
+
+  tree_classdef_properties_block (tree_classdef_attribute_list *a,
+                                  tree_classdef_property_list *plist,
+                                  octave_comment_list *lc,
+                                  octave_comment_list *tc,
+                                  int l = -1, int c = -1)
+    : tree_classdef_element<tree_classdef_property *> (a, plist, lc, tc, l, c) { }
+
+  ~tree_classdef_properties_block (void) { }
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_properties_block (const tree_classdef_properties_block&);
+
+  tree_classdef_properties_block& operator = (const tree_classdef_properties_block&);
+};
+
+class tree_classdef_methods_list : public octave_base_list<octave_value>
+{
+public:
+
+  tree_classdef_methods_list (void) { }
+
+  tree_classdef_methods_list (const octave_value& f) { append (f); }
+
+  tree_classdef_methods_list (const octave_base_list<octave_value>& a)
+    : octave_base_list<octave_value> (a) { }
+
+  ~tree_classdef_methods_list (void) { }
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_methods_list (const tree_classdef_methods_list&);
+
+  tree_classdef_methods_list& operator = (const tree_classdef_methods_list&);
+};
+
+class tree_classdef_methods_block : public tree_classdef_element<octave_value>
+{
+public:
+
+  tree_classdef_methods_block (tree_classdef_attribute_list *a,
+                               tree_classdef_methods_list *mlist,
+                               octave_comment_list *lc,
+                               octave_comment_list *tc, int l = -1, int c = -1)
+    : tree_classdef_element<octave_value> (a, mlist, lc, tc, l, c) { }
+
+  ~tree_classdef_methods_block (void) { }
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_methods_block (const tree_classdef_methods_block&);
+
+  tree_classdef_methods_block& operator = (const tree_classdef_methods_block&);
+};
+
+class tree_classdef_event
+{
+public:
+
+  tree_classdef_event (tree_identifier *i = 0) : id (i) { }
+
+  ~tree_classdef_event (void)
+  {
+    delete id;
+  }
+
+  tree_identifier *ident (void) { return id; }
+
+  void accept (tree_walker&);
+
+private:
+
+  tree_identifier *id;
+
+  // No copying!
+
+  tree_classdef_event (const tree_classdef_event&);
+
+  tree_classdef_event& operator = (const tree_classdef_event&);
+};
+
+class tree_classdef_events_list : public octave_base_list<tree_classdef_event *>
+{
+public:
+
+  tree_classdef_events_list (void) { }
+
+  tree_classdef_events_list (tree_classdef_event *e) { append (e); }
+
+  tree_classdef_events_list (const octave_base_list<tree_classdef_event *>& a)
+    : octave_base_list<tree_classdef_event *> (a) { }
+
+  ~tree_classdef_events_list (void);
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_events_list (const tree_classdef_events_list&);
+
+  tree_classdef_events_list& operator = (const tree_classdef_events_list&);
+};
+
+class tree_classdef_events_block
+  : public tree_classdef_element<tree_classdef_event *>
+{
+public:
+
+  tree_classdef_events_block (tree_classdef_attribute_list *a,
+                              tree_classdef_events_list *elist,
+                              octave_comment_list *lc,
+                              octave_comment_list *tc, int l = -1, int c = -1)
+    : tree_classdef_element<tree_classdef_event *> (a, elist, lc, tc, l, c) { }
+
+  ~tree_classdef_events_block (void) { }
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_events_block (const tree_classdef_events_block&);
+
+  tree_classdef_events_block& operator = (const tree_classdef_events_block&);
+};
+
+class tree_classdef_enum
+{
+public:
+
+  tree_classdef_enum (void) : id (0), expr (0) { }
+
+  tree_classdef_enum (tree_identifier *i, tree_expression *e)
+    : id (i), expr (e) { }
+
+  ~tree_classdef_enum (void)
+  {
+    delete id;
+    delete expr;
+  }
+
+  tree_identifier *ident (void) { return id; }
+
+  tree_expression *expression (void) { return expr; }
+
+  void accept (tree_walker&);
+
+private:
+
+  tree_identifier *id;
+  tree_expression *expr;
+
+  // No copying!
+
+  tree_classdef_enum (const tree_classdef_enum&);
+
+  tree_classdef_enum& operator = (const tree_classdef_enum&);
+};
+
+class tree_classdef_enum_list : public octave_base_list<tree_classdef_enum *>
+{
+public:
+
+  tree_classdef_enum_list (void) { }
+
+  tree_classdef_enum_list (tree_classdef_enum *e) { append (e); }
+
+  tree_classdef_enum_list (const octave_base_list<tree_classdef_enum *>& a)
+    : octave_base_list<tree_classdef_enum *> (a) { }
+
+  ~tree_classdef_enum_list (void);
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_enum_list (const tree_classdef_enum_list&);
+
+  tree_classdef_enum_list& operator = (const tree_classdef_enum_list&);
+};
+
+class tree_classdef_enum_block
+  : public tree_classdef_element<tree_classdef_enum *>
+{
+public:
+
+  tree_classdef_enum_block (tree_classdef_attribute_list *a,
+                            tree_classdef_enum_list *elist,
+                            octave_comment_list *lc,
+                            octave_comment_list *tc, int l = -1, int c = -1)
+    : tree_classdef_element<tree_classdef_enum *> (a, elist, lc, tc, l, c) { }
+
+  ~tree_classdef_enum_block (void) { }
+
+  void accept (tree_walker&);
+
+private:
+
+  // No copying!
+
+  tree_classdef_enum_block (const tree_classdef_enum_block&);
+
+  tree_classdef_enum_block& operator = (const tree_classdef_enum_block&);
+};
+
+class tree_classdef_body
+{
+public:
+
+  typedef std::list<tree_classdef_properties_block *>::iterator properties_list_iterator;
+  typedef std::list<tree_classdef_properties_block *>::const_iterator properties_list_const_iterator;
+
+  typedef std::list<tree_classdef_methods_block *>::iterator methods_list_iterator;
+  typedef std::list<tree_classdef_methods_block *>::const_iterator methods_list_const_iterator;
+
+  typedef std::list<tree_classdef_events_block *>::iterator events_list_iterator;
+  typedef std::list<tree_classdef_events_block *>::const_iterator events_list_const_iterator;
+
+  typedef std::list<tree_classdef_enum_block *>::iterator enum_list_iterator;
+  typedef std::list<tree_classdef_enum_block *>::const_iterator enum_list_const_iterator;
+
+  tree_classdef_body (void)
+    : properties_lst (), methods_lst (), events_lst (), enum_lst () { }
+
+  tree_classdef_body (tree_classdef_properties_block *pb)
+    : properties_lst (), methods_lst (), events_lst (), enum_lst ()
+  {
+    append (pb);
+  }
+
+  tree_classdef_body (tree_classdef_methods_block *mb)
+    : properties_lst (), methods_lst (), events_lst (), enum_lst ()
+  {
+    append (mb);
+  }
+
+  tree_classdef_body (tree_classdef_events_block *evb)
+    : properties_lst (), methods_lst (), events_lst (), enum_lst ()
+  {
+    append (evb);
+  }
+
+  tree_classdef_body (tree_classdef_enum_block *enb)
+    : properties_lst (), methods_lst (), events_lst (), enum_lst ()
+  {
+    append (enb);
+  }
+
+  ~tree_classdef_body (void);
+
+  void append (tree_classdef_properties_block *pb)
+  {
+    properties_lst.push_back (pb);
+  }
+
+  void append (tree_classdef_methods_block *mb)
+  {
+    methods_lst.push_back (mb);
+  }
+
+  void append (tree_classdef_events_block *evb)
+  {
+    events_lst.push_back (evb);
+  }
+
+  void append (tree_classdef_enum_block *enb)
+  {
+    enum_lst.push_back (enb);
+  }
+
+  std::list<tree_classdef_properties_block *> properties_list (void)
+  {
+    return properties_lst;
+  }
+
+  std::list<tree_classdef_methods_block *> methods_list (void)
+  {
+    return methods_lst;
+  }
+
+  std::list<tree_classdef_events_block *> events_list (void)
+  {
+    return events_lst;
+  }
+
+  std::list<tree_classdef_enum_block *> enum_list (void)
+  {
+    return enum_lst;
+  }
+
+  void accept (tree_walker&);
+
+private:
+
+  std::list<tree_classdef_properties_block *> properties_lst;
+
+  std::list<tree_classdef_methods_block *> methods_lst;
+
+  std::list<tree_classdef_events_block *> events_lst;
+
+  std::list<tree_classdef_enum_block *> enum_lst;
+
+  // No copying!
+
+  tree_classdef_body (const tree_classdef_body&);
+
+  tree_classdef_body& operator = (const tree_classdef_body&);
+};
+
+// Classdef definition.
+
+class tree_classdef : public tree_command
+{
+public:
+
+  tree_classdef (tree_classdef_attribute_list *a, tree_identifier *i,
+                 tree_classdef_superclass_list *sc,
+                 tree_classdef_body *b, octave_comment_list *lc,
+                 octave_comment_list *tc,
+                 const std::string& pn = std::string (), int l = -1,
+                 int c = -1)
+    : tree_command (l, c), attr_list (a), id (i),
+      supclass_list (sc), element_list (b), lead_comm (lc), trail_comm (tc),
+      pack_name (pn) { }
+
+  ~tree_classdef (void)
+  {
+    delete attr_list;
+    delete id;
+    delete supclass_list;
+    delete element_list;
+    delete lead_comm;
+    delete trail_comm;
+  }
+
+  tree_classdef_attribute_list *attribute_list (void) { return attr_list; }
+
+  tree_identifier *ident (void) { return id; }
+
+  tree_classdef_superclass_list *superclass_list (void) { return supclass_list; }
+
+  tree_classdef_body *body (void) { return element_list; }
+
+  octave_comment_list *leading_comment (void) { return lead_comm; }
+  octave_comment_list *trailing_comment (void) { return trail_comm; }
+
+  const std::string& package_name (void) const { return pack_name; }
+
+  octave_function* make_meta_class (bool is_at_folder = false);
+
+  tree_classdef *dup (symbol_table::scope_id scope,
+                      symbol_table::context_id context) const;
+
+  void accept (tree_walker& tw);
+
+private:
+
+  tree_classdef_attribute_list *attr_list;
+
+  tree_identifier *id;
+
+  tree_classdef_superclass_list *supclass_list;
+
+  tree_classdef_body *element_list;
+
+  octave_comment_list *lead_comm;
+  octave_comment_list *trail_comm;
+
+  std::string pack_name;
+
+  // No copying!
+
+  tree_classdef (const tree_classdef&);
+
+  tree_classdef& operator = (const tree_classdef&);
+};
+
+#endif
--- a/libinterp/parse-tree/pt-cmd.cc
+++ b/libinterp/parse-tree/pt-cmd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-cmd.h
+++ b/libinterp/parse-tree/pt-cmd.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-colon.cc
+++ b/libinterp/parse-tree/pt-colon.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -81,89 +81,6 @@
 }
 
 octave_value
-tree_colon_expression::make_range (const Matrix& m_base,
-                                   const Matrix& m_limit,
-                                   const Matrix& m_increment,
-                                   bool result_is_str, bool dq_str) const
-{
-  octave_value retval;
-
-  bool base_empty = m_base.is_empty ();
-  bool limit_empty = m_limit.is_empty ();
-  bool increment_empty = m_increment.is_empty ();
-
-  if (base_empty || limit_empty || increment_empty)
-    retval = Range ();
-  else
-    {
-      retval = Range (m_base(0), m_limit(0), m_increment(0));
-
-      if (result_is_str)
-        retval = retval.convert_to_str (false, true, dq_str ? '"' : '\'');
-    }
-
-  return retval;
-}
-
-octave_value
-tree_colon_expression::make_range (const octave_value& ov_base,
-                                   const octave_value& ov_limit,
-                                   const octave_value& ov_increment) const
-{
-  octave_value retval;
-
-  if (ov_base.is_object () || ov_limit.is_object () ||
-      ov_increment.is_object ())
-    {
-      octave_value_list tmp1;
-      tmp1(2) = ov_limit;
-      tmp1(1) = ov_increment;
-      tmp1(0) = ov_base;
-
-      octave_value fcn = symbol_table::find_function ("colon", tmp1);
-
-      if (fcn.is_defined ())
-        {
-          octave_value_list tmp2 = fcn.do_multi_index_op (1, tmp1);
-
-          if (! error_state)
-            retval = tmp2 (0);
-        }
-      else
-        ::error ("can not find overloaded colon function");
-    }
-  else
-    {
-      bool result_is_str = (ov_base.is_string () && ov_limit.is_string ());
-      bool dq_str = (ov_base.is_dq_string () || ov_limit.is_dq_string ());
-
-      Matrix m_base = ov_base.matrix_value (true);
-
-      if (error_state)
-        eval_error ("invalid base value in colon expression");
-      else
-        {
-          Matrix m_limit = ov_limit.matrix_value (true);
-
-          if (error_state)
-            eval_error ("invalid limit value in colon expression");
-          else
-            {
-              Matrix m_increment = ov_increment.matrix_value (true);
-
-              if (error_state)
-                eval_error ("invalid increment value in colon expression");
-              else
-                retval = make_range (m_base, m_limit, m_increment,
-                                     result_is_str, dq_str);
-            }
-        }
-    }
-
-  return retval;
-}
-
-octave_value
 tree_colon_expression::rvalue1 (int)
 {
   octave_value retval;
@@ -232,7 +149,8 @@
             }
 
           if (! error_state)
-            retval = make_range (ov_base, ov_limit, ov_increment);
+            retval = do_colon_op (ov_base, ov_increment, ov_limit,
+                                  is_for_cmd_expr ());
         }
     }
 
--- a/libinterp/parse-tree/pt-colon.h
+++ b/libinterp/parse-tree/pt-colon.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -105,15 +105,6 @@
 
   bool save_base;
 
-  octave_value
-  make_range (const Matrix& m_base, const Matrix& m_limit,
-              const Matrix& m_increment, bool result_is_str,
-              bool dq_str) const;
-
-  octave_value
-  make_range (const octave_value& ov_base, const octave_value& ov_limit,
-              const octave_value& ov_increment) const;
-
   // No copying!
 
   tree_colon_expression (const tree_colon_expression&);
--- a/libinterp/parse-tree/pt-const.cc
+++ b/libinterp/parse-tree/pt-const.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -34,7 +34,6 @@
 
 // We are likely to have a lot of tree_constant objects to allocate,
 // so make the grow_size large.
-DEFINE_OCTAVE_ALLOCATOR2 (tree_constant, 1024);
 
 void
 tree_constant::print (std::ostream& os, bool pr_as_read_syntax,
--- a/libinterp/parse-tree/pt-const.h
+++ b/libinterp/parse-tree/pt-const.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -26,7 +26,6 @@
 #include <iosfwd>
 #include <string>
 
-#include "oct-alloc.h"
 
 class octave_value_list;
 class tree_walker;
@@ -99,7 +98,6 @@
 
   tree_constant& operator = (const tree_constant&);
 
-  DECLARE_OCTAVE_ALLOCATOR
 };
 
 #endif
--- a/libinterp/parse-tree/pt-decl.cc
+++ b/libinterp/parse-tree/pt-decl.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-decl.h
+++ b/libinterp/parse-tree/pt-decl.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-eval.cc
+++ b/libinterp/parse-tree/pt-eval.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -57,6 +57,8 @@
 
 bool tree_evaluator::debug_mode = false;
 
+bool tree_evaluator::quiet_breakpoint_flag = false;
+
 tree_evaluator::stmt_list_type tree_evaluator::statement_context
   = tree_evaluator::other;
 
@@ -368,7 +370,8 @@
 
         dim_vector dv = rhs.dims ().redim (2);
 
-        octave_idx_type nrows = dv(0), steps = dv(1);
+        octave_idx_type nrows = dv(0);
+        octave_idx_type steps = dv(1);
 
         if (steps > 0)
           {
@@ -626,6 +629,12 @@
 }
 
 void
+tree_evaluator::visit_funcall (tree_funcall&)
+{
+  panic_impossible ();
+}
+
+void
 tree_evaluator::visit_parameter_list (tree_parameter_list&)
 {
   panic_impossible ();
@@ -694,13 +703,12 @@
           if (! Vdebugging)
             octave_call_stack::set_location (stmt.line (), stmt.column ());
 
-          // FIXME: we need to distinguish functions from scripts
-          //        to get this right.
           if ((statement_context == script
-               && ((Vecho_executing_commands & ECHO_SCRIPTS)
-                   || (Vecho_executing_commands & ECHO_FUNCTIONS)))
+               && ((Vecho_executing_commands & ECHO_SCRIPTS
+                    && octave_call_stack::all_scripts ())
+                   || Vecho_executing_commands & ECHO_FUNCTIONS))
               || (statement_context == function
-                  && (Vecho_executing_commands & ECHO_FUNCTIONS)))
+                  && Vecho_executing_commands & ECHO_FUNCTIONS))
             stmt.echo_code ();
         }
 
@@ -925,6 +933,7 @@
 
               err.assign ("message", last_error_message ());
               err.assign ("identifier", last_error_id ());
+              err.assign ("stack", last_error_stack ());
 
               if (! error_state)
                 ult.assign (octave_value::op_asn_eq, err);
@@ -1103,6 +1112,11 @@
   if (error_state)
     return;
 
+#if HAVE_LLVM
+  if (tree_jit::execute (cmd))
+    return;
+#endif
+
   unwind_protect frame;
 
   frame.protect_var (in_loop_command);
--- a/libinterp/parse-tree/pt-eval.h
+++ b/libinterp/parse-tree/pt-eval.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -102,6 +102,8 @@
 
   void visit_fcn_handle (tree_fcn_handle&);
 
+  void visit_funcall (tree_funcall&);
+
   void visit_parameter_list (tree_parameter_list&);
 
   void visit_postfix_expression (tree_postfix_expression&);
@@ -149,6 +151,8 @@
 
   static bool debug_mode;
 
+  static bool quiet_breakpoint_flag;
+
   // Possible types of evaluation contexts.
   enum stmt_list_type
   {
--- a/libinterp/parse-tree/pt-except.cc
+++ b/libinterp/parse-tree/pt-except.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-except.h
+++ b/libinterp/parse-tree/pt-except.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-exp.cc
+++ b/libinterp/parse-tree/pt-exp.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-exp.h
+++ b/libinterp/parse-tree/pt-exp.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -40,8 +40,8 @@
 public:
 
   tree_expression (int l = -1, int c = -1)
-    : tree (l, c), num_parens (0), postfix_indexed (false),
-      print_flag (false) { }
+    : tree (l, c), num_parens (0), postfix_index_type ('\0'),
+      for_cmd_expr (false), print_flag (false) { }
 
   virtual ~tree_expression (void) { }
 
@@ -87,7 +87,9 @@
 
   int paren_count (void) const { return num_parens; }
 
-  bool is_postfix_indexed (void) const { return postfix_indexed; }
+  bool is_postfix_indexed (void) const { return (postfix_index_type != '\0'); }
+
+  char postfix_index (void) const { return postfix_index_type; }
 
   // Check if the result of the expression should be printed.
   // Should normally be used in conjunction with
@@ -100,7 +102,11 @@
 
   virtual std::string original_text (void) const;
 
-  virtual void mark_braindead_shortcircuit (const std::string&) { }
+  virtual void mark_braindead_shortcircuit (void) { }
+
+  void mark_as_for_cmd_expr (void) { for_cmd_expr = true; }
+
+  bool is_for_cmd_expr (void) const { return for_cmd_expr; }
 
   tree_expression *mark_in_parens (void)
   {
@@ -108,9 +114,9 @@
     return this;
   }
 
-  tree_expression *mark_postfix_indexed (void)
+  tree_expression *set_postfix_index (char type)
   {
-    postfix_indexed = true;
+    postfix_index_type = type;
     return this;
   }
 
@@ -123,7 +129,7 @@
   virtual void copy_base (const tree_expression& e)
   {
     num_parens = e.num_parens;
-    postfix_indexed = e.postfix_indexed;
+    postfix_index_type = e.postfix_index_type;
     print_flag = e.print_flag;
   }
 
@@ -137,9 +143,14 @@
   //                  ==> 0 for expression e2
   int num_parens;
 
-  // A flag that says whether this expression has an index associated
-  // with it.  See the code in tree_identifier::rvalue for the rationale.
-  bool postfix_indexed;
+  // The first index type associated with this expression. This field
+  // is 0 (character '\0') if the expression has no associated index.
+  // See the code in tree_identifier::rvalue for the rationale.
+  char postfix_index_type;
+
+  // TRUE if this expression is the EXPR in for loop:
+  // FOR i = EXPR ... END
+  bool for_cmd_expr;
 
   // Print result of rvalue for this expression?
   bool print_flag;
--- a/libinterp/parse-tree/pt-fcn-handle.cc
+++ b/libinterp/parse-tree/pt-fcn-handle.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-fcn-handle.h
+++ b/libinterp/parse-tree/pt-fcn-handle.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
new file mode 100644
--- /dev/null
+++ b/libinterp/parse-tree/pt-funcall.cc
@@ -0,0 +1,110 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ov-fcn.h"
+#include "pt-funcall.h"
+#include "pt-walk.h"
+
+// Function call objects.
+
+void
+tree_funcall::print (std::ostream& os, bool pr_as_read_syntax,
+                     bool pr_orig_text)
+{
+  print_raw (os, pr_as_read_syntax, pr_orig_text);
+}
+
+void
+tree_funcall::print_raw (std::ostream& os, bool pr_as_read_syntax,
+                         bool pr_orig_text)
+{
+  if (pr_orig_text)
+    {
+      os << original_text ();
+    }
+  else
+    {
+      octave_function *fp = fcn.function_value ();
+      std::string nm = fp ? fp->name () : std::string ("<invalid-function>");
+
+      os << nm << " (";
+
+      octave_idx_type len = args.length ();
+      for (octave_idx_type i = 0; i < len; i++)
+        {
+          args(i).print_raw (os, pr_as_read_syntax);
+
+          if (i < len - 1)
+            os << ", ";
+        }
+
+      os << ")";
+    }
+}
+
+tree_funcall *
+tree_funcall::dup (symbol_table::scope_id, symbol_table::context_id) const
+{
+  tree_funcall *new_fc = new tree_funcall (fcn, args, line (), column ());
+
+  new_fc->copy_base (*new_fc);
+
+  return new_fc;
+}
+
+void
+tree_funcall::accept (tree_walker& tw)
+{
+  tw.visit_funcall (*this);
+}
+
+octave_value_list
+tree_funcall::rvalue (int nargout)
+{
+  octave_value_list retval;
+
+  retval = feval (fcn.function_value (), args, nargout);
+
+  if (retval.length () == 1 && retval(0).is_function ())
+    {
+      // The return object is a function. We may need to re-index it using the
+      // same logic as for identifier. This is primarily used for superclass
+      // references in classdef.
+
+      octave_value val = retval(0);
+      octave_function *f = val.function_value (true);
+
+      if (f && ! (is_postfix_indexed ()
+                  && f->is_postfix_index_handled (postfix_index ())))
+        {
+          octave_value_list tmp_args;
+
+          retval = val.do_multi_index_op (nargout, tmp_args);
+        }
+    }
+
+  return retval;
+}
new file mode 100644
--- /dev/null
+++ b/libinterp/parse-tree/pt-funcall.h
@@ -0,0 +1,98 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_tree_funcall_h)
+#define octave_tree_funcall_h 1
+
+#include "ov.h"
+#include "oct-obj.h"
+#include "parse.h"
+#include "pt-exp.h"
+
+// Function call.  This class only represents function calls that have
+// known functions (most useful for calls to built-in functions that
+// are generated by the parser) and fixed argument lists, known at
+// compile time.
+
+class
+tree_funcall : public tree_expression
+{
+public:
+
+  tree_funcall (const octave_value& f, const octave_value_list& a,
+                int l = -1, int c = -1)
+    : tree_expression (l, c), fcn (f), args (a)
+  {
+    if (! fcn.is_function ())
+      error ("tree_funcall: invalid function");
+  }
+
+  ~tree_funcall (void) { }
+
+  bool has_magic_end (void) const { return false; }
+
+  void print (std::ostream& os, bool pr_as_read_syntax = false,
+              bool pr_orig_txt = true);
+
+  void print_raw (std::ostream& os, bool pr_as_read_syntax = false,
+                  bool pr_orig_txt = true);
+
+  tree_funcall *dup (symbol_table::scope_id,
+                     symbol_table::context_id context) const;
+
+  octave_value rvalue1 (int nargout)
+  {
+    octave_value retval;
+
+    const octave_value_list tmp = rvalue (nargout);
+
+    if (! tmp.empty ())
+      retval = tmp(0);
+
+    return retval;
+  }
+
+  octave_value_list rvalue (int nargout);
+
+  octave_value function (void) const { return fcn; }
+
+  octave_value_list arguments (void) const { return args; }
+
+  void accept (tree_walker& tw);
+
+private:
+
+  // Function to call.  Error if not a valid function at time of
+  // construction.
+  octave_value fcn;
+
+  // Argument list.
+  octave_value_list args;
+
+  // No copying!
+
+  tree_funcall (const tree_funcall&);
+
+  tree_funcall& operator = (const tree_funcall&);
+};
+
+#endif
--- a/libinterp/parse-tree/pt-id.cc
+++ b/libinterp/parse-tree/pt-id.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -76,13 +76,19 @@
       //
       // If this identifier refers to a function, we need to know
       // whether it is indexed so that we can do the same thing
-      // for 'f' and 'f()'.  If the index is present, return the
-      // function object and let tree_index_expression::rvalue
-      // handle indexing.  Otherwise, arrange to call the function
-      // here, so that we don't return the function definition as
-      // a value.
+      // for 'f' and 'f()'.  If the index is present and the function
+      // object declares it can handle it, return the function object
+      // and let tree_index_expression::rvalue handle indexing.
+      // Otherwise, arrange to call the function here, so that we don't
+      // return the function definition as a value.
 
-      if (val.is_function () && ! is_postfix_indexed ())
+      octave_function *fcn = 0;
+
+      if (val.is_function ())
+        fcn = val.function_value (true);
+
+      if (fcn && ! (is_postfix_indexed ()
+                    && fcn->is_postfix_index_handled (postfix_index ())))
         {
           octave_value_list tmp_args;
 
--- a/libinterp/parse-tree/pt-id.h
+++ b/libinterp/parse-tree/pt-id.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,6 +32,7 @@
 
 class tree_walker;
 
+#include "oct-lvalue.h"
 #include "pt-bp.h"
 #include "pt-exp.h"
 #include "symtab.h"
--- a/libinterp/parse-tree/pt-idx.cc
+++ b/libinterp/parse-tree/pt-idx.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -220,7 +220,7 @@
               if (t.is_string () && t.rows () == 1)
                 fn = t.string_value ();
               else
-                error ("dynamic structure field names must be character strings");
+                error ("dynamic structure field names must be strings");
             }
         }
       else
@@ -363,7 +363,7 @@
                   // that argument list so we can pass the appropriate
                   // value to the built-in end function.
 
-                  const octave_value_list tmp_list
+                  octave_value_list tmp_list
                     = tmp.subsref (type.substr (tmpi, i - tmpi), idx, nargout);
 
                   tmp = tmp_list.length () ? tmp_list(0) : octave_value ();
@@ -375,6 +375,26 @@
 
                   if (error_state)
                     break;
+
+                  if (tmp.is_function ())
+                    {
+                      octave_function *fcn = tmp.function_value (true);
+
+                      if (fcn && ! fcn->is_postfix_index_handled (type[i]))
+                        {
+                          octave_value_list empty_args;
+
+                          tmp_list = tmp.do_multi_index_op (1, empty_args);
+                          tmp = (tmp_list.length ()
+                                 ? tmp_list(0) : octave_value ());
+
+                          if (tmp.is_cs_list ())
+                            gripe_indexed_cs_list ();
+
+                          if (error_state)
+                            break;
+                        }
+                    }
                 }
             }
 
@@ -412,8 +432,27 @@
         }
 
       if (! error_state)
-        retval = tmp.subsref (type.substr (tmpi, n - tmpi), idx, nargout,
-                              lvalue_list);
+        {
+          retval = tmp.subsref (type.substr (tmpi, n - tmpi), idx, nargout,
+                                lvalue_list);
+
+          octave_value val = retval.length () ? retval(0) : octave_value ();
+
+          if (! error_state && val.is_function ())
+            {
+              octave_function *fcn = val.function_value (true);
+
+              if (fcn)
+                {
+                  octave_value_list empty_args;
+
+                  retval = (lvalue_list
+                            ? val.do_multi_index_op (nargout, empty_args,
+                                                     lvalue_list)
+                            : val.do_multi_index_op (nargout, empty_args));
+                }
+            }
+        }
     }
 
   return retval;
--- a/libinterp/parse-tree/pt-idx.h
+++ b/libinterp/parse-tree/pt-idx.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-jump.cc
+++ b/libinterp/parse-tree/pt-jump.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-jump.h
+++ b/libinterp/parse-tree/pt-jump.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-loop.cc
+++ b/libinterp/parse-tree/pt-loop.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-loop.h
+++ b/libinterp/parse-tree/pt-loop.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-mat.cc
+++ b/libinterp/parse-tree/pt-mat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -26,6 +26,7 @@
 
 #include <iostream>
 
+#include "oct-locbuf.h"
 #include "quit.h"
 
 #include "data.h"
@@ -387,27 +388,30 @@
 
   first_elem = true;
 
-  for (iterator p = begin (); p != end (); p++)
+  if (! error_state)
     {
-      octave_quit ();
-
-      octave_value val = *p;
-
-      dim_vector this_elt_dv = val.dims ();
-
-      if (! this_elt_dv.zero_by_zero ())
+      for (iterator p = begin (); p != end (); p++)
         {
-          all_mt = false;
+          octave_quit ();
+
+          octave_value val = *p;
 
-          if (first_elem)
+          dim_vector this_elt_dv = val.dims ();
+
+          if (! this_elt_dv.zero_by_zero ())
             {
-              first_elem = false;
-              dv = this_elt_dv;
-            }
-          else if ((! any_class) && (! dv.hvcat (this_elt_dv, 1)))
-            {
-              eval_error ("horizontal dimensions mismatch", dv, this_elt_dv);
-              break;
+              all_mt = false;
+
+              if (first_elem)
+                {
+                  first_elem = false;
+                  dv = this_elt_dv;
+                }
+              else if ((! any_class) && (! dv.hvcat (this_elt_dv, 1)))
+                {
+                  eval_error ("horizontal dimensions mismatch", dv, this_elt_dv);
+                  break;
+                }
             }
         }
     }
@@ -684,7 +688,8 @@
 single_type_concat (Array<T>& result,
                     tm_const& tmp)
 {
-  octave_idx_type r = 0, c = 0;
+  octave_idx_type r = 0;
+  octave_idx_type c = 0;
 
   for (tm_const::iterator p = tmp.begin (); p != tmp.end (); p++)
     {
@@ -754,7 +759,8 @@
           return;
         }
 
-      octave_idx_type ncols = row.length (), i = 0;
+      octave_idx_type ncols = row.length ();
+      octave_idx_type i = 0;
       OCTAVE_LOCAL_BUFFER (Array<T>, array_list, ncols);
 
       for (tm_row_const::iterator q = row.begin ();
@@ -792,12 +798,14 @@
   // Sparse matrices require preallocation for efficient indexing; besides,
   // only horizontal concatenation can be efficiently handled by indexing.
   // So we just cat all rows through liboctave, then cat the final column.
-  octave_idx_type nrows = tmp.length (), j = 0;
+  octave_idx_type nrows = tmp.length ();
+  octave_idx_type j = 0;
   OCTAVE_LOCAL_BUFFER (Sparse<T>, sparse_row_list, nrows);
   for (tm_const::iterator p = tmp.begin (); p != tmp.end (); p++)
     {
       tm_row_const row = *p;
-      octave_idx_type ncols = row.length (), i = 0;
+      octave_idx_type ncols = row.length ();
+      octave_idx_type i = 0;
       OCTAVE_LOCAL_BUFFER (Sparse<T>, sparse_list, ncols);
 
       for (tm_row_const::iterator q = row.begin ();
@@ -830,12 +838,14 @@
       return;
     }
 
-  octave_idx_type nrows = tmp.length (), j = 0;
+  octave_idx_type nrows = tmp.length ();
+  octave_idx_type j = 0;
   OCTAVE_LOCAL_BUFFER (octave_map, map_row_list, nrows);
   for (tm_const::iterator p = tmp.begin (); p != tmp.end (); p++)
     {
       tm_row_const row = *p;
-      octave_idx_type ncols = row.length (), i = 0;
+      octave_idx_type ncols = row.length ();
+      octave_idx_type i = 0;
       OCTAVE_LOCAL_BUFFER (MAP, map_list, ncols);
 
       for (tm_row_const::iterator q = row.begin ();
--- a/libinterp/parse-tree/pt-mat.h
+++ b/libinterp/parse-tree/pt-mat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-misc.cc
+++ b/libinterp/parse-tree/pt-misc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-misc.h
+++ b/libinterp/parse-tree/pt-misc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-pr-code.cc
+++ b/libinterp/parse-tree/pt-pr-code.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -749,6 +749,18 @@
 }
 
 void
+tree_print_code::visit_funcall (tree_funcall& fc)
+{
+  indent ();
+
+  print_parens (fc, "(");
+
+  fc.print_raw (os, true, print_original_text);
+
+  print_parens (fc, ")");
+}
+
+void
 tree_print_code::visit_parameter_list (tree_parameter_list& lst)
 {
   tree_parameter_list::iterator p = lst.begin ();
@@ -1144,7 +1156,7 @@
 
   indent ();
 
-  os << "until";
+  os << "until ";
 
   tree_expression *expr = cmd.condition ();
 
@@ -1188,10 +1200,7 @@
     }
 }
 
-// Each print_code() function should call this before printing
-// anything.
-//
-// This doesn't need to be fast, but isn't there a better way?
+// Each print_code() function should call this before printing anything.
 
 void
 tree_print_code::indent (void)
@@ -1202,8 +1211,7 @@
     {
       os << prefix;
 
-      for (int i = 0; i < curr_print_indent_level; i++)
-        os << " ";
+      os << std::string (curr_print_indent_level, ' ');
 
       beginning_of_line = false;
     }
@@ -1218,6 +1226,9 @@
     os << alt_txt;
   else
     {
+      // Print prefix for blank lines.
+      indent ();
+
       os << "\n";
 
       beginning_of_line = true;
@@ -1268,7 +1279,13 @@
       if (c == '\n')
         {
           if (prev_char_was_newline)
-            os << "##";
+            {
+              printed_something = true;
+
+              indent ();
+
+              os << "##";
+            }
 
           newline ();
 
--- a/libinterp/parse-tree/pt-pr-code.h
+++ b/libinterp/parse-tree/pt-pr-code.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -109,6 +109,8 @@
 
   void visit_fcn_handle (tree_fcn_handle&);
 
+  void visit_funcall (tree_funcall&);
+
   void visit_parameter_list (tree_parameter_list&);
 
   void visit_postfix_expression (tree_postfix_expression&);
--- a/libinterp/parse-tree/pt-select.cc
+++ b/libinterp/parse-tree/pt-select.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -123,7 +123,7 @@
 {
   octave_value label_value = label->rvalue1 ();
 
-  if (! error_state && label_value.is_defined () )
+  if (! error_state && label_value.is_defined ())
     {
       if (label_value.is_cell ())
         {
--- a/libinterp/parse-tree/pt-select.h
+++ b/libinterp/parse-tree/pt-select.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-stmt.cc
+++ b/libinterp/parse-tree/pt-stmt.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-stmt.h
+++ b/libinterp/parse-tree/pt-stmt.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt-unop.cc
+++ b/libinterp/parse-tree/pt-unop.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -73,7 +73,7 @@
 
           if (! error_state)
             {
-              BEGIN_PROFILER_BLOCK ("prefix " + oper ())
+              BEGIN_PROFILER_BLOCK (tree_prefix_expression)
 
               ref.do_unary_op (etype);
 
@@ -89,7 +89,7 @@
 
           if (! error_state && val.is_defined ())
             {
-              BEGIN_PROFILER_BLOCK ("prefix " + oper ())
+              BEGIN_PROFILER_BLOCK (tree_prefix_expression)
 
               // Attempt to do the operation in-place if it is unshared
               // (a temporary expression).
@@ -162,8 +162,10 @@
             {
               retval = ref.value ();
 
-              BEGIN_PROFILER_BLOCK ("postfix " + oper ())
+              BEGIN_PROFILER_BLOCK (tree_postfix_expression)
+
               ref.do_unary_op (etype);
+
               END_PROFILER_BLOCK
             }
         }
@@ -173,7 +175,7 @@
 
           if (! error_state && val.is_defined ())
             {
-              BEGIN_PROFILER_BLOCK ("postfix " + oper ())
+              BEGIN_PROFILER_BLOCK (tree_postfix_expression)
 
               retval = ::do_unary_op (etype, val);
 
--- a/libinterp/parse-tree/pt-unop.h
+++ b/libinterp/parse-tree/pt-unop.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -108,6 +108,9 @@
 
   void accept (tree_walker& tw);
 
+  std::string profiler_name (void) const { return "prefix " + oper (); }
+
+
 private:
 
   // No copying!
@@ -145,6 +148,8 @@
 
   void accept (tree_walker& tw);
 
+  std::string profiler_name (void) const { return "postfix " + oper (); }
+
 private:
 
   // No copying!
--- a/libinterp/parse-tree/pt-walk.h
+++ b/libinterp/parse-tree/pt-walk.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -52,6 +52,7 @@
 class tree_no_op_command;
 class tree_constant;
 class tree_fcn_handle;
+class tree_funcall;
 class tree_parameter_list;
 class tree_postfix_expression;
 class tree_prefix_expression;
@@ -65,6 +66,24 @@
 class tree_while_command;
 class tree_do_until_command;
 
+class tree_classdef_attribute;
+class tree_classdef_attribute_list;
+class tree_classdef_superclass;
+class tree_classdef_superclass_list;
+class tree_classdef_property;
+class tree_classdef_property_list;
+class tree_classdef_properties_block;
+class tree_classdef_methods_list;
+class tree_classdef_methods_block;
+class tree_classdef_event;
+class tree_classdef_events_list;
+class tree_classdef_events_block;
+class tree_classdef_enum;
+class tree_classdef_enum_list;
+class tree_classdef_enum_block;
+class tree_classdef_body;
+class tree_classdef;
+
 class
 tree_walker
 {
@@ -158,6 +177,9 @@
   visit_fcn_handle (tree_fcn_handle&) = 0;
 
   virtual void
+  visit_funcall (tree_funcall&) = 0;
+
+  virtual void
   visit_parameter_list (tree_parameter_list&) = 0;
 
   virtual void
@@ -193,6 +215,57 @@
   virtual void
   visit_do_until_command (tree_do_until_command&) = 0;
 
+  virtual void
+  visit_classdef_attribute (tree_classdef_attribute&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_attribute_list (tree_classdef_attribute_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_superclass (tree_classdef_superclass&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_superclass_list (tree_classdef_superclass_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_property (tree_classdef_property&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_property_list (tree_classdef_property_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_properties_block (tree_classdef_properties_block&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_methods_list (tree_classdef_methods_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_methods_block (tree_classdef_methods_block&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_event (tree_classdef_event&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_events_list (tree_classdef_events_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_events_block (tree_classdef_events_block&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_enum (tree_classdef_enum&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_enum_list (tree_classdef_enum_list&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_enum_block (tree_classdef_enum_block&) { } /* = 0; */
+
+  virtual void
+  visit_classdef_body (tree_classdef_body&) { } /* = 0; */
+
+  virtual void
+  visit_classdef (tree_classdef&) { } /* = 0; */
+
 protected:
 
   tree_walker (void) { }
--- a/libinterp/parse-tree/pt.cc
+++ b/libinterp/parse-tree/pt.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/pt.h
+++ b/libinterp/parse-tree/pt.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/parse-tree/token.cc
+++ b/libinterp/parse-tree/token.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -108,38 +108,29 @@
   sr = s;
 }
 
-token::token (int tv, symbol_table::symbol_record *cls,
-              symbol_table::symbol_record *pkg, int l, int c)
+token::token (int tv, const std::string& mth, const std::string& cls,
+              int l, int c)
 {
   maybe_cmd = false;
   tspc = false;
   line_num = l;
   column_num = c;
   tok_val = tv;
-  type_tag = meta_rec_token;
-  mc.cr = cls;
-  mc.pr = pkg;
-}
-
-token::token (int tv, symbol_table::symbol_record *mth,
-              symbol_table::symbol_record *cls,
-              symbol_table::symbol_record *pkg, int l, int c)
-{
-  maybe_cmd = false;
-  tspc = false;
-  line_num = l;
-  column_num = c;
-  tok_val = tv;
-  type_tag = scls_rec_token;
-  sc.mr = mth;
-  sc.cr = cls;
-  sc.pr = pkg;
+  type_tag = scls_name_token;
+  sc.method_nm = new std::string (mth);
+  sc.class_nm = new std::string (cls);
 }
 
 token::~token (void)
 {
   if (type_tag == string_token)
     delete str;
+
+  if (type_tag == scls_name_token)
+    {
+      delete sc.method_nm;
+      delete sc.class_nm;
+    }
 }
 
 std::string
@@ -183,39 +174,18 @@
   return sr;
 }
 
-symbol_table::symbol_record *
-token::method_rec (void)
+std::string
+token::superclass_method_name (void)
 {
-  assert (type_tag == scls_rec_token);
-  return sc.mr;
-}
-
-symbol_table::symbol_record *
-token::class_rec (void)
-{
-  assert (type_tag == scls_rec_token);
-  return sc.cr;
+  assert (type_tag == scls_name_token);
+  return *sc.method_nm;
 }
 
-symbol_table::symbol_record *
-token::package_rec (void)
-{
-  assert (type_tag == scls_rec_token);
-  return sc.pr;
-}
-
-symbol_table::symbol_record *
-token::meta_class_rec (void)
+std::string
+token::superclass_class_name (void)
 {
-  assert (type_tag == meta_rec_token);
-  return mc.cr;
-}
-
-symbol_table::symbol_record *
-token::meta_package_rec (void)
-{
-  assert (type_tag == meta_rec_token);
-  return mc.pr;
+  assert (type_tag == scls_name_token);
+  return *sc.class_nm;
 }
 
 std::string
--- a/libinterp/parse-tree/token.h
+++ b/libinterp/parse-tree/token.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -40,8 +40,7 @@
     double_token,
     ettype_token,
     sym_rec_token,
-    scls_rec_token,
-    meta_rec_token
+    scls_name_token,
   };
 
   enum end_tok_type
@@ -57,9 +56,9 @@
     parfor_end,
     properties_end,
     switch_end,
+    try_catch_end,
+    unwind_protect_end,
     while_end,
-    try_catch_end,
-    unwind_protect_end
   };
 
   token (int tv, int l = -1, int c = -1);
@@ -70,11 +69,8 @@
          int l = -1, int c = -1);
   token (int tv, end_tok_type t, int l = -1, int c = -1);
   token (int tv, symbol_table::symbol_record *s, int l = -1, int c = -1);
-  token (int tv, symbol_table::symbol_record *cls,
-         symbol_table::symbol_record *pkg, int l = -1, int c = -1);
-  token (int tv, symbol_table::symbol_record *mth,
-         symbol_table::symbol_record *cls,
-         symbol_table::symbol_record *pkg, int l = -1, int c = -1);
+  token (int tv, const std::string& mth, const std::string& cls,
+         int l = -1, int c = -1);
 
   ~token (void);
 
@@ -107,12 +103,8 @@
   end_tok_type ettype (void) const;
   symbol_table::symbol_record *sym_rec (void);
 
-  symbol_table::symbol_record *method_rec (void);
-  symbol_table::symbol_record *class_rec (void);
-  symbol_table::symbol_record *package_rec (void);
-
-  symbol_table::symbol_record *meta_class_rec (void);
-  symbol_table::symbol_record *meta_package_rec (void);
+  std::string superclass_method_name (void);
+  std::string superclass_class_name (void);
 
   std::string text_rep (void);
 
@@ -138,15 +130,9 @@
     symbol_table::symbol_record *sr;
     struct
     {
-      symbol_table::symbol_record *mr;
-      symbol_table::symbol_record *cr;
-      symbol_table::symbol_record *pr;
+      std::string *method_nm;
+      std::string *class_nm;
     } sc;
-    struct
-    {
-      symbol_table::symbol_record *cr;
-      symbol_table::symbol_record *pr;
-    } mc;
   };
   std::string orig_text;
 };
--- a/libinterp/template-inst/Array-jit.cc
+++ b/libinterp/template-inst/Array-jit.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Max Brister
+Copyright (C) 2012-2015 Max Brister
 
 This file is part of Octave.
 
--- a/libinterp/template-inst/Array-os.cc
+++ b/libinterp/template-inst/Array-os.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/template-inst/Array-sym.cc
+++ b/libinterp/template-inst/Array-sym.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/template-inst/Array-tc.cc
+++ b/libinterp/template-inst/Array-tc.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/version.cc
+++ b/libinterp/version.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
+Copyright (C) 2013-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/libinterp/version.in.h
+++ b/libinterp/version.in.h
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 1992-2013 John W. Eaton
+Copyright (C) 1992-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/Makefile.am
+++ b/liboctave/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's liboctave directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -20,10 +20,6 @@
 
 include $(top_srcdir)/build-aux/common.mk
 
-## Run cruft dir with stand-alone Makefile.
-## Eventually this will use module.mk syntax.
-SUBDIRS = cruft
-
 ## Search local directories before those specified by the user.
 AM_CPPFLAGS = \
   -I$(srcdir)/array \
@@ -55,6 +51,7 @@
 
 octinclude_HEADERS = \
   $(ARRAY_INC) \
+  $(CRUFT_INC) \
   $(NUMERIC_INC) \
   $(OPERATORS_INC) \
   $(SYSTEM_INC) \
@@ -75,7 +72,10 @@
 
 ## A list of all files that could include tests
 
+liboctave_la_LIBADD =
+
 include array/module.mk
+include cruft/module.mk
 include numeric/module.mk
 include operators/module.mk
 include system/module.mk
@@ -92,19 +92,12 @@
 # Dummy C++ source to force C++ linking.
 nodist_EXTRA_liboctave_la_SOURCES = dummy.cc
 
-liboctave_la_LIBADD = \
-  array/libarray.la \
-  cruft/libcruft.la \
-  cruft/ranlib/libranlib.la \
-  numeric/libnumeric.la \
-  operators/liboperators.la \
-  system/libsystem.la \
-  util/libutil.la \
+liboctave_la_LIBADD += \
   $(top_builddir)/libgnu/libgnu.la \
   $(LIBOCTAVE_LINK_DEPS)
 
 # Increment these as needed and according to the rules in the libtool manual:
-liboctave_current = 2
+liboctave_current = 3
 liboctave_revision = 0
 liboctave_age = 0
 
--- a/liboctave/array/Array-C.cc
+++ b/liboctave/array/Array-C.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -41,22 +41,18 @@
   return xisnan (x);
 }
 
+// Sort Criteria: 1) isnan, 2) magnitude of z, 3) phase of z in range (-pi, pi]
+
 static bool
 nan_ascending_compare (const Complex& x, const Complex& y)
 {
-  return (xisnan (y)
-          ? ! xisnan (x)
-          : ((std::abs (x) < std::abs (x))
-             || ((std::abs (x) == std::abs (x)) && (arg (x) < arg (x)))));
+  return xisnan (y) ? ! xisnan (x) : x < y;
 }
 
 static bool
 nan_descending_compare (const Complex& x, const Complex& y)
 {
-  return (xisnan (x)
-          ? ! xisnan (y)
-          : ((std::abs (x) > std::abs (x))
-             || ((std::abs (x) == std::abs (x)) && (arg (x) > arg (x)))));
+  return xisnan (x) ? ! xisnan (y) : x > y;
 }
 
 Array<Complex>::compare_fcn_type
@@ -88,7 +84,7 @@
   return result;
 }
 
-INSTANTIATE_ARRAY_SORT (Complex);
+template class OCTAVE_API octave_sort<Complex>;
 
 INSTANTIATE_ARRAY (Complex, OCTAVE_API);
 
--- a/liboctave/array/Array-b.cc
+++ b/liboctave/array/Array-b.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -52,7 +52,8 @@
   // FIXME: This is essentially a simple bucket sort.
   // Can it be efficiently done by std::partition?
   OCTAVE_LOCAL_BUFFER (octave_idx_type, jdx, nel);
-  octave_idx_type k = 0, l = 0;
+  octave_idx_type k = 0;
+  octave_idx_type l = 0;
   for (octave_idx_type i = 0; i < nel; i++)
     {
       if (data[i] == desc)
@@ -103,7 +104,7 @@
   do_bool_partition<true> (data, idx, nel);
 }
 
-INSTANTIATE_ARRAY_SORT (bool);
+template class OCTAVE_API octave_sort<bool>;
 
 INSTANTIATE_ARRAY (bool, OCTAVE_API);
 
--- a/liboctave/array/Array-ch.cc
+++ b/liboctave/array/Array-ch.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,7 +32,7 @@
 #define INLINE_DESCENDING_SORT
 #include "oct-sort.cc"
 
-INSTANTIATE_ARRAY_SORT (char);
+template class OCTAVE_API octave_sort<char>;
 
 INSTANTIATE_ARRAY (char, OCTAVE_API);
 
--- a/liboctave/array/Array-d.cc
+++ b/liboctave/array/Array-d.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -155,7 +155,7 @@
   return mode;
 }
 
-INSTANTIATE_ARRAY_SORT (double);
+template class OCTAVE_API octave_sort<double>;
 
 INSTANTIATE_ARRAY (double, OCTAVE_API);
 
--- a/liboctave/array/Array-f.cc
+++ b/liboctave/array/Array-f.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -155,7 +155,7 @@
   return mode;
 }
 
-INSTANTIATE_ARRAY_SORT (float);
+template class OCTAVE_API octave_sort<float>;
 
 INSTANTIATE_ARRAY (float, OCTAVE_API);
 
--- a/liboctave/array/Array-fC.cc
+++ b/liboctave/array/Array-fC.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -41,22 +41,18 @@
   return xisnan (x);
 }
 
+// Sort Criteria: 1) isnan, 2) magnitude of z, 3) phase of z in range (-pi, pi]
+
 static bool
 nan_ascending_compare (const FloatComplex& x, const FloatComplex& y)
 {
-  return (xisnan (y)
-          ? ! xisnan (x)
-          : ((std::abs (x) < std::abs (x))
-             || ((std::abs (x) == std::abs (x)) && (arg (x) < arg (x)))));
+  return xisnan (y) ? ! xisnan (x) : x < y;
 }
 
 static bool
 nan_descending_compare (const FloatComplex& x, const FloatComplex& y)
 {
-  return (xisnan (x)
-          ? ! xisnan (y)
-          : ((std::abs (x) > std::abs (x))
-             || ((std::abs (x) == std::abs (x)) && (arg (x) > arg (x)))));
+  return xisnan (x) ? ! xisnan (y) : x > y;
 }
 
 Array<FloatComplex>::compare_fcn_type
@@ -88,7 +84,7 @@
   return result;
 }
 
-INSTANTIATE_ARRAY_SORT (FloatComplex);
+template class OCTAVE_API octave_sort<FloatComplex>;
 
 INSTANTIATE_ARRAY (FloatComplex, OCTAVE_API);
 
--- a/liboctave/array/Array-i.cc
+++ b/liboctave/array/Array-i.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -35,10 +35,10 @@
 #define INLINE_DESCENDING_SORT
 #include "oct-sort.cc"
 
-INSTANTIATE_ARRAY_SORT (int);
-INSTANTIATE_ARRAY_SORT (long);
+template class OCTAVE_API octave_sort<int>;
+template class OCTAVE_API octave_sort<long>;
 #if defined (HAVE_LONG_LONG_INT)
-INSTANTIATE_ARRAY_SORT (long long);
+template class OCTAVE_API octave_sort<long long>;
 #endif
 
 INSTANTIATE_ARRAY (int, OCTAVE_API);
@@ -47,20 +47,20 @@
 INSTANTIATE_ARRAY (long long, OCTAVE_API);
 #endif
 
-INSTANTIATE_ARRAY_SORT (octave_int8);
-INSTANTIATE_ARRAY_SORT (octave_int16);
-INSTANTIATE_ARRAY_SORT (octave_int32);
-INSTANTIATE_ARRAY_SORT (octave_int64);
+template class OCTAVE_API octave_sort<octave_int8>;
+template class OCTAVE_API octave_sort<octave_int16>;
+template class OCTAVE_API octave_sort<octave_int32>;
+template class OCTAVE_API octave_sort<octave_int64>;
 
 INSTANTIATE_ARRAY (octave_int8, OCTAVE_API);
 INSTANTIATE_ARRAY (octave_int16, OCTAVE_API);
 INSTANTIATE_ARRAY (octave_int32, OCTAVE_API);
 INSTANTIATE_ARRAY (octave_int64, OCTAVE_API);
 
-INSTANTIATE_ARRAY_SORT (octave_uint8);
-INSTANTIATE_ARRAY_SORT (octave_uint16);
-INSTANTIATE_ARRAY_SORT (octave_uint32);
-INSTANTIATE_ARRAY_SORT (octave_uint64);
+template class OCTAVE_API octave_sort<octave_uint8>;
+template class OCTAVE_API octave_sort<octave_uint16>;
+template class OCTAVE_API octave_sort<octave_uint32>;
+template class OCTAVE_API octave_sort<octave_uint64>;
 
 INSTANTIATE_ARRAY (octave_uint8, OCTAVE_API);
 INSTANTIATE_ARRAY (octave_uint16, OCTAVE_API);
--- a/liboctave/array/Array-idx-vec.cc
+++ b/liboctave/array/Array-idx-vec.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/Array-s.cc
+++ b/liboctave/array/Array-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -33,7 +33,7 @@
 #define INLINE_DESCENDING_SORT
 #include "oct-sort.cc"
 
-INSTANTIATE_ARRAY_SORT (short);
+template class OCTAVE_API octave_sort<short>;
 
 INSTANTIATE_ARRAY (short, OCTAVE_API);
 
--- a/liboctave/array/Array-str.cc
+++ b/liboctave/array/Array-str.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -32,6 +32,6 @@
 #include "Array.cc"
 #include "oct-sort.cc"
 
-INSTANTIATE_ARRAY_SORT (std::string);
+template class OCTAVE_API octave_sort<std::string>;
 
 INSTANTIATE_ARRAY (std::string, OCTAVE_API);
--- a/liboctave/array/Array-util.cc
+++ b/liboctave/array/Array-util.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -423,9 +423,11 @@
 dim_vector
 zero_dims_inquire (const Array<idx_vector>& ia, const dim_vector& rhdv)
 {
-  int ial = ia.length (), rhdvl = rhdv.length ();
+  int ial = ia.length ();
+  int rhdvl = rhdv.length ();
   dim_vector rdv = dim_vector::alloc (ial);
-  bool *scalar = new bool [ial], *colon = new bool [ial];
+  bool *scalar = new bool [ial];
+  bool *colon = new bool [ial];
   // Mark scalars and colons, count non-scalar indices.
   int nonsc = 0;
   bool all_colons = true;
@@ -479,7 +481,8 @@
 zero_dims_inquire (const idx_vector& i, const idx_vector& j,
                    const dim_vector& rhdv)
 {
-  bool icol = i.is_colon (), jcol = j.is_colon ();
+  bool icol = i.is_colon ();
+  bool jcol = j.is_colon ();
   dim_vector rdv;
   if (icol && jcol && rhdv.length () == 2)
     {
@@ -563,10 +566,12 @@
       else if (all_ranges && clen != 0)
         {
           // All ranges case - the result is a range.
-          octave_idx_type start = 0, step = 0;
+          octave_idx_type start = 0;
+          octave_idx_type step = 0;
           for (octave_idx_type i = len - 1; i >= 0; i--)
             {
-              octave_idx_type xstart = idxa(i)(0), xstep = idxa(i)(1) - xstart;
+              octave_idx_type xstart = idxa(i)(0);
+              octave_idx_type xstep = idxa(i)(1) - xstart;
               start = start * dvx(i) + xstart;
               step = step * dvx(i) + xstep;
             }
@@ -597,7 +602,8 @@
 Array<idx_vector>
 ind2sub (const dim_vector& dv, const idx_vector& idx)
 {
-  octave_idx_type len = idx.length (0), n = dv.length ();
+  octave_idx_type len = idx.length (0);
+  octave_idx_type n = dv.length ();
   Array<idx_vector> retval (dim_vector (n, 1));
   octave_idx_type numel = dv.numel ();
 
--- a/liboctave/array/Array-util.h
+++ b/liboctave/array/Array-util.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/Array-voidp.cc
+++ b/liboctave/array/Array-voidp.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/Array.cc
+++ b/liboctave/array/Array.cc
@@ -1,7 +1,7 @@
 // Template array classes
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -76,7 +76,7 @@
       slice_data = rep->data;
     }
   else
-    fill_or_memset (slice_len, val, slice_data);
+    std::fill_n (slice_data, slice_len, val);
 }
 
 template <class T>
@@ -270,7 +270,9 @@
 Array<T>
 Array<T>::page (octave_idx_type k) const
 {
-  octave_idx_type r = dimensions(0), c = dimensions (1), p = r*c;
+  octave_idx_type r = dimensions(0);
+  octave_idx_type c = dimensions(1);
+  octave_idx_type p = r*c;
 #ifdef BOUNDS_CHECKING
   if (k < 0 || k > dimensions.numel (2))
     gripe_index_out_of_range (3, 3, k+1, dimensions.numel (2));
@@ -393,10 +395,11 @@
   {
     if (lev == 0)
       {
-        octave_idx_type step = stride[0], len = dim[0];
+        octave_idx_type step = stride[0];
+        octave_idx_type len = dim[0];
         if (step == 1)
           {
-            copy_or_memcpy (len, src, dest);
+            std::copy (src, src + len, dest);
             dest += len;
           }
         else
@@ -411,7 +414,8 @@
       dest = blk_trans (src, dest, dim[1], dim[0]);
     else
       {
-        octave_idx_type step = stride[lev], len = dim[lev];
+        octave_idx_type step = stride[lev];
+        octave_idx_type len = dim[lev];
         for (octave_idx_type i = 0, j = 0; i < len; i++, j+= step)
           dest = do_permute (src + i * step, dest, lev-1);
       }
@@ -568,7 +572,8 @@
       dest += idx[0].index (src, dim[0], dest);
     else
       {
-        octave_idx_type nn = idx[lev].length (dim[lev]), d = cdim[lev];
+        octave_idx_type nn = idx[lev].length (dim[lev]);
+        octave_idx_type d = cdim[lev];
         for (octave_idx_type i = 0; i < nn; i++)
           dest = do_index (src + d*idx[lev].xelem (i), dest, lev-1);
       }
@@ -584,7 +589,8 @@
       src += idx[0].assign (src, dim[0], dest);
     else
       {
-        octave_idx_type nn = idx[lev].length (dim[lev]), d = cdim[lev];
+        octave_idx_type nn = idx[lev].length (dim[lev]);
+        octave_idx_type d = cdim[lev];
         for (octave_idx_type i = 0; i < nn; i++)
           src = do_assign (src, dest + d*idx[lev].xelem (i), lev-1);
       }
@@ -600,7 +606,8 @@
       idx[0].fill (val, dim[0], dest);
     else
       {
-        octave_idx_type nn = idx[lev].length (dim[lev]), d = cdim[lev];
+        octave_idx_type nn = idx[lev].length (dim[lev]);
+        octave_idx_type d = cdim[lev];
         for (octave_idx_type i = 0; i < nn; i++)
           do_fill (val, dest + d*idx[lev].xelem (i), lev-1);
       }
@@ -655,7 +662,8 @@
     sext = cext + n;
     dext = sext + n;
 
-    octave_idx_type sld = ld, dld = ld;
+    octave_idx_type sld = ld;
+    octave_idx_type dld = ld;
     for (int j = 0; j < n; j++)
       {
         cext[j] = std::min (ndv(i+j), odv(i+j));
@@ -675,16 +683,18 @@
   {
     if (lev == 0)
       {
-        copy_or_memcpy (cext[0], src, dest);
-        fill_or_memset (dext[0] - cext[0], rfv, dest + cext[0]);
+        std::copy (src, src+cext[0], dest);
+        std::fill_n (dest + cext[0], dext[0] - cext[0], rfv);
       }
     else
       {
-        octave_idx_type sd = sext[lev-1], dd = dext[lev-1], k;
+        octave_idx_type sd, dd, k;
+        sd = sext[lev-1];
+        dd = dext[lev-1];
         for (k = 0; k < cext[lev]; k++)
           do_resize_fill (src + k * sd, dest + k * dd, rfv, lev - 1);
 
-        fill_or_memset (dext[lev] - k * dd, rfv, dest + k * dd);
+        std::fill_n (dest + k * dd, dext[lev] - k * dd, rfv);
       }
   }
 
@@ -771,7 +781,8 @@
 {
   // Get dimensions, allowing Fortran indexing in the 2nd dim.
   dim_vector dv = dimensions.redim (2);
-  octave_idx_type r = dv(0), c = dv(1);
+  octave_idx_type r = dv(0);
+  octave_idx_type c = dv(1);
   Array<T> retval;
 
   if (i.is_colon () && j.is_colon ())
@@ -786,7 +797,9 @@
       if (j.extent (c) != c)
         gripe_index_out_of_range (2, 2, j.extent (c), c); // throws
 
-      octave_idx_type n = numel (), il = i.length (r), jl = j.length (c);
+      octave_idx_type n = numel ();
+      octave_idx_type il = i.length (r);
+      octave_idx_type jl = j.length (c);
 
       idx_vector ii (i);
 
@@ -946,7 +959,7 @@
                   Array<T> tmp (Array<T> (dim_vector (nn, 1)), dv, 0, n);
                   T *dest = tmp.fortran_vec ();
 
-                  copy_or_memcpy (nx, data (), dest);
+                  std::copy (data (), data () + nx, dest);
                   dest[nx] = rfv;
 
                   *this = tmp;
@@ -957,9 +970,10 @@
               Array<T> tmp = Array<T> (dv);
               T *dest = tmp.fortran_vec ();
 
-              octave_idx_type n0 = std::min (n, nx), n1 = n - n0;
-              copy_or_memcpy (n0, data (), dest);
-              fill_or_memset (n1, rfv, dest + n0);
+              octave_idx_type n0 = std::min (n, nx);
+              octave_idx_type n1 = n - n0;
+              std::copy (data (), data () + n0, dest);
+              std::fill_n (dest + n0, n1, rfv);
 
               *this = tmp;
             }
@@ -975,33 +989,36 @@
 {
   if (r >= 0 && c >= 0 && ndims () == 2)
     {
-      octave_idx_type rx = rows (), cx = columns ();
+      octave_idx_type rx = rows ();
+      octave_idx_type cx = columns ();
       if (r != rx || c != cx)
         {
           Array<T> tmp = Array<T> (dim_vector (r, c));
           T *dest = tmp.fortran_vec ();
 
-          octave_idx_type r0 = std::min (r, rx), r1 = r - r0;
-          octave_idx_type c0 = std::min (c, cx), c1 = c - c0;
+          octave_idx_type r0 = std::min (r, rx);
+          octave_idx_type r1 = r - r0;
+          octave_idx_type c0 = std::min (c, cx);
+          octave_idx_type c1 = c - c0;
           const T *src = data ();
           if (r == rx)
             {
-              copy_or_memcpy (r * c0, src, dest);
+              std::copy (src, src + r * c0, dest);
               dest += r * c0;
             }
           else
             {
               for (octave_idx_type k = 0; k < c0; k++)
                 {
-                  copy_or_memcpy (r0, src, dest);
+                  std::copy (src, src + r0, dest);
                   src += rx;
                   dest += r0;
-                  fill_or_memset (r1, rfv, dest);
+                  std::fill_n (dest, r1, rfv);
                   dest += r1;
                 }
             }
 
-          fill_or_memset (r * c1, rfv, dest);
+          std::fill_n (dest, r * c1, rfv);
 
           *this = tmp;
         }
@@ -1042,7 +1059,8 @@
   Array<T> tmp = *this;
   if (resize_ok)
     {
-      octave_idx_type n = numel (), nx = i.extent (n);
+      octave_idx_type n = numel ();
+      octave_idx_type nx = i.extent (n);
       if (n != nx)
         {
           if (i.is_scalar ())
@@ -1067,8 +1085,10 @@
   if (resize_ok)
     {
       dim_vector dv = dimensions.redim (2);
-      octave_idx_type r = dv(0), c = dv(1);
-      octave_idx_type rx = i.extent (r), cx = j.extent (c);
+      octave_idx_type r = dv(0);
+      octave_idx_type c = dv(1);
+      octave_idx_type rx = i.extent (r);
+      octave_idx_type cx = j.extent (c);
       if (r != rx || c != cx)
         {
           if (i.is_scalar () && j.is_scalar ())
@@ -1119,7 +1139,8 @@
 void
 Array<T>::assign (const idx_vector& i, const Array<T>& rhs, const T& rfv)
 {
-  octave_idx_type n = numel (), rhl = rhs.numel ();
+  octave_idx_type n = numel ();
+  octave_idx_type rhl = rhs.numel ();
 
   if (rhl == 1 || i.length (n) == rhl)
     {
@@ -1190,7 +1211,8 @@
     }
 
   bool isfill = rhs.numel () == 1;
-  octave_idx_type il = i.length (rdv(0)), jl = j.length (rdv(1));
+  octave_idx_type il = i.length (rdv(0));
+  octave_idx_type jl = j.length (rdv(1));
   rhdv.chop_all_singletons ();
   bool match = (isfill
                 || (rhdv.length () == 2 && il == rhdv(0) && jl == rhdv(1)));
@@ -1228,7 +1250,9 @@
       else
         {
           // The actual work.
-          octave_idx_type n = numel (), r = dv (0), c = dv (1);
+          octave_idx_type n = numel ();
+          octave_idx_type r = dv(0);
+          octave_idx_type c = dv(1);
           idx_vector ii (i);
 
           const T* src = rhs.data ();
@@ -1299,10 +1323,13 @@
         }
 
       // Check whether LHS and RHS match, up to singleton dims.
-      bool match = true, all_colons = true, isfill = rhs.numel () == 1;
+      bool match = true;
+      bool all_colons = true;
+      bool isfill = rhs.numel () == 1;
 
       rhdv.chop_all_singletons ();
-      int j = 0, rhdvl = rhdv.length ();
+      int j = 0;
+      int rhdvl = rhdv.length ();
       for (int i = 0; i < ial; i++)
         {
           all_colons = all_colons && ia(i).is_colon_equiv (rdv(i));
@@ -1389,8 +1416,8 @@
           Array<T> tmp (dim_vector (col_vec ? m : 1, !col_vec ? m : 1));
           const T *src = data ();
           T *dest = tmp.fortran_vec ();
-          copy_or_memcpy (l, src, dest);
-          copy_or_memcpy (n - u, src + u, dest + l);
+          std::copy (src, src + l, dest);
+          std::copy (src + u, src + n, dest + l);
           *this = tmp;
         }
       else
@@ -1427,7 +1454,9 @@
       if (i.is_cont_range (n, l, u))
         {
           // Special case deleting a contiguous range.
-          octave_idx_type nd = n + l - u, dl = 1, du = 1;
+          octave_idx_type nd = n + l - u;
+          octave_idx_type dl = 1;
+          octave_idx_type du = 1;
           dim_vector rdv = dimensions;
           rdv(dim) = nd;
           for (int k = 0; k < dim; k++) dl *= dimensions(k);
@@ -1440,9 +1469,9 @@
           l *= dl; u *= dl; n *= dl;
           for (octave_idx_type k = 0; k < du; k++)
             {
-              copy_or_memcpy (l, src, dest);
+              std::copy (src, src + l, dest);
               dest += l;
-              copy_or_memcpy (n - u, src + u, dest);
+              std::copy (src + u, src + n, dest);
               dest += n - u;
               src += n;
             }
@@ -1776,7 +1805,8 @@
         {
           // copy and partition out NaNs.
           // FIXME: impact on integer types noticeable?
-          octave_idx_type kl = 0, ku = ns;
+          octave_idx_type kl = 0;
+          octave_idx_type ku = ns;
           for (octave_idx_type i = 0; i < ns; i++)
             {
               T tmp = ov[i];
@@ -1820,7 +1850,8 @@
 
           // gather and partition out NaNs.
           // FIXME: impact on integer types noticeable?
-          octave_idx_type kl = 0, ku = ns;
+          octave_idx_type kl = 0;
+          octave_idx_type ku = ns;
           for (octave_idx_type i = 0; i < ns; i++)
             {
               T tmp = ov[i*stride + offset];
@@ -1898,7 +1929,8 @@
         {
           // copy and partition out NaNs.
           // FIXME: impact on integer types noticeable?
-          octave_idx_type kl = 0, ku = ns;
+          octave_idx_type kl = 0;
+          octave_idx_type ku = ns;
           for (octave_idx_type i = 0; i < ns; i++)
             {
               T tmp = ov[i];
@@ -1956,7 +1988,8 @@
 
           // gather and partition out NaNs.
           // FIXME: impact on integer types noticeable?
-          octave_idx_type kl = 0, ku = ns;
+          octave_idx_type kl = 0;
+          octave_idx_type ku = ns;
           for (octave_idx_type i = 0; i < ns; i++)
             {
               T tmp = ov[i*stride + offset];
@@ -2056,7 +2089,8 @@
 
   octave_sort<T> lsort (safe_comparator (mode, *this, true));
 
-  octave_idx_type r = rows (), c = cols ();
+  octave_idx_type r = rows ();
+  octave_idx_type c = cols ();
 
   idx = Array<octave_idx_type> (dim_vector (r, 1));
 
@@ -2072,7 +2106,8 @@
 {
   octave_sort<T> lsort;
 
-  octave_idx_type r = rows (), c = cols ();
+  octave_idx_type r = rows ();
+  octave_idx_type c = cols ();
 
   if (r <= 1 || c == 0)
     return mode ? mode : ASCENDING;
@@ -2086,7 +2121,8 @@
       octave_idx_type i;
       for (i = 0; i < cols (); i++)
         {
-          T l = elem (0, i), u = elem (rows () - 1, i);
+          T l = elem (0, i);
+          T u = elem (rows () - 1, i);
           if (compare (l, u))
             {
               if (mode == DESCENDING)
@@ -2150,7 +2186,8 @@
 Array<octave_idx_type>
 Array<T>::lookup (const Array<T>& values, sortmode mode) const
 {
-  octave_idx_type n = numel (), nval = values.numel ();
+  octave_idx_type n = numel ();
+  octave_idx_type nval = values.numel ();
   octave_sort<T> lsort;
   Array<octave_idx_type> idx (values.dims ());
 
@@ -2194,7 +2231,8 @@
 Array<T>::nnz (void) const
 {
   const T *src = data ();
-  octave_idx_type nel = nelem (), retval = 0;
+  octave_idx_type nel = nelem ();
+  octave_idx_type retval = 0;
   const T zero = T ();
   for (octave_idx_type i = 0; i < nel; i++)
     if (src[i] != zero)
@@ -2233,7 +2271,8 @@
       if (backward)
         {
           // Do the search as a series of successive single-element searches.
-          octave_idx_type k = 0, l = nel - 1;
+          octave_idx_type k = 0;
+          octave_idx_type l = nel - 1;
           for (; k < n; k++)
             {
               for (; l >= 0 && src[l] == zero; l--) ;
@@ -2250,7 +2289,8 @@
       else
         {
           // Do the search as a series of successive single-element searches.
-          octave_idx_type k = 0, l = 0;
+          octave_idx_type k = 0;
+          octave_idx_type l = 0;
           for (; k < n; k++)
             {
               for (; l != nel && src[l] == zero; l++) ;
@@ -2369,7 +2409,8 @@
 
   for (octave_idx_type j = 0; j < iter; j++)
     {
-      octave_idx_type kl = 0, ku = ns;
+      octave_idx_type kl = 0;
+      octave_idx_type ku = ns;
 
       if (stride == 1)
         {
@@ -2437,9 +2478,6 @@
   return m;
 }
 
-
-#define INSTANTIATE_ARRAY_SORT(T) template class OCTAVE_API octave_sort<T>;
-
 #define NO_INSTANTIATE_ARRAY_SORT(T) \
  \
 template <> Array<T>  \
@@ -2480,7 +2518,7 @@
 { return Array<octave_idx_type> (); } \
  \
 template <> Array<T>  \
-Array<T>::nth_element (const idx_vector&, int) const { return Array<T> (); } \
+Array<T>::nth_element (const idx_vector&, int) const { return Array<T> (); }
 
 
 template <class T>
@@ -2530,9 +2568,8 @@
                     d.xelem (i) = elem (i, i);
                 }
             }
-          else
-            (*current_liboctave_error_handler)
-              ("diag: requested diagonal out of range");
+          else  // Matlab returns [] 0x1 for out-of-range diagonal
+            d.resize (dim_vector (0, 1));
         }
       else
         {
--- a/liboctave/array/Array.h
+++ b/liboctave/array/Array.h
@@ -1,7 +1,7 @@
 // Template array classes
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2010 VZLU Prague
 
@@ -38,22 +38,16 @@
 #include "lo-utils.h"
 #include "oct-sort.h"
 #include "quit.h"
-#include "oct-mem.h"
 #include "oct-refcount.h"
 
-// One dimensional array class.  Handles the reference counting for
-// all the derived classes.
-
+//!Handles the reference counting for all the derived classes.
 template <class T>
 class
 Array
 {
 protected:
 
-  //--------------------------------------------------------------------
-  // The real representation of all arrays.
-  //--------------------------------------------------------------------
-
+  //! The real representation of all arrays.
   class ArrayRep
   {
   public:
@@ -63,14 +57,14 @@
     octave_refcount<int> count;
 
     ArrayRep (T *d, octave_idx_type l)
-      : data (no_ctor_new<T> (l)), len (l), count (1)
+      : data (new T [l]), len (l), count (1)
     {
-      copy_or_memcpy (l, d, data);
+      std::copy (d, d+l, data);
     }
 
     template <class U>
     ArrayRep (U *d, octave_idx_type l)
-      : data (no_ctor_new<T> (l)), len (l), count (1)
+      : data (new T [l]), len (l), count (1)
     {
       std::copy (d, d+l, data);
     }
@@ -78,21 +72,21 @@
     ArrayRep (void) : data (0), len (0), count (1) { }
 
     explicit ArrayRep (octave_idx_type n)
-      : data (no_ctor_new<T> (n)), len (n), count (1) { }
+      : data (new T [n]), len (n), count (1) { }
 
     explicit ArrayRep (octave_idx_type n, const T& val)
-      : data (no_ctor_new<T> (n)), len (n), count (1)
+      : data (new T [n]), len (n), count (1)
     {
-      fill_or_memset (n, val, data);
+      std::fill_n (data, n, val);
     }
 
     ArrayRep (const ArrayRep& a)
-      : data (no_ctor_new<T> (a.len)), len (a.len), count (1)
+      : data (new T [a.len]), len (a.len), count (1)
     {
-      copy_or_memcpy (a.len, a.data, data);
+      std::copy (a.data, a.data + a.len, data);
     }
 
-    ~ArrayRep (void) { no_ctor_delete<T> (data); }
+    ~ArrayRep (void) { delete [] data; }
 
     octave_idx_type length (void) const { return len; }
 
@@ -144,7 +138,7 @@
   T* slice_data;
   octave_idx_type slice_len;
 
-  // slice constructor
+  //! slice constructor
   Array (const Array<T>& a, const dim_vector& dv,
          octave_idx_type l, octave_idx_type u)
     : dimensions (dv), rep(a.rep), slice_data (a.slice_data+l), slice_len (u-l)
@@ -167,7 +161,7 @@
 
 protected:
 
-  // For jit support
+  //! For jit support
   Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep)
     : dimensions (adims),
       rep (reinterpret_cast<typename Array<T>::ArrayRep *> (arep)),
@@ -175,8 +169,7 @@
 
 public:
 
-  // Empty ctor (0x0).
-
+  //! Empty ctor (0 by 0).
   Array (void)
     : dimensions (), rep (nil_rep ()), slice_data (rep->data),
       slice_len (rep->len)
@@ -184,21 +177,7 @@
     rep->count++;
   }
 
-  // Obsolete 1D ctor (there are no 1D arrays).
-  explicit Array (octave_idx_type n) GCC_ATTR_DEPRECATED
-    : dimensions (n, 1), rep (new typename Array<T>::ArrayRep (n)),
-      slice_data (rep->data), slice_len (rep->len)
-  { }
-
-  // Obsolete initialized 1D ctor (there are no 1D arrays).
-  explicit Array (octave_idx_type n, const T& val) GCC_ATTR_DEPRECATED
-    : dimensions (n, 1), rep (new typename Array<T>::ArrayRep (n)),
-      slice_data (rep->data), slice_len (rep->len)
-  {
-    fill (val);
-  }
-
-  // nD uninitialized ctor.
+  //! nD uninitialized ctor.
   explicit Array (const dim_vector& dv)
     : dimensions (dv),
       rep (new typename Array<T>::ArrayRep (dv.safe_numel ())),
@@ -207,7 +186,7 @@
     dimensions.chop_trailing_singletons ();
   }
 
-  // nD initialized ctor.
+  //! nD initialized ctor.
   explicit Array (const dim_vector& dv, const T& val)
     : dimensions (dv),
       rep (new typename Array<T>::ArrayRep (dv.safe_numel ())),
@@ -217,10 +196,10 @@
     dimensions.chop_trailing_singletons ();
   }
 
-  // Reshape constructor.
+  //! Reshape constructor.
   Array (const Array<T>& a, const dim_vector& dv);
 
-  // Type conversion case.
+  //! Type conversion case.
   template <class U>
   Array (const Array<U>& a)
     : dimensions (a.dims ()),
@@ -228,7 +207,7 @@
       slice_data (rep->data), slice_len (rep->len)
   { }
 
-  // No type conversion case.
+  //! No type conversion case.
   Array (const Array<T>& a)
     : dimensions (a.dimensions), rep (a.rep), slice_data (a.slice_data),
       slice_len (a.slice_len)
@@ -270,16 +249,15 @@
   void clear (octave_idx_type r, octave_idx_type c)
   { clear (dim_vector (r, c)); }
 
+  //@{
+  //! Number of elements in the array. These are all synonyms.
   octave_idx_type capacity (void) const { return slice_len; }
   octave_idx_type length (void) const { return capacity (); }
   octave_idx_type nelem (void) const { return capacity (); }
   octave_idx_type numel (void) const { return nelem (); }
+  //@}
 
-  octave_idx_type dim1 (void) const { return dimensions(0); }
-  octave_idx_type dim2 (void) const { return dimensions(1); }
-  octave_idx_type dim3 (void) const { return dimensions(2); }
-
-  // Return the array as a column vector.
+  //! Return the array as a column vector.
   Array<T> as_column (void) const
   {
     Array<T> retval (*this);
@@ -289,7 +267,7 @@
     return retval;
   }
 
-  // Return the array as a row vector.
+  //! Return the array as a row vector.
   Array<T> as_row (void) const
   {
     Array<T> retval (*this);
@@ -299,7 +277,7 @@
     return retval;
   }
 
-  // Return the array as a matrix.
+  //! Return the array as a matrix.
   Array<T> as_matrix (void) const
   {
     Array<T> retval (*this);
@@ -309,22 +287,40 @@
     return retval;
   }
 
+  //! @name First dimension
+  //!
+  //! Get the first dimension of the array (number of rows)
+  //@{
+  octave_idx_type dim1 (void) const { return dimensions(0); }
   octave_idx_type rows (void) const { return dim1 (); }
+  //@}
+
+  //! @name Second dimension
+  //!
+  //! Get the second dimension of the array (number of columns)
+  //@{
+  octave_idx_type dim2 (void) const { return dimensions(1); }
   octave_idx_type cols (void) const { return dim2 (); }
   octave_idx_type columns (void) const { return dim2 (); }
+  //@}
+
+  //! @name Third dimension
+  //!
+  //! Get the third dimension of the array (number of pages)
+  //@{
+  octave_idx_type dim3 (void) const { return dimensions(2); }
   octave_idx_type pages (void) const { return dim3 (); }
+  //@}
 
   size_t byte_size (void) const
   { return static_cast<size_t> (numel ()) * sizeof (T); }
 
-  // Return a const-reference so that dims ()(i) works efficiently.
+  //! Return a const-reference so that dims ()(i) works efficiently.
   const dim_vector& dims (void) const { return dimensions; }
 
+  //! Chop off leading singleton dimensions
   Array<T> squeeze (void) const;
 
-  void chop_trailing_singletons (void) GCC_ATTR_DEPRECATED
-  { dimensions.chop_trailing_singletons (); }
-
   octave_idx_type compute_index (octave_idx_type i, octave_idx_type j) const;
   octave_idx_type compute_index (octave_idx_type i, octave_idx_type j,
                                  octave_idx_type k) const;
@@ -434,13 +430,13 @@
   // Fast extractors. All of these produce shallow copies.
   // Warning: none of these do check bounds, unless BOUNDS_CHECKING is on!
 
-  // Extract column: A(:,k+1).
+  //! Extract column: A(:,k+1).
   Array<T> column (octave_idx_type k) const;
-  // Extract page: A(:,:,k+1).
+  //! Extract page: A(:,:,k+1).
   Array<T> page (octave_idx_type k) const;
 
-  // Extract a slice from this array as a column vector: A(:)(lo+1:up).
-  // Must be 0 <= lo && up <= numel. May be up < lo.
+  //! Extract a slice from this array as a column vector: A(:)(lo+1:up).
+  //! Must be 0 <= lo && up <= numel. May be up < lo.
   Array<T> linear_slice (octave_idx_type lo, octave_idx_type up) const;
 
   Array<T> reshape (octave_idx_type nr, octave_idx_type nc) const
@@ -472,41 +468,39 @@
 
   int ndims (void) const { return dimensions.length (); }
 
-  // Indexing without resizing.
-
+  //@{
+  //! Indexing without resizing.
   Array<T> index (const idx_vector& i) const;
 
   Array<T> index (const idx_vector& i, const idx_vector& j) const;
 
   Array<T> index (const Array<idx_vector>& ia) const;
+  //@}
 
   virtual T resize_fill_value (void) const;
 
-  // Resizing (with fill).
+  //@{
+  //! Resizing (with fill).
+  void resize2 (octave_idx_type nr, octave_idx_type nc, const T& rfv);
+  void resize2 (octave_idx_type nr, octave_idx_type nc)
+  {
+    resize2 (nr, nc, resize_fill_value ());
+  }
 
   void resize1 (octave_idx_type n, const T& rfv);
   void resize1 (octave_idx_type n) { resize1 (n, resize_fill_value ()); }
 
-  void resize (octave_idx_type n) GCC_ATTR_DEPRECATED { resize1 (n); }
-
-  void resize (octave_idx_type nr, octave_idx_type nc,
-               const T& rfv) GCC_ATTR_DEPRECATED
-  {
-    resize2 (nr, nc, rfv);
-  }
-
-  void resize (octave_idx_type nr, octave_idx_type nc) GCC_ATTR_DEPRECATED
-  {
-    resize2 (nr, nc, resize_fill_value ());
-  }
-
   void resize (const dim_vector& dv, const T& rfv);
   void resize (const dim_vector& dv) { resize (dv, resize_fill_value ()); }
+  //@}
 
-  // Indexing with possible resizing and fill
+  //@{
+  //! Indexing with possible resizing and fill
+
   // FIXME: this is really a corner case, that should better be
   // handled directly in liboctinterp.
 
+
   Array<T> index (const idx_vector& i, bool resize_ok, const T& rfv) const;
   Array<T> index (const idx_vector& i, bool resize_ok) const
   {
@@ -527,9 +521,11 @@
   {
     return index (ia, resize_ok, resize_fill_value ());
   }
+  //@}
 
-  // Indexed assignment (always with resize & fill).
 
+  //@{
+  //! Indexed assignment (always with resize & fill).
   void assign (const idx_vector& i, const Array<T>& rhs, const T& rfv);
   void assign (const idx_vector& i, const Array<T>& rhs)
   {
@@ -548,25 +544,28 @@
   {
     assign (ia, rhs, resize_fill_value ());
   }
+  //@}
 
-  // Deleting elements.
+  //@{
+  //! Deleting elements.
 
-  // A(I) = [] (with a single subscript)
+  //! A(I) = [] (with a single subscript)
   void delete_elements (const idx_vector& i);
 
-  // A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon)
+  //! A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon)
   void delete_elements (int dim, const idx_vector& i);
 
-  // Dispatcher to the above two.
+  //! Dispatcher to the above two.
   void delete_elements (const Array<idx_vector>& ia);
+  //@}
 
-  // Insert an array into another at a specified position.
-  // If size (a) is [d1 d2 ... dN] and idx is [i1 i2 ... iN],
-  // this method is equivalent to
-  // x(i1:i1+d1-1, i2:i2+d2-1, ... , iN:iN+dN-1) = a.
+  //! Insert an array into another at a specified position. If
+  //! size (a) is [d1 d2 ... dN] and idx is [i1 i2 ... iN], this
+  //! method is equivalent to x(i1:i1+d1-1, i2:i2+d2-1, ... ,
+  //! iN:iN+dN-1) = a.
   Array<T>& insert (const Array<T>& a, const Array<octave_idx_type>& idx);
 
-  // This is just a special case for idx = [r c 0 ...]
+  //! This is just a special case for idx = [r c 0 ...]
   Array<T>& insert (const Array<T>& a, octave_idx_type r, octave_idx_type c);
 
   void maybe_economize (void)
@@ -582,54 +581,61 @@
 
   void print_info (std::ostream& os, const std::string& prefix) const;
 
-  // Unsafe.  This function exists to support the MEX interface.
-  // You should not use it anywhere else.
+  //! Give a pointer to the data in mex format. Unsafe. This function
+  //! exists to support the MEX interface. You should not use it
+  //! anywhere else.
   void *mex_get_data (void) const { return const_cast<T *> (data ()); }
 
   Array<T> sort (int dim = 0, sortmode mode = ASCENDING) const;
   Array<T> sort (Array<octave_idx_type> &sidx, int dim = 0,
                  sortmode mode = ASCENDING) const;
 
-  // Ordering is auto-detected or can be specified.
+  //! Ordering is auto-detected or can be specified.
   sortmode is_sorted (sortmode mode = UNSORTED) const;
 
-  // Sort by rows returns only indices.
+  //! Sort by rows returns only indices.
   Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const;
 
-  // Ordering is auto-detected or can be specified.
+  //! Ordering is auto-detected or can be specified.
   sortmode is_sorted_rows (sortmode mode = UNSORTED) const;
 
-  // Do a binary lookup in a sorted array. Must not contain NaNs.
-  // Mode can be specified or is auto-detected by comparing 1st and last element.
+  //! @brief Do a binary lookup in a sorted array. Must not contain NaNs.
+  //! Mode can be specified or is auto-detected by comparing 1st and last element.
   octave_idx_type lookup (const T& value, sortmode mode = UNSORTED) const;
 
-  // Ditto, but for an array of values, specializing on the case when values
-  // are sorted. NaNs get the value N.
+  //! Ditto, but for an array of values, specializing on the case when values
+  //! are sorted. NaNs get the value N.
   Array<octave_idx_type> lookup (const Array<T>& values,
                                  sortmode mode = UNSORTED) const;
 
-  // Count nonzero elements.
+  //! Count nonzero elements.
   octave_idx_type nnz (void) const;
 
-  // Find indices of (at most n) nonzero elements. If n is specified, backward
-  // specifies search from backward.
+  //! Find indices of (at most n) nonzero elements. If n is specified,
+  //! backward specifies search from backward.
   Array<octave_idx_type> find (octave_idx_type n = -1,
                                bool backward = false) const;
 
-  // Returns the n-th element in increasing order, using the same ordering as
-  // used for sort. n can either be a scalar index or a contiguous range.
+  //! Returns the n-th element in increasing order, using the same
+  //! ordering as used for sort. n can either be a scalar index or a
+  //! contiguous range.
   Array<T> nth_element (const idx_vector& n, int dim = 0) const;
 
+  //! Get the kth super or subdiagonal. The zeroth diagonal is the
+  //! ordinary diagonal.
   Array<T> diag (octave_idx_type k = 0) const;
 
   Array<T> diag (octave_idx_type m, octave_idx_type n) const;
 
-  // Concatenation along a specified (0-based) dimension, equivalent to cat().
-  // dim = -1 corresponds to dim = 0 and dim = -2 corresponds to dim = 1,
-  // but apply the looser matching rules of vertcat/horzcat.
+  //! Concatenation along a specified (0-based) dimension, equivalent
+  //! to cat(). dim = -1 corresponds to dim = 0 and dim = -2
+  //! corresponds to dim = 1, but apply the looser matching rules of
+  //! vertcat/horzcat.
   static Array<T>
   cat (int dim, octave_idx_type n, const Array<T> *array_list);
 
+  //! Apply function fcn to each element of the Array<T>. This function
+  //! is optimised with a manually unrolled loop.
   template <class U, class F>
   Array<U>
   map (F fcn) const
@@ -660,7 +666,8 @@
     return result;
   }
 
-  // Overloads for function references.
+  //@{
+  //! Overloads for function references.
   template <class U>
   Array<U>
   map (U (&fcn) (T)) const
@@ -670,15 +677,17 @@
   Array<U>
   map (U (&fcn) (const T&)) const
   { return map<U, U (&) (const T&)> (fcn); }
+  //@}
 
-  // Generic any/all test functionality with arbitrary predicate.
+  //! Generic any/all test functionality with arbitrary predicate.
   template <class F, bool zero>
   bool test (F fcn) const
   {
     return any_all_test<F, T, zero> (fcn, data (), length ());
   }
 
-  // Simpler calls.
+  //@{
+  //! Simpler calls.
   template <class F>
   bool test_any (F fcn) const
   { return test<F, false> (fcn); }
@@ -686,8 +695,10 @@
   template <class F>
   bool test_all (F fcn) const
   { return test<F, true> (fcn); }
+  //@}
 
-  // Overloads for function references.
+  //@{
+  //! Overloads for function references.
   bool test_any (bool (&fcn) (T)) const
   { return test<bool (&) (T), false> (fcn); }
 
@@ -699,15 +710,17 @@
 
   bool test_all (bool (&fcn) (const T&)) const
   { return test<bool (&) (const T&), true> (fcn); }
+  //@}
 
   template <class U> friend class Array;
 
-  // Returns true if this->dims () == dv, and if so, replaces this->dimensions
-  // by a shallow copy of dv. This is useful for maintaining several arrays with
-  // supposedly equal dimensions (e.g. structs in the interpreter).
+  //! Returns true if this->dims () == dv, and if so, replaces this->dimensions
+  //! by a shallow copy of dv. This is useful for maintaining several arrays with
+  //! supposedly equal dimensions (e.g. structs in the interpreter).
   bool optimize_dimensions (const dim_vector& dv);
 
-  // WARNING: Only call these functions from jit
+  //@{
+  //! WARNING: Only call these functions from jit
 
   int *jit_ref_count (void) { return rep->count.get (); }
 
@@ -716,24 +729,17 @@
   octave_idx_type *jit_dimensions (void) const { return dimensions.to_jit (); }
 
   void *jit_array_rep (void) const { return rep; }
+  //@}
 
 private:
-
-  void resize2 (octave_idx_type nr, octave_idx_type nc, const T& rfv);
-  void resize2 (octave_idx_type nr, octave_idx_type nc)
-  {
-    resize2 (nr, nc, resize_fill_value ());
-  }
-
   static void instantiation_guard ();
 };
 
-// This is a simple wrapper template that will subclass an Array<T> type or any
-// later type derived from it and override the default non-const operator() to
-// not check for the array's uniqueness. It is, however, the user's
-// responsibility to ensure the array is actually unaliased whenever elements
-// are accessed.
-
+//! This is a simple wrapper template that will subclass an Array<T>
+//! type or any later type derived from it and override the default
+//! non-const operator() to not check for the array's uniqueness. It
+//! is, however, the user's responsibility to ensure the array is
+//! actually unaliased whenever elements are accessed.
 template<class ArrayClass>
 class NoAlias : public ArrayClass
 {
deleted file mode 100644
--- a/liboctave/array/Array2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Template array classes
-/*
-
-Copyright (C) 1996-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_Array2_h)
-#define octave_Array2_h 1
-
-#include "Array.h"
-#define Array2 Array
-
-// If we're with GNU C++, issue a warning.
-#ifdef __GNUC__
-#warning Using Array2<T> is deprecated. Use Array<T> directly.
-#endif
-
-#endif
deleted file mode 100644
--- a/liboctave/array/Array3.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Template array classes
-/*
-
-Copyright (C) 1996-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_Array3_h)
-#define octave_Array3_h 1
-
-#include <cassert>
-#include <cstdlib>
-
-#include "Array.h"
-#include "lo-error.h"
-
-class idx_vector;
-
-// Three dimensional array class.
-
-template <class T>
-class
-Array3 : public Array<T>
-{
-public:
-
-  Array3 (void) : Array<T> (dim_vector (0, 0, 0)) { }
-
-  Array3 (octave_idx_type r, octave_idx_type c,
-          octave_idx_type p) : Array<T> (dim_vector (r, c, p)) { }
-
-  Array3 (octave_idx_type r, octave_idx_type c, octave_idx_type p, const T& val)
-    : Array<T> (dim_vector (r, c, p), val) { }
-
-  Array3 (const Array3<T>& a)
-    : Array<T> (a, a.dims ()) { }
-
-  Array3 (const Array<T>& a, octave_idx_type r, octave_idx_type c,
-          octave_idx_type p)
-    : Array<T> (a, dim_vector (r, c, p)) { }
-
-  ~Array3 (void) { }
-
-  Array3<T>& operator = (const Array3<T>& a)
-  {
-    if (this != &a)
-      Array<T>::operator = (a);
-
-    return *this;
-  }
-
-  void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p)
-  { Array<T>::resize (dim_vector (r, c, p)); }
-
-  void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p,
-               const T& val)
-  { Array<T>::resize (dim_vector (r, c, p), val); }
-
-  Array3<T> sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const
-  {
-    Array<T> tmp = Array<T>::sort (dim, mode);
-    return Array3<T> (tmp, tmp.rows (), tmp.columns (), tmp.pages ());
-  }
-
-  Array3<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0,
-                  sortmode mode = ASCENDING) const
-  {
-    Array<T> tmp = Array<T>::sort (sidx, dim, mode);
-    return Array3<T> (tmp, tmp.rows (), tmp.columns (), tmp.pages ());
-  }
-};
-
-// If we're with GNU C++, issue a warning.
-#ifdef __GNUC__
-#warning Using Array3<T> is deprecated. Use Array<T> directly.
-#endif
-
-#endif
deleted file mode 100644
--- a/liboctave/array/ArrayN.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Template array classes
-/*
-
-Copyright (C) 2000-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_ArrayN_h)
-#define octave_ArrayN_h 1
-
-#include "Array.h"
-#define ArrayN Array
-
-// If we're with GNU C++, issue a warning.
-#ifdef __GNUC__
-#warning Using ArrayN<T> is deprecated. Use Array<T> directly.
-#endif
-
-#endif
--- a/liboctave/array/CColVector.cc
+++ b/liboctave/array/CColVector.cc
@@ -1,7 +1,7 @@
 // ColumnVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/CColVector.h
+++ b/liboctave/array/CColVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/CDiagMatrix.cc
+++ b/liboctave/array/CDiagMatrix.cc
@@ -1,7 +1,7 @@
 // DiagMatrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -383,7 +383,7 @@
 }
 
 ComplexDiagMatrix
-ComplexDiagMatrix::pseudo_inverse (void) const
+ComplexDiagMatrix::pseudo_inverse (double tol) const
 {
   octave_idx_type r = rows ();
   octave_idx_type c = cols ();
@@ -393,10 +393,11 @@
 
   for (octave_idx_type i = 0; i < len; i++)
     {
-      if (elem (i, i) != 0.0)
+      double val = std::abs (elem (i, i));
+      if (val < tol || val == 0.0)
+        retval.elem (i, i) = 0.0;
+      else
         retval.elem (i, i) = 1.0 / elem (i, i);
-      else
-        retval.elem (i, i) = 0.0;
     }
 
   return retval;
@@ -448,7 +449,8 @@
 
   ComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = c.length (), lenm = len < a_nc ? len : a_nc;
+  octave_idx_type len = c.length ();
+  octave_idx_type lenm = len < a_nc ? len : a_nc;
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -549,7 +551,8 @@
 ComplexDiagMatrix::rcond (void) const
 {
   ColumnVector av = extract_diag (0).map<double> (std::abs);
-  double amx = av.max (), amn = av.min ();
+  double amx = av.max ();
+  double amn = av.min ();
   return amx == 0 ? 0.0 : amn / amx;
 }
 
--- a/liboctave/array/CDiagMatrix.h
+++ b/liboctave/array/CDiagMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -116,7 +116,7 @@
 
   ComplexDiagMatrix inverse (octave_idx_type& info) const;
   ComplexDiagMatrix inverse (void) const;
-  ComplexDiagMatrix pseudo_inverse (void) const;
+  ComplexDiagMatrix pseudo_inverse (double tol = 0.0) const;
 
   bool all_elements_are_real (void) const;
 
--- a/liboctave/array/CMatrix.cc
+++ b/liboctave/array/CMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague, a.s.
 
@@ -36,8 +36,15 @@
 #include <sys/types.h>
 
 #include "Array-util.h"
+#include "boolMatrix.h"
+#include "chMatrix.h"
+#include "dMatrix.h"
 #include "CMatrix.h"
-#include "CmplxAEPBAL.h"
+#include "CNDArray.h"
+#include "CRowVector.h"
+#include "dRowVector.h"
+#include "CDiagMatrix.h"
+#include "dDiagMatrix.h"
 #include "CmplxCHOL.h"
 #include "CmplxSCHUR.h"
 #include "CmplxSVD.h"
@@ -48,7 +55,6 @@
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
-#include "mx-base.h"
 #include "mx-cm-dm.h"
 #include "mx-cm-s.h"
 #include "mx-dm-cm.h"
@@ -262,39 +268,67 @@
 // Complex Matrix class
 
 ComplexMatrix::ComplexMatrix (const Matrix& a)
-  : MArray<Complex> (a)
+  : ComplexNDArray (a)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const RowVector& rv)
-  : MArray<Complex> (rv)
+  : ComplexNDArray (rv)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const ColumnVector& cv)
-  : MArray<Complex> (cv)
+  : ComplexNDArray (cv)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const DiagMatrix& a)
-  : MArray<Complex> (a.dims (), 0.0)
+  : ComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+ComplexMatrix::ComplexMatrix (const MDiagArray2<double>& a)
+  : ComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+ComplexMatrix::ComplexMatrix (const DiagArray2<double>& a)
+  : ComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
 }
 
 ComplexMatrix::ComplexMatrix (const ComplexRowVector& rv)
-  : MArray<Complex> (rv)
+  : ComplexNDArray (rv)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const ComplexColumnVector& cv)
-  : MArray<Complex> (cv)
+  : ComplexNDArray (cv)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const ComplexDiagMatrix& a)
-  : MArray<Complex> (a.dims (), 0.0)
+  : ComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+ComplexMatrix::ComplexMatrix (const MDiagArray2<Complex>& a)
+  : ComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+ComplexMatrix::ComplexMatrix (const DiagArray2<Complex>& a)
+  : ComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
@@ -303,12 +337,12 @@
 // FIXME: could we use a templated mixed-type copy function here?
 
 ComplexMatrix::ComplexMatrix (const boolMatrix& a)
-  : MArray<Complex> (a)
+  : ComplexNDArray (a)
 {
 }
 
 ComplexMatrix::ComplexMatrix (const charMatrix& a)
-  : MArray<Complex> (a.dims (), 0.0)
+  : ComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.rows (); i++)
     for (octave_idx_type j = 0; j < a.cols (); j++)
@@ -316,7 +350,7 @@
 }
 
 ComplexMatrix::ComplexMatrix (const Matrix& re, const Matrix& im)
-  : MArray<Complex> (re.dims ())
+  : ComplexNDArray (re.dims ())
 {
   if (im.rows () != rows () || im.cols () != cols ())
     (*current_liboctave_error_handler) ("complex: internal error");
@@ -463,7 +497,7 @@
 ComplexMatrix::insert (const ComplexMatrix& a,
                        octave_idx_type r, octave_idx_type c)
 {
-  Array<Complex>::insert (a, r, c);
+  ComplexNDArray::insert (a, r, c);
   return *this;
 }
 
@@ -1353,7 +1387,7 @@
 
   octave_idx_type nn = 4*npts+15;
 
-  Array<Complex> wsave (nn, 1);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   retval = *this;
@@ -1394,7 +1428,7 @@
 
   octave_idx_type nn = 4*npts+15;
 
-  Array<Complex> wsave (nn, 1);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   retval = *this;
@@ -1438,7 +1472,7 @@
 
   octave_idx_type nn = 4*npts+15;
 
-  Array<Complex> wsave (nn, 1);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   retval = *this;
@@ -1460,7 +1494,7 @@
   wsave.resize (dim_vector (nn, 1));
   pwsave = wsave.fortran_vec ();
 
-  Array<Complex> tmp (npts, 1);
+  Array<Complex> tmp (dim_vector (npts, 1));
   Complex *prow = tmp.fortran_vec ();
 
   F77_FUNC (zffti, ZFFTI) (npts, pwsave);
@@ -1504,7 +1538,7 @@
 
   octave_idx_type nn = 4*npts+15;
 
-  Array<Complex> wsave (nn, 1);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   retval = *this;
@@ -1529,7 +1563,7 @@
   wsave.resize (dim_vector (nn, 1));
   pwsave = wsave.fortran_vec ();
 
-  Array<Complex> tmp (npts, 1);
+  Array<Complex> tmp (dim_vector (npts, 1));
   Complex *prow = tmp.fortran_vec ();
 
   F77_FUNC (zffti, ZFFTI) (npts, pwsave);
@@ -1722,7 +1756,7 @@
 double
 ComplexMatrix::rcond (MatrixType &mattype) const
 {
-  double rcon;
+  double rcon = octave_NaN;
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1904,8 +1938,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1920,11 +1953,27 @@
             {
               const Complex *tmp_data = fortran_vec ();
 
+              retval = b;
+              Complex *result = retval.fortran_vec ();
+
+              char uplo = 'U';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (ztrtrs, ZTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'U';
-                  char dia = 'N';
+                  uplo = 'U';
+                  dia = 'N';
 
                   Array<Complex> z (dim_vector (2 * nc, 1));
                   Complex *pz = z.fortran_vec ();
@@ -1952,30 +2001,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  Complex *result = retval.fortran_vec ();
-
-                  char uplo = 'U';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (ztrtrs, ZTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -2005,8 +2033,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -2021,11 +2048,27 @@
             {
               const Complex *tmp_data = fortran_vec ();
 
+              retval = b;
+              Complex *result = retval.fortran_vec ();
+
+              char uplo = 'L';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (ztrtrs, ZTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'L';
-                  char dia = 'N';
+                  uplo = 'L';
+                  dia = 'N';
 
                   Array<Complex> z (dim_vector (2 * nc, 1));
                   Complex *pz = z.fortran_vec ();
@@ -2053,30 +2096,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  Complex *result = retval.fortran_vec ();
-
-                  char uplo = 'L';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (ztrtrs, ZTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -2159,9 +2181,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -2216,8 +2236,7 @@
               if (sing_handler)
                 sing_handler (rcon);
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
 
               mattype.mark_as_rectangular ();
             }
@@ -2245,9 +2264,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -2342,9 +2359,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
@@ -3096,154 +3113,60 @@
   return *this;
 }
 
-// unary operations
-
-boolMatrix
-ComplexMatrix::operator ! (void) const
-{
-  if (any_element_is_nan ())
-    gripe_nan_to_logical_conversion ();
-
-  return do_mx_unary_op<bool, Complex> (*this, mx_inline_not);
-}
-
 // other operations
 
-bool
-ComplexMatrix::any_element_is_nan (void) const
-{
-  return do_mx_check<Complex> (*this, mx_inline_any_nan);
-}
-
-bool
-ComplexMatrix::any_element_is_inf_or_nan (void) const
-{
-  return ! do_mx_check<Complex> (*this, mx_inline_all_finite);
-}
-
-// Return true if no elements have imaginary components.
-
-bool
-ComplexMatrix::all_elements_are_real (void) const
-{
-  return do_mx_check<Complex> (*this, mx_inline_all_real);
-}
-
-// Return nonzero if any element of CM has a non-integer real or
-// imaginary part.  Also extract the largest and smallest (real or
-// imaginary) values and return them in MAX_VAL and MIN_VAL.
-
-bool
-ComplexMatrix::all_integers (double& max_val, double& min_val) const
-{
-  octave_idx_type nr = rows ();
-  octave_idx_type nc = cols ();
-
-  if (nr > 0 && nc > 0)
-    {
-      Complex val = elem (0, 0);
-
-      double r_val = std::real (val);
-      double i_val = std::imag (val);
-
-      max_val = r_val;
-      min_val = r_val;
-
-      if (i_val > max_val)
-        max_val = i_val;
-
-      if (i_val < max_val)
-        min_val = i_val;
-    }
-  else
-    return false;
-
-  for (octave_idx_type j = 0; j < nc; j++)
-    for (octave_idx_type i = 0; i < nr; i++)
-      {
-        Complex val = elem (i, j);
-
-        double r_val = std::real (val);
-        double i_val = std::imag (val);
-
-        if (r_val > max_val)
-          max_val = r_val;
-
-        if (i_val > max_val)
-          max_val = i_val;
-
-        if (r_val < min_val)
-          min_val = r_val;
-
-        if (i_val < min_val)
-          min_val = i_val;
-
-        if (D_NINT (r_val) != r_val || D_NINT (i_val) != i_val)
-          return false;
-      }
-
-  return true;
-}
-
-bool
-ComplexMatrix::too_large_for_float (void) const
-{
-  return test_any (xtoo_large_for_float);
-}
-
-// FIXME: Do these really belong here?  Maybe they should be in a base class?
-
 boolMatrix
 ComplexMatrix::all (int dim) const
 {
-  return do_mx_red_op<bool, Complex> (*this, dim, mx_inline_all);
+  return ComplexNDArray::all (dim);
 }
 
 boolMatrix
 ComplexMatrix::any (int dim) const
 {
-  return do_mx_red_op<bool, Complex> (*this, dim, mx_inline_any);
+  return ComplexNDArray::any (dim);
 }
 
 ComplexMatrix
 ComplexMatrix::cumprod (int dim) const
 {
-  return do_mx_cum_op<Complex, Complex> (*this, dim, mx_inline_cumprod);
+  return ComplexNDArray::cumprod (dim);
 }
 
 ComplexMatrix
 ComplexMatrix::cumsum (int dim) const
 {
-  return do_mx_cum_op<Complex, Complex> (*this, dim, mx_inline_cumsum);
+  return ComplexNDArray::cumsum (dim);
 }
 
 ComplexMatrix
 ComplexMatrix::prod (int dim) const
 {
-  return do_mx_red_op<Complex, Complex> (*this, dim, mx_inline_prod);
+  return ComplexNDArray::prod (dim);
 }
 
 ComplexMatrix
 ComplexMatrix::sum (int dim) const
 {
-  return do_mx_red_op<Complex, Complex> (*this, dim, mx_inline_sum);
+  return ComplexNDArray::sum (dim);
 }
 
 ComplexMatrix
 ComplexMatrix::sumsq (int dim) const
 {
-  return do_mx_red_op<double, Complex> (*this, dim, mx_inline_sumsq);
+  return ComplexNDArray::sumsq (dim);
 }
 
-Matrix ComplexMatrix::abs (void) const
+Matrix
+ComplexMatrix::abs (void) const
 {
-  return do_mx_unary_map<double, Complex, std::abs> (*this);
+  return ComplexNDArray::abs ();
 }
 
 ComplexMatrix
 ComplexMatrix::diag (octave_idx_type k) const
 {
-  return MArray<Complex>::diag (k);
+  return ComplexNDArray::diag (k);
 }
 
 ComplexDiagMatrix
@@ -3705,7 +3628,7 @@
 
   // FIXME: check info?
 
-  retval = -ua * cx * ub.hermitian ();
+  retval = ua * cx * ub.hermitian ();
 
   return retval;
 }
@@ -3765,8 +3688,10 @@
 {
   ComplexMatrix retval;
 
-  bool tra = transa != blas_no_trans, trb = transb != blas_no_trans;
-  bool cja = transa == blas_conj_trans, cjb = transb == blas_conj_trans;
+  bool tra = transa != blas_no_trans;
+  bool trb = transb != blas_no_trans;
+  bool cja = transa == blas_conj_trans;
+  bool cjb = transb == blas_conj_trans;
 
   octave_idx_type a_nr = tra ? a.cols () : a.rows ();
   octave_idx_type a_nc = tra ? a.rows () : a.cols ();
@@ -3822,8 +3747,10 @@
         }
       else
         {
-          octave_idx_type lda = a.rows (), tda = a.cols ();
-          octave_idx_type ldb = b.rows (), tdb = b.cols ();
+          octave_idx_type lda = a.rows ();
+          octave_idx_type tda = a.cols ();
+          octave_idx_type ldb = b.rows ();
+          octave_idx_type tdb = b.cols ();
 
           retval = ComplexMatrix (a_nr, b_nc, 0.0);
           Complex *c = retval.fortran_vec ();
@@ -3902,7 +3829,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (c, m (i, j));
+        result(i, j) = xmin (c, m(i, j));
       }
 
   return result;
@@ -3922,7 +3849,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (m (i, j), c);
+        result(i, j) = xmin (m(i, j), c);
       }
 
   return result;
@@ -3951,7 +3878,7 @@
       for (octave_idx_type i = 0; i < nr; i++)
         {
           octave_quit ();
-          if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0)
+          if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
             {
               columns_are_real_only = 0;
               break;
@@ -3961,14 +3888,14 @@
       if (columns_are_real_only)
         {
           for (octave_idx_type i = 0; i < nr; i++)
-            result (i, j) = xmin (std::real (a (i, j)), std::real (b (i, j)));
+            result(i, j) = xmin (std::real (a(i, j)), std::real (b(i, j)));
         }
       else
         {
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmin (a (i, j), b (i, j));
+              result(i, j) = xmin (a(i, j), b(i, j));
             }
         }
     }
@@ -3990,7 +3917,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (c, m (i, j));
+        result(i, j) = xmax (c, m(i, j));
       }
 
   return result;
@@ -4010,7 +3937,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (m (i, j), c);
+        result(i, j) = xmax (m(i, j), c);
       }
 
   return result;
@@ -4039,7 +3966,7 @@
       for (octave_idx_type i = 0; i < nr; i++)
         {
           octave_quit ();
-          if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0)
+          if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
             {
               columns_are_real_only = 0;
               break;
@@ -4051,7 +3978,7 @@
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmax (std::real (a (i, j)), std::real (b (i, j)));
+              result(i, j) = xmax (std::real (a(i, j)), std::real (b(i, j)));
             }
         }
       else
@@ -4059,7 +3986,7 @@
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmax (a (i, j), b (i, j));
+              result(i, j) = xmax (a(i, j), b(i, j));
             }
         }
     }
--- a/liboctave/array/CMatrix.h
+++ b/liboctave/array/CMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -26,6 +26,7 @@
 #include "MArray.h"
 #include "MDiagArray2.h"
 #include "MatrixType.h"
+#include "CNDArray.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
@@ -34,7 +35,7 @@
 
 class
 OCTAVE_API
-ComplexMatrix : public MArray<Complex>
+ComplexMatrix : public ComplexNDArray
 {
 public:
 
@@ -43,26 +44,26 @@
 
   typedef void (*solve_singularity_handler) (double rcon);
 
-  ComplexMatrix (void) : MArray<Complex> () { }
+  ComplexMatrix (void) : ComplexNDArray () { }
 
   ComplexMatrix (octave_idx_type r, octave_idx_type c)
-    : MArray<Complex> (dim_vector (r, c)) { }
+    : ComplexNDArray (dim_vector (r, c)) { }
 
   ComplexMatrix (octave_idx_type r, octave_idx_type c, const Complex& val)
-    : MArray<Complex> (dim_vector (r, c), val) { }
+    : ComplexNDArray (dim_vector (r, c), val) { }
 
-  ComplexMatrix (const dim_vector& dv) : MArray<Complex> (dv.redim (2)) { }
+  ComplexMatrix (const dim_vector& dv) : ComplexNDArray (dv.redim (2)) { }
 
   ComplexMatrix (const dim_vector& dv, const Complex& val)
-    : MArray<Complex> (dv.redim (2), val) { }
+    : ComplexNDArray (dv.redim (2), val) { }
 
-  ComplexMatrix (const ComplexMatrix& a) : MArray<Complex> (a) { }
+  ComplexMatrix (const ComplexMatrix& a) : ComplexNDArray (a) { }
 
   template <class U>
-  ComplexMatrix (const MArray<U>& a) : MArray<Complex> (a.as_matrix ()) { }
+  ComplexMatrix (const MArray<U>& a) : ComplexNDArray (a.as_matrix ()) { }
 
   template <class U>
-  ComplexMatrix (const Array<U>& a) : MArray<Complex> (a.as_matrix ()) { }
+  ComplexMatrix (const Array<U>& a) : ComplexNDArray (a.as_matrix ()) { }
 
   ComplexMatrix (const Matrix& re, const Matrix& im);
 
@@ -74,22 +75,24 @@
 
   explicit ComplexMatrix (const DiagMatrix& a);
 
+  explicit ComplexMatrix (const MDiagArray2<double>& a);
+
+  explicit ComplexMatrix (const DiagArray2<double>& a);
+
   explicit ComplexMatrix (const ComplexRowVector& rv);
 
   explicit ComplexMatrix (const ComplexColumnVector& cv);
 
   explicit ComplexMatrix (const ComplexDiagMatrix& a);
 
+  explicit ComplexMatrix (const MDiagArray2<Complex>& a);
+
+  explicit ComplexMatrix (const DiagArray2<Complex>& a);
+
   explicit ComplexMatrix (const boolMatrix& a);
 
   explicit ComplexMatrix (const charMatrix& a);
 
-  ComplexMatrix& operator = (const ComplexMatrix& a)
-  {
-    MArray<Complex>::operator = (a);
-    return *this;
-  }
-
   bool operator == (const ComplexMatrix& a) const;
   bool operator != (const ComplexMatrix& a) const;
 
@@ -356,18 +359,8 @@
   ComplexMatrix& operator += (const Matrix& a);
   ComplexMatrix& operator -= (const Matrix& a);
 
-  // unary operations
-
-  boolMatrix operator ! (void) const;
-
   // other operations
 
-  bool any_element_is_nan (void) const;
-  bool any_element_is_inf_or_nan (void) const;
-  bool all_elements_are_real (void) const;
-  bool all_integers (double& max_val, double& min_val) const;
-  bool too_large_for_float (void) const;
-
   boolMatrix all (int dim = -1) const;
   boolMatrix any (int dim = -1) const;
 
--- a/liboctave/array/CNDArray.cc
+++ b/liboctave/array/CNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -39,6 +39,7 @@
 #include "MArray-defs.h"
 #include "mx-base.h"
 #include "mx-op-defs.h"
+#include "mx-cnda-s.h"
 #include "oct-fftw.h"
 #include "oct-locbuf.h"
 
@@ -814,20 +815,6 @@
   return *this;
 }
 
-ComplexMatrix
-ComplexNDArray::matrix_value (void) const
-{
-  ComplexMatrix retval;
-
-  if (ndims () == 2)
-    retval = ComplexMatrix (Array<Complex> (*this));
-  else
-    (*current_liboctave_error_handler)
-      ("invalid conversion of ComplexNDArray to ComplexMatrix");
-
-  return retval;
-}
-
 void
 ComplexNDArray::increment_index (Array<octave_idx_type>& ra_idx,
                                  const dim_vector& dimensions,
--- a/liboctave/array/CNDArray.h
+++ b/liboctave/array/CNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,7 +24,6 @@
 #define octave_CNDArray_h 1
 
 #include "MArray.h"
-#include "CMatrix.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
@@ -36,8 +35,6 @@
 {
 public:
 
-  typedef ComplexMatrix matrix_type;
-
   ComplexNDArray (void) : MArray<Complex> () { }
 
   ComplexNDArray (const dim_vector& dv) : MArray<Complex> (dv) { }
@@ -47,8 +44,6 @@
 
   ComplexNDArray (const ComplexNDArray& a) : MArray<Complex> (a) { }
 
-  ComplexNDArray (const ComplexMatrix& a) : MArray<Complex> (a) { }
-
   template <class U>
   ComplexNDArray (const MArray<U>& a) : MArray<Complex> (a) { }
 
@@ -124,8 +119,6 @@
   ComplexNDArray fourierNd (void) const;
   ComplexNDArray ifourierNd (void) const;
 
-  ComplexMatrix matrix_value (void) const;
-
   ComplexNDArray squeeze (void) const { return MArray<Complex>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
--- a/liboctave/array/CRowVector.cc
+++ b/liboctave/array/CRowVector.cc
@@ -1,7 +1,7 @@
 // RowVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/CRowVector.h
+++ b/liboctave/array/CRowVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/CSparse.cc
+++ b/liboctave/array/CSparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -36,6 +36,12 @@
 #include "lo-mappers.h"
 #include "f77-fcn.h"
 #include "dRowVector.h"
+#include "mx-m-cs.h"
+#include "mx-cs-m.h"
+#include "mx-cm-s.h"
+#include "mx-fcm-fs.h"
+#include "mx-s-cm.h"
+#include "mx-fs-fcm.h"
 #include "oct-locbuf.h"
 
 #include "dDiagMatrix.h"
@@ -51,10 +57,11 @@
 #include "SparseCmplxCHOL.h"
 #include "SparseCmplxQR.h"
 
+#include "Sparse-op-defs.h"
+
 #include "Sparse-diag-op-defs.h"
 
 #include "Sparse-perm-op-defs.h"
-#include "mx-inlines.cc"
 
 // Define whether to use a basic QR solver or one that uses a Dulmange
 // Mendelsohn factorization to seperate the problem into under-determined,
@@ -160,7 +167,8 @@
 SparseComplexMatrix::SparseComplexMatrix (const ComplexDiagMatrix& a)
   : MSparse<Complex> (a.rows (), a.cols (), a.length ())
 {
-  octave_idx_type j = 0, l = a.length ();
+  octave_idx_type j = 0;
+  octave_idx_type l = a.length ();
   for (octave_idx_type i = 0; i < l; i++)
     {
       cidx (i) = j;
@@ -348,7 +356,7 @@
         found[i] = 0;
 
       for (octave_idx_type j = 0; j < nc; j++)
-        for (octave_idx_type i = cidx(j); i < cidx(j+1); i++)
+        for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
           if (found[ridx (i)] == -j)
             found[ridx (i)] = -j - 1;
 
@@ -505,7 +513,7 @@
         found[i] = 0;
 
       for (octave_idx_type j = 0; j < nc; j++)
-        for (octave_idx_type i = cidx(j); i < cidx(j+1); i++)
+        for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
           if (found[ridx (i)] == -j)
             found[ridx (i)] = -j - 1;
 
@@ -764,8 +772,7 @@
       int typ = mattyp.type ();
       mattyp.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           if (typ == MatrixType::Permuted_Diagonal)
             retval = transpose ();
@@ -777,7 +784,8 @@
 
           if (calccond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nr; i++)
                 {
                   double tmp = std::abs (v[i]);
@@ -818,8 +826,8 @@
       int typ = mattyp.type ();
       mattyp.info ();
 
-      if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
+      if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper
+          || typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -893,8 +901,8 @@
                               colXp++;
                               colUp++;
                             }
-                        } while ((rpX<j) && (rpU<j) &&
-                                 (colXp<cx) && (colUp<nz));
+                        }
+                      while (rpX < j && rpU < j && colXp < cx && colUp < nz);
 
 
                       // get A(m,m)
@@ -1116,7 +1124,6 @@
             {
               // Matrix is either singular or not positive definite
               mattype.mark_as_unsymmetric ();
-              typ = MatrixType::Full;
             }
         }
 
@@ -1305,8 +1312,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           retval.resize (nc, b.cols (), Complex (0.,0.));
           if (typ == MatrixType::Diagonal)
@@ -1321,7 +1327,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = std::abs (data (i));
@@ -1366,8 +1373,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           octave_idx_type b_nc = b.cols ();
           octave_idx_type b_nz = b.nnz ();
@@ -1412,7 +1418,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = std::abs (data (i));
@@ -1457,8 +1464,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           retval.resize (nc, b.cols (), Complex (0.,0.));
           if (typ == MatrixType::Diagonal)
@@ -1473,7 +1479,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nr; i++)
                 {
                   double tmp = std::abs (data (i));
@@ -1518,8 +1525,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           octave_idx_type b_nc = b.cols ();
           octave_idx_type b_nz = b.nnz ();
@@ -1564,7 +1570,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = std::abs (data (i));
@@ -1609,8 +1616,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -1649,8 +1655,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1725,8 +1731,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1792,9 +1798,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -1809,9 +1813,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -1845,8 +1847,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -1894,8 +1895,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1912,7 +1913,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -1991,8 +1992,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2008,7 +2009,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2080,9 +2081,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2097,9 +2096,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2132,8 +2129,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2172,8 +2168,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2248,8 +2244,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2315,9 +2311,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2332,9 +2326,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2368,8 +2360,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2417,8 +2408,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2435,7 +2426,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2514,8 +2505,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2531,7 +2522,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2603,9 +2594,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2620,9 +2609,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2656,8 +2643,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2793,8 +2779,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2859,9 +2844,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2876,9 +2859,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2913,8 +2894,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2985,7 +2965,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3077,8 +3057,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3094,7 +3073,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3167,9 +3146,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3184,9 +3161,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3220,8 +3195,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -3359,8 +3333,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3427,9 +3400,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3444,9 +3415,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3480,8 +3449,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -3552,7 +3520,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3644,8 +3612,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3661,7 +3628,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3734,9 +3701,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3751,9 +3716,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3900,8 +3863,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
 
             }
           else
@@ -3941,8 +3903,8 @@
       mattype.info ();
 
       // Note can't treat symmetric case as there is no dpttrf function
-      if (typ == MatrixType::Tridiagonal ||
-          typ == MatrixType::Tridiagonal_Hermitian)
+      if (typ == MatrixType::Tridiagonal
+          || typ == MatrixType::Tridiagonal_Hermitian)
         {
           OCTAVE_LOCAL_BUFFER (Complex, DU2, nr - 2);
           OCTAVE_LOCAL_BUFFER (Complex, DU, nr - 1);
@@ -3998,9 +3960,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4027,7 +3987,7 @@
                              work, b.rows (), err
                              F77_CHAR_ARG_LEN (1)));
 
-                  // Count non-zeros in work vector and adjust
+                  // Count nonzeros in work vector and adjust
                   // space in retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nr; i++)
@@ -4202,8 +4162,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
         }
       else if (typ != MatrixType::Tridiagonal_Hermitian)
@@ -4241,8 +4200,8 @@
       mattype.info ();
 
       // Note can't treat symmetric case as there is no dpttrf function
-      if (typ == MatrixType::Tridiagonal ||
-          typ == MatrixType::Tridiagonal_Hermitian)
+      if (typ == MatrixType::Tridiagonal
+          || typ == MatrixType::Tridiagonal_Hermitian)
         {
           OCTAVE_LOCAL_BUFFER (Complex, DU2, nr - 2);
           OCTAVE_LOCAL_BUFFER (Complex, DU, nr - 1);
@@ -4298,8 +4257,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4309,7 +4267,7 @@
               octave_idx_type b_nc = b.cols ();
               OCTAVE_LOCAL_BUFFER (Complex, Bx, b_nr);
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               volatile octave_idx_type x_nz = b.nnz ();
               volatile octave_idx_type ii = 0;
@@ -4320,7 +4278,7 @@
                 {
 
                   for (octave_idx_type i = 0; i < b_nr; i++)
-                    Bx[i] = b (i,j);
+                    Bx[i] = b(i,j);
 
                   F77_XFCN (zgttrs, ZGTTRS,
                             (F77_CONST_CHAR_ARG2 (&job, 1),
@@ -4337,7 +4295,7 @@
                       break;
                     }
 
-                  // Count non-zeros in work vector and adjust
+                  // Count nonzeros in work vector and adjust
                   // space in retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nr; i++)
@@ -4468,9 +4426,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4523,7 +4479,7 @@
               m_band(ridx (i) - j + n_lower + n_upper, j) = data (i);
 
           // Calculate the norm of the matrix, for later use.
-          double anorm;
+          double anorm = 0.0;
           if (calc_cond)
             {
               for (octave_idx_type j = 0; j < nr; j++)
@@ -4555,8 +4511,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4589,9 +4544,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4715,9 +4668,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4729,7 +4680,7 @@
                   octave_idx_type b_nc = b.cols ();
                   OCTAVE_LOCAL_BUFFER (Complex, Bx, b_nr);
 
-                  // Take a first guess that the number of non-zero terms
+                  // Take a first guess that the number of nonzero terms
                   // will be as many as in b
                   volatile octave_idx_type x_nz = b.nnz ();
                   volatile octave_idx_type ii = 0;
@@ -4805,7 +4756,7 @@
               m_band(ridx (i) - j + n_lower + n_upper, j) = data (i);
 
           // Calculate the norm of the matrix, for later use.
-          double anorm;
+          double anorm = 0.0;
           if (calc_cond)
             {
               for (octave_idx_type j = 0; j < nr; j++)
@@ -4835,9 +4786,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4870,9 +4819,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4903,7 +4850,7 @@
                                  ldm, pipvt, work, b.rows (), err
                                  F77_CHAR_ARG_LEN (1)));
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5035,9 +4982,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5090,7 +5035,7 @@
               m_band(ridx (i) - j + n_lower + n_upper, j) = data (i);
 
           // Calculate the norm of the matrix, for later use.
-          double anorm;
+          double anorm = 0.0;
           if (calc_cond)
             {
               for (octave_idx_type j = 0; j < nr; j++)
@@ -5120,8 +5065,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
           else
             {
@@ -5154,9 +5098,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5282,9 +5224,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5296,7 +5236,7 @@
                   octave_idx_type b_nc = b.cols ();
                   OCTAVE_LOCAL_BUFFER (Complex, Bx, b_nr);
 
-                  // Take a first guess that the number of non-zero terms
+                  // Take a first guess that the number of nonzero terms
                   // will be as many as in b
                   volatile octave_idx_type x_nz = b.nnz ();
                   volatile octave_idx_type ii = 0;
@@ -5307,7 +5247,7 @@
                     {
 
                       for (octave_idx_type i = 0; i < b_nr; i++)
-                        Bx[i] = b (i,j);
+                        Bx[i] = b(i,j);
 
                       F77_XFCN (zpbtrs, ZPBTRS,
                                 (F77_CONST_CHAR_ARG2 (&job, 1),
@@ -5323,7 +5263,7 @@
                           break;
                         }
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5377,7 +5317,7 @@
               m_band(ridx (i) - j + n_lower + n_upper, j) = data (i);
 
           // Calculate the norm of the matrix, for later use.
-          double anorm;
+          double anorm = 0.0;
           if (calc_cond)
             {
               for (octave_idx_type j = 0; j < nr; j++)
@@ -5407,9 +5347,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -5442,9 +5380,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5476,7 +5412,7 @@
                                  ldm, pipvt, Bx, b.rows (), err
                                  F77_CHAR_ARG_LEN (1)));
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5587,8 +5523,8 @@
         rcond = 1.;
       volatile double rcond_plus_one = rcond + 1.0;
 
-      if (status == UMFPACK_WARNING_singular_matrix ||
-          rcond_plus_one == 1.0 || xisnan (rcond))
+      if (status == UMFPACK_WARNING_singular_matrix
+          || rcond_plus_one == 1.0 || xisnan (rcond))
         {
           UMFPACK_ZNAME (report_numeric) (Numeric, control);
 
@@ -5597,10 +5533,7 @@
           if (sing_handler)
             sing_handler (rcond);
           else
-            (*current_liboctave_error_handler)
-              ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-               rcond);
-
+            gripe_singular_matrix (rcond);
         }
       else if (status < 0)
         {
@@ -5664,17 +5597,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -5748,9 +5681,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -5777,8 +5708,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -5907,17 +5838,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6001,9 +5932,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6036,8 +5965,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6071,7 +6000,7 @@
               OCTAVE_LOCAL_BUFFER (Complex, Bz, b_nr);
 #endif
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               octave_idx_type x_nz = b.nnz ();
               octave_idx_type ii = 0;
@@ -6198,17 +6127,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6282,9 +6211,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6311,8 +6238,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6420,17 +6347,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6514,9 +6441,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6549,8 +6474,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6577,7 +6502,7 @@
 
               OCTAVE_LOCAL_BUFFER (Complex, Bx, b_nr);
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               octave_idx_type x_nz = b.nnz ();
               octave_idx_type ii = 0;
@@ -6589,7 +6514,7 @@
               for (octave_idx_type j = 0; j < b_nc; j++)
                 {
                   for (octave_idx_type i = 0; i < b_nr; i++)
-                    Bx[i] = b (i,j);
+                    Bx[i] = b(i,j);
 
                   status = UMFPACK_ZNAME (solve) (UMFPACK_A, Ap,
                                                   Ai,
@@ -6637,18 +6562,15 @@
               rcond = Info (UMFPACK_RCOND);
               volatile double rcond_plus_one = rcond + 1.0;
 
-              if (status == UMFPACK_WARNING_singular_matrix ||
-                  rcond_plus_one == 1.0 || xisnan (rcond))
+              if (status == UMFPACK_WARNING_singular_matrix
+                  || rcond_plus_one == 1.0 || xisnan (rcond))
                 {
                   err = -2;
 
                   if (sing_handler)
                     sing_handler (rcond);
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseComplexMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
-
+                    gripe_singular_matrix (rcond);
                 }
 
               UMFPACK_ZNAME (report_info) (control, info);
@@ -6712,8 +6634,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -6780,8 +6702,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -6848,8 +6770,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -6917,8 +6839,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -7682,87 +7604,84 @@
 {
   SparseComplexMatrix r;
 
-  if ((a.rows () == b.rows ()) && (a.cols () == b.cols ()))
+  octave_idx_type a_nr = a.rows ();
+  octave_idx_type a_nc = a.cols ();
+  octave_idx_type b_nr = b.rows ();
+  octave_idx_type b_nc = b.cols ();
+
+  if (a_nr == b_nr && a_nc == b_nc)
     {
-      octave_idx_type a_nr = a.rows ();
-      octave_idx_type a_nc = a.cols ();
-
-      octave_idx_type b_nr = b.rows ();
-      octave_idx_type b_nc = b.cols ();
-
-      if (a_nr == 0 || b_nc == 0 || a.nnz () == 0 || b.nnz () == 0)
-        return SparseComplexMatrix (a_nr, a_nc);
-
-      if (a_nr != b_nr || a_nc != b_nc)
-        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
-      else
+      r = SparseComplexMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
+
+      octave_idx_type jx = 0;
+      r.cidx (0) = 0;
+      for (octave_idx_type i = 0 ; i < a_nc ; i++)
         {
-          r = SparseComplexMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
-
-          octave_idx_type jx = 0;
-          r.cidx (0) = 0;
-          for (octave_idx_type i = 0 ; i < a_nc ; i++)
-            {
-              octave_idx_type  ja = a.cidx (i);
-              octave_idx_type  ja_max = a.cidx (i+1);
-              bool ja_lt_max= ja < ja_max;
-
-              octave_idx_type  jb = b.cidx (i);
-              octave_idx_type  jb_max = b.cidx (i+1);
-              bool jb_lt_max = jb < jb_max;
-
-              while (ja_lt_max || jb_lt_max )
-                {
-                  octave_quit ();
-                  if ((! jb_lt_max) ||
-                      (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+          octave_idx_type  ja = a.cidx (i);
+          octave_idx_type  ja_max = a.cidx (i+1);
+          bool ja_lt_max= ja < ja_max;
+
+          octave_idx_type  jb = b.cidx (i);
+          octave_idx_type  jb_max = b.cidx (i+1);
+          bool jb_lt_max = jb < jb_max;
+
+          while (ja_lt_max || jb_lt_max)
+            {
+              octave_quit ();
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+                {
+                  Complex tmp = xmin (a.data (ja), 0.);
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmin (a.data (ja), 0.);
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = a.ridx (ja);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
+                      r.ridx (jx) = a.ridx (ja);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else if (( !ja_lt_max ) ||
-                           (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                }
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
+                {
+                  Complex tmp = xmin (0., b.data (jb));
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmin (0., b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = b.ridx (jb);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.ridx (jx) = b.ridx (jb);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+              else
+                {
+                  Complex tmp = xmin (a.data (ja), b.data (jb));
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmin (a.data (ja), b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.data (jx) = tmp;
-                          r.ridx (jx) = a.ridx (ja);
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.data (jx) = tmp;
+                      r.ridx (jx) = a.ridx (ja);
+                      jx++;
                     }
-                }
-              r.cidx (i+1) = jx;
-            }
-
-          r.maybe_compress ();
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+            }
+          r.cidx (i+1) = jx;
         }
+
+      r.maybe_compress ();
     }
   else
-    (*current_liboctave_error_handler) ("matrix size mismatch");
+    {
+      if (a_nr == 0 || a_nc == 0)
+        r.resize (a_nr, a_nc);
+      else if (b_nr == 0 || b_nc == 0)
+        r.resize (b_nr, b_nc);
+      else
+        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
+    }
 
   return r;
 }
@@ -7777,7 +7696,7 @@
 
   EMPTY_RETURN_CHECK (SparseComplexMatrix);
 
-  // Count the number of non-zero elements
+  // Count the number of nonzero elements
   if (xmax (c, 0.) != 0.)
     {
       result = SparseComplexMatrix (nr, nc, c);
@@ -7802,91 +7721,84 @@
 {
   SparseComplexMatrix r;
 
-  if ((a.rows () == b.rows ()) && (a.cols () == b.cols ()))
+  octave_idx_type a_nr = a.rows ();
+  octave_idx_type a_nc = a.cols ();
+  octave_idx_type b_nr = b.rows ();
+  octave_idx_type b_nc = b.cols ();
+
+  if (a_nr == b_nr && a_nc == b_nc)
     {
-      octave_idx_type a_nr = a.rows ();
-      octave_idx_type a_nc = a.cols ();
-
-      octave_idx_type b_nr = b.rows ();
-      octave_idx_type b_nc = b.cols ();
-
-      if (a_nr == 0 || b_nc == 0)
-        return SparseComplexMatrix (a_nr, a_nc);
-      if (a.nnz () == 0)
-        return SparseComplexMatrix (b);
-      if (b.nnz () == 0)
-        return SparseComplexMatrix (a);
-
-      if (a_nr != b_nr || a_nc != b_nc)
-        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
-      else
+      r = SparseComplexMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
+
+      octave_idx_type jx = 0;
+      r.cidx (0) = 0;
+      for (octave_idx_type i = 0 ; i < a_nc ; i++)
         {
-          r = SparseComplexMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
-
-          octave_idx_type jx = 0;
-          r.cidx (0) = 0;
-          for (octave_idx_type i = 0 ; i < a_nc ; i++)
-            {
-              octave_idx_type  ja = a.cidx (i);
-              octave_idx_type  ja_max = a.cidx (i+1);
-              bool ja_lt_max= ja < ja_max;
-
-              octave_idx_type  jb = b.cidx (i);
-              octave_idx_type  jb_max = b.cidx (i+1);
-              bool jb_lt_max = jb < jb_max;
-
-              while (ja_lt_max || jb_lt_max )
-                {
-                  octave_quit ();
-                  if ((! jb_lt_max) ||
-                      (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+          octave_idx_type  ja = a.cidx (i);
+          octave_idx_type  ja_max = a.cidx (i+1);
+          bool ja_lt_max= ja < ja_max;
+
+          octave_idx_type  jb = b.cidx (i);
+          octave_idx_type  jb_max = b.cidx (i+1);
+          bool jb_lt_max = jb < jb_max;
+
+          while (ja_lt_max || jb_lt_max)
+            {
+              octave_quit ();
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+                {
+                  Complex tmp = xmax (a.data (ja), 0.);
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmax (a.data (ja), 0.);
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = a.ridx (ja);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
+                      r.ridx (jx) = a.ridx (ja);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else if (( !ja_lt_max ) ||
-                           (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                }
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
+                {
+                  Complex tmp = xmax (0., b.data (jb));
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmax (0., b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = b.ridx (jb);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.ridx (jx) = b.ridx (jb);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+              else
+                {
+                  Complex tmp = xmax (a.data (ja), b.data (jb));
+                  if (tmp != 0.)
                     {
-                      Complex tmp = xmax (a.data (ja), b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.data (jx) = tmp;
-                          r.ridx (jx) = a.ridx (ja);
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.data (jx) = tmp;
+                      r.ridx (jx) = a.ridx (ja);
+                      jx++;
                     }
-                }
-              r.cidx (i+1) = jx;
-            }
-
-          r.maybe_compress ();
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+            }
+          r.cidx (i+1) = jx;
         }
+
+      r.maybe_compress ();
     }
   else
-    (*current_liboctave_error_handler) ("matrix size mismatch");
+    {
+      if (a_nr == 0 || a_nc == 0)
+        r.resize (a_nr, a_nc);
+      else if (b_nr == 0 || b_nc == 0)
+        r.resize (b_nr, b_nc);
+      else
+        gripe_nonconformant ("max", a_nr, a_nc, b_nr, b_nc);
+    }
 
   return r;
 }
--- a/liboctave/array/CSparse.h
+++ b/liboctave/array/CSparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -26,6 +26,7 @@
 
 #include "dMatrix.h"
 #include "dNDArray.h"
+#include "CMatrix.h"
 #include "CNDArray.h"
 #include "dColVector.h"
 #include "CColVector.h"
@@ -34,7 +35,9 @@
 #include "DET.h"
 #include "MSparse.h"
 #include "MSparse-defs.h"
-#include "Sparse-op-defs.h"
+
+#include "Sparse-op-decls.h"
+
 #include "MatrixType.h"
 
 class PermMatrix;
--- a/liboctave/array/DiagArray2.cc
+++ b/liboctave/array/DiagArray2.cc
@@ -1,7 +1,7 @@
 // Template array classes
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -66,9 +66,8 @@
     d = Array<T> (dim_vector (std::min (cols () - k, rows ()), 1), T ());
   else if (k < 0 && -k < rows ())
     d = Array<T> (dim_vector (std::min (rows () + k, cols ()), 1), T ());
-  else
-    (*current_liboctave_error_handler)
-      ("diag: requested diagonal out of range");
+  else  // Matlab returns [] 0x1 for out-of-range diagonal
+    d.resize (dim_vector (0, 1));
 
   return d;
 }
--- a/liboctave/array/DiagArray2.h
+++ b/liboctave/array/DiagArray2.h
@@ -1,7 +1,7 @@
 // Template array classes
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2010 VZLU Prague
 
--- a/liboctave/array/MArray-C.cc
+++ b/liboctave/array/MArray-C.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-d.cc
+++ b/liboctave/array/MArray-d.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-decl.h
+++ b/liboctave/array/MArray-decl.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-defs.h
+++ b/liboctave/array/MArray-defs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
--- a/liboctave/array/MArray-f.cc
+++ b/liboctave/array/MArray-f.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-fC.cc
+++ b/liboctave/array/MArray-fC.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-i.cc
+++ b/liboctave/array/MArray-i.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray-s.cc
+++ b/liboctave/array/MArray-s.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MArray.cc
+++ b/liboctave/array/MArray.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/MArray.h
+++ b/liboctave/array/MArray.h
@@ -1,7 +1,7 @@
 // Template array classes with like-type math ops
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -49,12 +49,6 @@
 
   MArray (void) : Array<T> () { }
 
-  explicit MArray (octave_idx_type n) GCC_ATTR_DEPRECATED
-    : Array<T> (dim_vector (n, 1)) { }
-
-  MArray (octave_idx_type n, const T& val) GCC_ATTR_DEPRECATED
-    : Array<T> (dim_vector (n, 1), val) { }
-
   explicit MArray (const dim_vector& dv)
     : Array<T> (dv) { }
 
deleted file mode 100644
--- a/liboctave/array/MArray2.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Template array classes with like-type math ops
-/*
-
-Copyright (C) 1996-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_MArray2_h)
-#define octave_MArray2_h 1
-
-#include "MArray.h"
-#define MArray2 MArray
-
-// If we're with GNU C++, issue a warning.
-#ifdef __GNUC__
-#warning Using MArray2<T> is deprecated. Use MArray<T>.
-#endif
-
-
-
-#endif
deleted file mode 100644
--- a/liboctave/array/MArrayN.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Template array classes with like-type math ops
-/*
-
-Copyright (C) 1996-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_MArrayN_h)
-#define octave_MArrayN_h 1
-
-#include "MArray.h"
-#define MArrayN MArray
-
-// If we're with GNU C++, issue a warning.
-#ifdef __GNUC__
-#warning Using MArrayN<T> is deprecated. Use MArray<T>.
-#endif
-
-#endif
--- a/liboctave/array/MDiagArray2.cc
+++ b/liboctave/array/MDiagArray2.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -38,7 +38,8 @@
   bool retval = this->rows () == this->cols ();
   if (retval)
     {
-      octave_idx_type len = this->length (), i = 0;
+      octave_idx_type len = this->length ();
+      octave_idx_type i = 0;
       for (; i < len; i++)
         if (DiagArray2<T>::elem (i, i) != val) break;
       retval = i == len;
--- a/liboctave/array/MDiagArray2.h
+++ b/liboctave/array/MDiagArray2.h
@@ -1,7 +1,7 @@
 // Template array classes with like-type math ops
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/MSparse-C.cc
+++ b/liboctave/array/MSparse-C.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/MSparse-d.cc
+++ b/liboctave/array/MSparse-d.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/MSparse-defs.h
+++ b/liboctave/array/MSparse-defs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/MSparse.cc
+++ b/liboctave/array/MSparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -68,11 +68,10 @@
           octave_idx_type  jb_max = b.cidx (i+1);
           bool jb_lt_max = jb < jb_max;
 
-          while (ja_lt_max || jb_lt_max )
+          while (ja_lt_max || jb_lt_max)
             {
               octave_quit ();
-              if ((! jb_lt_max) ||
-                  (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
                 {
                   r.ridx (jx) = a.ridx (ja);
                   r.data (jx) = op (a.data (ja), 0.);
@@ -80,8 +79,8 @@
                   ja++;
                   ja_lt_max= ja < ja_max;
                 }
-              else if (( !ja_lt_max ) ||
-                       (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
                 {
                   r.ridx (jx) = b.ridx (jb);
                   r.data (jx) = op (0., b.data (jb));
@@ -340,11 +339,10 @@
           octave_idx_type  jb_max = b.cidx (i+1);
           bool jb_lt_max = jb < jb_max;
 
-          while (ja_lt_max || jb_lt_max )
+          while (ja_lt_max || jb_lt_max)
             {
               octave_quit ();
-              if ((! jb_lt_max) ||
-                  (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
                 {
                   r.ridx (jx) = a.ridx (ja);
                   r.data (jx) = op (a.data (ja), 0.);
@@ -352,8 +350,8 @@
                   ja++;
                   ja_lt_max= ja < ja_max;
                 }
-              else if (( !ja_lt_max ) ||
-                       (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
                 {
                   r.ridx (jx) = b.ridx (jb);
                   r.data (jx) = op (0.,  b.data (jb));
@@ -462,16 +460,15 @@
           octave_idx_type  jb_max = b.cidx (i+1);
           bool jb_lt_max = jb < jb_max;
 
-          while (ja_lt_max || jb_lt_max )
+          while (ja_lt_max || jb_lt_max)
             {
               octave_quit ();
-              if ((! jb_lt_max) ||
-                  (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
                 {
                   ja++; ja_lt_max= ja < ja_max;
                 }
-              else if (( !ja_lt_max ) ||
-                       (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
                 {
                   jb++; jb_lt_max= jb < jb_max;
                 }
@@ -569,7 +566,7 @@
     gripe_nonconformant ("quotient", a_nr, a_nc, b_nr, b_nc);
   else
     {
-      r = MSparse<T>( a_nr, a_nc, (Zero / Zero));
+      r = MSparse<T> (a_nr, a_nc, (Zero / Zero));
 
       for (octave_idx_type i = 0 ; i < a_nc ; i++)
         {
@@ -581,17 +578,16 @@
           octave_idx_type  jb_max = b.cidx (i+1);
           bool jb_lt_max = jb < jb_max;
 
-          while (ja_lt_max || jb_lt_max )
+          while (ja_lt_max || jb_lt_max)
             {
               octave_quit ();
-              if ((! jb_lt_max) ||
-                  (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
                 {
                   r.elem (a.ridx (ja),i) = a.data (ja) / Zero;
                   ja++; ja_lt_max= ja < ja_max;
                 }
-              else if (( !ja_lt_max ) ||
-                       (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
                 {
                   r.elem (b.ridx (jb),i) = Zero / b.data (jb);
                   jb++; jb_lt_max= jb < jb_max;
--- a/liboctave/array/MSparse.h
+++ b/liboctave/array/MSparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/Matrix.h
+++ b/liboctave/array/Matrix.h
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/MatrixType.cc
+++ b/liboctave/array/MatrixType.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 David Bateman
+Copyright (C) 2006-2015 David Bateman
 Copyright (C) 2006 Andy Adler
 Copyright (C) 2009 VZLU Prague
 
@@ -30,12 +30,35 @@
 
 #include "MatrixType.h"
 #include "dMatrix.h"
+#include "fMatrix.h"
 #include "CMatrix.h"
+#include "fCMatrix.h"
 #include "dSparse.h"
 #include "CSparse.h"
 #include "oct-spparms.h"
 #include "oct-locbuf.h"
 
+static void
+warn_cached (void)
+{
+  (*current_liboctave_warning_with_id_handler)
+    ("Octave:matrix-type-info", "using cached matrix type");
+}
+
+static void
+warn_invalid (void)
+{
+  (*current_liboctave_warning_with_id_handler)
+    ("Octave:matrix-type-info", "invalid matrix type");
+}
+
+static void
+warn_calculating_sparse_type (void)
+{
+  (*current_liboctave_warning_with_id_handler)
+    ("Octave:matrix-type-info", "calculating sparse matrix type");
+}
+
 // FIXME: There is a large code duplication here
 
 MatrixType::MatrixType (void)
@@ -91,7 +114,8 @@
         {
           for (octave_idx_type i = 0; i < j; i++)
             {
-              double aij = a.elem (i,j), aji = a.elem (j,i);
+              double aij = a.elem (i,j);
+              double aji = a.elem (j,i);
               lower = lower && (aij == zero);
               upper = upper && (aji == zero);
               hermitian = hermitian && (aij == aji
@@ -118,7 +142,7 @@
 MatrixType::matrix_type
 matrix_complex_probe (const MArray<std::complex<T> >& a)
 {
-  MatrixType::matrix_type typ;
+  MatrixType::matrix_type typ = MatrixType::Unknown;
   octave_idx_type nrows = a.rows ();
   octave_idx_type ncols = a.cols ();
 
@@ -149,7 +173,8 @@
         {
           for (octave_idx_type i = 0; i < j; i++)
             {
-              std::complex<T> aij = a.elem (i,j), aji = a.elem (j,i);
+              std::complex<T> aij = a.elem (i,j);
+              std::complex<T> aji = a.elem (j,i);
               lower = lower && (aij == zero);
               upper = upper && (aji == zero);
               hermitian = hermitian && (aij == std::conj (aji)
@@ -217,8 +242,7 @@
   octave_idx_type nnz = a.nnz ();
 
   if (octave_sparse_params::get_key ("spumoni") != 0.)
-    (*current_liboctave_warning_handler)
-      ("Calculating Sparse Matrix Type");
+    warn_calculating_sparse_type ();
 
   sp_bandden = octave_sparse_params::get_bandden ();
   bool maybe_hermitian = false;
@@ -254,8 +278,8 @@
 
           for (octave_idx_type j = i; j < nm; j++)
             {
-              if ((a.cidx (j+1) > a.cidx (j) + 1)  ||
-                  ((a.cidx (j+1) == a.cidx (j) + 1) && found[a.ridx (j)]))
+              if ((a.cidx (j+1) > a.cidx (j) + 1)
+                  || ((a.cidx (j+1) == a.cidx (j) + 1) && found[a.ridx (j)]))
                 {
                   tmp_typ = MatrixType::Full;
                   break;
@@ -358,8 +382,8 @@
 
               for (octave_idx_type j = 0; j < ncols; j++)
                 {
-                  if ((a.cidx (j+1) - a.cidx (j)) > 0 &&
-                      (a.ridx (a.cidx (j+1)-1) == i))
+                  if ((a.cidx (j+1) - a.cidx (j)) > 0
+                      && (a.ridx (a.cidx (j+1)-1) == i))
                     {
                       perm[i] = j;
                       found = true;
@@ -450,12 +474,12 @@
       //        problems as being detected, and force to treat as singular
       //        as this seems to cause issues.
       if (((typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-           && nrows > ncols) ||
-          ((typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-           && nrows < ncols))
+           && nrows > ncols)
+          || ((typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
+              && nrows < ncols))
         {
-          if (typ == MatrixType::Permuted_Upper ||
-              typ == MatrixType::Permuted_Lower)
+          if (typ == MatrixType::Permuted_Upper
+              || typ == MatrixType::Permuted_Lower)
             delete [] perm;
           nperm = 0;
           typ = MatrixType::Rectangular;
@@ -464,9 +488,9 @@
       if (typ == MatrixType::Full && ncols != nrows)
         typ = MatrixType::Rectangular;
 
-      if (maybe_hermitian && (typ == MatrixType::Full ||
-                              typ == MatrixType::Tridiagonal ||
-                              typ == MatrixType::Banded))
+      if (maybe_hermitian && (typ == MatrixType::Full
+                              || typ == MatrixType::Tridiagonal
+                              || typ == MatrixType::Banded))
         {
           bool is_herm = true;
 
@@ -536,8 +560,7 @@
   octave_idx_type nnz = a.nnz ();
 
   if (octave_sparse_params::get_key ("spumoni") != 0.)
-    (*current_liboctave_warning_handler)
-      ("Calculating Sparse Matrix Type");
+    warn_calculating_sparse_type ();
 
   sp_bandden = octave_sparse_params::get_bandden ();
   bool maybe_hermitian = false;
@@ -573,8 +596,8 @@
 
           for (octave_idx_type j = i; j < nm; j++)
             {
-              if ((a.cidx (j+1) > a.cidx (j) + 1)  ||
-                  ((a.cidx (j+1) == a.cidx (j) + 1) && found[a.ridx (j)]))
+              if ((a.cidx (j+1) > a.cidx (j) + 1)
+                  || ((a.cidx (j+1) == a.cidx (j) + 1) && found[a.ridx (j)]))
                 {
                   tmp_typ = MatrixType::Full;
                   break;
@@ -677,8 +700,8 @@
 
               for (octave_idx_type j = 0; j < ncols; j++)
                 {
-                  if ((a.cidx (j+1) - a.cidx (j)) > 0 &&
-                      (a.ridx (a.cidx (j+1)-1) == i))
+                  if ((a.cidx (j+1) - a.cidx (j)) > 0
+                      && (a.ridx (a.cidx (j+1)-1) == i))
                     {
                       perm[i] = j;
                       found = true;
@@ -769,12 +792,12 @@
       //        problems as being detected, and force to treat as singular
       //        as this seems to cause issues.
       if (((typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-           && nrows > ncols) ||
-          ((typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-           && nrows < ncols))
+           && nrows > ncols)
+          || ((typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
+              && nrows < ncols))
         {
-          if (typ == MatrixType::Permuted_Upper ||
-              typ == MatrixType::Permuted_Lower)
+          if (typ == MatrixType::Permuted_Upper
+              || typ == MatrixType::Permuted_Lower)
             delete [] perm;
           nperm = 0;
           typ = MatrixType::Rectangular;
@@ -783,9 +806,9 @@
       if (typ == MatrixType::Full && ncols != nrows)
         typ = MatrixType::Rectangular;
 
-      if (maybe_hermitian && (typ == MatrixType::Full ||
-                              typ == MatrixType::Tridiagonal ||
-                              typ == MatrixType::Banded))
+      if (maybe_hermitian && (typ == MatrixType::Full
+                              || typ == MatrixType::Tridiagonal
+                              || typ == MatrixType::Banded))
         {
           bool is_herm = true;
 
@@ -857,7 +880,7 @@
       || t == MatrixType::Rectangular)
     typ = t;
   else
-    (*current_liboctave_warning_handler) ("Invalid matrix type");
+    warn_invalid ();
 }
 
 MatrixType::MatrixType (const matrix_type t, const octave_idx_type np,
@@ -867,8 +890,8 @@
     bandden (0), upper_band (0), lower_band (0),
     dense (false), full (_full), nperm (0), perm (0)
 {
-  if ((t == MatrixType::Permuted_Upper || t == MatrixType::Permuted_Lower) &&
-      np > 0 && p != 0)
+  if ((t == MatrixType::Permuted_Upper || t == MatrixType::Permuted_Lower)
+      && np > 0 && p != 0)
     {
       typ = t;
       nperm = np;
@@ -877,7 +900,7 @@
         perm[i] = p[i];
     }
   else
-    (*current_liboctave_warning_handler) ("Invalid matrix type");
+    warn_invalid ();
 }
 
 MatrixType::MatrixType (const matrix_type t, const octave_idx_type ku,
@@ -894,7 +917,7 @@
       lower_band = kl;
     }
   else
-    (*current_liboctave_warning_handler) ("Invalid sparse matrix type");
+    warn_invalid ();
 }
 
 MatrixType::~MatrixType (void)
@@ -942,18 +965,16 @@
   if (typ != MatrixType::Unknown
       && (full || sp_bandden == octave_sparse_params::get_bandden ()))
     {
-      if (!quiet &&
-          octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+      if (!quiet && octave_sparse_params::get_key ("spumoni") != 0.)
+        warn_cached ();
 
       return typ;
     }
 
-  if (typ != MatrixType::Unknown &&
-      octave_sparse_params::get_key ("spumoni") != 0.)
-    (*current_liboctave_warning_handler)
-      ("Invalidating Matrix Type");
+  if (typ != MatrixType::Unknown
+      && octave_sparse_params::get_key ("spumoni") != 0.)
+    (*current_liboctave_warning_with_id_handler)
+      ("Octave:matrix-type-info", "invalidating matrix type");
 
   typ = MatrixType::Unknown;
 
@@ -967,8 +988,7 @@
       && (full || sp_bandden == octave_sparse_params::get_bandden ()))
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1000,8 +1020,7 @@
       && (full || sp_bandden == octave_sparse_params::get_bandden ()))
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1032,8 +1051,7 @@
   if (typ != MatrixType::Unknown)
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1059,8 +1077,7 @@
   if (typ != MatrixType::Unknown)
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1086,8 +1103,7 @@
   if (typ != MatrixType::Unknown)
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1113,8 +1129,7 @@
   if (typ != MatrixType::Unknown)
     {
       if (octave_sparse_params::get_key ("spumoni") != 0.)
-        (*current_liboctave_warning_handler)
-          ("Using Cached Matrix Type");
+        warn_cached ();
 
       return typ;
     }
@@ -1140,63 +1155,65 @@
   if (octave_sparse_params::get_key ("spumoni") != 0.)
     {
       if (typ == MatrixType::Unknown)
-        (*current_liboctave_warning_handler)
-          ("Unknown Matrix Type");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "unknown matrix type");
       else if (typ == MatrixType::Diagonal)
-        (*current_liboctave_warning_handler)
-          ("Diagonal Sparse Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "diagonal sparse matrix");
       else if (typ == MatrixType::Permuted_Diagonal)
-        (*current_liboctave_warning_handler)
-          ("Permuted Diagonal Sparse Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "permuted diagonal sparse matrix");
       else if (typ == MatrixType::Upper)
-        (*current_liboctave_warning_handler)
-          ("Upper Triangular Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "upper triangular matrix");
       else if (typ == MatrixType::Lower)
-        (*current_liboctave_warning_handler)
-          ("Lower Triangular Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "lower triangular matrix");
       else if (typ == MatrixType::Permuted_Upper)
-        (*current_liboctave_warning_handler)
-          ("Permuted Upper Triangular Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "permuted upper triangular matrix");
       else if (typ == MatrixType::Permuted_Lower)
-        (*current_liboctave_warning_handler)
-          ("Permuted Lower Triangular Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "permuted lower triangular Matrix");
       else if (typ == MatrixType::Banded)
-        (*current_liboctave_warning_handler)
-          ("Banded Sparse Matrix %d-1-%d (Density %f)", lower_band,
-           upper_band, bandden);
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info",
+           "banded sparse matrix %d-1-%d (density %f)",
+           lower_band, upper_band, bandden);
       else if (typ == MatrixType::Banded_Hermitian)
-        (*current_liboctave_warning_handler)
-          ("Banded Hermitian/Symmetric Sparse Matrix %d-1-%d (Density %f)",
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info",
+           "banded hermitian/symmetric sparse matrix %d-1-%d (density %f)",
            lower_band, upper_band, bandden);
       else if (typ == MatrixType::Hermitian)
-        (*current_liboctave_warning_handler)
-          ("Hermitian/Symmetric Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "hermitian/symmetric matrix");
       else if (typ == MatrixType::Tridiagonal)
-        (*current_liboctave_warning_handler)
-          ("Tridiagonal Sparse Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "tridiagonal sparse matrix");
       else if (typ == MatrixType::Tridiagonal_Hermitian)
-        (*current_liboctave_warning_handler)
-          ("Hermitian/Symmetric Tridiagonal Sparse Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info",
+           "hermitian/symmetric tridiagonal sparse matrix");
       else if (typ == MatrixType::Rectangular)
-        (*current_liboctave_warning_handler)
-          ("Rectangular/Singular Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "rectangular/singular matrix");
       else if (typ == MatrixType::Full)
-        (*current_liboctave_warning_handler)
-          ("Full Matrix");
+        (*current_liboctave_warning_with_id_handler)
+          ("Octave:matrix-type-info", "full matrix");
     }
 }
 
 void
 MatrixType::mark_as_symmetric (void)
 {
-  if (typ == MatrixType::Tridiagonal ||
-      typ == MatrixType::Tridiagonal_Hermitian)
+  if (typ == MatrixType::Tridiagonal
+      || typ == MatrixType::Tridiagonal_Hermitian)
     typ = MatrixType::Tridiagonal_Hermitian;
-  else if (typ == MatrixType::Banded ||
-           typ == MatrixType::Banded_Hermitian)
+  else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     typ = MatrixType::Banded_Hermitian;
-  else if (typ == MatrixType::Full || typ == MatrixType::Hermitian ||
-           typ == MatrixType::Unknown)
+  else if (typ == MatrixType::Full || typ == MatrixType::Hermitian
+           || typ == MatrixType::Unknown)
     typ = MatrixType::Hermitian;
   else
     (*current_liboctave_error_handler)
@@ -1206,14 +1223,13 @@
 void
 MatrixType::mark_as_unsymmetric (void)
 {
-  if (typ == MatrixType::Tridiagonal ||
-      typ == MatrixType::Tridiagonal_Hermitian)
+  if (typ == MatrixType::Tridiagonal
+      || typ == MatrixType::Tridiagonal_Hermitian)
     typ = MatrixType::Tridiagonal;
-  else if (typ == MatrixType::Banded ||
-           typ == MatrixType::Banded_Hermitian)
+  else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     typ = MatrixType::Banded;
-  else if (typ == MatrixType::Full || typ == MatrixType::Hermitian ||
-           typ == MatrixType::Unknown)
+  else if (typ == MatrixType::Full || typ == MatrixType::Hermitian
+           || typ == MatrixType::Unknown)
     typ = MatrixType::Full;
 }
 
--- a/liboctave/array/MatrixType.h
+++ b/liboctave/array/MatrixType.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 David Bateman
+Copyright (C) 2006-2015 David Bateman
 Copyright (C) 2006 Andy Adler
 
 This file is part of Octave.
@@ -121,8 +121,8 @@
 
   bool is_hermitian (void) const
   {
-    return (typ == Banded_Hermitian || typ == Tridiagonal_Hermitian ||
-            typ == Hermitian);
+    return (typ == Banded_Hermitian || typ == Tridiagonal_Hermitian
+            || typ == Hermitian);
   }
 
   bool is_rectangular (void) const { return (typ == Rectangular); }
--- a/liboctave/array/PermMatrix.cc
+++ b/liboctave/array/PermMatrix.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -36,8 +36,8 @@
     ("PermMatrix: invalid permutation vector");
 }
 
-PermMatrix::PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check)
-  : Array<octave_idx_type> (p), _colp(colp)
+void
+PermMatrix::setup (const Array<octave_idx_type>& p, bool colp, bool check)
 {
   if (check)
     {
@@ -47,12 +47,28 @@
           Array<octave_idx_type>::operator = (Array<octave_idx_type> ());
         }
     }
+
+  if (!colp)
+    *this = this->transpose ();
+}
+
+PermMatrix::PermMatrix (const Array<octave_idx_type>& p)
+  : Array<octave_idx_type> (p)
+{
+  setup (p, false, true);
 }
 
-PermMatrix::PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n)
-  : Array<octave_idx_type> (), _colp(colp)
+PermMatrix::PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check)
+  : Array<octave_idx_type> (p)
+{
+  setup (p, colp, check);
+}
+
+void
+PermMatrix::setup (const idx_vector& idx, bool colp, octave_idx_type n)
 {
   octave_idx_type len = idx.length (n);
+
   if (! idx.is_permutation (len))
     gripe_invalid_permutation ();
   else
@@ -61,12 +77,28 @@
       for (octave_idx_type i = 0; i < len; i++) idxa(i) = idx(i);
       Array<octave_idx_type>::operator = (idxa);
     }
+
+  if (!colp)
+    *this = this->transpose ();
+}
+
+PermMatrix::PermMatrix (const idx_vector& idx)
+  : Array<octave_idx_type> ()
+{
+  setup (idx, false, 0);
+}
+
+PermMatrix::PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n)
+  : Array<octave_idx_type> ()
+{
+  setup (idx, colp, n);
 }
 
 PermMatrix::PermMatrix (octave_idx_type n)
-  : Array<octave_idx_type> (dim_vector (n, 1)), _colp (false)
+  : Array<octave_idx_type> (dim_vector (n, 1))
 {
-  for (octave_idx_type i = 0; i < n; i++) xelem (i) = i;
+  for (octave_idx_type i = 0; i < n; i++)
+    xelem (i) = i;
 }
 
 octave_idx_type
@@ -86,8 +118,13 @@
 PermMatrix
 PermMatrix::transpose (void) const
 {
-  PermMatrix retval (*this);
-  retval._colp = ! retval._colp;
+  octave_idx_type len = Array<octave_idx_type>::length ();
+
+  PermMatrix retval (len);
+
+  for (octave_idx_type i = 0; i < len; ++i)
+    retval.xelem (xelem (i)) = i;
+
   return retval;
 }
 
@@ -119,7 +156,8 @@
 
   for (octave_idx_type i = 0; i < len; i++)
     {
-      octave_idx_type j = p[i], k = q[i];
+      octave_idx_type j = p[i];
+      octave_idx_type k = q[i];
       if (j != i)
         {
           p[k] = p[i];
@@ -132,17 +170,20 @@
 }
 
 PermMatrix
-PermMatrix::power (octave_idx_type m) const
+PermMatrix::power(octave_idx_type m) const
+{
+  if (m < 0)
+    return inverse ().pos_power (-m);
+  else if (m > 0)
+    return pos_power (m);
+  else
+    return PermMatrix (rows ());
+}
+
+PermMatrix
+PermMatrix::pos_power (octave_idx_type m) const
 {
   octave_idx_type n = rows ();
-  bool res_colp = _colp;
-  if (m < 0)
-    {
-      res_colp = ! res_colp;
-      m = -m;
-    }
-  else if (m == 0)
-    return PermMatrix (n);
 
   const octave_idx_type *p = data ();
   Array<octave_idx_type> res_pvec (dim_vector (n, 1), -1);
@@ -175,42 +216,29 @@
 
     }
 
-  return PermMatrix (res_pvec, res_colp, false);
+  return PermMatrix (res_pvec, true, false);
 }
 
 PermMatrix
 PermMatrix::eye (octave_idx_type n)
 {
-  Array<octave_idx_type> p (dim_vector (n, 1));
-  for (octave_idx_type i = 0; i < n; i++)
-    p(i) = i;
-
-  return PermMatrix (p, false, false);
+  return PermMatrix (n);
 }
 
 PermMatrix
 operator *(const PermMatrix& a, const PermMatrix& b)
 {
-  const Array<octave_idx_type> ia = a.pvec (), ib = b.pvec ();
   PermMatrix r;
+
+  const Array<octave_idx_type> ia = a.col_perm_vec ();
+  const Array<octave_idx_type> ib = b.col_perm_vec ();
+
   octave_idx_type n = a.columns ();
+
   if (n != b.rows ())
     gripe_nonconformant ("operator *", n, n, b.rows (), b.rows ());
-  else if (a._colp == b._colp)
-    {
-      r = PermMatrix ((a._colp
-                       ? ia.index (idx_vector (ib))
-                       : ib.index (idx_vector (ia))), a._colp, false);
-    }
   else
-    {
-      Array<octave_idx_type> ra (dim_vector (n, 1));
-      if (a._colp)
-        ra.assign (idx_vector (ia), ib);
-      else
-        ra.assign (idx_vector (ib), ia);
-      r = PermMatrix (ra, a._colp, false);
-    }
+    r = PermMatrix (ia.index (idx_vector (ib)), true, false);
 
   return r;
 }
--- a/liboctave/array/PermMatrix.h
+++ b/liboctave/array/PermMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -31,20 +31,21 @@
 
 class OCTAVE_API PermMatrix : protected Array<octave_idx_type>
 {
-
 public:
 
-  PermMatrix (void) : Array<octave_idx_type> (), _colp (false) { }
+  PermMatrix (void) : Array<octave_idx_type> () { }
 
   PermMatrix (octave_idx_type n);
 
-  PermMatrix (const Array<octave_idx_type>& p, bool colp = false,
-              bool check = true);
+  PermMatrix (const Array<octave_idx_type>& p) GCC_ATTR_DEPRECATED;
+
+  PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check = true);
 
-  PermMatrix (const PermMatrix& m)
-    : Array<octave_idx_type> (m), _colp(m._colp) { }
+  PermMatrix (const PermMatrix& m) : Array<octave_idx_type> (m) { }
 
-  PermMatrix (const idx_vector& idx, bool colp = false, octave_idx_type n = 0);
+  PermMatrix (const idx_vector& idx) GCC_ATTR_DEPRECATED;
+
+  PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n = 0);
 
   octave_idx_type dim1 (void) const
   { return Array<octave_idx_type>::length (); }
@@ -68,15 +69,13 @@
 
   dim_vector dims (void) const { return dim_vector (dim1 (), dim2 ()); }
 
-  Array<octave_idx_type> pvec (void) const
+  const Array<octave_idx_type>& col_perm_vec (void) const
   { return *this; }
 
   octave_idx_type
   elem (octave_idx_type i, octave_idx_type j) const
   {
-    return (_colp
-            ? ((Array<octave_idx_type>::elem (j) == i) ? 1 : 0)
-              : ((Array<octave_idx_type>::elem (i) == j) ? 1 : 0));
+    return (Array<octave_idx_type>::elem (j) == i) ? 1 : 0;
   }
 
   octave_idx_type
@@ -102,20 +101,8 @@
   // Efficient integer power of a permutation.
   PermMatrix power (octave_idx_type n) const;
 
-  bool is_col_perm (void) const { return _colp; }
-  bool is_row_perm (void) const { return !_colp; }
-
-  friend OCTAVE_API PermMatrix operator *(const PermMatrix& a,
-                                          const PermMatrix& b);
-
-  const octave_idx_type *data (void) const
-  { return Array<octave_idx_type>::data (); }
-
-  const octave_idx_type *fortran_vec (void) const
-  { return Array<octave_idx_type>::fortran_vec (); }
-
-  octave_idx_type *fortran_vec (void)
-  { return Array<octave_idx_type>::fortran_vec (); }
+  bool is_col_perm (void) const { return true; }
+  bool is_row_perm (void) const { return false; }
 
   void print_info (std::ostream& os, const std::string& prefix) const
   { Array<octave_idx_type>::print_info (os, prefix); }
@@ -123,12 +110,17 @@
   static PermMatrix eye (octave_idx_type n);
 
 private:
-  bool _colp;
+
+  PermMatrix pos_power (octave_idx_type m) const;
+
+  void setup (const Array<octave_idx_type>& p, bool colp, bool check);
+
+  void setup (const idx_vector& idx, bool colp, octave_idx_type n);
 };
 
 // Multiplying permutations together.
 PermMatrix
 OCTAVE_API
-operator *(const PermMatrix& a, const PermMatrix& b);
+operator * (const PermMatrix& a, const PermMatrix& b);
 
 #endif
--- a/liboctave/array/Range.cc
+++ b/liboctave/array/Range.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/Range.h
+++ b/liboctave/array/Range.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/Sparse-C.cc
+++ b/liboctave/array/Sparse-C.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/Sparse-b.cc
+++ b/liboctave/array/Sparse-b.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/Sparse-d.cc
+++ b/liboctave/array/Sparse-d.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/array/Sparse.cc
+++ b/liboctave/array/Sparse.cc
@@ -1,7 +1,7 @@
 // Template sparse array class
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -55,24 +55,16 @@
 template <class T>
 Sparse<T>::Sparse (const PermMatrix& a)
   : rep (new typename Sparse<T>::SparseRep (a.rows (), a.cols (), a.rows ())),
-         dimensions (dim_vector (a.rows (), a.cols ()))
+    dimensions (dim_vector (a.rows (), a.cols ()))
 {
   octave_idx_type n = a.rows ();
   for (octave_idx_type i = 0; i <= n; i++)
     cidx (i) = i;
 
-  const Array<octave_idx_type> pv = a.pvec ();
-
-  if (a.is_row_perm ())
-    {
-      for (octave_idx_type i = 0; i < n; i++)
-        ridx (pv(i)) = i;
-    }
-  else
-    {
-      for (octave_idx_type i = 0; i < n; i++)
-        ridx (i) = pv(i);
-    }
+  const Array<octave_idx_type> pv = a.col_perm_vec ();
+
+  for (octave_idx_type i = 0; i < n; i++)
+    ridx (i) = pv(i);
 
   for (octave_idx_type i = 0; i < n; i++)
     data (i) = 1.0;
@@ -144,7 +136,8 @@
 {
   if (remove_zeros)
     {
-      octave_idx_type i = 0, k = 0;
+      octave_idx_type i = 0;
+      octave_idx_type k = 0;
       for (octave_idx_type j = 1; j <= ncols; j++)
         {
           octave_idx_type u = c[j];
@@ -177,13 +170,13 @@
       octave_idx_type min_nzmx = std::min (nz, nzmx);
 
       octave_idx_type * new_ridx = new octave_idx_type [nz];
-      copy_or_memcpy (min_nzmx, r, new_ridx);
+      std::copy (r, r + min_nzmx, new_ridx);
 
       delete [] r;
       r = new_ridx;
 
       T * new_data = new T [nz];
-      copy_or_memcpy (min_nzmx, d, new_data);
+      std::copy (d, d + min_nzmx, new_data);
 
       delete [] d;
       d = new_data;
@@ -303,7 +296,9 @@
 
   dimensions = dim_vector (nr, nc);
 
-  octave_idx_type n = a.numel (), rl = r.length (nr), cl = c.length (nc);
+  octave_idx_type n = a.numel ();
+  octave_idx_type rl = r.length (nr);
+  octave_idx_type cl = c.length (nc);
   bool a_scalar = n == 1;
   if (a_scalar)
     {
@@ -324,9 +319,9 @@
       if (n == 1 && a(0) != T ())
         {
           change_capacity (nzm > 1 ? nzm : 1);
-          xcidx(0) = 0;
-          xridx(0) = r(0);
-          xdata(0) = a(0);
+          xcidx (0) = 0;
+          xridx (0) = r(0);
+          xdata (0) = a(0);
 
           for (octave_idx_type j = 0; j < nc; j++)
             xcidx (j+1) = j >= c(0);
@@ -361,7 +356,8 @@
 
           octave_quit ();
 
-          octave_idx_type k = -1, l = -1;
+          octave_idx_type k = -1;
+          octave_idx_type l = -1;
 
           if (sum_terms)
             {
@@ -395,8 +391,10 @@
         }
       else
         {
-          idx_vector rr = r, cc = c;
-          const octave_idx_type *rd = rr.raw (), *cd = cc.raw ();
+          idx_vector rr = r;
+          idx_vector cc = c;
+          const octave_idx_type *rd = rr.raw ();
+          const octave_idx_type *cd = cc.raw ();
           OCTAVE_LOCAL_BUFFER_INIT (octave_idx_type, ci, nc+1, 0);
           ci[0] = 0;
           // Bin counts of column indices.
@@ -425,7 +423,8 @@
           for (octave_idx_type j = 0; j < nc; j++)
             {
               std::sort (sidx + ci[j], sidx + ci[j+1]);
-              octave_idx_type l = -1, nzj = 0;
+              octave_idx_type l = -1;
+              octave_idx_type nzj = 0;
               // Count.
               for (octave_idx_type i = ci[j]; i < ci[j+1]; i++)
                 {
@@ -490,15 +489,16 @@
 
       octave_quit ();
 
-      const octave_idx_type *rd = rs.raw (), *rdi = rsi.data ();
+      const octave_idx_type *rd = rs.raw ();
+      const octave_idx_type *rdi = rsi.data ();
       // Count unique indices.
       octave_idx_type new_nz = 1;
       for (octave_idx_type i = 1; i < n; i++)
         new_nz += rd[i-1] != rd[i];
       // Allocate result.
       change_capacity (nzm > new_nz ? nzm : new_nz);
-      xcidx(0) = 0;
-      xcidx(1) = new_nz;
+      xcidx (0) = 0;
+      xcidx (1) = new_nz;
       octave_idx_type *rri = ridx ();
       T *rrd = data ();
 
@@ -537,8 +537,10 @@
     }
   else
     {
-      idx_vector rr = r, cc = c;
-      const octave_idx_type *rd = rr.raw (), *cd = cc.raw ();
+      idx_vector rr = r;
+      idx_vector cc = c;
+      const octave_idx_type *rd = rr.raw ();
+      const octave_idx_type *cd = cc.raw ();
       OCTAVE_LOCAL_BUFFER_INIT (octave_idx_type, ci, nc+1, 0);
       ci[0] = 0;
       // Bin counts of column indices.
@@ -572,7 +574,8 @@
       for (octave_idx_type j = 0; j < nc; j++)
         {
           std::sort (spairs + ci[j], spairs + ci[j+1]);
-          octave_idx_type l = -1, nzj = 0;
+          octave_idx_type l = -1;
+          octave_idx_type nzj = 0;
           // Count.
           for (octave_idx_type i = ci[j]; i < ci[j+1]; i++)
             {
@@ -646,7 +649,7 @@
       octave_idx_type len = a.length ();
       octave_idx_type new_nzmx = 0;
 
-      // First count the number of non-zero terms
+      // First count the number of nonzero terms
       for (octave_idx_type i = 0; i < len; i++)
         if (a(i) != T ())
           new_nzmx++;
@@ -816,8 +819,9 @@
 
   if (dims2.length () > 2)
     {
-      (*current_liboctave_warning_handler)
-        ("reshape: sparse reshape to N-d array smashes dims");
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:reshape-smashes-dims",
+         "reshape: sparse reshape to N-d array smashes dims");
 
       for (octave_idx_type i = 2; i < dims2.length (); i++)
         dims2(1) *= dims2(i);
@@ -905,7 +909,8 @@
 void
 Sparse<T>::resize1 (octave_idx_type n)
 {
-  octave_idx_type nr = rows (), nc = cols ();
+  octave_idx_type nr = rows ();
+  octave_idx_type nc = cols ();
 
   if (nr == 0)
     resize (1, std::max (nc, n));
@@ -954,7 +959,8 @@
 
   if (r < rows ())
     {
-      octave_idx_type i = 0, k = 0;
+      octave_idx_type i = 0;
+      octave_idx_type k = 0;
       for (octave_idx_type j = 1; j <= rep->ncols; j++)
         {
           octave_idx_type u = xcidx (j);
@@ -973,13 +979,13 @@
   if (c != rep->ncols)
     {
       octave_idx_type *new_cidx = new octave_idx_type [c+1];
-      copy_or_memcpy (std::min (c, rep->ncols)+1, rep->c, new_cidx);
+      std::copy (rep->c, rep->c + std::min (c, rep->ncols) + 1, new_cidx);
       delete [] rep->c;
       rep->c = new_cidx;
 
       if (c > rep->ncols)
-        fill_or_memset (c - rep->ncols, rep->c[rep->ncols],
-                        rep->c + rep->ncols + 1);
+        std::fill_n (rep->c + rep->ncols + 1, c - rep->ncols,
+                     rep->c[rep->ncols]);
     }
 
   rep->ncols = dimensions(1) = c;
@@ -1175,9 +1181,9 @@
           // Copy data and adjust indices.
           octave_idx_type nz_new = nz - (ui - li);
           *this = Sparse<T> (nr - (ub - lb), 1, nz_new);
-          copy_or_memcpy (li, tmp.data (), data ());
-          copy_or_memcpy (li, tmp.ridx (), xridx ());
-          copy_or_memcpy (nz - ui, tmp.data () + ui, xdata () + li);
+          std::copy (tmp.data (), tmp.data () + li, data ());
+          std::copy (tmp.ridx (), tmp.ridx () + li, xridx ());
+          std::copy (tmp.data () + ui, tmp.data () + nz, xdata () + li);
           mx_inline_sub (nz - ui, xridx () + li, tmp.ridx () + ui, ub - lb);
           xcidx (1) = nz_new;
         }
@@ -1187,7 +1193,9 @@
           OCTAVE_LOCAL_BUFFER (T, data_new, nz);
           idx_vector sidx = idx.sorted (true);
           const octave_idx_type *sj = sidx.raw ();
-          octave_idx_type sl = sidx.length (nel), nz_new = 0, j = 0;
+          octave_idx_type sl = sidx.length (nel);
+          octave_idx_type nz_new = 0;
+          octave_idx_type j = 0;
           for (octave_idx_type i = 0; i < nz; i++)
             {
               octave_idx_type r = tmp.ridx (i);
@@ -1200,8 +1208,8 @@
             }
 
           *this = Sparse<T> (nr - sl, 1, nz_new);
-          copy_or_memcpy (nz_new, ridx_new, ridx ());
-          copy_or_memcpy (nz_new, data_new, xdata ());
+          std::copy (ridx_new, ridx_new + nz_new, ridx ());
+          std::copy (data_new, data_new + nz_new, xdata ());
           xcidx (1) = nz_new;
         }
     }
@@ -1216,10 +1224,10 @@
           octave_idx_type ubi = tmp.cidx (ub);
           octave_idx_type new_nz = nz - (ubi - lbi);
           *this = Sparse<T> (1, nc - (ub - lb), new_nz);
-          copy_or_memcpy (lbi, tmp.data (), data ());
-          copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi);
-          fill_or_memset (new_nz, static_cast<octave_idx_type> (0), ridx ());
-          copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1);
+          std::copy (tmp.data (), tmp.data () + lbi, data ());
+          std::copy (tmp.data () + ubi, tmp.data () + nz , xdata () + lbi);
+          std::fill_n (ridx (), new_nz, static_cast<octave_idx_type> (0));
+          std::copy (tmp.cidx () + 1, tmp.cidx () + 1 + lb, cidx () + 1);
           mx_inline_sub (nc - ub, xcidx () + 1, tmp.cidx () + ub + 1,
                          ubi - lbi);
         }
@@ -1270,16 +1278,16 @@
           else
             {
               const Sparse<T> tmp = *this;
-              octave_idx_type lbi = tmp.cidx(lb);
-              octave_idx_type ubi = tmp.cidx(ub);
+              octave_idx_type lbi = tmp.cidx (lb);
+              octave_idx_type ubi = tmp.cidx (ub);
               octave_idx_type new_nz = nz - (ubi - lbi);
 
               *this = Sparse<T> (nr, nc - (ub - lb), new_nz);
-              copy_or_memcpy (lbi, tmp.data (), data ());
-              copy_or_memcpy (lbi, tmp.ridx (), ridx ());
-              copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi);
-              copy_or_memcpy (nz - ubi, tmp.ridx () + ubi, xridx () + lbi);
-              copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1);
+              std::copy (tmp.data (), tmp.data () + lbi, data ());
+              std::copy (tmp.ridx (), tmp.ridx () + lbi, ridx ());
+              std::copy (tmp.data () + ubi, tmp.data () + nz, xdata () + lbi);
+              std::copy (tmp.ridx () + ubi, tmp.ridx () + nz, xridx () + lbi);
+              std::copy (tmp.cidx () + 1, tmp.cidx () + 1 + lb, cidx () + 1);
               mx_inline_sub (nc - ub, xcidx () + lb + 1,
                              tmp.cidx () + ub + 1, ubi - lbi);
             }
@@ -1314,20 +1322,20 @@
                                  tmpl.nnz () + tmpu.nnz ());
               for (octave_idx_type j = 0, k = 0; j < nc; j++)
                 {
-                  for (octave_idx_type i = tmpl.cidx(j); i < tmpl.cidx(j+1);
+                  for (octave_idx_type i = tmpl.cidx (j); i < tmpl.cidx (j+1);
                        i++)
                     {
-                      xdata(k) = tmpl.data(i);
-                      xridx(k++) = tmpl.ridx(i);
+                      xdata (k) = tmpl.data (i);
+                      xridx (k++) = tmpl.ridx (i);
                     }
-                  for (octave_idx_type i = tmpu.cidx(j); i < tmpu.cidx(j+1);
+                  for (octave_idx_type i = tmpu.cidx (j); i < tmpu.cidx (j+1);
                        i++)
                     {
-                      xdata(k) = tmpu.data(i);
-                      xridx(k++) = tmpu.ridx(i) + lb;
+                      xdata (k) = tmpu.data (i);
+                      xridx (k++) = tmpu.ridx (i) + lb;
                     }
 
-                  xcidx(j+1) = k;
+                  xcidx (j+1) = k;
                 }
             }
         }
@@ -1388,12 +1396,9 @@
 
   octave_idx_type nel = numel (); // Can throw.
 
-  const dim_vector idx_dims = idx.orig_dimensions ();
-
-  if (idx_dims.length () > 2)
-    (*current_liboctave_error_handler)
-      ("cannot index sparse matrix with an N-D Array");
-  else if (idx.is_colon ())
+  const dim_vector idx_dims = idx.orig_dimensions ().redim (2);
+
+  if (idx.is_colon ())
     {
       if (nc == 1)
         retval = *this;
@@ -1460,7 +1465,7 @@
           // Copy data and adjust indices.
           octave_idx_type nz_new = ui - li;
           retval = Sparse<T> (ub - lb, 1, nz_new);
-          copy_or_memcpy (nz_new, data () + li, retval.data ());
+          std::copy (data () + li, data () + li + nz_new, retval.data ());
           mx_inline_sub (nz_new, retval.xridx (), ridx () + li, lb);
           retval.xcidx (1) = nz_new;
         }
@@ -1473,7 +1478,7 @@
               for (octave_idx_type j = 0; j < nz; j++)
                 retval.ridx (j) = nr - ridx (nz - j - 1) - 1;
 
-              copy_or_memcpy (2, cidx (), retval.cidx ());
+              std::copy (cidx (), cidx () + 2, retval.cidx ());
               std::reverse_copy (data (), data () + nz, retval.data ());
             }
           else
@@ -1488,11 +1493,15 @@
           // If indexing a sparse column vector by a vector, the result is a
           // sparse column vector, otherwise it inherits the shape of index.
           // Vector transpose is cheap, so do it right here.
+
+          Array<octave_idx_type> tmp_idx = idx.as_array ().as_matrix ();
+
           const Array<octave_idx_type> idxa = (idx_dims(0) == 1
-                                               ? idx.as_array ().transpose ()
-                                               : idx.as_array ());
-
-          octave_idx_type new_nr = idxa.rows (), new_nc = idxa.cols ();
+                                               ? tmp_idx.transpose ()
+                                               : tmp_idx);
+
+          octave_idx_type new_nr = idxa.rows ();
+          octave_idx_type new_nc = idxa.cols ();
 
           // Lookup.
           // FIXME: Could specialize for sorted idx?
@@ -1540,11 +1549,12 @@
       else if (idx.is_cont_range (nel, lb, ub))
         {
           // Special-case a contiguous range.
-          octave_idx_type lbi = cidx (lb), ubi = cidx (ub), new_nz = ubi - lbi;
+          octave_idx_type lbi = cidx (lb);
+          octave_idx_type ubi = cidx (ub);
+          octave_idx_type new_nz = ubi - lbi;
           retval = Sparse<T> (1, ub - lb, new_nz);
-          copy_or_memcpy (new_nz, data () + lbi, retval.data ());
-          fill_or_memset (new_nz, static_cast<octave_idx_type> (0),
-                          retval.ridx ());
+          std::copy (data () + lbi, data () + lbi + new_nz, retval.data ());
+          std::fill_n (retval.ridx (), new_nz, static_cast<octave_idx_type> (0));
           mx_inline_sub (ub - lb + 1, retval.cidx (), cidx () + lb, lbi);
         }
       else
@@ -1625,10 +1635,12 @@
       else if (idx_j.is_cont_range (nc, lb, ub))
         {
           // Special-case a contiguous range.
-          octave_idx_type lbi = cidx (lb), ubi = cidx (ub), new_nz = ubi - lbi;
+          octave_idx_type lbi = cidx (lb);
+          octave_idx_type ubi = cidx (ub);
+          octave_idx_type new_nz = ubi - lbi;
           retval = Sparse<T> (nr, ub - lb, new_nz);
-          copy_or_memcpy (new_nz, data () + lbi, retval.data ());
-          copy_or_memcpy (new_nz, ridx () + lbi, retval.ridx ());
+          std::copy (data () + lbi, data () + lbi + new_nz, retval.data ());
+          std::copy (ridx () + lbi, ridx () + lbi + new_nz, retval.ridx ());
           mx_inline_sub (ub - lb + 1, retval.cidx (), cidx () + lb, lbi);
         }
       else
@@ -1650,8 +1662,8 @@
               octave_idx_type lj = retval.xcidx (j);
               octave_idx_type nzj = retval.xcidx (j+1) - lj;
 
-              copy_or_memcpy (nzj, data () + ljj, retval.data () + lj);
-              copy_or_memcpy (nzj, ridx () + ljj, retval.ridx () + lj);
+              std::copy (data () + ljj, data () + ljj + nzj, retval.data () + lj);
+              std::copy (ridx () + ljj, ridx () + ljj + nzj, retval.ridx () + lj);
             }
         }
     }
@@ -1756,7 +1768,8 @@
               octave_idx_type jj = idx_j(j);
               octave_idx_type lj = cidx (jj);
               octave_idx_type nzj = cidx (jj+1) - cidx (jj);
-              octave_idx_type li = retval.xcidx (j), uj = lj + nzj - 1;
+              octave_idx_type li = retval.xcidx (j);
+              octave_idx_type uj = lj + nzj - 1;
               for (octave_idx_type i = 0; i < nzj; i++)
                 {
                   retval.xdata (li + i) = data (uj - i); // Copy in reverse order.
@@ -1863,7 +1876,8 @@
               // Look-up indices first.
               octave_idx_type li = lblookup (ridx (), nz, lb);
               octave_idx_type ui = lblookup (ridx (), nz, ub);
-              octave_idx_type rnz = rhs.nnz (), new_nz = nz - (ui - li) + rnz;
+              octave_idx_type rnz = rhs.nnz ();
+              octave_idx_type new_nz = nz - (ui - li) + rnz;
 
               if (new_nz >= nz && new_nz <= capacity ())
                 {
@@ -1879,7 +1893,7 @@
                     }
 
                   // Copy data and adjust indices from rhs.
-                  copy_or_memcpy (rnz, rhs.data (), data () + li);
+                  std::copy (rhs.data (), rhs.data () + rnz, data () + li);
                   mx_inline_add (rnz, ridx () + li, rhs.ridx (), lb);
                 }
               else
@@ -1890,18 +1904,18 @@
                   *this = Sparse<T> (nr, 1, new_nz);
 
                   // Head ...
-                  copy_or_memcpy (li, tmp.data (), data ());
-                  copy_or_memcpy (li, tmp.ridx (), ridx ());
+                  std::copy (tmp.data (), tmp.data () + li, data ());
+                  std::copy (tmp.ridx (), tmp.ridx () + li, ridx ());
 
                   // new stuff ...
-                  copy_or_memcpy (rnz, rhs.data (), data () + li);
+                  std::copy (rhs.data (), rhs.data () + rnz, data () + li);
                   mx_inline_add (rnz, ridx () + li, rhs.ridx (), lb);
 
                   // ...tail
-                  copy_or_memcpy (nz - ui, tmp.data () + ui,
-                                  data () + li + rnz);
-                  copy_or_memcpy (nz - ui, tmp.ridx () + ui,
-                                  ridx () + li + rnz);
+                  std::copy (tmp.data () + ui, tmp.data () + nz,
+                             data () + li + rnz);
+                  std::copy (tmp.ridx () + ui, tmp.ridx () + nz,
+                             ridx () + li + rnz);
                 }
 
               cidx (1) = new_nz;
@@ -1936,8 +1950,8 @@
               // Disassembly our matrix...
               Array<octave_idx_type> new_ri (dim_vector (new_nz, 1));
               Array<T> new_data (dim_vector (new_nz, 1));
-              copy_or_memcpy (nz, tmp.ridx (), new_ri.fortran_vec ());
-              copy_or_memcpy (nz, tmp.data (), new_data.fortran_vec ());
+              std::copy (tmp.ridx (), tmp.ridx () + nz, new_ri.fortran_vec ());
+              std::copy (tmp.data (), tmp.data () + nz, new_data.fortran_vec ());
               // ... insert new data (densified) ...
               idx.copy_data (new_ri.fortran_vec () + nz);
               new_data.assign (idx_vector (nz, new_nz), rhs.array_value ());
@@ -2043,8 +2057,10 @@
           else if (idx_j.is_cont_range (nc, lb, ub))
             {
               // Special-case a contiguous range.
-              octave_idx_type li = cidx (lb), ui = cidx (ub);
-              octave_idx_type rnz = rhs.nnz (), new_nz = nz - (ui - li) + rnz;
+              octave_idx_type li = cidx (lb);
+              octave_idx_type ui = cidx (ub);
+              octave_idx_type rnz = rhs.nnz ();
+              octave_idx_type new_nz = nz - (ui - li) + rnz;
 
               if (new_nz >= nz && new_nz <= capacity ())
                 {
@@ -2061,8 +2077,8 @@
                     }
 
                   // Copy data and indices from rhs.
-                  copy_or_memcpy (rnz, rhs.data (), data () + li);
-                  copy_or_memcpy (rnz, rhs.ridx (), ridx () + li);
+                  std::copy (rhs.data (), rhs.data () + rnz, data () + li);
+                  std::copy (rhs.ridx (), rhs.ridx () + rnz, ridx () + li);
                   mx_inline_add (ub - lb, cidx () + lb + 1, rhs.cidx () + 1,
                                  li);
 
@@ -2076,21 +2092,21 @@
                   *this = Sparse<T> (nr, nc, new_nz);
 
                   // Head...
-                  copy_or_memcpy (li, tmp.data (), data ());
-                  copy_or_memcpy (li, tmp.ridx (), ridx ());
-                  copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1);
+                  std::copy (tmp.data (), tmp.data () + li, data ());
+                  std::copy (tmp.ridx (), tmp.ridx () + li, ridx ());
+                  std::copy (tmp.cidx () + 1, tmp.cidx () + 1 + lb, cidx () + 1);
 
                   // new stuff...
-                  copy_or_memcpy (rnz, rhs.data (), data () + li);
-                  copy_or_memcpy (rnz, rhs.ridx (), ridx () + li);
+                  std::copy (rhs.data (), rhs.data () + rnz, data () + li);
+                  std::copy (rhs.ridx (), rhs.ridx () + rnz, ridx () + li);
                   mx_inline_add (ub - lb, cidx () + lb + 1, rhs.cidx () + 1,
                                  li);
 
                   // ...tail.
-                  copy_or_memcpy (nz - ui, tmp.data () + ui,
-                                  data () + li + rnz);
-                  copy_or_memcpy (nz - ui, tmp.ridx () + ui,
-                                  ridx () + li + rnz);
+                  std::copy (tmp.data () + ui, tmp.data () + nz,
+                             data () + li + rnz);
+                  std::copy (tmp.ridx () + ui, tmp.ridx () + nz,
+                             ridx () + li + rnz);
                   mx_inline_add (nc - ub, cidx () + ub + 1,
                                  tmp.cidx () + ub + 1, new_nz - nz);
 
@@ -2133,20 +2149,26 @@
               // Merge columns.
               for (octave_idx_type i = 0; i < nc; i++)
                 {
-                  octave_idx_type l = xcidx (i), u = xcidx (i+1), j = jsav[i];
+                  octave_idx_type l = xcidx (i);
+                  octave_idx_type u = xcidx (i+1);
+                  octave_idx_type j = jsav[i];
                   if (j >= 0)
                     {
                       // from rhs
                       octave_idx_type k = rhs.cidx (j);
-                      copy_or_memcpy (u - l, rhs.data () + k, xdata () + l);
-                      copy_or_memcpy (u - l, rhs.ridx () + k, xridx () + l);
+                      std::copy (rhs.data () + k, rhs.data () + k + u - l,
+                                 xdata () + l);
+                      std::copy (rhs.ridx () + k, rhs.ridx () + k + u - l,
+                                 xridx () + l);
                     }
                   else
                     {
                       // original
                       octave_idx_type k = tmp.cidx (i);
-                      copy_or_memcpy (u - l, tmp.data () + k, xdata () + l);
-                      copy_or_memcpy (u - l, tmp.ridx () + k, xridx () + l);
+                      std::copy (tmp.data () + k, tmp.data () + k + u - l,
+                                 xdata () + l);
+                      std::copy (tmp.ridx () + k, tmp.ridx () + k + u - l,
+                                 xridx () + l);
                     }
                 }
 
@@ -2405,7 +2427,7 @@
         {
           octave_idx_type ndiag = (nnr < nnc) ? nnr : nnc;
 
-          // Count the number of non-zero elements
+          // Count the number of nonzero elements
           octave_idx_type nel = 0;
           if (k > 0)
             {
@@ -2413,7 +2435,7 @@
                 if (elem (i, i+k) != 0.)
                   nel++;
             }
-          else if ( k < 0)
+          else if (k < 0)
             {
               for (octave_idx_type i = 0; i < ndiag; i++)
                 if (elem (i-k, i) != 0.)
@@ -2443,7 +2465,7 @@
                     }
                 }
             }
-          else if ( k < 0)
+          else if (k < 0)
             {
               for (octave_idx_type i = 0; i < ndiag; i++)
                 {
@@ -2469,8 +2491,15 @@
             }
         }
       else
-        (*current_liboctave_error_handler)
-          ("diag: requested diagonal out of range");
+        {
+          // Matlab returns [] 0x1 for out-of-range diagonal
+
+          octave_idx_type nr = 0;
+          octave_idx_type nc = 1;
+          octave_idx_type nz = 0;
+
+          d = Sparse<T> (nr, nc, nz);
+        }
     }
   else if (nnr != 0 && nnc != 0)
     {
@@ -2609,7 +2638,8 @@
                 if (spi.is_empty ())
                   continue;
 
-                octave_idx_type kl = spi.cidx (j), ku = spi.cidx (j+1);
+                octave_idx_type kl = spi.cidx (j);
+                octave_idx_type ku = spi.cidx (j+1);
                 for (octave_idx_type k = kl; k < ku; k++, l++)
                   {
                     retval.xridx (l) = spi.ridx (k) + rcum;
--- a/liboctave/array/Sparse.h
+++ b/liboctave/array/Sparse.h
@@ -1,7 +1,7 @@
 // Template sparse classes
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -38,7 +38,6 @@
 #include "lo-utils.h"
 
 #include "oct-sort.h"
-#include "oct-mem.h"
 
 class idx_vector;
 class PermMatrix;
@@ -102,9 +101,9 @@
         nzmx (a.nzmx), nrows (a.nrows), ncols (a.ncols), count (1)
     {
       octave_idx_type nz = a.nnz ();
-      copy_or_memcpy (nz, a.d, d);
-      copy_or_memcpy (nz, a.r, r);
-      copy_or_memcpy (ncols + 1, a.c, c);
+      std::copy (a.d, a.d + nz, d);
+      std::copy (a.r, a.r + nz, r);
+      std::copy (a.c, a.c + ncols + 1, c);
     }
 
     ~SparseRep (void) { delete [] d; delete [] r; delete [] c; }
@@ -213,8 +212,8 @@
   {
     octave_idx_type nz = a.nnz ();
     std::copy (a.rep->d, a.rep->d + nz, rep->d);
-    copy_or_memcpy (nz, a.rep->r, rep->r);
-    copy_or_memcpy (rep->ncols + 1, a.rep->c, rep->c);
+    std::copy (a.rep->r, a.rep->r + nz, rep->r);
+    std::copy (a.rep->c, a.rep->c + rep->ncols + 1, rep->c);
   }
 
   // No type conversion case.
@@ -242,7 +241,7 @@
   Sparse<T>& operator = (const Sparse<T>& a);
 
   // Note that nzmax and capacity are the amount of storage for
-  // non-zero elements, while nnz is the actual number of non-zero
+  // nonzero elements, while nnz is the actual number of nonzero
   // terms.
   octave_idx_type nzmax (void) const { return rep->length (); }
   octave_idx_type capacity (void) const { return nzmax (); }
@@ -300,13 +299,15 @@
 
   T& xelem (octave_idx_type n)
   {
-    octave_idx_type i = n % rows (), j = n / rows ();
+    octave_idx_type i = n % rows ();
+    octave_idx_type j = n / rows ();
     return xelem (i, j);
   }
 
   T xelem (octave_idx_type n) const
   {
-    octave_idx_type i = n % rows (), j = n / rows ();
+    octave_idx_type i = n % rows ();
+    octave_idx_type j = n / rows ();
     return xelem (i, j);
   }
 
--- a/liboctave/array/boolMatrix.cc
+++ b/liboctave/array/boolMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -29,9 +29,9 @@
 #include <iostream>
 
 #include "Array-util.h"
+#include "boolMatrix.h"
 #include "lo-error.h"
 #include "str-vec.h"
-#include "mx-base.h"
 #include "mx-inlines.cc"
 #include "mx-op-defs.h"
 
@@ -84,20 +84,6 @@
   return Array<bool>::diag (k);
 }
 
-// FIXME: Do these really belong here?  Maybe they should be in a base class?
-
-boolMatrix
-boolMatrix::all (int dim) const
-{
-  return do_mx_red_op<bool, bool> (*this, dim, mx_inline_all);
-}
-
-boolMatrix
-boolMatrix::any (int dim) const
-{
-  return do_mx_red_op<bool, bool> (*this, dim, mx_inline_any);
-}
-
 MM_BOOL_OPS (boolMatrix, boolMatrix)
 MS_BOOL_OPS (boolMatrix, bool)
 SM_BOOL_OPS (bool, boolMatrix)
--- a/liboctave/array/boolMatrix.h
+++ b/liboctave/array/boolMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -25,37 +25,33 @@
 #define octave_boolMatrix_h 1
 
 #include "Array.h"
+#include "boolNDArray.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
 
 class
 OCTAVE_API
-boolMatrix : public Array<bool>
+boolMatrix : public boolNDArray
 {
 public:
 
-  boolMatrix (void) : Array<bool> () { }
+  boolMatrix (void) : boolNDArray () { }
 
   boolMatrix (octave_idx_type r, octave_idx_type c)
-    : Array<bool> (dim_vector (r, c)) { }
+    : boolNDArray (dim_vector (r, c)) { }
 
   boolMatrix (octave_idx_type r, octave_idx_type c, bool val)
-    : Array<bool> (dim_vector (r, c), val) { }
-
-  boolMatrix (const dim_vector& dv) : Array<bool> (dv) { }
+    : boolNDArray (dim_vector (r, c), val) { }
 
-  boolMatrix (const dim_vector& dv, bool val) : Array<bool> (dv, val) { }
-
-  boolMatrix (const Array<bool>& a) : Array<bool> (a.as_matrix ()) { }
+  boolMatrix (const dim_vector& dv) : boolNDArray (dv.redim (2)) { }
 
-  boolMatrix (const boolMatrix& a) : Array<bool> (a) { }
+  boolMatrix (const dim_vector& dv, bool val)
+    : boolNDArray (dv.redim (2), val) { }
 
-  boolMatrix& operator = (const boolMatrix& a)
-  {
-    Array<bool>::operator = (a);
-    return *this;
-  }
+  boolMatrix (const Array<bool>& a) : boolNDArray (a.as_matrix ()) { }
+
+  boolMatrix (const boolMatrix& a) : boolNDArray (a) { }
 
   bool operator == (const boolMatrix& a) const;
   bool operator != (const boolMatrix& a) const;
@@ -75,9 +71,6 @@
 
   boolMatrix diag (octave_idx_type k = 0) const;
 
-  boolMatrix all (int dim = -1) const;
-  boolMatrix any (int dim = -1) const;
-
 #if 0
   // i/o
 
--- a/liboctave/array/boolNDArray.cc
+++ b/liboctave/array/boolNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -27,6 +27,7 @@
 #endif
 
 #include "Array-util.h"
+#include "boolNDArray.h"
 #include "CNDArray.h"
 #include "mx-base.h"
 #include "lo-ieee.h"
@@ -106,14 +107,6 @@
   return *this;
 }
 
-
-
-boolMatrix
-boolNDArray::matrix_value (void) const
-{
-  return *this;
-}
-
 void
 boolNDArray::increment_index (Array<octave_idx_type>& ra_idx,
                               const dim_vector& dimensions,
--- a/liboctave/array/boolNDArray.h
+++ b/liboctave/array/boolNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -29,9 +29,6 @@
 #include "mx-op-decl.h"
 #include "bsxfun-decl.h"
 
-#include "boolMatrix.h"
-
-
 class
 OCTAVE_API
 boolNDArray : public Array<bool>
@@ -49,8 +46,6 @@
 
   boolNDArray (const boolNDArray& a) : Array<bool> (a) { }
 
-  boolNDArray (const boolMatrix& a) : Array<bool> (a) { }
-
   boolNDArray (const Array<bool>& a) : Array<bool> (a) { }
 
   boolNDArray& operator = (const boolNDArray& a)
@@ -83,8 +78,6 @@
   boolNDArray& insert (const boolNDArray& a,
                        const Array<octave_idx_type>& ra_idx);
 
-  boolMatrix matrix_value (void) const;
-
   boolNDArray squeeze (void) const { return Array<bool>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
--- a/liboctave/array/boolSparse.cc
+++ b/liboctave/array/boolSparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -35,9 +35,10 @@
 
 #include "boolSparse.h"
 #include "dSparse.h"
-#include "oct-mem.h"
 #include "oct-locbuf.h"
 
+#include "Sparse-op-defs.h"
+
 // SparseBoolMatrix class.
 
 bool
@@ -143,7 +144,9 @@
 SparseBoolMatrix::any (int dim) const
 {
   Sparse<bool> retval;
-  octave_idx_type nr = rows (), nc = cols (), nz = nnz ();
+  octave_idx_type nr = rows ();
+  octave_idx_type nc = cols ();
+  octave_idx_type nz = nnz ();
   if (dim == -1)
     dim = (nr == 1 && nc != 1) ? 1 : 0;
 
@@ -156,8 +159,8 @@
         retval.xcidx (i+1) = retval.xcidx (i) + (cidx (i+1) > cidx (i));
       octave_idx_type new_nz = retval.xcidx (nc);
       retval.change_capacity (new_nz);
-      fill_or_memset (new_nz, static_cast<octave_idx_type> (0), retval.ridx ());
-      fill_or_memset (new_nz, true, retval.data ());
+      std::fill_n (retval.ridx (), new_nz, static_cast<octave_idx_type> (0));
+      std::fill_n (retval.data (), new_nz, true);
     }
   else if (dim == 1)
     {
@@ -173,7 +176,7 @@
       else
         {
           Array<octave_idx_type> tmp (dim_vector (nz, 1));
-          copy_or_memcpy (nz, ridx (), tmp.fortran_vec ());
+          std::copy (ridx (), ridx () + nz, tmp.fortran_vec ());
           retval = Sparse<bool> (Array<bool> (dim_vector (1, 1), true),
                                  idx_vector (tmp),
                                  idx_vector (static_cast<octave_idx_type> (0)),
@@ -188,7 +191,9 @@
 SparseBoolMatrix::sum (int dim) const
 {
   Sparse<double> retval;
-  octave_idx_type nr = rows (), nc = cols (), nz = nnz ();
+  octave_idx_type nr = rows ();
+  octave_idx_type nc = cols ();
+  octave_idx_type nz = nnz ();
   if (dim == -1)
     dim = (nr == 1 && nc != 1) ? 1 : 0;
 
@@ -200,7 +205,7 @@
         retval.xcidx (i+1) = retval.xcidx (i) + (cidx (i+1) > cidx (i));
       octave_idx_type new_nz = retval.xcidx (nc);
       retval.change_capacity (new_nz);
-      fill_or_memset (new_nz, static_cast<octave_idx_type> (0), retval.ridx ());
+      std::fill_n (retval.ridx (), new_nz, static_cast<octave_idx_type> (0));
       for (octave_idx_type i = 0, k = 0; i < nc; i++)
         {
           octave_idx_type c = cidx (i+1) - cidx (i);
@@ -222,7 +227,7 @@
       else
         {
           Array<octave_idx_type> tmp (dim_vector (nz, 1));
-          copy_or_memcpy (nz, ridx (), tmp.fortran_vec ());
+          std::copy (ridx (), ridx () + nz, tmp.fortran_vec ());
           retval = Sparse<double> (Array<double> (dim_vector (1, 1), 1.0),
                                    idx_vector (tmp),
                                    idx_vector (static_cast<octave_idx_type> (0)),
--- a/liboctave/array/boolSparse.h
+++ b/liboctave/array/boolSparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -26,7 +26,12 @@
 
 #include "Sparse.h"
 #include "MSparse-defs.h"
-#include "Sparse-op-defs.h"
+
+#include "boolMatrix.h"
+#include "boolNDArray.h"
+#include "PermMatrix.h"
+
+#include "Sparse-op-decls.h"
 
 class SparseMatrix;
 
--- a/liboctave/array/chMatrix.cc
+++ b/liboctave/array/chMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -39,55 +39,6 @@
 
 // charMatrix class.
 
-charMatrix::charMatrix (char c)
-  : Array<char> ()
-{
-  octave_idx_type nc = 1;
-  octave_idx_type nr = 1;
-
-  resize (nr, nc);
-
-  elem (0, 0) = c;
-}
-
-charMatrix::charMatrix (const char *s)
-  : Array<char> ()
-{
-  octave_idx_type nc = s ? strlen (s) : 0;
-  octave_idx_type nr = s && nc > 0 ? 1 : 0;
-
-  resize (nr, nc);
-
-  for (octave_idx_type i = 0; i < nc; i++)
-    elem (0, i) = s[i];
-}
-
-charMatrix::charMatrix (const std::string& s)
-  : Array<char> ()
-{
-  octave_idx_type nc = s.length ();
-  octave_idx_type nr = nc > 0 ? 1 : 0;
-
-  resize (nr, nc);
-
-  for (octave_idx_type i = 0; i < nc; i++)
-    elem (0, i) = s[i];
-}
-
-charMatrix::charMatrix (const string_vector& s, char fill_value)
-  : Array<char> (dim_vector (s.length (), s.max_length ()), fill_value)
-{
-  octave_idx_type nr = rows ();
-
-  for (octave_idx_type i = 0; i < nr; i++)
-    {
-      const std::string si = s(i);
-      octave_idx_type nc = si.length ();
-      for (octave_idx_type j = 0; j < nc; j++)
-        elem (i, j) = si[j];
-    }
-}
-
 bool
 charMatrix::operator == (const charMatrix& a) const
 {
@@ -185,26 +136,6 @@
   return result;
 }
 
-charMatrix
-charMatrix::diag (octave_idx_type k) const
-{
-  return Array<char>::diag (k);
-}
-
-// FIXME: Do these really belong here?  Maybe they should be in a base class?
-
-boolMatrix
-charMatrix::all (int dim) const
-{
-  return do_mx_red_op<bool, char> (*this, dim, mx_inline_all);
-}
-
-boolMatrix
-charMatrix::any (int dim) const
-{
-  return do_mx_red_op<bool, char> (*this, dim, mx_inline_any);
-}
-
 MS_CMP_OPS (charMatrix, char)
 MS_BOOL_OPS (charMatrix, char)
 
--- a/liboctave/array/chMatrix.h
+++ b/liboctave/array/chMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -27,6 +27,7 @@
 #include <string>
 
 #include "Array.h"
+#include "chNDArray.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
@@ -34,41 +35,37 @@
 
 class
 OCTAVE_API
-charMatrix : public Array<char>
+charMatrix : public charNDArray
 {
   friend class ComplexMatrix;
 
 public:
 
-  charMatrix (void) : Array<char> () { }
+  charMatrix (void) : charNDArray () { }
 
   charMatrix (octave_idx_type r, octave_idx_type c)
-    : Array<char> (dim_vector (r, c)) { }
+    : charNDArray (dim_vector (r, c)) { }
 
   charMatrix (octave_idx_type r, octave_idx_type c, char val)
-    : Array<char> (dim_vector (r, c), val) { }
+    : charNDArray (dim_vector (r, c), val) { }
 
-  charMatrix (const dim_vector& dv) : Array<char> (dv) { }
-
-  charMatrix (const dim_vector& dv, char val) : Array<char> (dv, val) { }
+  charMatrix (const dim_vector& dv) : charNDArray (dv.redim (2)) { }
 
-  charMatrix (const Array<char>& a) : Array<char> (a.as_matrix ()) { }
+  charMatrix (const dim_vector& dv, char val)
+    : charNDArray (dv.redim (2), val) { }
 
-  charMatrix (const charMatrix& a) : Array<char> (a) { }
-
-  charMatrix (char c);
+  charMatrix (const Array<char>& a) : charNDArray (a.as_matrix ()) { }
 
-  charMatrix (const char *s);
+  charMatrix (const charMatrix& a) : charNDArray (a) { }
 
-  charMatrix (const std::string& s);
-
-  charMatrix (const string_vector& s, char fill_value = '\0');
+  charMatrix (char c) : charNDArray (c) { }
 
-  charMatrix& operator = (const charMatrix& a)
-  {
-    Array<char>::operator = (a);
-    return *this;
-  }
+  charMatrix (const char *s) : charNDArray (s) { }
+
+  charMatrix (const std::string& s) : charNDArray (s) { }
+
+  charMatrix (const string_vector& s, char fill_value = '\0')
+    : charNDArray (s, fill_value) { }
 
   bool operator == (const charMatrix& a) const;
   bool operator != (const charMatrix& a) const;
@@ -93,11 +90,6 @@
     Array<char>::resize (dim_vector (nr, nc), rfv);
   }
 
-  charMatrix diag (octave_idx_type k = 0) const;
-
-  boolMatrix all (int dim = -1) const;
-  boolMatrix any (int dim = -1) const;
-
 #if 0
   // i/o
 
--- a/liboctave/array/chNDArray.cc
+++ b/liboctave/array/chNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -25,15 +25,64 @@
 #include <config.h>
 #endif
 
+#include <string>
+
 #include "Array-util.h"
 #include "chNDArray.h"
 #include "mx-base.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "mx-op-defs.h"
+#include "str-vec.h"
 
 #include "bsxfun-defs.cc"
 
+charNDArray::charNDArray (char c)
+  : Array<char> ()
+{
+  octave_idx_type n = 1;
+
+  resize1 (n);
+
+  elem (0) = c;
+}
+
+charNDArray::charNDArray (const char *s)
+  : Array<char> ()
+{
+  octave_idx_type n = s ? strlen (s) : 0;
+
+  resize1 (n);
+
+  for (octave_idx_type i = 0; i < n; i++)
+    elem (i) = s[i];
+}
+
+charNDArray::charNDArray (const std::string& s)
+  : Array<char> ()
+{
+  octave_idx_type n = s.length ();
+
+  resize1 (n);
+
+  for (octave_idx_type i = 0; i < n; i++)
+    elem (i) = s[i];
+}
+
+charNDArray::charNDArray (const string_vector& s, char fill_value)
+  : Array<char> (dim_vector (s.length (), s.max_length ()), fill_value)
+{
+  octave_idx_type nr = rows ();
+
+  for (octave_idx_type i = 0; i < nr; i++)
+    {
+      const std::string si = s(i);
+      octave_idx_type nc = si.length ();
+      for (octave_idx_type j = 0; j < nc; j++)
+        elem (i, j) = si[j];
+    }
+}
+
 // FIXME: this is not quite the right thing.
 
 boolNDArray
@@ -130,12 +179,6 @@
   return *this;
 }
 
-charMatrix
-charNDArray::matrix_value (void) const
-{
-  return *this;
-}
-
 void
 charNDArray::increment_index (Array<octave_idx_type>& ra_idx,
                               const dim_vector& dimensions,
--- a/liboctave/array/chNDArray.h
+++ b/liboctave/array/chNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,12 +23,14 @@
 #if !defined (octave_chNDArray_h)
 #define octave_chNDArray_h 1
 
+#include <string>
+
 #include "Array.h"
-#include "chMatrix.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
 #include "bsxfun-decl.h"
+#include "str-vec.h"
 
 class
 OCTAVE_API
@@ -46,17 +48,15 @@
 
   charNDArray (const charNDArray& a) : Array<char> (a) { }
 
-  charNDArray (const charMatrix& a) : Array<char> (a) { }
+  charNDArray (const Array<char>& a) : Array<char> (a) { }
 
-  charNDArray (char c) : Array<char> (charMatrix (c)) { }
-
-  charNDArray (const char *s) : Array<char> (charMatrix (s)) { }
+  charNDArray (char c);
 
-  charNDArray (const std::string& s) : Array<char> (charMatrix (s)) { }
+  charNDArray (const char *s);
 
-  charNDArray (const string_vector& s) : Array<char> (charMatrix (s)) { }
+  charNDArray (const std::string& s);
 
-  charNDArray (const Array<char>& a) : Array<char> (a) { }
+  charNDArray (const string_vector& s, char fill_value = '\0');
 
   charNDArray& operator = (const charNDArray& a)
   {
@@ -84,8 +84,6 @@
   charNDArray& insert (const charNDArray& a,
                        const Array<octave_idx_type>& ra_idx);
 
-  charMatrix matrix_value (void) const;
-
   charNDArray squeeze (void) const { return Array<char>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
--- a/liboctave/array/dColVector.cc
+++ b/liboctave/array/dColVector.cc
@@ -1,7 +1,7 @@
 // ColumnVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/dColVector.h
+++ b/liboctave/array/dColVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/dDiagMatrix.cc
+++ b/liboctave/array/dDiagMatrix.cc
@@ -1,7 +1,7 @@
 // DiagMatrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -292,7 +292,7 @@
 }
 
 DiagMatrix
-DiagMatrix::pseudo_inverse (void) const
+DiagMatrix::pseudo_inverse (double tol) const
 {
   octave_idx_type r = rows ();
   octave_idx_type c = cols ();
@@ -302,10 +302,11 @@
 
   for (octave_idx_type i = 0; i < len; i++)
     {
-      if (elem (i, i) != 0.0)
+      double val = std::abs (elem (i, i));
+      if (val < tol || val == 0.0)
+        retval.elem (i, i) = 0.0;
+      else
         retval.elem (i, i) = 1.0 / elem (i, i);
-      else
-        retval.elem (i, i) = 0.0;
     }
 
   return retval;
@@ -329,7 +330,8 @@
 
   DiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = c.length (), lenm = len < a_nc ? len : a_nc;
+  octave_idx_type len = c.length ();
+  octave_idx_type lenm = len < a_nc ? len : a_nc;
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -364,7 +366,8 @@
 DiagMatrix::rcond (void) const
 {
   ColumnVector av = extract_diag (0).map<double> (fabs);
-  double amx = av.max (), amn = av.min ();
+  double amx = av.max ();
+  double amn = av.min ();
   return amx == 0 ? 0.0 : amn / amx;
 }
 
--- a/liboctave/array/dDiagMatrix.h
+++ b/liboctave/array/dDiagMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -98,7 +98,7 @@
 
   DiagMatrix inverse (void) const;
   DiagMatrix inverse (octave_idx_type& info) const;
-  DiagMatrix pseudo_inverse (void) const;
+  DiagMatrix pseudo_inverse (double tol = 0.0) const;
 
   // other operations
 
--- a/liboctave/array/dMatrix.cc
+++ b/liboctave/array/dMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague, a.s.
 
@@ -34,8 +34,15 @@
 
 #include "Array-util.h"
 #include "byte-swap.h"
+#include "boolMatrix.h"
+#include "chMatrix.h"
 #include "dMatrix.h"
-#include "dbleAEPBAL.h"
+#include "dDiagMatrix.h"
+#include "CMatrix.h"
+#include "dColVector.h"
+#include "dRowVector.h"
+#include "CColVector.h"
+#include "PermMatrix.h"
 #include "DET.h"
 #include "dbleSCHUR.h"
 #include "dbleSVD.h"
@@ -47,7 +54,6 @@
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
-#include "mx-base.h"
 #include "mx-m-dm.h"
 #include "mx-dm-m.h"
 #include "mx-inlines.cc"
@@ -240,44 +246,54 @@
 // Matrix class.
 
 Matrix::Matrix (const RowVector& rv)
-  : MArray<double> (rv)
+  : NDArray (rv)
 {
 }
 
 Matrix::Matrix (const ColumnVector& cv)
-  : MArray<double> (cv)
+  : NDArray (cv)
 {
 }
 
 Matrix::Matrix (const DiagMatrix& a)
-  : MArray<double> (a.dims (), 0.0)
+  : NDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+Matrix::Matrix (const MDiagArray2<double>& a)
+  : NDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+Matrix::Matrix (const DiagArray2<double>& a)
+  : NDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
 }
 
 Matrix::Matrix (const PermMatrix& a)
-  : MArray<double> (a.dims (), 0.0)
+  : NDArray (a.dims (), 0.0)
 {
-  const Array<octave_idx_type> ia (a.pvec ());
+  const Array<octave_idx_type> ia (a.col_perm_vec ());
   octave_idx_type len = a.rows ();
-  if (a.is_col_perm ())
-    for (octave_idx_type i = 0; i < len; i++)
-      elem (ia(i), i) = 1.0;
-  else
-    for (octave_idx_type i = 0; i < len; i++)
-      elem (i, ia(i)) = 1.0;
+  for (octave_idx_type i = 0; i < len; i++)
+    elem (ia(i), i) = 1.0;
 }
 
 // FIXME: could we use a templated mixed-type copy function here?
 
 Matrix::Matrix (const boolMatrix& a)
-  : MArray<double> (a)
+  : NDArray (a)
 {
 }
 
 Matrix::Matrix (const charMatrix& a)
-  : MArray<double> (a.dims ())
+  : NDArray (a.dims ())
 {
   for (octave_idx_type i = 0; i < a.rows (); i++)
     for (octave_idx_type j = 0; j < a.cols (); j++)
@@ -1382,7 +1398,7 @@
 double
 Matrix::rcond (MatrixType &mattype) const
 {
-  double rcon;
+  double rcon = octave_NaN;
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1561,8 +1577,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1577,11 +1592,27 @@
             {
               const double *tmp_data = fortran_vec ();
 
+              retval = b;
+              double *result = retval.fortran_vec ();
+
+              char uplo = 'U';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (dtrtrs, DTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'U';
-                  char dia = 'N';
+                  uplo = 'U';
+                  dia = 'N';
 
                   Array<double> z (dim_vector (3 * nc, 1));
                   double *pz = z.fortran_vec ();
@@ -1609,30 +1640,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  double *result = retval.fortran_vec ();
-
-                  char uplo = 'U';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (dtrtrs, DTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -1661,8 +1671,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1677,11 +1686,27 @@
             {
               const double *tmp_data = fortran_vec ();
 
+              retval = b;
+              double *result = retval.fortran_vec ();
+
+              char uplo = 'L';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (dtrtrs, DTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'L';
-                  char dia = 'N';
+                  uplo = 'L';
+                  dia = 'N';
 
                   Array<double> z (dim_vector (3 * nc, 1));
                   double *pz = z.fortran_vec ();
@@ -1709,30 +1734,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  double *result = retval.fortran_vec ();
-
-                  char uplo = 'L';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (dtrtrs, DTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -1813,9 +1817,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -1868,8 +1870,7 @@
               if (sing_handler)
                 sing_handler (rcon);
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
 
               mattype.mark_as_rectangular ();
             }
@@ -1897,9 +1898,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -1962,9 +1961,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans || transt == blas_conj_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
@@ -2012,7 +2011,9 @@
 static Matrix
 stack_complex_matrix (const ComplexMatrix& cm)
 {
-  octave_idx_type m = cm.rows (), n = cm.cols (), nel = m*n;
+  octave_idx_type m = cm.rows ();
+  octave_idx_type n = cm.cols ();
+  octave_idx_type nel = m*n;
   Matrix retval (m, 2*n);
   const Complex *cmd = cm.data ();
   double *rd = retval.fortran_vec ();
@@ -2027,7 +2028,9 @@
 static ComplexMatrix
 unstack_complex_matrix (const Matrix& sm)
 {
-  octave_idx_type m = sm.rows (), n = sm.cols () / 2, nel = m*n;
+  octave_idx_type m = sm.rows ();
+  octave_idx_type n = sm.cols () / 2;
+  octave_idx_type nel = m*n;
   ComplexMatrix retval (m, n);
   const double *smd = sm.data ();
   Complex *rd = retval.fortran_vec ();
@@ -2626,15 +2629,6 @@
 
 // unary operations
 
-boolMatrix
-Matrix::operator ! (void) const
-{
-  if (any_element_is_nan ())
-    gripe_nan_to_logical_conversion ();
-
-  return do_mx_unary_op<bool, double> (*this, mx_inline_not);
-}
-
 // column vector by row vector -> matrix operations
 
 Matrix
@@ -2664,137 +2658,60 @@
 
 // other operations.
 
-bool
-Matrix::any_element_is_negative (bool neg_zero) const
-{
-  return (neg_zero ? test_all (xnegative_sign)
-          : do_mx_check<double> (*this, mx_inline_any_negative));
-}
-
-bool
-Matrix::any_element_is_positive (bool neg_zero) const
-{
-  return (neg_zero ? test_all (xpositive_sign)
-          : do_mx_check<double> (*this, mx_inline_any_positive));
-}
-
-bool
-Matrix::any_element_is_nan (void) const
-{
-  return do_mx_check<double> (*this, mx_inline_any_nan);
-}
-
-bool
-Matrix::any_element_is_inf_or_nan (void) const
-{
-  return ! do_mx_check<double> (*this, mx_inline_all_finite);
-}
-
-bool
-Matrix::any_element_not_one_or_zero (void) const
-{
-  return ! test_all (xis_one_or_zero);
-}
-
-bool
-Matrix::all_elements_are_int_or_inf_or_nan (void) const
-{
-  return test_all (xis_int_or_inf_or_nan);
-}
-
-// Return nonzero if any element of M is not an integer.  Also extract
-// the largest and smallest values and return them in MAX_VAL and MIN_VAL.
-
-bool
-Matrix::all_integers (double& max_val, double& min_val) const
-{
-  octave_idx_type nel = nelem ();
-
-  if (nel > 0)
-    {
-      max_val = elem (0);
-      min_val = elem (0);
-    }
-  else
-    return false;
-
-  for (octave_idx_type i = 0; i < nel; i++)
-    {
-      double val = elem (i);
-
-      if (val > max_val)
-        max_val = val;
-
-      if (val < min_val)
-        min_val = val;
-
-      if (! xisinteger (val))
-        return false;
-    }
-
-  return true;
-}
-
-bool
-Matrix::too_large_for_float (void) const
-{
-  return test_any (xtoo_large_for_float);
-}
-
 // FIXME: Do these really belong here?  Maybe they should be in a base class?
 
 boolMatrix
 Matrix::all (int dim) const
 {
-  return do_mx_red_op<bool, double> (*this, dim, mx_inline_all);
+  return NDArray::all (dim);
 }
 
 boolMatrix
 Matrix::any (int dim) const
 {
-  return do_mx_red_op<bool, double> (*this, dim, mx_inline_any);
+  return NDArray::any (dim);
 }
 
 Matrix
 Matrix::cumprod (int dim) const
 {
-  return do_mx_cum_op<double, double> (*this, dim, mx_inline_cumprod);
+  return NDArray::cumprod (dim);
 }
 
 Matrix
 Matrix::cumsum (int dim) const
 {
-  return do_mx_cum_op<double, double> (*this, dim, mx_inline_cumsum);
+  return NDArray::cumsum (dim);
 }
 
 Matrix
 Matrix::prod (int dim) const
 {
-  return do_mx_red_op<double, double> (*this, dim, mx_inline_prod);
+  return NDArray::prod (dim);
 }
 
 Matrix
 Matrix::sum (int dim) const
 {
-  return do_mx_red_op<double, double> (*this, dim, mx_inline_sum);
+  return NDArray::sum (dim);
 }
 
 Matrix
 Matrix::sumsq (int dim) const
 {
-  return do_mx_red_op<double, double> (*this, dim, mx_inline_sumsq);
+  return NDArray::sumsq (dim);
 }
 
 Matrix
 Matrix::abs (void) const
 {
-  return do_mx_unary_map<double, double, std::abs> (*this);
+  return NDArray::abs ();
 }
 
 Matrix
 Matrix::diag (octave_idx_type k) const
 {
-  return MArray<double>::diag (k);
+  return NDArray::diag (k);
 }
 
 DiagMatrix
@@ -3135,7 +3052,7 @@
 
   // FIXME: check info?
 
-  retval = -ua*cx*ub.transpose ();
+  retval = ua*cx*ub.transpose ();
 
   return retval;
 }
@@ -3180,7 +3097,8 @@
 {
   Matrix retval;
 
-  bool tra = transa != blas_no_trans, trb = transb != blas_no_trans;
+  bool tra = transa != blas_no_trans;
+  bool trb = transb != blas_no_trans;
 
   octave_idx_type a_nr = tra ? a.cols () : a.rows ();
   octave_idx_type a_nc = tra ? a.rows () : a.cols ();
@@ -3215,8 +3133,10 @@
         }
       else
         {
-          octave_idx_type lda = a.rows (), tda = a.cols ();
-          octave_idx_type ldb = b.rows (), tdb = b.cols ();
+          octave_idx_type lda = a.rows ();
+          octave_idx_type tda = a.cols ();
+          octave_idx_type ldb = b.rows ();
+          octave_idx_type tdb = b.cols ();
 
           retval = Matrix (a_nr, b_nc);
           double *c = retval.fortran_vec ();
@@ -3285,7 +3205,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (d, m (i, j));
+        result(i, j) = xmin (d, m(i, j));
       }
 
   return result;
@@ -3305,7 +3225,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (m (i, j), d);
+        result(i, j) = xmin (m(i, j), d);
       }
 
   return result;
@@ -3332,7 +3252,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (a (i, j), b (i, j));
+        result(i, j) = xmin (a(i, j), b(i, j));
       }
 
   return result;
@@ -3352,7 +3272,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (d, m (i, j));
+        result(i, j) = xmax (d, m(i, j));
       }
 
   return result;
@@ -3372,7 +3292,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (m (i, j), d);
+        result(i, j) = xmax (m(i, j), d);
       }
 
   return result;
@@ -3399,7 +3319,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (a (i, j), b (i, j));
+        result(i, j) = xmax (a(i, j), b(i, j));
       }
 
   return result;
--- a/liboctave/array/dMatrix.h
+++ b/liboctave/array/dMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,6 +23,7 @@
 #if !defined (octave_dMatrix_h)
 #define octave_dMatrix_h 1
 
+#include "dNDArray.h"
 #include "MArray.h"
 #include "MDiagArray2.h"
 #include "MatrixType.h"
@@ -33,7 +34,7 @@
 
 class
 OCTAVE_API
-Matrix : public MArray<double>
+Matrix : public NDArray
 {
 public:
 
@@ -42,26 +43,26 @@
 
   typedef void (*solve_singularity_handler) (double rcon);
 
-  Matrix (void) : MArray<double> () { }
+  Matrix (void) : NDArray () { }
 
   Matrix (octave_idx_type r, octave_idx_type c)
-    : MArray<double> (dim_vector (r, c)) { }
+    : NDArray (dim_vector (r, c)) { }
 
   Matrix (octave_idx_type r, octave_idx_type c, double val)
-    : MArray<double> (dim_vector (r, c), val) { }
+    : NDArray (dim_vector (r, c), val) { }
 
-  Matrix (const dim_vector& dv) : MArray<double> (dv.redim (2)) { }
+  Matrix (const dim_vector& dv) : NDArray (dv.redim (2)) { }
 
   Matrix (const dim_vector& dv, double val)
-    : MArray<double> (dv.redim (2), val) { }
+    : NDArray (dv.redim (2), val) { }
 
-  Matrix (const Matrix& a) : MArray<double> (a) { }
+  Matrix (const Matrix& a) : NDArray (a) { }
 
   template <class U>
-  Matrix (const MArray<U>& a) : MArray<double> (a.as_matrix ()) { }
+  Matrix (const MArray<U>& a) : NDArray (a.as_matrix ()) { }
 
   template <class U>
-  Matrix (const Array<U>& a) : MArray<double> (a.as_matrix ()) { }
+  Matrix (const Array<U>& a) : NDArray (a.as_matrix ()) { }
 
   explicit Matrix (const RowVector& rv);
 
@@ -69,18 +70,16 @@
 
   explicit Matrix (const DiagMatrix& a);
 
+  explicit Matrix (const MDiagArray2<double>& a);
+
+  explicit Matrix (const DiagArray2<double>& a);
+
   explicit Matrix (const PermMatrix& a);
 
   explicit Matrix (const boolMatrix& a);
 
   explicit Matrix (const charMatrix& a);
 
-  Matrix& operator = (const Matrix& a)
-  {
-    MArray<double>::operator = (a);
-    return *this;
-  }
-
   bool operator == (const Matrix& a) const;
   bool operator != (const Matrix& a) const;
 
@@ -303,19 +302,8 @@
 
   // unary operations
 
-  boolMatrix operator ! (void) const;
-
   // other operations
 
-  bool any_element_is_negative (bool = false) const;
-  bool any_element_is_positive (bool = false) const;
-  bool any_element_is_nan (void) const;
-  bool any_element_is_inf_or_nan (void) const;
-  bool any_element_not_one_or_zero (void) const;
-  bool all_elements_are_int_or_inf_or_nan (void) const;
-  bool all_integers (double& max_val, double& min_val) const;
-  bool too_large_for_float (void) const;
-
   boolMatrix all (int dim = -1) const;
   boolMatrix any (int dim = -1) const;
 
--- a/liboctave/array/dNDArray.cc
+++ b/liboctave/array/dNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -257,7 +257,7 @@
   ComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<Complex> wsave (nn);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (Complex, tmp, npts);
@@ -304,7 +304,7 @@
   ComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<Complex> wsave (nn);
+  Array<Complex> wsave (dim_vector (nn, 1));
   Complex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (Complex, tmp, npts);
@@ -354,9 +354,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<Complex> wsave (nn);
+      Array<Complex> wsave (dim_vector (nn, 1));
       Complex *pwsave = wsave.fortran_vec ();
-      Array<Complex> row (npts);
+      Array<Complex> row (dim_vector (npts, 1));
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -402,9 +402,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<Complex> wsave (nn);
+      Array<Complex> wsave (dim_vector (nn, 1));
       Complex *pwsave = wsave.fortran_vec ();
-      Array<Complex> row (npts);
+      Array<Complex> row (dim_vector (npts, 1));
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -450,9 +450,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<Complex> wsave (nn);
+      Array<Complex> wsave (dim_vector (nn, 1));
       Complex *pwsave = wsave.fortran_vec ();
-      Array<Complex> row (npts);
+      Array<Complex> row (dim_vector (npts, 1));
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -497,9 +497,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<Complex> wsave (nn);
+      Array<Complex> wsave (dim_vector (nn, 1));
       Complex *pwsave = wsave.fortran_vec ();
-      Array<Complex> row (npts);
+      Array<Complex> row (dim_vector (npts, 1));
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -841,20 +841,6 @@
   return do_mx_unary_map<bool, double, xfinite> (*this);
 }
 
-Matrix
-NDArray::matrix_value (void) const
-{
-  Matrix retval;
-
-  if (ndims () == 2)
-    retval = Matrix (Array<double> (*this));
-  else
-    (*current_liboctave_error_handler)
-      ("invalid conversion of NDArray to Matrix");
-
-  return retval;
-}
-
 void
 NDArray::increment_index (Array<octave_idx_type>& ra_idx,
                           const dim_vector& dimensions,
--- a/liboctave/array/dNDArray.h
+++ b/liboctave/array/dNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,7 +24,6 @@
 #define octave_dNDArray_h 1
 
 #include "MArray.h"
-#include "dMatrix.h"
 #include "intNDArray.h"
 
 #include "mx-defs.h"
@@ -37,8 +36,6 @@
 {
 public:
 
-  typedef Matrix matrix_type;
-
   NDArray (void) : MArray<double> () { }
 
   NDArray (const dim_vector& dv) : MArray<double> (dv) { }
@@ -48,8 +45,6 @@
 
   NDArray (const NDArray& a) : MArray<double> (a) { }
 
-  NDArray (const Matrix& a) : MArray<double> (a) { }
-
   NDArray (const Array<octave_idx_type>& a, bool zero_based = false,
            bool negative_to_nan = false);
 
@@ -141,8 +136,6 @@
 
   friend class ComplexNDArray;
 
-  Matrix matrix_value (void) const;
-
   NDArray squeeze (void) const { return MArray<double>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
--- a/liboctave/array/dRowVector.cc
+++ b/liboctave/array/dRowVector.cc
@@ -1,7 +1,7 @@
 // RowVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/dRowVector.h
+++ b/liboctave/array/dRowVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/dSparse.cc
+++ b/liboctave/array/dSparse.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2010 VZLU Prague
 
@@ -52,6 +52,8 @@
 #include "SparsedbleCHOL.h"
 #include "SparseQR.h"
 
+#include "Sparse-op-defs.h"
+
 #include "Sparse-diag-op-defs.h"
 
 #include "Sparse-perm-op-defs.h"
@@ -165,7 +167,8 @@
 SparseMatrix::SparseMatrix (const DiagMatrix& a)
   : MSparse<double> (a.rows (), a.cols (), a.length ())
 {
-  octave_idx_type j = 0, l = a.length ();
+  octave_idx_type j = 0;
+  octave_idx_type l = a.length ();
   for (octave_idx_type i = 0; i < l; i++)
     {
       cidx (i) = j;
@@ -360,7 +363,7 @@
         found[i] = 0;
 
       for (octave_idx_type j = 0; j < nc; j++)
-        for (octave_idx_type i = cidx(j); i < cidx(j+1); i++)
+        for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
           if (found[ridx (i)] == -j)
             found[ridx (i)] = -j - 1;
 
@@ -511,7 +514,7 @@
         found[i] = 0;
 
       for (octave_idx_type j = 0; j < nc; j++)
-        for (octave_idx_type i = cidx(j); i < cidx(j+1); i++)
+        for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
           if (found[ridx (i)] == -j)
             found[ridx (i)] = -j - 1;
 
@@ -776,11 +779,11 @@
               octave_idx_type  jb_max = y.cidx (i+1);
               bool jb_lt_max = jb < jb_max;
 
-              while (ja_lt_max || jb_lt_max )
+              while (ja_lt_max || jb_lt_max)
                 {
                   octave_quit ();
-                  if ((! jb_lt_max) ||
-                      (ja_lt_max && (x.ridx (ja) < y.ridx (jb))))
+                  if ((! jb_lt_max)
+                      || (ja_lt_max && (x.ridx (ja) < y.ridx (jb))))
                     {
                       r.ridx (jx) = x.ridx (ja);
                       r.data (jx) = atan2 (x.data (ja), 0.);
@@ -788,8 +791,8 @@
                       ja++;
                       ja_lt_max= ja < ja_max;
                     }
-                  else if (( !ja_lt_max ) ||
-                           (jb_lt_max && (y.ridx (jb) < x.ridx (ja)) ) )
+                  else if ((! ja_lt_max)
+                           || (jb_lt_max && (y.ridx (jb) < x.ridx (ja))))
                     {
                       jb++;
                       jb_lt_max= jb < jb_max;
@@ -864,8 +867,7 @@
       int typ = mattyp.type ();
       mattyp.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           if (typ == MatrixType::Permuted_Diagonal)
             retval = transpose ();
@@ -877,7 +879,8 @@
 
           if (calccond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nr; i++)
                 {
                   double tmp = fabs (v[i]);
@@ -918,8 +921,8 @@
       int typ = mattyp.type ();
       mattyp.info ();
 
-      if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
+      if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper
+          || typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -993,8 +996,8 @@
                               colXp++;
                               colUp++;
                             }
-                        } while ((rpX<j) && (rpU<j) &&
-                                 (colXp<cx) && (colUp<nz));
+                        }
+                      while (rpX < j && rpU < j && colXp < cx && colUp < nz);
 
                       // get A(m,m)
                       if (typ == MatrixType::Upper)
@@ -1214,7 +1217,6 @@
             {
               // Matrix is either singular or not positive definite
               mattype.mark_as_unsymmetric ();
-              typ = MatrixType::Full;
             }
         }
 
@@ -1396,8 +1398,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           retval.resize (nc, b.cols (), 0.);
           if (typ == MatrixType::Diagonal)
@@ -1412,7 +1413,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = fabs (data (i));
@@ -1456,8 +1458,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           octave_idx_type b_nc = b.cols ();
           octave_idx_type b_nz = b.nnz ();
@@ -1502,7 +1503,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = fabs (data (i));
@@ -1546,8 +1548,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           retval.resize (nc, b.cols (), 0);
           if (typ == MatrixType::Diagonal)
@@ -1562,7 +1563,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = fabs (data (i));
@@ -1606,8 +1608,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Diagonal ||
-          typ == MatrixType::Permuted_Diagonal)
+      if (typ == MatrixType::Diagonal || typ == MatrixType::Permuted_Diagonal)
         {
           octave_idx_type b_nc = b.cols ();
           octave_idx_type b_nz = b.nnz ();
@@ -1652,7 +1653,8 @@
 
           if (calc_cond)
             {
-              double dmax = 0., dmin = octave_Inf;
+              double dmax = 0.;
+              double dmin = octave_Inf;
               for (octave_idx_type i = 0; i < nm; i++)
                 {
                   double tmp = fabs (data (i));
@@ -1697,8 +1699,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -1737,8 +1738,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1813,8 +1814,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1879,9 +1880,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -1896,9 +1895,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -1932,8 +1929,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -1981,8 +1977,8 @@
 
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -1999,7 +1995,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2078,8 +2074,8 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2095,7 +2091,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2167,9 +2163,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2184,9 +2178,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2219,8 +2211,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2259,8 +2250,8 @@
 
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2336,8 +2327,8 @@
                     {
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2404,9 +2395,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2421,9 +2410,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2457,8 +2444,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2506,8 +2492,8 @@
 
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (kidx+1)-1) != k ||
-                              data (cidx (kidx+1)-1) == 0.)
+                          if (ridx (cidx (kidx+1)-1) != k
+                              || data (cidx (kidx+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2524,7 +2510,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2604,8 +2590,8 @@
                     {
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (k+1)-1) != k ||
-                              data (cidx (k+1)-1) == 0.)
+                          if (ridx (cidx (k+1)-1) != k
+                              || data (cidx (k+1)-1) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2621,7 +2607,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -2694,9 +2680,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2711,9 +2695,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -2747,8 +2729,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -2885,8 +2866,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -2954,9 +2934,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -2971,9 +2949,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3007,8 +2983,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -3079,7 +3054,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3171,8 +3146,7 @@
                     {
                       if (work[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3188,7 +3162,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3261,9 +3235,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3278,9 +3250,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3314,8 +3284,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -3453,8 +3422,7 @@
                     {
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3522,9 +3490,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3539,9 +3505,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3575,8 +3539,7 @@
       int typ = mattype.type ();
       mattype.info ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           double anorm = 0.;
           double ainvnorm = 0.;
@@ -3647,7 +3610,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3740,8 +3703,7 @@
                     {
                       if (cwork[k] != 0.)
                         {
-                          if (ridx (cidx (k)) != k ||
-                              data (cidx (k)) == 0.)
+                          if (ridx (cidx (k)) != k || data (cidx (k)) == 0.)
                             {
                               err = -2;
                               goto triangular_error;
@@ -3757,7 +3719,7 @@
                         }
                     }
 
-                  // Count non-zeros in work vector and adjust space in
+                  // Count nonzeros in work vector and adjust space in
                   // retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nc; i++)
@@ -3831,9 +3793,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
 
           volatile double rcond_plus_one = rcond + 1.0;
@@ -3848,9 +3808,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision, rcond = %g",
-                   rcond);
+                gripe_singular_matrix (rcond);
             }
         }
       else
@@ -3997,9 +3955,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             rcond = 1.;
@@ -4038,8 +3994,8 @@
       mattype.info ();
 
       // Note can't treat symmetric case as there is no dpttrf function
-      if (typ == MatrixType::Tridiagonal ||
-          typ == MatrixType::Tridiagonal_Hermitian)
+      if (typ == MatrixType::Tridiagonal
+          || typ == MatrixType::Tridiagonal_Hermitian)
         {
           OCTAVE_LOCAL_BUFFER (double, DU2, nr - 2);
           OCTAVE_LOCAL_BUFFER (double, DU, nr - 1);
@@ -4095,9 +4051,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4124,7 +4078,7 @@
                              work, b.rows (), err
                              F77_CHAR_ARG_LEN (1)));
 
-                  // Count non-zeros in work vector and adjust
+                  // Count nonzeros in work vector and adjust
                   // space in retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nr; i++)
@@ -4299,8 +4253,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
         }
       else if (typ != MatrixType::Tridiagonal_Hermitian)
@@ -4337,8 +4290,8 @@
       mattype.info ();
 
       // Note can't treat symmetric case as there is no dpttrf function
-      if (typ == MatrixType::Tridiagonal ||
-          typ == MatrixType::Tridiagonal_Hermitian)
+      if (typ == MatrixType::Tridiagonal
+          || typ == MatrixType::Tridiagonal_Hermitian)
         {
           OCTAVE_LOCAL_BUFFER (double, DU2, nr - 2);
           OCTAVE_LOCAL_BUFFER (double, DU, nr - 1);
@@ -4394,8 +4347,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4406,7 +4358,7 @@
               OCTAVE_LOCAL_BUFFER (double, Bx, b_nr);
               OCTAVE_LOCAL_BUFFER (double, Bz, b_nr);
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               volatile octave_idx_type x_nz = b.nnz ();
               volatile octave_idx_type ii = 0;
@@ -4418,7 +4370,7 @@
 
                   for (octave_idx_type i = 0; i < b_nr; i++)
                     {
-                      Complex c = b (i,j);
+                      Complex c = b(i,j);
                       Bx[i] = std::real (c);
                       Bz[i] = std::imag (c);
                     }
@@ -4453,7 +4405,7 @@
                       break;
                     }
 
-                  // Count non-zeros in work vector and adjust
+                  // Count nonzeros in work vector and adjust
                   // space in retval if needed
                   octave_idx_type new_nnz = 0;
                   for (octave_idx_type i = 0; i < nr; i++)
@@ -4585,9 +4537,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4640,7 +4590,7 @@
               m_band(ridx (i) - j + n_lower + n_upper, j) = data (i);
 
           // Calculate the norm of the matrix, for later use.
-          double anorm;
+          double anorm = 0.0;
           if (calc_cond)
             {
               for (octave_idx_type j = 0; j < nr; j++)
@@ -4672,9 +4622,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4707,9 +4655,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4833,9 +4779,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -4847,7 +4791,7 @@
                   octave_idx_type b_nc = b.cols ();
                   OCTAVE_LOCAL_BUFFER (double, Bx, b_nr);
 
-                  // Take a first guess that the number of non-zero terms
+                  // Take a first guess that the number of nonzero terms
                   // will be as many as in b
                   volatile octave_idx_type x_nz = b.nnz ();
                   volatile octave_idx_type ii = 0;
@@ -4953,9 +4897,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -4988,9 +4930,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5021,7 +4961,7 @@
                                  ldm, pipvt, work, b.rows (), err
                                  F77_CHAR_ARG_LEN (1)));
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5153,9 +5093,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5175,7 +5113,7 @@
                     {
                       for (octave_idx_type i = 0; i < b_nr; i++)
                         {
-                          Complex c = b (i,j);
+                          Complex c = b(i,j);
                           Bx[i] = std::real (c);
                           Bz[i] = std::imag (c);
                         }
@@ -5269,9 +5207,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -5304,9 +5240,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5325,7 +5259,7 @@
                     {
                       for (octave_idx_type i = 0; i < nr; i++)
                         {
-                          Complex c = b (i, j);
+                          Complex c = b(i, j);
                           Bx[i] = std::real (c);
                           Bz[i] = std::imag  (c);
                         }
@@ -5453,9 +5387,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5468,7 +5400,7 @@
                   OCTAVE_LOCAL_BUFFER (double, Bx, b_nr);
                   OCTAVE_LOCAL_BUFFER (double, Bz, b_nr);
 
-                  // Take a first guess that the number of non-zero terms
+                  // Take a first guess that the number of nonzero terms
                   // will be as many as in b
                   volatile octave_idx_type x_nz = b.nnz ();
                   volatile octave_idx_type ii = 0;
@@ -5480,7 +5412,7 @@
 
                       for (octave_idx_type i = 0; i < b_nr; i++)
                         {
-                          Complex c = b (i,j);
+                          Complex c = b(i,j);
                           Bx[i] = std::real (c);
                           Bz[i] = std::imag (c);
                         }
@@ -5514,7 +5446,7 @@
                           break;
                         }
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5599,9 +5531,7 @@
                   mattype.mark_as_rectangular ();
                 }
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
-
+                gripe_singular_matrix ();
             }
           else
             {
@@ -5634,9 +5564,7 @@
                           mattype.mark_as_rectangular ();
                         }
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcond);
+                        gripe_singular_matrix (rcond);
                     }
                 }
               else
@@ -5681,7 +5609,7 @@
                                  ldm, pipvt, Bz, b.rows (), err
                                  F77_CHAR_ARG_LEN (1)));
 
-                      // Count non-zeros in work vector and adjust
+                      // Count nonzeros in work vector and adjust
                       // space in retval if needed
                       octave_idx_type new_nnz = 0;
                       for (octave_idx_type i = 0; i < nr; i++)
@@ -5788,8 +5716,8 @@
         rcond = 1.;
       volatile double rcond_plus_one = rcond + 1.0;
 
-      if (status == UMFPACK_WARNING_singular_matrix ||
-          rcond_plus_one == 1.0 || xisnan (rcond))
+      if (status == UMFPACK_WARNING_singular_matrix
+          || rcond_plus_one == 1.0 || xisnan (rcond))
         {
           UMFPACK_DNAME (report_numeric) (Numeric, control);
 
@@ -5798,10 +5726,7 @@
           if (sing_handler)
             sing_handler (rcond);
           else
-            (*current_liboctave_error_handler)
-              ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-               rcond);
-
+            gripe_singular_matrix (rcond);
         }
       else if (status < 0)
         {
@@ -5866,17 +5791,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -5951,9 +5876,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -5980,8 +5903,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6083,17 +6006,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6177,9 +6100,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6211,8 +6132,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6240,7 +6161,7 @@
               OCTAVE_LOCAL_BUFFER (double, Bx, b_nr);
               OCTAVE_LOCAL_BUFFER (double, Xx, b_nr);
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               octave_idx_type x_nz = b.nnz ();
               octave_idx_type ii = 0;
@@ -6345,17 +6266,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6429,9 +6350,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6458,8 +6377,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6496,7 +6415,7 @@
                 {
                   for (octave_idx_type i = 0; i < b_nr; i++)
                     {
-                      Complex c = b (i,j);
+                      Complex c = b(i,j);
                       Bx[i] = std::real (c);
                       Bz[i] = std::imag (c);
                     }
@@ -6579,17 +6498,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+          SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6673,9 +6592,7 @@
                       mattype.mark_as_rectangular ();
                     }
                   else
-                    (*current_liboctave_error_handler)
-                      ("SparseMatrix::solve matrix singular to machine precision, rcond = %g",
-                       rcond);
+                    gripe_singular_matrix (rcond);
 
                   return retval;
                 }
@@ -6708,8 +6625,8 @@
               END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
             }
 #else
-          (*current_liboctave_warning_handler)
-            ("CHOLMOD not installed");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:missing-dependency", "CHOLMOD not installed");
 
           mattype.mark_as_unsymmetric ();
           typ = MatrixType::Full;
@@ -6737,7 +6654,7 @@
               OCTAVE_LOCAL_BUFFER (double, Bx, b_nr);
               OCTAVE_LOCAL_BUFFER (double, Bz, b_nr);
 
-              // Take a first guess that the number of non-zero terms
+              // Take a first guess that the number of nonzero terms
               // will be as many as in b
               octave_idx_type x_nz = b.nnz ();
               octave_idx_type ii = 0;
@@ -6751,7 +6668,7 @@
                 {
                   for (octave_idx_type i = 0; i < b_nr; i++)
                     {
-                      Complex c = b (i,j);
+                      Complex c = b(i,j);
                       Bx[i] = std::real (c);
                       Bz[i] = std::imag (c);
                     }
@@ -6857,8 +6774,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -6925,8 +6842,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -6993,8 +6910,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -7061,8 +6978,8 @@
     retval = ltsolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Banded || typ == MatrixType::Banded_Hermitian)
     retval = bsolve (mattype, b, err, rcond, sing_handler, false);
-  else if (typ == MatrixType::Tridiagonal ||
-           typ == MatrixType::Tridiagonal_Hermitian)
+  else if (typ == MatrixType::Tridiagonal
+           || typ == MatrixType::Tridiagonal_Hermitian)
     retval = trisolve (mattype, b, err, rcond, sing_handler, false);
   else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
     retval = fsolve (mattype, b, err, rcond, sing_handler, true);
@@ -7326,7 +7243,8 @@
                      solve_singularity_handler sing_handler) const
 {
   ComplexMatrix tmp (b);
-  return solve (tmp, info, rcond, sing_handler).column (static_cast<octave_idx_type> (0));
+  return solve (tmp, info, rcond,
+                sing_handler).column (static_cast<octave_idx_type> (0));
 }
 
 // other operations.
@@ -7737,7 +7655,7 @@
 
   EMPTY_RETURN_CHECK (SparseMatrix);
 
-  // Count the number of non-zero elements
+  // Count the number of nonzero elements
   if (d < 0.)
     {
       result = SparseMatrix (nr, nc, d);
@@ -7795,84 +7713,84 @@
 {
   SparseMatrix r;
 
-  if ((a.rows () == b.rows ()) && (a.cols () == b.cols ()))
+  octave_idx_type a_nr = a.rows ();
+  octave_idx_type a_nc = a.cols ();
+  octave_idx_type b_nr = b.rows ();
+  octave_idx_type b_nc = b.cols ();
+
+  if (a_nr == b_nr && a_nc == b_nc)
     {
-      octave_idx_type a_nr = a.rows ();
-      octave_idx_type a_nc = a.cols ();
-
-      octave_idx_type b_nr = b.rows ();
-      octave_idx_type b_nc = b.cols ();
-
-      if (a_nr != b_nr || a_nc != b_nc)
-        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
-      else
+      r = SparseMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
+
+      octave_idx_type jx = 0;
+      r.cidx (0) = 0;
+      for (octave_idx_type i = 0 ; i < a_nc ; i++)
         {
-          r = SparseMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
-
-          octave_idx_type jx = 0;
-          r.cidx (0) = 0;
-          for (octave_idx_type i = 0 ; i < a_nc ; i++)
-            {
-              octave_idx_type  ja = a.cidx (i);
-              octave_idx_type  ja_max = a.cidx (i+1);
-              bool ja_lt_max= ja < ja_max;
-
-              octave_idx_type  jb = b.cidx (i);
-              octave_idx_type  jb_max = b.cidx (i+1);
-              bool jb_lt_max = jb < jb_max;
-
-              while (ja_lt_max || jb_lt_max )
-                {
-                  octave_quit ();
-                  if ((! jb_lt_max) ||
-                      (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+          octave_idx_type  ja = a.cidx (i);
+          octave_idx_type  ja_max = a.cidx (i+1);
+          bool ja_lt_max= ja < ja_max;
+
+          octave_idx_type  jb = b.cidx (i);
+          octave_idx_type  jb_max = b.cidx (i+1);
+          bool jb_lt_max = jb < jb_max;
+
+          while (ja_lt_max || jb_lt_max)
+            {
+              octave_quit ();
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+                {
+                  double tmp = xmin (a.data (ja), 0.);
+                  if (tmp != 0.)
                     {
-                      double tmp = xmin (a.data (ja), 0.);
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = a.ridx (ja);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
+                      r.ridx (jx) = a.ridx (ja);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else if (( !ja_lt_max ) ||
-                           (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                }
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
+                {
+                  double tmp = xmin (0., b.data (jb));
+                  if (tmp != 0.)
                     {
-                      double tmp = xmin (0., b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = b.ridx (jb);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.ridx (jx) = b.ridx (jb);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+              else
+                {
+                  double tmp = xmin (a.data (ja), b.data (jb));
+                  if (tmp != 0.)
                     {
-                      double tmp = xmin (a.data (ja), b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.data (jx) = tmp;
-                          r.ridx (jx) = a.ridx (ja);
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.data (jx) = tmp;
+                      r.ridx (jx) = a.ridx (ja);
+                      jx++;
                     }
-                }
-              r.cidx (i+1) = jx;
-            }
-
-          r.maybe_compress ();
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+            }
+          r.cidx (i+1) = jx;
         }
+
+      r.maybe_compress ();
     }
   else
-    (*current_liboctave_error_handler) ("matrix size mismatch");
+    {
+      if (a_nr == 0 || a_nc == 0)
+        r.resize (a_nr, a_nc);
+      else if (b_nr == 0 || b_nc == 0)
+        r.resize (b_nr, b_nc);
+      else
+        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
+    }
 
   return r;
 }
@@ -7887,7 +7805,7 @@
 
   EMPTY_RETURN_CHECK (SparseMatrix);
 
-  // Count the number of non-zero elements
+  // Count the number of nonzero elements
   if (d > 0.)
     {
       result = SparseMatrix (nr, nc, d);
@@ -7945,84 +7863,84 @@
 {
   SparseMatrix r;
 
-  if ((a.rows () == b.rows ()) && (a.cols () == b.cols ()))
+  octave_idx_type a_nr = a.rows ();
+  octave_idx_type a_nc = a.cols ();
+  octave_idx_type b_nr = b.rows ();
+  octave_idx_type b_nc = b.cols ();
+
+  if (a_nr == b_nr && a_nc == b_nc)
     {
-      octave_idx_type a_nr = a.rows ();
-      octave_idx_type a_nc = a.cols ();
-
-      octave_idx_type b_nr = b.rows ();
-      octave_idx_type b_nc = b.cols ();
-
-      if (a_nr != b_nr || a_nc != b_nc)
-        gripe_nonconformant ("min", a_nr, a_nc, b_nr, b_nc);
-      else
+      r = SparseMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
+
+      octave_idx_type jx = 0;
+      r.cidx (0) = 0;
+      for (octave_idx_type i = 0 ; i < a_nc ; i++)
         {
-          r = SparseMatrix (a_nr, a_nc, (a.nnz () + b.nnz ()));
-
-          octave_idx_type jx = 0;
-          r.cidx (0) = 0;
-          for (octave_idx_type i = 0 ; i < a_nc ; i++)
-            {
-              octave_idx_type  ja = a.cidx (i);
-              octave_idx_type  ja_max = a.cidx (i+1);
-              bool ja_lt_max= ja < ja_max;
-
-              octave_idx_type  jb = b.cidx (i);
-              octave_idx_type  jb_max = b.cidx (i+1);
-              bool jb_lt_max = jb < jb_max;
-
-              while (ja_lt_max || jb_lt_max )
-                {
-                  octave_quit ();
-                  if ((! jb_lt_max) ||
-                      (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+          octave_idx_type  ja = a.cidx (i);
+          octave_idx_type  ja_max = a.cidx (i+1);
+          bool ja_lt_max= ja < ja_max;
+
+          octave_idx_type  jb = b.cidx (i);
+          octave_idx_type  jb_max = b.cidx (i+1);
+          bool jb_lt_max = jb < jb_max;
+
+          while (ja_lt_max || jb_lt_max)
+            {
+              octave_quit ();
+              if ((! jb_lt_max) || (ja_lt_max && (a.ridx (ja) < b.ridx (jb))))
+                {
+                  double tmp = xmax (a.data (ja), 0.);
+                  if (tmp != 0.)
                     {
-                      double tmp = xmax (a.data (ja), 0.);
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = a.ridx (ja);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
+                      r.ridx (jx) = a.ridx (ja);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else if (( !ja_lt_max ) ||
-                           (jb_lt_max && (b.ridx (jb) < a.ridx (ja)) ) )
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                }
+              else if ((! ja_lt_max)
+                       || (jb_lt_max && (b.ridx (jb) < a.ridx (ja))))
+                {
+                  double tmp = xmax (0., b.data (jb));
+                  if (tmp != 0.)
                     {
-                      double tmp = xmax (0., b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.ridx (jx) = b.ridx (jb);
-                          r.data (jx) = tmp;
-                          jx++;
-                        }
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.ridx (jx) = b.ridx (jb);
+                      r.data (jx) = tmp;
+                      jx++;
                     }
-                  else
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+              else
+                {
+                  double tmp = xmax (a.data (ja), b.data (jb));
+                  if (tmp != 0.)
                     {
-                      double tmp = xmax (a.data (ja), b.data (jb));
-                      if (tmp != 0.)
-                        {
-                          r.data (jx) = tmp;
-                          r.ridx (jx) = a.ridx (ja);
-                          jx++;
-                        }
-                      ja++;
-                      ja_lt_max= ja < ja_max;
-                      jb++;
-                      jb_lt_max= jb < jb_max;
+                      r.data (jx) = tmp;
+                      r.ridx (jx) = a.ridx (ja);
+                      jx++;
                     }
-                }
-              r.cidx (i+1) = jx;
-            }
-
-          r.maybe_compress ();
+                  ja++;
+                  ja_lt_max= ja < ja_max;
+                  jb++;
+                  jb_lt_max= jb < jb_max;
+                }
+            }
+          r.cidx (i+1) = jx;
         }
+
+      r.maybe_compress ();
     }
   else
-    (*current_liboctave_error_handler) ("matrix size mismatch");
+    {
+      if (a_nr == 0 || a_nc == 0)
+        r.resize (a_nr, a_nc);
+      else if (b_nr == 0 || b_nc == 0)
+        r.resize (b_nr, b_nc);
+      else
+        gripe_nonconformant ("max", a_nr, a_nc, b_nr, b_nc);
+    }
 
   return r;
 }
--- a/liboctave/array/dSparse.h
+++ b/liboctave/array/dSparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -33,7 +33,9 @@
 #include "DET.h"
 #include "MSparse.h"
 #include "MSparse-defs.h"
-#include "Sparse-op-defs.h"
+
+#include "Sparse-op-decls.h"
+
 #include "MatrixType.h"
 
 class PermMatrix;
@@ -120,10 +122,13 @@
   friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
   friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
 
-  friend OCTAVE_API SparseMatrix atan2 (const double& x, const SparseMatrix& y);
-  friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, const double& y);
+  friend OCTAVE_API SparseMatrix atan2 (const double& x, const SparseMatrix& y)
+                                        GCC_ATTR_DEPRECATED ;
+  friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, const double& y)
+                                        GCC_ATTR_DEPRECATED ;
   friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x,
-                                        const SparseMatrix& y);
+                                        const SparseMatrix& y)
+                                        GCC_ATTR_DEPRECATED ;
 
   SparseMatrix transpose (void) const
   {
--- a/liboctave/array/dim-vector.cc
+++ b/liboctave/array/dim-vector.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyirght (C) 2009, 2010 VZLU Prague
 
 This file is part of Octave.
@@ -176,7 +176,8 @@
 bool
 dim_vector::concat (const dim_vector& dvb, int dim)
 {
-  int orig_nd = ndims (), ndb = dvb.ndims ();
+  int orig_nd = ndims ();
+  int ndb = dvb.ndims ();
   int new_nd = dim < ndb ? ndb : dim + 1;
   if (new_nd > orig_nd)
     resize (new_nd, 1);
--- a/liboctave/array/dim-vector.h
+++ b/liboctave/array/dim-vector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyirght (C) 2009, 2010 VZLU Prague
 
 This file is part of Octave.
@@ -62,7 +62,7 @@
 
   octave_idx_type& count (void) const { return rep[-2]; }
 
-  // Construct a new rep with count = 1 and ndims given.
+  //! Construct a new rep with count = 1 and ndims given.
 
   static octave_idx_type *newrep (int ndims)
   {
@@ -74,7 +74,7 @@
     return r;
   }
 
-  // Clone this->rep.
+  //! Clone this->rep.
 
   octave_idx_type *clonerep (void)
   {
@@ -91,7 +91,7 @@
     return r;
   }
 
-  // Clone and resize this->rep to length n, filling by given value.
+  //! Clone and resize this->rep to length n, filling by given value.
 
   octave_idx_type *resizerep (int n, octave_idx_type fill_value)
   {
@@ -117,7 +117,7 @@
     return r;
   }
 
-  // Free the rep.
+  //! Free the rep.
 
   void freerep (void)
   {
@@ -140,27 +140,6 @@
 
 public:
 
-  // The constructor
-  //
-  //   dim_vector (n)
-  //
-  // creates an dimension vector with N rows and 1 column.  It is
-  // deprecated because of the potentiol for confusion that it causes.
-  // Additional constructors of the form
-  //
-  //   dim_vector (r, c)
-  //   dim_vector (r, c, p)
-  //   dim_vector (d1, d2, d3, d4, ...)
-  //
-  // are available for up to 7 dimensions.
-
-  explicit dim_vector (octave_idx_type n) GCC_ATTR_DEPRECATED
-    : rep (newrep (2))
-  {
-    rep[0] = n;
-    rep[1] = 1;
-  }
-
 #define ASSIGN_REP(i) rep[i] = d ## i;
 #define DIM_VECTOR_CTOR(N) \
   dim_vector (OCT_MAKE_DECL_LIST (octave_idx_type, d, N)) \
@@ -337,9 +316,12 @@
     return (num_ones () == length ());
   }
 
-  // Return the number of elements that a matrix with this dimension
-  // vector would have, NOT the number of dimensions (elements in the
-  // dimension vector).
+  //! Number of elements that a matrix with this dimensions would have.
+  /*!
+     Return the number of elements that a matrix with this dimension
+     vector would have, NOT the number of dimensions (elements in the
+     dimension vector).
+  */
 
   octave_idx_type numel (int n = 0) const
   {
@@ -353,13 +335,15 @@
     return retval;
   }
 
-  // The following function will throw a std::bad_alloc ()
-  // exception if the requested size is larger than can be indexed by
-  // octave_idx_type. This may be smaller than the actual amount of
-  // memory that can be safely allocated on a system.  However, if we
-  // don't fail here, we can end up with a mysterious crash inside a
-  // function that is iterating over an array using octave_idx_type
-  // indices.
+  /*!
+     The following function will throw a std::bad_alloc ()
+     exception if the requested size is larger than can be indexed by
+     octave_idx_type. This may be smaller than the actual amount of
+     memory that can be safely allocated on a system.  However, if we
+     don't fail here, we can end up with a mysterious crash inside a
+     function that is iterating over an array using octave_idx_type
+     indices.
+  */
 
   octave_idx_type safe_numel (void) const;
 
@@ -377,18 +361,19 @@
 
   dim_vector squeeze (void) const;
 
-  // This corresponds to cat().
+  //! This corresponds to cat().
   bool concat (const dim_vector& dvb, int dim);
 
-  // This corresponds to [,] (horzcat, dim = 0) and [;] (vertcat, dim = 1).
+  //! This corresponds to [,] (horzcat, dim = 0) and [;] (vertcat, dim = 1).
   // The rules are more relaxed here.
   bool hvcat (const dim_vector& dvb, int dim);
 
-  // Force certain dimensionality, preserving numel ().  Missing
-  // dimensions are set to 1, redundant are folded into the trailing
-  // one.  If n = 1, the result is 2d and the second dim is 1
-  // (dim_vectors are always at least 2D).
-
+  /*!
+      Force certain dimensionality, preserving numel ().  Missing
+      dimensions are set to 1, redundant are folded into the trailing
+      one.  If n = 1, the result is 2d and the second dim is 1
+      (dim_vectors are always at least 2D).
+  */
   dim_vector redim (int n) const;
 
   dim_vector as_column (void) const
@@ -423,7 +408,7 @@
     return def;
   }
 
-  // Compute a linear index from an index tuple.
+  //! Compute a linear index from an index tuple.
 
   octave_idx_type compute_index (const octave_idx_type *idx) const
   {
@@ -434,7 +419,7 @@
     return k;
   }
 
-  // Ditto, but the tuple may be incomplete (nidx < length ()).
+  //! Ditto, but the tuple may be incomplete (nidx < length ()).
 
   octave_idx_type compute_index (const octave_idx_type *idx, int nidx) const
   {
@@ -445,9 +430,11 @@
     return k;
   }
 
-  // Increment a multi-dimensional index tuple, optionally starting
-  // from an offset position and return the index of the last index
-  // position that was changed, or length () if just cycled over.
+  /*/!
+      Increment a multi-dimensional index tuple, optionally starting
+      from an offset position and return the index of the last index
+      position that was changed, or length () if just cycled over.
+  */
 
   int increment_index (octave_idx_type *idx, int start = 0) const
   {
@@ -462,7 +449,7 @@
     return i;
   }
 
-  // Return cumulative dimensions.
+  //! Return cumulative dimensions.
 
   dim_vector cumulative (void) const
   {
@@ -476,8 +463,8 @@
     return retval;
   }
 
-  // Compute a linear index from an index tuple.  Dimensions are
-  // required to be cumulative.
+  //! Compute a linear index from an index tuple.  Dimensions are
+  //! required to be cumulative.
 
   octave_idx_type cum_compute_index (const octave_idx_type *idx) const
   {
--- a/liboctave/array/fCColVector.cc
+++ b/liboctave/array/fCColVector.cc
@@ -1,7 +1,7 @@
 // ColumnVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/fCColVector.h
+++ b/liboctave/array/fCColVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/fCDiagMatrix.cc
+++ b/liboctave/array/fCDiagMatrix.cc
@@ -1,7 +1,7 @@
 // DiagMatrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -374,20 +374,20 @@
   info = 0;
   for (octave_idx_type i = 0; i < length (); i++)
     {
-      if (elem (i, i) == static_cast<float> (0.0))
+      if (elem (i, i) == 0.0f)
         {
           info = -1;
           return *this;
         }
       else
-        retval.elem (i, i) = static_cast<float> (1.0) / elem (i, i);
+        retval.elem (i, i) = 1.0f / elem (i, i);
     }
 
   return retval;
 }
 
 FloatComplexDiagMatrix
-FloatComplexDiagMatrix::pseudo_inverse (void) const
+FloatComplexDiagMatrix::pseudo_inverse (float tol) const
 {
   octave_idx_type r = rows ();
   octave_idx_type c = cols ();
@@ -397,10 +397,11 @@
 
   for (octave_idx_type i = 0; i < len; i++)
     {
-      if (elem (i, i) != 0.0f)
+      float val = std::abs (elem (i, i));
+      if (val < tol || val == 0.0f)
+        retval.elem (i, i) = 0.0f;
+      else
         retval.elem (i, i) = 1.0f / elem (i, i);
-      else
-        retval.elem (i, i) = 0.0f;
     }
 
   return retval;
@@ -452,7 +453,8 @@
 
   FloatComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = c.length (), lenm = len < a_nc ? len : a_nc;
+  octave_idx_type len = c.length ();
+  octave_idx_type lenm = len < a_nc ? len : a_nc;
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -553,7 +555,8 @@
 FloatComplexDiagMatrix::rcond (void) const
 {
   FloatColumnVector av = extract_diag (0).map<float> (std::abs);
-  float amx = av.max (), amn = av.min ();
+  float amx = av.max ();
+  float amn = av.min ();
   return amx == 0 ? 0.0f : amn / amx;
 }
 
--- a/liboctave/array/fCDiagMatrix.h
+++ b/liboctave/array/fCDiagMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -122,7 +122,7 @@
 
   FloatComplexDiagMatrix inverse (octave_idx_type& info) const;
   FloatComplexDiagMatrix inverse (void) const;
-  FloatComplexDiagMatrix pseudo_inverse (void) const;
+  FloatComplexDiagMatrix pseudo_inverse (float tol = 0.0f) const;
 
   bool all_elements_are_real (void) const;
 
--- a/liboctave/array/fCMatrix.cc
+++ b/liboctave/array/fCMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague, a.s.
 
@@ -38,7 +38,13 @@
 #include "Array-util.h"
 #include "DET.h"
 #include "f77-fcn.h"
+#include "boolMatrix.h"
+#include "chMatrix.h"
 #include "fCMatrix.h"
+#include "fCNDArray.h"
+#include "fCDiagMatrix.h"
+#include "fCColVector.h"
+#include "fCRowVector.h"
 #include "fCmplxCHOL.h"
 #include "fCmplxSCHUR.h"
 #include "fCmplxSVD.h"
@@ -47,7 +53,6 @@
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
-#include "mx-base.h"
 #include "mx-fcm-fdm.h"
 #include "mx-fcm-fs.h"
 #include "mx-fdm-fcm.h"
@@ -264,39 +269,67 @@
 // FloatComplex Matrix class
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatMatrix& a)
-  : MArray<FloatComplex> (a)
+  : FloatComplexNDArray (a)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatRowVector& rv)
-  : MArray<FloatComplex> (rv)
+  : FloatComplexNDArray (rv)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatColumnVector& cv)
-  : MArray<FloatComplex> (cv)
+  : FloatComplexNDArray (cv)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatDiagMatrix& a)
-  : MArray<FloatComplex> (a.dims (), 0.0)
+  : FloatComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatComplexMatrix::FloatComplexMatrix (const MDiagArray2<float>& a)
+  : FloatComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatComplexMatrix::FloatComplexMatrix (const DiagArray2<float>& a)
+  : FloatComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatComplexRowVector& rv)
-  : MArray<FloatComplex> (rv)
+  : FloatComplexNDArray (rv)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatComplexColumnVector& cv)
-  : MArray<FloatComplex> (cv)
+  : FloatComplexNDArray (cv)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatComplexDiagMatrix& a)
-  : MArray<FloatComplex> (a.dims (), 0.0)
+  : FloatComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatComplexMatrix::FloatComplexMatrix (const MDiagArray2<FloatComplex>& a)
+  : FloatComplexNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatComplexMatrix::FloatComplexMatrix (const DiagArray2<FloatComplex>& a)
+  : FloatComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
@@ -306,12 +339,12 @@
 // here?
 
 FloatComplexMatrix::FloatComplexMatrix (const boolMatrix& a)
-  : MArray<FloatComplex> (a)
+  : FloatComplexNDArray (a)
 {
 }
 
 FloatComplexMatrix::FloatComplexMatrix (const charMatrix& a)
-  : MArray<FloatComplex> (a.dims (), 0.0)
+  : FloatComplexNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.rows (); i++)
     for (octave_idx_type j = 0; j < a.cols (); j++)
@@ -320,7 +353,7 @@
 
 FloatComplexMatrix::FloatComplexMatrix (const FloatMatrix& re,
                                         const FloatMatrix& im)
-  : MArray<FloatComplex> (re.dims ())
+  : FloatComplexNDArray (re.dims ())
 {
   if (im.rows () != rows () || im.cols () != cols ())
     (*current_liboctave_error_handler) ("complex: internal error");
@@ -1727,7 +1760,7 @@
 float
 FloatComplexMatrix::rcond (MatrixType &mattype) const
 {
-  float rcon;
+  float rcon = octave_NaN;
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1909,8 +1942,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1925,11 +1957,27 @@
             {
               const FloatComplex *tmp_data = fortran_vec ();
 
+              retval = b;
+              FloatComplex *result = retval.fortran_vec ();
+
+              char uplo = 'U';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (ctrtrs, CTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'U';
-                  char dia = 'N';
+                  uplo = 'U';
+                  dia = 'N';
 
                   Array<FloatComplex> z (dim_vector (2 * nc, 1));
                   FloatComplex *pz = z.fortran_vec ();
@@ -1957,30 +2005,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  FloatComplex *result = retval.fortran_vec ();
-
-                  char uplo = 'U';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (ctrtrs, CTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -2010,8 +2037,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -2026,11 +2052,27 @@
             {
               const FloatComplex *tmp_data = fortran_vec ();
 
+              retval = b;
+              FloatComplex *result = retval.fortran_vec ();
+
+              char uplo = 'L';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (ctrtrs, CTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'L';
-                  char dia = 'N';
+                  uplo = 'L';
+                  dia = 'N';
 
                   Array<FloatComplex> z (dim_vector (2 * nc, 1));
                   FloatComplex *pz = z.fortran_vec ();
@@ -2058,30 +2100,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  FloatComplex *result = retval.fortran_vec ();
-
-                  char uplo = 'L';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (ctrtrs, CTRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -2164,9 +2185,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -2221,8 +2240,7 @@
               if (sing_handler)
                 sing_handler (rcon);
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
 
               mattype.mark_as_rectangular ();
             }
@@ -2250,9 +2268,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -2349,9 +2365,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
@@ -3118,154 +3134,56 @@
 // unary operations
 
 boolMatrix
-FloatComplexMatrix::operator ! (void) const
-{
-  if (any_element_is_nan ())
-    gripe_nan_to_logical_conversion ();
-
-  return do_mx_unary_op<bool, FloatComplex> (*this, mx_inline_not);
-}
-
-// other operations
-
-bool
-FloatComplexMatrix::any_element_is_nan (void) const
-{
-  return do_mx_check<FloatComplex> (*this, mx_inline_any_nan);
-}
-
-bool
-FloatComplexMatrix::any_element_is_inf_or_nan (void) const
-{
-  return ! do_mx_check<FloatComplex> (*this, mx_inline_all_finite);
-}
-
-// Return true if no elements have imaginary components.
-
-bool
-FloatComplexMatrix::all_elements_are_real (void) const
-{
-  return do_mx_check<FloatComplex> (*this, mx_inline_all_real);
-}
-
-// Return nonzero if any element of CM has a non-integer real or
-// imaginary part.  Also extract the largest and smallest (real or
-// imaginary) values and return them in MAX_VAL and MIN_VAL.
-
-bool
-FloatComplexMatrix::all_integers (float& max_val, float& min_val) const
-{
-  octave_idx_type nr = rows ();
-  octave_idx_type nc = cols ();
-
-  if (nr > 0 && nc > 0)
-    {
-      FloatComplex val = elem (0, 0);
-
-      float r_val = std::real (val);
-      float i_val = std::imag (val);
-
-      max_val = r_val;
-      min_val = r_val;
-
-      if (i_val > max_val)
-        max_val = i_val;
-
-      if (i_val < max_val)
-        min_val = i_val;
-    }
-  else
-    return false;
-
-  for (octave_idx_type j = 0; j < nc; j++)
-    for (octave_idx_type i = 0; i < nr; i++)
-      {
-        FloatComplex val = elem (i, j);
-
-        float r_val = std::real (val);
-        float i_val = std::imag (val);
-
-        if (r_val > max_val)
-          max_val = r_val;
-
-        if (i_val > max_val)
-          max_val = i_val;
-
-        if (r_val < min_val)
-          min_val = r_val;
-
-        if (i_val < min_val)
-          min_val = i_val;
-
-        if (D_NINT (r_val) != r_val || D_NINT (i_val) != i_val)
-          return false;
-      }
-
-  return true;
-}
-
-bool
-FloatComplexMatrix::too_large_for_float (void) const
-{
-  return false;
-}
-
-// FIXME: Do these really belong here?  Maybe they should be
-// in a base class?
-
-boolMatrix
 FloatComplexMatrix::all (int dim) const
 {
-  return do_mx_red_op<bool, FloatComplex> (*this, dim, mx_inline_all);
+  return FloatComplexNDArray::all (dim);
 }
 
 boolMatrix
 FloatComplexMatrix::any (int dim) const
 {
-  return do_mx_red_op<bool, FloatComplex> (*this, dim, mx_inline_any);
+  return FloatComplexNDArray::any (dim);
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::cumprod (int dim) const
 {
-  return do_mx_cum_op<FloatComplex, FloatComplex> (*this, dim,
-                                                   mx_inline_cumprod);
+  return FloatComplexNDArray::cumprod (dim);
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::cumsum (int dim) const
 {
-  return do_mx_cum_op<FloatComplex, FloatComplex> (*this, dim,
-                                                   mx_inline_cumsum);
+  return FloatComplexNDArray::cumsum (dim);
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::prod (int dim) const
 {
-  return do_mx_red_op<FloatComplex, FloatComplex> (*this, dim, mx_inline_prod);
+  return FloatComplexNDArray::prod (dim);
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::sum (int dim) const
 {
-  return do_mx_red_op<FloatComplex, FloatComplex> (*this, dim, mx_inline_sum);
+  return FloatComplexNDArray::sum (dim);
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::sumsq (int dim) const
 {
-  return do_mx_red_op<float, FloatComplex> (*this, dim, mx_inline_sumsq);
+  return FloatComplexNDArray::sumsq (dim);
 }
 
 FloatMatrix FloatComplexMatrix::abs (void) const
 {
-  return do_mx_unary_map<float, FloatComplex, std::abs> (*this);
+  return FloatComplexNDArray::abs ();
 }
 
 FloatComplexMatrix
 FloatComplexMatrix::diag (octave_idx_type k) const
 {
-  return MArray<FloatComplex>::diag (k);
+  return FloatComplexNDArray::diag (k);
 }
 
 FloatComplexDiagMatrix
@@ -3729,7 +3647,7 @@
 
   // FIXME: check info?
 
-  retval = -ua * cx * ub.hermitian ();
+  retval = ua * cx * ub.hermitian ();
 
   return retval;
 }
@@ -3789,8 +3707,10 @@
 {
   FloatComplexMatrix retval;
 
-  bool tra = transa != blas_no_trans, trb = transb != blas_no_trans;
-  bool cja = transa == blas_conj_trans, cjb = transb == blas_conj_trans;
+  bool tra = transa != blas_no_trans;
+  bool trb = transb != blas_no_trans;
+  bool cja = transa == blas_conj_trans;
+  bool cjb = transb == blas_conj_trans;
 
   octave_idx_type a_nr = tra ? a.cols () : a.rows ();
   octave_idx_type a_nc = tra ? a.rows () : a.cols ();
@@ -3846,8 +3766,10 @@
         }
       else
         {
-          octave_idx_type lda = a.rows (), tda = a.cols ();
-          octave_idx_type ldb = b.rows (), tdb = b.cols ();
+          octave_idx_type lda = a.rows ();
+          octave_idx_type tda = a.cols ();
+          octave_idx_type ldb = b.rows ();
+          octave_idx_type tdb = b.cols ();
 
           retval = FloatComplexMatrix (a_nr, b_nc, 0.0);
           FloatComplex *c = retval.fortran_vec ();
@@ -3927,7 +3849,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (c, m (i, j));
+        result(i, j) = xmin (c, m(i, j));
       }
 
   return result;
@@ -3947,7 +3869,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (m (i, j), c);
+        result(i, j) = xmin (m(i, j), c);
       }
 
   return result;
@@ -3976,7 +3898,7 @@
       for (octave_idx_type i = 0; i < nr; i++)
         {
           octave_quit ();
-          if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0)
+          if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
             {
               columns_are_real_only = 0;
               break;
@@ -3986,14 +3908,14 @@
       if (columns_are_real_only)
         {
           for (octave_idx_type i = 0; i < nr; i++)
-            result (i, j) = xmin (std::real (a (i, j)), std::real (b (i, j)));
+            result(i, j) = xmin (std::real (a(i, j)), std::real (b(i, j)));
         }
       else
         {
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmin (a (i, j), b (i, j));
+              result(i, j) = xmin (a(i, j), b(i, j));
             }
         }
     }
@@ -4015,7 +3937,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (c, m (i, j));
+        result(i, j) = xmax (c, m(i, j));
       }
 
   return result;
@@ -4035,7 +3957,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (m (i, j), c);
+        result(i, j) = xmax (m(i, j), c);
       }
 
   return result;
@@ -4064,7 +3986,7 @@
       for (octave_idx_type i = 0; i < nr; i++)
         {
           octave_quit ();
-          if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0)
+          if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
             {
               columns_are_real_only = 0;
               break;
@@ -4076,7 +3998,7 @@
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmax (std::real (a (i, j)), std::real (b (i, j)));
+              result(i, j) = xmax (std::real (a(i, j)), std::real (b(i, j)));
             }
         }
       else
@@ -4084,7 +4006,7 @@
           for (octave_idx_type i = 0; i < nr; i++)
             {
               octave_quit ();
-              result (i, j) = xmax (a (i, j), b (i, j));
+              result(i, j) = xmax (a(i, j), b(i, j));
             }
         }
     }
--- a/liboctave/array/fCMatrix.h
+++ b/liboctave/array/fCMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,6 +23,7 @@
 #if !defined (octave_fCMatrix_h)
 #define octave_fCMatrix_h 1
 
+#include "fCNDArray.h"
 #include "MArray.h"
 #include "MDiagArray2.h"
 #include "MatrixType.h"
@@ -34,7 +35,7 @@
 
 class
 OCTAVE_API
-FloatComplexMatrix : public MArray<FloatComplex>
+FloatComplexMatrix : public FloatComplexNDArray
 {
 public:
 
@@ -43,31 +44,31 @@
 
   typedef void (*solve_singularity_handler) (float rcon);
 
-  FloatComplexMatrix (void) : MArray<FloatComplex> () { }
+  FloatComplexMatrix (void) : FloatComplexNDArray () { }
 
   FloatComplexMatrix (octave_idx_type r, octave_idx_type c)
-    : MArray<FloatComplex> (dim_vector (r, c)) { }
+    : FloatComplexNDArray (dim_vector (r, c)) { }
 
   FloatComplexMatrix (octave_idx_type r, octave_idx_type c,
                       const FloatComplex& val)
-    : MArray<FloatComplex> (dim_vector (r, c), val) { }
+    : FloatComplexNDArray (dim_vector (r, c), val) { }
 
   FloatComplexMatrix (const dim_vector& dv)
-    : MArray<FloatComplex> (dv.redim (2)) { }
+    : FloatComplexNDArray (dv.redim (2)) { }
 
   FloatComplexMatrix (const dim_vector& dv, const FloatComplex& val)
-    : MArray<FloatComplex> (dv.redim (2), val) { }
+    : FloatComplexNDArray (dv.redim (2), val) { }
 
   FloatComplexMatrix (const FloatComplexMatrix& a)
-    : MArray<FloatComplex> (a) { }
+    : FloatComplexNDArray (a) { }
 
   template <class U>
   FloatComplexMatrix (const MArray<U>& a)
-    : MArray<FloatComplex> (a.as_matrix ()) { }
+    : FloatComplexNDArray (a.as_matrix ()) { }
 
   template <class U>
   FloatComplexMatrix (const Array<U>& a)
-    : MArray<FloatComplex> (a.as_matrix ()) { }
+    : FloatComplexNDArray (a.as_matrix ()) { }
 
   explicit FloatComplexMatrix (const FloatMatrix& a);
 
@@ -77,24 +78,26 @@
 
   explicit FloatComplexMatrix (const FloatDiagMatrix& a);
 
+  explicit FloatComplexMatrix (const MDiagArray2<float>& a);
+
+  explicit FloatComplexMatrix (const DiagArray2<float>& a);
+
   explicit FloatComplexMatrix (const FloatComplexRowVector& rv);
 
   explicit FloatComplexMatrix (const FloatComplexColumnVector& cv);
 
   explicit FloatComplexMatrix (const FloatComplexDiagMatrix& a);
 
+  explicit FloatComplexMatrix (const MDiagArray2<FloatComplex>& a);
+
+  explicit FloatComplexMatrix (const DiagArray2<FloatComplex>& a);
+
   explicit FloatComplexMatrix (const boolMatrix& a);
 
   explicit FloatComplexMatrix (const charMatrix& a);
 
   FloatComplexMatrix (const FloatMatrix& re, const FloatMatrix& im);
 
-  FloatComplexMatrix& operator = (const FloatComplexMatrix& a)
-  {
-    MArray<FloatComplex>::operator = (a);
-    return *this;
-  }
-
   bool operator == (const FloatComplexMatrix& a) const;
   bool operator != (const FloatComplexMatrix& a) const;
 
@@ -380,12 +383,6 @@
 
   // other operations
 
-  bool any_element_is_nan (void) const;
-  bool any_element_is_inf_or_nan (void) const;
-  bool all_elements_are_real (void) const;
-  bool all_integers (float& max_val, float& min_val) const;
-  bool too_large_for_float (void) const;
-
   boolMatrix all (int dim = -1) const;
   boolMatrix any (int dim = -1) const;
 
--- a/liboctave/array/fCNDArray.cc
+++ b/liboctave/array/fCNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -39,6 +39,7 @@
 #include "MArray-defs.h"
 #include "mx-base.h"
 #include "mx-op-defs.h"
+#include "mx-fcnda-fs.h"
 #include "oct-fftw.h"
 #include "oct-locbuf.h"
 
@@ -213,7 +214,7 @@
   FloatComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<FloatComplex> wsave (nn, 1);
+  Array<FloatComplex> wsave (dim_vector (nn, 1));
   FloatComplex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts);
@@ -260,7 +261,7 @@
   FloatComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<FloatComplex> wsave (nn, 1);
+  Array<FloatComplex> wsave (dim_vector (nn, 1));
   FloatComplex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts);
@@ -310,9 +311,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn, 1);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts, 1);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -358,9 +359,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn, 1);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts, 1);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -406,9 +407,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn, 1);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts, 1);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -453,9 +454,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn, 1);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts, 1);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -616,6 +617,12 @@
   return do_mx_red_op<FloatComplex, FloatComplex> (*this, dim, mx_inline_prod);
 }
 
+ComplexNDArray
+FloatComplexNDArray::dprod (int dim) const
+{
+  return do_mx_red_op<Complex, FloatComplex> (*this, dim, mx_inline_dprod);
+}
+
 FloatComplexNDArray
 FloatComplexNDArray::sum (int dim) const
 {
@@ -819,20 +826,6 @@
   return *this;
 }
 
-FloatComplexMatrix
-FloatComplexNDArray::matrix_value (void) const
-{
-  FloatComplexMatrix retval;
-
-  if (ndims () == 2)
-    retval = FloatComplexMatrix (Array<FloatComplex> (*this));
-  else
-    (*current_liboctave_error_handler)
-      ("invalid conversion of FloatComplexNDArray to FloatComplexMatrix");
-
-  return retval;
-}
-
 void
 FloatComplexNDArray::increment_index (Array<octave_idx_type>& ra_idx,
                                       const dim_vector& dimensions,
--- a/liboctave/array/fCNDArray.h
+++ b/liboctave/array/fCNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,7 +24,6 @@
 #define octave_fCNDArray_h 1
 
 #include "MArray.h"
-#include "fCMatrix.h"
 
 #include "mx-defs.h"
 #include "mx-op-decl.h"
@@ -36,8 +35,6 @@
 {
 public:
 
-  typedef FloatComplexMatrix matrix_type;
-
   FloatComplexNDArray (void) : MArray<FloatComplex> () { }
 
   FloatComplexNDArray (const dim_vector& dv) : MArray<FloatComplex> (dv) { }
@@ -48,9 +45,6 @@
   FloatComplexNDArray (const FloatComplexNDArray& a)
     : MArray<FloatComplex> (a) { }
 
-  FloatComplexNDArray (const FloatComplexMatrix& a)
-    : MArray<FloatComplex> (a) { }
-
   template <class U>
   FloatComplexNDArray (const MArray<U>& a) : MArray<FloatComplex> (a) { }
 
@@ -83,6 +77,7 @@
   FloatComplexNDArray cumprod (int dim = -1) const;
   FloatComplexNDArray cumsum (int dim = -1) const;
   FloatComplexNDArray prod (int dim = -1) const;
+  ComplexNDArray dprod (int dim = -1) const;
   FloatComplexNDArray sum (int dim = -1) const;
   ComplexNDArray dsum (int dim = -1) const;
   FloatComplexNDArray sumsq (int dim = -1) const;
@@ -128,8 +123,6 @@
   FloatComplexNDArray fourierNd (void) const;
   FloatComplexNDArray ifourierNd (void) const;
 
-  FloatComplexMatrix matrix_value (void) const;
-
   FloatComplexNDArray squeeze (void) const
   { return MArray<FloatComplex>::squeeze (); }
 
--- a/liboctave/array/fCRowVector.cc
+++ b/liboctave/array/fCRowVector.cc
@@ -1,7 +1,7 @@
 // RowVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/fCRowVector.h
+++ b/liboctave/array/fCRowVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/fColVector.cc
+++ b/liboctave/array/fColVector.cc
@@ -1,7 +1,7 @@
 // ColumnVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/fColVector.h
+++ b/liboctave/array/fColVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/array/fDiagMatrix.cc
+++ b/liboctave/array/fDiagMatrix.cc
@@ -1,7 +1,7 @@
 // FloatDiagMatrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -292,7 +292,7 @@
 }
 
 FloatDiagMatrix
-FloatDiagMatrix::pseudo_inverse (void) const
+FloatDiagMatrix::pseudo_inverse (float tol) const
 {
   octave_idx_type r = rows ();
   octave_idx_type c = cols ();
@@ -302,10 +302,11 @@
 
   for (octave_idx_type i = 0; i < len; i++)
     {
-      if (elem (i, i) != 0.0f)
+      float val = std::abs (elem (i, i));
+      if (val < tol || val == 0.0f)
+        retval.elem (i, i) = 0.0f;
+      else
         retval.elem (i, i) = 1.0f / elem (i, i);
-      else
-        retval.elem (i, i) = 0.0f;
     }
 
   return retval;
@@ -329,7 +330,8 @@
 
   FloatDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = c.length (), lenm = len < a_nc ? len : a_nc;
+  octave_idx_type len = c.length ();
+  octave_idx_type lenm = len < a_nc ? len : a_nc;
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -364,7 +366,8 @@
 FloatDiagMatrix::rcond (void) const
 {
   FloatColumnVector av = extract_diag (0).map<float> (fabsf);
-  float amx = av.max (), amn = av.min ();
+  float amx = av.max ();
+  float amn = av.min ();
   return amx == 0 ? 0.0f : amn / amx;
 }
 
--- a/liboctave/array/fDiagMatrix.h
+++ b/liboctave/array/fDiagMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -99,7 +99,7 @@
 
   FloatDiagMatrix inverse (void) const;
   FloatDiagMatrix inverse (octave_idx_type& info) const;
-  FloatDiagMatrix pseudo_inverse (void) const;
+  FloatDiagMatrix pseudo_inverse (float tol = 0.0f) const;
 
   // other operations
 
--- a/liboctave/array/fMatrix.cc
+++ b/liboctave/array/fMatrix.cc
@@ -1,7 +1,7 @@
 // Matrix manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague, a.s.
 
@@ -32,7 +32,17 @@
 #include <iostream>
 #include <vector>
 
+#include "fNDArray.h"
 #include "Array-util.h"
+#include "boolMatrix.h"
+#include "chMatrix.h"
+#include "fMatrix.h"
+#include "fDiagMatrix.h"
+#include "fCMatrix.h"
+#include "fColVector.h"
+#include "fRowVector.h"
+#include "fCColVector.h"
+#include "PermMatrix.h"
 #include "DET.h"
 #include "byte-swap.h"
 #include "f77-fcn.h"
@@ -45,7 +55,6 @@
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
-#include "mx-base.h"
 #include "mx-fdm-fm.h"
 #include "mx-fm-fdm.h"
 #include "mx-inlines.cc"
@@ -240,44 +249,54 @@
 // Matrix class.
 
 FloatMatrix::FloatMatrix (const FloatRowVector& rv)
-  : MArray<float> (rv)
+  : FloatNDArray (rv)
 {
 }
 
 FloatMatrix::FloatMatrix (const FloatColumnVector& cv)
-  : MArray<float> (cv)
+  : FloatNDArray (cv)
 {
 }
 
 FloatMatrix::FloatMatrix (const FloatDiagMatrix& a)
-  : MArray<float> (a.dims (), 0.0)
+  : FloatNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatMatrix::FloatMatrix (const MDiagArray2<float>& a)
+  : FloatNDArray (a.dims (), 0.0)
+{
+  for (octave_idx_type i = 0; i < a.length (); i++)
+    elem (i, i) = a.elem (i, i);
+}
+
+FloatMatrix::FloatMatrix (const DiagArray2<float>& a)
+  : FloatNDArray (a.dims (), 0.0)
 {
   for (octave_idx_type i = 0; i < a.length (); i++)
     elem (i, i) = a.elem (i, i);
 }
 
 FloatMatrix::FloatMatrix (const PermMatrix& a)
-  : MArray<float> (a.dims (), 0.0)
+  : FloatNDArray (a.dims (), 0.0)
 {
-  const Array<octave_idx_type> ia (a.pvec ());
+  const Array<octave_idx_type> ia (a.col_perm_vec ());
   octave_idx_type len = a.rows ();
-  if (a.is_col_perm ())
-    for (octave_idx_type i = 0; i < len; i++)
-      elem (ia(i), i) = 1.0;
-  else
-    for (octave_idx_type i = 0; i < len; i++)
-      elem (i, ia(i)) = 1.0;
+  for (octave_idx_type i = 0; i < len; i++)
+    elem (ia(i), i) = 1.0;
 }
 
 // FIXME: could we use a templated mixed-type copy function here?
 
 FloatMatrix::FloatMatrix (const boolMatrix& a)
-  : MArray<float> (a)
+  : FloatNDArray (a)
 {
 }
 
 FloatMatrix::FloatMatrix (const charMatrix& a)
-  : MArray<float> (a.dims ())
+  : FloatNDArray (a.dims ())
 {
   for (octave_idx_type i = 0; i < a.rows (); i++)
     for (octave_idx_type j = 0; j < a.cols (); j++)
@@ -319,7 +338,7 @@
 FloatMatrix::insert (const FloatMatrix& a,
                      octave_idx_type r, octave_idx_type c)
 {
-  Array<float>::insert (a, r, c);
+  FloatNDArray::insert (a, r, c);
   return *this;
 }
 
@@ -1390,7 +1409,7 @@
 float
 FloatMatrix::rcond (MatrixType &mattype) const
 {
-  float rcon;
+  float rcon = octave_NaN;
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1570,8 +1589,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Upper ||
-          typ == MatrixType::Upper)
+      if (typ == MatrixType::Permuted_Upper || typ == MatrixType::Upper)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1586,11 +1604,27 @@
             {
               const float *tmp_data = fortran_vec ();
 
+              retval = b;
+              float *result = retval.fortran_vec ();
+
+              char uplo = 'U';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (strtrs, STRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'U';
-                  char dia = 'N';
+                  uplo = 'U';
+                  dia = 'N';
 
                   Array<float> z (dim_vector (3 * nc, 1));
                   float *pz = z.fortran_vec ();
@@ -1618,30 +1652,10 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
-              if (info == 0)
-                {
-                  retval = b;
-                  float *result = retval.fortran_vec ();
-
-                  char uplo = 'U';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (strtrs, STRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -1671,8 +1685,7 @@
     {
       volatile int typ = mattype.type ();
 
-      if (typ == MatrixType::Permuted_Lower ||
-          typ == MatrixType::Lower)
+      if (typ == MatrixType::Permuted_Lower || typ == MatrixType::Lower)
         {
           octave_idx_type b_nc = b.cols ();
           rcon = 1.;
@@ -1687,11 +1700,27 @@
             {
               const float *tmp_data = fortran_vec ();
 
+              retval = b;
+              float *result = retval.fortran_vec ();
+
+              char uplo = 'L';
+              char trans = get_blas_char (transt);
+              char dia = 'N';
+
+              F77_XFCN (strtrs, STRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
+                                         F77_CONST_CHAR_ARG2 (&trans, 1),
+                                         F77_CONST_CHAR_ARG2 (&dia, 1),
+                                         nr, b_nc, tmp_data, nr,
+                                         result, nr, info
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)
+                                         F77_CHAR_ARG_LEN (1)));
+
               if (calc_cond)
                 {
                   char norm = '1';
-                  char uplo = 'L';
-                  char dia = 'N';
+                  uplo = 'L';
+                  dia = 'N';
 
                   Array<float> z (dim_vector (3 * nc, 1));
                   float *pz = z.fortran_vec ();
@@ -1719,30 +1748,9 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
-
-              if (info == 0)
-                {
-                  retval = b;
-                  float *result = retval.fortran_vec ();
-
-                  char uplo = 'L';
-                  char trans = get_blas_char (transt);
-                  char dia = 'N';
-
-                  F77_XFCN (strtrs, STRTRS, (F77_CONST_CHAR_ARG2 (&uplo, 1),
-                                             F77_CONST_CHAR_ARG2 (&trans, 1),
-                                             F77_CONST_CHAR_ARG2 (&dia, 1),
-                                             nr, b_nc, tmp_data, nr,
-                                             result, nr, info
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)
-                                             F77_CHAR_ARG_LEN (1)));
-                }
             }
         }
       else
@@ -1824,9 +1832,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -1879,8 +1885,7 @@
               if (sing_handler)
                 sing_handler (rcon);
               else
-                (*current_liboctave_error_handler)
-                  ("matrix singular to machine precision");
+                gripe_singular_matrix ();
 
               mattype.mark_as_rectangular ();
             }
@@ -1908,9 +1913,7 @@
                       if (sing_handler)
                         sing_handler (rcon);
                       else
-                        (*current_liboctave_error_handler)
-                          ("matrix singular to machine precision, rcond = %g",
-                           rcon);
+                        gripe_singular_matrix (rcon);
                     }
                 }
 
@@ -1975,9 +1978,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans || transt == blas_conj_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
@@ -2026,7 +2029,9 @@
 static FloatMatrix
 stack_complex_matrix (const FloatComplexMatrix& cm)
 {
-  octave_idx_type m = cm.rows (), n = cm.cols (), nel = m*n;
+  octave_idx_type m = cm.rows ();
+  octave_idx_type n = cm.cols ();
+  octave_idx_type nel = m*n;
   FloatMatrix retval (m, 2*n);
   const FloatComplex *cmd = cm.data ();
   float *rd = retval.fortran_vec ();
@@ -2041,7 +2046,9 @@
 static FloatComplexMatrix
 unstack_complex_matrix (const FloatMatrix& sm)
 {
-  octave_idx_type m = sm.rows (), n = sm.cols () / 2, nel = m*n;
+  octave_idx_type m = sm.rows ();
+  octave_idx_type n = sm.cols () / 2;
+  octave_idx_type nel = m*n;
   FloatComplexMatrix retval (m, n);
   const float *smd = sm.data ();
   FloatComplex *rd = retval.fortran_vec ();
@@ -2645,17 +2652,6 @@
   return *this;
 }
 
-// unary operations
-
-boolMatrix
-FloatMatrix::operator ! (void) const
-{
-  if (any_element_is_nan ())
-    gripe_nan_to_logical_conversion ();
-
-  return do_mx_unary_op<bool, float> (*this, mx_inline_not);
-}
-
 // column vector by row vector -> matrix operations
 
 FloatMatrix
@@ -2683,139 +2679,48 @@
   return retval;
 }
 
-// other operations.
-
-bool
-FloatMatrix::any_element_is_negative (bool neg_zero) const
-{
-  return (neg_zero ? test_all (xnegative_sign)
-          : do_mx_check<float> (*this, mx_inline_any_negative));
-}
-
-bool
-FloatMatrix::any_element_is_positive (bool neg_zero) const
-{
-  return (neg_zero ? test_all (xpositive_sign)
-          : do_mx_check<float> (*this, mx_inline_any_positive));
-}
-
-bool
-FloatMatrix::any_element_is_nan (void) const
-{
-  return do_mx_check<float> (*this, mx_inline_any_nan);
-}
-
-bool
-FloatMatrix::any_element_is_inf_or_nan (void) const
-{
-  return ! do_mx_check<float> (*this, mx_inline_all_finite);
-}
-
-bool
-FloatMatrix::any_element_not_one_or_zero (void) const
-{
-  return ! test_all (xis_one_or_zero);
-}
-
-bool
-FloatMatrix::all_elements_are_int_or_inf_or_nan (void) const
-{
-  return test_all (xis_int_or_inf_or_nan);
-}
-
-// Return nonzero if any element of M is not an integer.  Also extract
-// the largest and smallest values and return them in MAX_VAL and MIN_VAL.
-
-bool
-FloatMatrix::all_integers (float& max_val, float& min_val) const
-{
-  octave_idx_type nel = nelem ();
-
-  if (nel > 0)
-    {
-      max_val = elem (0);
-      min_val = elem (0);
-    }
-  else
-    return false;
-
-  for (octave_idx_type i = 0; i < nel; i++)
-    {
-      float val = elem (i);
-
-      if (val > max_val)
-        max_val = val;
-
-      if (val < min_val)
-        min_val = val;
-
-      if (! xisinteger (val))
-        return false;
-    }
-
-  return true;
-}
-
-bool
-FloatMatrix::too_large_for_float (void) const
-{
-  return false;
-}
-
 // FIXME: Do these really belong here?  Maybe they should be in a base class?
 
-boolMatrix
-FloatMatrix::all (int dim) const
-{
-  return do_mx_red_op<bool, float> (*this, dim, mx_inline_all);
-}
-
-boolMatrix
-FloatMatrix::any (int dim) const
-{
-  return do_mx_red_op<bool, float> (*this, dim, mx_inline_any);
-}
-
 FloatMatrix
 FloatMatrix::cumprod (int dim) const
 {
-  return do_mx_cum_op<float, float> (*this, dim, mx_inline_cumprod);
+  return FloatNDArray::cumprod (dim);
 }
 
 FloatMatrix
 FloatMatrix::cumsum (int dim) const
 {
-  return do_mx_cum_op<float, float> (*this, dim, mx_inline_cumsum);
+  return FloatNDArray::cumsum (dim);
 }
 
 FloatMatrix
 FloatMatrix::prod (int dim) const
 {
-  return do_mx_red_op<float, float> (*this, dim, mx_inline_prod);
+  return FloatNDArray::prod (dim);
 }
 
 FloatMatrix
 FloatMatrix::sum (int dim) const
 {
-  return do_mx_red_op<float, float> (*this, dim, mx_inline_sum);
+  return FloatNDArray::sum (dim);
 }
 
 FloatMatrix
 FloatMatrix::sumsq (int dim) const
 {
-  return do_mx_red_op<float, float> (*this, dim, mx_inline_sumsq);
+  return FloatNDArray::sumsq (dim);
 }
 
 FloatMatrix
 FloatMatrix::abs (void) const
 {
-  return do_mx_unary_map<float, float, std::abs> (*this);
+  return FloatNDArray::abs ();
 }
 
 FloatMatrix
 FloatMatrix::diag (octave_idx_type k) const
 {
-  return MArray<float>::diag (k);
+  return FloatNDArray::diag (k);
 }
 
 FloatDiagMatrix
@@ -3157,7 +3062,7 @@
 
   // FIXME: check info?
 
-  retval = -ua*cx*ub.transpose ();
+  retval = ua*cx*ub.transpose ();
 
   return retval;
 }
@@ -3197,7 +3102,8 @@
 {
   FloatMatrix retval;
 
-  bool tra = transa != blas_no_trans, trb = transb != blas_no_trans;
+  bool tra = transa != blas_no_trans;
+  bool trb = transb != blas_no_trans;
 
   octave_idx_type a_nr = tra ? a.cols () : a.rows ();
   octave_idx_type a_nc = tra ? a.rows () : a.cols ();
@@ -3232,8 +3138,10 @@
         }
       else
         {
-          octave_idx_type lda = a.rows (), tda = a.cols ();
-          octave_idx_type ldb = b.rows (), tdb = b.cols ();
+          octave_idx_type lda = a.rows ();
+          octave_idx_type tda = a.cols ();
+          octave_idx_type ldb = b.rows ();
+          octave_idx_type tdb = b.cols ();
 
           retval = FloatMatrix (a_nr, b_nc);
           float *c = retval.fortran_vec ();
@@ -3302,7 +3210,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (d, m (i, j));
+        result(i, j) = xmin (d, m(i, j));
       }
 
   return result;
@@ -3322,7 +3230,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (m (i, j), d);
+        result(i, j) = xmin (m(i, j), d);
       }
 
   return result;
@@ -3349,7 +3257,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmin (a (i, j), b (i, j));
+        result(i, j) = xmin (a(i, j), b(i, j));
       }
 
   return result;
@@ -3369,7 +3277,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (d, m (i, j));
+        result(i, j) = xmax (d, m(i, j));
       }
 
   return result;
@@ -3389,7 +3297,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (m (i, j), d);
+        result(i, j) = xmax (m(i, j), d);
       }
 
   return result;
@@ -3416,7 +3324,7 @@
     for (octave_idx_type i = 0; i < nr; i++)
       {
         octave_quit ();
-        result (i, j) = xmax (a (i, j), b (i, j));
+        result(i, j) = xmax (a(i, j), b(i, j));
       }
 
   return result;
--- a/liboctave/array/fMatrix.h
+++ b/liboctave/array/fMatrix.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,6 +23,7 @@
 #if !defined (octave_fMatrix_h)
 #define octave_fMatrix_h 1
 
+#include "fNDArray.h"
 #include "MArray.h"
 #include "MDiagArray2.h"
 #include "MatrixType.h"
@@ -33,7 +34,7 @@
 
 class
 OCTAVE_API
-FloatMatrix : public MArray<float>
+FloatMatrix : public FloatNDArray
 {
 public:
 
@@ -42,26 +43,26 @@
 
   typedef void (*solve_singularity_handler) (float rcon);
 
-  FloatMatrix (void) : MArray<float> () { }
+  FloatMatrix (void) : FloatNDArray () { }
 
   FloatMatrix (octave_idx_type r, octave_idx_type c)
-    : MArray<float> (dim_vector (r, c)) { }
+    : FloatNDArray (dim_vector (r, c)) { }
 
   FloatMatrix (octave_idx_type r, octave_idx_type c, float val)
-    : MArray<float> (dim_vector (r, c), val) { }
+    : FloatNDArray (dim_vector (r, c), val) { }
 
-  FloatMatrix (const dim_vector& dv) : MArray<float> (dv.redim (2)) { }
+  FloatMatrix (const dim_vector& dv) : FloatNDArray (dv.redim (2)) { }
 
   FloatMatrix (const dim_vector& dv, float val)
-    : MArray<float> (dv.redim (2), val) { }
+    : FloatNDArray (dv.redim (2), val) { }
 
-  FloatMatrix (const FloatMatrix& a) : MArray<float> (a) { }
+  FloatMatrix (const FloatMatrix& a) : FloatNDArray (a) { }
 
   template <class U>
-  FloatMatrix (const MArray<U>& a) : MArray<float> (a.as_matrix ()) { }
+  FloatMatrix (const MArray<U>& a) : FloatNDArray (a.as_matrix ()) { }
 
   template <class U>
-  FloatMatrix (const Array<U>& a) : MArray<float> (a.as_matrix ()) { }
+  FloatMatrix (const Array<U>& a) : FloatNDArray (a.as_matrix ()) { }
 
   explicit FloatMatrix (const FloatRowVector& rv);
 
@@ -69,19 +70,16 @@
 
   explicit FloatMatrix (const FloatDiagMatrix& a);
 
+  explicit FloatMatrix (const MDiagArray2<float>& a);
+
+  explicit FloatMatrix (const DiagArray2<float>& a);
+
   explicit FloatMatrix (const PermMatrix& a);
 
   explicit FloatMatrix (const boolMatrix& a);
 
   explicit FloatMatrix (const charMatrix& a);
 
-
-  FloatMatrix& operator = (const FloatMatrix& a)
-  {
-    MArray<float>::operator = (a);
-    return *this;
-  }
-
   bool operator == (const FloatMatrix& a) const;
   bool operator != (const FloatMatrix& a) const;
 
@@ -323,24 +321,6 @@
   FloatMatrix& operator += (const FloatDiagMatrix& a);
   FloatMatrix& operator -= (const FloatDiagMatrix& a);
 
-  // unary operations
-
-  boolMatrix operator ! (void) const;
-
-  // other operations
-
-  bool any_element_is_negative (bool = false) const;
-  bool any_element_is_positive (bool = false) const;
-  bool any_element_is_nan (void) const;
-  bool any_element_is_inf_or_nan (void) const;
-  bool any_element_not_one_or_zero (void) const;
-  bool all_elements_are_int_or_inf_or_nan (void) const;
-  bool all_integers (float& max_val, float& min_val) const;
-  bool too_large_for_float (void) const;
-
-  boolMatrix all (int dim = -1) const;
-  boolMatrix any (int dim = -1) const;
-
   FloatMatrix cumprod (int dim = -1) const;
   FloatMatrix cumsum (int dim = -1) const;
   FloatMatrix prod (int dim = -1) const;
--- a/liboctave/array/fNDArray.cc
+++ b/liboctave/array/fNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -217,7 +217,7 @@
   FloatComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<FloatComplex> wsave (nn);
+  Array<FloatComplex> wsave (dim_vector (nn, 1));
   FloatComplex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts);
@@ -264,7 +264,7 @@
   FloatComplexNDArray retval (dv);
   octave_idx_type npts = dv(dim);
   octave_idx_type nn = 4*npts+15;
-  Array<FloatComplex> wsave (nn);
+  Array<FloatComplex> wsave (dim_vector (nn, 1));
   FloatComplex *pwsave = wsave.fortran_vec ();
 
   OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts);
@@ -314,9 +314,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -362,9 +362,9 @@
     {
       octave_idx_type npts = dv2(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -410,9 +410,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -457,9 +457,9 @@
     {
       octave_idx_type npts = dv(i);
       octave_idx_type nn = 4*npts+15;
-      Array<FloatComplex> wsave (nn);
+      Array<FloatComplex> wsave (dim_vector (nn, 1));
       FloatComplex *pwsave = wsave.fortran_vec ();
-      Array<FloatComplex> row (npts);
+      Array<FloatComplex> row (dim_vector (npts, 1));
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
@@ -627,6 +627,12 @@
   return do_mx_red_op<float, float> (*this, dim, mx_inline_prod);
 }
 
+NDArray
+FloatNDArray::dprod (int dim) const
+{
+  return do_mx_red_op<double, float> (*this, dim, mx_inline_dprod);
+}
+
 FloatNDArray
 FloatNDArray::sum (int dim) const
 {
@@ -806,20 +812,6 @@
   return do_mx_unary_map<bool, float, xfinite> (*this);
 }
 
-FloatMatrix
-FloatNDArray::matrix_value (void) const
-{
-  FloatMatrix retval;
-
-  if (ndims () == 2)
-    retval = FloatMatrix (Array<float> (*this));
-  else
-    (*current_liboctave_error_handler)
-      ("invalid conversion of FloatNDArray to FloatMatrix");
-
-  return retval;
-}
-
 void
 FloatNDArray::increment_index (Array<octave_idx_type>& ra_idx,
                                const dim_vector& dimensions,
--- a/liboctave/array/fNDArray.h
+++ b/liboctave/array/fNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,7 +24,6 @@
 #define octave_fNDArray_h 1
 
 #include "MArray.h"
-#include "fMatrix.h"
 #include "intNDArray.h"
 
 #include "mx-defs.h"
@@ -37,8 +36,6 @@
 {
 public:
 
-  typedef FloatMatrix matrix_type;
-
   FloatNDArray (void) : MArray<float> () { }
 
   FloatNDArray (const dim_vector& dv) : MArray<float> (dv) { }
@@ -48,8 +45,6 @@
 
   FloatNDArray (const FloatNDArray& a) : MArray<float> (a) { }
 
-  FloatNDArray (const FloatMatrix& a) : MArray<float> (a) { }
-
   template <class U>
   FloatNDArray (const MArray<U>& a) : MArray<float> (a) { }
 
@@ -90,6 +85,7 @@
   FloatNDArray cumprod (int dim = -1) const;
   FloatNDArray cumsum (int dim = -1) const;
   FloatNDArray prod (int dim = -1) const;
+  NDArray dprod (int dim = -1) const;
   FloatNDArray sum (int dim = -1) const;
   NDArray dsum (int dim = -1) const;
   FloatNDArray sumsq (int dim = -1) const;
@@ -136,8 +132,6 @@
 
   friend class FloatComplexNDArray;
 
-  FloatMatrix matrix_value (void) const;
-
   FloatNDArray squeeze (void) const { return MArray<float>::squeeze (); }
 
   static void increment_index (Array<octave_idx_type>& ra_idx,
--- a/liboctave/array/fRowVector.cc
+++ b/liboctave/array/fRowVector.cc
@@ -1,7 +1,7 @@
 // RowVector manipulations.
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/fRowVector.h
+++ b/liboctave/array/fRowVector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/idx-vector.cc
+++ b/liboctave/array/idx-vector.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague
 
@@ -63,7 +63,6 @@
   return Array<octave_idx_type> ();
 }
 
-DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_colon_rep);
 
 idx_vector::idx_colon_rep::idx_colon_rep (char c)
 {
@@ -103,7 +102,6 @@
   return os << ":";
 }
 
-DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_range_rep);
 
 idx_vector::idx_range_rep::idx_range_rep (octave_idx_type _start,
                                           octave_idx_type _limit,
@@ -258,7 +256,6 @@
   return convert_index (i, conv_error, ext);
 }
 
-DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_scalar_rep);
 
 template <class T>
 idx_vector::idx_scalar_rep::idx_scalar_rep (T x)
@@ -317,7 +314,6 @@
   return Array<octave_idx_type> (dim_vector (1, 1), data);
 }
 
-DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_vector_rep);
 
 template <class T>
 idx_vector::idx_vector_rep::idx_vector_rep (const Array<T>& nda)
@@ -440,7 +436,7 @@
       octave_idx_type nr = bnda.rows ();
 
       for (octave_idx_type j = 0; j < nc; j++)
-        for (octave_idx_type i = bnda.cidx(j); i < bnda.cidx(j+1); i++)
+        for (octave_idx_type i = bnda.cidx (j); i < bnda.cidx (j+1); i++)
           if (bnda.data (i))
             d[k++] = j * nr + bnda.ridx (i);
 
@@ -595,7 +591,8 @@
 
       for (octave_idx_type i = 0; i < len; i++)
         {
-          octave_idx_type j = data[i], k = cnt[j]++;
+          octave_idx_type j = data[i];
+          octave_idx_type k = cnt[j]++;
           new_data[k] = j;
           idx_data[k] = i;
         }
@@ -644,7 +641,6 @@
     }
 }
 
-DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_mask_rep);
 
 idx_vector::idx_mask_rep::idx_mask_rep (bool b)
   : data (0), len (b ? 1 : 0), ext (0), lsti (-1), lste (-1),
@@ -836,7 +832,8 @@
           {
             // (i:k:end,:) reduces to a range if i <= k and k divides n.
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-            octave_idx_type s = r->get_start (), l = r->length (n);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (n);
             octave_idx_type t = r->get_step ();
             if (l*t == n)
               {
@@ -860,7 +857,8 @@
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
             if (rj->get_step () == 1)
               {
-                octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+                octave_idx_type sj = rj->get_start ();
+                octave_idx_type lj = rj->length (nj);
                 *this = new idx_range_rep (sj * n, lj * n, 1, DIRECT);
                 reduced = true;
               }
@@ -873,7 +871,8 @@
             idx_scalar_rep * r = dynamic_cast<idx_scalar_rep *> (rep);
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
             octave_idx_type k = r->get_data ();
-            octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+            octave_idx_type sj = rj->get_start ();
+            octave_idx_type lj = rj->length (nj);
             octave_idx_type tj = rj->get_step ();
             *this = new idx_range_rep (n * sj + k, lj, n * tj, DIRECT);
             reduced = true;
@@ -885,10 +884,12 @@
             // (i:k:end,p:q) reduces to a range if i <= k and k divides n.
             // (ones (1, m), ones (1, n)) reduces to (ones (1, m*n))
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-            octave_idx_type s = r->get_start (), l = r->length (n);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (n);
             octave_idx_type t = r->get_step ();
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
-            octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+            octave_idx_type sj = rj->get_start ();
+            octave_idx_type lj = rj->length (nj);
             octave_idx_type tj = rj->get_step ();
             if ((l*t == n && tj == 1) || (t == 0 && tj == 0))
               {
@@ -922,7 +923,8 @@
             // (i:d:j,k) reduces to a range.
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
             idx_scalar_rep * rj = dynamic_cast<idx_scalar_rep *> (j.rep);
-            octave_idx_type s = r->get_start (), l = r->length (nj);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (nj);
             octave_idx_type t = r->get_step ();
             octave_idx_type k = rj->get_data ();
             *this = new idx_range_rep (n * k + s, l, t, DIRECT);
@@ -989,7 +991,8 @@
     case class_mask:
       {
         idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
-        octave_idx_type ext = r->extent (0), len = r->length (0);
+        octave_idx_type ext = r->extent (0);
+        octave_idx_type len = r->length (0);
         if (ext == len)
           {
             l = 0;
@@ -1062,7 +1065,8 @@
     case class_range:
       {
         idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-        octave_idx_type start = r->get_start (), step = r->get_step ();
+        octave_idx_type start = r->get_start ();
+        octave_idx_type step = r->get_step ();
         octave_idx_type i, j;
         if (step == 1)
           for (i = start, j = start + len; i < j; i++) *data++ = i;
@@ -1084,7 +1088,7 @@
       {
         idx_vector_rep * r = dynamic_cast<idx_vector_rep *> (rep);
         const octave_idx_type *rdata = r->get_data ();
-        copy_or_memcpy (len, rdata, data);
+        std::copy (rdata, rdata + len, data);
       }
       break;
 
@@ -1116,7 +1120,8 @@
   if (idx_class () == class_mask)
     {
       idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
-      octave_idx_type nz = r->length (0), ext = r->extent (0);
+      octave_idx_type nz = r->length (0);
+      octave_idx_type ext = r->extent (0);
       Array<bool> mask (dim_vector (n, 1));
       const bool *data = r->get_data ();
       bool *ndata = mask.fortran_vec ();
@@ -1207,7 +1212,8 @@
     {
       idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
       const bool *data = r->get_data ();
-      octave_idx_type ext = r->extent (0), len = r->length (0);
+      octave_idx_type ext = r->extent (0);
+      octave_idx_type len = r->length (0);
       octave_idx_type *idata = new octave_idx_type [len];
 
       for (octave_idx_type i = 0, j = 0; i < ext; i++)
--- a/liboctave/array/idx-vector.h
+++ b/liboctave/array/idx-vector.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -26,6 +26,7 @@
 #define octave_idx_vector_h 1
 
 #include <cassert>
+#include <cstring>
 
 #include <algorithm>
 #include <iosfwd>
@@ -33,8 +34,6 @@
 
 #include "dim-vector.h"
 #include "oct-inttypes.h"
-#include "oct-alloc.h"
-#include "oct-mem.h"
 #include "oct-refcount.h"
 
 template<class T> class Array;
@@ -146,7 +145,6 @@
 
   private:
 
-    DECLARE_OCTAVE_ALLOCATOR
 
     // No copying!
     idx_colon_rep (const idx_colon_rep& idx);
@@ -208,7 +206,6 @@
 
   private:
 
-    DECLARE_OCTAVE_ALLOCATOR
 
     // No copying!
     idx_range_rep (const idx_range_rep& idx);
@@ -265,7 +262,6 @@
 
   private:
 
-    DECLARE_OCTAVE_ALLOCATOR
 
     // No copying!
     idx_scalar_rep (const idx_scalar_rep& idx);
@@ -332,7 +328,6 @@
 
   private:
 
-    DECLARE_OCTAVE_ALLOCATOR
 
     // No copying!
     idx_vector_rep (const idx_vector_rep& idx);
@@ -406,7 +401,6 @@
 
   private:
 
-    DECLARE_OCTAVE_ALLOCATOR
 
     // No copying!
     idx_mask_rep (const idx_mask_rep& idx);
@@ -631,16 +625,17 @@
     switch (rep->idx_class ())
       {
       case class_colon:
-        copy_or_memcpy (len, src, dest);
+        std::copy (src, src + len, dest);
         break;
 
       case class_range:
         {
           idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-          octave_idx_type start = r->get_start (), step = r->get_step ();
+          octave_idx_type start = r->get_start ();
+          octave_idx_type step = r->get_step ();
           const T *ssrc = src + start;
           if (step == 1)
-            copy_or_memcpy (len, ssrc, dest);
+            std::copy (ssrc, ssrc + len, dest);
           else if (step == -1)
             std::reverse_copy (ssrc - len + 1, ssrc + 1, dest);
           else if (step == 0)
@@ -704,16 +699,17 @@
     switch (rep->idx_class ())
       {
       case class_colon:
-        copy_or_memcpy (len, src, dest);
+        std::copy (src, src + len, dest);
         break;
 
       case class_range:
         {
           idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-          octave_idx_type start = r->get_start (), step = r->get_step ();
+          octave_idx_type start = r->get_start ();
+          octave_idx_type step = r->get_step ();
           T *sdest = dest + start;
           if (step == 1)
-            copy_or_memcpy (len, src, sdest);
+            std::copy (src, src + len, sdest);
           else if (step == -1)
             std::reverse_copy (src, src + len, sdest - len + 1);
           else
@@ -781,7 +777,8 @@
       case class_range:
         {
           idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-          octave_idx_type start = r->get_start (), step = r->get_step ();
+          octave_idx_type start = r->get_start ();
+          octave_idx_type step = r->get_step ();
           T *sdest = dest + start;
           if (step == 1)
             std::fill (sdest, sdest + len, val);
@@ -850,7 +847,8 @@
       case class_range:
         {
           idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-          octave_idx_type start = r->get_start (), step = r->get_step ();
+          octave_idx_type start = r->get_start ();
+          octave_idx_type step = r->get_step ();
           octave_idx_type i, j;
           if (step == 1)
             for (i = start, j = start + len; i < j; i++) body (i);
@@ -921,7 +919,8 @@
       case class_range:
         {
           idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-          octave_idx_type start = r->get_start (), step = r->get_step ();
+          octave_idx_type start = r->get_start ();
+          octave_idx_type step = r->get_step ();
           octave_idx_type i, j;
           if (step == 1)
             for (i = start, j = start + len; i < j && body (i); i++) ;
@@ -954,7 +953,8 @@
         {
           idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
           const bool *data = r->get_data ();
-          octave_idx_type ext = r->extent (0), j = 0;
+          octave_idx_type ext = r->extent (0);
+          octave_idx_type j = 0;
           for (octave_idx_type i = 0; i < ext; i++)
             {
               if (data[i])
--- a/liboctave/array/int16NDArray.cc
+++ b/liboctave/array/int16NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int16NDArray.h
+++ b/liboctave/array/int16NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int32NDArray.cc
+++ b/liboctave/array/int32NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int32NDArray.h
+++ b/liboctave/array/int32NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int64NDArray.cc
+++ b/liboctave/array/int64NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int64NDArray.h
+++ b/liboctave/array/int64NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int8NDArray.cc
+++ b/liboctave/array/int8NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/int8NDArray.h
+++ b/liboctave/array/int8NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/intNDArray.cc
+++ b/liboctave/array/intNDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -213,6 +213,13 @@
 
 template <class T>
 intNDArray<T>
+intNDArray<T>::prod (int dim) const
+{
+  return do_mx_red_op<T, T> (*this, dim, mx_inline_prod);
+}
+
+template <class T>
+intNDArray<T>
 intNDArray<T>::sum (int dim) const
 {
   return do_mx_red_op<T, T> (*this, dim, mx_inline_sum);
--- a/liboctave/array/intNDArray.h
+++ b/liboctave/array/intNDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -89,6 +89,7 @@
   intNDArray cummin (int dim = -1) const;
   intNDArray cummin (Array<octave_idx_type>& index, int dim = -1) const;
 
+  intNDArray prod (int dim) const;
   intNDArray sum (int dim) const;
   NDArray dsum (int dim) const;
   intNDArray cumsum (int dim) const;
--- a/liboctave/array/module.mk
+++ b/liboctave/array/module.mk
@@ -2,10 +2,7 @@
   array/module.mk
 
 ARRAY_INC = \
-  array/Array2.h \
-  array/Array3.h \
   array/Array.h \
-  array/ArrayN.h \
   array/Array-util.h \
   array/boolMatrix.h \
   array/boolNDArray.h \
@@ -42,11 +39,9 @@
   array/int64NDArray.h \
   array/int8NDArray.h \
   array/intNDArray.h \
-  array/MArray2.h \
   array/MArray-decl.h \
   array/MArray-defs.h \
   array/MArray.h \
-  array/MArrayN.h \
   array/Matrix.h \
   array/MatrixType.h \
   array/MDiagArray2.h \
@@ -139,5 +134,7 @@
 array_libarray_la_SOURCES = $(ARRAY_SRC)
 array_libarray_la_CPPFLAGS = \
   $(liboctave_la_CPPFLAGS) \
+  $(FFTW_XCPPFLAGS) \
   $(SPARSE_XCPPFLAGS)
 
+liboctave_la_LIBADD += array/libarray.la
--- a/liboctave/array/uint16NDArray.cc
+++ b/liboctave/array/uint16NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint16NDArray.h
+++ b/liboctave/array/uint16NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint32NDArray.cc
+++ b/liboctave/array/uint32NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint32NDArray.h
+++ b/liboctave/array/uint32NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint64NDArray.cc
+++ b/liboctave/array/uint64NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint64NDArray.h
+++ b/liboctave/array/uint64NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint8NDArray.cc
+++ b/liboctave/array/uint8NDArray.cc
@@ -1,7 +1,7 @@
 // N-D Array  manipulations.
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/array/uint8NDArray.h
+++ b/liboctave/array/uint8NDArray.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/Faddeeva/module.mk
+++ b/liboctave/cruft/Faddeeva/module.mk
@@ -1,3 +1,5 @@
-EXTRA_DIST += Faddeeva/module.mk
+EXTRA_DIST += cruft/Faddeeva/module.mk
 
-libcruft_la_SOURCES += Faddeeva/Faddeeva.cc Faddeeva/Faddeeva.hh
+CRUFT_SOURCES += \
+  cruft/Faddeeva/Faddeeva.cc \
+  cruft/Faddeeva/Faddeeva.hh
deleted file mode 100644
--- a/liboctave/cruft/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for Octave's liboctave/cruft directory
-#
-# Copyright (C) 1993-2013 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-#
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-include $(top_srcdir)/build-aux/common.mk
-
-## Search local directories before those specified by the user.
-AM_CPPFLAGS = \
-  -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu
-
-EXTRA_DIST = mkf77def.in
-
-noinst_LTLIBRARIES = libcruft.la
-
-libcruft_la_SOURCES =
-
-nodist_libcruft_la_SOURCES =
-
-libcruft_la_FFLAGS = $(F77_INTEGER_8_FLAG)
-
-libcruft_la_CPPFLAGS = @CRUFT_DLL_DEFS@ $(AM_CPPFLAGS)
-
-libcruft_la_DEPENDENCIES = cruft.def
-
-octinclude_HEADERS =
-
-include amos/module.mk
-include blas-xtra/module.mk
-include daspk/module.mk
-include dasrt/module.mk
-include dassl/module.mk
-include Faddeeva/module.mk
-include fftpack/module.mk
-include lapack-xtra/module.mk
-include misc/module.mk
-include odepack/module.mk
-include ordered-qz/module.mk
-include quadpack/module.mk
-include ranlib/module.mk
-include slatec-err/module.mk
-include slatec-fn/module.mk
-
-## Special rules for files which must be built before compilation
-cruft.def: $(libcruft_la_SOURCES) mkf77def
-	chmod a+rx mkf77def
-	./mkf77def $(srcdir) $(libcruft_la_SOURCES) > $@-t
-	mv $@-t $@
-
-DISTCLEANFILES = \
-  cruft.def \
-  ranlib/ranlib.def \
-  $(nodist_libcruft_la_SOURCES)
-
--- a/liboctave/cruft/amos/module.mk
+++ b/liboctave/cruft/amos/module.mk
@@ -1,69 +1,69 @@
-EXTRA_DIST += amos/module.mk
+EXTRA_DIST += cruft/amos/module.mk
 
-libcruft_la_SOURCES += \
-  amos/cacai.f \
-  amos/cacon.f \
-  amos/cbesh.f \
-  amos/cbesi.f \
-  amos/cbesj.f \
-  amos/cbesk.f \
-  amos/cbesy.f \
-  amos/cbinu.f \
-  amos/cbuni.f \
-  amos/cbunk.f \
-  amos/cunk1.f \
-  amos/cunk2.f \
-  amos/crati.f \
-  amos/cshch.f \
-  amos/cuni1.f \
-  amos/cuoik.f \
-  amos/cairy.f \
-  amos/cbiry.f \
-  amos/ckscl.f \
-  amos/cs1s2.f \
-  amos/cuchk.f \
-  amos/cuni2.f \
-  amos/cwrsk.f \
-  amos/casyi.f \
-  amos/cbknu.f \
-  amos/cmlri.f \
-  amos/cseri.f \
-  amos/cunhj.f \
-  amos/cunik.f \
-  amos/dgamln.f \
-  amos/gamln.f \
-  amos/xzabs.f \
-  amos/xzexp.f \
-  amos/xzlog.f \
-  amos/xzsqrt.f \
-  amos/zacai.f \
-  amos/zacon.f \
-  amos/zairy.f \
-  amos/zasyi.f \
-  amos/zbesh.f \
-  amos/zbesi.f \
-  amos/zbesj.f \
-  amos/zbesk.f \
-  amos/zbesy.f \
-  amos/zbinu.f \
-  amos/zbiry.f \
-  amos/zbknu.f \
-  amos/zbuni.f \
-  amos/zbunk.f \
-  amos/zdiv.f \
-  amos/zkscl.f \
-  amos/zmlri.f \
-  amos/zmlt.f \
-  amos/zrati.f \
-  amos/zs1s2.f \
-  amos/zseri.f \
-  amos/zshch.f \
-  amos/zuchk.f \
-  amos/zunhj.f \
-  amos/zuni1.f \
-  amos/zuni2.f \
-  amos/zunik.f \
-  amos/zunk1.f \
-  amos/zunk2.f \
-  amos/zuoik.f \
-  amos/zwrsk.f
+CRUFT_SOURCES += \
+  cruft/amos/cacai.f \
+  cruft/amos/cacon.f \
+  cruft/amos/cbesh.f \
+  cruft/amos/cbesi.f \
+  cruft/amos/cbesj.f \
+  cruft/amos/cbesk.f \
+  cruft/amos/cbesy.f \
+  cruft/amos/cbinu.f \
+  cruft/amos/cbuni.f \
+  cruft/amos/cbunk.f \
+  cruft/amos/cunk1.f \
+  cruft/amos/cunk2.f \
+  cruft/amos/crati.f \
+  cruft/amos/cshch.f \
+  cruft/amos/cuni1.f \
+  cruft/amos/cuoik.f \
+  cruft/amos/cairy.f \
+  cruft/amos/cbiry.f \
+  cruft/amos/ckscl.f \
+  cruft/amos/cs1s2.f \
+  cruft/amos/cuchk.f \
+  cruft/amos/cuni2.f \
+  cruft/amos/cwrsk.f \
+  cruft/amos/casyi.f \
+  cruft/amos/cbknu.f \
+  cruft/amos/cmlri.f \
+  cruft/amos/cseri.f \
+  cruft/amos/cunhj.f \
+  cruft/amos/cunik.f \
+  cruft/amos/dgamln.f \
+  cruft/amos/gamln.f \
+  cruft/amos/xzabs.f \
+  cruft/amos/xzexp.f \
+  cruft/amos/xzlog.f \
+  cruft/amos/xzsqrt.f \
+  cruft/amos/zacai.f \
+  cruft/amos/zacon.f \
+  cruft/amos/zairy.f \
+  cruft/amos/zasyi.f \
+  cruft/amos/zbesh.f \
+  cruft/amos/zbesi.f \
+  cruft/amos/zbesj.f \
+  cruft/amos/zbesk.f \
+  cruft/amos/zbesy.f \
+  cruft/amos/zbinu.f \
+  cruft/amos/zbiry.f \
+  cruft/amos/zbknu.f \
+  cruft/amos/zbuni.f \
+  cruft/amos/zbunk.f \
+  cruft/amos/zdiv.f \
+  cruft/amos/zkscl.f \
+  cruft/amos/zmlri.f \
+  cruft/amos/zmlt.f \
+  cruft/amos/zrati.f \
+  cruft/amos/zs1s2.f \
+  cruft/amos/zseri.f \
+  cruft/amos/zshch.f \
+  cruft/amos/zuchk.f \
+  cruft/amos/zunhj.f \
+  cruft/amos/zuni1.f \
+  cruft/amos/zuni2.f \
+  cruft/amos/zunik.f \
+  cruft/amos/zunk1.f \
+  cruft/amos/zunk2.f \
+  cruft/amos/zuoik.f \
+  cruft/amos/zwrsk.f
--- a/liboctave/cruft/blas-xtra/cconv2.f
+++ b/liboctave/cruft/blas-xtra/cconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/cdotc3.f
+++ b/liboctave/cruft/blas-xtra/cdotc3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/cmatm3.f
+++ b/liboctave/cruft/blas-xtra/cmatm3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/csconv2.f
+++ b/liboctave/cruft/blas-xtra/csconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/dconv2.f
+++ b/liboctave/cruft/blas-xtra/dconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/ddot3.f
+++ b/liboctave/cruft/blas-xtra/ddot3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/dmatm3.f
+++ b/liboctave/cruft/blas-xtra/dmatm3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/module.mk
+++ b/liboctave/cruft/blas-xtra/module.mk
@@ -1,28 +1,28 @@
-EXTRA_DIST += blas-xtra/module.mk
+EXTRA_DIST += cruft/blas-xtra/module.mk
 
-libcruft_la_SOURCES += \
-  blas-xtra/ddot3.f \
-  blas-xtra/zdotc3.f \
-  blas-xtra/sdot3.f \
-  blas-xtra/cdotc3.f \
-  blas-xtra/dmatm3.f \
-  blas-xtra/zmatm3.f \
-  blas-xtra/smatm3.f \
-  blas-xtra/cmatm3.f \
-  blas-xtra/xddot.f \
-  blas-xtra/xdnrm2.f \
-  blas-xtra/xdznrm2.f \
-  blas-xtra/xzdotc.f \
-  blas-xtra/xzdotu.f \
-  blas-xtra/xsdot.f \
-  blas-xtra/xsnrm2.f \
-  blas-xtra/xscnrm2.f \
-  blas-xtra/xcdotc.f \
-  blas-xtra/xcdotu.f \
-  blas-xtra/xerbla.f \
-  blas-xtra/cconv2.f \
-  blas-xtra/csconv2.f \
-  blas-xtra/dconv2.f \
-  blas-xtra/sconv2.f \
-  blas-xtra/zconv2.f \
-  blas-xtra/zdconv2.f
+CRUFT_SOURCES += \
+  cruft/blas-xtra/ddot3.f \
+  cruft/blas-xtra/zdotc3.f \
+  cruft/blas-xtra/sdot3.f \
+  cruft/blas-xtra/cdotc3.f \
+  cruft/blas-xtra/dmatm3.f \
+  cruft/blas-xtra/zmatm3.f \
+  cruft/blas-xtra/smatm3.f \
+  cruft/blas-xtra/cmatm3.f \
+  cruft/blas-xtra/xddot.f \
+  cruft/blas-xtra/xdnrm2.f \
+  cruft/blas-xtra/xdznrm2.f \
+  cruft/blas-xtra/xzdotc.f \
+  cruft/blas-xtra/xzdotu.f \
+  cruft/blas-xtra/xsdot.f \
+  cruft/blas-xtra/xsnrm2.f \
+  cruft/blas-xtra/xscnrm2.f \
+  cruft/blas-xtra/xcdotc.f \
+  cruft/blas-xtra/xcdotu.f \
+  cruft/blas-xtra/xerbla.f \
+  cruft/blas-xtra/cconv2.f \
+  cruft/blas-xtra/csconv2.f \
+  cruft/blas-xtra/dconv2.f \
+  cruft/blas-xtra/sconv2.f \
+  cruft/blas-xtra/zconv2.f \
+  cruft/blas-xtra/zdconv2.f
--- a/liboctave/cruft/blas-xtra/sconv2.f
+++ b/liboctave/cruft/blas-xtra/sconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/sdot3.f
+++ b/liboctave/cruft/blas-xtra/sdot3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/smatm3.f
+++ b/liboctave/cruft/blas-xtra/smatm3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/zconv2.f
+++ b/liboctave/cruft/blas-xtra/zconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/zdconv2.f
+++ b/liboctave/cruft/blas-xtra/zdconv2.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/zdotc3.f
+++ b/liboctave/cruft/blas-xtra/zdotc3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/blas-xtra/zmatm3.f
+++ b/liboctave/cruft/blas-xtra/zmatm3.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2009-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2009-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/daspk/module.mk
+++ b/liboctave/cruft/daspk/module.mk
@@ -1,31 +1,31 @@
-EXTRA_DIST += daspk/module.mk
+EXTRA_DIST += cruft/daspk/module.mk
 
-libcruft_la_SOURCES += \
-  daspk/datv.f \
-  daspk/dcnst0.f \
-  daspk/dcnstr.f \
-  daspk/ddasic.f \
-  daspk/ddasid.f \
-  daspk/ddasik.f \
-  daspk/ddaspk.f \
-  daspk/ddstp.f \
-  daspk/ddwnrm.f \
-  daspk/dfnrmd.f \
-  daspk/dfnrmk.f \
-  daspk/dhels.f \
-  daspk/dheqr.f \
-  daspk/dinvwt.f \
-  daspk/dlinsd.f \
-  daspk/dlinsk.f \
-  daspk/dmatd.f \
-  daspk/dnedd.f \
-  daspk/dnedk.f \
-  daspk/dnsd.f \
-  daspk/dnsid.f \
-  daspk/dnsik.f \
-  daspk/dnsk.f \
-  daspk/dorth.f \
-  daspk/dslvd.f \
-  daspk/dslvk.f \
-  daspk/dspigm.f \
-  daspk/dyypnw.f
+CRUFT_SOURCES += \
+  cruft/daspk/datv.f \
+  cruft/daspk/dcnst0.f \
+  cruft/daspk/dcnstr.f \
+  cruft/daspk/ddasic.f \
+  cruft/daspk/ddasid.f \
+  cruft/daspk/ddasik.f \
+  cruft/daspk/ddaspk.f \
+  cruft/daspk/ddstp.f \
+  cruft/daspk/ddwnrm.f \
+  cruft/daspk/dfnrmd.f \
+  cruft/daspk/dfnrmk.f \
+  cruft/daspk/dhels.f \
+  cruft/daspk/dheqr.f \
+  cruft/daspk/dinvwt.f \
+  cruft/daspk/dlinsd.f \
+  cruft/daspk/dlinsk.f \
+  cruft/daspk/dmatd.f \
+  cruft/daspk/dnedd.f \
+  cruft/daspk/dnedk.f \
+  cruft/daspk/dnsd.f \
+  cruft/daspk/dnsid.f \
+  cruft/daspk/dnsik.f \
+  cruft/daspk/dnsk.f \
+  cruft/daspk/dorth.f \
+  cruft/daspk/dslvd.f \
+  cruft/daspk/dslvk.f \
+  cruft/daspk/dspigm.f \
+  cruft/daspk/dyypnw.f
--- a/liboctave/cruft/dasrt/module.mk
+++ b/liboctave/cruft/dasrt/module.mk
@@ -1,6 +1,6 @@
-EXTRA_DIST += dasrt/module.mk
+EXTRA_DIST += cruft/dasrt/module.mk
 
-libcruft_la_SOURCES += \
-  dasrt/ddasrt.f \
-  dasrt/drchek.f \
-  dasrt/droots.f
+CRUFT_SOURCES += \
+  cruft/dasrt/ddasrt.f \
+  cruft/dasrt/drchek.f \
+  cruft/dasrt/droots.f
--- a/liboctave/cruft/dassl/module.mk
+++ b/liboctave/cruft/dassl/module.mk
@@ -1,11 +1,11 @@
-EXTRA_DIST += dassl/module.mk
+EXTRA_DIST += cruft/dassl/module.mk
 
-libcruft_la_SOURCES += \
-  dassl/ddaini.f \
-  dassl/ddajac.f \
-  dassl/ddanrm.f \
-  dassl/ddaslv.f \
-  dassl/ddassl.f \
-  dassl/ddastp.f \
-  dassl/ddatrp.f \
-  dassl/ddawts.f
+CRUFT_SOURCES += \
+  cruft/dassl/ddaini.f \
+  cruft/dassl/ddajac.f \
+  cruft/dassl/ddanrm.f \
+  cruft/dassl/ddaslv.f \
+  cruft/dassl/ddassl.f \
+  cruft/dassl/ddastp.f \
+  cruft/dassl/ddatrp.f \
+  cruft/dassl/ddawts.f
--- a/liboctave/cruft/fftpack/module.mk
+++ b/liboctave/cruft/fftpack/module.mk
@@ -1,43 +1,43 @@
 EXTRA_DIST += \
-  fftpack/module.mk \
-  fftpack/fftpack.doc
+  cruft/fftpack/module.mk \
+  cruft/fftpack/fftpack.doc
 
 FFTPACK_SRC = \
-  fftpack/cfftb.f \
-  fftpack/cfftb1.f \
-  fftpack/cfftf.f \
-  fftpack/cfftf1.f \
-  fftpack/cffti.f \
-  fftpack/cffti1.f \
-  fftpack/passb.f \
-  fftpack/passb2.f \
-  fftpack/passb3.f \
-  fftpack/passb4.f \
-  fftpack/passb5.f \
-  fftpack/passf.f \
-  fftpack/passf2.f \
-  fftpack/passf3.f \
-  fftpack/passf4.f \
-  fftpack/passf5.f \
-  fftpack/zfftb.f \
-  fftpack/zfftb1.f \
-  fftpack/zfftf.f \
-  fftpack/zfftf1.f \
-  fftpack/zffti.f \
-  fftpack/zffti1.f \
-  fftpack/zpassb.f \
-  fftpack/zpassb2.f \
-  fftpack/zpassb3.f \
-  fftpack/zpassb4.f \
-  fftpack/zpassb5.f \
-  fftpack/zpassf.f \
-  fftpack/zpassf2.f \
-  fftpack/zpassf3.f \
-  fftpack/zpassf4.f \
-  fftpack/zpassf5.f
+  cruft/fftpack/cfftb.f \
+  cruft/fftpack/cfftb1.f \
+  cruft/fftpack/cfftf.f \
+  cruft/fftpack/cfftf1.f \
+  cruft/fftpack/cffti.f \
+  cruft/fftpack/cffti1.f \
+  cruft/fftpack/passb.f \
+  cruft/fftpack/passb2.f \
+  cruft/fftpack/passb3.f \
+  cruft/fftpack/passb4.f \
+  cruft/fftpack/passb5.f \
+  cruft/fftpack/passf.f \
+  cruft/fftpack/passf2.f \
+  cruft/fftpack/passf3.f \
+  cruft/fftpack/passf4.f \
+  cruft/fftpack/passf5.f \
+  cruft/fftpack/zfftb.f \
+  cruft/fftpack/zfftb1.f \
+  cruft/fftpack/zfftf.f \
+  cruft/fftpack/zfftf1.f \
+  cruft/fftpack/zffti.f \
+  cruft/fftpack/zffti1.f \
+  cruft/fftpack/zpassb.f \
+  cruft/fftpack/zpassb2.f \
+  cruft/fftpack/zpassb3.f \
+  cruft/fftpack/zpassb4.f \
+  cruft/fftpack/zpassb5.f \
+  cruft/fftpack/zpassf.f \
+  cruft/fftpack/zpassf2.f \
+  cruft/fftpack/zpassf3.f \
+  cruft/fftpack/zpassf4.f \
+  cruft/fftpack/zpassf5.f
 
 if AMCOND_HAVE_FFTW
   EXTRA_DIST += $(FFTPACK_SRC)
 else
-  libcruft_la_SOURCES += $(FFTPACK_SRC)
+  CRUFT_SOURCES += $(FFTPACK_SRC)
 endif
--- a/liboctave/cruft/lapack-xtra/crsf2csf.f
+++ b/liboctave/cruft/lapack-xtra/crsf2csf.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/lapack-xtra/module.mk
+++ b/liboctave/cruft/lapack-xtra/module.mk
@@ -1,12 +1,12 @@
-EXTRA_DIST += lapack-xtra/module.mk
+EXTRA_DIST += cruft/lapack-xtra/module.mk
 
-libcruft_la_SOURCES += \
-  lapack-xtra/xclange.f \
-  lapack-xtra/xdlamch.f \
-  lapack-xtra/xdlange.f \
-  lapack-xtra/xilaenv.f \
-  lapack-xtra/xslamch.f \
-  lapack-xtra/xslange.f \
-  lapack-xtra/xzlange.f \
-  lapack-xtra/zrsf2csf.f \
-  lapack-xtra/crsf2csf.f
+CRUFT_SOURCES += \
+  cruft/lapack-xtra/xclange.f \
+  cruft/lapack-xtra/xdlamch.f \
+  cruft/lapack-xtra/xdlange.f \
+  cruft/lapack-xtra/xilaenv.f \
+  cruft/lapack-xtra/xslamch.f \
+  cruft/lapack-xtra/xslange.f \
+  cruft/lapack-xtra/xzlange.f \
+  cruft/lapack-xtra/zrsf2csf.f \
+  cruft/lapack-xtra/crsf2csf.f
--- a/liboctave/cruft/lapack-xtra/zrsf2csf.f
+++ b/liboctave/cruft/lapack-xtra/zrsf2csf.f
@@ -1,4 +1,4 @@
-c Copyright (C) 2010-2013  VZLU Prague, a.s., Czech Republic
+c Copyright (C) 2010-2015  VZLU Prague, a.s., Czech Republic
 c
 c Author: Jaroslav Hajek <highegg@gmail.com>
 c
--- a/liboctave/cruft/misc/blaswrap.c
+++ b/liboctave/cruft/misc/blaswrap.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Jarno Rajahalme
+Copyright (C) 2012-2015 Jarno Rajahalme
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/cquit.c
+++ b/liboctave/cruft/misc/cquit.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/f77-extern.cc
+++ b/liboctave/cruft/misc/f77-extern.cc
@@ -1,7 +1,7 @@
 // misc-extern.cc                                     -*- C++ -*-
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/f77-fcn.c
+++ b/liboctave/cruft/misc/f77-fcn.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/f77-fcn.h
+++ b/liboctave/cruft/misc/f77-fcn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/lo-error.c
+++ b/liboctave/cruft/misc/lo-error.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/lo-error.h
+++ b/liboctave/cruft/misc/lo-error.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/module.mk
+++ b/liboctave/cruft/misc/module.mk
@@ -1,19 +1,19 @@
 EXTRA_DIST += \
-  misc/module.mk \
-  misc/d1mach-tst.for
+  cruft/misc/module.mk \
+  cruft/misc/d1mach-tst.for
 
-libcruft_la_SOURCES += \
-  misc/blaswrap.c \
-  misc/cquit.c \
-  misc/d1mach.f \
-  misc/f77-extern.cc \
-  misc/f77-fcn.c \
-  misc/i1mach.f \
-  misc/lo-error.c \
-  misc/quit.cc \
-  misc/r1mach.f
+CRUFT_SOURCES += \
+  cruft/misc/blaswrap.c \
+  cruft/misc/cquit.c \
+  cruft/misc/d1mach.f \
+  cruft/misc/f77-extern.cc \
+  cruft/misc/f77-fcn.c \
+  cruft/misc/i1mach.f \
+  cruft/misc/lo-error.c \
+  cruft/misc/quit.cc \
+  cruft/misc/r1mach.f
 
-octinclude_HEADERS += \
-  misc/f77-fcn.h \
-  misc/lo-error.h \
-  misc/quit.h
+CRUFT_INC += \
+  cruft/misc/f77-fcn.h \
+  cruft/misc/lo-error.h \
+  cruft/misc/quit.h
--- a/liboctave/cruft/misc/quit.cc
+++ b/liboctave/cruft/misc/quit.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/cruft/misc/quit.h
+++ b/liboctave/cruft/misc/quit.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,16 +23,16 @@
 #if !defined (octave_quit_h)
 #define octave_quit_h 1
 
+#include <stdio.h>
+
+#include <signal.h>
+#include <setjmp.h>
+
 #ifdef __cplusplus
 #include <new>
 extern "C" {
 #endif
 
-#include <stdio.h>
-
-#include <signal.h>
-#include <setjmp.h>
-
 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
 
 #define WIN32_LEAN_AND_MEAN
--- a/liboctave/cruft/mkf77def.in
+++ b/liboctave/cruft/mkf77def.in
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2006-2013 John W. Eaton
+# Copyright (C) 2006-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
new file mode 100644
--- /dev/null
+++ b/liboctave/cruft/module.mk
@@ -0,0 +1,51 @@
+EXTRA_DIST += cruft/mkf77def.in
+
+nodist_cruft_libcruft_la_SOURCES =
+
+cruft_libcruft_la_FFLAGS = $(F77_INTEGER_8_FLAG)
+
+cruft_libcruft_la_DEPENDENCIES = cruft/cruft.def
+
+CRUFT_INC =
+
+CRUFT_SOURCES =
+
+include cruft/amos/module.mk
+include cruft/blas-xtra/module.mk
+include cruft/daspk/module.mk
+include cruft/dasrt/module.mk
+include cruft/dassl/module.mk
+include cruft/Faddeeva/module.mk
+include cruft/fftpack/module.mk
+include cruft/lapack-xtra/module.mk
+include cruft/misc/module.mk
+include cruft/odepack/module.mk
+include cruft/ordered-qz/module.mk
+include cruft/quadpack/module.mk
+include cruft/ranlib/module.mk
+include cruft/slatec-err/module.mk
+include cruft/slatec-fn/module.mk
+
+define gen-cruft-def
+  rm -f $@-t $@ && \
+  $(SHELL) cruft/mkf77def $(srcdir) $(cruft_libcruft_la_SOURCES) > $@-t && \
+  mv $@-t $@
+endef
+
+## Special rules for files which must be built before compilation
+cruft/cruft.def: $(cruft_libcruft_la_SOURCES) cruft/mkf77def
+	$(AM_V_GEN)$(gen-cruft-def)
+
+DISTCLEANFILES += \
+  cruft/cruft.def \
+  cruft/mkf77def \
+  cruft/ranlib/ranlib.def \
+  $(nodist_cruft_libcruft_la_SOURCES)
+
+noinst_LTLIBRARIES += cruft/libcruft.la
+
+cruft_libcruft_la_SOURCES = $(CRUFT_SOURCES)
+cruft_libcruft_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS)
+
+liboctave_la_LIBADD += cruft/libcruft.la
--- a/liboctave/cruft/odepack/module.mk
+++ b/liboctave/cruft/odepack/module.mk
@@ -1,19 +1,19 @@
-EXTRA_DIST += odepack/module.mk
+EXTRA_DIST += cruft/odepack/module.mk
 
-libcruft_la_SOURCES += \
-  odepack/cfode.f \
-  odepack/dlsode.f \
-  odepack/ewset.f \
-  odepack/intdy.f \
-  odepack/prepj.f \
-  odepack/solsy.f \
-  odepack/stode.f \
-  odepack/vnorm.f \
-  odepack/scfode.f \
-  odepack/sewset.f \
-  odepack/sintdy.f \
-  odepack/slsode.f \
-  odepack/sprepj.f \
-  odepack/ssolsy.f \
-  odepack/sstode.f \
-  odepack/svnorm.f
+CRUFT_SOURCES += \
+  cruft/odepack/cfode.f \
+  cruft/odepack/dlsode.f \
+  cruft/odepack/ewset.f \
+  cruft/odepack/intdy.f \
+  cruft/odepack/prepj.f \
+  cruft/odepack/solsy.f \
+  cruft/odepack/stode.f \
+  cruft/odepack/vnorm.f \
+  cruft/odepack/scfode.f \
+  cruft/odepack/sewset.f \
+  cruft/odepack/sintdy.f \
+  cruft/odepack/slsode.f \
+  cruft/odepack/sprepj.f \
+  cruft/odepack/ssolsy.f \
+  cruft/odepack/sstode.f \
+  cruft/odepack/svnorm.f
--- a/liboctave/cruft/ordered-qz/module.mk
+++ b/liboctave/cruft/ordered-qz/module.mk
@@ -1,7 +1,7 @@
-EXTRA_DIST += ordered-qz/module.mk
+EXTRA_DIST += cruft/ordered-qz/module.mk
 
-libcruft_la_SOURCES += \
-  ordered-qz/dsubsp.f \
-  ordered-qz/exchqz.f \
-  ordered-qz/ssubsp.f \
-  ordered-qz/sexchqz.f
+CRUFT_SOURCES += \
+  cruft/ordered-qz/dsubsp.f \
+  cruft/ordered-qz/exchqz.f \
+  cruft/ordered-qz/ssubsp.f \
+  cruft/ordered-qz/sexchqz.f
--- a/liboctave/cruft/quadpack/module.mk
+++ b/liboctave/cruft/quadpack/module.mk
@@ -1,20 +1,20 @@
-EXTRA_DIST += quadpack/module.mk
+EXTRA_DIST += cruft/quadpack/module.mk
 
-libcruft_la_SOURCES += \
-  quadpack/dqagi.f \
-  quadpack/dqagie.f \
-  quadpack/dqagp.f \
-  quadpack/dqagpe.f \
-  quadpack/dqelg.f \
-  quadpack/dqk15i.f \
-  quadpack/dqk21.f \
-  quadpack/dqpsrt.f \
-  quadpack/qagie.f \
-  quadpack/qagi.f \
-  quadpack/qagpe.f \
-  quadpack/qagp.f \
-  quadpack/qelg.f \
-  quadpack/qk15i.f \
-  quadpack/qk21.f \
-  quadpack/qpsrt.f \
-  quadpack/xerror.f
+CRUFT_SOURCES += \
+  cruft/quadpack/dqagi.f \
+  cruft/quadpack/dqagie.f \
+  cruft/quadpack/dqagp.f \
+  cruft/quadpack/dqagpe.f \
+  cruft/quadpack/dqelg.f \
+  cruft/quadpack/dqk15i.f \
+  cruft/quadpack/dqk21.f \
+  cruft/quadpack/dqpsrt.f \
+  cruft/quadpack/qagie.f \
+  cruft/quadpack/qagi.f \
+  cruft/quadpack/qagpe.f \
+  cruft/quadpack/qagp.f \
+  cruft/quadpack/qelg.f \
+  cruft/quadpack/qk15i.f \
+  cruft/quadpack/qk21.f \
+  cruft/quadpack/qpsrt.f \
+  cruft/quadpack/xerror.f
--- a/liboctave/cruft/ranlib/ignpoi.f
+++ b/liboctave/cruft/ranlib/ignpoi.f
@@ -99,7 +99,7 @@
 C     JJV added this for case: mu unchanged
 C     .. Save statement ..
       SAVE s, d, l, ll, omega, c3, c2, c1, c0, c, m, p, q, p0,
-     +     a0, a1, a2, a3, a4, a5, a6, a7, fact, muprev, muold
+     +     a0, a1, a2, a3, a4, a5, a6, a7, fact, pp, muprev, muold
 C     ..
 C     JJV end addition - I am including vars in Data statements
 C     .. Data statements ..
@@ -110,6 +110,7 @@
       DATA a0,a1,a2,a3,a4,a5,a6,a7/-.5,.3333333,-.2500068,.2000118,
      +     -.1661269,.1421878,-.1384794,.1250060/
       DATA fact/1.,1.,2.,6.,24.,120.,720.,5040.,40320.,362880./
+      DATA pp/35*0.0/
 C     ..
 C     .. Executable Statements ..
 
--- a/liboctave/cruft/ranlib/module.mk
+++ b/liboctave/cruft/ranlib/module.mk
@@ -1,64 +1,67 @@
 EXTRA_DIST += \
-  ranlib/module.mk \
-  ranlib/Basegen.doc \
-  ranlib/HOWTOGET \
-  ranlib/README \
-  ranlib/randlib.chs \
-  ranlib/randlib.fdoc \
-  ranlib/tstbot.for \
-  ranlib/tstgmn.for \
-  ranlib/tstmid.for
+  cruft/ranlib/module.mk \
+  cruft/ranlib/Basegen.doc \
+  cruft/ranlib/HOWTOGET \
+  cruft/ranlib/README \
+  cruft/ranlib/randlib.chs \
+  cruft/ranlib/randlib.fdoc \
+  cruft/ranlib/tstbot.for \
+  cruft/ranlib/tstgmn.for \
+  cruft/ranlib/tstmid.for
 
 RANLIB_SRC = \
-  ranlib/advnst.f \
-  ranlib/genbet.f \
-  ranlib/genchi.f \
-  ranlib/genexp.f \
-  ranlib/genf.f \
-  ranlib/gengam.f \
-  ranlib/genmn.f \
-  ranlib/genmul.f \
-  ranlib/gennch.f \
-  ranlib/gennf.f \
-  ranlib/gennor.f \
-  ranlib/genprm.f \
-  ranlib/genunf.f \
-  ranlib/getcgn.f \
-  ranlib/getsd.f \
-  ranlib/ignbin.f \
-  ranlib/ignlgi.f \
-  ranlib/ignnbn.f \
-  ranlib/ignpoi.f \
-  ranlib/ignuin.f \
-  ranlib/initgn.f \
-  ranlib/inrgcm.f \
-  ranlib/lennob.f \
-  ranlib/mltmod.f \
-  ranlib/phrtsd.f \
-  ranlib/qrgnin.f \
-  ranlib/ranf.f \
-  ranlib/setall.f \
-  ranlib/setant.f \
-  ranlib/setgmn.f \
-  ranlib/setsd.f \
-  ranlib/sexpo.f \
-  ranlib/sgamma.f \
-  ranlib/snorm.f \
-  ranlib/wrap.f
+  cruft/ranlib/advnst.f \
+  cruft/ranlib/genbet.f \
+  cruft/ranlib/genchi.f \
+  cruft/ranlib/genexp.f \
+  cruft/ranlib/genf.f \
+  cruft/ranlib/gengam.f \
+  cruft/ranlib/genmn.f \
+  cruft/ranlib/genmul.f \
+  cruft/ranlib/gennch.f \
+  cruft/ranlib/gennf.f \
+  cruft/ranlib/gennor.f \
+  cruft/ranlib/genprm.f \
+  cruft/ranlib/genunf.f \
+  cruft/ranlib/getcgn.f \
+  cruft/ranlib/getsd.f \
+  cruft/ranlib/ignbin.f \
+  cruft/ranlib/ignlgi.f \
+  cruft/ranlib/ignnbn.f \
+  cruft/ranlib/ignpoi.f \
+  cruft/ranlib/ignuin.f \
+  cruft/ranlib/initgn.f \
+  cruft/ranlib/inrgcm.f \
+  cruft/ranlib/lennob.f \
+  cruft/ranlib/mltmod.f \
+  cruft/ranlib/phrtsd.f \
+  cruft/ranlib/qrgnin.f \
+  cruft/ranlib/ranf.f \
+  cruft/ranlib/setall.f \
+  cruft/ranlib/setant.f \
+  cruft/ranlib/setgmn.f \
+  cruft/ranlib/setsd.f \
+  cruft/ranlib/sexpo.f \
+  cruft/ranlib/sgamma.f \
+  cruft/ranlib/snorm.f \
+  cruft/ranlib/wrap.f
 
-noinst_LTLIBRARIES += ranlib/libranlib.la
+noinst_LTLIBRARIES += cruft/ranlib/libranlib.la
+
+cruft_ranlib_libranlib_la_SOURCES = $(RANLIB_SRC)
+
+cruft_ranlib_libranlib_la_DEPENDENCIES = cruft/ranlib/ranlib.def
 
-ranlib_libranlib_la_SOURCES = $(RANLIB_SRC)
-
-ranlib_libranlib_la_DEPENDENCIES = ranlib/ranlib.def
+define gen-ranlib-def
+  rm -f $@-t $@ && \
+  $(MKDIR_P) cruft/ranlib && \
+  $(SHELL) cruft/mkf77def $(srcdir) $(RANLIB_SRC) > $@-t && \
+  mv $@-t $@
+endef
 
 ## Special rules for files which must be built before compilation
 ## ranlib directory may not exist in VPATH build; create it if necessary.
-ranlib/ranlib.def: $(RANLIB_SRC) mkf77def
-	@-if ! test -d ranlib; then \
-		mkdir ranlib ; \
-	fi
-	chmod a+rx mkf77def
-	./mkf77def $(srcdir) $(RANLIB_SRC) > $@-t
-	mv $@-t $@
+cruft/ranlib/ranlib.def: $(RANLIB_SRC) cruft/mkf77def
+	$(AM_V_GEN)$(gen-ranlib-def)
 
+liboctave_la_LIBADD += cruft/ranlib/libranlib.la
--- a/liboctave/cruft/slatec-err/module.mk
+++ b/liboctave/cruft/slatec-err/module.mk
@@ -1,17 +1,17 @@
-EXTRA_DIST += slatec-err/module.mk
+EXTRA_DIST += cruft/slatec-err/module.mk
 
-libcruft_la_SOURCES += \
-  slatec-err/fdump.f \
-  slatec-err/ixsav.f \
-  slatec-err/j4save.f \
-  slatec-err/xerclr.f \
-  slatec-err/xercnt.f \
-  slatec-err/xerhlt.f \
-  slatec-err/xermsg.f \
-  slatec-err/xerprn.f \
-  slatec-err/xerrwd.f \
-  slatec-err/xersve.f \
-  slatec-err/xgetf.f \
-  slatec-err/xgetua.f \
-  slatec-err/xsetf.f \
-  slatec-err/xsetua.f
+CRUFT_SOURCES += \
+  cruft/slatec-err/fdump.f \
+  cruft/slatec-err/ixsav.f \
+  cruft/slatec-err/j4save.f \
+  cruft/slatec-err/xerclr.f \
+  cruft/slatec-err/xercnt.f \
+  cruft/slatec-err/xerhlt.f \
+  cruft/slatec-err/xermsg.f \
+  cruft/slatec-err/xerprn.f \
+  cruft/slatec-err/xerrwd.f \
+  cruft/slatec-err/xersve.f \
+  cruft/slatec-err/xgetf.f \
+  cruft/slatec-err/xgetua.f \
+  cruft/slatec-err/xsetf.f \
+  cruft/slatec-err/xsetua.f
--- a/liboctave/cruft/slatec-fn/module.mk
+++ b/liboctave/cruft/slatec-fn/module.mk
@@ -1,89 +1,88 @@
 EXTRA_DIST += \
-  slatec-fn/module.mk \
-  slatec-fn/derfc.in.f \
-  slatec-fn/erfc.in.f
+  cruft/slatec-fn/module.mk \
+  cruft/slatec-fn/derfc.in.f \
+  cruft/slatec-fn/erfc.in.f
 
-libcruft_la_SOURCES += \
-  slatec-fn/albeta.f \
-  slatec-fn/alngam.f \
-  slatec-fn/alnrel.f \
-  slatec-fn/algams.f \
-  slatec-fn/acosh.f \
-  slatec-fn/asinh.f \
-  slatec-fn/atanh.f \
-  slatec-fn/betai.f \
-  slatec-fn/csevl.f \
-  slatec-fn/d9gmit.f \
-  slatec-fn/d9lgic.f \
-  slatec-fn/d9lgit.f \
-  slatec-fn/d9lgmc.f \
-  slatec-fn/dacosh.f \
-  slatec-fn/dasinh.f \
-  slatec-fn/datanh.f \
-  slatec-fn/dbetai.f \
-  slatec-fn/dcsevl.f \
-  slatec-fn/derf.f \
-  slatec-fn/dgami.f \
-  slatec-fn/dgamit.f \
-  slatec-fn/dgamlm.f \
-  slatec-fn/dgamma.f \
-  slatec-fn/dgamr.f \
-  slatec-fn/dlbeta.f \
-  slatec-fn/dlgams.f \
-  slatec-fn/dlngam.f \
-  slatec-fn/dlnrel.f \
-  slatec-fn/dpchim.f \
-  slatec-fn/dpchst.f \
-  slatec-fn/erf.f \
-  slatec-fn/gami.f \
-  slatec-fn/gamit.f \
-  slatec-fn/gamlim.f \
-  slatec-fn/gamma.f \
-  slatec-fn/gamr.f \
-  slatec-fn/initds.f \
-  slatec-fn/inits.f \
-  slatec-fn/pchim.f \
-  slatec-fn/pchst.f \
-  slatec-fn/r9lgmc.f \
-  slatec-fn/r9lgit.f \
-  slatec-fn/r9gmit.f \
-  slatec-fn/r9lgic.f \
-  slatec-fn/xdacosh.f \
-  slatec-fn/xdasinh.f \
-  slatec-fn/xdatanh.f \
-  slatec-fn/xdbetai.f \
-  slatec-fn/xderf.f \
-  slatec-fn/xderfc.f \
-  slatec-fn/xdgami.f \
-  slatec-fn/xdgamit.f \
-  slatec-fn/xdgamma.f \
-  slatec-fn/xgmainc.f \
-  slatec-fn/xacosh.f \
-  slatec-fn/xasinh.f \
-  slatec-fn/xatanh.f \
-  slatec-fn/xerf.f \
-  slatec-fn/xerfc.f \
-  slatec-fn/xsgmainc.f \
-  slatec-fn/xgamma.f \
-  slatec-fn/xbetai.f
+CRUFT_SOURCES += \
+  cruft/slatec-fn/albeta.f \
+  cruft/slatec-fn/alngam.f \
+  cruft/slatec-fn/alnrel.f \
+  cruft/slatec-fn/algams.f \
+  cruft/slatec-fn/acosh.f \
+  cruft/slatec-fn/asinh.f \
+  cruft/slatec-fn/atanh.f \
+  cruft/slatec-fn/betai.f \
+  cruft/slatec-fn/csevl.f \
+  cruft/slatec-fn/d9gmit.f \
+  cruft/slatec-fn/d9lgic.f \
+  cruft/slatec-fn/d9lgit.f \
+  cruft/slatec-fn/d9lgmc.f \
+  cruft/slatec-fn/dacosh.f \
+  cruft/slatec-fn/dasinh.f \
+  cruft/slatec-fn/datanh.f \
+  cruft/slatec-fn/dbetai.f \
+  cruft/slatec-fn/dcsevl.f \
+  cruft/slatec-fn/derf.f \
+  cruft/slatec-fn/dgami.f \
+  cruft/slatec-fn/dgamit.f \
+  cruft/slatec-fn/dgamlm.f \
+  cruft/slatec-fn/dgamma.f \
+  cruft/slatec-fn/dgamr.f \
+  cruft/slatec-fn/dlbeta.f \
+  cruft/slatec-fn/dlgams.f \
+  cruft/slatec-fn/dlngam.f \
+  cruft/slatec-fn/dlnrel.f \
+  cruft/slatec-fn/dpchim.f \
+  cruft/slatec-fn/dpchst.f \
+  cruft/slatec-fn/erf.f \
+  cruft/slatec-fn/gami.f \
+  cruft/slatec-fn/gamit.f \
+  cruft/slatec-fn/gamlim.f \
+  cruft/slatec-fn/gamma.f \
+  cruft/slatec-fn/gamr.f \
+  cruft/slatec-fn/initds.f \
+  cruft/slatec-fn/inits.f \
+  cruft/slatec-fn/pchim.f \
+  cruft/slatec-fn/pchst.f \
+  cruft/slatec-fn/r9lgmc.f \
+  cruft/slatec-fn/r9lgit.f \
+  cruft/slatec-fn/r9gmit.f \
+  cruft/slatec-fn/r9lgic.f \
+  cruft/slatec-fn/xdacosh.f \
+  cruft/slatec-fn/xdasinh.f \
+  cruft/slatec-fn/xdatanh.f \
+  cruft/slatec-fn/xdbetai.f \
+  cruft/slatec-fn/xderf.f \
+  cruft/slatec-fn/xderfc.f \
+  cruft/slatec-fn/xdgami.f \
+  cruft/slatec-fn/xdgamit.f \
+  cruft/slatec-fn/xdgamma.f \
+  cruft/slatec-fn/xgmainc.f \
+  cruft/slatec-fn/xacosh.f \
+  cruft/slatec-fn/xasinh.f \
+  cruft/slatec-fn/xatanh.f \
+  cruft/slatec-fn/xerf.f \
+  cruft/slatec-fn/xerfc.f \
+  cruft/slatec-fn/xsgmainc.f \
+  cruft/slatec-fn/xgamma.f \
+  cruft/slatec-fn/xbetai.f
 
-nodist_libcruft_la_SOURCES += \
-  slatec-fn/derfc.f \
-  slatec-fn/erfc.f
+nodist_cruft_libcruft_la_SOURCES += \
+  cruft/slatec-fn/derfc.f \
+  cruft/slatec-fn/erfc.f
 
 ## slatec-fn directory may not exist in VPATH build; create it if necessary.
 
-slatec-fn/erfc.f: slatec-fn/erfc.in.f Makefile
-	@-if ! test -d slatec-fn; then \
-		mkdir slatec-fn ; \
-	fi
-	$(SED) -e "${F77_ISNAN_MACRO}" < $< > $@-t
-	mv $@-t $@
+define do-subst-isnan-macro
+  rm -f $@-t $@ && \
+  $(MKDIR_P) cruft/slatec-fn && \
+  $(SED) -e "${F77_ISNAN_MACRO}" < $< > $@-t && \
+  mv $@-t $@
+endef
 
-slatec-fn/derfc.f: slatec-fn/derfc.in.f Makefile
-	@-if ! test -d slatec-fn; then \
-		mkdir slatec-fn ; \
-	fi
-	$(SED) -e "${F77_ISNAN_MACRO}" < $< > $@-t
-	mv $@-t $@
+cruft/slatec-fn/erfc.f: cruft/slatec-fn/erfc.in.f Makefile
+	$(AM_V_GEN)$(do-subst-isnan-macro)
 
+cruft/slatec-fn/derfc.f: cruft/slatec-fn/derfc.in.f Makefile
+	$(AM_V_GEN)$(do-subst-isnan-macro)
+
--- a/liboctave/numeric/CmplxAEPBAL.cc
+++ b/liboctave/numeric/CmplxAEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/CmplxAEPBAL.h
+++ b/liboctave/numeric/CmplxAEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/CmplxCHOL.cc
+++ b/liboctave/numeric/CmplxCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/CmplxCHOL.h
+++ b/liboctave/numeric/CmplxCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/CmplxGEPBAL.cc
+++ b/liboctave/numeric/CmplxGEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxGEPBAL.h
+++ b/liboctave/numeric/CmplxGEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxHESS.cc
+++ b/liboctave/numeric/CmplxHESS.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxHESS.h
+++ b/liboctave/numeric/CmplxHESS.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxLU.cc
+++ b/liboctave/numeric/CmplxLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -100,7 +100,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ComplexColumnVector utmp = u, vtmp = v;
+      ComplexColumnVector utmp = u;
+      ComplexColumnVector vtmp = v;
       F77_XFCN (zlu1up, ZLU1UP, (m, n, l.fortran_vec (), m, r.fortran_vec (), k,
                                  utmp.fortran_vec (), vtmp.fortran_vec ()));
     }
@@ -124,7 +125,8 @@
     {
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ComplexColumnVector utmp = u.column (i);
+          ComplexColumnVector vtmp = v.column (i);
           F77_XFCN (zlu1up, ZLU1UP, (m, n, l.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec ()));
@@ -149,7 +151,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ComplexColumnVector utmp = u, vtmp = v;
+      ComplexColumnVector utmp = u;
+      ComplexColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (Complex, w, m);
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       F77_XFCN (zlup1up, ZLUP1UP, (m, n, l.fortran_vec (),
@@ -180,7 +183,8 @@
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ComplexColumnVector utmp = u.column (i);
+          ComplexColumnVector vtmp = v.column (i);
           F77_XFCN (zlup1up, ZLUP1UP, (m, n, l.fortran_vec (),
                                        m, r.fortran_vec (), k,
                                        ipvt.fortran_vec (),
--- a/liboctave/numeric/CmplxLU.h
+++ b/liboctave/numeric/CmplxLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxQR.cc
+++ b/liboctave/numeric/CmplxQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -137,7 +137,8 @@
 void ComplexQR::form (octave_idx_type n, ComplexMatrix& afact,
                       Complex *tau, qr_type_t qr_type)
 {
-  octave_idx_type m = afact.rows (), min_mn = std::min (m, n);
+  octave_idx_type m = afact.rows ();
+  octave_idx_type min_mn = std::min (m, n);
   octave_idx_type info;
 
   if (qr_type == qr_type_raw)
@@ -213,7 +214,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ComplexColumnVector utmp = u, vtmp = v;
+      ComplexColumnVector utmp = u;
+      ComplexColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (Complex, w, k);
       OCTAVE_LOCAL_BUFFER (double, rw, k);
       F77_XFCN (zqr1up, ZQR1UP, (m, n, k, q.fortran_vec (),
@@ -238,7 +240,8 @@
       OCTAVE_LOCAL_BUFFER (double, rw, k);
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ComplexColumnVector utmp = u.column (i);
+          ComplexColumnVector vtmp = v.column (i);
           F77_XFCN (zqr1up, ZQR1UP, (m, n, k, q.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec (),
@@ -546,7 +549,7 @@
                           octave_idx_type i, octave_idx_type j)
 {
   octave_idx_type n = a.columns ();
-  Array<octave_idx_type> p (n);
+  Array<octave_idx_type> p (dim_vector (n, 1));
   for (octave_idx_type k = 0; k < n; k++) p(k) = k;
   if (i < j)
     {
@@ -615,7 +618,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (j < 0 || j > n-1)
@@ -631,7 +633,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   Array<octave_idx_type> jsi;
@@ -678,7 +679,6 @@
   warn_qrupdate_once ();
 
   octave_idx_type m = r.rows ();
-  octave_idx_type n = r.columns ();
 
   if (! q.is_square ())
     (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -695,7 +695,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (i < 0 || i > n-1 || j < 0 || j > n-1)
--- a/liboctave/numeric/CmplxQR.h
+++ b/liboctave/numeric/CmplxQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/CmplxQRP.cc
+++ b/liboctave/numeric/CmplxQRP.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -103,7 +103,7 @@
 RowVector
 ComplexQRP::Pvec (void) const
 {
-  Array<double> pa (p.pvec ());
+  Array<double> pa (p.col_perm_vec ());
   RowVector pv (MArray<double> (pa) + 1.0);
   return pv;
 }
--- a/liboctave/numeric/CmplxQRP.h
+++ b/liboctave/numeric/CmplxQRP.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxSCHUR.cc
+++ b/liboctave/numeric/CmplxSCHUR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxSCHUR.h
+++ b/liboctave/numeric/CmplxSCHUR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxSVD.cc
+++ b/liboctave/numeric/CmplxSVD.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CmplxSVD.h
+++ b/liboctave/numeric/CmplxSVD.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CollocWt.cc
+++ b/liboctave/numeric/CollocWt.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/CollocWt.h
+++ b/liboctave/numeric/CollocWt.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DAE.h
+++ b/liboctave/numeric/DAE.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DAEFunc.h
+++ b/liboctave/numeric/DAEFunc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DAERT.h
+++ b/liboctave/numeric/DAERT.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DAERTFunc.h
+++ b/liboctave/numeric/DAERTFunc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASPK-opts.in
+++ b/liboctave/numeric/DASPK-opts.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -209,10 +209,10 @@
 A vector of the same length as the state vector.  A nonzero element
 indicates that the corresponding element of the state vector is an
 algebraic variable (i.e., its derivative does not appear explicitly
-in the equation set.
+in the equation set).
 
 This option is required by the
-@qcode{compute consistent initial condition\"} and
+@qcode{\"compute consistent initial condition\"} and
 @qcode{\"exclude algebraic variables from error test\"} options.
 
   END_DOC_ITEM
--- a/liboctave/numeric/DASPK.cc
+++ b/liboctave/numeric/DASPK.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASPK.h
+++ b/liboctave/numeric/DASPK.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASRT-opts.in
+++ b/liboctave/numeric/DASRT-opts.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/numeric/DASRT.cc
+++ b/liboctave/numeric/DASRT.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASRT.h
+++ b/liboctave/numeric/DASRT.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASSL-opts.in
+++ b/liboctave/numeric/DASSL-opts.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/numeric/DASSL.cc
+++ b/liboctave/numeric/DASSL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DASSL.h
+++ b/liboctave/numeric/DASSL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/DET.h
+++ b/liboctave/numeric/DET.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/liboctave/numeric/EIG.cc
+++ b/liboctave/numeric/EIG.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/EIG.h
+++ b/liboctave/numeric/EIG.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/LSODE-opts.in
+++ b/liboctave/numeric/LSODE-opts.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/numeric/LSODE.cc
+++ b/liboctave/numeric/LSODE.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/LSODE.h
+++ b/liboctave/numeric/LSODE.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/ODE.h
+++ b/liboctave/numeric/ODE.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/ODEFunc.h
+++ b/liboctave/numeric/ODEFunc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/ODES.cc
+++ b/liboctave/numeric/ODES.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/ODES.h
+++ b/liboctave/numeric/ODES.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/ODESFunc.h
+++ b/liboctave/numeric/ODESFunc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/Quad-opts.in
+++ b/liboctave/numeric/Quad-opts.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/numeric/Quad.cc
+++ b/liboctave/numeric/Quad.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/Quad.h
+++ b/liboctave/numeric/Quad.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/SparseCmplxCHOL.cc
+++ b/liboctave/numeric/SparseCmplxCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparseCmplxCHOL.h
+++ b/liboctave/numeric/SparseCmplxCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparseCmplxLU.cc
+++ b/liboctave/numeric/SparseCmplxLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparseCmplxLU.h
+++ b/liboctave/numeric/SparseCmplxLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparseCmplxQR.cc
+++ b/liboctave/numeric/SparseCmplxQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/numeric/SparseCmplxQR.h
+++ b/liboctave/numeric/SparseCmplxQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/numeric/SparseQR.cc
+++ b/liboctave/numeric/SparseQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/numeric/SparseQR.h
+++ b/liboctave/numeric/SparseQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/numeric/SparsedbleCHOL.cc
+++ b/liboctave/numeric/SparsedbleCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparsedbleCHOL.h
+++ b/liboctave/numeric/SparsedbleCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparsedbleLU.cc
+++ b/liboctave/numeric/SparsedbleLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/SparsedbleLU.h
+++ b/liboctave/numeric/SparsedbleLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/base-aepbal.h
+++ b/liboctave/numeric/base-aepbal.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/liboctave/numeric/base-dae.h
+++ b/liboctave/numeric/base-dae.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/base-de.h
+++ b/liboctave/numeric/base-de.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/base-lu.cc
+++ b/liboctave/numeric/base-lu.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -30,7 +30,7 @@
 template <class lu_type>
 base_lu<lu_type>::base_lu (const lu_type& l, const lu_type& u,
                            const PermMatrix& p)
-  : a_fact (u), l_fact (l), ipvt (p.pvec ())
+  : a_fact (u), l_fact (l), ipvt (p.transpose ().col_perm_vec ())
 {
   if (l.columns () != u.rows ())
     (*current_liboctave_error_handler) ("lu: dimension mismatch");
--- a/liboctave/numeric/base-lu.h
+++ b/liboctave/numeric/base-lu.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/numeric/base-min.h
+++ b/liboctave/numeric/base-min.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/base-qr.cc
+++ b/liboctave/numeric/base-qr.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -30,8 +30,10 @@
 base_qr<qr_type>::base_qr (const qr_type& q_arg, const qr_type& r_arg)
   : q (q_arg), r (r_arg)
 {
-  octave_idx_type q_nr = q.rows (), q_nc = q.columns ();
-  octave_idx_type r_nr = r.rows (), r_nc = r.columns ();
+  octave_idx_type q_nr = q.rows ();
+  octave_idx_type q_nc = q.columns ();
+  octave_idx_type r_nr = r.rows ();
+  octave_idx_type r_nc = r.columns ();
 
   if (! (q_nc == r_nr && (q_nr == q_nc || (q_nr > q_nc && r_nr == r_nc))))
     {
--- a/liboctave/numeric/base-qr.h
+++ b/liboctave/numeric/base-qr.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/liboctave/numeric/bsxfun-decl.h
+++ b/liboctave/numeric/bsxfun-decl.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -54,6 +54,6 @@
   BSXFUN_REL_DECL (lt, ARRAY, API) \
   BSXFUN_REL_DECL (le, ARRAY, API) \
   BSXFUN_REL_DECL (gt, ARRAY, API) \
-  BSXFUN_REL_DECL (ge, ARRAY, API) \
+  BSXFUN_REL_DECL (ge, ARRAY, API)
 
 #endif
--- a/liboctave/numeric/bsxfun-defs.cc
+++ b/liboctave/numeric/bsxfun-defs.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -41,14 +41,16 @@
               void (*op_vs) (size_t, R *, const X *, Y))
 {
   int nd = std::max (x.ndims (), y.ndims ());
-  dim_vector dvx = x.dims ().redim (nd), dvy = y.dims ().redim (nd);
+  dim_vector dvx = x.dims ().redim (nd);
+  dim_vector dvy = y.dims ().redim (nd);
 
   // Construct the result dimensions.
   dim_vector dvr;
   dvr.resize (nd);
   for (int i = 0; i < nd; i++)
     {
-      octave_idx_type xk = dvx(i), yk = dvy(i);
+      octave_idx_type xk = dvx(i);
+      octave_idx_type yk = dvy(i);
       if (xk == 1)
         dvr(i) = yk;
       else if (yk == 1 || xk == yk)
@@ -84,7 +86,8 @@
   else
     {
       // Determine the type of the low-level loop.
-      bool xsing = false, ysing = false;
+      bool xsing = false;
+      bool ysing = false;
       if (ldr == 1)
         {
           xsing = dvx(start) == 1;
@@ -95,7 +98,8 @@
               start++;
             }
         }
-      dim_vector cdvx = dvx.cumulative (), cdvy = dvy.cumulative ();
+      dim_vector cdvx = dvx.cumulative ();
+      dim_vector cdvy = dvy.cumulative ();
       // Nullify singleton dims to achieve a spread effect.
       for (int i = std::max (start, octave_idx_type (1)); i < nd; i++)
         {
@@ -139,7 +143,8 @@
                       void (*op_vv) (size_t, R *, const X *),
                       void (*op_vs) (size_t, R *, X))
 {
-  dim_vector dvr = r.dims (), dvx = x.dims ();
+  dim_vector dvr = r.dims ();
+  dim_vector dvx = x.dims ();
   octave_idx_type nd = r.ndims ();
   dvx.redim (nd);
 
@@ -234,7 +239,7 @@
   BSXFUN_OP_DEF_MXLOOP (mul, ARRAY, mx_inline_mul) \
   BSXFUN_OP_DEF_MXLOOP (div, ARRAY, mx_inline_div) \
   BSXFUN_OP_DEF_MXLOOP (min, ARRAY, mx_inline_xmin) \
-  BSXFUN_OP_DEF_MXLOOP (max, ARRAY, mx_inline_xmax) \
+  BSXFUN_OP_DEF_MXLOOP (max, ARRAY, mx_inline_xmax)
 
 #define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY) \
   BSXFUN_REL_DEF_MXLOOP (eq, ARRAY, mx_inline_eq) \
--- a/liboctave/numeric/bsxfun.h
+++ b/liboctave/numeric/bsxfun.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Jordi Gutiérrez Hermoso
+Copyright (C) 2012-2015 Jordi Gutiérrez Hermoso
 
 This file is part of Octave.
 
@@ -38,14 +38,15 @@
 {
   for (int i = 0; i < std::min (dx.length (), dy.length ()); i++)
     {
-      octave_idx_type xk = dx(i), yk = dy(i);
+      octave_idx_type xk = dx(i);
+      octave_idx_type yk = dy(i);
       // Check the three conditions for valid bsxfun dims
-      if (! ( (xk == yk) || (xk == 1 && yk > 1) || (xk > 1 && yk == 1)))
+      if (! ((xk == yk) || (xk == 1 && yk > 1) || (xk > 1 && yk == 1)))
         return false;
     }
 
   (*current_liboctave_warning_with_id_handler)
-    ("Octave:broadcast", "%s: automatic broadcasting operation applied",
+    ("Octave:language-extension", "performing `%s' automatic broadcasting",
      name.c_str ());
 
   return true;
@@ -59,21 +60,23 @@
 is_valid_inplace_bsxfun (const std::string& name, const dim_vector& dr,
                          const dim_vector& dx)
 {
-  octave_idx_type drl = dr.length (), dxl = dx.length ();
+  octave_idx_type drl = dr.length ();
+  octave_idx_type dxl = dx.length ();
   if (drl < dxl)
     return false;
 
   for (int i = 0; i < drl; i++)
     {
-      octave_idx_type rk = dr(i), xk = dx(i);
+      octave_idx_type rk = dr(i);
+      octave_idx_type xk = dx(i);
 
       // Only two valid canditions to check; can't stretch rk
-      if (! ( (rk == xk) || (rk > 1 && xk == 1)))
+      if (! ((rk == xk) || (rk > 1 && xk == 1)))
         return false;
     }
 
   (*current_liboctave_warning_with_id_handler)
-    ("Octave:broadcast", "%s: automatic broadcasting operation applied",
+    ("Octave:language-extension", "performing `%s' automatic broadcasting",
      name.c_str ());
 
   return true;
--- a/liboctave/numeric/dbleAEPBAL.cc
+++ b/liboctave/numeric/dbleAEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/dbleAEPBAL.h
+++ b/liboctave/numeric/dbleAEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/dbleCHOL.cc
+++ b/liboctave/numeric/dbleCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/dbleCHOL.h
+++ b/liboctave/numeric/dbleCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/dbleGEPBAL.cc
+++ b/liboctave/numeric/dbleGEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleGEPBAL.h
+++ b/liboctave/numeric/dbleGEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleHESS.cc
+++ b/liboctave/numeric/dbleHESS.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleHESS.h
+++ b/liboctave/numeric/dbleHESS.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleLU.cc
+++ b/liboctave/numeric/dbleLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -99,7 +99,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ColumnVector utmp = u, vtmp = v;
+      ColumnVector utmp = u;
+      ColumnVector vtmp = v;
       F77_XFCN (dlu1up, DLU1UP, (m, n, l.fortran_vec (), m, r.fortran_vec (), k,
                                  utmp.fortran_vec (), vtmp.fortran_vec ()));
     }
@@ -123,7 +124,8 @@
     {
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ColumnVector utmp = u.column (i);
+          ColumnVector vtmp = v.column (i);
           F77_XFCN (dlu1up, DLU1UP, (m, n, l.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec ()));
@@ -147,7 +149,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ColumnVector utmp = u, vtmp = v;
+      ColumnVector utmp = u;
+      ColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (double, w, m);
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       F77_XFCN (dlup1up, DLUP1UP, (m, n, l.fortran_vec (),
@@ -178,7 +181,8 @@
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ColumnVector utmp = u.column (i);
+          ColumnVector vtmp = v.column (i);
           F77_XFCN (dlup1up, DLUP1UP, (m, n, l.fortran_vec (),
                                        m, r.fortran_vec (), k,
                                        ipvt.fortran_vec (),
--- a/liboctave/numeric/dbleLU.h
+++ b/liboctave/numeric/dbleLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleQR.cc
+++ b/liboctave/numeric/dbleQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -138,7 +138,8 @@
 void QR::form (octave_idx_type n, Matrix& afact,
                double *tau, qr_type_t qr_type)
 {
-  octave_idx_type m = afact.rows (), min_mn = std::min (m, n);
+  octave_idx_type m = afact.rows ();
+  octave_idx_type min_mn = std::min (m, n);
   octave_idx_type info;
 
   if (qr_type == qr_type_raw)
@@ -214,7 +215,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      ColumnVector utmp = u, vtmp = v;
+      ColumnVector utmp = u;
+      ColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (double, w, 2*k);
       F77_XFCN (dqr1up, DQR1UP, (m, n, k, q.fortran_vec (),
                                  m, r.fortran_vec (), k,
@@ -236,7 +238,8 @@
       OCTAVE_LOCAL_BUFFER (double, w, 2*k);
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          ColumnVector utmp = u.column (i), vtmp = v.column (i);
+          ColumnVector utmp = u.column (i);
+          ColumnVector vtmp = v.column (i);
           F77_XFCN (dqr1up, DQR1UP, (m, n, k, q.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec (),
@@ -541,7 +544,7 @@
                    octave_idx_type i, octave_idx_type j)
 {
   octave_idx_type n = a.columns ();
-  Array<octave_idx_type> p (n);
+  Array<octave_idx_type> p (dim_vector (n, 1));
   for (octave_idx_type k = 0; k < n; k++) p(k) = k;
   if (i < j)
     {
@@ -610,7 +613,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (j < 0 || j > n-1)
@@ -626,7 +628,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   Array<octave_idx_type> jsi;
@@ -671,7 +672,6 @@
 QR::delete_row (octave_idx_type j)
 {
   octave_idx_type m = r.rows ();
-  octave_idx_type n = r.columns ();
 
   if (! q.is_square ())
     (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -688,7 +688,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (i < 0 || i > n-1 || j < 0 || j > n-1)
@@ -704,11 +703,13 @@
   static bool warned = false;
   if (! warned)
     {
-      (*current_liboctave_warning_handler)
-        ("In this version of Octave, QR & Cholesky updating routines\n"
-         "simply update the matrix and recalculate factorizations.\n"
-         "To use fast algorithms, link Octave with the qrupdate library.\n"
-         "See <http://sourceforge.net/projects/qrupdate>.\n");
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:missing-dependency",
+         "In this version of Octave, QR & Cholesky updating routines "
+         "simply update the matrix and recalculate factorizations. "
+         "To use fast algorithms, link Octave with the qrupdate library. "
+         "See <http://sourceforge.net/projects/qrupdate>.");
+
       warned = true;
     }
 }
--- a/liboctave/numeric/dbleQR.h
+++ b/liboctave/numeric/dbleQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/dbleQRP.cc
+++ b/liboctave/numeric/dbleQRP.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -100,7 +100,7 @@
 RowVector
 QRP::Pvec (void) const
 {
-  Array<double> pa (p.pvec ());
+  Array<double> pa (p.col_perm_vec ());
   RowVector pv (MArray<double> (pa) + 1.0);
   return pv;
 }
--- a/liboctave/numeric/dbleQRP.h
+++ b/liboctave/numeric/dbleQRP.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleSCHUR.cc
+++ b/liboctave/numeric/dbleSCHUR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleSCHUR.h
+++ b/liboctave/numeric/dbleSCHUR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleSVD.cc
+++ b/liboctave/numeric/dbleSVD.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/dbleSVD.h
+++ b/liboctave/numeric/dbleSVD.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/eigs-base.cc
+++ b/liboctave/numeric/eigs-base.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -30,6 +30,7 @@
 #include <iostream>
 
 #include "f77-fcn.h"
+#include "oct-locbuf.h"
 #include "quit.h"
 #include "SparsedbleLU.h"
 #include "SparseCmplxLU.h"
@@ -206,6 +207,15 @@
 
 #endif
 
+static void
+warn_convergence (void)
+{
+  (*current_liboctave_warning_with_id_handler)
+    ("Octave:convergence",
+     "eigs: 'A - sigma*B' is singular, indicating sigma is exactly "
+     "an eigenvalue so convergence is not guaranteed");
+}
+
 template <class M, class SM>
 static octave_idx_type
 lusolve (const SM& L, const SM& U, M& m)
@@ -492,8 +502,8 @@
   for (octave_idx_type j = 0; j < n; j++)
     {
       double d = 0.;
-      if (U.xcidx (j+1) > U.xcidx (j) &&
-          U.xridx (U.xcidx (j+1)-1) == j)
+      if (U.xcidx (j+1) > U.xcidx (j)
+          && U.xridx (U.xcidx (j+1)-1) == j)
         d = std::abs (U.xdata (U.xcidx (j+1)-1));
 
       if (xisnan (minU) || d < minU)
@@ -507,12 +517,7 @@
   volatile double rcond_plus_one = rcond + 1.0;
 
   if (rcond_plus_one == 1.0 || xisnan (rcond))
-    {
-      (*current_liboctave_warning_handler)
-        ("eigs: 'A - sigma*B' is singular, indicating sigma is exactly");
-      (*current_liboctave_warning_handler)
-        ("       an eigenvalue. Convergence is not guaranteed");
-    }
+    warn_convergence ();
 
   return true;
 }
@@ -584,12 +589,7 @@
   volatile double rcond_plus_one = rcond + 1.0;
 
   if (rcond_plus_one == 1.0 || xisnan (rcond))
-    {
-      (*current_liboctave_warning_handler)
-        ("eigs: 'A - sigma*B' is singular, indicating sigma is exactly");
-      (*current_liboctave_warning_handler)
-        ("       an eigenvalue. Convergence is not guaranteed");
-    }
+    warn_convergence ();
 
   return true;
 }
@@ -666,8 +666,8 @@
   for (octave_idx_type j = 0; j < n; j++)
     {
       double d = 0.;
-      if (U.xcidx (j+1) > U.xcidx (j) &&
-          U.xridx (U.xcidx (j+1)-1) == j)
+      if (U.xcidx (j+1) > U.xcidx (j)
+          && U.xridx (U.xcidx (j+1)-1) == j)
         d = std::abs (U.xdata (U.xcidx (j+1)-1));
 
       if (xisnan (minU) || d < minU)
@@ -681,12 +681,7 @@
   volatile double rcond_plus_one = rcond + 1.0;
 
   if (rcond_plus_one == 1.0 || xisnan (rcond))
-    {
-      (*current_liboctave_warning_handler)
-        ("eigs: 'A - sigma*B' is singular, indicating sigma is exactly");
-      (*current_liboctave_warning_handler)
-        ("       an eigenvalue. Convergence is not guaranteed");
-    }
+    warn_convergence ();
 
   return true;
 }
@@ -758,12 +753,7 @@
   volatile double rcond_plus_one = rcond + 1.0;
 
   if (rcond_plus_one == 1.0 || xisnan (rcond))
-    {
-      (*current_liboctave_warning_handler)
-        ("eigs: 'A - sigma*B' is singular, indicating sigma is exactly");
-      (*current_liboctave_warning_handler)
-        ("       an eigenvalue. Convergence is not guaranteed");
-    }
+    warn_convergence ();
 
   return true;
 }
@@ -856,8 +846,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -867,9 +857,9 @@
         }
     }
 
-  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-      typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-      typ != "SI")
+  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+      && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+      && typ != "SI")
     {
       (*current_liboctave_error_handler)
         ("eigs: unrecognized sigma value");
@@ -1179,8 +1169,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -1475,9 +1465,9 @@
 
   if (! have_sigma)
     {
-      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-          typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-          typ != "SI")
+      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+          && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+          && typ != "SI")
         (*current_liboctave_error_handler)
           ("eigs: unrecognized sigma value");
 
@@ -1770,8 +1760,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -1781,9 +1771,9 @@
         }
     }
 
-  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-      typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-      typ != "SI")
+  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+      && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+      && typ != "SI")
     {
       (*current_liboctave_error_handler)
         ("eigs: unrecognized sigma value");
@@ -2142,8 +2132,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -2493,9 +2483,9 @@
 
   if (! have_sigma)
     {
-      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-          typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-          typ != "SI")
+      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+          && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+          && typ != "SI")
         (*current_liboctave_error_handler)
           ("eigs: unrecognized sigma value");
 
@@ -2838,8 +2828,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -2849,9 +2839,9 @@
         }
     }
 
-  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-      typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-      typ != "SI")
+  if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+      && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+      && typ != "SI")
     {
       (*current_liboctave_error_handler)
         ("eigs: unrecognized sigma value");
@@ -3162,8 +3152,8 @@
             {
               octave_idx_type bidx =
                 static_cast<octave_idx_type> (permB(i));
-              if (checked(bidx) || bidx < 0 ||
-                  bidx >= n || D_NINT (bidx) != bidx)
+              if (checked(bidx) || bidx < 0 || bidx >= n
+                  || D_NINT (bidx) != bidx)
                 {
                   (*current_liboctave_error_handler)
                     ("eigs: permB vector invalid");
@@ -3466,9 +3456,9 @@
 
   if (! have_sigma)
     {
-      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA" &&
-          typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI" &&
-          typ != "SI")
+      if (typ != "LM" && typ != "SM" && typ != "LA" && typ != "SA"
+          && typ != "BE" && typ != "LR" && typ != "SR" && typ != "LI"
+          && typ != "SI")
         (*current_liboctave_error_handler)
           ("eigs: unrecognized sigma value");
 
--- a/liboctave/numeric/fCmplxAEPBAL.cc
+++ b/liboctave/numeric/fCmplxAEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/fCmplxAEPBAL.h
+++ b/liboctave/numeric/fCmplxAEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/fCmplxCHOL.cc
+++ b/liboctave/numeric/fCmplxCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/fCmplxCHOL.h
+++ b/liboctave/numeric/fCmplxCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/fCmplxGEPBAL.cc
+++ b/liboctave/numeric/fCmplxGEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxGEPBAL.h
+++ b/liboctave/numeric/fCmplxGEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxHESS.cc
+++ b/liboctave/numeric/fCmplxHESS.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxHESS.h
+++ b/liboctave/numeric/fCmplxHESS.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxLU.cc
+++ b/liboctave/numeric/fCmplxLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -100,7 +100,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatComplexColumnVector utmp = u, vtmp = v;
+      FloatComplexColumnVector utmp = u;
+      FloatComplexColumnVector vtmp = v;
       F77_XFCN (clu1up, CLU1UP, (m, n, l.fortran_vec (), m, r.fortran_vec (), k,
                                  utmp.fortran_vec (), vtmp.fortran_vec ()));
     }
@@ -125,7 +126,8 @@
     {
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatComplexColumnVector utmp = u.column (i);
+          FloatComplexColumnVector vtmp = v.column (i);
           F77_XFCN (clu1up, CLU1UP, (m, n, l.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec ()));
@@ -150,7 +152,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatComplexColumnVector utmp = u, vtmp = v;
+      FloatComplexColumnVector utmp = u;
+      FloatComplexColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (FloatComplex, w, m);
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       F77_XFCN (clup1up, CLUP1UP, (m, n, l.fortran_vec (),
@@ -182,7 +185,8 @@
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatComplexColumnVector utmp = u.column (i);
+          FloatComplexColumnVector vtmp = v.column (i);
           F77_XFCN (clup1up, CLUP1UP, (m, n, l.fortran_vec (),
                                        m, r.fortran_vec (), k,
                                        ipvt.fortran_vec (),
--- a/liboctave/numeric/fCmplxLU.h
+++ b/liboctave/numeric/fCmplxLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxQR.cc
+++ b/liboctave/numeric/fCmplxQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -140,7 +140,8 @@
 void FloatComplexQR::form (octave_idx_type n, FloatComplexMatrix& afact,
                            FloatComplex *tau, qr_type_t qr_type)
 {
-  octave_idx_type m = afact.rows (), min_mn = std::min (m, n);
+  octave_idx_type m = afact.rows ();
+  octave_idx_type min_mn = std::min (m, n);
   octave_idx_type info;
 
   if (qr_type == qr_type_raw)
@@ -217,7 +218,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatComplexColumnVector utmp = u, vtmp = v;
+      FloatComplexColumnVector utmp = u;
+      FloatComplexColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (FloatComplex, w, k);
       OCTAVE_LOCAL_BUFFER (float, rw, k);
       F77_XFCN (cqr1up, CQR1UP, (m, n, k, q.fortran_vec (),
@@ -243,7 +245,8 @@
       OCTAVE_LOCAL_BUFFER (float, rw, k);
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatComplexColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatComplexColumnVector utmp = u.column (i);
+          FloatComplexColumnVector vtmp = v.column (i);
           F77_XFCN (cqr1up, CQR1UP, (m, n, k, q.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec (),
@@ -554,7 +557,7 @@
                                octave_idx_type i, octave_idx_type j)
 {
   octave_idx_type n = a.columns ();
-  Array<octave_idx_type> p (n);
+  Array<octave_idx_type> p (dim_vector (n, 1));
   for (octave_idx_type k = 0; k < n; k++) p(k) = k;
   if (i < j)
     {
@@ -625,7 +628,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (j < 0 || j > n-1)
@@ -641,7 +643,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   Array<octave_idx_type> jsi;
@@ -688,7 +689,6 @@
   warn_qrupdate_once ();
 
   octave_idx_type m = r.rows ();
-  octave_idx_type n = r.columns ();
 
   if (! q.is_square ())
     (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -705,7 +705,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (i < 0 || i > n-1 || j < 0 || j > n-1)
--- a/liboctave/numeric/fCmplxQR.h
+++ b/liboctave/numeric/fCmplxQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/fCmplxQRP.cc
+++ b/liboctave/numeric/fCmplxQRP.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -103,7 +103,7 @@
 FloatRowVector
 FloatComplexQRP::Pvec (void) const
 {
-  Array<float> pa (p.pvec ());
+  Array<float> pa (p.col_perm_vec ());
   FloatRowVector pv (MArray<float> (pa) + 1.0f);
   return pv;
 }
--- a/liboctave/numeric/fCmplxQRP.h
+++ b/liboctave/numeric/fCmplxQRP.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxSCHUR.cc
+++ b/liboctave/numeric/fCmplxSCHUR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxSCHUR.h
+++ b/liboctave/numeric/fCmplxSCHUR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxSVD.cc
+++ b/liboctave/numeric/fCmplxSVD.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fCmplxSVD.h
+++ b/liboctave/numeric/fCmplxSVD.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fEIG.cc
+++ b/liboctave/numeric/fEIG.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/fEIG.h
+++ b/liboctave/numeric/fEIG.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatAEPBAL.cc
+++ b/liboctave/numeric/floatAEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/floatAEPBAL.h
+++ b/liboctave/numeric/floatAEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/floatCHOL.cc
+++ b/liboctave/numeric/floatCHOL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/floatCHOL.h
+++ b/liboctave/numeric/floatCHOL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/floatGEPBAL.cc
+++ b/liboctave/numeric/floatGEPBAL.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatGEPBAL.h
+++ b/liboctave/numeric/floatGEPBAL.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatHESS.cc
+++ b/liboctave/numeric/floatHESS.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatHESS.h
+++ b/liboctave/numeric/floatHESS.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatLU.cc
+++ b/liboctave/numeric/floatLU.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -99,7 +99,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatColumnVector utmp = u, vtmp = v;
+      FloatColumnVector utmp = u;
+      FloatColumnVector vtmp = v;
       F77_XFCN (slu1up, SLU1UP, (m, n, l.fortran_vec (),
                                  m, r.fortran_vec (), k,
                                  utmp.fortran_vec (), vtmp.fortran_vec ()));
@@ -124,7 +125,8 @@
     {
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatColumnVector utmp = u.column (i);
+          FloatColumnVector vtmp = v.column (i);
           F77_XFCN (slu1up, SLU1UP, (m, n, l.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec ()));
@@ -149,7 +151,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatColumnVector utmp = u, vtmp = v;
+      FloatColumnVector utmp = u;
+      FloatColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (float, w, m);
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       F77_XFCN (slup1up, SLUP1UP, (m, n, l.fortran_vec (),
@@ -180,7 +183,8 @@
       for (octave_idx_type i = 0; i < m; i++) ipvt(i) += 1; // increment
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatColumnVector utmp = u.column (i);
+          FloatColumnVector vtmp = v.column (i);
           F77_XFCN (slup1up, SLUP1UP, (m, n, l.fortran_vec (),
                                        m, r.fortran_vec (), k,
                                        ipvt.fortran_vec (),
--- a/liboctave/numeric/floatLU.h
+++ b/liboctave/numeric/floatLU.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatQR.cc
+++ b/liboctave/numeric/floatQR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -136,7 +136,8 @@
 void FloatQR::form (octave_idx_type n, FloatMatrix& afact,
                     float *tau, qr_type_t qr_type)
 {
-  octave_idx_type m = afact.rows (), min_mn = std::min (m, n);
+  octave_idx_type m = afact.rows ();
+  octave_idx_type min_mn = std::min (m, n);
   octave_idx_type info;
 
   if (qr_type == qr_type_raw)
@@ -212,7 +213,8 @@
 
   if (u.length () == m && v.length () == n)
     {
-      FloatColumnVector utmp = u, vtmp = v;
+      FloatColumnVector utmp = u;
+      FloatColumnVector vtmp = v;
       OCTAVE_LOCAL_BUFFER (float, w, 2*k);
       F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (),
                                  m, r.fortran_vec (), k,
@@ -234,7 +236,8 @@
       OCTAVE_LOCAL_BUFFER (float, w, 2*k);
       for (volatile octave_idx_type i = 0; i < u.cols (); i++)
         {
-          FloatColumnVector utmp = u.column (i), vtmp = v.column (i);
+          FloatColumnVector utmp = u.column (i);
+          FloatColumnVector vtmp = v.column (i);
           F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (),
                                      m, r.fortran_vec (), k,
                                      utmp.fortran_vec (), vtmp.fortran_vec (),
@@ -539,7 +542,7 @@
                         octave_idx_type i, octave_idx_type j)
 {
   octave_idx_type n = a.columns ();
-  Array<octave_idx_type> p (n);
+  Array<octave_idx_type> p (dim_vector (n, 1));
   for (octave_idx_type k = 0; k < n; k++) p(k) = k;
   if (i < j)
     {
@@ -608,7 +611,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (j < 0 || j > n-1)
@@ -624,7 +626,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   Array<octave_idx_type> jsi;
@@ -671,7 +672,6 @@
   warn_qrupdate_once ();
 
   octave_idx_type m = r.rows ();
-  octave_idx_type n = r.columns ();
 
   if (! q.is_square ())
     (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -688,7 +688,6 @@
 {
   warn_qrupdate_once ();
 
-  octave_idx_type m = q.rows ();
   octave_idx_type n = r.columns ();
 
   if (i < 0 || i > n-1 || j < 0 || j > n-1)
--- a/liboctave/numeric/floatQR.h
+++ b/liboctave/numeric/floatQR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
--- a/liboctave/numeric/floatQRP.cc
+++ b/liboctave/numeric/floatQRP.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -100,7 +100,7 @@
 FloatRowVector
 FloatQRP::Pvec (void) const
 {
-  Array<float> pa (p.pvec ());
+  Array<float> pa (p.col_perm_vec ());
   FloatRowVector pv (MArray<float> (pa) + 1.0f);
   return pv;
 }
--- a/liboctave/numeric/floatQRP.h
+++ b/liboctave/numeric/floatQRP.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatSCHUR.cc
+++ b/liboctave/numeric/floatSCHUR.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatSCHUR.h
+++ b/liboctave/numeric/floatSCHUR.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatSVD.cc
+++ b/liboctave/numeric/floatSVD.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/floatSVD.h
+++ b/liboctave/numeric/floatSVD.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/lo-mappers.cc
+++ b/liboctave/numeric/lo-mappers.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -101,7 +101,7 @@
 #if defined (M_LN2)
   static double ln2 = M_LN2;
 #else
-  static double ln2 = log (2);
+  static double ln2 = gnulib::log (2);
 #endif
 
   return std::log (x) / ln2;
@@ -116,7 +116,7 @@
 #if defined (M_LN2)
   static double ln2 = M_LN2;
 #else
-  static double ln2 = log (2);
+  static double ln2 = gnulib::log (2);
 #endif
 
   return exp (x * ln2);
@@ -169,12 +169,6 @@
   return lo_ieee_is_NA (x);
 }
 
-bool
-octave_is_NaN_or_NA (double x)
-{
-  return lo_ieee_isnan (x);
-}
-
 // (double, double) -> double mappers.
 
 // complex -> complex mappers.
@@ -184,13 +178,26 @@
 {
   static Complex i (0, 1);
 
-  return -i * (log (x + i * (sqrt (1.0 - x*x))));
+  Complex tmp;
+
+  if (imag (x) == 0.0)
+    {
+      // If the imaginary part of X is 0, then avoid generating an
+      // imaginary part of -0 for the expression 1-x*x.
+      // This effectively chooses the same phase of the branch cut as Matlab.
+      double xr = real (x);
+      tmp = Complex (1.0 - xr*xr);
+    }
+  else
+    tmp = 1.0 - x*x;
+
+  return -i * log (x + i * sqrt (tmp));
 }
 
 Complex
 acosh (const Complex& x)
 {
-  return log (x + sqrt (x*x - 1.0));
+  return log (x + sqrt (x + 1.0) * sqrt (x - 1.0));
 }
 
 Complex
@@ -198,7 +205,20 @@
 {
   static Complex i (0, 1);
 
-  return -i * log (i*x + sqrt (1.0 - x*x));
+  Complex tmp;
+
+  if (imag (x) == 0.0)
+    {
+      // If the imaginary part of X is 0, then avoid generating an
+      // imaginary part of -0 for the expression 1-x*x.
+      // This effectively chooses the same phase of the branch cut as Matlab.
+      double xr = real (x);
+      tmp = Complex (1.0 - xr*xr);
+    }
+  else
+    tmp = 1.0 - x*x;
+
+  return -i * log (i*x + sqrt (tmp));
 }
 
 Complex
@@ -386,12 +406,6 @@
   return lo_ieee_is_NA (x);
 }
 
-bool
-octave_is_NaN_or_NA (float x)
-{
-  return lo_ieee_isnan (x);
-}
-
 // (float, float) -> float mappers.
 
 // complex -> complex mappers.
@@ -401,13 +415,26 @@
 {
   static FloatComplex i (0, 1);
 
-  return -i * (log (x + i * (sqrt (static_cast<float>(1.0) - x*x))));
+  FloatComplex tmp;
+
+  if (imag (x) == 0.0f)
+    {
+      // If the imaginary part of X is 0, then avoid generating an
+      // imaginary part of -0 for the expression 1-x*x.
+      // This effectively chooses the same phase of the branch cut as Matlab.
+      float xr = real (x);
+      tmp = FloatComplex (1.0f - xr*xr);
+    }
+  else
+    tmp = 1.0f - x*x;
+
+  return -i * log (x + i * sqrt (tmp));
 }
 
 FloatComplex
 acosh (const FloatComplex& x)
 {
-  return log (x + sqrt (x*x - static_cast<float>(1.0)));
+  return log (x + sqrt (x + 1.0f) * sqrt (x - 1.0f));
 }
 
 FloatComplex
@@ -415,13 +442,26 @@
 {
   static FloatComplex i (0, 1);
 
-  return -i * log (i*x + sqrt (static_cast<float>(1.0) - x*x));
+  FloatComplex tmp;
+
+  if (imag (x) == 0.0f)
+    {
+      // If the imaginary part of X is 0, then avoid generating an
+      // imaginary part of -0 for the expression 1-x*x.
+      // This effectively chooses the same phase of the branch cut as Matlab.
+      float xr = real (x);
+      tmp = FloatComplex (1.0f - xr*xr);
+    }
+  else
+    tmp = 1.0f - x*x;
+
+  return -i * log (i*x + sqrt (tmp));
 }
 
 FloatComplex
 asinh (const FloatComplex& x)
 {
-  return log (x + sqrt (x*x + static_cast<float>(1.0)));
+  return log (x + sqrt (x*x + 1.0f));
 }
 
 FloatComplex
@@ -429,14 +469,13 @@
 {
   static FloatComplex i (0, 1);
 
-  return i * log ((i + x) / (i - x)) / static_cast<float>(2.0);
+  return i * log ((i + x) / (i - x)) / 2.0f;
 }
 
 FloatComplex
 atanh (const FloatComplex& x)
 {
-  return log ((static_cast<float>(1.0) + x) / (static_cast<float>
-              (1.0) - x)) / static_cast<float>(2.0);
+  return log ((1.0f + x) / (1.0f - x)) / 2.0f;
 }
 
 // complex -> bool mappers.
@@ -522,14 +561,16 @@
 rc_log (double x)
 {
   const double pi = 3.14159265358979323846;
-  return x < 0.0 ? Complex (log (-x), pi) : Complex (log (x));
+  return x < 0.0 ? Complex (gnulib::log (-x), pi) : Complex (gnulib::log (x));
 }
 
 FloatComplex
 rc_log (float x)
 {
   const float pi = 3.14159265358979323846f;
-  return x < 0.0f ? FloatComplex (logf (-x), pi) : FloatComplex (logf (x));
+  return (x < 0.0f
+          ? FloatComplex (gnulib::logf (-x), pi)
+          : FloatComplex (gnulib::logf (x)));
 }
 
 Complex
--- a/liboctave/numeric/lo-mappers.h
+++ b/liboctave/numeric/lo-mappers.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
@@ -72,7 +72,6 @@
 #endif
 
 extern OCTAVE_API bool octave_is_NA (double x);
-extern OCTAVE_API bool octave_is_NaN_or_NA (double x) GCC_ATTR_DEPRECATED;
 
 // Generic xmin, xmax definitions
 template <class T>
@@ -154,7 +153,6 @@
 #endif
 
 extern OCTAVE_API bool octave_is_NA (float x);
-extern OCTAVE_API bool octave_is_NaN_or_NA (float x) GCC_ATTR_DEPRECATED;
 
 inline float
 xmin (float x, float y)
--- a/liboctave/numeric/lo-specfun.cc
+++ b/liboctave/numeric/lo-specfun.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 Jaroslav Hajek
 Copyright (C) 2010 VZLU Prague
 
@@ -633,7 +633,7 @@
       retval = 2 * (s + 1) * u;
     }
   else
-    retval = log (1 + x);
+    retval = gnulib::log (1 + x);
 
   return retval;
 }
@@ -685,14 +685,14 @@
   if (ax < 0.2)
     {
       // approximation log (1+x) ~ 2*sum ((x/(2+x)).^ii ./ ii), ii = 1:2:2n+1
-      float u = x / (2 + x), t = 1, s = 0;
+      float u = x / (2 + x), t = 1.0f, s = 0;
       for (int i = 2; i < 12; i += 2)
         s += (t *= u*u) / (i+1);
 
-      retval = 2 * (s + 1) * u;
+      retval = 2 * (s + 1.0f) * u;
     }
   else
-    retval = log (1 + x);
+    retval = gnulib::logf (1.0f + x);
 
   return retval;
 }
@@ -818,7 +818,7 @@
       // zbesy can overflow as z->0, and cause troubles for generic case below
       alpha = -alpha;
       Complex tmp = zbesj (z, alpha, kode, ierr);
-      if ((static_cast <long> (alpha)) & 1)
+      if ((static_cast<long> (alpha)) & 1)
         tmp = - tmp;
       retval = bessel_return_value (tmp, ierr);
     }
@@ -888,7 +888,7 @@
       // zbesy can overflow as z->0, and cause troubles for generic case below
       alpha = -alpha;
       Complex tmp = zbesj (z, alpha, kode, ierr);
-      if ((static_cast <long> (alpha - 0.5)) & 1)
+      if ((static_cast<long> (alpha - 0.5)) & 1)
         tmp = - tmp;
       retval = bessel_return_value (tmp, ierr);
     }
@@ -1450,7 +1450,7 @@
       // zbesy can overflow as z->0, and cause troubles for generic case below
       alpha = -alpha;
       FloatComplex tmp = cbesj (z, alpha, kode, ierr);
-      if ((static_cast <long> (alpha)) & 1)
+      if ((static_cast<long> (alpha)) & 1)
         tmp = - tmp;
       retval = bessel_return_value (tmp, ierr);
     }
@@ -1515,7 +1515,7 @@
       // zbesy can overflow as z->0, and cause troubles for generic case below
       alpha = -alpha;
       FloatComplex tmp = cbesj (z, alpha, kode, ierr);
-      if ((static_cast <long> (alpha - 0.5)) & 1)
+      if ((static_cast<long> (alpha - 0.5)) & 1)
         tmp = - tmp;
       retval = bessel_return_value (tmp, ierr);
     }
@@ -2130,7 +2130,7 @@
 
   if (! scaled)
     {
-      FloatComplex expz = exp (- static_cast<float> (2.0 / 3.0) * z * sqrt (z));
+      FloatComplex expz = exp (- 2.0f / 3.0f * z * sqrt (z));
 
       float rexpz = real (expz);
       float iexpz = imag (expz);
@@ -2162,8 +2162,7 @@
 
   if (! scaled)
     {
-      FloatComplex expz = exp (std::abs (real (static_cast<float> (2.0 / 3.0)
-                          * z * sqrt (z))));
+      FloatComplex expz = exp (std::abs (real (2.0f / 3.0f * z * sqrt (z))));
 
       float rexpz = real (expz);
       float iexpz = imag (expz);
@@ -2580,12 +2579,8 @@
   err = false;
 
   if (a < 0.0 || x < 0.0)
-    {
-      (*current_liboctave_error_handler)
-        ("gammainc: A and X must be non-negative");
-
-      err = true;
-    }
+    (*current_liboctave_error_handler)
+      ("gammainc: A and X must be non-negative");
   else
     F77_XFCN (xgammainc, XGAMMAINC, (a, x, retval));
 
@@ -2698,7 +2693,7 @@
 
   for (octave_idx_type i = 0; i < nel; i++)
     {
-      result (i) = gammainc (x, a(i), err);
+      result(i) = gammainc (x, a(i), err);
 
       if (err)
         goto done;
@@ -2724,7 +2719,7 @@
 
   for (octave_idx_type i = 0; i < nel; i++)
     {
-      result (i) = gammainc (x(i), a, err);
+      result(i) = gammainc (x(i), a, err);
 
       if (err)
         goto done;
@@ -2754,7 +2749,7 @@
 
       for (octave_idx_type i = 0; i < nel; i++)
         {
-          result (i) = gammainc (x(i), a(i), err);
+          result(i) = gammainc (x(i), a(i), err);
 
           if (err)
             goto done;
@@ -2785,12 +2780,8 @@
   err = false;
 
   if (a < 0.0 || x < 0.0)
-    {
-      (*current_liboctave_error_handler)
-        ("gammainc: A and X must be non-negative");
-
-      err = true;
-    }
+    (*current_liboctave_error_handler)
+      ("gammainc: A and X must be non-negative");
   else
     F77_XFCN (xsgammainc, XSGAMMAINC, (a, x, retval));
 
@@ -2903,7 +2894,7 @@
 
   for (octave_idx_type i = 0; i < nel; i++)
     {
-      result (i) = gammainc (x, a(i), err);
+      result(i) = gammainc (x, a(i), err);
 
       if (err)
         goto done;
@@ -2929,7 +2920,7 @@
 
   for (octave_idx_type i = 0; i < nel; i++)
     {
-      result (i) = gammainc (x(i), a, err);
+      result(i) = gammainc (x(i), a, err);
 
       if (err)
         goto done;
@@ -2959,7 +2950,7 @@
 
       for (octave_idx_type i = 0; i < nel; i++)
         {
-          result (i) = gammainc (x(i), a(i), err);
+          result(i) = gammainc (x(i), a(i), err);
 
           if (err)
             goto done;
@@ -2986,14 +2977,17 @@
 Complex rc_log1p (double x)
 {
   const double pi = 3.14159265358979323846;
-  return x < -1.0 ? Complex (log (-(1.0 + x)), pi) : Complex (log1p (x));
+  return (x < -1.0
+          ? Complex (gnulib::log (-(1.0 + x)), pi)
+          : Complex (log1p (x)));
 }
 
 FloatComplex rc_log1p (float x)
 {
   const float pi = 3.14159265358979323846f;
-  return x < -1.0f ? FloatComplex (logf (-(1.0f + x)), pi)
-                   : FloatComplex (log1pf (x));
+  return (x < -1.0f
+          ? FloatComplex (gnulib::logf (-(1.0f + x)), pi)
+          : FloatComplex (log1pf (x)));
 }
 
 // This algorithm is due to P. J. Acklam.
@@ -3046,7 +3040,7 @@
   else if (ax < 1.0)
     {
       // Tail region.
-      const double q = sqrt (-2*log (0.5*(1-ax)));
+      const double q = sqrt (-2*gnulib::log (0.5*(1-ax)));
       const double yn = ((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5];
       const double yd = (((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1.0;
       y = yn / yd * signum (-x);
@@ -3124,10 +3118,16 @@
   else if (x > 0.0 && x < 2.0)
     {
       // Tail region.
-      const double q = x < 1 ? sqrt (-2*log (0.5*x)) : sqrt (-2*log (0.5*(2-x)));
+      const double q = (x < 1
+                        ? sqrt (-2*gnulib::log (0.5*x))
+                        : sqrt (-2*gnulib::log (0.5*(2-x))));
+
       const double yn = ((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5];
+
       const double yd = (((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1.0;
+
       y = yn / yd;
+
       if (x < pbreak_lo)
         y = -y;
     }
@@ -3243,8 +3243,8 @@
 
       if (temp <= acu && temp <= acu * value)
         {
-          value = value * exp (pp * log (xx)
-                               + (qq - 1.0) * log (cx) - beta) / pp;
+          value = value * exp (pp * gnulib::log (xx)
+                               + (qq - 1.0) * gnulib::log (cx) - beta) / pp;
 
           if (indx)
             {
@@ -3342,7 +3342,7 @@
 
   //  Calculate the initial approximation.
 
-  r = sqrt (- log (a * a));
+  r = sqrt (- gnulib::log (a * a));
 
   ycur = r - (2.30753 + 0.27061 * r) / (1.0 + (0.99229 + 0.04481 * r) * r);
 
@@ -3363,7 +3363,7 @@
 
       if (t <= 0.0)
         {
-          value = 1.0 - exp ((log ((1.0 - a) * qq) + beta) / qq);
+          value = 1.0 - exp ((gnulib::log ((1.0 - a) * qq) + beta) / qq);
         }
       else
         {
@@ -3371,7 +3371,7 @@
 
           if (t <= 1.0)
             {
-              value = exp ((log (a * pp) + beta) / pp);
+              value = exp ((gnulib::log (a * pp) + beta) / pp);
             }
           else
             {
@@ -3413,7 +3413,8 @@
         }
 
       xin = value;
-      ycur = (ycur - a) * exp (beta + r * log (xin) + t * log (1.0 - xin));
+      ycur = (ycur - a) * exp (beta + r * gnulib::log (xin)
+                               + t * gnulib::log (1.0 - xin));
 
       if (ycur * yprev <= 0.0)
         {
@@ -3634,16 +3635,18 @@
 
   if (m < 0 || m > 1)
     {
-      (*current_liboctave_warning_handler)
-        ("ellipj: expecting 0 <= M <= 1");
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:ellipj-invalid-m", "ellipj: expecting 0 <= M <= 1");
+
       sn = cn = dn = lo_ieee_nan_value ();
+
       return;
     }
 
   double sqrt_eps = sqrt (std::numeric_limits<double>::epsilon ());
   if (m < sqrt_eps)
     {
-      // For small m, ( Abramowitz and Stegun, Section 16.13 )
+      // For small m, (Abramowitz and Stegun, Section 16.13)
       si_u = sin (u);
       co_u = cos (u);
       t = 0.25*m*(u - si_u*co_u);
@@ -3653,7 +3656,7 @@
     }
   else if ((1 - m) < sqrt_eps)
     {
-      // For m1 = (1-m) small ( Abramowitz and Stegun, Section 16.15 )
+      // For m1 = (1-m) small (Abramowitz and Stegun, Section 16.15)
       m1 = 1 - m;
       si_u = sinh (u);
       co_u = cosh (u);
@@ -3665,8 +3668,8 @@
     }
   else
     {
-      //  Arithmetic-Geometric Mean (AGM) algorithm
-      //    ( Abramowitz and Stegun, Section 16.4 )
+      // Arithmetic-Geometric Mean (AGM) algorithm
+      //   (Abramowitz and Stegun, Section 16.4)
       a[0] = 1;
       b    = sqrt (1 - m);
       c[0] = sqrt (m);
@@ -3687,12 +3690,11 @@
       phi = ii*a[Nn]*u;
       for (n = Nn; n > 0; --n)
         {
-          t = phi;
           phi = (asin ((c[n]/a[n])* sin (phi)) + phi)/2;
         }
       sn = sin (phi);
       cn = cos (phi);
-      dn = cn/cos (t - phi);
+      dn = sqrt (1 - m*sn*sn);
     }
 }
 
--- a/liboctave/numeric/lo-specfun.h
+++ b/liboctave/numeric/lo-specfun.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/numeric/module.mk
+++ b/liboctave/numeric/module.mk
@@ -169,8 +169,8 @@
 
 ## Special rules for sources which must be built before rest of compilation.
 $(OPT_INC) : %.h : %.in
-	@echo making $@ from $<
-	@$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-class-header $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-class-header $< > $@-t && \
 	mv $@-t $@
 
 $(OPT_INC) : $(top_srcdir)/build-aux/mk-opts.pl
@@ -180,8 +180,8 @@
 numeric_libnumeric_la_SOURCES = $(NUMERIC_SRC)
 numeric_libnumeric_la_CPPFLAGS = \
   $(liboctave_la_CPPFLAGS) \
-  $(ARPACK_CPPFLAGS) \
   -I$(srcdir)/cruft/Faddeeva \
   $(FFTW_XCPPFLAGS) \
   $(SPARSE_XCPPFLAGS)
 
+liboctave_la_LIBADD += numeric/libnumeric.la
--- a/liboctave/numeric/oct-convn.cc
+++ b/liboctave/numeric/oct-convn.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -116,7 +116,8 @@
     return MArray<T> ();
 
   int nd = std::max (a.ndims (), b.ndims ());
-  const dim_vector adims = a.dims ().redim (nd), bdims = b.dims ().redim (nd);
+  const dim_vector adims = a.dims ().redim (nd);
+  const dim_vector bdims = b.dims ().redim (nd);
   dim_vector cdims = dim_vector::alloc (nd);
 
   for (int i = 0; i < nd; i++)
--- a/liboctave/numeric/oct-convn.h
+++ b/liboctave/numeric/oct-convn.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 Jaroslav Hajek
+Copyright (C) 2009-2015 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/numeric/oct-fftw.cc
+++ b/liboctave/numeric/oct-fftw.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 John W. Eaton
+Copyright (C) 2001-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/oct-fftw.h
+++ b/liboctave/numeric/oct-fftw.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2001-2013 John W. Eaton
+Copyright (C) 2001-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/oct-norm.cc
+++ b/liboctave/numeric/oct-norm.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 VZLU Prague, a.s.
+Copyright (C) 2008-2015 VZLU Prague, a.s.
 
 This file is part of Octave.
 
@@ -36,6 +36,10 @@
 #include "oct-cmplx.h"
 #include "lo-error.h"
 #include "lo-ieee.h"
+#include "mx-cm-s.h"
+#include "mx-s-cm.h"
+#include "mx-fcm-fs.h"
+#include "mx-fs-fcm.h"
 #include "Array.h"
 #include "Array-util.h"
 #include "CMatrix.h"
@@ -73,20 +77,20 @@
 
   template<class U>
   void accum (U val)
-    {
-      octave_quit ();
-      R t = std::abs (val);
-      if (scl == t) // we need this to handle Infs properly
+  {
+    octave_quit ();
+    R t = std::abs (val);
+    if (scl == t) // we need this to handle Infs properly
+      sum += 1;
+    else if (scl < t)
+      {
+        sum *= std::pow (scl/t, p);
         sum += 1;
-      else if (scl < t)
-        {
-          sum *= std::pow (scl/t, p);
-          sum += 1;
-          scl = t;
-        }
-      else if (t != 0)
-        sum += std::pow (t/scl, p);
-    }
+        scl = t;
+      }
+    else if (t != 0)
+      sum += std::pow (t/scl, p);
+  }
   operator R () { return scl * std::pow (sum, 1/p); }
 };
 
@@ -101,20 +105,20 @@
 
   template<class U>
   void accum (U val)
-    {
-      octave_quit ();
-      R t = 1 / std::abs (val);
-      if (scl == t)
+  {
+    octave_quit ();
+    R t = 1 / std::abs (val);
+    if (scl == t)
+      sum += 1;
+    else if (scl < t)
+      {
+        sum *= std::pow (scl/t, p);
         sum += 1;
-      else if (scl < t)
-        {
-          sum *= std::pow (scl/t, p);
-          sum += 1;
-          scl = t;
-        }
-      else if (t != 0)
-        sum += std::pow (t/scl, p);
-    }
+        scl = t;
+      }
+    else if (t != 0)
+      sum += std::pow (t/scl, p);
+  }
   operator R () { return scl * std::pow (sum, -1/p); }
 };
 
@@ -128,25 +132,25 @@
   norm_accumulator_2 () : scl(0), sum(1) {}
 
   void accum (R val)
-    {
-      R t = std::abs (val);
-      if (scl == t)
+  {
+    R t = std::abs (val);
+    if (scl == t)
+      sum += 1;
+    else if (scl < t)
+      {
+        sum *= pow2 (scl/t);
         sum += 1;
-      else if (scl < t)
-        {
-          sum *= pow2 (scl/t);
-          sum += 1;
-          scl = t;
-        }
-      else if (t != 0)
-        sum += pow2 (t/scl);
-    }
+        scl = t;
+      }
+    else if (t != 0)
+      sum += pow2 (t/scl);
+  }
 
   void accum (std::complex<R> val)
-    {
-      accum (val.real ());
-      accum (val.imag ());
-    }
+  {
+    accum (val.real ());
+    accum (val.imag ());
+  }
 
   operator R () { return scl * std::sqrt (sum); }
 };
@@ -160,9 +164,9 @@
   norm_accumulator_1 () : sum (0) {}
   template<class U>
   void accum (U val)
-    {
-      sum += std::abs (val);
-    }
+  {
+    sum += std::abs (val);
+  }
   operator R () { return sum; }
 };
 
@@ -175,9 +179,9 @@
   norm_accumulator_inf () : max (0) {}
   template<class U>
   void accum (U val)
-    {
-      max = std::max (max, std::abs (val));
-    }
+  {
+    max = std::max (max, std::abs (val));
+  }
   operator R () { return max; }
 };
 
@@ -190,9 +194,9 @@
   norm_accumulator_minf () : min (octave_Inf) {}
   template<class U>
   void accum (U val)
-    {
-      min = std::min (min, std::abs (val));
-    }
+  {
+    min = std::min (min, std::abs (val));
+  }
   operator R () { return min; }
 };
 
@@ -205,9 +209,9 @@
   norm_accumulator_0 () : num (0) {}
   template<class U>
   void accum (U val)
-    {
-      if (val != static_cast<U> (0)) ++num;
-    }
+  {
+    if (val != static_cast<U> (0)) ++num;
+  }
   operator R () { return num; }
 };
 
@@ -327,7 +331,9 @@
   for (octave_idx_type i = 0; i < nsamp; i++)
     {
       octave_quit ();
-      R fi = i*M_PI/nsamp, lambda1 = cos (fi), mu1 = sin (fi);
+      R fi = i * static_cast<R> (M_PI) / nsamp;
+      R lambda1 = cos (fi);
+      R mu1 = sin (fi);
       R lmnr = std::pow (std::pow (std::abs (lambda1), p) +
                          std::pow (std::abs (mu1), p), 1/p);
       lambda1 /= lmnr; mu1 /= lmnr;
@@ -358,7 +364,9 @@
   for (octave_idx_type i = 0; i < nsamp; i++)
     {
       octave_quit ();
-      R fi = i*M_PI/nsamp, lambda1 = cos (fi), mu1 = sin (fi);
+      R fi = i * static_cast<R> (M_PI) / nsamp;
+      R lambda1 = cos (fi);
+      R mu1 = sin (fi);
       R lmnr = std::pow (std::pow (std::abs (lambda1), p) +
                          std::pow (std::abs (mu1), p), 1/p);
       lambda1 /= lmnr; mu1 /= lmnr;
@@ -375,7 +383,7 @@
   for (octave_idx_type i = 0; i < nsamp; i++)
     {
       octave_quit ();
-      R fi = i*M_PI/nsamp;
+      R fi = i * static_cast<R> (M_PI) / nsamp;
       lamcu = CR (cos (fi), sin (fi));
       R nrm1 = vector_norm (lama * lamcu * y + mu * col, p);
       if (nrm1 > nrm)
@@ -415,7 +423,8 @@
   // the OSE part
   VectorT y(m.rows (), 1, 0), z(m.rows (), 1);
   typedef typename VectorT::element_type RR;
-  RR lambda = 0, mu = 1;
+  RR lambda = 0;
+  RR mu = 1;
   for (octave_idx_type k = 0; k < m.columns (); k++)
     {
       octave_quit ();
--- a/liboctave/numeric/oct-norm.h
+++ b/liboctave/numeric/oct-norm.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 VZLU Prague, a.s.
+Copyright (C) 2008-2015 VZLU Prague, a.s.
 
 This file is part of Octave.
 
--- a/liboctave/numeric/oct-rand.cc
+++ b/liboctave/numeric/oct-rand.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/oct-rand.h
+++ b/liboctave/numeric/oct-rand.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/oct-spparms.cc
+++ b/liboctave/numeric/oct-spparms.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/oct-spparms.h
+++ b/liboctave/numeric/oct-spparms.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/randgamma.c
+++ b/liboctave/numeric/randgamma.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/randgamma.h
+++ b/liboctave/numeric/randgamma.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/randmtzig.c
+++ b/liboctave/numeric/randmtzig.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -249,7 +249,7 @@
         }
     }
 
-  state[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
+  state[0] = 0x80000000UL; /* MSB is 1; assuring nonzero initial array */
   left = 1;
   initf = 1;
 }
--- a/liboctave/numeric/randmtzig.h
+++ b/liboctave/numeric/randmtzig.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/randpoisson.c
+++ b/liboctave/numeric/randpoisson.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/randpoisson.h
+++ b/liboctave/numeric/randpoisson.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 John W. Eaton
+Copyright (C) 2006-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/numeric/sparse-base-chol.cc
+++ b/liboctave/numeric/sparse-base-chol.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
@@ -105,17 +105,17 @@
   if (spu == 0.)
     {
       cm->print = -1;
-      cm->print_function = 0;
+      SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
     }
   else
     {
       cm->print = static_cast<int> (spu) + 2;
-      cm->print_function =&SparseCholPrint;
+      SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint);
     }
 
   cm->error_handler = &SparseCholError;
-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
-  cm->hypotenuse = CHOLMOD_NAME(hypot);
+  SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
+  SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
 
   cm->final_asis = false;
   cm->final_super = false;
--- a/liboctave/numeric/sparse-base-chol.h
+++ b/liboctave/numeric/sparse-base-chol.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/sparse-base-lu.cc
+++ b/liboctave/numeric/sparse-base-lu.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
@@ -27,6 +27,8 @@
 
 #include "sparse-base-lu.h"
 
+#include "PermMatrix.h"
+
 template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
 lu_type
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Y (void) const
--- a/liboctave/numeric/sparse-base-lu.h
+++ b/liboctave/numeric/sparse-base-lu.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/numeric/sparse-dmsolve.cc
+++ b/liboctave/numeric/sparse-dmsolve.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2006-2013 David Bateman
+Copyright (C) 2006-2015 David Bateman
 
 This file is part of Octave.
 
@@ -43,7 +43,8 @@
                  octave_idx_type cend, octave_idx_type maxnz = -1,
                  bool lazy = false)
 {
-  octave_idx_type nr = rend - rst, nc = cend - cst;
+  octave_idx_type nr = rend - rst;
+  octave_idx_type nc = cend - cst;
   maxnz = (maxnz < 0 ? A.nnz () : maxnz);
   octave_idx_type nz;
 
--- a/liboctave/operators/Sparse-diag-op-defs.h
+++ b/liboctave/operators/Sparse-diag-op-defs.h
@@ -1,6 +1,6 @@
 /* -*- C++ -*-
 
-Copyright (C) 2009-2013 Jason Riedy, Jaroslav Hajek
+Copyright (C) 2009-2015 Jason Riedy, Jaroslav Hajek
 
 This file is part of Octave.
 
new file mode 100644
--- /dev/null
+++ b/liboctave/operators/Sparse-op-decls.h
@@ -0,0 +1,184 @@
+/*
+
+Copyright (C) 2004-2015 David Bateman
+Copyright (C) 1998-2004 Andy Adler
+Copyright (C) 2008 Jaroslav Hajek
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_Sparse_op_decls_h)
+#define octave_Sparse_op_decls_h 1
+
+class SparseBoolMatrix;
+
+#define SPARSE_BIN_OP_DECL(R, OP, X, Y, API) \
+  extern API R OP (const X&, const Y&)
+
+#define SPARSE_CMP_OP_DECL(OP, X, Y, API) \
+  extern API SparseBoolMatrix OP (const X&, const Y&)
+
+#define SPARSE_BOOL_OP_DECL(OP, X, Y, API) \
+  extern API SparseBoolMatrix OP (const X&, const Y&)
+
+// sparse matrix by scalar operations.
+
+#define SPARSE_SMS_BIN_OP_DECLS(R1, R2, M, S, API)  \
+  SPARSE_BIN_OP_DECL (R1, operator +, M, S, API); \
+  SPARSE_BIN_OP_DECL (R1, operator -, M, S, API); \
+  SPARSE_BIN_OP_DECL (R2, operator *, M, S, API); \
+  SPARSE_BIN_OP_DECL (R2, operator /, M, S, API);
+
+#define SPARSE_SMS_CMP_OP_DECLS(M, S, API) \
+  SPARSE_CMP_OP_DECL (mx_el_lt, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_le, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ge, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_gt, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M, S, API);
+
+#define SPARSE_SMS_EQNE_OP_DECLS(M, S, API) \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M, S, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M, S, API);
+
+#define SPARSE_SMS_BOOL_OP_DECLS(M, S, API) \
+  SPARSE_BOOL_OP_DECL (mx_el_and, M, S, API); \
+  SPARSE_BOOL_OP_DECL (mx_el_or,  M, S, API);
+
+#define SPARSE_SMS_OP_DECLS(R1, R2, M, S, API) \
+  SPARSE_SMS_BIN_OP_DECLS (R1, R2, M, S, API)    \
+  SPARSE_SMS_CMP_OP_DECLS (M, S, API) \
+  SPARSE_SMS_BOOL_OP_DECLS (M, S, API)
+
+// scalar by sparse matrix operations.
+
+#define SPARSE_SSM_BIN_OP_DECLS(R1, R2, S, M, API)    \
+  SPARSE_BIN_OP_DECL (R1, operator +, S, M, API); \
+  SPARSE_BIN_OP_DECL (R1, operator -, S, M, API); \
+  SPARSE_BIN_OP_DECL (R2, operator *, S, M, API); \
+  SPARSE_BIN_OP_DECL (R2, operator /, S, M, API);
+
+#define SPARSE_SSM_CMP_OP_DECLS(S, M, API) \
+  SPARSE_CMP_OP_DECL (mx_el_lt, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_le, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ge, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_gt, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_eq, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, S, M, API);
+
+#define SPARSE_SSM_EQNE_OP_DECLS(S, M, API) \
+  SPARSE_CMP_OP_DECL (mx_el_eq, S, M, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, S, M, API);
+
+#define SPARSE_SSM_BOOL_OP_DECLS(S, M, API) \
+  SPARSE_BOOL_OP_DECL (mx_el_and, S, M, API); \
+  SPARSE_BOOL_OP_DECL (mx_el_or,  S, M, API); \
+
+#define SPARSE_SSM_OP_DECLS(R1, R2, S, M, API) \
+  SPARSE_SSM_BIN_OP_DECLS (R1, R2, S, M, API)    \
+  SPARSE_SSM_CMP_OP_DECLS (S, M, API) \
+  SPARSE_SSM_BOOL_OP_DECLS (S, M, API) \
+
+// sparse matrix by sparse matrix operations.
+
+#define SPARSE_SMSM_BIN_OP_DECLS(R1, R2, M1, M2, API)   \
+  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+
+#define SPARSE_SMSM_CMP_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_SMSM_EQNE_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API) \
+  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
+  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
+
+#define SPARSE_SMSM_OP_DECLS(R1, R2, M1, M2, API) \
+  SPARSE_SMSM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
+  SPARSE_SMSM_CMP_OP_DECLS (M1, M2, API) \
+  SPARSE_SMSM_BOOL_OP_DECLS (M1, M2, API)
+
+// matrix by sparse matrix operations.
+
+#define SPARSE_MSM_BIN_OP_DECLS(R1, R2, M1, M2, API)    \
+  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+
+#define SPARSE_MSM_CMP_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_MSM_EQNE_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_MSM_BOOL_OP_DECLS(M1, M2, API) \
+  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
+  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
+
+#define SPARSE_MSM_OP_DECLS(R1, R2, M1, M2, API) \
+  SPARSE_MSM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
+  SPARSE_MSM_CMP_OP_DECLS (M1, M2, API) \
+  SPARSE_MSM_BOOL_OP_DECLS (M1, M2, API)
+
+// sparse matrix by matrix operations.
+
+#define SPARSE_SMM_BIN_OP_DECLS(R1, R2, M1, M2, API)    \
+  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
+  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+
+#define SPARSE_SMM_CMP_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_SMM_EQNE_OP_DECLS(M1, M2, API) \
+  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
+  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
+
+#define SPARSE_SMM_BOOL_OP_DECLS(M1, M2, API) \
+  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
+  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
+
+#define SPARSE_SMM_OP_DECLS(R1, R2, M1, M2, API) \
+  SPARSE_SMM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
+  SPARSE_SMM_CMP_OP_DECLS (M1, M2, API) \
+  SPARSE_SMM_BOOL_OP_DECLS (M1, M2, API)
+
+#endif
--- a/liboctave/operators/Sparse-op-defs.h
+++ b/liboctave/operators/Sparse-op-defs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 Copyright (C) 2008 Jaroslav Hajek
 
@@ -26,26 +26,10 @@
 #define octave_Sparse_op_defs_h 1
 
 #include "Array-util.h"
-#include "mx-ops.h"
 #include "oct-locbuf.h"
 #include "mx-inlines.cc"
 
-#define SPARSE_BIN_OP_DECL(R, OP, X, Y, API) \
-  extern API R OP (const X&, const Y&)
-
-#define SPARSE_CMP_OP_DECL(OP, X, Y, API) \
-  extern API SparseBoolMatrix OP (const X&, const Y&)
-
-#define SPARSE_BOOL_OP_DECL(OP, X, Y, API) \
-  extern API SparseBoolMatrix OP (const X&, const Y&)
-
-// matrix by scalar operations.
-
-#define SPARSE_SMS_BIN_OP_DECLS(R1, R2, M, S, API)  \
-  SPARSE_BIN_OP_DECL (R1, operator +, M, S, API); \
-  SPARSE_BIN_OP_DECL (R1, operator -, M, S, API); \
-  SPARSE_BIN_OP_DECL (R2, operator *, M, S, API); \
-  SPARSE_BIN_OP_DECL (R2, operator /, M, S, API);
+// sparse matrix by scalar operations.
 
 #define SPARSE_SMS_BIN_OP_1(R, F, OP, M, S)     \
   R \
@@ -90,18 +74,6 @@
   SPARSE_SMS_BIN_OP_2 (R2, operator *, *, M, S) \
   SPARSE_SMS_BIN_OP_2 (R2, operator /, /, M, S)
 
-#define SPARSE_SMS_CMP_OP_DECLS(M, S, API) \
-  SPARSE_CMP_OP_DECL (mx_el_lt, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_le, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ge, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_gt, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M, S, API);
-
-#define SPARSE_SMS_EQNE_OP_DECLS(M, S, API) \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M, S, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M, S, API);
-
 #define SPARSE_SMS_CMP_OP(F, OP, M, MZ, MC, S, SZ, SC)  \
   SparseBoolMatrix \
   F (const M& m, const S& s) \
@@ -151,10 +123,6 @@
   SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, MZ,   , S, SZ,   )        \
   SPARSE_SMS_CMP_OP (mx_el_ne, !=, M, MZ,   , S, SZ,   )
 
-#define SPARSE_SMS_BOOL_OP_DECLS(M, S, API) \
-  SPARSE_BOOL_OP_DECL (mx_el_and, M, S, API); \
-  SPARSE_BOOL_OP_DECL (mx_el_or,  M, S, API);
-
 #define SPARSE_SMS_BOOL_OP(F, OP, M, S, LHS_ZERO, RHS_ZERO) \
   SparseBoolMatrix \
   F (const M& m, const S& s) \
@@ -202,18 +170,7 @@
 #define SPARSE_SMS_BOOL_OPS(M, S, ZERO) \
   SPARSE_SMS_BOOL_OPS2(M, S, ZERO, ZERO)
 
-#define SPARSE_SMS_OP_DECLS(R1, R2, M, S, API) \
-  SPARSE_SMS_BIN_OP_DECLS (R1, R2, M, S, API)    \
-  SPARSE_SMS_CMP_OP_DECLS (M, S, API) \
-  SPARSE_SMS_BOOL_OP_DECLS (M, S, API)
-
-// scalar by matrix operations.
-
-#define SPARSE_SSM_BIN_OP_DECLS(R1, R2, S, M, API)    \
-  SPARSE_BIN_OP_DECL (R1, operator +, S, M, API); \
-  SPARSE_BIN_OP_DECL (R1, operator -, S, M, API); \
-  SPARSE_BIN_OP_DECL (R2, operator *, S, M, API); \
-  SPARSE_BIN_OP_DECL (R2, operator /, S, M, API);
+// scalar by sparse matrix operations.
 
 #define SPARSE_SSM_BIN_OP_1(R, F, OP, S, M) \
   R \
@@ -259,18 +216,6 @@
   SPARSE_SSM_BIN_OP_2 (R2, operator *, *, S, M) \
   SPARSE_SSM_BIN_OP_2 (R2, operator /, /, S, M)
 
-#define SPARSE_SSM_CMP_OP_DECLS(S, M, API) \
-  SPARSE_CMP_OP_DECL (mx_el_lt, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_le, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ge, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_gt, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_eq, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, S, M, API);
-
-#define SPARSE_SSM_EQNE_OP_DECLS(S, M, API) \
-  SPARSE_CMP_OP_DECL (mx_el_eq, S, M, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, S, M, API);
-
 #define SPARSE_SSM_CMP_OP(F, OP, S, SZ, SC, M, MZ, MC)  \
   SparseBoolMatrix \
   F (const S& s, const M& m) \
@@ -320,10 +265,6 @@
   SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, SZ,   , M, MZ,   )        \
   SPARSE_SSM_CMP_OP (mx_el_ne, !=, S, SZ,   , M, MZ,   )
 
-#define SPARSE_SSM_BOOL_OP_DECLS(S, M, API) \
-  SPARSE_BOOL_OP_DECL (mx_el_and, S, M, API); \
-  SPARSE_BOOL_OP_DECL (mx_el_or,  S, M, API); \
-
 #define SPARSE_SSM_BOOL_OP(F, OP, S, M, LHS_ZERO, RHS_ZERO) \
   SparseBoolMatrix \
   F (const S& s, const M& m) \
@@ -371,18 +312,7 @@
 #define SPARSE_SSM_BOOL_OPS(S, M, ZERO) \
   SPARSE_SSM_BOOL_OPS2(S, M, ZERO, ZERO)
 
-#define SPARSE_SSM_OP_DECLS(R1, R2, S, M, API) \
-  SPARSE_SSM_BIN_OP_DECLS (R1, R2, S, M, API)    \
-  SPARSE_SSM_CMP_OP_DECLS (S, M, API) \
-  SPARSE_SSM_BOOL_OP_DECLS (S, M, API) \
-
-// matrix by matrix operations.
-
-#define SPARSE_SMSM_BIN_OP_DECLS(R1, R2, M1, M2, API)   \
-  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+// sparse matrix by sparse matrix operations.
 
 #define SPARSE_SMSM_BIN_OP_1(R, F, OP, M1, M2)  \
   R \
@@ -456,7 +386,7 @@
             octave_idx_type  jb_max = m2.cidx (i+1); \
             bool jb_lt_max = jb < jb_max; \
             \
-            while (ja_lt_max || jb_lt_max ) \
+            while (ja_lt_max || jb_lt_max) \
               { \
                 octave_quit (); \
                 if ((! jb_lt_max) || \
@@ -468,8 +398,8 @@
                     ja++; \
                     ja_lt_max= ja < ja_max; \
                   } \
-                else if (( !ja_lt_max ) || \
-                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)) ) ) \
+                else if ((! ja_lt_max) || \
+                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)))) \
                   { \
                     r.ridx (jx) = m2.ridx (jb); \
                     r.data (jx) = 0. OP m2.data (jb); \
@@ -564,7 +494,7 @@
             octave_idx_type  jb_max = m2.cidx (i+1); \
             bool jb_lt_max = jb < jb_max; \
             \
-            while (ja_lt_max || jb_lt_max ) \
+            while (ja_lt_max || jb_lt_max) \
               { \
                 octave_quit (); \
                 if ((! jb_lt_max) || \
@@ -572,8 +502,8 @@
                   { \
                      ja++; ja_lt_max= ja < ja_max; \
                   } \
-                else if (( !ja_lt_max ) || \
-                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)) ) ) \
+                else if ((! ja_lt_max) || \
+                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)))) \
                   { \
                      jb++; jb_lt_max= jb < jb_max; \
                   } \
@@ -680,7 +610,7 @@
             octave_idx_type  jb_max = m2.cidx (i+1); \
             bool jb_lt_max = jb < jb_max; \
             \
-            while (ja_lt_max || jb_lt_max ) \
+            while (ja_lt_max || jb_lt_max) \
               { \
                 octave_quit (); \
                 if ((! jb_lt_max) || \
@@ -691,8 +621,8 @@
                     ja++; \
                     ja_lt_max= ja < ja_max; \
                   } \
-                else if (( !ja_lt_max ) || \
-                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)) ) ) \
+                else if ((! ja_lt_max) || \
+                     (jb_lt_max && (m2.ridx (jb) < m1.ridx (ja)))) \
                   { \
                     /* keep those kludges coming */ \
                     r.elem (m2.ridx (jb),i) = Complex () OP m2.data (jb);  \
@@ -724,18 +654,6 @@
   SPARSE_SMSM_BIN_OP_2 (R2, product,     *, M1, M2) \
   SPARSE_SMSM_BIN_OP_3 (R2, quotient,    /, M1, M2)
 
-#define SPARSE_SMSM_CMP_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
-#define SPARSE_SMSM_EQNE_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
 // FIXME: this macro duplicates the bodies of the template functions
 // defined in the SPARSE_SSM_CMP_OP and SPARSE_SMS_CMP_OP macros.
 
@@ -915,10 +833,6 @@
   SPARSE_SMSM_CMP_OP (mx_el_eq, ==, M1, Z1,   , M2, Z2,   ) \
   SPARSE_SMSM_CMP_OP (mx_el_ne, !=, M1, Z1,   , M2, Z2,   )
 
-#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API) \
-  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
-  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
-
 // FIXME: this macro duplicates the bodies of the template functions
 // defined in the SPARSE_SSM_BOOL_OP and SPARSE_SMS_BOOL_OP macros.
 
@@ -1057,23 +971,12 @@
 
 #define SPARSE_SMSM_BOOL_OPS2(M1, M2, LHS_ZERO, RHS_ZERO) \
   SPARSE_SMSM_BOOL_OP (mx_el_and, &&, M1, M2, LHS_ZERO, RHS_ZERO) \
-  SPARSE_SMSM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO) \
+  SPARSE_SMSM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO)
 
 #define SPARSE_SMSM_BOOL_OPS(M1, M2, ZERO) \
   SPARSE_SMSM_BOOL_OPS2(M1, M2, ZERO, ZERO)
 
-#define SPARSE_SMSM_OP_DECLS(R1, R2, M1, M2, API) \
-  SPARSE_SMSM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
-  SPARSE_SMSM_CMP_OP_DECLS (M1, M2, API) \
-  SPARSE_SMSM_BOOL_OP_DECLS (M1, M2, API)
-
-// matrix by matrix operations.
-
-#define SPARSE_MSM_BIN_OP_DECLS(R1, R2, M1, M2, API)    \
-  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+// matrix by sparse matrix operations.
 
 #define SPARSE_MSM_BIN_OP_1(R, F, OP, M1, M2)   \
   R \
@@ -1154,18 +1057,6 @@
   SPARSE_MSM_BIN_OP_2 (R2, product,     *, M1, M2) \
   SPARSE_MSM_BIN_OP_1 (R2, quotient,    /, M1, M2)
 
-#define SPARSE_MSM_CMP_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
-#define SPARSE_MSM_EQNE_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
 #define SPARSE_MSM_CMP_OP(F, OP, M1, C1, M2, C2)        \
   SparseBoolMatrix \
   F (const M1& m1, const M2& m2) \
@@ -1184,7 +1075,7 @@
       { \
         if (m1_nr != 0 || m1_nc != 0) \
           { \
-            /* Count num of non-zero elements */ \
+            /* Count num of nonzero elements */ \
             octave_idx_type nel = 0; \
             for (octave_idx_type j = 0; j < m1_nc; j++) \
               for (octave_idx_type i = 0; i < m1_nr; i++) \
@@ -1230,10 +1121,6 @@
   SPARSE_MSM_CMP_OP (mx_el_eq, ==, M1,   , M2,   ) \
   SPARSE_MSM_CMP_OP (mx_el_ne, !=, M1,   , M2,   )
 
-#define SPARSE_MSM_BOOL_OP_DECLS(M1, M2, API) \
-  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
-  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
-
 #define SPARSE_MSM_BOOL_OP(F, OP, M1, M2, LHS_ZERO, RHS_ZERO) \
   SparseBoolMatrix \
   F (const M1& m1, const M2& m2) \
@@ -1252,7 +1139,7 @@
       { \
         if (m1_nr != 0 || m1_nc != 0) \
           { \
-            /* Count num of non-zero elements */ \
+            /* Count num of nonzero elements */ \
             octave_idx_type nel = 0; \
             for (octave_idx_type j = 0; j < m1_nc; j++) \
               for (octave_idx_type i = 0; i < m1_nr; i++) \
@@ -1290,23 +1177,12 @@
 
 #define SPARSE_MSM_BOOL_OPS2(M1, M2, LHS_ZERO, RHS_ZERO) \
   SPARSE_MSM_BOOL_OP (mx_el_and, &&, M1, M2, LHS_ZERO, RHS_ZERO) \
-  SPARSE_MSM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO) \
+  SPARSE_MSM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO)
 
 #define SPARSE_MSM_BOOL_OPS(M1, M2, ZERO) \
   SPARSE_MSM_BOOL_OPS2(M1, M2, ZERO, ZERO)
 
-#define SPARSE_MSM_OP_DECLS(R1, R2, M1, M2, API) \
-  SPARSE_MSM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
-  SPARSE_MSM_CMP_OP_DECLS (M1, M2, API) \
-  SPARSE_MSM_BOOL_OP_DECLS (M1, M2, API)
-
-// matrix by matrix operations.
-
-#define SPARSE_SMM_BIN_OP_DECLS(R1, R2, M1, M2, API)    \
-  SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, product,    M1, M2, API); \
-  SPARSE_BIN_OP_DECL (R2, quotient,   M1, M2, API);
+// sparse matrix by matrix operations.
 
 #define SPARSE_SMM_BIN_OP_1(R, F, OP, M1, M2)   \
   R \
@@ -1394,18 +1270,6 @@
   SPARSE_SMM_BIN_OP_2 (R2, product,     *, M1, M2) \
   SPARSE_SMM_BIN_OP_2 (R2, quotient,    /, M1, M2)
 
-#define SPARSE_SMM_CMP_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_lt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_le, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ge, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_gt, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
-#define SPARSE_SMM_EQNE_OP_DECLS(M1, M2, API) \
-  SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \
-  SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API);
-
 #define SPARSE_SMM_CMP_OP(F, OP, M1, C1, M2, C2)        \
   SparseBoolMatrix \
   F (const M1& m1, const M2& m2) \
@@ -1424,7 +1288,7 @@
       { \
         if (m1_nr != 0 || m1_nc != 0) \
           { \
-            /* Count num of non-zero elements */ \
+            /* Count num of nonzero elements */ \
             octave_idx_type nel = 0; \
             for (octave_idx_type j = 0; j < m1_nc; j++) \
               for (octave_idx_type i = 0; i < m1_nr; i++) \
@@ -1470,10 +1334,6 @@
   SPARSE_SMM_CMP_OP (mx_el_eq, ==, M1,   , M2,   ) \
   SPARSE_SMM_CMP_OP (mx_el_ne, !=, M1,   , M2,   )
 
-#define SPARSE_SMM_BOOL_OP_DECLS(M1, M2, API) \
-  SPARSE_BOOL_OP_DECL (mx_el_and, M1, M2, API); \
-  SPARSE_BOOL_OP_DECL (mx_el_or,  M1, M2, API);
-
 #define SPARSE_SMM_BOOL_OP(F, OP, M1, M2, LHS_ZERO, RHS_ZERO) \
   SparseBoolMatrix \
   F (const M1& m1, const M2& m2) \
@@ -1492,7 +1352,7 @@
       { \
         if (m1_nr != 0 || m1_nc != 0) \
           { \
-            /* Count num of non-zero elements */ \
+            /* Count num of nonzero elements */ \
             octave_idx_type nel = 0; \
             for (octave_idx_type j = 0; j < m1_nc; j++) \
               for (octave_idx_type i = 0; i < m1_nr; i++) \
@@ -1530,16 +1390,11 @@
 
 #define SPARSE_SMM_BOOL_OPS2(M1, M2, LHS_ZERO, RHS_ZERO) \
   SPARSE_SMM_BOOL_OP (mx_el_and, &&, M1, M2, LHS_ZERO, RHS_ZERO) \
-  SPARSE_SMM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO) \
+  SPARSE_SMM_BOOL_OP (mx_el_or,  ||, M1, M2, LHS_ZERO, RHS_ZERO)
 
 #define SPARSE_SMM_BOOL_OPS(M1, M2, ZERO) \
   SPARSE_SMM_BOOL_OPS2(M1, M2, ZERO, ZERO)
 
-#define SPARSE_SMM_OP_DECLS(R1, R2, M1, M2, API) \
-  SPARSE_SMM_BIN_OP_DECLS (R1, R2, M1, M2, API) \
-  SPARSE_SMM_CMP_OP_DECLS (M1, M2, API) \
-  SPARSE_SMM_BOOL_OP_DECLS (M1, M2, API)
-
 // Avoid some code duplication.  Maybe we should use templates.
 
 #define SPARSE_CUMSUM(RET_TYPE, ELT_TYPE, FCN)  \
@@ -1810,7 +1665,7 @@
 // we are looping over the rows and not the columns in the inner loop.
 #define SPARSE_ANY_ALL_OP_ROW_CODE(TEST_OP, TEST_TRUE_VAL) \
   if (data (i) TEST_OP 0.0) \
-    tmp[ridx (i)] = TEST_TRUE_VAL; \
+    tmp[ridx (i)] = TEST_TRUE_VAL;
 
 #define SPARSE_ANY_ALL_OP_COL_CODE(TEST_OP, TEST_TRUE_VAL) \
   if (data (i) TEST_OP 0.0) \
@@ -1836,7 +1691,7 @@
 
 #define SPARSE_ANY_OP(DIM) SPARSE_ANY_ALL_OP (DIM, false, false, !=, true)
 
-#define SPARSE_SPARSE_MUL( RET_TYPE, RET_EL_TYPE, EL_TYPE ) \
+#define SPARSE_SPARSE_MUL(RET_TYPE, RET_EL_TYPE, EL_TYPE) \
   octave_idx_type nr = m.rows (); \
   octave_idx_type nc = m.cols (); \
   \
@@ -1930,10 +1785,10 @@
           retval.change_capacity (nel); \
           /* The optimal break-point as estimated from simulations */ \
           /* Note that Mergesort is O(nz log(nz)) while searching all */ \
-          /* values is O(nr), where nz here is non-zero per row of */ \
+          /* values is O(nr), where nz here is nonzero per row of */ \
           /* length nr. The test itself was then derived from the */ \
           /* simulation with random square matrices and the observation */ \
-          /* of the number of non-zero elements in the output matrix */ \
+          /* of the number of nonzero elements in the output matrix */ \
           /* it was found that the breakpoints were */ \
           /*   nr: 500  1000  2000  5000 10000 */ \
           /*   nz:   6    25    97   585  2202 */ \
@@ -2005,7 +1860,7 @@
         } \
     }
 
-#define SPARSE_FULL_MUL( RET_TYPE, EL_TYPE, ZERO ) \
+#define SPARSE_FULL_MUL(RET_TYPE, EL_TYPE, ZERO) \
   octave_idx_type nr = m.rows (); \
   octave_idx_type nc = m.cols (); \
   \
@@ -2040,7 +1895,7 @@
       return retval; \
     }
 
-#define SPARSE_FULL_TRANS_MUL( RET_TYPE, EL_TYPE, ZERO, CONJ_OP ) \
+#define SPARSE_FULL_TRANS_MUL(RET_TYPE, EL_TYPE, ZERO, CONJ_OP) \
   octave_idx_type nr = m.rows (); \
   octave_idx_type nc = m.cols (); \
   \
@@ -2076,7 +1931,7 @@
       return retval; \
     }
 
-#define FULL_SPARSE_MUL( RET_TYPE, EL_TYPE, ZERO ) \
+#define FULL_SPARSE_MUL(RET_TYPE, EL_TYPE, ZERO) \
   octave_idx_type nr = m.rows (); \
   octave_idx_type nc = m.cols (); \
   \
@@ -2112,7 +1967,7 @@
       return retval; \
     }
 
-#define FULL_SPARSE_MUL_TRANS( RET_TYPE, EL_TYPE, ZERO, CONJ_OP ) \
+#define FULL_SPARSE_MUL_TRANS(RET_TYPE, EL_TYPE, ZERO, CONJ_OP) \
   octave_idx_type nr = m.rows (); \
   octave_idx_type nc = m.cols (); \
   \
--- a/liboctave/operators/Sparse-perm-op-defs.h
+++ b/liboctave/operators/Sparse-perm-op-defs.h
@@ -1,6 +1,6 @@
 /* -*- C++ -*-
 
-Copyright (C) 2009-2013 Jason Riedy
+Copyright (C) 2009-2015 Jason Riedy
 
 This file is part of Octave.
 
@@ -67,17 +67,7 @@
       return SM ();
     }
 
-  if (p.is_row_perm ())
-    {
-      // Form the column permutation and then call the colpm_sm routine.
-      const octave_idx_type *prow = p.pvec ().data ();
-      OCTAVE_LOCAL_BUFFER (octave_idx_type, pcol, nr);
-      for (octave_idx_type i = 0; i < nr; ++i)
-        pcol[prow[i]] = i;
-      return octinternal_do_mul_colpm_sm (pcol, a);
-    }
-  else
-    return octinternal_do_mul_colpm_sm (p.pvec ().data (), a);
+  return octinternal_do_mul_colpm_sm (p.col_perm_vec ().data (), a);
 }
 
 template <typename SM>
@@ -163,10 +153,7 @@
       return SM ();
     }
 
-  if (p.is_row_perm ())
-    return octinternal_do_mul_sm_rowpm (a, p.pvec ().data ());
-  else
-    return octinternal_do_mul_sm_colpm (a, p.pvec ().data ());
+  return octinternal_do_mul_sm_colpm (a, p.col_perm_vec ().data ());
 }
 
 #endif // octave_Sparse_perm_op_defs_h
--- a/liboctave/operators/config-ops.sh
+++ b/liboctave/operators/config-ops.sh
@@ -81,7 +81,7 @@
   smx | all)
     case "$src_type" in
       inc | all)
-        SMX_INC=$($AWK -f $sparse_mk_ops prefix=smx list_h_files=1 $liboctave_dir/sparse-mx-ops)
+        SMX_INC=$($AWK -f $sparse_mk_ops prefix=smx list_h_files=1 $liboctave_dir/smx-ops)
         echo "SMX_OP_INC = $SMX_INC" > $liboctave_dir/smx-op-inc.mk-t
         $move_if_change $liboctave_dir/smx-op-inc.mk-t $liboctave_dir/smx-op-inc.mk
       ;;
@@ -93,7 +93,7 @@
   smx | all)
     case "$src_type" in
       src | all)
-        SMX_SRC=$($AWK -f $sparse_mk_ops prefix=smx list_cc_files=1 $liboctave_dir/sparse-mx-ops)
+        SMX_SRC=$($AWK -f $sparse_mk_ops prefix=smx list_cc_files=1 $liboctave_dir/smx-ops)
         echo "SMX_OP_SRC = $SMX_SRC" > $liboctave_dir/smx-op-src.mk-t
         $move_if_change $liboctave_dir/smx-op-src.mk-t $liboctave_dir/smx-op-src.mk
       ;;
--- a/liboctave/operators/mk-ops.awk
+++ b/liboctave/operators/mk-ops.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2013 John W. Eaton
+# Copyright (C) 2003-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/operators/module.mk
+++ b/liboctave/operators/module.mk
@@ -8,7 +8,7 @@
   operators/smx-op-inc.mk \
   operators/smx-op-src.mk \
   operators/sparse-mk-ops.awk \
-  operators/sparse-mx-ops \
+  operators/smx-ops \
   operators/vx-op-inc.mk \
   operators/vx-op-src.mk \
   operators/vx-ops
@@ -33,6 +33,7 @@
   operators/mx-op-decl.h \
   operators/mx-op-defs.h \
   operators/Sparse-diag-op-defs.h \
+  operators/Sparse-op-decls.h \
   operators/Sparse-op-defs.h \
   operators/Sparse-perm-op-defs.h
 
@@ -44,18 +45,25 @@
 
 OP_SRCDIR = $(abs_top_srcdir)/liboctave/operators
 
+define run-mx-ops
+  ( cd operators; \
+    $(AWK) -f $(OP_SRCDIR)/$(2)mk-ops.awk prefix=$(1) $(OP_SRCDIR)/$(1)-ops \
+  )
+endef
+
 ## Special rules for sources which must be built before rest of compilation.
 $(VX_OP_INC) $(VX_OP_SRC) : operators/mk-ops.awk operators/vx-ops
-	(cd operators; $(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=vx $(OP_SRCDIR)/vx-ops)
+	$(AM_V_GEN)$(call run-mx-ops,vx)
 
 $(MX_OP_INC) $(MX_OP_SRC) : operators/mk-ops.awk operators/mx-ops
-	(cd operators; $(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=mx $(OP_SRCDIR)/mx-ops)
+	$(AM_V_GEN)$(call run-mx-ops,mx)
 
-$(SMX_OP_INC) $(SMX_OP_SRC) : operators/sparse-mk-ops.awk operators/sparse-mx-ops
-	(cd operators; $(AWK) -f $(OP_SRCDIR)/sparse-mk-ops.awk prefix=smx $(OP_SRCDIR)/sparse-mx-ops)
+$(SMX_OP_INC) $(SMX_OP_SRC) : operators/sparse-mk-ops.awk operators/smx-ops
+	$(AM_V_GEN)$(call run-mx-ops,smx,sparse-)
 
 operators/mx-ops.h : operators/mk-ops.awk operators/mx-ops
-	$(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(OP_SRCDIR)/mx-ops > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(OP_SRCDIR)/mx-ops > $@-t && \
 	mv $@-t $@
 
 noinst_LTLIBRARIES += operators/liboperators.la
@@ -67,3 +75,4 @@
 
 DISTCLEANFILES += $(BUILT_LIBOPERATORS_SOURCES)
 
+liboctave_la_LIBADD += operators/liboperators.la
--- a/liboctave/operators/mx-base.h
+++ b/liboctave/operators/mx-base.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/operators/mx-defs.h
+++ b/liboctave/operators/mx-defs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/operators/mx-ext.h
+++ b/liboctave/operators/mx-ext.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1994-2013 John W. Eaton
+Copyright (C) 1994-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/operators/mx-inlines.cc
+++ b/liboctave/operators/mx-inlines.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague
 
@@ -27,6 +27,7 @@
 
 #include <cstddef>
 #include <cmath>
+#include <cstring>
 #include <memory>
 
 #include "quit.h"
@@ -365,7 +366,8 @@
                  void (*op2) (size_t, R *, const X *, Y) throw (),
                  const char *opname)
 {
-  dim_vector dx = x.dims (), dy = y.dims ();
+  dim_vector dx = x.dims ();
+  dim_vector dy = y.dims ();
   if (dx == dy)
     {
       Array<R> r (dx);
@@ -410,7 +412,8 @@
                   void (*op1) (size_t, R *, X) throw (),
                   const char *opname)
 {
-  dim_vector dr = r.dims (), dx = x.dims ();
+  dim_vector dr = r.dims ();
+  dim_vector dx = x.dims ();
   if (dr == dx)
     {
       op (r.length (), r.fortran_vec (), x.data ());
@@ -483,6 +486,14 @@
 #define OP_RED_SUMSQ(ac, el) ac += el*el
 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
 
+inline void op_dble_prod (double& ac, float el)
+{ ac *= el; }
+inline void op_dble_prod (Complex& ac, const FloatComplex& el)
+{ ac *= el; } // FIXME: guaranteed?
+template <class T>
+inline void op_dble_prod (double& ac, const octave_int<T>& el)
+{ ac *= el.double_value (); }
+
 inline void op_dble_sum (double& ac, float el)
 { ac += el; }
 inline void op_dble_sum (Complex& ac, const FloatComplex& el)
@@ -512,6 +523,7 @@
 OP_RED_FCN (mx_inline_dsum, T, PROMOTE_DOUBLE(T), op_dble_sum, 0.0)
 OP_RED_FCN (mx_inline_count, bool, T, OP_RED_SUM, 0)
 OP_RED_FCN (mx_inline_prod, T, T, OP_RED_PROD, 1)
+OP_RED_FCN (mx_inline_dprod, T, PROMOTE_DOUBLE(T), op_dble_prod, 1)
 OP_RED_FCN (mx_inline_sumsq, T, T, OP_RED_SUMSQ, 0)
 OP_RED_FCN (mx_inline_sumsq, std::complex<T>, T, OP_RED_SUMSQC, 0)
 OP_RED_FCN (mx_inline_any, T, bool, OP_RED_ANYC, false)
@@ -537,6 +549,7 @@
 OP_RED_FCN2 (mx_inline_dsum, T, PROMOTE_DOUBLE(T), op_dble_sum, 0.0)
 OP_RED_FCN2 (mx_inline_count, bool, T, OP_RED_SUM, 0)
 OP_RED_FCN2 (mx_inline_prod, T, T, OP_RED_PROD, 1)
+OP_RED_FCN2 (mx_inline_dprod, T, PROMOTE_DOUBLE(T), op_dble_prod, 0.0)
 OP_RED_FCN2 (mx_inline_sumsq, T, T, OP_RED_SUMSQ, 0)
 OP_RED_FCN2 (mx_inline_sumsq, std::complex<T>, T, OP_RED_SUMSQC, 0)
 
@@ -610,6 +623,7 @@
 OP_RED_FCNN (mx_inline_dsum, T, PROMOTE_DOUBLE(T))
 OP_RED_FCNN (mx_inline_count, bool, T)
 OP_RED_FCNN (mx_inline_prod, T, T)
+OP_RED_FCNN (mx_inline_dprod, T, PROMOTE_DOUBLE(T))
 OP_RED_FCNN (mx_inline_sumsq, T, T)
 OP_RED_FCNN (mx_inline_sumsq, std::complex<T>, T)
 OP_RED_FCNN (mx_inline_any, T, bool)
@@ -856,7 +870,8 @@
 { \
   if (! n) return; \
   T tmp = v[0]; \
-  octave_idx_type i = 1, j = 0; \
+  octave_idx_type i = 1; \
+  octave_idx_type j = 0; \
   if (xisnan (tmp)) \
     { \
       for (; i < n && xisnan (v[i]); i++) ; \
@@ -876,7 +891,8 @@
 { \
   if (! n) return; \
   T tmp = v[0]; octave_idx_type tmpi = 0; \
-  octave_idx_type i = 1, j = 0; \
+  octave_idx_type i = 1; \
+  octave_idx_type j = 0; \
   if (xisnan (tmp)) \
     { \
       for (; i < n && xisnan (v[i]); i++) ; \
@@ -923,6 +939,8 @@
             { r[i] = r0[i]; nan = true; } \
           else if (xisnan (r0[i]) || v[i] OP r0[i]) \
             r[i] = v[i]; \
+          else \
+            r[i] = r0[i]; \
         } \
       j++; v += m; r0 = r; r += m; \
     } \
@@ -960,6 +978,8 @@
             { r[i] = r0[i]; ri[i] = r0i[i]; nan = true; } \
           else if (xisnan (r0[i]) || v[i] OP r0[i]) \
             { r[i] = v[i]; ri[i] = j; }\
+          else \
+            { r[i] = r0[i]; ri[i] = r0i[i]; }\
         } \
       j++; v += m; r0 = r; r += m; r0i = ri; ri += m;  \
     } \
@@ -1330,7 +1350,9 @@
 inline void twosum_accum (T& s, T& e,
                           const T& x)
 {
-  T s1 = s + x, t = s1 - s, e1 = (s - (s1 - t)) + (x - t);
+  T s1 = s + x;
+  T t = s1 - s;
+  T e1 = (s - (s1 - t)) + (x - t);
   s = s1;
   e += e1;
 }
@@ -1339,7 +1361,8 @@
 inline T
 mx_inline_xsum (const T *v, octave_idx_type n)
 {
-  T s = 0, e = 0;
+  T s, e;
+  s = e = 0;
   for (octave_idx_type i = 0; i < n; i++)
     twosum_accum (s, e, v[i]);
 
--- a/liboctave/operators/mx-op-decl.h
+++ b/liboctave/operators/mx-op-decl.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009 VZLU Prague, a.s.
 
--- a/liboctave/operators/mx-op-defs.h
+++ b/liboctave/operators/mx-op-defs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague, a.s.
 
@@ -25,6 +25,7 @@
 #if !defined (octave_mx_op_defs_h)
 #define octave_mx_op_defs_h 1
 
+#include "lo-array-gripes.h"
 #include "mx-op-decl.h"
 #include "mx-inlines.cc"
 
@@ -599,19 +600,15 @@
 #define PMM_MULTIPLY_OP(PM, M) \
 M operator * (const PM& p, const M& x) \
 { \
-  octave_idx_type nr = x.rows (), nc = x.columns (); \
+  octave_idx_type nr = x.rows (); \
+  octave_idx_type nc = x.columns (); \
   M result; \
   if (p.columns () != nr) \
     gripe_nonconformant ("operator *", p.rows (), p.columns (), nr, nc); \
   else \
     { \
-      if (p.is_col_perm ()) \
-        { \
-          result = M (nr, nc); \
-          result.assign (p.pvec (), idx_vector::colon, x); \
-        } \
-      else \
-        result = x.index (p.pvec (), idx_vector::colon); \
+      result = M (nr, nc); \
+      result.assign (p.col_perm_vec (), idx_vector::colon, x); \
     } \
   \
   return result; \
@@ -620,20 +617,13 @@
 #define MPM_MULTIPLY_OP(M, PM) \
 M operator * (const M& x, const PM& p) \
 { \
-  octave_idx_type nr = x.rows (), nc = x.columns (); \
+  octave_idx_type nr = x.rows (); \
+  octave_idx_type nc = x.columns (); \
   M result; \
   if (p.rows () != nc) \
     gripe_nonconformant ("operator *", nr, nc, p.rows (), p.columns ()); \
   else \
-    { \
-      if (p.is_col_perm ()) \
-        result = x.index (idx_vector::colon, p.pvec ()); \
-      else \
-        { \
-          result = M (nr, nc); \
-          result.assign (idx_vector::colon, p.pvec (), x); \
-        } \
-    } \
+    result = x.index (idx_vector::colon, p.col_perm_vec ()); \
   \
   return result; \
 }
--- a/liboctave/operators/mx-ops
+++ b/liboctave/operators/mx-ops
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2013 John W. Eaton
+# Copyright (C) 2003-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -49,14 +49,14 @@
 m Matrix M dMatrix.h YES 0.0
 nda NDArray ND dNDArray.h YES 0.0
 s double S NONE NO 0.0
-fcdm FloatComplexDiagMatrix DM fCDiagMatrix.h YES static_cast<float>(0.0)
-fcm FloatComplexMatrix M fCMatrix.h YES static_cast<float>(0.0)
-fcnda FloatComplexNDArray ND fCNDArray.h YES static_cast<float>(0.0)
-fcs FloatComplex S oct-cmplx.h NO static_cast<float>(0.0)
-fdm FloatDiagMatrix DM fDiagMatrix.h YES static_cast<float>(0.0)
-fm FloatMatrix M fMatrix.h YES static_cast<float>(0.0)
-fnda FloatNDArray ND fNDArray.h YES static_cast<float>(0.0)
-fs float S NONE NO static_cast<float>(0.0)
+fcdm FloatComplexDiagMatrix DM fCDiagMatrix.h YES 0.0f
+fcm FloatComplexMatrix M fCMatrix.h YES 0.0f
+fcnda FloatComplexNDArray ND fCNDArray.h YES 0.0f
+fcs FloatComplex S oct-cmplx.h NO 0.0f
+fdm FloatDiagMatrix DM fDiagMatrix.h YES 0.0f
+fm FloatMatrix M fMatrix.h YES 0.0f
+fnda FloatNDArray ND fNDArray.h YES 0.0f
+fs float S NONE NO 0.0f
 i8 octave_int8 S oct-inttypes.h YES octave_int8::zero int8_t
 ui8 octave_uint8 S oct-inttypes.h YES octave_uint8::zero uint8_t
 i16 octave_int16 S oct-inttypes.h YES octave_int16::zero int16_t
rename from liboctave/operators/sparse-mx-ops
rename to liboctave/operators/smx-ops
--- a/liboctave/operators/sparse-mx-ops
+++ b/liboctave/operators/smx-ops
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2013 John W. Eaton
+# Copyright (C) 2004-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/operators/sparse-mk-ops.awk
+++ b/liboctave/operators/sparse-mk-ops.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2013 John W. Eaton
+# Copyright (C) 2004-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -170,6 +170,10 @@
                 printf ("#include \"%s\"\n", rhs_header) >> h_file;
             }
 
+          ## FIXME: it might be nice to only include the declarations
+          ## of the operators that are actually needed instead of
+          ## including all of them.
+          printf ("#include \"mx-ops.h\"\n") >> h_file;
           printf ("#include \"Sparse-op-defs.h\"\n") >> h_file;
 
           if (bin_ops)
--- a/liboctave/operators/vx-ops
+++ b/liboctave/operators/vx-ops
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2013 John W. Eaton
+# Copyright (C) 2003-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
--- a/liboctave/system/dir-ops.cc
+++ b/liboctave/system/dir-ops.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/dir-ops.h
+++ b/liboctave/system/dir-ops.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/file-ops.cc
+++ b/liboctave/system/file-ops.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -39,6 +39,10 @@
 #include "pathmax.h"
 #include "canonicalize.h"
 
+extern "C" {
+#include <tempname.h>
+}
+
 #include "dir-ops.h"
 #include "file-ops.h"
 #include "file-stat.h"
@@ -362,6 +366,27 @@
             : dir + dir_sep_char () + file);
 }
 
+std::string
+file_ops::native_separator_path (const std::string& path)
+{
+  std::string retval;
+
+  if (dir_sep_char () == '/')
+    retval = path;
+  else
+    {
+      size_t n = path.length ();
+      for (size_t i = 0; i < n; i++)
+        {
+          if (path[i] == '/')
+            retval += dir_sep_char();
+          else
+            retval += path[i];
+        }
+    }
+
+  return retval;
+}
 
 int
 octave_mkdir (const std::string& nm, mode_t md)
@@ -657,20 +682,36 @@
 
   std::string retval;
 
-  const char *pdir = dir.empty () ? 0 : dir.c_str ();
+  // get dir path to use for template
+  std::string templatename;
+  if (dir.empty ())
+    templatename = octave_env::get_temp_directory ();
+  else if (! file_stat (dir, false).is_dir ())
+    templatename = octave_env::get_temp_directory ();
+  else
+    templatename = dir;
 
-  const char *ppfx = pfx.empty () ? 0 : pfx.c_str ();
-
-  char *tmp = tempnam (pdir, ppfx);
+  // add dir sep char if it is not there
+  if (*templatename.rbegin () != file_ops::dir_sep_char ())
+    templatename += file_ops::dir_sep_char ();
 
-  if (tmp)
-    {
-      retval = tmp;
+  if (pfx.empty ())
+    templatename += "file";
+  else
+    templatename += pfx;
+
+  // add the required XXXXXX for the template
+  templatename += "XXXXXX";
 
-      free (tmp);
-    }
+  // create and copy template to char array for call to gen_tempname
+  char tname [templatename.length () + 1];
+
+  strcpy (tname, templatename.c_str ());
+
+  if (gen_tempname (tname, 0, 0, GT_NOCREATE) == -1)
+    msg = gnulib::strerror (errno);
   else
-    msg = gnulib::strerror (errno);
+    retval = tname;
 
   return retval;
 }
@@ -689,8 +730,6 @@
 
   std::string retval;
 
-#if defined (HAVE_CANONICALIZE_FILE_NAME)
-
   char *tmp = gnulib::canonicalize_file_name (name.c_str ());
 
   if (tmp)
@@ -699,98 +738,6 @@
       free (tmp);
     }
 
-#elif defined (HAVE_RESOLVEPATH)
-
-#if !defined (errno)
-extern int errno;
-#endif
-
-#if !defined (__set_errno)
-# define __set_errno(Val) errno = (Val)
-#endif
-
-  if (name.empty ())
-    {
-      __set_errno (ENOENT);
-      return retval;
-    }
-
-  // All known hosts with resolvepath (e.g. Solaris 7) don't turn
-  // relative names into absolute ones, so prepend the working
-  // directory if the path is not absolute.
-
-  std::string absolute_name = octave_env::make_absolute (name);
-
-  size_t resolved_size = absolute_name.length ();
-
-  while (true)
-    {
-      resolved_size = 2 * resolved_size + 1;
-
-      OCTAVE_LOCAL_BUFFER (char, resolved, resolved_size);
-
-      int resolved_len
-        = resolvepath (absolute_name.c_str (), resolved, resolved_size);
-
-      if (resolved_len < 0)
-        break;
-
-      if (resolved_len < resolved_size)
-        {
-          retval = resolved;
-          break;
-        }
-    }
-
-#elif defined (__WIN32__)
-
-  int n = 1024;
-
-  std::string win_path (n, '\0');
-
-  while (true)
-    {
-      int status = GetFullPathName (name.c_str (), n, &win_path[0], 0);
-
-      if (status == 0)
-        break;
-      else if (status < n)
-        {
-          win_path.resize (status);
-          retval = win_path;
-          break;
-        }
-      else
-        {
-          n *= 2;
-          win_path.resize (n);
-        }
-    }
-
-#elif defined (HAVE_REALPATH)
-
-#if !defined (__set_errno)
-# define __set_errno(Val) errno = (Val)
-#endif
-
-  if (name.empty ())
-    {
-      __set_errno (ENOENT);
-      return retval;
-    }
-
-  OCTAVE_LOCAL_BUFFER (char, buf, PATH_MAX);
-
-  if (::realpath (name.c_str (), buf))
-    retval = buf;
-
-#else
-
-  // FIXME: provide replacement here...
-  retval = name;
-
-#endif
-
   if (retval.empty ())
     msg = gnulib::strerror (errno);
 
--- a/liboctave/system/file-ops.h
+++ b/liboctave/system/file-ops.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -95,6 +95,9 @@
     return path.substr (ipos);
   }
 
+  // convert path from UNIX type separators to whatever is the system separators
+  static std::string native_separator_path (const std::string& path);
+
 private:
 
   static file_ops *instance;
--- a/liboctave/system/file-stat.cc
+++ b/liboctave/system/file-stat.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/file-stat.h
+++ b/liboctave/system/file-stat.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/lo-sysdep.cc
+++ b/liboctave/system/lo-sysdep.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -99,16 +99,18 @@
   ZeroMemory (&si, sizeof (si));
   si.cb = sizeof (si);
 
-  if (! CreatePipe (&childRead, &parentWrite, 0, 0) ||
-      ! DuplicateHandle (hProcess, childRead, hProcess, &childRead, 0, TRUE,
-                         DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
+  if (! CreatePipe (&childRead, &parentWrite, 0, 0)
+      || ! DuplicateHandle (hProcess, childRead, hProcess, &childRead,
+                            0, TRUE,
+                            DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
     {
       msg = "popen2: pipe creation failed";
       return -1;
     }
-  if (! CreatePipe (&parentRead, &childWrite, 0, 0) ||
-      ! DuplicateHandle (hProcess, childWrite, hProcess, &childWrite, 0, TRUE,
-                         DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
+  if (! CreatePipe (&parentRead, &childWrite, 0, 0)
+      || ! DuplicateHandle (hProcess, childWrite, hProcess, &childWrite,
+                            0, TRUE,
+                            DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
     {
       msg = "popen2: pipe creation failed";
       return -1;
--- a/liboctave/system/lo-sysdep.h
+++ b/liboctave/system/lo-sysdep.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/mach-info.cc
+++ b/liboctave/system/mach-info.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/mach-info.h
+++ b/liboctave/system/mach-info.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/module.mk
+++ b/liboctave/system/module.mk
@@ -18,10 +18,6 @@
   system/sysdir.h \
   system/syswait.h
 
-SYSTEM_C_SRC = \
-  system/tempnam.c \
-  system/tempname.c
-
 SYSTEM_SRC = \
   system/dir-ops.cc \
   system/file-ops.cc \
@@ -33,11 +29,11 @@
   system/oct-passwd.cc \
   system/oct-syscalls.cc \
   system/oct-time.cc \
-  system/oct-uname.cc \
-  $(SYSTEM_C_SRC)
+  system/oct-uname.cc
 
 noinst_LTLIBRARIES += system/libsystem.la
 
 system_libsystem_la_SOURCES = $(SYSTEM_SRC)
 system_libsystem_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
 
+liboctave_la_LIBADD += system/libsystem.la
--- a/liboctave/system/oct-env.cc
+++ b/liboctave/system/oct-env.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -150,6 +150,13 @@
 }
 
 std::string
+octave_env::get_temp_directory ()
+{
+  return (instance_ok ())
+         ? instance->do_get_temp_directory () : std::string ();
+}
+
+std::string
 octave_env::get_program_name (void)
 {
   return (instance_ok ())
@@ -184,6 +191,45 @@
          ? instance->do_get_host_name () : std::string ();
 }
 
+std::string
+octave_env::do_get_temp_directory (void) const
+{
+  std::string tempd;
+
+#if defined (__MINGW32__) || defined (_MSC_VER)
+
+  tempd = do_getenv ("TEMP");
+
+  if (tempd.empty ())
+    tempd = do_getenv ("TMP");
+
+  #if defined (P_tmpdir)
+  if (tempd.empty ())
+    tempd = P_tmpdir;
+  #endif
+
+  // Some versions of MinGW and MSVC either don't define P_tmpdir, or
+  // define it to a single backslash.  In such cases just use C:\temp.
+  if (tempd.empty () || tempd == "\\")
+    tempd = "c:\\temp";
+
+#else    // Unix-like OS
+
+  tempd = do_getenv ("TMP");
+
+  #if defined (P_tmpdir)
+  if (tempd.empty ())
+    tempd = P_tmpdir;
+  #else
+  if (tempd.empty ())
+    tempd = "/tmp";
+  #endif
+
+#endif
+
+  return tempd;
+}
+
 // FIXME: this leaves no way to distinguish between a
 // variable that is not set and one that is set to the empty string.
 // Is this a problem?
--- a/liboctave/system/oct-env.h
+++ b/liboctave/system/oct-env.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -51,6 +51,8 @@
 
   static std::string get_home_directory (void);
 
+  static std::string get_temp_directory (void);
+
   static std::string get_program_name (void);
 
   static std::string get_program_invocation_name (void);
@@ -88,6 +90,8 @@
 
   std::string do_get_home_directory (void) const;
 
+  std::string do_get_temp_directory (void) const;
+
   std::string do_get_user_name (void) const;
 
   std::string do_get_host_name (void) const;
--- a/liboctave/system/oct-group.cc
+++ b/liboctave/system/oct-group.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-group.h
+++ b/liboctave/system/oct-group.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-openmp.h
+++ b/liboctave/system/oct-openmp.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 David Bateman
+Copyright (C) 2010-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-passwd.cc
+++ b/liboctave/system/oct-passwd.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-passwd.h
+++ b/liboctave/system/oct-passwd.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-syscalls.cc
+++ b/liboctave/system/oct-syscalls.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-syscalls.h
+++ b/liboctave/system/oct-syscalls.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-time.cc
+++ b/liboctave/system/oct-time.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -235,7 +235,7 @@
 
   time_t t = ot.unix_time ();
 
-  octave_base_tm::init (localtime (&t));
+  octave_base_tm::init (gnulib::localtime (&t));
 }
 
 void
@@ -245,7 +245,7 @@
 
   time_t t = ot.unix_time ();
 
-  octave_base_tm::init (gmtime (&t));
+  octave_base_tm::init (gnulib::gmtime (&t));
 }
 
 void
--- a/liboctave/system/oct-time.h
+++ b/liboctave/system/oct-time.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-uname.cc
+++ b/liboctave/system/oct-uname.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 John W. Eaton
+Copyright (C) 2005-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/oct-uname.h
+++ b/liboctave/system/oct-uname.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 John W. Eaton
+Copyright (C) 2005-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/pathlen.h
+++ b/liboctave/system/pathlen.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/sysdir.h
+++ b/liboctave/system/sysdir.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/system/syswait.h
+++ b/liboctave/system/syswait.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
deleted file mode 100644
--- a/liboctave/system/tempnam.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA  02110-1301, USA.  */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef HAVE_TEMPNAM
-
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-extern char *__stdio_gen_tempname (const char *dir, const char *pfx,
-                                   int dir_search, size_t *lenptr,
-                                   FILE **streamptr);
-
-/* Generate a unique temporary filename using up to five characters of PFX
-   if it is not NULL.  The directory to put this file in is searched for
-   as follows: First the environment variable "TMPDIR" is checked.
-   If it contains the name of a writable directory, that directory is used.
-   If not and if DIR is not NULL, that value is checked.  If that fails,
-   P_tmpdir is tried and finally "/tmp".  The storage for the filename
-   is allocated by `malloc'.  */
-char *
-tempnam (const char *dir, const char *pfx)
-{
-  size_t len;
-  register char *s;
-  register char *t = __stdio_gen_tempname (dir, pfx, 1, &len, (FILE **) NULL);
-
-  if (t == NULL)
-    return NULL;
-
-  s = (char *) malloc (len);
-  if (s == NULL)
-    return NULL;
-
-  (void) memcpy (s, t, len);
-  return s;
-}
-
-#endif
deleted file mode 100644
--- a/liboctave/system/tempname.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public
-License along with the GNU C Library; see the file COPYING.  If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA  02110-1301, USA.  */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef HAVE_TEMPNAM
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <fcntl.h>
-
-#include "statdefs.h"
-
-#ifndef FILENAME_MAX
-#ifdef MAXPATHLEN
-#define FILENAME_MAX MAXPATHLEN
-#else
-#define FILENAME_MAX 1024
-#endif
-#endif
-
-#ifndef P_tmpdir
-#define P_tmpdir "/usr/tmp/"
-#endif
-
-/* Return nonzero if DIR is an existent directory.  */
-static int
-diraccess (const char *dir)
-{
-  struct stat buf;
-  return stat (dir, &buf) == 0 && S_ISDIR (buf.st_mode);
-}
-
-/* Return nonzero if FILE exists.  */
-static int
-exists (const char *file)
-{
-  /* We can stat the file even if we can't read its data.  */
-  struct stat st;
-  int save = errno;
-  if (stat (file, &st) == 0)
-    return 1;
-  else
-    {
-      /* We report that the file exists if stat failed for a reason other
-         than nonexistence.  In this case, it may or may not exist, and we
-         don't know; but reporting that it does exist will never cause any
-         trouble, while reporting that it doesn't exist when it does would
-         violate the interface of __stdio_gen_tempname.  */
-      int exists = errno != ENOENT;
-      errno = save;
-      return exists;
-    }
-}
-
-
-/* These are the characters used in temporary filenames.  */
-static const char letters[] =
-  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-
-/* Generate a temporary filename and return it (in a static buffer).  If
-   STREAMPTR is not NULL, open a stream "w+b" on the file and set
-   *STREAMPTR to it.  If DIR_SEARCH is nonzero, DIR and PFX are used as
-   described for tempnam.  If not, a temporary filename in P_tmpdir with no
-   special prefix is generated.  If LENPTR is not NULL, *LENPTR is set the
-   to length (including the terminating '\0') of the resultant filename,
-   which is returned.  This goes through a cyclic pattern of all possible
-   filenames consisting of five decimal digits of the current pid and three
-   of the characters in `letters'.  Data for tempnam and tmpnam is kept
-   separate, but when tempnam is using P_tmpdir and no prefix (i.e, it is
-   identical to tmpnam), the same data is used.  Each potential filename is
-   tested for an already-existing file of the same name, and no name of an
-   existing file will be returned.  When the cycle reaches its end
-   (12345ZZZ), NULL is returned.  */
-char *
-__stdio_gen_tempname (const char *dir, const char *pfx,
-                      int dir_search, size_t *lenptr,
-                      FILE **streamptr)
-{
-  int saverrno = errno;
-  static const char tmpdir[] = P_tmpdir;
-  static size_t indices[2];
-  size_t *idx;
-  static char buf[FILENAME_MAX];
-  static pid_t oldpid = (pid_t) 0;
-  pid_t pid = getpid ();
-  register size_t len, plen, dlen;
-
-  if (dir_search)
-    {
-      register const char *d = getenv ("TMPDIR");
-      if (d != NULL && !diraccess (d))
-        d = NULL;
-      if (d == NULL && dir != NULL && diraccess (dir))
-        d = dir;
-      if (d == NULL && diraccess (tmpdir))
-        d = tmpdir;
-      if (d == NULL && diraccess ("/tmp"))
-        d = "/tmp";
-      if (d == NULL)
-        {
-          errno = ENOENT;
-          return NULL;
-        }
-      dir = d;
-    }
-  else
-    dir = tmpdir;
-
-  dlen = strlen (dir);
-
-  /* Remove trailing slashes from the directory name.  */
-  while (dlen > 1 && dir[dlen - 1] == '/')
-    --dlen;
-
-  if (pfx != NULL && *pfx != '\0')
-    {
-      plen = strlen (pfx);
-      if (plen > 5)
-        plen = 5;
-    }
-  else
-    plen = 0;
-
-  if (dir != tmpdir && !strcmp (dir, tmpdir))
-    dir = tmpdir;
-  idx = &indices[(plen == 0 && dir == tmpdir) ? 1 : 0];
-
-  if (pid != oldpid)
-    {
-      oldpid = pid;
-      indices[0] = indices[1] = 0;
-    }
-
-  len = dlen + 1 + plen + 5 + 3;
-  for (; *idx < ((sizeof (letters) - 1) * (sizeof (letters) - 1) *
-                 (sizeof (letters) - 1));
-       ++*idx)
-    {
-      /* Construct a file name and see if it already exists.
-
-         We use a single counter in *IDX to cycle each of three
-         character positions through each of 62 possible letters.  */
-
-      if (sizeof (buf) < len)
-        return NULL;
-
-      sprintf (buf, "%.*s/%.*s%.5d%c%c%c",
-               (int) dlen, dir, (int) plen,
-               pfx, pid % 100000,
-               letters[*idx
-                       % (sizeof (letters) - 1)],
-               letters[(*idx / (sizeof (letters) - 1))
-                       % (sizeof (letters) - 1)],
-               letters[(*idx / ((sizeof (letters) - 1) *
-                                (sizeof (letters) - 1)))
-                       % (sizeof (letters) - 1)]
-              );
-
-      if (! buf || strlen (buf) != (int) len)
-        return NULL;
-
-      if (streamptr != NULL)
-        abort ();
-      else if (exists (buf))
-        continue;
-
-      /* If the file already existed we have continued the loop above,
-         so we only get here when we have a winning name to return.  */
-
-      errno = saverrno;
-
-      if (lenptr != NULL)
-        *lenptr = len + 1;
-      return buf;
-    }
-
-  /* We got out of the loop because we ran out of combinations to try.  */
-  errno = EEXIST;               /* ? */
-  return NULL;
-}
-
-#endif
--- a/liboctave/util/action-container.h
+++ b/liboctave/util/action-container.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/util/base-list.h
+++ b/liboctave/util/base-list.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2002-2013 John W. Eaton
+Copyright (C) 2002-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -104,8 +104,6 @@
   // For backward compatibility.
   void append (const elt_type& s) { lst.push_back (s); }
 
-protected:
-
   octave_base_list (void) : lst () { }
 
   octave_base_list (const std::list<elt_type>& l) : lst (l) { }
--- a/liboctave/util/byte-swap.h
+++ b/liboctave/util/byte-swap.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/caseless-str.h
+++ b/liboctave/util/caseless-str.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 Shai Ayal
+Copyright (C) 2007-2015 Shai Ayal
 
 This file is part of Octave.
 
@@ -54,18 +54,19 @@
 
     while (p1 != end () && p2 != s.end ())
       {
-        char lp1 = std::tolower (*p1), lp2 = std::tolower (*p2);
+        char lp1 = std::tolower (*p1);
+        char lp2 = std::tolower (*p2);
 
-        if ( lp1 > lp2 )
+        if (lp1 > lp2)
           return false;
-        if ( lp1 < lp2)
+        if (lp1 < lp2)
           return true;
 
         p1++;
         p2++;
       }
 
-    if ( length () >= s.length ())
+    if (length () >= s.length ())
       return false;
     else
       return true;
--- a/liboctave/util/cmd-edit.cc
+++ b/liboctave/util/cmd-edit.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -100,12 +100,16 @@
 
   void do_resize_terminal (void);
 
+  void do_set_screen_size (int ht, int wd);
+
   std::string newline_chars (void);
 
   void do_restore_terminal_state (void);
 
   void do_blink_matching_paren (bool flag);
 
+  bool do_erase_empty_line (bool flag);
+
   void do_set_basic_word_break_characters (const std::string& s);
 
   void do_set_completer_word_break_characters (const std::string& s);
@@ -147,6 +151,8 @@
 
   void do_replace_line (const std::string& text, bool clear_undo);
 
+  void do_kill_full_line (void);
+
   void do_insert_text (const std::string& text);
 
   void do_newline (void);
@@ -179,6 +185,8 @@
 
   bool do_filename_quoting_desired (bool);
 
+  bool do_prefer_env_winsize (bool);
+
   void do_interrupt (bool);
 
   static int operate_and_get_next (int, int);
@@ -265,15 +273,11 @@
 
   eof = false;
 
-  char *line = 0;
-
   const char *p = prompt.c_str ();
 
   BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
 
-  line = ::octave_rl_readline (p);
-
-  END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
+  char *line = ::octave_rl_readline (p);
 
   if (line)
     {
@@ -284,6 +288,8 @@
   else
     eof = true;
 
+  END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
+
   return retval;
 }
 
@@ -351,6 +357,12 @@
   ::octave_rl_resize_terminal ();
 }
 
+void
+gnu_readline::do_set_screen_size (int ht, int wd)
+{
+  ::octave_rl_set_screen_size (ht, wd);
+}
+
 std::string
 gnu_readline::newline_chars (void)
 {
@@ -369,6 +381,12 @@
   ::octave_rl_enable_paren_matching (flag ? 1 : 0);
 }
 
+bool
+gnu_readline::do_erase_empty_line (bool flag)
+{
+  return ::octave_rl_erase_empty_line (flag ? 1 : 0);
+}
+
 void
 gnu_readline::do_set_basic_word_break_characters (const std::string& s)
 {
@@ -554,6 +572,12 @@
 }
 
 void
+gnu_readline::do_kill_full_line (void)
+{
+  ::octave_rl_kill_full_line ();
+}
+
+void
 gnu_readline::do_insert_text (const std::string& text)
 {
   ::octave_rl_insert_text (text.c_str ());
@@ -651,6 +675,12 @@
   return ::octave_rl_filename_quoting_desired (arg);
 }
 
+bool
+gnu_readline::do_prefer_env_winsize (bool arg)
+{
+  return ::octave_rl_prefer_env_winsize (arg);
+}
+
 void
 gnu_readline::do_interrupt (bool arg)
 {
@@ -817,6 +847,8 @@
 
   void do_replace_line (const std::string& text, bool clear_undo);
 
+  void do_kill_full_line (void);
+
   void do_insert_text (const std::string& text);
 
   void do_newline (void);
@@ -896,6 +928,12 @@
 }
 
 void
+default_command_editor::do_kill_full_line (void)
+{
+  // FIXME
+}
+
+void
 default_command_editor::do_insert_text (const std::string&)
 {
   // FIXME
@@ -1112,6 +1150,13 @@
     instance->do_resize_terminal ();
 }
 
+void
+command_editor::set_screen_size (int ht, int wd)
+{
+  if (instance_ok ())
+    instance->do_set_screen_size (ht, wd);
+}
+
 std::string
 command_editor::decode_prompt_string (const std::string& s)
 {
@@ -1154,6 +1199,12 @@
     instance->do_blink_matching_paren (flag);
 }
 
+bool
+command_editor::erase_empty_line (bool flag)
+{
+  return instance_ok () ? instance->do_erase_empty_line (flag) : false;
+}
+
 void
 command_editor::set_basic_word_break_characters (const std::string& s)
 {
@@ -1293,6 +1344,13 @@
 }
 
 void
+command_editor::kill_full_line (void)
+{
+  if (instance_ok ())
+    instance->do_kill_full_line ();
+}
+
+void
 command_editor::insert_text (const std::string& text)
 {
   if (instance_ok ())
@@ -1447,6 +1505,13 @@
 }
 
 bool
+command_editor::prefer_env_winsize (bool arg)
+{
+  return (instance_ok ())
+         ? instance->do_prefer_env_winsize (arg) : false;
+}
+
+bool
 command_editor::interrupt (bool arg)
 {
   bool retval;
--- a/liboctave/util/cmd-edit.h
+++ b/liboctave/util/cmd-edit.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -83,12 +83,16 @@
 
   static void resize_terminal (void);
 
+  static void set_screen_size (int ht, int wd);
+
   static std::string decode_prompt_string (const std::string& s);
 
   static void restore_terminal_state (void);
 
   static void blink_matching_paren (bool flag);
 
+  static bool erase_empty_line (bool flag);
+
   static void set_basic_word_break_characters (const std::string& s);
 
   static void set_completer_word_break_characters (const std::string& s);
@@ -129,6 +133,8 @@
 
   static void replace_line (const std::string& text, bool clear_undo = true);
 
+  static void kill_full_line (void);
+
   static void insert_text (const std::string& text);
 
   static void newline (void);
@@ -161,6 +167,8 @@
 
   static bool filename_quoting_desired (bool);
 
+  static bool prefer_env_winsize (bool);
+
   static bool interrupt (bool = true);
 
   static int current_command_number (void);
@@ -248,6 +256,8 @@
 
   virtual void do_resize_terminal (void) { }
 
+  virtual void do_set_screen_size (int, int) { }
+
   virtual std::string do_decode_prompt_string (const std::string&);
 
   virtual std::string newline_chars (void) { return "\n"; }
@@ -256,6 +266,8 @@
 
   virtual void do_blink_matching_paren (bool) { }
 
+  virtual bool do_erase_empty_line (bool) { return false; }
+
   virtual void do_set_basic_word_break_characters (const std::string&) { }
 
   virtual void do_set_completer_word_break_characters (const std::string&) { }
@@ -299,6 +311,8 @@
 
   virtual void do_replace_line (const std::string& text, bool clear_undo) = 0;
 
+  virtual void do_kill_full_line (void) = 0;
+
   virtual void do_insert_text (const std::string& text) = 0;
 
   virtual void do_newline (void) = 0;
@@ -329,6 +343,8 @@
 
   virtual bool do_filename_quoting_desired (bool) { return false; }
 
+  virtual bool do_prefer_env_winsize (bool) { return false; }
+
   virtual void do_interrupt (bool) { }
 
   int do_insert_initial_input (void);
--- a/liboctave/util/cmd-hist.cc
+++ b/liboctave/util/cmd-hist.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -145,8 +145,9 @@
           else if (tmp == "ignorespace")
             history_control |= HC_IGNSPACE;
           else
-            (*current_liboctave_warning_handler)
-              ("unknown histcontrol directive %s", tmp.c_str ());
+            (*current_liboctave_warning_with_id_handler)
+              ("Octave:history-control",
+               "unknown histcontrol directive %s", tmp.c_str ());
 
           if (end != std::string::npos)
             beg = end + 1;
@@ -779,8 +780,9 @@
 void
 command_history::do_process_histcontrol (const std::string&)
 {
-  (*current_liboctave_warning_handler)
-    ("readline is not linked, so history control is not available");
+  (*current_liboctave_warning_with_id_handler)
+    ("Octave:history-control",
+     "readline is not linked, so history control is not available");
 }
 
 void
--- a/liboctave/util/cmd-hist.h
+++ b/liboctave/util/cmd-hist.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/data-conv.cc
+++ b/liboctave/util/data-conv.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -409,12 +409,11 @@
 
           if (input_is_output)
             {
-              input_is_output = false;
-
               s1 = s.substr (1, pos-1);
 
-              (*current_liboctave_warning_handler)
-                ("warning: ignoring leading * in fread precision");
+              (*current_liboctave_warning_with_id_handler)
+                ("Octave:fread-precision-syntax",
+                 "warning: ignoring leading * in fread precision");
             }
           else
             s1 = s.substr (0, pos);
@@ -587,7 +586,7 @@
       if (len > 0) \
         { \
           OCTAVE_LOCAL_BUFFER (TYPE, ptr, len); \
-          std::streamsize n_bytes = size * len; \
+          std::streamsize n_bytes = size * static_cast<std::streamsize> (len); \
           stream.read (reinterpret_cast<char *> (ptr), n_bytes); \
           if (swap) \
             swap_bytes< size > (ptr, len); \
@@ -609,8 +608,8 @@
           stream.write (&tmp_type, 1); \
           OCTAVE_LOCAL_BUFFER (TYPE, ptr, len); \
           for (octave_idx_type i = 0; i < len; i++) \
-            ptr[i] = static_cast <TYPE> (data[i]);         \
-          std::streamsize n_bytes = size * len; \
+            ptr[i] = static_cast<TYPE> (data[i]);         \
+          std::streamsize n_bytes = size * static_cast<std::streamsize> (len); \
           stream.write (reinterpret_cast<char *> (ptr), n_bytes); \
         } \
     } \
@@ -809,7 +808,7 @@
     case LS_FLOAT:
       {
         OCTAVE_LOCAL_BUFFER (float, ptr, len);
-        std::streamsize n_bytes = 4 * len;
+        std::streamsize n_bytes = 4 * static_cast<std::streamsize> (len);
         is.read (reinterpret_cast<char *> (ptr), n_bytes);
         do_float_format_conversion (ptr, len, fmt);
         for (octave_idx_type i = 0; i < len; i++)
@@ -867,7 +866,7 @@
 
     case LS_FLOAT: // No conversion necessary.
       {
-        std::streamsize n_bytes = 4 * len;
+        std::streamsize n_bytes = 4 * static_cast<std::streamsize> (len);
         is.read (reinterpret_cast<char *> (data), n_bytes);
         do_float_format_conversion (data, len, fmt);
       }
@@ -876,7 +875,7 @@
     case LS_DOUBLE:
       {
         OCTAVE_LOCAL_BUFFER (double, ptr, len);
-        std::streamsize n_bytes = 8 * len;
+        std::streamsize n_bytes = 8 * static_cast<std::streamsize> (len);
         is.read (reinterpret_cast<char *> (ptr), n_bytes);
         do_double_format_conversion (ptr, len, fmt);
         for (octave_idx_type i = 0; i < len; i++)
@@ -974,7 +973,7 @@
       {
         char tmp_type = static_cast<char> (type);
         os.write (&tmp_type, 1);
-        std::streamsize n_bytes = 4 * len;
+        std::streamsize n_bytes = 4 * static_cast<std::streamsize> (len);
         os.write (reinterpret_cast <const char *> (data), n_bytes);
       }
       break;
--- a/liboctave/util/data-conv.h
+++ b/liboctave/util/data-conv.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/f2c-main.c
+++ b/liboctave/util/f2c-main.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/functor.h
+++ b/liboctave/util/functor.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 John W. Eaton
+Copyright (C) 2008-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/glob-match.cc
+++ b/liboctave/util/glob-match.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/glob-match.h
+++ b/liboctave/util/glob-match.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/kpse.cc
+++ b/liboctave/util/kpse.cc
@@ -3,7 +3,7 @@
 
 /* Look up a filename in a path.
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyright (C) 1993, 94, 95, 96, 97, 98 Karl Berry.
 Copyright (C) 1993, 94, 95, 96, 97 Karl Berry & O. Weber.
 Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
@@ -1201,7 +1201,7 @@
     }
   else if (name.length () == 1)
     {
-      expansion = octave_env::getenv ("HOME");
+      expansion = octave_env::get_home_directory ();
 
       if (expansion.empty ())
         expansion = ".";
@@ -1212,7 +1212,7 @@
   else if (IS_DIR_SEP (name[1]))
     {
       unsigned c = 1;
-      std::string home = octave_env::getenv ("HOME");
+      std::string home = octave_env::get_home_directory ();
 
       if (home.empty ())
         home = ".";
@@ -1549,8 +1549,9 @@
       /* What if there isn't a matching close brace? */
       if (! c)
         {
-          (*current_liboctave_warning_handler)
-            ("%s: Unmatched {", text.c_str ());
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:pathsearch-syntax",
+             "%s: Unmatched {", text.c_str ());
 
           result = string_vector (text);
         }
@@ -1612,7 +1613,10 @@
 static int
 brace_gobbler (const std::string& text, int& indx, int satisfy)
 {
-  int c = 0, level = 0, quoted = 0, pass_next = 0;
+  int c = 0;
+  int level = 0;
+  int quoted = 0;
+  int pass_next = 0;
 
   size_t text_len = text.length ();
 
@@ -1654,10 +1658,10 @@
           /* We ignore an open brace surrounded by whitespace, and also
              an open brace followed immediately by a close brace, that
              was preceded with whitespace.  */
-          if (c == '{' &&
-              ((i == 0 || brace_whitespace (text[i-1])) &&
-               (i+1 < text_len &&
-                (brace_whitespace (text[i+1]) || text[i+1] == '}'))))
+          if (c == '{'
+              && ((i == 0 || brace_whitespace (text[i-1]))
+                  && (i+1 < text_len
+                      && (brace_whitespace (text[i+1]) || text[i+1] == '}'))))
             continue;
           /* If this is being compiled as part of bash, ignore the '{'
              in a '${ }' construct */
@@ -2542,8 +2546,9 @@
 {
   if (expanding_p (var))
     {
-      (*current_liboctave_warning_handler)
-        ("kpathsea: variable '%s' references itself (eventually)",
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:pathsearch-syntax",
+         "kpathsea: variable '%s' references itself (eventually)",
          var.c_str ());
     }
   else
@@ -2620,8 +2625,9 @@
 
               if (var_end == src_len)
                 {
-                  (*current_liboctave_warning_handler)
-                    ("%s: No matching } for ${", src.c_str ());
+                  (*current_liboctave_warning_with_id_handler)
+                    ("Octave:pathsearch-syntax",
+                     "%s: No matching } for ${", src.c_str ());
                   i = var_end - 1; /* will incr to eos at top of loop */
                 }
               else
@@ -2633,8 +2639,9 @@
           else
             {
               /* $<something-else>: error.  */
-              (*current_liboctave_warning_handler)
-                ("%s: Unrecognized variable construct '$%c'",
+              (*current_liboctave_warning_with_id_handler)
+                ("Octave:pathsearch-syntax",
+                 "%s: Unrecognized variable construct '$%c'",
                  src.c_str (), src[i]);
 
               /* Just ignore those chars and keep going.  */
--- a/liboctave/util/lo-array-gripes.cc
+++ b/liboctave/util/lo-array-gripes.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 John W. Eaton
+Copyright (C) 2003-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -34,6 +34,10 @@
 
 const char *error_id_invalid_index = "Octave:invalid-index";
 
+const char *warning_id_nearly_singular_matrix = "Octave:nearly-singular-matrix";
+
+const char *warning_id_singular_matrix = "Octave:singular-matrix";
+
 void
 gripe_nan_to_logical_conversion (void)
 {
@@ -166,3 +170,19 @@
     ("A(I,J,...) = X: dimensions mismatch");
 }
 
+void
+gripe_singular_matrix (double rcond)
+{
+  if (rcond == 0.0)
+    {
+      (*current_liboctave_warning_with_id_handler)
+        (warning_id_singular_matrix,
+         "matrix singular to machine precision");
+    }
+  else
+    {
+      (*current_liboctave_warning_with_id_handler)
+        (warning_id_nearly_singular_matrix,
+         "matrix singular to machine precision, rcond = %g", rcond);
+    }
+}
--- a/liboctave/util/lo-array-gripes.h
+++ b/liboctave/util/lo-array-gripes.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -31,6 +31,10 @@
 
 extern OCTAVE_API const char *error_id_invalid_index;
 
+extern OCTAVE_API const char *warning_id_nearly_singular_matrix;
+
+extern OCTAVE_API const char *warning_id_singular_matrix;
+
 extern void OCTAVE_API
 gripe_nan_to_logical_conversion (void);
 
@@ -71,4 +75,7 @@
 extern void OCTAVE_API
 gripe_assignment_dimension_mismatch (void);
 
+extern void OCTAVE_API
+gripe_singular_matrix (double rcond = 0.0);
+
 #endif
deleted file mode 100644
--- a/liboctave/util/lo-cieee.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
-
-Copyright (C) 2002-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <float.h>
-
-#if defined (HAVE_FLOATINGPOINT_H)
-#include <floatingpoint.h>
-#endif
-
-#if defined (HAVE_IEEEFP_H)
-#include <ieeefp.h>
-#endif
-
-#include "lo-ieee.h"
-#include "lo-math.h"
-
-#if ! defined (HAVE_ISNAN) && defined (HAVE__ISNAN)
-#define isnan _isnan
-#define HAVE_ISNAN 1
-#endif
-
-#if ! defined (HAVE_FINITE) && defined (HAVE__FINITE)
-#define finite _finite
-#define HAVE_FINITE 1
-#endif
-
-#if defined (_AIX) && defined (__GNUG__)
-#undef finite
-#define finite(x) ((x) < DBL_MAX && (x) > -DBL_MAX)
-#endif
-
-/* Octave's idea of infinity.  */
-double octave_Inf;
-float octave_Float_Inf;
-
-/* Octave's idea of a missing value.  */
-double octave_NA;
-float octave_Float_NA;
-
-/* Octave's idea of not a number.  */
-double octave_NaN;
-float octave_Float_NaN;
-
-int lo_ieee_hw;
-int lo_ieee_lw;
-
-int
-__lo_ieee_isnan (double x)
-{
-#if defined (HAVE_ISNAN)
-  return isnan (x);
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_finite (double x)
-{
-#if defined (HAVE_FINITE)
-  return finite (x) != 0 && ! __lo_ieee_isnan (x);
-#elif defined (HAVE_ISINF)
-  return (! isinf (x) && ! __lo_ieee_isnan (x));
-#else
-  return ! __lo_ieee_isnan (x);
-#endif
-}
-
-int
-__lo_ieee_isinf (double x)
-{
-#if defined (HAVE_ISINF)
-  return isinf (x);
-#elif defined (HAVE_FINITE)
-  return (! (finite (x) || __lo_ieee_isnan (x)));
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_is_NA (double x)
-{
-#if defined (HAVE_ISNAN)
-  lo_ieee_double t;
-  t.value = x;
-  return (isnan (x) && t.word[lo_ieee_hw] == LO_IEEE_NA_HW
-          && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0;
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_is_old_NA (double x)
-{
-#if defined (HAVE_ISNAN)
-  lo_ieee_double t;
-  t.value = x;
-  return (isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW_OLD
-          && t.word[lo_ieee_hw] == LO_IEEE_NA_HW_OLD) ? 1 : 0;
-#else
-  return 0;
-#endif
-}
-
-double
-__lo_ieee_replace_old_NA (double x)
-{
-  if (__lo_ieee_is_old_NA (x))
-    return lo_ieee_na_value ();
-  else
-    return x;
-}
-
-int
-__lo_ieee_is_NaN_or_NA (double x)
-{
-  return __lo_ieee_isnan (x);
-}
-
-double
-lo_ieee_inf_value (void)
-{
-  return octave_Inf;
-}
-
-double
-lo_ieee_na_value (void)
-{
-  return octave_NA;
-}
-
-double
-lo_ieee_nan_value (void)
-{
-  return octave_NaN;
-}
-
-#if ! (defined (signbit) || defined (HAVE_DECL_SIGNBIT)) && defined (HAVE_SIGNBIT)
-extern int signbit (double);
-#endif
-
-int
-__lo_ieee_signbit (double x)
-{
-  /* In the following definitions, only check x < 0 explicitly to avoid
-     a function call when it looks like signbit or copysign are actually
-     functions.  */
-
-#if defined (signbit)
-  return signbit (x);
-#elif defined (HAVE_SIGNBIT)
-  return (x < 0 || signbit (x));
-#elif defined (copysign)
-  return (copysign (1.0, x) < 0);
-#elif defined (HAVE_COPYSIGN)
-  return (x < 0 || copysign (1.0, x) < 0);
-#else
-  return x < 0;
-#endif
-}
-
-int
-__lo_ieee_float_isnan (float x)
-{
-#if defined (HAVE_ISNAN)
-  return isnan (x);
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_float_finite (float x)
-{
-#if defined (HAVE_FINITE)
-  return finite (x) != 0 && ! __lo_ieee_float_isnan (x);
-#elif defined (HAVE_ISINF)
-  return (! isinf (x) && ! __lo_ieee_float_isnan (x));
-#else
-  return ! __lo_ieee_float_isnan (x);
-#endif
-}
-
-int
-__lo_ieee_float_isinf (float x)
-{
-#if defined (HAVE_ISINF)
-  return isinf (x);
-#elif defined (HAVE_FINITE)
-  return (! (finite (x) || __lo_ieee_float_isnan (x)));
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_float_is_NA (float x)
-{
-#if defined (HAVE_ISNAN)
-  lo_ieee_float t;
-  t.value = x;
-  return (isnan (x) && (t.word == LO_IEEE_NA_FLOAT)) ? 1 : 0;
-#else
-  return 0;
-#endif
-}
-
-int
-__lo_ieee_float_is_NaN_or_NA (float x)
-{
-  return __lo_ieee_float_isnan (x);
-}
-
-float
-lo_ieee_float_inf_value (void)
-{
-  return octave_Float_Inf;
-}
-
-float
-lo_ieee_float_na_value (void)
-{
-  return octave_Float_NA;
-}
-
-float
-lo_ieee_float_nan_value (void)
-{
-  return octave_Float_NaN;
-}
-
-#if ! (defined (signbit) || defined (HAVE_DECL_SIGNBIT)) && defined (HAVE_SIGNBIT)
-extern int signbit (float);
-#endif
-
-int
-__lo_ieee_float_signbit (float x)
-{
-  /* In the following definitions, only check x < 0 explicitly to avoid
-     a function call when it looks like signbit or copysign are actually
-     functions.  */
-
-#if defined (signbit)
-  return signbit (x);
-#elif defined (HAVE_SIGNBIT)
-  return (x < 0 || signbit (x));
-#elif defined (copysign)
-  return (copysign (1.0, x) < 0);
-#elif defined (HAVE_COPYSIGN)
-  return (x < 0 || copysign (1.0, x) < 0);
-#else
-  return x < 0;
-#endif
-}
--- a/liboctave/util/lo-cutils.c
+++ b/liboctave/util/lo-cutils.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-cutils.h
+++ b/liboctave/util/lo-cutils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-ieee.cc
+++ b/liboctave/util/lo-ieee.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -24,63 +24,256 @@
 #include <config.h>
 #endif
 
+#include <cfloat>
+#include <cmath>
 #include <cstdlib>
 
 #include <limits>
 
+static double lo_inf;
+static double lo_nan;
+static double lo_na;
+
+static float lo_float_inf;
+static float lo_float_nan;
+static float lo_float_na;
+
+static int lo_ieee_hw;
+static int lo_ieee_lw;
+
 #include "lo-error.h"
 #include "lo-ieee.h"
+#include "lo-math.h"
 #include "mach-info.h"
 
+int
+__lo_ieee_isnan (double x)
+{
+#if defined (HAVE_CMATH_ISNAN)
+  return std::isnan (x);
+#else
+  // Gnulib provides.
+  return isnan (x);
+#endif
+}
+
+int
+__lo_ieee_finite (double x)
+{
+#if defined (HAVE_CMATH_ISFINITE)
+  return std::isfinite (x);
+#else
+  // Gnulib provides.
+  return finite (x);
+#endif
+}
+
+int
+__lo_ieee_isinf (double x)
+{
+#if defined (HAVE_CMATH_ISINF)
+  return std::isinf (x);
+#else
+  // Gnulib provides.
+  return isinf (x);
+#endif
+}
+
+int
+__lo_ieee_is_NA (double x)
+{
+  lo_ieee_double t;
+  t.value = x;
+  return (__lo_ieee_isnan (x) && t.word[lo_ieee_hw] == LO_IEEE_NA_HW
+          && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0;
+}
+
+int
+__lo_ieee_is_old_NA (double x)
+{
+  lo_ieee_double t;
+  t.value = x;
+  return (__lo_ieee_isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW_OLD
+          && t.word[lo_ieee_hw] == LO_IEEE_NA_HW_OLD) ? 1 : 0;
+}
+
+double
+__lo_ieee_replace_old_NA (double x)
+{
+  if (__lo_ieee_is_old_NA (x))
+    return lo_ieee_na_value ();
+  else
+    return x;
+}
+
+double
+lo_ieee_inf_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_inf;
+}
+
+double
+lo_ieee_na_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_na;
+}
+
+double
+lo_ieee_nan_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_nan;
+}
+
+int
+__lo_ieee_signbit (double x)
+{
+#if defined (HAVE_CMATH_SIGNBIT)
+  return std::signbit (x);
+#else
+  // Gnulib provides.
+  return signbit (x);
+#endif
+}
+
+int
+__lo_ieee_float_isnan (float x)
+{
+#if defined (HAVE_CMATH_ISNAN)
+  return std::isnan (x);
+#else
+  // Gnulib provides.
+  return isnan (x);
+#endif
+}
+
+int
+__lo_ieee_float_finite (float x)
+{
+#if defined (HAVE_CMATH_ISFINITE)
+  return std::isfinite (x) != 0 && ! __lo_ieee_float_isnan (x);
+#else
+  // Gnulib provides.
+  return finite (x);
+#endif
+}
+
+int
+__lo_ieee_float_isinf (float x)
+{
+#if defined (HAVE_CMATH_ISINF)
+  return std::isinf (x);
+#else
+  // Gnulib provides.
+  return isinf (x);
+#endif
+}
+
+int
+__lo_ieee_float_is_NA (float x)
+{
+  lo_ieee_float t;
+  t.value = x;
+  return (__lo_ieee_float_isnan (x) && (t.word == LO_IEEE_NA_FLOAT)) ? 1 : 0;
+}
+
+float
+lo_ieee_float_inf_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_float_inf;
+}
+
+float
+lo_ieee_float_na_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_float_na;
+}
+
+float
+lo_ieee_float_nan_value (void)
+{
+  octave_ieee_init ();
+
+  return lo_float_nan;
+}
+
+int
+__lo_ieee_float_signbit (float x)
+{
+#if defined (HAVE_CMATH_SIGNBIT)
+  return std::signbit (x);
+#else
+  // Gnulib provides.
+  return signbit (x);
+#endif
+}
+
 void
 octave_ieee_init (void)
 {
-  oct_mach_info::float_format ff = oct_mach_info::native_float_format ();
-
-  switch (ff)
-    {
-    case oct_mach_info::flt_fmt_ieee_big_endian:
-    case oct_mach_info::flt_fmt_ieee_little_endian:
-      {
-        octave_NaN = std::numeric_limits<double>::quiet_NaN ();
-        octave_Inf = std::numeric_limits<double>::infinity ();
+  bool initialized = false;
 
-        octave_Float_NaN = std::numeric_limits<float>::quiet_NaN ();
-        octave_Float_Inf = std::numeric_limits<float>::infinity ();
-
-        // The following is patterned after code in R.
+  if (! initialized)
+    {
+      oct_mach_info::float_format ff = oct_mach_info::native_float_format ();
 
-        if (ff == oct_mach_info::flt_fmt_ieee_big_endian)
-          {
-            lo_ieee_hw = 0;
-            lo_ieee_lw = 1;
-          }
-        else
+      switch (ff)
+        {
+        case oct_mach_info::flt_fmt_ieee_big_endian:
+        case oct_mach_info::flt_fmt_ieee_little_endian:
           {
-            lo_ieee_hw = 1;
-            lo_ieee_lw = 0;
-          }
+            lo_nan = std::numeric_limits<double>::quiet_NaN ();
+            lo_inf = std::numeric_limits<double>::infinity ();
+
+            lo_float_nan = std::numeric_limits<float>::quiet_NaN ();
+            lo_float_inf = std::numeric_limits<float>::infinity ();
+
+            // The following is patterned after code in R.
 
-        lo_ieee_double t;
-        t.word[lo_ieee_hw] = LO_IEEE_NA_HW;
-        t.word[lo_ieee_lw] = LO_IEEE_NA_LW;
-
-        octave_NA = t.value;
+            if (ff == oct_mach_info::flt_fmt_ieee_big_endian)
+              {
+                lo_ieee_hw = 0;
+                lo_ieee_lw = 1;
+              }
+            else
+              {
+                lo_ieee_hw = 1;
+                lo_ieee_lw = 0;
+              }
 
-        lo_ieee_float tf;
-        tf.word = LO_IEEE_NA_FLOAT;
-        octave_Float_NA = tf.value;
-      }
-      break;
+            lo_ieee_double t;
+            t.word[lo_ieee_hw] = LO_IEEE_NA_HW;
+            t.word[lo_ieee_lw] = LO_IEEE_NA_LW;
+
+            lo_na = t.value;
+
+            lo_ieee_float tf;
+            tf.word = LO_IEEE_NA_FLOAT;
+
+            lo_float_na = tf.value;
+          }
+          break;
 
-    default:
-      // If the format is unknown, then you will probably not have a
-      // useful system, so we will abort here.  Anyone wishing to
-      // experiment with building Octave on a system without IEEE
-      // floating point should be capable of removing this check and
-      // the configure test.
-      (*current_liboctave_error_handler)
-        ("lo_ieee_init: floating point format is not IEEE!  Maybe DLAMCH is miscompiled, or you are using some strange system without IEEE floating point math?");
-      abort ();
+        default:
+          // If the format is unknown, then you will probably not have a
+          // useful system, so we will abort here.  Anyone wishing to
+          // experiment with building Octave on a system without IEEE
+          // floating point should be capable of removing this check and
+          // the configure test.
+          (*current_liboctave_error_handler)
+            ("lo_ieee_init: floating point format is not IEEE!  Maybe DLAMCH is miscompiled, or you are using some strange system without IEEE floating point math?");
+          abort ();
+        }
+
+      initialized = true;
     }
 }
--- a/liboctave/util/lo-ieee.h
+++ b/liboctave/util/lo-ieee.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -28,29 +28,26 @@
 #endif
 
 /*  Octave's idea of infinity.  */
-extern OCTAVE_API double octave_Inf;
+#define octave_Inf (lo_ieee_inf_value ())
 
 /* Octave's idea of a missing value.  */
-extern OCTAVE_API double octave_NA;
+#define octave_NA (lo_ieee_na_value ())
 
 /* Octave's idea of not a number.  */
-extern OCTAVE_API double octave_NaN;
+#define octave_NaN (lo_ieee_nan_value ())
 
 /*  Octave's idea of infinity.  */
-extern OCTAVE_API float octave_Float_Inf;
+#define octave_Float_Inf (lo_ieee_float_inf_value ())
 
 /* Octave's idea of a missing value.  */
-extern OCTAVE_API float octave_Float_NA;
+#define octave_Float_NA (lo_ieee_float_na_value ())
 
 /* Octave's idea of not a number.  */
-extern OCTAVE_API float octave_Float_NaN;
+#define octave_Float_NaN (lo_ieee_float_nan_value ())
 
 /* FIXME -- this code assumes that a double has twice the
    number of bits as an int */
 
-extern OCTAVE_API int lo_ieee_hw;
-extern OCTAVE_API int lo_ieee_lw;
-
 typedef union
 {
   double value;
@@ -77,7 +74,6 @@
 
 extern OCTAVE_API int __lo_ieee_is_NA (double);
 extern OCTAVE_API int __lo_ieee_is_old_NA (double);
-extern OCTAVE_API int __lo_ieee_is_NaN_or_NA (double) GCC_ATTR_DEPRECATED;
 extern OCTAVE_API double __lo_ieee_replace_old_NA (double);
 
 extern OCTAVE_API double lo_ieee_inf_value (void);
@@ -91,7 +87,6 @@
 extern OCTAVE_API int __lo_ieee_float_isinf (float x);
 
 extern OCTAVE_API int __lo_ieee_float_is_NA (float);
-extern OCTAVE_API int __lo_ieee_float_is_NaN_or_NA (float) GCC_ATTR_DEPRECATED;
 
 extern OCTAVE_API float lo_ieee_float_inf_value (void);
 extern OCTAVE_API float lo_ieee_float_na_value (void);
--- a/liboctave/util/lo-macros.h
+++ b/liboctave/util/lo-macros.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-math.h
+++ b/liboctave/util/lo-math.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 John W. Eaton
+Copyright (C) 2007-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-regexp.cc
+++ b/liboctave/util/lo-regexp.cc
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2012 John W. Eaton
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 2002-2005 Paul Kienzle
 
 This file is part of Octave.
@@ -179,8 +179,9 @@
                   if (!lookbehind_warned)
                     {
                       lookbehind_warned = true;
-                      (*current_liboctave_warning_handler)
-                        ("%s: arbitrary length lookbehind patterns are only supported up to length %d",
+                      (*current_liboctave_warning_with_id_handler)
+                        ("Octave:regexp-lookbehind-limit",
+                         "%s: arbitrary length lookbehind patterns are only supported up to length %d",
                          who.c_str (), MAXLOOKBEHIND);
                     }
 
@@ -251,7 +252,7 @@
   char *nametable;
   size_t idx = 0;
 
-  pcre *re = static_cast <pcre *> (data);
+  pcre *re = static_cast<pcre *> (data);
 
   pcre_fullinfo (re, 0, PCRE_INFO_CAPTURECOUNT,  &subpatterns);
   pcre_fullinfo (re, 0, PCRE_INFO_NAMECOUNT, &namecount);
@@ -282,13 +283,14 @@
         {
           // Try harder; start with default value for MATCH_LIMIT
           // and increase it.
-          (*current_liboctave_warning_handler)
-            ("your pattern caused PCRE to hit its MATCH_LIMIT; trying harder now, but this will be slow");
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:regexp-match-limit",
+             "your pattern caused PCRE to hit its MATCH_LIMIT; trying harder now, but this will be slow");
 
           pcre_extra pe;
 
           pcre_config (PCRE_CONFIG_MATCH_LIMIT,
-                       static_cast <void *> (&pe.match_limit));
+                       static_cast<void *> (&pe.match_limit));
 
           pe.flags = PCRE_EXTRA_MATCH_LIMIT;
 
--- a/liboctave/util/lo-regexp.h
+++ b/liboctave/util/lo-regexp.h
@@ -1,7 +1,7 @@
 /*
 
 Copyright (C) 2012 John W. Eaton
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-traits.h
+++ b/liboctave/util/lo-traits.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2009-2013 John W. Eaton
+Copyright (C) 2009-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/lo-utils.cc
+++ b/liboctave/util/lo-utils.cc
@@ -1,7 +1,7 @@
 // utils.cc
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -322,7 +322,8 @@
 std::complex<T>
 octave_read_cx_fp_value (std::istream& is)
 {
-  T re = 0.0, im = 0.0;
+  T re = 0.0;
+  T im = 0.0;
 
   std::complex<T> cx = 0.0;
 
--- a/liboctave/util/lo-utils.h
+++ b/liboctave/util/lo-utils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/module.mk
+++ b/liboctave/util/module.mk
@@ -26,7 +26,6 @@
   util/oct-inttypes.h \
   util/oct-locbuf.h \
   util/oct-md5.h \
-  util/oct-mem.h \
   util/oct-mutex.h \
   util/oct-refcount.h \
   util/oct-rl-edit.h \
@@ -47,7 +46,6 @@
 
 UTIL_C_SRC = \
   util/f2c-main.c \
-  util/lo-cieee.c \
   util/lo-cutils.c \
   util/oct-rl-edit.c \
   util/oct-rl-hist.c
@@ -60,7 +58,6 @@
   util/lo-array-gripes.cc \
   util/lo-ieee.cc \
   util/lo-utils.cc \
-  util/oct-alloc.cc \
   util/oct-base64.cc \
   util/oct-glob.cc \
   util/oct-inttypes.cc \
@@ -89,6 +86,8 @@
 util_libutil_la_SOURCES = $(UTIL_SRC)
 util_libutil_la_CPPFLAGS = \
   $(liboctave_la_CPPFLAGS) \
+  $(CURL_CPPFLAGS) \
   $(PCRE_CPPFLAGS) \
   $(SPARSE_XCPPFLAGS)
 
+liboctave_la_LIBADD += util/libutil.la
deleted file mode 100644
--- a/liboctave/util/oct-alloc.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-
-Copyright (C) 1996-2013 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <new>
-
-#include "oct-alloc.h"
-
-void *
-octave_allocator::alloc (size_t size)
-{
-  if (size != item_size)
-    return ::new char [size];
-
-  if (! head)
-    {
-      if (! grow ())
-        return 0;
-    }
-
-  link *tmp = head;
-  head = head->next;
-  return tmp;
-}
-
-// FIXME: if we free the last item on the list, shouldn't we
-// also free the underlying character array used for storage?
-
-void
-octave_allocator::free (void *p, size_t size)
-{
-  if (size != item_size)
-    ::delete [] (static_cast<char *> (p));
-  else
-    {
-      link *tmp = static_cast<link *> (p);
-      tmp->next = head;
-      head = tmp;
-    }
-}
-
-// Return TRUE for successful allocation, FALSE otherwise.
-
-bool
-octave_allocator::grow (void)
-{
-  bool retval = true;
-
-  char *start = new char [grow_size * item_size];
-
-  if (start)
-    {
-      char *last = &start[(grow_size - 1) * item_size];
-
-      char *p = start;
-      while (p < last)
-        {
-          char *next = p + item_size;
-          (reinterpret_cast<link *> (p)) -> next
-            = reinterpret_cast<link *> (next);
-          p = next;
-        }
-
-      (reinterpret_cast<link *> (last)) -> next = 0;
-
-      head = reinterpret_cast<link *> (start);
-    }
-  else
-    {
-      typedef void (*error_handler_function) (void);
-
-      error_handler_function f = std::set_new_handler (0);
-      std::set_new_handler (f);
-
-      if (f)
-        f ();
-
-      retval = false;
-    }
-
-  return retval;
-}
--- a/liboctave/util/oct-alloc.h
+++ b/liboctave/util/oct-alloc.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -23,79 +23,10 @@
 #if !defined (octave_oct_alloc_h)
 #define octave_oct_alloc_h 1
 
-#include <cstddef>
-
-class
-OCTAVE_API
-octave_allocator
-{
-public:
-
-  octave_allocator (size_t item_sz, int grow_sz = 256)
-    : head (0), grow_size (grow_sz),
-      item_size (item_sz > sizeof (link *) ? item_sz : sizeof (link *))
-  { }
-
-  // Get an object from the free list, possibly increasing the size of
-  // the free list.
-  void *alloc (size_t size);
-
-  // Put objects back on the free list.
-  void free (void *p, size_t size);
-
-private:
-
-  // Structure for internal free list management.
-  struct link { link *next; };
-
-  // Front of the free list.
-  link *head;
-
-  // How many objects to get each time we call the global operator new.
-  int grow_size;
-
-  // The size of each item on the list (or, if that is smaller than
-  // the size of list*, the size of list*.
-  size_t item_size;
-
-  // How to grow the free list.
-  bool grow (void);
-};
-
-#if defined (HAVE_PLACEMENT_DELETE)
-#define DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \
-    void operator delete (void *p, void *) \
-      { ::operator delete (p, static_cast<void*> (0)); }
-#else
-#define DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \
-    void operator delete (void *p, void *) \
-      { ::operator delete (p); }
-#endif
-
-#if defined (USE_OCTAVE_ALLOCATOR)
-
-#define DECLARE_OCTAVE_ALLOCATOR \
-  public: \
-    void *operator new (size_t size, void *p) \
-      { return ::operator new (size, p); } \
-    DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \
-    void *operator new (size_t size) { return allocator.alloc (size); } \
-    void operator delete (void *p, size_t size) { allocator.free (p, size); } \
-  private: \
-    static octave_allocator allocator;
-
-#define DEFINE_OCTAVE_ALLOCATOR(t) \
-  octave_allocator t::allocator (sizeof (t))
-
-#define DEFINE_OCTAVE_ALLOCATOR2(t, s) \
-  octave_allocator t::allocator (sizeof (t), s)
-
-#else
+#warning "the octave_allocator class has been deprecated and will be removed in a future release of Octave"
 
 #define DECLARE_OCTAVE_ALLOCATOR
 #define DEFINE_OCTAVE_ALLOCATOR(t)
 #define DEFINE_OCTAVE_ALLOCATOR2(t, s)
 
 #endif
-
-#endif
--- a/liboctave/util/oct-base64.cc
+++ b/liboctave/util/oct-base64.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-base64.h
+++ b/liboctave/util/oct-base64.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-binmap.h
+++ b/liboctave/util/oct-binmap.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 VZLU Prague
+Copyright (C) 2010-2015 VZLU Prague
 
 This file is part of Octave.
 
@@ -167,7 +167,8 @@
 Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, F fcn, const char *name)
 {
-  dim_vector xad = xa.dims (), yad = ya.dims ();
+  dim_vector xad = xa.dims ();
+  dim_vector yad = ya.dims ();
   if (xa.numel () == 1)
     return binmap<U, T, R, F> (xa(0), ya, fcn);
   else if (ya.numel () == 1)
@@ -225,8 +226,8 @@
     {
       octave_idx_type nz = ys.nnz ();
       Sparse<U> retval (ys.rows (), ys.cols (), nz);
-      copy_or_memcpy (nz, ys.ridx (), retval.ridx ());
-      copy_or_memcpy (ys.cols () + 1, ys.cidx (), retval.cidx ());
+      std::copy (ys.ridx (), ys.ridx () + nz, retval.ridx ());
+      std::copy (ys.cidx (), ys.cidx () + ys.cols () + 1, retval.cidx ());
 
       for (octave_idx_type i = 0; i < nz; i++)
         {
@@ -256,8 +257,8 @@
     {
       octave_idx_type nz = xs.nnz ();
       Sparse<U> retval (xs.rows (), xs.cols (), nz);
-      copy_or_memcpy (nz, xs.ridx (), retval.ridx ());
-      copy_or_memcpy (xs.cols () + 1, xs.cidx (), retval.cidx ());
+      std::copy (xs.ridx (), xs.ridx () + nz, retval.ridx ());
+      std::copy (xs.cidx (), xs.cidx () + xs.cols () + 1, retval.cidx ());
 
       for (octave_idx_type i = 0; i < nz; i++)
         {
--- a/liboctave/util/oct-cmplx.h
+++ b/liboctave/util/oct-cmplx.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1995-2013 John W. Eaton
+Copyright (C) 1995-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague, a.s.
 
 This file is part of Octave.
@@ -36,14 +36,29 @@
 // The abs/arg comparison is definitely more useful (the other one is emulated
 // rather trivially), so let's be consistent and use that all over.
 
+// The standard C library function arg() returns [-pi,pi], which creates a
+// non-unique representation for numbers along the negative real axis branch
+// cut.  Change this to principal value (-pi,pi] by mapping -pi to pi.
+
 #define DEF_COMPLEXR_COMP(OP, OPS) \
 template <class T> \
 inline bool operator OP (const std::complex<T>& a, const std::complex<T>& b) \
 { \
-  FLOAT_TRUNCATE const T ax = std::abs (a), bx = std::abs (b); \
+  FLOAT_TRUNCATE const T ax = std::abs (a); \
+  FLOAT_TRUNCATE const T bx = std::abs (b); \
   if (ax == bx) \
     { \
-      FLOAT_TRUNCATE const T ay = std::arg (a), by = std::arg (b); \
+      FLOAT_TRUNCATE const T ay = std::arg (a); \
+      FLOAT_TRUNCATE const T by = std::arg (b); \
+      if (ay == static_cast<T> (-M_PI)) \
+        { \
+          if (by != static_cast<T> (-M_PI)) \
+            return static_cast<T> (M_PI) OP by; \
+        } \
+      else if (by == static_cast<T> (-M_PI)) \
+        { \
+          return ay OP static_cast<T> (M_PI); \
+        } \
       return ay OP by; \
     } \
   else \
@@ -52,10 +67,13 @@
 template <class T> \
 inline bool operator OP (const std::complex<T>& a, T b) \
 { \
-  FLOAT_TRUNCATE const T ax = std::abs (a), bx = std::abs (b); \
+  FLOAT_TRUNCATE const T ax = std::abs (a); \
+  FLOAT_TRUNCATE const T bx = std::abs (b); \
   if (ax == bx) \
     { \
       FLOAT_TRUNCATE const T ay = std::arg (a); \
+      if (ay == static_cast<T> (-M_PI)) \
+        return static_cast<T> (M_PI) OP 0; \
       return ay OP 0; \
     } \
   else \
@@ -64,10 +82,13 @@
 template <class T> \
 inline bool operator OP (T a, const std::complex<T>& b) \
 { \
-  FLOAT_TRUNCATE const T ax = std::abs (a), bx = std::abs (b); \
+  FLOAT_TRUNCATE const T ax = std::abs (a); \
+  FLOAT_TRUNCATE const T bx = std::abs (b); \
   if (ax == bx) \
     { \
       FLOAT_TRUNCATE const T by = std::arg (b); \
+      if (by == static_cast<T> (-M_PI)) \
+        return 0 OP static_cast<T> (M_PI); \
       return 0 OP by; \
     } \
   else \
--- a/liboctave/util/oct-glob.cc
+++ b/liboctave/util/oct-glob.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 John W. Eaton
+Copyright (C) 2010-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-glob.h
+++ b/liboctave/util/oct-glob.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2010-2013 John W. Eaton
+Copyright (C) 2010-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-inttypes.cc
+++ b/liboctave/util/oct-inttypes.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
@@ -280,7 +280,8 @@
 octave_int_arith_base<uint64_t, false>::mul_internal (uint64_t x, uint64_t y)
 {
   // Get upper words
-  uint64_t ux = x >> 32, uy = y >> 32;
+  uint64_t ux = x >> 32;
+  uint64_t uy = y >> 32;
   uint64_t res;
   if (ux)
     {
@@ -288,21 +289,25 @@
         goto overflow;
       else
         {
-          uint64_t ly = static_cast<uint32_t> (y), uxly = ux*ly;
+          uint64_t ly = static_cast<uint32_t> (y);
+          uint64_t uxly = ux*ly;
           if (uxly >> 32)
             goto overflow;
           uxly <<= 32; // never overflows
-          uint64_t lx = static_cast<uint32_t> (x), lxly = lx*ly;
+          uint64_t lx = static_cast<uint32_t> (x);
+          uint64_t lxly = lx*ly;
           res = add (uxly, lxly);
         }
     }
   else if (uy)
     {
-      uint64_t lx = static_cast<uint32_t> (x), uylx = uy*lx;
+      uint64_t lx = static_cast<uint32_t> (x);
+      uint64_t uylx = uy*lx;
       if (uylx >> 32)
         goto overflow;
       uylx <<= 32; // never overflows
-      uint64_t ly = static_cast<uint32_t> (y), lylx = ly*lx;
+      uint64_t ly = static_cast<uint32_t> (y);
+      uint64_t lylx = ly*lx;
       res = add (uylx, lylx);
     }
   else
@@ -330,11 +335,13 @@
   // (as above) and impose the sign.
   // FIXME: can we do something faster if we HAVE_FAST_INT_OPS?
 
-  uint64_t usx = octave_int_abs (x), usy = octave_int_abs (y);
+  uint64_t usx = octave_int_abs (x);
+  uint64_t usy = octave_int_abs (y);
   bool positive = (x < 0) == (y < 0);
 
   // Get upper words
-  uint64_t ux = usx >> 32, uy = usy >> 32;
+  uint64_t ux = usx >> 32;
+  uint64_t uy = usy >> 32;
   uint64_t res;
   if (ux)
     {
@@ -342,11 +349,13 @@
         goto overflow;
       else
         {
-          uint64_t ly = static_cast<uint32_t> (usy), uxly = ux*ly;
+          uint64_t ly = static_cast<uint32_t> (usy);
+          uint64_t uxly = ux*ly;
           if (uxly >> 32)
             goto overflow;
           uxly <<= 32; // never overflows
-          uint64_t lx = static_cast<uint32_t> (usx), lxly = lx*ly;
+          uint64_t lx = static_cast<uint32_t> (usx);
+          uint64_t lxly = lx*ly;
           res = uxly + lxly;
           if (res < uxly)
             goto overflow;
@@ -354,11 +363,13 @@
     }
   else if (uy)
     {
-      uint64_t lx = static_cast<uint32_t> (usx), uylx = uy*lx;
+      uint64_t lx = static_cast<uint32_t> (usx);
+      uint64_t uylx = uy*lx;
       if (uylx >> 32)
         goto overflow;
       uylx <<= 32; // never overflows
-      uint64_t ly = static_cast<uint32_t> (usy), lylx = ly*lx;
+      uint64_t ly = static_cast<uint32_t> (usy);
+      uint64_t lylx = ly*lx;
       res = uylx + lylx;
       if (res < uylx)
         goto overflow;
@@ -496,11 +507,14 @@
 static void
 umul128 (uint64_t x, uint64_t y, uint32_t w[4])
 {
-  uint64_t lx = static_cast<uint32_t> (x), ux = x >> 32;
-  uint64_t ly = static_cast<uint32_t> (y), uy = y >> 32;
+  uint64_t lx = static_cast<uint32_t> (x);
+  uint64_t ux = x >> 32;
+  uint64_t ly = static_cast<uint32_t> (y);
+  uint64_t uy = y >> 32;
   uint64_t a = lx * ly;
   w[0] = a; a >>= 32;
-  uint64_t uxly = ux*ly, uylx = uy*lx;
+  uint64_t uxly = ux*ly;
+  uint64_t uylx = uy*lx;
   a += static_cast<uint32_t> (uxly); uxly >>= 32;
   a += static_cast<uint32_t> (uylx); uylx >>= 32;
   w[1] = a; a >>= 32;
@@ -753,7 +767,7 @@
   template OCTAVE_API octave_int<T> powf (const float&, const octave_int<T>&); \
   template OCTAVE_API octave_int<T> powf (const octave_int<T>&, const float&); \
   template OCTAVE_API octave_int<T> \
-  bitshift (const octave_int<T>&, int, const octave_int<T>&); \
+  bitshift (const octave_int<T>&, int, const octave_int<T>&);
 
 INSTANTIATE_INTTYPE (int8_t);
 INSTANTIATE_INTTYPE (int16_t);
--- a/liboctave/util/oct-inttypes.h
+++ b/liboctave/util/oct-inttypes.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 John W. Eaton
+Copyright (C) 2004-2015 John W. Eaton
 Copyright (C) 2008-2009 Jaroslav Hajek
 
 This file is part of Octave.
@@ -81,7 +81,8 @@
   class NM \
     { \
     public: \
-      static const bool ltval = (0 OP 1), gtval = (1 OP 0); \
+      static const bool ltval = (0 OP 1); \
+      static const bool gtval = (1 OP 0); \
       template <class T> \
       static bool op (T x, T y) { return x OP y; } \
     }
@@ -92,7 +93,8 @@
   class NM \
     { \
     public: \
-      static const bool ltval = value, gtval = value; \
+      static const bool ltval = value; \
+      static const bool gtval = value; \
       template <class T> \
       static bool op (T, T) { return value; } \
     }
@@ -268,7 +270,9 @@
     // An exhaustive test whether the max and/or min check can be omitted.
     static const bool t_is_signed = std::numeric_limits<T>::is_signed;
     static const bool s_is_signed = std::numeric_limits<S>::is_signed;
-    static const int t_size = sizeof (T), s_size = sizeof (S);
+    static const int t_size = sizeof (T);
+    static const int s_size = sizeof (S);
+
     static const bool omit_chk_min =
       (! s_is_signed || (t_is_signed && t_size >= s_size));
     static const bool omit_chk_max =
@@ -306,7 +310,7 @@
     // If val is even, but orig_val is odd, we're one unit off.
     if (orig_val % 2 && val / 2 == xround (val / 2))
       // FIXME: is this always correct?
-      val *= (static_cast<S>(1) - (std::numeric_limits<S>::epsilon () / 2));
+      val *= (static_cast<S> (1) - (std::numeric_limits<S>::epsilon () / 2));
     return val;
   }
 
@@ -420,7 +424,8 @@
   {
     if (y != 0)
       {
-        T z = x / y, w = x % y;
+        T z = x / y;
+        T w = x % y;
         if (w >= y-w) z += 1;
         return z;
       }
@@ -610,7 +615,8 @@
     // compiler from interfering. Also, the signed operations on small types
     // actually return int.
     T u = static_cast<UT> (x) + static_cast<UT> (y);
-    T ux = u ^ x, uy = u ^ y;
+    T ux = u ^ x;
+    T uy = u ^ y;
     if ((ux & uy) < 0)
       {
         u = octave_int_base<T>::max_val () + __signbit (~u);
@@ -651,7 +657,8 @@
     // compiler from interfering. Also, the signed operations on small types
     // actually return int.
     T u = static_cast<UT> (x) - static_cast<UT> (y);
-    T ux = u ^ x, uy = u ^ ~y;
+    T ux = u ^ x;
+    T uy = u ^ ~y;
     if ((ux & uy) < 0)
       {
         u = octave_int_base<T>::max_val () + __signbit (~u);
@@ -1137,7 +1144,7 @@
   template <class T> \
   inline octave_int<T> \
   operator OP (const double& x, const octave_int<T>& y) \
-  { return octave_int<T> (x OP static_cast<double> (y)); } \
+  { return octave_int<T> (x OP static_cast<double> (y)); }
 
 #ifdef OCTAVE_INT_USE_LONG_DOUBLE
 // Handle mixed op using long double
@@ -1286,7 +1293,8 @@
 octave_int<T>
 xmax (const octave_int<T>& x, const octave_int<T>& y)
 {
-  const T xv = x.value (), yv = y.value ();
+  const T xv = x.value ();
+  const T yv = y.value ();
   return octave_int<T> (xv >= yv ? xv : yv);
 }
 
@@ -1294,7 +1302,8 @@
 octave_int<T>
 xmin (const octave_int<T>& x, const octave_int<T>& y)
 {
-  const T xv = x.value (), yv = y.value ();
+  const T xv = x.value ();
+  const T yv = y.value ();
   return octave_int<T> (xv <= yv ? xv : yv);
 }
 
--- a/liboctave/util/oct-locbuf.cc
+++ b/liboctave/util/oct-locbuf.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
@@ -140,8 +140,12 @@
     }
   else
     {
-      (*current_liboctave_warning_handler)
-        ("octave_chunk_buffer::clear: %d active allocations remain!",
+      // FIXME: Doesn't this situation represent a programming error of
+      // some kind?  If so, maybe this should be a fatal error?
+
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:local-buffer-inconsistency",
+         "octave_chunk_buffer::clear: %d active allocations remain!",
          active);
     }
 }
--- a/liboctave/util/oct-locbuf.h
+++ b/liboctave/util/oct-locbuf.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Jaroslav Hajek
+Copyright (C) 2008-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-md5.cc
+++ b/liboctave/util/oct-md5.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-md5.h
+++ b/liboctave/util/oct-md5.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2007-2013 David Bateman
+Copyright (C) 2007-2015 David Bateman
 
 This file is part of Octave.
 
deleted file mode 100644
--- a/liboctave/util/oct-mem.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-
-Copyright (C) 2009-2013 VZLU Prague
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_oct_mem_h)
-#define octave_oct_mem_h 1
-
-#include <cstddef>
-#include <cstring>
-#include <algorithm>
-
-#include "oct-cmplx.h"
-#include "oct-inttypes.h"
-
-// NOTE: These functions are used to optimize stuff where performance is a
-// priority. They assume that the std::complex and octave_int can be
-// manipulated as plain memory, an assumption that is always true in practice
-// but not theoretically guaranteed by the C++ standard. In the future, C++ may
-// provide a better way to accomplish these tasks.
-
-inline size_t safe_size_comp (size_t n, size_t size)
-{
-  if (n > static_cast<size_t> (-1) / size)
-    throw std::bad_alloc ();
-  return n * size;
-}
-
-// Unaliased copy. This boils down to memcpy, even for octave_int and
-// complex types.
-
-template <class T>
-inline void copy_or_memcpy (size_t n, const T *src, T *dest)
-{ std::copy (src, src + n, dest); }
-
-#define DEFINE_POD_UCOPY(T) \
-inline void copy_or_memcpy (size_t n, const T *src, T *dest) \
-{ std::memcpy (dest, src, n * sizeof (T)); }
-
-DEFINE_POD_UCOPY (double)
-DEFINE_POD_UCOPY (float)
-DEFINE_POD_UCOPY (char)
-DEFINE_POD_UCOPY (short)
-DEFINE_POD_UCOPY (int)
-DEFINE_POD_UCOPY (long)
-DEFINE_POD_UCOPY (unsigned char)
-DEFINE_POD_UCOPY (unsigned short)
-DEFINE_POD_UCOPY (unsigned int)
-DEFINE_POD_UCOPY (unsigned long)
-
-DEFINE_POD_UCOPY (Complex)
-DEFINE_POD_UCOPY (FloatComplex)
-
-template <class T>
-DEFINE_POD_UCOPY (octave_int<T>)
-
-// Fill by value, with a check for zero. This boils down to memset if value is
-// a POD zero.
-template <class T>
-inline void fill_or_memset (size_t n, const T& value, T *dest)
-{ std::fill_n (dest, n, value); }
-
-template <class T>
-inline bool helper_is_zero_mem (const T& value)
-{
-  // get integer type of the same size.
-  typedef typename query_integer_type<sizeof (T), false>::type IT;
-  return *(reinterpret_cast<const IT *>(&value)) == 0;
-}
-
-template <class T>
-inline bool helper_is_zero_mem (const std::complex<T>& value)
-{
-  return (helper_is_zero_mem (value.real ())
-          && helper_is_zero_mem (value.imag ()));
-}
-
-template <class T>
-inline bool helper_is_zero_mem (const octave_int<T>& value)
-{ return value.value () == T (); }
-
-#define DEFINE_POD_FILL(T) \
-inline void fill_or_memset (size_t n, const T& value, T *dest) \
-{ \
-  if (helper_is_zero_mem (value)) \
-    std::memset (dest, 0, n * sizeof (T)); \
-  else \
-    std::fill_n (dest, n, value); \
-}
-
-DEFINE_POD_FILL (double)
-DEFINE_POD_FILL (float)
-DEFINE_POD_FILL (char)
-DEFINE_POD_FILL (short)
-DEFINE_POD_FILL (int)
-DEFINE_POD_FILL (long)
-DEFINE_POD_FILL (unsigned char)
-DEFINE_POD_FILL (unsigned short)
-DEFINE_POD_FILL (unsigned int)
-DEFINE_POD_FILL (unsigned long)
-
-DEFINE_POD_FILL (Complex)
-DEFINE_POD_FILL (FloatComplex)
-
-template <class T>
-DEFINE_POD_FILL (octave_int<T>)
-
-// Uninitialized allocation.
-// Will not initialize memory for complex and octave_int.
-// Memory allocated by octave_new should be freed by octave_delete.
-template <class T>
-inline T *no_ctor_new (size_t n)
-{
-  // Some systems let us allocate > 2GB memory even though size_t, which is
-  // either buggy or completely cuckoo, so let's check here to stay safe.
-  safe_size_comp (n, sizeof (T));
-  return new T [n];
-}
-template <class T>
-inline void no_ctor_delete (T *ptr)
-{ delete [] ptr; }
-
-#define DEFINE_POD_NEW_DELETE(T) \
-template <> \
-inline T *no_ctor_new<T > (size_t n) \
-{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); } \
-template <> \
-inline void no_ctor_delete<T > (T *ptr) \
-{ delete [] reinterpret_cast<char *> (ptr); }
-
-DEFINE_POD_NEW_DELETE (Complex)
-DEFINE_POD_NEW_DELETE (FloatComplex)
-
-DEFINE_POD_NEW_DELETE (octave_int8)
-DEFINE_POD_NEW_DELETE (octave_int16)
-DEFINE_POD_NEW_DELETE (octave_int32)
-DEFINE_POD_NEW_DELETE (octave_int64)
-DEFINE_POD_NEW_DELETE (octave_uint8)
-DEFINE_POD_NEW_DELETE (octave_uint16)
-DEFINE_POD_NEW_DELETE (octave_uint32)
-DEFINE_POD_NEW_DELETE (octave_uint64)
-
-#endif /* octave_oct_mem_h */
--- a/liboctave/util/oct-mutex.cc
+++ b/liboctave/util/oct-mutex.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-mutex.h
+++ b/liboctave/util/oct-mutex.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-refcount.h
+++ b/liboctave/util/oct-refcount.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 Jaroslav Hajek
+Copyright (C) 2012-2015 Jaroslav Hajek
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-rl-edit.c
+++ b/liboctave/util/oct-rl-edit.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -74,6 +74,14 @@
   rl_variable_bind ("blink-matching-paren", val ? "1" : "0");
 }
 
+int
+octave_rl_erase_empty_line (int val)
+{
+  int retval = rl_erase_empty_line;
+  rl_erase_empty_line = val;
+  return retval;
+}
+
 /* It would be much simpler if we could just call _rl_clear_screen to
    only clear the screen, but it is not a public function, and on some
    systems, it is not exported from shared library versions of
@@ -117,6 +125,12 @@
 }
 
 void
+octave_rl_set_screen_size (int ht, int wd)
+{
+  rl_set_screen_size (ht, wd);
+}
+
+void
 octave_rl_restore_terminal_state ()
 {
   if (rl_deprep_term_function)
@@ -136,6 +150,12 @@
 }
 
 void
+octave_rl_kill_full_line (void)
+{
+  rl_kill_full_line (0, 0);
+}
+
+void
 octave_rl_insert_text (const char *s)
 {
   rl_insert_text (s);
@@ -242,6 +262,14 @@
   return retval;
 }
 
+int
+octave_rl_prefer_env_winsize (int arg)
+{
+  int retval = rl_prefer_env_winsize;
+  rl_prefer_env_winsize = arg;
+  return retval;
+}
+
 void
 octave_rl_done (int arg)
 {
--- a/liboctave/util/oct-rl-edit.h
+++ b/liboctave/util/oct-rl-edit.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -56,18 +56,26 @@
 
 extern void octave_rl_enable_paren_matching (int);
 
+extern int octave_rl_erase_empty_line (int);
+
 extern void octave_rl_init (void);
 
 extern void octave_rl_clear_screen (int skip_redisplay);
 
 extern void octave_rl_resize_terminal (void);
 
+extern void octave_rl_resize_terminal (void);
+
+extern void octave_rl_set_screen_size (int ht, int wd);
+
 extern void octave_rl_restore_terminal_state (void);
 
 extern char *octave_rl_copy_line (void);
 
 extern void octave_rl_replace_line (const char *s, int clear_undo);
 
+extern void octave_rl_kill_full_line (void);
+
 extern void octave_rl_insert_text (const char *);
 
 extern int octave_rl_newline (int, int);
@@ -98,6 +106,8 @@
 
 extern int octave_rl_filename_quoting_desired (int);
 
+extern int octave_rl_prefer_env_winsize (int);
+
 extern void octave_rl_done (int);
 
 extern char *octave_rl_filename_completion_function (const char *, int);
--- a/liboctave/util/oct-rl-hist.c
+++ b/liboctave/util/oct-rl-hist.c
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-rl-hist.h
+++ b/liboctave/util/oct-rl-hist.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2000-2013 John W. Eaton
+Copyright (C) 2000-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/oct-shlib.cc
+++ b/liboctave/util/oct-shlib.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -87,8 +87,9 @@
     {
       tm_loaded = fs.mtime ();
 
-      (*current_liboctave_warning_handler)
-        ("library %s not reloaded due to existing references", file.c_str ());
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:library-reload",
+         "library %s not reloaded due to existing references", file.c_str ());
     }
 }
 
--- a/liboctave/util/oct-shlib.h
+++ b/liboctave/util/oct-shlib.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1999-2013 John W. Eaton
+Copyright (C) 1999-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
@@ -65,7 +65,7 @@
 
     bool is_out_of_date (void) const;
 
-    // This method will be overriden conditionally.
+    // This method will be overridden conditionally.
     static shlib_rep *new_instance (const std::string& f);
 
     static shlib_rep *get_instance (const std::string& f, bool fake);
--- a/liboctave/util/oct-sort.cc
+++ b/liboctave/util/oct-sort.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2003-2013 David Bateman
+Copyright (C) 2003-2015 David Bateman
 Copyright (C) 2008-2009 Jaroslav Hajek
 Copyright (C) 2009-2010 VZLU Prague
 
@@ -158,7 +158,8 @@
   for (; start < nel; ++start)
     {
       /* set l to where *start belongs */
-      octave_idx_type l = 0, r = start;
+      octave_idx_type l = 0;
+      octave_idx_type r = start;
       T pivot = data[start];
       /* Invariants:
        * pivot >= all in [lo, l).
@@ -202,7 +203,8 @@
   for (; start < nel; ++start)
     {
       /* set l to where *start belongs */
-      octave_idx_type l = 0, r = start;
+      octave_idx_type l = 0;
+      octave_idx_type r = start;
       T pivot = data[start];
       /* Invariants:
        * pivot >= all in [lo, l).
@@ -1694,7 +1696,8 @@
         {
           // Not the final column.
           assert (n > 1);
-          const T *hi = lo + n, *lst = lo;
+          const T *hi = lo + n;
+          const T *lst = lo;
           for (lo++; lo < hi; lo++)
             {
               if (comp (*lst, *lo))
@@ -1756,7 +1759,8 @@
 octave_sort<T>::lookup (const T *data, octave_idx_type nel,
                         const T& value, Comp comp)
 {
-  octave_idx_type lo = 0, hi = nel;
+  octave_idx_type lo = 0;
+  octave_idx_type hi = nel;
 
   while (lo < hi)
     {
@@ -1834,7 +1838,8 @@
 {
   if (rev)
     {
-      octave_idx_type i = 0, j = nvalues - 1;
+      octave_idx_type i = 0;
+      octave_idx_type j = nvalues - 1;
 
       if (nvalues > 0 && nel > 0)
         {
@@ -1856,7 +1861,8 @@
     }
   else
     {
-      octave_idx_type i = 0, j = 0;
+      octave_idx_type i = 0;
+      octave_idx_type j = 0;
 
       if (nvalues > 0 && nel > 0)
         {
--- a/liboctave/util/oct-sort.h
+++ b/liboctave/util/oct-sort.h
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2003-2013 David Bateman
+Copyright (C) 2003-2015 David Bateman
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/util/oct-sparse.h
+++ b/liboctave/util/oct-sparse.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 
 This file is part of Octave.
 
@@ -94,4 +94,17 @@
 #endif
 #endif
 
+// Cope with new suitesparse versions
+//
+#if defined (SUITESPARSE_VERSION)
+# if SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3)
+#  define SUITESPARSE_NAME(name) SuiteSparse_ ## name
+#  define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign)
+#  define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign))
+# else
+#  define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (f_var = f_assign)
+#  define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (f_var = CHOLMOD_NAME (f_assign))
+# endif
 #endif
+
+#endif
--- a/liboctave/util/pathsearch.cc
+++ b/liboctave/util/pathsearch.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/pathsearch.h
+++ b/liboctave/util/pathsearch.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/singleton-cleanup.cc
+++ b/liboctave/util/singleton-cleanup.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/sparse-sort.cc
+++ b/liboctave/util/sparse-sort.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/util/sparse-sort.h
+++ b/liboctave/util/sparse-sort.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2004-2013 David Bateman
+Copyright (C) 2004-2015 David Bateman
 Copyright (C) 1998-2004 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/util/sparse-util.cc
+++ b/liboctave/util/sparse-util.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
@@ -48,12 +48,9 @@
   // Ignore CHOLMOD_NOT_POSDEF, since we handle that in Fchol as an
   // error or exit status.
   if (status != CHOLMOD_NOT_POSDEF)
-    {
-      (*current_liboctave_warning_handler)("warning %i, at line %i in file %s",
-                                           status, line, file);
-
-      (*current_liboctave_warning_handler)(message);
-    }
+    (*current_liboctave_warning_with_id_handler)
+      ("Octave:cholmod-message", "warning %i, at line %i in file %s: %s",
+       status, line, file, message);
 }
 
 int
--- a/liboctave/util/sparse-util.h
+++ b/liboctave/util/sparse-util.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2005-2013 David Bateman
+Copyright (C) 2005-2015 David Bateman
 Copyright (C) 1998-2005 Andy Adler
 
 This file is part of Octave.
--- a/liboctave/util/statdefs.h
+++ b/liboctave/util/statdefs.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/str-vec.cc
+++ b/liboctave/util/str-vec.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -250,14 +250,10 @@
     nc = 1;
 
   // Calculate the number of rows that will be in each column except
-  // possibly  for a short column on the right.
+  // possibly for a short column on the right.
 
   octave_idx_type nr = total_names / nc + (total_names % nc != 0);
 
-  // Recalculate columns based on rows.
-
-  nc = total_names / nr + (total_names % nr != 0);
-
   octave_idx_type count;
   for (octave_idx_type row = 0; row < nr; row++)
     {
--- a/liboctave/util/str-vec.h
+++ b/liboctave/util/str-vec.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1996-2013 John W. Eaton
+Copyright (C) 1996-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/sun-utils.h
+++ b/liboctave/util/sun-utils.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/liboctave/util/unwind-prot.cc
+++ b/liboctave/util/unwind-prot.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/util/unwind-prot.h
+++ b/liboctave/util/unwind-prot.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 Copyright (C) 2009-2010 VZLU Prague
 
 This file is part of Octave.
--- a/liboctave/util/url-transfer.cc
+++ b/liboctave/util/url-transfer.cc
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2006-2013 Alexander Barth
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2006-2015 Alexander Barth
 Copyright (C) 2009 David Bateman
 
 This file is part of Octave.
--- a/liboctave/util/url-transfer.h
+++ b/liboctave/util/url-transfer.h
@@ -1,7 +1,7 @@
 /*
 
-Copyright (C) 2013 John W. Eaton
-Copyright (C) 2006-2013 Alexander Barth
+Copyright (C) 2013-2015 John W. Eaton
+Copyright (C) 2006-2015 Alexander Barth
 Copyright (C) 2009 David Bateman
 
 This file is part of Octave.
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -1,6 +1,6 @@
 dnl aclocal.m4 -- extra macros for configuring Octave
 dnl
-dnl Copyright (C) 1995-2013 John W. Eaton
+dnl Copyright (C) 1995-2015 John W. Eaton
 dnl
 dnl This file is part of Octave.
 dnl
@@ -478,6 +478,69 @@
   fi
 ])
 dnl
+dnl Check whether the Qt QTabWidget::setMovable() function exists.
+dnl This function was added in Qt 4.5.
+dnl
+AC_DEFUN([OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE], [
+  AC_CACHE_CHECK([whether Qt has the QTabWidget::setMovable() function],
+    [octave_cv_func_qtabwidget_setmovable],
+    [AC_LANG_PUSH(C++)
+    ac_octave_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #include <QTabWidget>
+        class tab_widget : public QTabWidget
+        {
+        public:
+          tab_widget (QWidget *parent = 0) : QTabWidget (parent) { this->setMovable (true); }
+          ~tab_widget () {}
+        };
+        ]], [[
+        tab_widget tw;
+        ]])],
+      octave_cv_func_qtabwidget_setmovable=yes,
+      octave_cv_func_qtabwidget_setmovable=no)
+    CPPFLAGS="$ac_octave_save_CPPFLAGS"
+    AC_LANG_POP(C++)
+  ])
+  if test $octave_cv_func_qtabwidget_setmovable = yes; then
+    AC_DEFINE(HAVE_QTABWIDGET_SETMOVABLE, 1,
+      [Define to 1 if Qt has the QTabWidget::setMovable() function.])
+  fi
+])
+dnl
+dnl Check whether the QsciScintilla::findFirstInSelection () function exists.
+dnl This function was added in QScintilla 2.7.
+dnl
+AC_DEFUN([OCTAVE_CHECK_FUNC_QSCI_FINDSELECTION], [
+  AC_CACHE_CHECK([whether QSci has the QsciScintilla::findFirstInSelection () function],
+    [octave_cv_func_qsci_findfirstinselection],
+    [AC_LANG_PUSH(C++)
+    ac_octave_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #include <Qsci/qsciscintilla.h>
+        class qsci : public QsciScintilla
+        {
+        public:
+          qsci (QWidget *parent = 0) : QsciScintilla (parent)
+          { this->findFirstInSelection (QString ("x"),true,true,true,true,true); }
+          ~qsci () {}
+        };
+        ]], [[
+        qsci edit;
+        ]])],
+      octave_cv_func_qsci_findfirstinselection=yes,
+      octave_cv_func_qsci_findfirstinselection=no)
+    CPPFLAGS="$ac_octave_save_CPPFLAGS"
+    AC_LANG_POP(C++)
+  ])
+  if test $octave_cv_func_qsci_findfirstinselection = yes; then
+    AC_DEFINE(HAVE_QSCI_FINDSELECTION, 1,
+      [Define to 1 if Qsci has the QsciScintilla::findFirstInSelection () function.])
+  fi
+])
+dnl
 dnl Check whether HDF5 library has version 1.6 API functions.
 dnl
 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [
@@ -535,7 +598,6 @@
     ;;
   esac
 
-  [TEXINFO_]m4_toupper([$1])=
   warn_$1="$3"
   m4_set_add([summary_warning_list], [warn_$1])
 
@@ -560,8 +622,7 @@
         m4_ifblank([$8], [
           warn_$1=
           AC_DEFINE([HAVE_]m4_toupper([$1]), 1,
-            [Define to 1 if $2 is available.])
-          [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8])
+            [Define to 1 if $2 is available.])], [$8])
       fi
     fi
     m4_ifnblank([$6], [AC_LANG_POP($6)])
@@ -571,7 +632,6 @@
   fi
 
   AC_SUBST(m4_toupper([$1])_LIBS)
-  AC_SUBST([TEXINFO_]m4_toupper([$1]))
   if test -n "$warn_$1"; then
     AC_MSG_WARN([$warn_$1])
     m4_toupper([$1])_LIBS=
@@ -898,6 +958,16 @@
     ])
 
     if test $have_opengl_incs = yes; then
+      AC_CHECK_HEADERS([GL/glext.h OpenGL/glext.h], [], [], [
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+#if defined (HAVE_GL_GL_H)
+# include <GL/gl.h>
+#elif defined (HAVE_OPENGL_GL_H)
+# include <OpenGL/gl.h>
+#endif
+      ])
       case $canonical_host_type in
         *-*-mingw32* | *-*-msdosmsvc)
           save_LIBS="$LIBS"
@@ -1021,37 +1091,6 @@
   AC_SUBST(TERM_LIBS)
 ])
 dnl
-dnl Check for support of OpenMP with a given compiler flag.
-dnl If found define HAVE_OPENMP and add the compile flag
-dnl to CFLAGS and CXXFLAGS.
-dnl
-AC_DEFUN([OCTAVE_CHECK_OPENMP], [
-  AC_MSG_CHECKING([for support of OpenMP])
-  ac_octave_save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
-  AC_CACHE_VAL([octave_cv_check_openmp],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-        #include <omp.h>
-        #include <stdio.h>
-        ]], [[
-        int main(int argc, char* argv[])
-        {
-          _Pragma("omp parallel")
-          printf("Hello, world.\n");
-          return 0;
-        }
-      ]])],
-      octave_cv_openmp=yes, octave_cv_openmmp=no, octave_cv_openmp=no)
-  ])
-  AC_MSG_RESULT([$octave_cv_openmp])
-  if test $octave_cv_openmp = yes; then
-    AC_DEFINE(HAVE_OPENMP, 1, [Define to 1 if compiler supports OpenMP.])
-    CXXFLAGS="$CXXFLAGS $1"
-  else
-    CFLAGS="$ac_octave_save_CFLAGS"
-  fi
-])
-dnl
 dnl Check for the Qhull version.
 dnl
 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], [
@@ -1737,6 +1776,58 @@
   fi
 ])
 dnl
+dnl Check for raw_fd_ostream API
+dnl
+AC_DEFUN([OCTAVE_LLVM_RAW_FD_OSTREAM_API], [
+  AC_CACHE_CHECK([check LLVM::raw_fd_ostream arg type is llvm::sys:fs],
+    [octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs],
+    [AC_LANG_PUSH(C++)
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[
+          #include <llvm/Support/raw_os_ostream.h>
+          ]], [[
+          std::string str;
+          llvm::raw_fd_ostream fout ("", str, llvm::sys::fs::F_Binary);
+        ]])],
+        octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=yes,
+        octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=no)
+    AC_LANG_POP(C++)
+  ])
+  if test $octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs = yes; then
+    AC_DEFINE(RAW_FD_OSTREAM_ARG_IS_LLVM_SYS_FS, 1,
+      [Define to 1 if LLVM::raw_fd_ostream arg type is llvm::sys:fs.])
+  fi
+])
+dnl
+dnl Check for legacy::PassManager API
+dnl
+AC_DEFUN([OCTAVE_LLVM_LEGACY_PASSMANAGER_API], [
+  AC_CACHE_CHECK([check for LLVM::legacy::PassManager],
+    [octave_cv_legacy_passmanager],
+    [AC_LANG_PUSH(C++)
+      save_LIBS="$LIBS"
+      LIBS="$LLVM_LIBS $LIBS"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM([[
+          #include <llvm/IR/LegacyPassManager.h>
+          ]], [[
+          llvm::Module *module;
+          llvm::legacy::PassManager *module_pass_manager;
+          llvm::legacy::FunctionPassManager *pass_manager;
+          module_pass_manager = new llvm::legacy::PassManager ();
+          pass_manager = new llvm::legacy::FunctionPassManager (module);
+        ]])],
+        octave_cv_legacy_passmanager=yes,
+        octave_cv_legacy_passmanager=no)
+      LIBS="$save_LIBS"
+    AC_LANG_POP(C++)
+  ])
+  if test $octave_cv_legacy_passmanager = yes; then
+    AC_DEFINE(LEGACY_PASSMANAGER, 1,
+      [Define to 1 if LLVM::legacy::PassManager exists.])
+  fi
+])
+dnl
 dnl Check for ar.
 dnl
 AC_DEFUN([OCTAVE_PROG_AR], [
@@ -1994,6 +2085,23 @@
   AC_SUBST(GPERF)
 ])
 dnl
+dnl Find icotool program.
+dnl
+AC_DEFUN([OCTAVE_PROG_ICOTOOL], [
+  AC_CHECK_PROG(ICOTOOL, icotool, icotool, [])
+  if test -z "$ICOTOOL"; then
+    ICOTOOL='$(top_srcdir)/build-aux/missing icotool'
+    warn_icotool="
+
+I didn't find icotool, but it's only a problem if you need to
+reconstruct octave-logo.ico, which is the case if you're building from
+VCS sources.
+"
+    OCTAVE_CONFIGURE_WARNING([warn_icotool])
+  fi
+  AC_SUBST(ICOTOOL)
+])
+dnl
 dnl Check for makeinfo.
 dnl
 AC_DEFUN([OCTAVE_PROG_MAKEINFO], [
@@ -2048,6 +2156,23 @@
   AC_SUBST(PYTHON)
 ])
 dnl
+dnl Find rsvg-convert program.
+dnl
+AC_DEFUN([OCTAVE_PROG_RSVG_CONVERT], [
+  AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert, [])
+  if test -z "$RSVG_CONVERT"; then
+    RSVG_CONVERT='$(top_srcdir)/build-aux/missing rsvg-convert'
+    warn_rsvg_convert="
+
+I didn't find rsvg-convert, but it's only a problem if you need to
+reconstruct octave-logo-*.png, which is the case if you're building
+from VCS sources.
+"
+    OCTAVE_CONFIGURE_WARNING([warn_rsvg_convert])
+  fi
+  AC_SUBST(RSVG_CONVERT)
+])
+dnl
 dnl Find sed program.
 dnl
 # Check for a fully-functional sed program, that truncates
--- a/m4/ax_blas.m4
+++ b/m4/ax_blas.m4
@@ -63,12 +63,13 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 12
+#serial 14
 
 AU_ALIAS([ACX_BLAS], [AX_BLAS])
 AC_DEFUN([AX_BLAS], [
 AC_PREREQ(2.50)
 AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
+AC_REQUIRE([AC_CANONICAL_HOST])
 ax_blas_ok=no
 
 AC_ARG_WITH(blas,
@@ -107,6 +108,12 @@
 	LIBS="$save_LIBS"
 fi
 
+# BLAS in OpenBLAS library? (http://xianyi.github.com/OpenBLAS/)
+if test $ax_blas_ok = no; then
+	AC_CHECK_LIB(openblas, $sgemm, [ax_blas_ok=yes
+			                BLAS_LIBS="-lopenblas"])
+fi
+
 # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
 if test $ax_blas_ok = no; then
 	AC_CHECK_LIB(atlas, ATL_xerbla,
@@ -130,6 +137,36 @@
 
 # BLAS in Intel MKL library?
 if test $ax_blas_ok = no; then
+	# MKL for gfortran
+	if test x"$ac_cv_fc_compiler_gnu" = xyes; then
+		# 64 bit
+		if test $host_cpu = x86_64; then
+			AC_CHECK_LIB(mkl_gf_lp64, $sgemm,
+			[ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
+			[-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread])
+		# 32 bit
+		elif test $host_cpu = i686; then
+			AC_CHECK_LIB(mkl_gf, $sgemm,
+				[ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf -lmkl_sequential -lmkl_core -lpthread"],,
+				[-lmkl_gf -lmkl_sequential -lmkl_core -lpthread])
+		fi
+	# MKL for other compilers (Intel, PGI, ...?)
+	else
+		# 64-bit
+		if test $host_cpu = x86_64; then
+			AC_CHECK_LIB(mkl_intel_lp64, $sgemm,
+				[ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
+				[-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread])
+		# 32-bit
+		elif test $host_cpu = i686; then
+			AC_CHECK_LIB(mkl_intel, $sgemm,
+				[ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel -lmkl_sequential -lmkl_core -lpthread"],,
+				[-lmkl_intel -lmkl_sequential -lmkl_core -lpthread])
+		fi
+	fi
+fi
+# Old versions of MKL
+if test $ax_blas_ok = no; then
 	AC_CHECK_LIB(mkl, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lmkl -lguide -lpthread"],,[-lguide -lpthread])
 fi
 
--- a/m4/ax_blas_f77_func.m4
+++ b/m4/ax_blas_f77_func.m4
@@ -55,21 +55,20 @@
 #serial 8
 
 AU_ALIAS([ACX_BLAS_F77_FUNC], [AX_BLAS_F77_FUNC])
-
 AC_DEFUN([AX_BLAS_F77_FUNC], [
-  AC_PREREQ(2.50)
-  AC_REQUIRE([AX_BLAS])
+AC_PREREQ(2.50)
+AC_REQUIRE([AX_BLAS])
 
-  ## F77 call-compatibility checks
-  if test "$cross_compiling" = yes ; then
-    ifelse($3, ,$1,$3)
-  elif test x"$ax_blas_ok" = xyes; then
-    save_ax_blas_f77_func_LIBS="$LIBS"
-    LIBS="$BLAS_LIBS $LIBS"
-    AC_LANG_PUSH(Fortran 77)
-    ## LSAME check (LOGICAL return values)
-    AC_MSG_CHECKING([whether LSAME is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+# F77 call-compatibility checks
+if test "$cross_compiling" = yes ; then
+	ifelse($3, ,$1,$3)
+elif test x"$ax_blas_ok" = xyes; then
+	save_ax_blas_f77_func_LIBS="$LIBS"
+	LIBS="$BLAS_LIBS $LIBS"
+	AC_LANG_PUSH(Fortran 77)
+# LSAME check (LOGICAL return values)
+	AC_MSG_CHECKING([whether LSAME is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       logical lsame,w
       external lsame
       character c1,c2
@@ -79,13 +78,12 @@
       if (w) stop 1
       w = lsame(c1,c1)
       if (.not. w) stop 1
-      ]])],
-      [ax_blas_lsame_fcall_ok=yes],
-      [ax_blas_lsame_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_lsame_fcall_ok])
-    ## ISAMAX check (INTEGER return values)
-    AC_MSG_CHECKING([whether ISAMAX is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_lsame_fcall_ok=yes],
+	[ax_blas_lsame_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_lsame_fcall_ok])
+# ISAMAX check (INTEGER return values)
+	AC_MSG_CHECKING([whether ISAMAX is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       integer isamax,i
       external isamax
       real a(2)
@@ -93,73 +91,68 @@
       a(2) = -2e0
       i = isamax(2,a,1)
       if (i.ne.2) stop 1
-      ]])],
-      [ax_blas_isamax_fcall_ok=yes],
-      [ax_blas_isamax_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_isamax_fcall_ok])
-    ## SDOT check (REAL return values)
-    AC_MSG_CHECKING([whether SDOT is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_isamax_fcall_ok=yes],
+	[ax_blas_isamax_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_isamax_fcall_ok])
+# SDOT check (REAL return values)
+	AC_MSG_CHECKING([whether SDOT is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       real sdot,a(1),b(1),w
       external sdot
       a(1) = 1e0
       b(1) = 2e0
       w = sdot(1,a,1,b,1)
       if (w .ne. a(1)*b(1)) stop 1
-      ]])],
-      [ax_blas_sdot_fcall_ok=yes],
-      [ax_blas_sdot_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_sdot_fcall_ok])
-    ## DDOT check (DOUBLE return values)
-    AC_MSG_CHECKING([whether DDOT is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_sdot_fcall_ok=yes],
+	[ax_blas_sdot_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_sdot_fcall_ok])
+# DDOT check (DOUBLE return values)
+	AC_MSG_CHECKING([whether DDOT is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       double precision ddot,a(1),b(1),w
       external ddot
       a(1) = 1d0
       b(1) = 2d0
       w = ddot(1,a,1,b,1)
       if (w .ne. a(1)*b(1)) stop 1
-      ]])],
-      [ax_blas_ddot_fcall_ok=yes],
-      [ax_blas_ddot_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_ddot_fcall_ok])
-    ## CDOTU check (COMPLEX return values)
-    AC_MSG_CHECKING([whether CDOTU is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_ddot_fcall_ok=yes],
+	[ax_blas_ddot_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_ddot_fcall_ok])
+# CDOTU check (COMPLEX return values)
+	AC_MSG_CHECKING([whether CDOTU is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       complex cdotu,a(1),b(1),w
       external cdotu
       a(1) = cmplx(1e0,1e0)
       b(1) = cmplx(1e0,2e0)
       w = cdotu(1,a,1,b,1)
       if (w .ne. a(1)*b(1)) stop 1
-      ]])],
-      [ax_blas_cdotu_fcall_ok=yes],
-      [ax_blas_cdotu_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_cdotu_fcall_ok])
-    ## ZDOTU check (DOUBLE COMPLEX return values)
-    AC_MSG_CHECKING([whether ZDOTU is called correctly from Fortran])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_cdotu_fcall_ok=yes],
+	[ax_blas_cdotu_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_cdotu_fcall_ok])
+# ZDOTU check (DOUBLE COMPLEX return values)
+	AC_MSG_CHECKING([whether ZDOTU is called correctly from Fortran])
+	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       double complex zdotu,a(1),b(1),w
       external zdotu
       a(1) = dcmplx(1d0,1d0)
       b(1) = dcmplx(1d0,2d0)
       w = zdotu(1,a,1,b,1)
       if (w .ne. a(1)*b(1)) stop 1
-      ]])],
-      [ax_blas_zdotu_fcall_ok=yes],
-      [ax_blas_zdotu_fcall_ok=no])
-    AC_MSG_RESULT([$ax_blas_zdotu_fcall_ok])
-    ## Check for correct integer size
-    ## FIXME: this may fail with things like -ftrapping-math.
-    AC_MSG_CHECKING([whether the integer size is correct])
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[
+      ]]),[ax_blas_zdotu_fcall_ok=yes],
+	[ax_blas_zdotu_fcall_ok=no])
+	AC_MSG_RESULT([$ax_blas_zdotu_fcall_ok])
+# Check for correct integer size
+# FIXME: this may fail with things like -ftrapping-math.
+        AC_MSG_CHECKING([whether the integer size is correct])
+        AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       integer n,nn(3)
       real s,a(1),b(1),sdot
       a(1) = 1.0
       b(1) = 1.0
-c Generate -2**32 + 1, if possible
+c Generate -2**33 + 1, if possible
       n = 2
-      n = -4 ** (n ** 30)
+      n = -4 * (n ** 30)
       n = n + 1
       if (n >= 0) goto 1
 c This means we're on 64-bit integers. Check whether the BLAS is, too.
@@ -173,40 +166,39 @@
       nn(3) = -1
       s = sdot(nn(2),a,1,b,1)
       if (s .ne. 1.0) stop 1
-      ]])],
-      [ax_blas_integer_size_ok=yes],
-      [ax_blas_integer_size_ok=no])
-    AC_MSG_RESULT([$ax_blas_integer_size_ok])
+       ]]),[ax_blas_integer_size_ok=yes],
+	[ax_blas_integer_size_ok=no])
+	AC_MSG_RESULT([$ax_blas_integer_size_ok])
 
-    AC_LANG_POP(Fortran 77)
+	AC_LANG_POP(Fortran 77)
 
-    ## if any of the tests failed, reject the BLAS library
-    if test $ax_blas_lsame_fcall_ok = yes \
-      -a $ax_blas_sdot_fcall_ok = yes \
-      -a $ax_blas_ddot_fcall_ok = yes \
-      -a $ax_blas_cdotu_fcall_ok = yes \
-      -a $ax_blas_zdotu_fcall_ok = yes \
-      -a $ax_blas_integer_size_ok = yes; then
-      ax_blas_f77_func_ok=yes;
-      $1
-    else
-      ax_blas_f77_func_ok=no;
-      $2
-    fi
-    LIBS="$save_ax_blas_f77_func_LIBS"
-  fi
+# if any of the tests failed, reject the BLAS library
+	if test $ax_blas_lsame_fcall_ok = yes \
+		-a $ax_blas_sdot_fcall_ok = yes \
+		-a $ax_blas_ddot_fcall_ok = yes \
+		-a $ax_blas_cdotu_fcall_ok = yes \
+		-a $ax_blas_zdotu_fcall_ok = yes \
+		-a $ax_blas_integer_size_ok = yes; then
+		ax_blas_f77_func_ok=yes;
+		$1
+	else
+		ax_blas_f77_func_ok=no;
+		$2
+	fi
+	LIBS="$save_ax_blas_f77_func_LIBS"
+fi
+
 ])dnl AX_BLAS_F77_FUNC
 
 AC_DEFUN([AX_BLAS_WITH_F77_FUNC], [
-  AC_PREREQ(2.50)
-  AX_BLAS([# disable special action], [])
-  if test x$ax_blas_ok = xyes ; then
-    AX_BLAS_F77_FUNC(
-    [ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])],
-    [ax_blas_ok=no; BLAS_LIBS=],
-    [$3])
-  fi
-  if test x$ax_blas_ok = xno ; then
-    $2
-  fi
+AC_PREREQ(2.50)
+AX_BLAS([# disable special action], [])
+if test x$ax_blas_ok = xyes ; then
+	AX_BLAS_F77_FUNC(
+	[ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])],
+	[ax_blas_ok=no; BLAS_LIBS=])
+fi
+if test x$ax_blas_ok = xno ; then
+	$2
+fi
 ])dnl AX_BLAS_WITH_F77_FUNC
new file mode 100644
--- /dev/null
+++ b/m4/ax_openmp.m4
@@ -0,0 +1,119 @@
+# ===========================================================================
+#         http://www.gnu.org/software/autoconf-archive/ax_openmp.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro tries to find out how to compile programs that use OpenMP a
+#   standard API and set of compiler directives for parallel programming
+#   (see http://www-unix.mcs/)
+#
+#   On success, it sets the OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS
+#   output variable to the flag (e.g. -omp) used both to compile *and* link
+#   OpenMP programs in the current language.
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also link it with them as well.
+#
+#   If you want to compile everything with OpenMP, you should set:
+#
+#     CFLAGS="$CFLAGS $OPENMP_CFLAGS"
+#     #OR#  CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+#     #OR#  FFLAGS="$FFLAGS $OPENMP_FFLAGS"
+#
+#   (depending on the selected language).
+#
+#   The user can override the default choice by setting the corresponding
+#   environment variable (e.g. OPENMP_CFLAGS).
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if an OpenMP flag is
+#   found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
+#   not found. If ACTION-IF-FOUND is not specified, the default action will
+#   define HAVE_OPENMP.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#   Copyright (c) 2015 John W. Peterson <jwpeterson@gmail.com>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 11
+
+AC_DEFUN([AX_OPENMP], [
+AC_PREREQ([2.59]) dnl for _AC_LANG_PREFIX
+
+AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
+# Flags to try:  -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
+#                -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
+ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none"
+if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
+  ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
+fi
+for ax_openmp_flag in $ax_openmp_flags; do
+  case $ax_openmp_flag in
+    none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;;
+    *) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;;
+  esac
+  AC_LINK_IFELSE([AC_LANG_SOURCE([[
+@%:@include <omp.h>
+
+static void
+parallel_fill(int * data, int n)
+{
+  int i;
+@%:@pragma omp parallel for
+  for (i = 0; i < n; ++i)
+    data[i] = i;
+}
+
+int
+main()
+{
+  int arr[100000];
+  omp_set_num_threads(2);
+  parallel_fill(arr, 100000);
+  return 0;
+}
+]])],[ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break],[])
+done
+[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS
+])
+if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then
+  m4_default([$2],:)
+else
+  if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then
+    OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp
+  fi
+  m4_default([$1], [AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled])])
+fi
+])dnl AX_OPENMP
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -82,7 +82,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 18
+#serial 21
 
 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
 AC_DEFUN([AX_PTHREAD], [
@@ -103,8 +103,8 @@
         save_LIBS="$LIBS"
         LIBS="$PTHREAD_LIBS $LIBS"
         AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
-        AC_MSG_RESULT($ax_pthread_ok)
+        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
+        AC_MSG_RESULT([$ax_pthread_ok])
         if test x"$ax_pthread_ok" = xno; then
                 PTHREAD_LIBS=""
                 PTHREAD_CFLAGS=""
@@ -164,6 +164,20 @@
         ;;
 esac
 
+# Clang doesn't consider unrecognized options an error unless we specify
+# -Werror. We throw in some extra Clang-specific options to ensure that
+# this doesn't happen for GCC, which also accepts -Werror.
+
+AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
+                  [AC_MSG_RESULT([yes])],
+                  [ax_pthread_extra_flags=
+                   AC_MSG_RESULT([no])])
+CFLAGS="$save_CFLAGS"
+
 if test x"$ax_pthread_ok" = xno; then
 for flag in $ax_pthread_flags; do
 
@@ -178,7 +192,7 @@
                 ;;
 
                 pthread-config)
-                AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
                 if test x"$ax_pthread_config" = xno; then continue; fi
                 PTHREAD_CFLAGS="`pthread-config --cflags`"
                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
@@ -193,7 +207,7 @@
         save_LIBS="$LIBS"
         save_CFLAGS="$CFLAGS"
         LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
 
         # Check for various functions.  We must include pthread.h,
         # since some functions may be macros.  (On the Sequent, we
@@ -219,7 +233,7 @@
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"
 
-        AC_MSG_RESULT($ax_pthread_ok)
+        AC_MSG_RESULT([$ax_pthread_ok])
         if test "x$ax_pthread_ok" = xyes; then
                 break;
         fi
@@ -245,9 +259,9 @@
                 [attr_name=$attr; break],
                 [])
         done
-        AC_MSG_RESULT($attr_name)
+        AC_MSG_RESULT([$attr_name])
         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
                                [Define to necessary symbol if this constant
                                 uses a non-standard name on your system.])
         fi
@@ -261,45 +275,54 @@
             if test "$GCC" = "yes"; then
                 flag="-D_REENTRANT"
             else
+                # TODO: What about Clang on Solaris?
                 flag="-mt -D_REENTRANT"
             fi
             ;;
         esac
-        AC_MSG_RESULT(${flag})
+        AC_MSG_RESULT([$flag])
         if test "x$flag" != xno; then
             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
         fi
 
         AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
-            ax_cv_PTHREAD_PRIO_INHERIT, [
-                AC_LINK_IFELSE([
-                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+            [ax_cv_PTHREAD_PRIO_INHERIT], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
                     [ax_cv_PTHREAD_PRIO_INHERIT=yes],
                     [ax_cv_PTHREAD_PRIO_INHERIT=no])
             ])
         AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
-            AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
 
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with xlc_r or cc_r
-        if test x"$GCC" != xyes; then
-          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
-        else
-          PTHREAD_CC=$CC
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                AS_CASE(["x/$CC"],
+                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+                  [#handle absolute path differently from PATH based program lookup
+                   AS_CASE(["x$CC"],
+                     [x/*],
+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+                ;;
+            esac
         fi
-else
-        PTHREAD_CC="$CC"
 fi
 
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
 
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 if test x"$ax_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
         :
 else
         ax_pthread_ok=no
--- a/m4/module.mk
+++ b/m4/module.mk
@@ -4,6 +4,7 @@
   m4/ax_blas_f77_func.m4 \
   m4/ax_compare_version.m4 \
   m4/ax_lapack.m4 \
+  m4/ax_openmp.m4 \
   m4/ax_pthread.m4 \
   m4/gnulib-cache.m4 \
   m4/libtool.m4 \
--- a/oct-conf-post.in.h
+++ b/oct-conf-post.in.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 1993-2013 John W. Eaton
+Copyright (C) 1993-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/run-octave.in
+++ b/run-octave.in
@@ -2,7 +2,7 @@
 ##
 ## run-octave -- run Octave in the build tree.
 ##
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -33,18 +33,21 @@
 d1="$top_srcdir/scripts"
 d2="$builddir/scripts"
 d3="$builddir/libinterp"
+d4="$top_srcdir/examples/data"
 
 d1_list=`$FIND "$d1" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
 d2_list=`$FIND "$d2" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
 d3_list=`$FIND "$d3" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
+d4_list=`$FIND "$d4" -type d -exec echo '{}' ';' | $SED 's/$/:/'`
 
 d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
 d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
 d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
+d4_path=`echo "$d4_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
 
 octave_executable="$builddir/src/octave"
 
-LOADPATH="$d1_path:$d2_path:$d3_path"
+LOADPATH="$d1_path:$d2_path:$d3_path:$d4_path"
 IMAGEPATH="$top_srcdir/scripts/image"
 DOCFILE="$builddir/doc/interpreter/doc-cache"
 BUILT_IN_DOCSTRINGS_FILE="$builddir/libinterp/DOCSTRINGS"
@@ -69,6 +72,9 @@
   elif [ "x$1" = "x-valgrind" ]; then
     driver="valgrind --tool=memcheck"
     shift
+  elif [ "x$1" = "x-callgrind" ]; then
+    driver="valgrind --tool=callgrind"
+    shift
   elif [ "x$1" = "x-strace" ]; then
     driver="strace -o octave.trace"
     shift
--- a/scripts/@ftp/ascii.m
+++ b/scripts/@ftp/ascii.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -30,3 +30,7 @@
   __ftp_ascii__ (f.curlhandle);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/binary.m
+++ b/scripts/@ftp/binary.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -29,3 +29,7 @@
   __ftp_binary__ (f.curlhandle);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/cd.m
+++ b/scripts/@ftp/cd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -42,3 +42,7 @@
   path = __ftp_pwd__ (f.curlhandle);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/close.m
+++ b/scripts/@ftp/close.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -27,3 +27,7 @@
   __ftp_close__ (f.curlhandle);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/delete.m
+++ b/scripts/@ftp/delete.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -27,3 +27,7 @@
   __ftp_delete__ (f.curlhandle, file);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/dir.m
+++ b/scripts/@ftp/dir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -32,3 +32,7 @@
   endif
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/display.m
+++ b/scripts/@ftp/display.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -24,3 +24,7 @@
   printf (" mode: %s\n", __ftp_mode__ (obj.curlhandle));
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/ftp.m
+++ b/scripts/@ftp/ftp.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -51,7 +51,7 @@
     p.host = host;
     p.username = username;
     p.password = password;
-    p.curlhandle = tmpnam ("ftp-");
+    p.curlhandle = tempname ("ftp-");
     if (nargin > 0)
       p.curlhandle = __ftp__ (host, username, password);
     endif
@@ -59,3 +59,7 @@
   endif
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/loadobj.m
+++ b/scripts/@ftp/loadobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -34,3 +34,7 @@
   endif
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/mget.m
+++ b/scripts/@ftp/mget.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -36,3 +36,7 @@
   __ftp_mget__ (f.curlhandle, file);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/mkdir.m
+++ b/scripts/@ftp/mkdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -27,3 +27,7 @@
   __ftp_mkdir__ (f.curlhandle, path);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/mput.m
+++ b/scripts/@ftp/mput.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -34,3 +34,7 @@
   endif
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/rename.m
+++ b/scripts/@ftp/rename.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -28,3 +28,7 @@
   __ftp_rename__ (f.curlhandle, oldname, newname);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/rmdir.m
+++ b/scripts/@ftp/rmdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -27,3 +27,7 @@
   __ftp_rmdir__ (f.curlhandle, path);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/@ftp/saveobj.m
+++ b/scripts/@ftp/saveobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 David Bateman
+## Copyright (C) 2009-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -22,3 +22,7 @@
   b.dir = __ftp_pwd__ (a.curlhandle);
 endfunction
 
+
+## No test possible for interactive function.
+%!assert (1)
+
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's scripts directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -91,143 +91,178 @@
 octave_dirstamp = $(am__leading_dot)dirstamp
 
 @ftp/PKG_ADD: $(@ftp_FCN_FILES) $(@ftp_GEN_FCN_FILES) @ftp/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(@ftp_FCN_FILES) -- $(@ftp_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(@ftp_FCN_FILES) -- $(@ftp_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 audio/PKG_ADD: $(audio_FCN_FILES) $(audio_GEN_FCN_FILES) audio/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(audio_FCN_FILES) -- $(audio_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(audio_FCN_FILES) -- $(audio_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 deprecated/PKG_ADD: $(deprecated_FCN_FILES) $(deprecated_GEN_FCN_FILES) deprecated/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(deprecated_FCN_FILES) -- $(deprecated_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(deprecated_FCN_FILES) -- $(deprecated_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 elfun/PKG_ADD: $(elfun_FCN_FILES) $(elfun_GEN_FCN_FILES) elfun/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(elfun_FCN_FILES) -- $(elfun_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(elfun_FCN_FILES) -- $(elfun_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 general/PKG_ADD: $(general_FCN_FILES) $(general_GEN_FCN_FILES) general/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(general_FCN_FILES) -- $(general_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(general_FCN_FILES) -- $(general_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 geometry/PKG_ADD: $(geometry_FCN_FILES) $(geometry_GEN_FCN_FILES) geometry/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(geometry_FCN_FILES) -- $(geometry_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(geometry_FCN_FILES) -- $(geometry_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 gui/PKG_ADD: $(gui_FCN_FILES) $(gui_GEN_FCN_FILES) gui/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(gui_FCN_FILES) -- $(gui_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(gui_FCN_FILES) -- $(gui_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 help/PKG_ADD: $(help_FCN_FILES) $(help_GEN_FCN_FILES) help/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(help_FCN_FILES) -- $(help_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(help_FCN_FILES) -- $(help_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 image/PKG_ADD: $(image_FCN_FILES) $(image_GEN_FCN_FILES) image/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(image_FCN_FILES) -- $(image_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(image_FCN_FILES) -- $(image_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 io/PKG_ADD: $(io_FCN_FILES) $(io_GEN_FCN_FILES) io/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(io_FCN_FILES) -- $(io_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(io_FCN_FILES) -- $(io_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 java/PKG_ADD: $(java_FCN_FILES) $(java_GEN_FCN_FILES) java/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(java_FCN_FILES) -- $(java_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(java_FCN_FILES) -- $(java_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 linear-algebra/PKG_ADD: $(linear_algebra_FCN_FILES) $(linear_algebra_GEN_FCN_FILES) linear-algebra/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(linear_algebra_FCN_FILES) -- $(linear_algebra_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(linear_algebra_FCN_FILES) -- $(linear_algebra_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 miscellaneous/PKG_ADD: $(miscellaneous_FCN_FILES) $(miscellaneous_GEN_FCN_FILES) miscellaneous/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(miscellaneous_FCN_FILES) -- $(miscellaneous_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(miscellaneous_FCN_FILES) -- $(miscellaneous_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 optimization/PKG_ADD: $(optimization_FCN_FILES) $(optimization_GEN_FCN_FILES) optimization/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add "$(srcdir)" $(optimization_FCN_FILES) -- $(optimization_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add "$(srcdir)" $(optimization_FCN_FILES) -- $(optimization_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 path/PKG_ADD: $(path_FCN_FILES) $(path_GEN_FCN_FILES) path/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(path_FCN_FILES) -- $(path_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(path_FCN_FILES) -- $(path_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 pkg/PKG_ADD: $(pkg_FCN_FILES) $(pkg_GEN_FCN_FILES) pkg/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(pkg_FCN_FILES) -- $(pkg_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(pkg_FCN_FILES) -- $(pkg_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 plot/appearance/PKG_ADD: $(plot_appearance_FCN_FILES) $(plot_appearance_GEN_FCN_FILES) plot/appearance/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(plot_appearance_FCN_FILES) -- $(plot_appearance_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(plot_appearance_FCN_FILES) -- $(plot_appearance_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 plot/draw/PKG_ADD: $(plot_draw_FCN_FILES) $(plot_draw_GEN_FCN_FILES) plot/draw/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(plot_draw_FCN_FILES) -- $(plot_draw_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(plot_draw_FCN_FILES) -- $(plot_draw_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 plot/util/PKG_ADD: $(plot_util_FCN_FILES) $(plot_util_GEN_FCN_FILES) plot/util/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(plot_util_FCN_FILES) -- $(plot_util_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(plot_util_FCN_FILES) -- $(plot_util_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 polynomial/PKG_ADD: $(polynomial_FCN_FILES) $(polynomial_GEN_FCN_FILES) polynomial/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(polynomial_FCN_FILES) -- $(polynomial_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(polynomial_FCN_FILES) -- $(polynomial_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 prefs/PKG_ADD: $(prefs_FCN_FILES) $(prefs_GEN_FCN_FILES) prefs/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(prefs_FCN_FILES) -- $(prefs_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(prefs_FCN_FILES) -- $(prefs_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 set/PKG_ADD: $(set_FCN_FILES) $(set_GEN_FCN_FILES) set/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(set_FCN_FILES) -- $(set_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(set_FCN_FILES) -- $(set_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 signal/PKG_ADD: $(signal_FCN_FILES) $(signal_GEN_FCN_FILES) signal/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(signal_FCN_FILES) -- $(signal_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(signal_FCN_FILES) -- $(signal_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 sparse/PKG_ADD: $(sparse_FCN_FILES) $(sparse_GEN_FCN_FILES) sparse/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(sparse_FCN_FILES) -- $(sparse_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(sparse_FCN_FILES) -- $(sparse_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 specfun/PKG_ADD: $(specfun_FCN_FILES) $(specfun_GEN_FCN_FILES) specfun/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(specfun_FCN_FILES) -- $(specfun_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(specfun_FCN_FILES) -- $(specfun_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 special-matrix/PKG_ADD: $(special_matrix_FCN_FILES) $(special_matrix_GEN_FCN_FILES) special-matrix/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(special_matrix_FCN_FILES) -- $(special_matrix_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(special_matrix_FCN_FILES) -- $(special_matrix_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 startup/PKG_ADD: $(startup_FCN_FILES) $(startup_GEN_FCN_FILES) startup/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(startup_FCN_FILES) -- $(startup_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(startup_FCN_FILES) -- $(startup_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 statistics/base/PKG_ADD: $(statistics_base_FCN_FILES) $(statistics_base_GEN_FCN_FILES) statistics/base/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_base_FCN_FILES) -- $(statistics_base_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_base_FCN_FILES) -- $(statistics_base_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 statistics/distributions/PKG_ADD: $(statistics_distributions_FCN_FILES) $(statistics_distributions_GEN_FCN_FILES) statistics/distributions/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_distributions_FCN_FILES) -- $(statistics_distributions_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_distributions_FCN_FILES) -- $(statistics_distributions_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 statistics/models/PKG_ADD: $(statistics_models_FCN_FILES) $(statistics_models_GEN_FCN_FILES) statistics/models/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_models_FCN_FILES) -- $(statistics_models_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_models_FCN_FILES) -- $(statistics_models_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 statistics/tests/PKG_ADD: $(statistics_tests_FCN_FILES) $(statistics_tests_GEN_FCN_FILES) statistics/tests/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_tests_FCN_FILES) -- $(statistics_tests_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(statistics_tests_FCN_FILES) -- $(statistics_tests_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 strings/PKG_ADD: $(strings_FCN_FILES) $(strings_GEN_FCN_FILES) strings/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(strings_FCN_FILES) -- $(strings_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(strings_FCN_FILES) -- $(strings_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 testfun/PKG_ADD: $(testfun_FCN_FILES) $(testfun_GEN_FCN_FILES) testfun/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(testfun_FCN_FILES) -- $(testfun_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(testfun_FCN_FILES) -- $(testfun_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 time/PKG_ADD: $(time_FCN_FILES) $(time_GEN_FCN_FILES) time/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(time_FCN_FILES) -- $(time_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(time_FCN_FILES) -- $(time_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 ui/PKG_ADD: $(ui_FCN_FILES) $(ui_GEN_FCN_FILES) ui/$(octave_dirstamp) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(srcdir) $(ui_FCN_FILES) -- $(ui_GEN_FCN_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(srcdir) $(ui_FCN_FILES) -- $(ui_GEN_FCN_FILES) > $@-t && \
 	mv $@-t $@
 
 $(@ftp_GEN_FCN_FILES): @ftp/$(octave_dirstamp)
@@ -267,127 +302,128 @@
 $(ui_GEN_FCN_FILES): ui/$(octave_dirstamp)
 
 @ftp/$(octave_dirstamp):
-	$(MKDIR_P) @ftp
+	$(AM_V_GEN)$(MKDIR_P) @ftp && \
 	: > @ftp/$(octave_dirstamp)
 audio/$(octave_dirstamp):
-	$(MKDIR_P) audio
+	$(AM_V_GEN)$(MKDIR_P) audio && \
 	: > audio/$(octave_dirstamp)
 deprecated/$(octave_dirstamp):
-	$(MKDIR_P) deprecated
+	$(AM_V_GEN)$(MKDIR_P) deprecated && \
 	: > deprecated/$(octave_dirstamp)
 elfun/$(octave_dirstamp):
-	$(MKDIR_P) elfun
+	$(AM_V_GEN)$(MKDIR_P) elfun && \
 	: > elfun/$(octave_dirstamp)
 general/$(octave_dirstamp):
-	$(MKDIR_P) general
+	$(AM_V_GEN)$(MKDIR_P) general && \
 	: > general/$(octave_dirstamp)
 geometry/$(octave_dirstamp):
-	$(MKDIR_P) geometry
+	$(AM_V_GEN)$(MKDIR_P) geometry && \
 	: > geometry/$(octave_dirstamp)
 gui/$(octave_dirstamp):
-	$(MKDIR_P) gui
+	$(AM_V_GEN)$(MKDIR_P) gui && \
 	: > gui/$(octave_dirstamp)
 help/$(octave_dirstamp):
-	$(MKDIR_P) help
+	$(AM_V_GEN)$(MKDIR_P) help && \
 	: > help/$(octave_dirstamp)
 image/$(octave_dirstamp):
-	$(MKDIR_P) image
+	$(AM_V_GEN)$(MKDIR_P) image && \
 	: > image/$(octave_dirstamp)
 io/$(octave_dirstamp):
-	$(MKDIR_P) io
+	$(AM_V_GEN)$(MKDIR_P) io && \
 	: > io/$(octave_dirstamp)
 java/$(octave_dirstamp):
-	$(MKDIR_P) java
+	$(AM_V_GEN)$(MKDIR_P) java && \
 	: > java/$(octave_dirstamp)
 linear-algebra/$(octave_dirstamp):
-	$(MKDIR_P) linear-algebra
+	$(AM_V_GEN)$(MKDIR_P) linear-algebra && \
 	: > linear-algebra/$(octave_dirstamp)
 miscellaneous/$(octave_dirstamp):
-	$(MKDIR_P) miscellaneous
+	$(AM_V_GEN)$(MKDIR_P) miscellaneous && \
 	: > miscellaneous/$(octave_dirstamp)
 optimization/$(octave_dirstamp):
-	$(MKDIR_P) optimization
+	$(AM_V_GEN)$(MKDIR_P) optimization && \
 	: > optimization/$(octave_dirstamp)
 path/$(octave_dirstamp):
-	$(MKDIR_P) path
+	$(AM_V_GEN)$(MKDIR_P) path && \
 	: > path/$(octave_dirstamp)
 pkg/$(octave_dirstamp):
-	$(MKDIR_P) pkg
+	$(AM_V_GEN)$(MKDIR_P) pkg && \
 	: > pkg/$(octave_dirstamp)
 plot/appearance/$(octave_dirstamp):
-	$(MKDIR_P) plot/appearance
+	$(AM_V_GEN)$(MKDIR_P) plot/appearance && \
 	: > plot/appearance/$(octave_dirstamp)
 plot/draw/$(octave_dirstamp):
-	$(MKDIR_P) plot/draw
+	$(AM_V_GEN)$(MKDIR_P) plot/draw && \
 	: > plot/draw/$(octave_dirstamp)
 plot/util/$(octave_dirstamp):
-	$(MKDIR_P) plot/util
+	$(AM_V_GEN)$(MKDIR_P) plot/util && \
 	: > plot/util/$(octave_dirstamp)
 polynomial/$(octave_dirstamp):
-	$(MKDIR_P) polynomial
+	$(AM_V_GEN)$(MKDIR_P) polynomial && \
 	: > polynomial/$(octave_dirstamp)
 prefs/$(octave_dirstamp):
-	$(MKDIR_P) prefs
+	$(AM_V_GEN)$(MKDIR_P) prefs && \
 	: > prefs/$(octave_dirstamp)
 set/$(octave_dirstamp):
-	$(MKDIR_P) set
+	$(AM_V_GEN)$(MKDIR_P) set && \
 	: > set/$(octave_dirstamp)
 signal/$(octave_dirstamp):
-	$(MKDIR_P) signal
+	$(AM_V_GEN)$(MKDIR_P) signal && \
 	: > signal/$(octave_dirstamp)
 sparse/$(octave_dirstamp):
-	$(MKDIR_P) sparse
+	$(AM_V_GEN)$(MKDIR_P) sparse && \
 	: > sparse/$(octave_dirstamp)
 specfun/$(octave_dirstamp):
-	$(MKDIR_P) specfun
+	$(AM_V_GEN)$(MKDIR_P) specfun && \
 	: > specfun/$(octave_dirstamp)
 special-matrix/$(octave_dirstamp):
-	$(MKDIR_P) special-matrix
+	$(AM_V_GEN)$(MKDIR_P) special-matrix && \
 	: > special-matrix/$(octave_dirstamp)
 startup/$(octave_dirstamp):
-	$(MKDIR_P) startup
+	$(AM_V_GEN)$(MKDIR_P) startup && \
 	: > startup/$(octave_dirstamp)
 statistics/base/$(octave_dirstamp):
-	$(MKDIR_P) statistics/base
+	$(AM_V_GEN)$(MKDIR_P) statistics/base && \
 	: > statistics/base/$(octave_dirstamp)
 statistics/distributions/$(octave_dirstamp):
-	$(MKDIR_P) statistics/distributions
+	$(AM_V_GEN)$(MKDIR_P) statistics/distributions && \
 	: > statistics/distributions/$(octave_dirstamp)
 statistics/models/$(octave_dirstamp):
-	$(MKDIR_P) statistics/models
+	$(AM_V_GEN)$(MKDIR_P) statistics/models && \
 	: > statistics/models/$(octave_dirstamp)
 statistics/tests/$(octave_dirstamp):
-	$(MKDIR_P) statistics/tests
+	$(AM_V_GEN)$(MKDIR_P) statistics/tests && \
 	: > statistics/tests/$(octave_dirstamp)
 strings/$(octave_dirstamp):
-	$(MKDIR_P) strings
+	$(AM_V_GEN)$(MKDIR_P) strings && \
 	: > strings/$(octave_dirstamp)
 testfun/$(octave_dirstamp):
-	$(MKDIR_P) testfun
+	$(AM_V_GEN)$(MKDIR_P) testfun && \
 	: > testfun/$(octave_dirstamp)
 time/$(octave_dirstamp):
-	$(MKDIR_P) time
+	$(AM_V_GEN)$(MKDIR_P) time && \
 	: > time/$(octave_dirstamp)
 ui/$(octave_dirstamp):
-	$(MKDIR_P) ui
+	$(AM_V_GEN)$(MKDIR_P) ui && \
 	: > ui/$(octave_dirstamp)
 
 if AMCOND_BUILD_DOCS
 
 .DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) mkdoc.pl Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
 		cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
 		touch -r $(srcdir)/DOCSTRINGS DOCSTRINGS; \
-	fi
-	@echo "creating .DOCSTRINGS from .m script files"
-	@$(PERL) $(srcdir)/mkdoc.pl "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@
-	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS
+	fi && \
+	$(PERL) $(srcdir)/mkdoc.pl "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@-t && \
+	mv $@-t $@ && \
+	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS && \
 	touch $@
 
 endif
 
 $(GEN_FCN_FILES) : %.m : %.in Makefile
-	@$(do_subst_config_vals)
+	$(AM_V_GEN)$(do_subst_config_vals)
 
 check-m-sources:
 	@echo "checking whether files in source tree are listed in module.mk files..."; \
@@ -495,5 +531,5 @@
 
 distclean-local:
 	if [ "x$(srcdir)" != "x." ]; then \
-	  rm $(java_JAVA_IMAGES); \
+	  rm -f $(java_JAVA_IMAGES); \
 	fi
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/__get_properties__.m
@@ -0,0 +1,67 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{properties} =} __get_properties__ (@var{player})
+## Return a struct containing all named properties of the audioplayer
+## object @var{player}.
+## @end deftypefn
+
+function props = __get_properties__ (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  if (__player_isplaying__ (struct (player).player))
+    running = "on";
+  else
+    running = "off";
+  endif
+
+  props = struct ("BitsPerSample",
+                  __player_get_nbits__ (struct (player).player),
+
+                  "CurrentSample",
+                  __player_get_sample_number__ (struct (player).player),
+
+                  "DeviceID",
+                  __player_get_id__ (struct (player).player),
+
+                  "NumberOfChannels",
+                  __player_get_channels__ (struct (player).player),
+
+                  "Running",
+                  running,
+
+                  "SampleRate",
+                  __player_get_fs__ (struct (player).player),
+
+                  "TotalSamples",
+                  __player_get_total_samples__ (struct (player).player),
+
+                  "Tag",
+                  __player_get_tag__ (struct (player).player),
+
+                  "Type",
+                  "audioplayer",
+
+                  "UserData",
+                  __player_get_userdata__ (struct (player).player));
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/audioplayer.m
@@ -0,0 +1,187 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs})
+## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits})
+## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits}, @var{id})
+## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder})
+## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder}, @var{id})
+## Create an audioplayer object that will play back data @var{y} at sample
+## rate @var{fs}.  The optional arguments @var{nbits}, and @var{id}
+## specify the bit depth and player device id, respectively.  Device IDs
+## may be found using the audiodevinfo function.
+## Given an audioplayer object, use the data from the object to
+## initialize the player.
+##
+## The signal @var{y} can be a vector or a two-dimensional array.
+##
+## The following example will create an audioplayer object that will play
+## back one second of white noise at 44100 sample rate using 8 bits per
+## sample.
+##
+## @example
+## @group
+## y = randn (2, 44100) - 0.5;
+## player = audioplayer (y, 44100, 8);
+## play (player);
+## @end group
+## @end example
+## @end deftypefn
+
+## FIXME: callbacks don't work properly, apparently because portaudio
+## will execute the callbacks in a separate thread, and calling Octave
+## functions in a separate thread which is likely to cause trouble with
+## all of Octave's global data...
+##
+## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{function}, @dots{})
+##
+## Given a function handle, use that function to process the audio.
+#
+## The following example will create and register a callback that generates
+## a sine wave on both channels.
+##
+## @example
+## @group
+## function [ sound, status ] = callback_sine (frames)
+##   global lphase = 0.0;
+##   global rphase = 0.0;
+##   incl = 440.0 / 44100.0;
+##   incr = 443.0 / 44100.0;
+##   nl = incl * frames;
+##   nr = incr * frames;
+##   left = sin (2.0 * pi * [lphase:incl:lphase+nl]);
+##   right = sin (2.0 * pi * [rphase:incr:rphase+nr]);
+##   sound = [left', right'];
+##   status = 0;
+##   lphase = lphase + nl;
+##   rphase = rphase + nr;
+## endfunction
+## player = audioplayer (@@callback_sine, 44100);
+## play (player);
+## # play for as long as you want
+## stop (player);
+## @end group
+
+function player = audioplayer (varargin)
+
+  if (nargin < 1 || nargin > 4
+      || (nargin < 2 && (isa (varargin{1}, "function_handle")
+                         || ischar (varargin{1}))))
+    print_usage ();
+  endif
+
+  if (isa (varargin{1}, "audiorecorder"))
+    if (nargin == 1)
+      player = getplayer (varargin{1});
+    elseif (nargin == 2)
+      recorder = varargin{1};
+      data = getaudiodata (recorder);
+      player = audioplayer (data, get (recorder, "SampleRate"),
+                            get (recorder, "BitsPerSample"), varargin{2});
+    else
+      print_usage ();
+    endif
+  else
+    if (ischar (varargin{1}))
+      varargin{1} = str2func (varargin{1});
+    endif
+    player.player = __player_audioplayer__ (varargin{:});
+    player = class (player, "audioplayer");
+  endif
+
+endfunction
+
+
+%!demo
+%! fs = 44100;
+%! audio = randn (2, 2*fs) - 0.5;
+%! player = audioplayer (audio, fs);
+%! play (player);
+%! sleep (1);
+%! pause (player);
+%! sleep (1);
+%! resume (player);
+%! sleep (1);
+%! stop (player);
+
+## Tests of audioplayer must not actually play anything.
+
+%!testif HAVE_PORTAUDIO
+%! mono = randn (1, 44100) - 0.5;
+%! stereo = randn (2, 44100) - 0.5;
+%! fs = 44100;
+%! player1 = audioplayer (mono, fs);
+%! player2 = audioplayer (stereo, fs);
+%! assert (player1.NumberOfChannels, 1);
+%! assert (player2.NumberOfChannels, 2);
+%! assert (player1.SampleRate, 44100);
+%! assert (player2.SampleRate, 44100);
+%! assert (player1.TotalSamples, 44100);
+%! assert (player2.TotalSamples, 44100);
+
+%!testif HAVE_PORTAUDIO
+%! audio = randn (2, 44100) - 0.5;
+%! fs = 44100;
+%! player = audioplayer (audio, fs);
+%! set (player, {"SampleRate", "Tag", "UserData"}, {8000, "tag", [1, 2; 3, 4]});
+%! assert (player.SampleRate, 8000);
+%! assert (player.Tag, "tag");
+%! assert (player.UserData, [1, 2; 3, 4]);
+
+%!testif HAVE_PORTAUDIO
+%! audio = randn (2, 44100) - 0.5;
+%! fs = 44100;
+%! player = audioplayer (audio, fs);
+%! settable = set (player);
+%! settable.SampleRate = 8000;
+%! settable.Tag = "tag";
+%! settable.UserData = [1, 2; 3, 4];
+%! set (player, settable);
+%! assert (player.SampleRate, 8000);
+%! assert (player.Tag, "tag");
+%! assert (player.UserData, [1, 2; 3, 4]);
+
+%!testif HAVE_PORTAUDIO
+%! audio = randn (2, 44100) - 0.5;
+%! fs = 44100;
+%! player = audioplayer (audio, fs);
+%! player.SampleRate = 8000;
+%! player.Tag = "tag";
+%! player.UserData = [1, 2; 3, 4];
+%! properties = get (player, {"SampleRate", "Tag", "UserData"});
+%! assert (properties, {8000, "tag", [1, 2; 3, 4]});
+
+#%!function [sound, status] = callback (samples)
+#%!  sound = rand (samples, 2) - 0.5;
+#%!  status = 0;
+#%!endfunction
+
+#%!testif HAVE_PORTAUDIO
+#%! player = audioplayer (@callback, 44100);
+#%! play (player);
+#%! sleep (2);
+#%! stop (player);
+#%! assert (1);
+
+#%!testif HAVE_PORTAUDIO
+#%! player = audioplayer ("callback", 44100, 16);
+#%! play (player);
+#%! sleep (2);
+#%! stop (player);
+#%! assert (1);
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/display.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} display (@var{player})
+## Display the properties of the audioplayer object @var{player}.
+## @end deftypefn
+
+function display (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  disp (__get_properties__ (player));
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/get.m
@@ -0,0 +1,54 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{value} =} get (@var{player}, @var{name})
+## @deftypefnx {Function File} {@var{values} =} get (@var{player})
+## Return the @var{value} of the property identified by @var{name}.
+## If @var{name} is a cell array return the values of the properties
+## identified by the elements of the cell array.  Given only the
+## player object, return a scalar structure with values of all
+## properties of @var{player}.  The field names of the structure
+## correspond to property names.
+## @end deftypefn
+
+function retval = get (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  properties = __get_properties__ (varargin{1});
+
+  if (nargin == 1)
+    retval = properties;
+  elseif (nargin == 2)
+    pnames = varargin{2};
+    if (ischar (pnames))
+      retval = getfield (properties, pnames);
+    elseif (iscellstr (pnames))
+      retval = cell (size (pnames));
+      for i = 1:numel (pnames)
+        retval{i} = getfield (properties, pnames{i});
+      endfor
+    else
+      error ("@audioplayer/get: invalid name argument");
+    endif
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/isplaying.m
@@ -0,0 +1,33 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} isplaying (@var{player})
+## Return 1 if the audioplayer object @var{player}is currently playing
+## back audio and 0 otherwise.
+## @end deftypefn
+
+function result = isplaying (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  result = __player_isplaying__ (struct (player).player);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/pause.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} pause (@var{player})
+## Pause the audioplayer @var{player}.
+## @end deftypefn
+
+function pause (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __player_pause__ (struct (player).player);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/play.m
@@ -0,0 +1,38 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} play (@var{player})
+## @deftypefnx {Function File} {} play (@var{player}, @var{start})
+## @deftypefnx {Function File} {} play (@var{player}, @var{limits})
+## Play audio stored in the audioplayer object @var{player} without blocking.
+## Given optional argument start, begin playing at @var{start} seconds
+## in the recording.  Given a two-element vector @var{limits}, begin and
+## end playing at the number of seconds specified by the elements of the
+## vector.
+## @end deftypefn
+
+function play (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  __player_play__ (struct (varargin{1}).player, varargin{2:end});
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/playblocking.m
@@ -0,0 +1,38 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} playblocking (@var{player})
+## @deftypefnx {Function File} {} playblocking (@var{player}, @var{start})
+## @deftypefnx {Function File} {} playblocking (@var{player}, @var{limits})
+## Play audio stored in the audioplayer object @var{player} with blocking.
+## Given optional argument start, begin playing at @var{start} seconds
+## in the recording.  Given a two-element vector @var{limits}, begin and
+## end playing at the number of seconds specified by the elements of the
+## vector.
+## @end deftypefn
+
+function playblocking (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  __player_playblocking__ (struct (varargin{1}).player, varargin{2:end});
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/resume.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} resume (@var{player})
+## Resume playback for the paused audioplayer object @var{player}.
+## @end deftypefn
+
+function resume (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __player_resume__ (struct (player).player);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/set.m
@@ -0,0 +1,74 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} set (@var{player}, @var{name}, @var{value})
+## @deftypefnx {Function File} {} set (@var{player}, @var{properties})
+## @deftypefnx {Function File} {@var{properties} =} set (@var{player})
+## Set the value of property specified by @var{name} to a given @var{value}.
+## If @var{name} and @var{value} are cell arrays, set each property to the
+## corresponding value.  Given a structure of @var{properties} with
+## fields corresponding to property names, set the value of those
+## properties to the field values.  Given only the audioplayer object,
+## return a structure of settable properties.
+## @end deftypefn
+
+function settable = set (varargin)
+
+  if (nargin < 1 || nargin > 3)
+    print_usage ();
+  endif
+
+  player = struct (varargin{1}).player;
+
+  if (nargin == 1)
+    settable.SampleRate = {};
+    settable.Tag = {};
+    settable.UserData = {};
+  elseif (nargin == 2)
+    for [value, property] = varargin{2}
+      setproperty (player, property, value);
+    endfor
+  elseif (nargin == 3)
+    if (iscell (varargin{2}))
+      index = 1;
+      for property = varargin{2}
+        setproperty (player, char (property), varargin{3}{index});
+        index = index + 1;
+      endfor
+    else
+      setproperty (player, varargin{2}, varargin{3});
+    endif
+  else
+    error ("@audioplayer/set: wrong number of arguments to the set method");
+  endif
+
+endfunction
+
+function setproperty (player, property, value)
+  switch (property)
+    case "SampleRate"
+      __player_set_fs__ (player, value);
+    case "Tag"
+      __player_set_tag__ (player, value);
+    case "UserData"
+      __player_set_userdata__ (player, value);
+    otherwise
+      error ("audioplayer: no such property or the property specified is read-only");
+  endswitch
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/stop.m
@@ -0,0 +1,33 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} stop (@var{player})
+## Stop the playback for the audioplayer @var{player} and reset the
+## relevant variables to their starting values.
+## @end deftypefn
+
+function stop (player)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __player_stop__ (struct (player).player);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/subsasgn.m
@@ -0,0 +1,39 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{value} =} subsasgn (@var{player}, @var{idx}, @var{rhs})
+## Perform subscripted assignment on the audio player object @var{player}.
+## Assign the value of @var{rhs} to the player property named by @var{idx}.
+## @end deftypefn
+
+function value = subsasgn (player, idx, rhs)
+
+  if (isempty (idx))
+    error ("audioplayer: missing index");
+  endif
+
+  if (strcmp (idx(1).type, "."))
+    field = idx.subs;
+    set (player, field, rhs);
+    value = player;
+  else
+    error ("@audioplayer/subsasgn: invalid subscript type");
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audioplayer/subsref.m
@@ -0,0 +1,41 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{value} =} subsref (@var{player}, @var{idx})
+## Perform subscripted selection on the audio player object @var{player}.
+## Return the player property value named by @var{idx}.
+## @end deftypefn
+
+function value = subsref (player, idx)
+  if (nargin != 2)
+    print_usage ();
+  endif
+
+  if (isempty (idx))
+    error ("@audioplayer/subsref: missing index");
+  endif
+
+  if (strcmp (idx(1).type, "."))
+    field = idx.subs;
+    value = get (player, field);
+  else
+    error ("@audioplayer/subsref: invalid subscript type")
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/__get_properties__.m
@@ -0,0 +1,67 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{properties} =} __get_properties__ (@var{recorder})
+## Return a struct containing all named properties of the recorder object
+## @var{recorder}.
+## @end deftypefn
+
+function props = __get_properties__ (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  if (__recorder_isrecording__ (struct (recorder).recorder))
+    running = "on";
+  else
+    running = "off";
+  endif
+
+  props = struct ("BitsPerSample",
+                  __recorder_get_nbits__ (struct (recorder).recorder),
+
+                  "CurrentSample",
+                  __recorder_get_sample_number__ (struct (recorder).recorder),
+
+                  "DeviceID",
+                  __recorder_get_id__ (struct (recorder).recorder),
+
+                  "NumberOfChannels",
+                  __recorder_get_channels__ (struct (recorder).recorder),
+
+                  "Running",
+                  running,
+
+                  "SampleRate",
+                  __recorder_get_fs__ (struct (recorder).recorder),
+
+                  "TotalSamples",
+                  __recorder_get_total_samples__ (struct (recorder).recorder),
+
+                  "Tag",
+                  __recorder_get_tag__ (struct (recorder).recorder),
+
+                  "Type",
+                  "audiorecorder",
+
+                  "UserData",
+                  __recorder_get_userdata__ (struct (recorder).recorder));
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/audiorecorder.m
@@ -0,0 +1,132 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{recorder} =} audiorecorder ()
+## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{fs}, @var{nbits}, @var{channels})
+## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{fs}, @var{nbits}, @var{channels}, @var{id})
+## Create an audiorecorder object recording 8 bit mono audio at 8000 Hz
+## sample rate.  The optional arguments @var{fs}, @var{nbits},
+## @var{channels}, and @var{id} specify the sample rate, bit depth,
+## number of channels and recording device id, respectively.  Device IDs
+## may be found using the audiodevinfo function.
+## @end deftypefn
+
+## FIXME: callbacks don't work properly, apparently because portaudio
+## will execute the callbacks in a separate thread, and calling Octave
+## functions in a separate thread which is likely to cause trouble with
+## all of Octave's global data...
+##
+## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{function}, @dots{})
+##
+## Given a function handle, use that function to process the audio.
+
+function recorder = audiorecorder (varargin)
+
+  if (nargin > 5)
+    print_usage ();
+  endif
+
+  if (nargin > 0 && ischar (varargin{1}))
+    varargin{1} = str2func (varargin{1});
+  endif
+
+  recorder.recorder = __recorder_audiorecorder__ (varargin{:});
+  recorder = class (recorder, "audiorecorder");
+
+endfunction
+
+
+%!demo
+%! recorder = audiorecorder (44100, 16, 2);
+%! record (recorder, 1);
+%! sleep (2);
+%! player1 = audioplayer (recorder);
+%! player2 = getplayer (recorder);
+%! play (player1);
+%! sleep (2);
+%! play (player2);
+%! sleep (2);
+%! stop (player1);
+%! stop (player2);
+
+## Tests of audiorecorder must not actually record anything.
+
+%!testif HAVE_PORTAUDIO
+%! recorder = audiorecorder (44100, 16, 2);
+%! data = getaudiodata (recorder, "int16");
+%! assert (strcmp (class (data), "int16"));
+%! data = getaudiodata (recorder, "int8");
+%! assert (strcmp (class (data), "int8"));
+%! data = getaudiodata (recorder, "uint8");
+%! assert (strcmp (class (data), "uint8"));
+%! assert (size (data)(1), recorder.TotalSamples);
+%! assert (size (data)(2), 2);
+
+%!testif HAVE_PORTAUDIO
+%! recorder = audiorecorder;
+%! set (recorder, {"SampleRate", "Tag", "UserData"}, {8000, "tag", [1, 2; 3, 4]});
+%! assert (recorder.SampleRate, 8000);
+%! assert (recorder.Tag, "tag");
+%! assert (recorder.UserData, [1, 2; 3, 4]);
+
+%!testif HAVE_PORTAUDIO
+%! recorder = audiorecorder;
+%! settable = set (recorder);
+%! settable.SampleRate = 8000;
+%! settable.Tag = "tag";
+%! settable.UserData = [1, 2; 3, 4];
+%! set (recorder, settable);
+%! assert (recorder.SampleRate, 8000);
+%! assert (recorder.Tag, "tag");
+%! assert (recorder.UserData, [1, 2; 3, 4]);
+
+%!testif HAVE_PORTAUDIO
+%! recorder = audiorecorder;
+%! recorder.SampleRate = 8000;
+%! recorder.Tag = "tag";
+%! recorder.UserData = [1, 2; 3, 4];
+%! properties = get (recorder, {"SampleRate", "Tag", "UserData"});
+%! assert (properties, {8000, "tag", [1, 2; 3, 4]});
+
+#%!function status = callback_record (sound)
+#%!  fid = fopen ("record.txt", "at");
+#%!  for index = 1:rows(sound)
+#%!    fprintf (fid, "%.4f, %.4f\n", sound(index, 1), sound(index, 2));
+#%!  endfor
+#%!  fclose (fid);
+#%!  status = 0;
+#%!endfunction
+
+#%!testif HAVE_PORTAUDIO
+#%! recorder = audiorecorder (@callback_record, 44100);
+#%! unlink ("record.txt")
+#%! record (recorder);
+#%! sleep (2);
+#%! stop (recorder);
+#%! s = stat ("record.txt");
+#%! assert (s.size > 0);
+
+#%!testif HAVE_PORTAUDIO
+#%! recorder = audiorecorder (@callback_record, 44100);
+#%! unlink ("record.txt")
+#%! record (recorder);
+#%! sleep (2);
+#%! stop (recorder);
+#%! s = stat ("record.txt");
+#%! assert (s.size > 0);
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/display.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} display (@var{recorder})
+## Display the properties of the audiorecorder object @var{recorder}.
+## @end deftypefn
+
+function display (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  disp (__get_properties__ (recorder));
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/get.m
@@ -0,0 +1,54 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{value} =} get (@var{recorder}, @var{name})
+## @deftypefnx {Function File} {@var{values} =} get (@var{recorder})
+## Return the @var{value} of the property identified by @var{name}.
+## If @var{name} is a cell array, return the values of the properties
+## corresponding to the elements of the cell array.  Given only the
+## recorder object, return a scalar structure with values of all
+## properties of @var{recorder}.  The field names of the structure
+## correspond to property names.
+## @end deftypefn
+
+function retval = get (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  properties = __get_properties__ (varargin{1});
+
+  if (nargin == 1)
+    retval = properties;
+  elseif (nargin == 2)
+    pnames = varargin{2};
+    if (ischar (pnames))
+      retval = getfield (properties, pnames);
+    elseif (iscellstr (pnames))
+      retval = cell (size (pnames));
+      for i = 1:numel (pnames)
+        retval{i} = getfield (properties, pnames{i});
+      endfor
+    else
+      error ("@audiorecorder/get: invalid name argument");
+    endif
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/getaudiodata.m
@@ -0,0 +1,58 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{data} =} getaudiodata (@var{recorder})
+## @deftypefnx {Function File} {@var{data} =} getaudiodata (@var{recorder}, @var{datatype})
+## Return recorder audio data as a matrix with values between -1.0 and 1.0
+## and with as many columns as there are channels in the recorder.
+## Given the optional argument @var{datatype}, convert the recorded data
+## to the specified type, which may be one of @qcode{"double"},
+## @qcode{"single"}, @qcode{"int16"}, @qcode{"int8"} or @qcode{"uint8"}.
+## @end deftypefn
+
+function data = getaudiodata (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  recorder = varargin{1};
+
+  if (nargin == 1)
+    data = __recorder_getaudiodata__ (struct (recorder).recorder);
+  else
+    data = __recorder_getaudiodata__ (struct (recorder).recorder);
+    type = varargin{2};
+    switch (type)
+      case "int16"
+        data = int16 (data * (2.0 ^ 15));
+      case "int8"
+        data = int8 (data * (2.0 ^ 7));
+      case "uint8"
+        data = uint8 ((data + 1.0) * 0.5 * (2.0 ^ 8 - 1));
+    endswitch
+  endif
+
+  if (get (recorder, "NumberOfChannels") == 2)
+    data = data';
+  else
+    data = data(1,:)';
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/getplayer.m
@@ -0,0 +1,36 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{player} =} getplayer (@var{recorder})
+## Return an audioplayer object with data recorded by the audiorecorder
+## object @var{recorder}.
+## @end deftypefn
+
+function player = getplayer (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  recorder = varargin{1};
+  data = getaudiodata (recorder);
+  player = audioplayer (data, get (recorder, "SampleRate"),
+                        get (recorder, "BitsPerSample"));
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/isrecording.m
@@ -0,0 +1,33 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} isrecording (@var{recorder})
+## Return 1 if the audiorecorder object @var{recorder} is currently
+## recording audio and 0 otherwise.
+## @end deftypefn
+
+function result = isrecording (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  result = __recorder_isrecording__ (struct (recorder).recorder);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/pause.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} pause (@var{recorder})
+## Pause recording with audiorecorder object @var{recorder}.
+## @end deftypefn
+
+function pause (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __recorder_pause__ (struct (recorder).recorder);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/play.m
@@ -0,0 +1,46 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{player} =} play (@var{recorder})
+## @deftypefnx {Function File} {@var{player} =} play (@var{recorder}, @var{start})
+## @deftypefnx {Function File} {@var{player} =} play (@var{recorder}, [@var{start}, @var{end}])
+## Play the audio recorded in @var{recorder} and return a corresponding
+## audioplayer object.  If the optional argument @var{start} is
+## provided, begin playing @var{start} seconds in to the recording.
+## If the optional argument @var{end} is provided, stop playing at
+## @var{end} seconds in the recording.
+## @end deftypefn
+
+function player = play (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  recorder = varargin{1};
+  data = getaudiodata (recorder);
+  player = audioplayer (data, get (recorder, "SampleRate"),
+                        get (recorder, "BitsPerSample"));
+  if (nargin == 1)
+    play (player);
+  else
+    play (player, varargin{2});
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/record.m
@@ -0,0 +1,36 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} record (@var{recorder})
+## @deftypefnx {Function File} {} record (@var{recorder}, @var{length})
+## Record audio without blocking using the audiorecorder object
+## @var{recorder} until stopped or paused by the @var{stop} or
+## @var{pause} method.  Given the optional argument @var{length}, record
+## for @var{length} seconds.
+## @end deftypefn
+
+function record (varargin)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  __recorder_record__ (struct (varargin{1}).recorder, varargin{2:end});
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/recordblocking.m
@@ -0,0 +1,33 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} recordblocking (@var{recorder}, @var{length})
+## Record audio with blocking (synchronous I/O).  You must specify the
+## length of the recording in seconds.
+## @end deftypefn
+
+function recordblocking (varargin)
+
+  if (nargin != 2)
+    print_usage ();
+  endif
+
+  __recorder_recordblocking__ (struct (varargin{1}).recorder, varargin{2});
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/resume.m
@@ -0,0 +1,32 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} resume (@var{recorder})
+## Resume recording with the paused audiorecorder object @var{recorder}.
+## @end deftypefn
+
+function resume (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __recorder_resume__ (struct (recorder).recorder);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/set.m
@@ -0,0 +1,75 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} set (@var{recorder}, @var{name}, @var{value})
+## @deftypefnx {Function File} {} set (@var{recorder}, @var{properties})
+## @deftypefnx {Function File} {@var{properties} =} set (@var{recorder})
+## Set the value of property specified by @var{name} to a given @var{value}.
+## If @var{name} and @var{value} are cell arrays of the same size,
+## set each property to a corresponding value.
+## Given a structure with fields corresponding to property names, set
+## the value of those properties to the corresponding field values.
+## Given only the recorder object, return a structure of settable
+## properties.
+## @end deftypefn
+
+function settable = set (varargin)
+
+  if (nargin < 1 || nargin > 3)
+    print_usage ();
+  endif
+
+  recorder = struct (varargin{1}).recorder;
+
+  if (nargin == 1)
+    settable.SampleRate = {};
+    settable.Tag = {};
+    settable.UserData = {};
+  elseif (nargin == 2)
+    for [value, property] = varargin{2}
+      setproperty (recorder, property, value);
+    endfor
+  elseif (nargin == 3)
+    if (iscell (varargin{2}))
+      index = 1;
+      for property = varargin{2}
+        setproperty (recorder, char (property), varargin{3}{index});
+        index = index + 1;
+      endfor
+    else
+      setproperty (recorder, varargin{2}, varargin{3});
+    endif
+  endif
+
+endfunction
+
+function setproperty (recorder, property, value)
+
+  switch (property)
+    case "SampleRate"
+      __recorder_set_fs__ (recorder, value);
+    case "Tag"
+      __recorder_set_tag__ (recorder, value);
+    case "UserData"
+      __recorder_set_userdata__ (recorder, value);
+    otherwise
+      error ("@audiorecorder/set: no such property or the property specified is read-only");
+  endswitch
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/stop.m
@@ -0,0 +1,33 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} stop (@var{recorder})
+## Stop the audiorecorder object @var{recorder} and clean up any audio
+## streams.
+## @end deftypefn
+
+function stop (recorder)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  __recorder_stop__ (struct (recorder).recorder);
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/subsasgn.m
@@ -0,0 +1,42 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{value} =} subsasgn (@var{recorder}, @var{idx}, @var{rhs})
+## Perform subscripted assignment on the audio recorder object @var{recorder}.
+## Assign the value of @var{rhs} to the recorder property named by @var{idx}.
+## @end deftypefn
+
+function value = subsasgn (recorder, idx, rhs)
+  if (nargin != 3)
+    print_usage ();
+  endif
+
+  if (isempty (idx))
+    error ("@audiorecorder/subsasgn: missing index");
+  endif
+
+  if (strcmp (idx(1).type, "."))
+    field = idx.subs;
+    set (recorder, field, rhs);
+    value = recorder;
+  else
+    error ("@audiorecorder/subsasgn: invalid subscript type");
+  endif
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/audio/@audiorecorder/subsref.m
@@ -0,0 +1,42 @@
+## Copyright (C) 2013-2015 Vytautas Jančauskas
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{value} =} subsref (@var{recorder}, @var{idx})
+## Perform subscripted selection on the audio recorder object @var{recorder}.
+## Return the recorder property value named by @var{idx}.
+## @end deftypefn
+
+function value = subsref (recorder, idx)
+
+  if (nargin != 2)
+    print_usage ();
+  endif
+
+  if (isempty (idx))
+    error ("@audiorecorder/subsref: missing index");
+  endif
+
+  if (strcmp (idx(1).type, "."))
+    field = idx.subs;
+    value = get (recorder, field);
+  else
+    error ("@audiorecorder/subsref: invalid subscript type")
+  endif
+
+endfunction
--- a/scripts/audio/lin2mu.m
+++ b/scripts/audio/lin2mu.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -25,7 +25,7 @@
 ##
 ## If @var{n} is not specified it defaults to 0, 8, or 16 depending on
 ## the range of values in @var{x}.
-## @seealso{mu2lin, loadaudio, saveaudio}
+## @seealso{mu2lin}
 ## @end deftypefn
 
 
--- a/scripts/audio/module.mk
+++ b/scripts/audio/module.mk
@@ -2,14 +2,41 @@
 
 audio_FCN_FILES = \
   audio/lin2mu.m \
-  audio/loadaudio.m \
   audio/mu2lin.m \
-  audio/playaudio.m \
   audio/record.m \
-  audio/saveaudio.m \
-  audio/setaudio.m \
+  audio/sound.m \
+  audio/soundsc.m \
   audio/wavread.m \
-  audio/wavwrite.m
+  audio/wavwrite.m \
+  audio/@audioplayer/__get_properties__.m \
+  audio/@audioplayer/audioplayer.m \
+  audio/@audioplayer/display.m \
+  audio/@audioplayer/get.m \
+  audio/@audioplayer/isplaying.m \
+  audio/@audioplayer/pause.m  \
+  audio/@audioplayer/play.m \
+  audio/@audioplayer/playblocking.m \
+  audio/@audioplayer/resume.m \
+  audio/@audioplayer/set.m \
+  audio/@audioplayer/stop.m \
+  audio/@audioplayer/subsasgn.m \
+  audio/@audioplayer/subsref.m \
+  audio/@audiorecorder/__get_properties__.m \
+  audio/@audiorecorder/audiorecorder.m \
+  audio/@audiorecorder/display.m \
+  audio/@audiorecorder/get.m \
+  audio/@audiorecorder/getaudiodata.m \
+  audio/@audiorecorder/getplayer.m \
+  audio/@audiorecorder/isrecording.m \
+  audio/@audiorecorder/pause.m \
+  audio/@audiorecorder/play.m \
+  audio/@audiorecorder/record.m \
+  audio/@audiorecorder/recordblocking.m \
+  audio/@audiorecorder/resume.m \
+  audio/@audiorecorder/set.m \
+  audio/@audiorecorder/stop.m \
+  audio/@audiorecorder/subsasgn.m \
+  audio/@audiorecorder/subsref.m
 
 FCN_FILES += $(audio_FCN_FILES)
 
--- a/scripts/audio/mu2lin.m
+++ b/scripts/audio/mu2lin.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -24,7 +24,7 @@
 ## is 0.
 ##
 ## If @var{n} is not specified it defaults to 0.
-## @seealso{lin2mu, loadaudio, saveaudio}
+## @seealso{lin2mu}
 ## @end deftypefn
 
 ## Author:  Andreas Weingessel <Andreas.Weingessel@ci.tuwien.ac.at>
@@ -63,7 +63,7 @@
   ## Set the shape of y to that of x overwrites the contents of y with
   ## ulaw of x.
   y = x;
-  y(:) = ulaw (x + 1);
+  y(:) = ulaw(x + 1);
 
   ## Convert to real or 8-bit.
   if (n == 0)
--- a/scripts/audio/record.m
+++ b/scripts/audio/record.m
@@ -1,4 +1,5 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 2015 Mike Miller
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,50 +18,53 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} record (@var{sec}, @var{sampling_rate})
-## Record @var{sec} seconds of audio input into the vector @var{x}.  The
-## default value for @var{sampling_rate} is 8000 samples per second, or
-## 8kHz.  The program waits until the user types @key{RET} and then
-## immediately starts to record.
-## @seealso{lin2mu, mu2lin, loadaudio, saveaudio, playaudio, setaudio}
+## @deftypefn  {Function File} {} record (@var{sec})
+## @deftypefnx {Function File} {} record (@var{sec}, @var{fs})
+## Record @var{sec} seconds of audio from the system's default audio input at
+## a sampling rate of 8000 samples per second.  If the optional argument
+## @var{fs} is given, it specifies the sampling rate for recording.
+##
+## For more control over audio recording, use the @code{audiorecorder} class.
 ## @end deftypefn
 
-## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
-## Created: 19 September 1994
-## Adapted-By: jwe
-
-function X = record (sec, sampling_rate)
+function x = record (sec, fs)
 
   if (nargin == 1)
-    sampling_rate = 8000;
+    fs = 8000;
   elseif (nargin != 2)
     print_usage ();
   endif
 
-  unwind_protect
-
-    file = tmpnam ();
+  if (! (isscalar (sec) && (sec >= 0)))
+    error ("record: recording duration SEC must be a non-negative number");
+  endif
 
-    input ("Please hit ENTER and speak afterwards!\n", 1);
+  if (! (isscalar (fs) && (fs > 0)))
+    error ("record: sample rate FS must be a positive number");
+  endif
 
-    cmd = sprintf ("dd if=/dev/dsp of=\"%s\" bs=%d count=%d",
-                   file, sampling_rate, sec);
-
-    system (cmd);
+  x = [];
 
-    num = fopen (file, "rb");
+  if (sec > 0)
 
-    [Y, c] = fread (num, sampling_rate * sec, "uchar");
-
-    fclose (num);
+    rec = audiorecorder (fs, 16, 1);
 
-  unwind_protect_cleanup
-
-    unlink (file);
+    recordblocking (rec, sec);
 
-  end_unwind_protect
+    x = getaudiodata (rec);
 
-  X = Y - 127;
+  endif
 
 endfunction
 
+
+## Tests of record must not actually record anything.
+
+%!assert (isempty (record (0)))
+
+## Test input validation
+%!error record ()
+%!error record (1,2,3)
+%!error record (-1)
+%!error record (1, -1)
+
new file mode 100644
--- /dev/null
+++ b/scripts/audio/sound.m
@@ -0,0 +1,67 @@
+## Copyright (C) 2015 Mike Miller
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} sound (@var{y})
+## @deftypefnx {Function File} {} sound (@var{y}, @var{fs})
+## @deftypefnx {Function File} {} sound (@var{y}, @var{fs}, @var{nbits})
+## Play audio data @var{y} at sample rate @var{fs} to the default audio
+## device.  If @var{fs} is not given, a default sample rate of 8000 samples
+## per second is used.  The optional argument @var{nbits} specifies the bit
+## depth to play to the audio device and defaults to 8 bits.
+##
+## The audio signal @var{y} can be a vector or a two-column array, representing
+## mono or stereo audio, respectively.
+##
+## For more control over audio playback, use the @code{audioplayer} class.
+## @seealso{record, soundsc}
+## @end deftypefn
+
+function sound (y, fs, nbits)
+
+  if (nargin < 1 || nargin > 3)
+    print_usage ();
+  endif
+
+  if (nargin < 2 || isempty (fs))
+    fs = 8000;
+  elseif (! (isscalar (fs) && (fs > 0)))
+    error ("sound: sample rate FS must be a positive number");
+  endif
+
+  if (nargin < 3 || isempty (nbits))
+    nbits = 8;
+  elseif (! (isscalar (nbits) && (nbits == 8 || nbits == 16 || nbits == 24)))
+    error ("sound: bit depth NBITS must be 8, 16, or 24");
+  endif
+
+  play = audioplayer (y, fs, nbits);
+
+  playblocking (play);
+
+endfunction
+
+
+## Tests of sound must not actually play anything.
+
+## Test input validation
+%!error sound ()
+%!error sound (1,2,3,4)
+%!error sound (1, -1)
+%!error sound (1, [], 2)
+
new file mode 100644
--- /dev/null
+++ b/scripts/audio/soundsc.m
@@ -0,0 +1,106 @@
+## Copyright (C) 2015 Mike Miller
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} soundsc (@var{y})
+## @deftypefnx {Function File} {} soundsc (@var{y}, @var{fs})
+## @deftypefnx {Function File} {} soundsc (@var{y}, @var{fs}, @var{nbits})
+## @deftypefnx {Function File} {} soundsc (@dots{}, [@var{ymin}, @var{ymax}])
+## Scale the audio data @var{y} and play it at sample rate @var{fs} to the
+## default audio device.  If @var{fs} is not given, a default sample rate of
+## 8000 samples per second is used.  The optional argument @var{nbits} specifies
+## the bit depth to play to the audio device and defaults to 8 bits.
+##
+## By default, @var{y} is automatically normalized to the range [-1, 1].  If the
+## range [@var{ymin}, @var{ymax}] is given, then elements of @var{y} that fall
+## within the range @var{ymin} @leq{} @var{y} @leq{} @var{ymax} are scaled to
+## the range [-1, 1] instead.
+##
+## The audio signal @var{y} can be a vector or a two-column array, representing
+## mono or stereo audio, respectively.
+##
+## For more control over audio playback, use the @code{audioplayer} class.
+## @seealso{record, sound}
+## @end deftypefn
+
+function soundsc (y, fs, nbits, yrange)
+
+  if (nargin < 1 || nargin > 4)
+    print_usage ();
+  endif
+
+  if (nargin < 4)
+    yrange = [];
+  endif
+
+  if (nargin < 2 || isempty (fs))
+    fs = 8000;
+  elseif (nargin == 2 && numel (fs) > 1)
+    yrange = fs;
+    fs = 8000;
+  elseif (! (isscalar (fs) && (fs > 0)))
+    error ("soundsc: sample rate FS must be a positive number");
+  endif
+
+  if (nargin < 3 || isempty (nbits))
+    nbits = 8;
+  elseif (nargin == 3 && numel (nbits) > 1)
+    yrange = nbits;
+    nbits = 8;
+  elseif (! (isscalar (nbits) && (nbits == 8 || nbits == 16 || nbits == 24)))
+    error ("soundsc: bit depth NBITS must be 8, 16, or 24");
+  endif
+
+  if (isreal (yrange) && (numel (yrange) == 2) && (yrange(1) <= yrange(2)))
+    ymin = yrange(1);
+    ymax = yrange(2);
+  elseif (isempty (yrange))
+    ymin = min (y(:));
+    ymax = max (y(:));
+  else
+    error ("soundsc: audio range must be a 2-element [YMIN, YMAX] vector");
+  endif
+
+  ymin = double (ymin);
+  ymax = double (ymax);
+  ymedian = (ymax + ymin) / 2;
+  yscale = 2 / (ymax - ymin);
+
+  y = (double (y) - ymedian) .* yscale;
+
+  play = audioplayer (y, fs, nbits);
+
+  playblocking (play);
+
+endfunction
+
+
+## Tests of soundsc must not actually play anything.
+
+## Test input validation
+%!error soundsc ()
+%!error soundsc (1,2,3,4,5)
+%!error soundsc (1, -1)
+%!error soundsc (1, [], 2)
+%!error soundsc (1, [2 1])
+%!error soundsc (1, [1 2 3])
+%!error soundsc (1, 8000, [2 1])
+%!error soundsc (1, 8000, [1 2 3])
+%!error soundsc (1, 8000, 8, [2 1])
+%!error soundsc (1, 8000, 8, [1 2 3])
+
--- a/scripts/audio/wavread.m
+++ b/scripts/audio/wavread.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2005-2013 Michael Zeising
+## Copyright (C) 2015 Mike Miller
+## Copyright (C) 2005-2015 Michael Zeising
 ##
 ## This file is part of Octave.
 ##
@@ -18,45 +19,35 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{y} =} wavread (@var{filename})
-## @deftypefnx {Function File} {[@var{y}, @var{Fs}, @var{bps}] =} wavread (@var{filename})
+## @deftypefnx {Function File} {[@var{y}, @var{fs}, @var{nbits}] =} wavread (@var{filename})
 ## @deftypefnx {Function File} {[@dots{}] =} wavread (@var{filename}, @var{n})
 ## @deftypefnx {Function File} {[@dots{}] =} wavread (@var{filename}, [@var{n1} @var{n2}])
-## @deftypefnx {Function File} {[@var{samples}, @var{channels}] =} wavread (@var{filename}, "size")
+## @deftypefnx {Function File} {[@dots{}] =} wavread (@dots{}, @var{datatype})
+## @deftypefnx {Function File} {@var{sz} =} wavread (@var{filename}, "size")
+## Read the audio signal @var{y} from the RIFF/WAVE sound file @var{filename}.
+## If the file contains multichannel data, then @var{y} is a matrix with the
+## channels represented as columns.
 ##
-## Load the RIFF/WAVE sound file @var{filename}, and return the samples
-## in vector @var{y}.  If the file contains multichannel data, then
-## @var{y} is a matrix with the channels represented as columns.
-##
-## @code{[@var{y}, @var{Fs}, @var{bps}] = wavread (@var{filename})}
-##
-## Additionally return the sample rate (@var{fs}) in Hz and the number of bits
-## per sample (@var{bps}).
+## The optional return value @var{fs} is the sample rate of the audio file in
+## Hz.  The optional return value @var{nbits} is the number of bits per sample
+## as encoded in the file.
 ##
-## @code{[@dots{}] = wavread (@var{filename}, @var{n})}
-##
-## Read only the first @var{n} samples from each channel.
-##
-## @code{wavread (@var{filename}, [@var{n1} @var{n2}])}
+## If @var{n} is specified, only the first @var{n} samples of the file are
+## returned.  If [@var{n1} @var{n2}] is specified, only the range of samples
+## from @var{n1} to @var{n2} is returned.  A value of @code{Inf} can be used
+## to represent the total number of samples in the file.
 ##
-## Read only samples @var{n1} through @var{n2} from each channel.
-##
-## @code{[@var{samples}, @var{channels}] = wavread (@var{filename}, "size")}
-##
-## Return the number of samples (@var{n}) and number of channels (@var{ch})
-## instead of the audio data.
-## @seealso{wavwrite}
+## If the option @qcode{"size"} is given, then the size of the audio signal
+## is returned instead of the data.  The size is returned in a row vector of
+## the form [@var{samples} @var{channels}].  If there are two output arguments,
+## the number of samples is assigned to the first and the number of channels
+## is assigned to the second.
+## @seealso{audioread, audiowrite, wavwrite}
 ## @end deftypefn
 
-## Author: Michael Zeising <michael@michaels-website.de>
-## Created: 06 December 2005
-
-function [y, samples_per_sec, bits_per_sample] = wavread (filename, param)
+function [y, fs, nbits] = wavread (filename, varargin)
 
-  FORMAT_PCM        = 0x0001;   # PCM (8/16/32 bit)
-  FORMAT_IEEE_FLOAT = 0x0003;   # IEEE float (32/64 bit)
-  BYTEORDER         = "ieee-le";
-
-  if (nargin < 1 || nargin > 2)
+  if (nargin < 1 || nargin > 3)
     print_usage ();
   endif
 
@@ -64,198 +55,59 @@
     error ("wavread: FILENAME must be a character string");
   endif
 
-  fid = -1;
-
-  unwind_protect
-
-    [fid, msg] = fopen (filename, "rb");
-
-    if (fid < 0)
-      error ("wavread: %s", msg);
-    endif
-
-    ## Get file size.
-    fseek (fid, 0, "eof");
-    file_size = ftell (fid);
-    fseek (fid, 0, "bof");
-
-    ## Find RIFF chunk.
-    riff_size = find_chunk (fid, "RIFF", file_size);
-    riff_pos = ftell (fid);
-    if (riff_size == -1)
-      error ("wavread: file contains no RIFF chunk");
-    endif
-    riff_size = min (riff_size, file_size - riff_pos);
-
-    riff_type = char (fread (fid, 4))';
-    if (! strcmp (riff_type, "WAVE"))
-      error ("wavread: file contains no WAVE signature");
-    endif
-    riff_pos = riff_pos + 4;
-    riff_size = riff_size - 4;
-
-    ## Find format chunk inside the RIFF chunk.
-    fseek (fid, riff_pos, "bof");
-    fmt_size = find_chunk (fid, "fmt ", riff_size);
-    fmt_pos = ftell (fid);
-    if (fmt_size == -1)
-      error ("wavread: file contains no format chunk");
-    endif
-
-    ## Find data chunk inside the RIFF chunk.
-    ## We don't assume that it comes after the format chunk.
-    fseek (fid, riff_pos, "bof");
-    data_size = find_chunk (fid, "data", riff_size);
-    data_pos = ftell (fid);
-    if (data_size == -1)
-      error ("wavread: file contains no data chunk");
-    endif
-    data_size = min (data_size, file_size - data_pos);
-
-    ### Read format chunk.
-    fseek (fid, fmt_pos, "bof");
-
-    ## Sample format code.
-    format_tag = fread (fid, 1, "uint16", 0, BYTEORDER);
-    if (format_tag != FORMAT_PCM && format_tag != FORMAT_IEEE_FLOAT)
-      error ("wavread: sample format %#x is not supported", format_tag);
-    endif
-
-    ## Number of interleaved channels.
-    channels = fread (fid, 1, "uint16", 0, BYTEORDER);
-
-    ## Sample rate.
-    samples_per_sec = fread (fid, 1, "uint32", 0, BYTEORDER);
-
-    ## Bits per sample.
-    fseek (fid, 6, "cof");
-    bits_per_sample = fread (fid, 1, "uint16", 0, BYTEORDER);
-
-    ### Read data chunk.
-    fseek (fid, data_pos, "bof");
+  datatype = "double";
+  samples = [1, Inf];
+  do_file_size = false;
 
-    ## Determine sample data type.
-    if (format_tag == FORMAT_PCM)
-      switch (bits_per_sample)
-        case 8
-          format = "uint8";
-        case 16
-          format = "int16";
-        case 24
-          format = "uint8";
-        case 32
-          format = "int32";
-        otherwise
-          error ("wavread: %d bits sample resolution is not supported with PCM",
-                 bits_per_sample);
-      endswitch
-    else
-      switch (bits_per_sample)
-        case 32
-          format = "float32";
-        case 64
-          format = "float64";
-        otherwise
-          error ("wavread: %d bits sample resolution is not supported with IEEE float",
-                 bits_per_sample);
-      endswitch
-    endif
-
-    ## Parse arguments.
-    if (nargin == 1)
-      length = idivide (8 * data_size, bits_per_sample);
+  if (nargin == 3)
+    samples = varargin{1};
+    datatype = varargin{2};
+  elseif (nargin == 2)
+    if (strcmp (varargin{1}, "size"))
+      do_file_size = true;
+    elseif (ischar (varargin{1}))
+      datatype = varargin{1};
     else
-      nparams = numel (param);
-      if (nparams == 1)
-        ## Number of samples is given.
-        length = param * channels;
-      elseif (nparams == 2)
-        ## Sample range is given.
-        if (fseek (fid, (param(1)-1) * channels * (bits_per_sample/8), "cof") < 0)
-          warning ("wavread: seeking failed");
-        endif
-        length = (param(2)-param(1)+1) * channels;
-      elseif (nparams == 4 && char (param) == "size")
-        ## Size of the file is requested.
-        y = idivide (8 * data_size, channels * bits_per_sample);
-        samples_per_sec = channels;
-        return;
-      else
-        error ("wavread: invalid PARAM argument");
-      endif
+      samples = varargin{1};
     endif
+  endif
 
-    ## Read samples and close file.
-    if (bits_per_sample == 24)
-      length *= 3;
-    endif
-
-    [yi, n] = fread (fid, length, format, 0, BYTEORDER);
-
-  unwind_protect_cleanup
-
-    if (fid >= 0)
-      fclose (fid);
-    endif
-
-  end_unwind_protect
-
-  ## Check data.
-  if (mod (numel (yi), channels) != 0)
-    error ("wavread: data in %s doesn't match the number of channels",
-           filename);
+  if (isscalar (samples))
+    samples = [1, samples];
   endif
 
-  if (bits_per_sample == 24)
-    yi = reshape (yi, 3, rows (yi) / 3)';
-    yi(yi(:,3) >= 128, 3) -= 256;
-    yi = yi * [1; 256; 65536];
+  if (! (isrow (samples) && numel (samples) == 2 && all (samples > 0)
+         && all (fix (samples) == samples)))
+    error ("wavread: SAMPLES must be a 1- or 2-element integer row vector");
+  endif
+
+  if (! (ischar (datatype) && any (strcmp (datatype, {"double", "native"}))))
+    error ('wavread: DATATYPE must be either "double" or "native"');
   endif
 
-  if (format_tag == FORMAT_PCM)
-    ## Normalize samples.
-    switch (bits_per_sample)
-      case 8
-        yi = (yi - 128)/128;
-      case 16
-        yi /= 32768;
-      case 24
-        yi /= 8388608;
-      case 32
-        yi /= 2147483648;
-    endswitch
+  info = audioinfo (filename);
+
+  if (do_file_size)
+    if (nargout > 1)
+      [y, fs] = deal (info.TotalSamples, info.NumChannels);
+    else
+      y = [info.TotalSamples, info.NumChannels];
+    endif
+  else
+    [y, fs] = audioread (filename, samples, datatype);
+    nbits = info.BitsPerSample;
   endif
 
-  ## Deinterleave.
-  nr = numel (yi) / channels;
-  y = reshape (yi, channels, nr)';
-
 endfunction
 
-## Given a chunk_id, scan through chunks from the current file position
-## though at most size bytes.  Return the size of the found chunk, with
-## file position pointing to the start of the chunk data.  Return -1 for
-## size if chunk is not found.
 
-function chunk_size = find_chunk (fid, chunk_id, size)
-  id = "";
-  offset = 8;
-  chunk_size = 0;
+## Functional tests for wavread/wavwrite pair are in wavwrite.m.
 
-  while (! strcmp (id, chunk_id) && (offset < size))
-    fseek (fid, chunk_size, "cof");
-    id = char (fread (fid, 4))';
-    chunk_size = fread (fid, 1, "uint32", 0, "ieee-le");
-    ## Chunk sizes must be word-aligned (2 byte)
-    chunk_size += rem (chunk_size, 2);
-    offset = offset + 8 + chunk_size;
-  endwhile
-  if (! strcmp (id, chunk_id))
-    chunk_size = -1;
-  endif
-endfunction
+## Test input validation
+%!error wavread ()
+%!error wavread (1)
+%!error wavread ("foo.wav", 2, 3, 4)
+%!error wavread ("foo.wav", "foo")
+%!error wavread ("foo.wav", -1)
+%!error wavread ("foo.wav", [1, Inf], "foo");
 
-
-## Mark file as tested.  Tests for wavread/wavwrite pair are in wavwrite.m.
-%!assert (1)
-
--- a/scripts/audio/wavwrite.m
+++ b/scripts/audio/wavwrite.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2005-2013 Michael Zeising
+## Copyright (C) 2015 Mike Miller
+## Copyright (C) 2005-2015 Michael Zeising
 ##
 ## This file is part of Octave.
 ##
@@ -18,36 +19,34 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} wavwrite (@var{y}, @var{filename})
-## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{Fs}, @var{filename})
-## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{Fs}, @var{bps}, @var{filename})
-## Write @var{y} to the canonical RIFF/WAVE sound file @var{filename}
-## with sample rate @var{Fs} and bits per sample @var{bps}.  The
-## default sample rate is 8000 Hz with 16-bits per sample.  Each column
-## of the data represents a separate channel.  If @var{y} is either a
-## row vector or a column vector, it is written as a single channel.
-## @seealso{wavread}
+## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{fs}, @var{filename})
+## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{fs}, @var{nbits}, @var{filename})
+## Write the audio signal @var{y} to the RIFF/WAVE sound file @var{filename}.
+## If @var{y} is a matrix, the columns represent multiple audio channels.
+##
+## The optional argument @var{fs} specifies the sample rate of the audio signal
+## in Hz.  The optional argument @var{nbits} specifies the number of bits per
+## sample to write to @var{filename}.  The default sample rate is 8000 Hz and
+## the default bit depth is 16 bits per sample.
+##
+## @seealso{audioread, audiowrite, wavread}
 ## @end deftypefn
 
-## Author: Michael Zeising <michael@michaels-website.de>
-## Created: 06 December 2005
-
 function wavwrite (y, varargin)
 
-  BYTEORDER = "ieee-le";
-
   if (nargin < 2 || nargin > 4)
     print_usage ();
   endif
 
   ## Defaults.
-  samples_per_sec = 8000;
-  bits_per_sample = 16;
+  fs = 8000;
+  nbits = 16;
 
   filename = varargin{end};
   if (nargin > 2)
-    samples_per_sec = varargin{1};
+    fs = varargin{1};
     if (nargin > 3)
-      bits_per_sample = varargin{2};
+      nbits = varargin{2};
     endif
   endif
 
@@ -56,6 +55,7 @@
 
   ## allow y to be a row vector
   if (n == 1)
+    y = y(:);
     n = channels;
     channels = 1;
   endif
@@ -64,155 +64,113 @@
   if (channels < 1)
     error ("wavwrite: Y must have at least one column");
   endif
+
   if (channels > 0x7FFF)
-    error ("wavwrite: Y has more than 32767 columns (too many for a WAV-file)");
-  endif
-
-  ## determine sample format
-  switch (bits_per_sample)
-    case 8
-      format = "uint8";
-    case 16
-      format = "int16";
-    case 32
-      format = "int32";
-    otherwise
-      error ("wavwrite: sample resolution not supported");
-  endswitch
-
-  ## size of data chunk
-  ck_size = n*channels*(bits_per_sample/8);
-
-  if (! ischar (filename))
-    error ("wavwrite: expecting FILENAME to be a character string");
-  endif
-
-  ## open file for writing binary
-  [fid, msg] = fopen (filename, "wb");
-  if (fid < 0)
-    error ("wavwrite: %s", msg);
+    error ("wavwrite: Y must have no more than 32767 columns");
   endif
 
-  ## write RIFF/WAVE header
-  c = 0;
-  c += fwrite (fid, "RIFF", "uchar");
-
-  ## file size - 8
-  c += fwrite (fid, ck_size + 36, "uint32", 0, BYTEORDER);
-  c += fwrite (fid, "WAVEfmt ", "uchar");
-
-  ## size of fmt chunk
-  c += fwrite (fid, 16, "uint32", 0, BYTEORDER);
-
-  ## sample format code (PCM)
-  c += fwrite (fid, 1, "uint16", 0, BYTEORDER);
-
-  ## channels
-  c += fwrite (fid, channels, "uint16", 0, BYTEORDER);
-
-  ## sample rate
-  c += fwrite (fid, samples_per_sec, "uint32", 0, BYTEORDER);
-
-  ## bytes per second
-  byteps = samples_per_sec*channels*bits_per_sample/8;
-  c += fwrite (fid, byteps, "uint32", 0, BYTEORDER);
-
-  ## block align
-  c += fwrite (fid, channels*bits_per_sample/8, "uint16", 0, BYTEORDER);
-
-  c += fwrite (fid, bits_per_sample, "uint16", 0, BYTEORDER);
-  c += fwrite (fid, "data", "uchar");
-  c += fwrite (fid, ck_size, "uint32", 0, BYTEORDER);
-
-  if (c < 25)
-    fclose (fid);
-    error ("wavwrite: writing to file failed");
+  if (! (isscalar (fs) && (fs > 0)))
+    error ("wavwrite: sample rate FS must be a positive number");
   endif
 
-  ## interleave samples
-  yi = reshape (y', n*channels, 1);
+  if (! isscalar (nbits) || isempty (find (nbits == [8, 16, 24, 32])))
+    error ("wavwrite: bit depth NBITS must be 8, 16, 24, or 32");
+  endif
 
-  ## scale samples
-  switch (bits_per_sample)
-    case 8
-      yi = round (yi*128 + 128);
-    case 16
-      yi = round (yi*32768);
-    case 32
-      yi = round (yi*2147483648);
-  endswitch
-
-  ## write to file
-  c = fwrite (fid, yi, format, 0, BYTEORDER);
-
-  fclose (fid);
+  audiowrite (filename, y, fs, "BitsPerSample", nbits);
 
 endfunction
 
 
 %!shared fname
-%! fname = tmpnam ();
+%! fname = [tempname() ".wav"];
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1; -1:0.1:1]';
-%! wavwrite (A, fname);
-%! [B, samples_per_sec, bits_per_sample] = wavread (fname);
-%! unlink (fname);
-%! assert (A,B, 1/2^15);
-%! assert (samples_per_sec, 8000);
-%! assert (bits_per_sample, 16);
+%! unwind_protect
+%!   wavwrite (A, fname);
+%!   [B, samples_per_sec, bits_per_sample] = wavread (fname);
+%!   assert (B, A, 2^-14);
+%!   assert (samples_per_sec, 8000);
+%!   assert (bits_per_sample, 16);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1; -1:0.1:1]';
-%! wavwrite (A, 4000, fname);
-%! [B, samples_per_sec, bits_per_sample] = wavread (fname);
-%! unlink (fname);
-%! assert (A,B, 1/2^15);
-%! assert (samples_per_sec, 4000);
-%! assert (bits_per_sample, 16);
+%! unwind_protect
+%!   wavwrite (A, 4000, fname);
+%!   [B, samples_per_sec, bits_per_sample] = wavread (fname);
+%!   assert (B, A, 2^-14);
+%!   assert (samples_per_sec, 4000);
+%!   assert (bits_per_sample, 16);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1; -1:0.1:1]';
-%! wavwrite (A, 4000, 8, fname);
-%! [B, samples_per_sec, bits_per_sample] = wavread (fname);
-%! unlink (fname);
-%! assert (A,B, 1/128);
-%! assert (samples_per_sec, 4000);
-%! assert (bits_per_sample, 8);
+%! unwind_protect
+%!   wavwrite (A, 4000, 8, fname);
+%!   [B, samples_per_sec, bits_per_sample] = wavread (fname);
+%!   assert (B, A, 2^-6);
+%!   assert (samples_per_sec, 4000);
+%!   assert (bits_per_sample, 8);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-2:2]';
-%! wavwrite (A, fname);
-%! B = wavread (fname);
-%! unlink (fname);
-%! B *= 32768;
-%! assert (B, [-32768 -32768 0 32767 32767]');
+%! unwind_protect
+%!   wavwrite (A, fname);
+%!   B = wavread (fname);
+%!   B *= 32768;
+%!   assert (B, [-32767 -32767 0 32767 32767]');
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1];
-%! wavwrite (A, fname);
-%! [B, samples_per_sec, bits_per_sample] = wavread (fname);
-%! unlink (fname);
-%! assert (A', B, 1/2^15);
-%! assert (samples_per_sec, 8000);
-%! assert (bits_per_sample, 16);
+%! unwind_protect
+%!   wavwrite (A, fname);
+%!   [B, samples_per_sec, bits_per_sample] = wavread (fname);
+%!   assert (B, A', 2^-14);
+%!   assert (samples_per_sec, 8000);
+%!   assert (bits_per_sample, 16);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1; -1:0.1:1]';
-%! wavwrite (A, fname);
-%! B = wavread (fname, 15);
-%! unlink (fname);
-%! assert (A(1:15,:) ,B, 1/2^15);
-%! wavwrite (A, fname);
-%! B = wavread (fname, [10, 20]);
-%! unlink (fname);
-%! assert (A(10:20,:) ,B, 1/2^15);
+%! unwind_protect
+%!   wavwrite (A, fname);
+%!   B = wavread (fname, 15);
+%!   assert (B, A(1:15,:), 2^-14);
+%!   wavwrite (A, fname);
+%!   B = wavread (fname, [10, 20]);
+%!   assert (B, A(10:20,:), 2^-14);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
-%!test
+%!testif HAVE_SNDFILE
 %! A = [-1:0.1:1; -1:0.1:1]';
-%! wavwrite (A, fname);
-%! [nsamp, nchan] = wavread (fname, "size");
-%! unlink (fname);
-%! assert (nsamp, 21);
-%! assert (nchan, 2);
+%! unwind_protect
+%!   wavwrite (A, fname);
+%!   [nsamp, nchan] = wavread (fname, "size");
+%!   assert (nsamp, 21);
+%!   assert (nchan, 2);
+%! unwind_protect_cleanup
+%!   unlink (fname);
+%! end_unwind_protect
 
+## Test input validation
+%!error wavwrite ()
+%!error wavwrite (1)
+%!error wavwrite (1,2,3,4,5)
+%!error wavwrite ([], "foo.wav");
+
deleted file mode 100644
--- a/scripts/deprecated/__error_text__.m
+++ /dev/null
@@ -1,37 +0,0 @@
-## Copyright (C) 2012-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Built-in Function} {[@var{msg}, @var{msgid}] =} __error_text__ (@var{msg}, @var{msgid})
-## This function has been deprecated.  Use @code{lasterr} instead.
-## @seealso{lasterr}
-## @end deftypefn
-
-function [msg, msgid] = __error_text__ (varargin)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "__error_text__ is obsolete and will be removed from a future version of Octave, please use lasterr instead");
-  endif
-
-  [msg, msgid] = lasterr (varargin{:});
-
-endfunction
-
rename from scripts/general/bicubic.m
rename to scripts/deprecated/bicubic.m
--- a/scripts/general/bicubic.m
+++ b/scripts/deprecated/bicubic.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Hoxide Ma
+## Copyright (C) 2005-2015 Hoxide Ma
 ##
 ## This file is part of Octave.
 ##
@@ -19,6 +19,9 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{zi} =} bicubic (@var{x}, @var{y}, @var{z}, @var{xi}, @var{yi}, @var{extrapval})
 ##
+## @code{bicubic} is deprecated and will be removed in Octave version 4.4.
+## Use @code{interp2 (@dots{}, "spline")} for the equivalent functionality.
+##
 ## Return a matrix @var{zi} corresponding to the bicubic
 ## interpolations at @var{xi} and @var{yi} of the data supplied
 ## as @var{x}, @var{y} and @var{z}.  Points outside the grid are set
@@ -32,8 +35,17 @@
 ## Bicubic interpolation method.
 ## Author: Hoxide Ma <hoxide_dirac@yahoo.com.cn>
 
+## Deprecated in version 4.0
+
 function zi = bicubic (x, y, z, xi, yi, extrapval, spline_alpha)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "bicubic is obsolete and will be removed from a future version of Octave, please use interp2 instead");
+  endif
+
   if (nargin < 1 || nargin > 7)
     print_usage ();
   endif
@@ -240,9 +252,9 @@
 %! z = cos (6 * xx) + sin (6 * yy);
 %! x = linspace (1, -1, 30);
 %! [xx2, yy2] = meshgrid (x);
-%! z1 = interp2 (xx, yy, z, xx2, yy2, "cubic");
+%! z1 = interp2 (xx, yy, z, xx2, yy2, "spline");
 %! z2 = interp2 (fliplr (xx), flipud (yy), fliplr (flipud(z)),
-%!               fliplr (xx2), flipud (yy2), "cubic");
+%!               fliplr (xx2), flipud (yy2), "spline");
 %! z2 = fliplr (flipud (z2));
 %! assert (z1, z2, 100 * eps ())
 
deleted file mode 100644
--- a/scripts/deprecated/cor.m
+++ /dev/null
@@ -1,54 +0,0 @@
-## Copyright (C) 1995-2013 Kurt Hornik
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {} cor (@var{x})
-## @deftypefnx {Function File} {} cor (@var{x}, @var{y})
-## Compute matrix of correlation coefficients.
-##
-## This is an alias for @code{corrcoef}.
-## @seealso{corrcoef}
-## @end deftypefn
-
-function retval = cor (x, y = x)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "cor is obsolete and will be removed from a future version of Octave; please use corr instead");
-  endif
-
-  if (nargin < 1 || nargin > 2)
-    print_usage ();
-  endif
-
-  retval = corrcoef (x, y);
-
-endfunction
-
-
-%!test
-%! x = rand (10, 2);
-%! assert (cor (x), corrcoef (x), 5*eps);
-%! assert (cor (x(:,1), x(:,2)) == corrcoef (x(:,1), x(:,2)));
-
-%% Test input validation
-%!error corrcoef ();
-%!error corrcoef (1, 2, 3);
-
deleted file mode 100644
--- a/scripts/deprecated/corrcoef.m
+++ /dev/null
@@ -1,119 +0,0 @@
-## Copyright (C) 1996-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {} corrcoef (@var{x})
-## @deftypefnx {Function File} {} corrcoef (@var{x}, @var{y})
-## Compute matrix of correlation coefficients.
-##
-## If each row of @var{x} and @var{y} is an observation and each column is
-## a variable, then the @w{(@var{i}, @var{j})-th} entry of
-## @code{corrcoef (@var{x}, @var{y})} is the correlation between the
-## @var{i}-th variable in @var{x} and the @var{j}-th variable in @var{y}.
-## @tex
-## $$
-## {\rm corrcoef}(x,y) = {{\rm cov}(x,y) \over {\rm std}(x) {\rm std}(y)}
-## $$
-## @end tex
-## @ifnottex
-##
-## @example
-## corrcoef(x,y) = cov(x,y)/(std(x)*std(y))
-## @end example
-##
-## @end ifnottex
-## If called with one argument, compute @code{corrcoef (@var{x}, @var{x})},
-## the correlation between the columns of @var{x}.
-## @seealso{cov}
-## @end deftypefn
-
-## Author: Kurt Hornik <hornik@wu-wien.ac.at>
-## Created: March 1993
-## Adapted-By: jwe
-
-function retval = corrcoef (x, y = [])
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "corrcoef is not equivalent to Matlab and will be removed from a future version of Octave; for similar functionality see corr");
-  endif
-
-  if (nargin < 1 || nargin > 2)
-    print_usage ();
-  endif
-
-  ## Input validation is done by cov.m.  Don't repeat tests here
-
-  ## Special case, scalar is always 100% correlated with itself
-  if (isscalar (x))
-    if (isa (x, 'single'))
-      retval = single (1);
-    else
-      retval = 1;
-    endif
-    return;
-  endif
-
-  ## No check for division by zero error, which happens only when
-  ## there is a constant vector and should be rare.
-  if (nargin == 2)
-    c = cov (x, y);
-    s = std (x)' * std (y);
-    retval = c ./ s;
-  else
-    c = cov (x);
-    s = sqrt (diag (c));
-    retval = c ./ (s * s');
-  endif
-
-endfunction
-
-
-%!test
-%! x = rand (10);
-%! cc1 = corrcoef (x);
-%! cc2 = corrcoef (x, x);
-%! assert (size (cc1) == [10, 10] && size (cc2) == [10, 10]);
-%! assert (cc1, cc2, sqrt (eps));
-
-%!test
-%! x = [1:3]';
-%! y = [3:-1:1]';
-%! assert (corrcoef (x,y), -1, 5*eps)
-%! assert (corrcoef (x,flipud (y)), 1, 5*eps)
-%! assert (corrcoef ([x, y]), [1 -1; -1 1], 5*eps)
-
-%!test
-%! x = single ([1:3]');
-%! y = single ([3:-1:1]');
-%! assert (corrcoef (x,y), single (-1), 5*eps)
-%! assert (corrcoef (x,flipud (y)), single (1), 5*eps)
-%! assert (corrcoef ([x, y]), single ([1 -1; -1 1]), 5*eps)
-
-%!assert (corrcoef (5), 1);
-%!assert (corrcoef (single(5)), single(1));
-
-%% Test input validation
-%!error corrcoef ();
-%!error corrcoef (1, 2, 3);
-%!error corrcoef ([1; 2], ["A", "B"]);
-%!error corrcoef (ones (2,2,2));
-%!error corrcoef (ones (2,2), ones (2,2,2));
-
deleted file mode 100644
--- a/scripts/deprecated/cut.m
+++ /dev/null
@@ -1,72 +0,0 @@
-## Copyright (C) 1996-2013 Kurt Hornik
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} cut (@var{x}, @var{breaks})
-## Create categorical data from numerical or continuous data by
-## cutting into intervals.
-##
-## If @var{breaks} is a scalar, the data is cut into that many
-## equal-width intervals.  If @var{breaks} is a vector of break points,
-## the category has @code{length (@var{breaks}) - 1} groups.
-##
-## The returned value is a vector of the same size as @var{x} telling
-## which group each point in @var{x} belongs to.  Groups are labelled
-## from 1 to the number of groups; points outside the range of
-## @var{breaks} are labelled by @code{NaN}.
-## @seealso{histc}
-## @end deftypefn
-
-## Author: KH <Kurt.Hornik@wu-wien.ac.at>
-## Description: Cut data into intervals
-
-function group = cut (x, breaks)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "cut is obsolete and will be removed from a future version of Octave; please use histc instead");
-  endif
-
-  if (nargin != 2)
-    print_usage ();
-  endif
-
-  if (!isvector (x))
-    error ("cut: X must be a vector");
-  endif
-  if (isscalar (breaks))
-    breaks = linspace (min (x), max (x), breaks + 1);
-    breaks(1) = breaks(1) - 1;
-  elseif (isvector (breaks))
-    breaks = sort (breaks);
-  else
-    error ("cut: BREAKS must be a scalar or vector");
-  endif
-
-  group = NaN (size (x));
-  m = length (breaks);
-  if (any (k = find ((x >= min (breaks)) & (x < max (breaks)))))
-    n = length (k);
-    group(k) = sum ((ones (m, 1) * reshape (x(k), 1, n))
-                    >= (reshape (breaks, m, 1) * ones (1, n)));
-  endif
-
-endfunction
-
--- a/scripts/deprecated/default_save_options.m
+++ b/scripts/deprecated/default_save_options.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
rename from scripts/geometry/delaunay3.m
rename to scripts/deprecated/delaunay3.m
--- a/scripts/geometry/delaunay3.m
+++ b/scripts/deprecated/delaunay3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -19,6 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{tetr} =} delaunay3 (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {@var{tetr} =} delaunay3 (@var{x}, @var{y}, @var{z}, @var{options})
+##
+## @code{delaunay3} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{delaunay} in all new code.
+##
 ## Compute the Delaunay triangulation for a 3-D set of points.
 ## The return value @var{tetr} is a set of tetrahedrons which satisfies the
 ## Delaunay circum-circle criterion, i.e., only a single data point from
@@ -47,8 +51,17 @@
 
 ## Author: Kai Habel <kai.habel@gmx.de>
 
+## Deprecated in 4.0
+
 function tetr = delaunay3 (x, y, z, options)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "delaunay3 is obsolete and will be removed from a future version of Octave, please use delaunay instead");
+  endif
+
   if (nargin < 3 || nargin > 4)
     print_usage ();
   endif
@@ -73,5 +86,5 @@
 %! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1];
 %! assert (sortrows (sort (delaunay3 (x, y, z), 2)), [1,2,3,4;1,2,4,5])
 
-%% FIXME: Need input validation tests
+## FIXME: Need input validation tests
 
rename from scripts/miscellaneous/dump_prefs.m
rename to scripts/deprecated/dump_prefs.m
--- a/scripts/miscellaneous/dump_prefs.m
+++ b/scripts/deprecated/dump_prefs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,81 +19,104 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} dump_prefs ()
 ## @deftypefnx {Function File} {} dump_prefs (@var{fid})
-## Dump all of the current user preference variables in a format that can be
-## parsed by Octave later.  @var{fid} is a file descriptor as returned by
-## @code{fopen}.  If @var{file} is omitted, the listing is printed to stdout.
+##
+## @code{dump_prefs} is deprecated and will be removed in Octave version 4.4.
+## Please use individual preference get/set routines in all new code.
+##
+## Dump the current settings of all user preferences to stdout in a format that
+## can be parsed by Octave later.
+##
+## If the optional argument @var{fid} is given then the results are written to
+## the file specified by file descriptor @var{fid}.
+## @seealso{octave_config_info}
 ## @end deftypefn
 
 ## Author: jwe
 
-function dump_prefs (file)
+## Deprecated in 4.0
+
+function dump_prefs (fid)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "dump_prefs is obsolete and will be removed from a future version of Octave, recode using individual preference get/set routines");
+  endif
+
+  if (nargin > 1)
+    print_usage ();
+  endif
 
   if (nargin == 0)
-    file = stdout;
+    fid = stdout;
   endif
 
-  ## FIXME -- it would be nice to be able to get the list of
-  ## built-in variables directly from Octave so that we wouldn't have to
-  ## remember to update it each time the list of preference variables
-  ## changes
+  ## FIXME: It would be nice to be able to get the list of built-in variables
+  ## directly from Octave so that we wouldn't have to remember to update it
+  ## each time the list of preference variables changes
 
-  ## Note that these are no longer variables.
+  ## FIXME: Update this list for 4.2.0 release
+  ##        Example, 'gnuplot_command_end' is no longer valid.
 
-  sym_list = ["EDITOR";
-              "EXEC_PATH";
-              "IMAGE_PATH";
-              "PAGER";
-              "PS1";
-              "PS2";
-              "PS4";
-              "beep_on_error";
-              "completion_append_char";
-              "crash_dumps_octave_core";
-              "echo_executing_commands";
-              "fixed_point_format";
-              "gnuplot_binary";
-              "gnuplot_command_end";
-              "gnuplot_command_plot";
-              "gnuplot_command_replot";
-              "gnuplot_command_splot";
-              "gnuplot_command_title";
-              "gnuplot_command_using";
-              "gnuplot_command_with";
-              "history_file";
-              "history_size";
-              "ignore_function_time_stamp";
-              "info_file";
-              "info_program";
-              "makeinfo_program";
-              "max_recursion_depth";
-              "output_max_field_width";
-              "output_precision";
-              "page_output_immediately";
-              "page_screen_output";
-              "print_answer_id_name";
-              "print_empty_dimensions";
-              "save_precision";
-              "saving_history";
-              "sighup_dumps_octave_core";
-              "sigterm_dumps_octave_core";
-              "silent_functions";
-              "split_long_rows";
-              "string_fill_char";
-              "struct_levels_to_print";
-              "suppress_verbose_help_message"];
+  pref_list = {"EDITOR"
+              "EXEC_PATH"
+              "IMAGE_PATH"
+              "PAGER"
+              "PS1"
+              "PS2"
+              "PS4"
+              "beep_on_error"
+              "completion_append_char"
+              "crash_dumps_octave_core"
+              "echo_executing_commands"
+              "fixed_point_format"
+              "gnuplot_binary"
+              "gnuplot_command_end"
+              "gnuplot_command_plot"
+              "gnuplot_command_replot"
+              "gnuplot_command_splot"
+              "gnuplot_command_title"
+              "gnuplot_command_using"
+              "gnuplot_command_with"
+              "history_file"
+              "history_size"
+              "ignore_function_time_stamp"
+              "info_file"
+              "info_program"
+              "makeinfo_program"
+              "max_recursion_depth"
+              "output_max_field_width"
+              "output_precision"
+              "page_output_immediately"
+              "page_screen_output"
+              "print_answer_id_name"
+              "print_empty_dimensions"
+              "save_precision"
+              "saving_history"
+              "sighup_dumps_octave_core"
+              "sigterm_dumps_octave_core"
+              "silent_functions"
+              "split_long_rows"
+              "string_fill_char"
+              "struct_levels_to_print"
+              "suppress_verbose_help_message"};
 
-  for i = 1:rows (sym_list)
-    sym = deblank (sym_list(i,:));
+  for i = 1:rows (pref_list)
+    pref = pref_list{i};
     try
-      val = feval (sym);
+      val = feval (pref);
       if (isnumeric (val))
         val = sprintf ("%g", val);
       endif
-      fprintf (file, "  %s = %s\n", sym, val);
+      fprintf (fid, "  %s = %s\n", pref, val);
     catch
-      fprintf (file, "# %s = <no value or error in displaying it>\n", sym);
+      fprintf (fid, "# %s = <no value or error in displaying it>\n", pref);
     end_try_catch
   endfor
 
 endfunction
 
+
+%!error dump_prefs (1,2)
+
deleted file mode 100644
--- a/scripts/deprecated/error_text.m
+++ /dev/null
@@ -1,37 +0,0 @@
-## Copyright (C) 2012-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Built-in Function} {[@var{msg}, @var{msgid}] =} error_text (@var{msg}, @var{msgid})
-## This function has been deprecated.  Use @code{lasterr} instead.
-## @seealso{lasterr}
-## @end deftypefn
-
-function [msg, msgid] = error_text (varargin)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "error_text is obsolete and will be removed from a future version of Octave, please use lasterr instead");
-  endif
-
-  [msg, msgid] = lasterr (varargin{:});
-
-endfunction
-
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/find_dir_in_path.m
@@ -0,0 +1,40 @@
+## Copyright (C) 2013-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Built-in Function} {} find_dir_in_path (@var{dir})
+## @deftypefnx {Built-in Function} {} find_dir_in_path (@var{dir}, "all")
+## This function has been deprecated.  Use @code{dir_in_loadpath} instead.
+## @seealso{dir_in_loadpath}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function retval = find_dir_in_path (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "find_dir_in_path is obsolete and will be removed from a future version of Octave, please use dir_in_loadpath instead");
+  endif
+
+  retval = dir_in_loadpath (varargin{:});
+
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/finite.m
@@ -0,0 +1,52 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Mapping Function} {} finite (@var{x})
+##
+## @code{finite} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{isfinite} in all new code.
+##
+## Return a logical array which is true where the elements of @var{x} are
+## finite values and false where they are not.
+## For example:
+##
+## @example
+## @group
+## finite ([13, Inf, NA, NaN])
+##      @result{} [ 1, 0, 0, 0 ]
+## @end group
+## @end example
+## @seealso{isfinite, isinf, isnan, isna}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function retval = finite (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "finite is obsolete and will be removed from a future version of Octave, please use isfinite instead");
+  endif
+
+  retval = isfinite (varargin{:});
+
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/fmod.m
@@ -0,0 +1,51 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Mapping Function} {} fmod (@var{x}, @var{y})
+##
+## @code{fmod} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{rem} in all new code.
+##
+## Return the remainder of the division @code{@var{x} / @var{y}}, computed
+## using the expression
+##
+## @example
+## x - y .* fix (x ./ y)
+## @end example
+##
+## An error message is printed if the dimensions of the arguments do not
+## agree, or if either of the arguments is complex.
+## @seealso{rem, mod}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function retval = fmod (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "fmod is obsolete and will be removed from a future version of Octave, please use rem instead");
+  endif
+
+  retval = rem (varargin{:});
+
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/fnmatch.m
@@ -0,0 +1,52 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Built-in Function} {} fnmatch (@var{pattern}, @var{string})
+##
+## @code{fnmatch} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{glob} or @code{regexp} in all new code.
+##
+## Return true or false for each element of @var{string} that matches any of
+## the elements of the string array @var{pattern}, using the rules of
+## filename pattern matching.  For example:
+##
+## @example
+## @group
+## fnmatch (\"a*b\", @{\"ab\"; \"axyzb\"; \"xyzab\"@})
+##      @result{} [ 1; 1; 0 ]
+## @end group
+## @end example
+## @seealso{glob, regexp}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function retval = fnmatch (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "fnmatch is obsolete and will be removed from a future version of Octave, please use glob or regexp instead");
+  endif
+
+  retval = __fnmatch__ (varargin{:});
+
+endfunction
+
--- a/scripts/deprecated/gen_doc_cache.m
+++ b/scripts/deprecated/gen_doc_cache.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/interp1q.m
+++ b/scripts/deprecated/interp1q.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,7 @@
   dy = diff (y);
   dx = diff (x);
   idx = lookup (x, xi, "lr");
-  s = (xi - x (idx)) ./ dx (idx);
+  s = (xi - x(idx)) ./ dx(idx);
   yi = bsxfun (@times, s, dy(idx,:)) + y(idx,:);
   range = xi < x(1) | !(xi <= x(nx));
   yi(range,:) = NA;
--- a/scripts/deprecated/isequalwithequalnans.m
+++ b/scripts/deprecated/isequalwithequalnans.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2005-2015 William Poetra Yoga Hadisoeseno
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/isstr.m
+++ b/scripts/deprecated/isstr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 John W. Eaton
+## Copyright (C) 2003-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/java_convert_matrix.m
+++ b/scripts/deprecated/java_convert_matrix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/java_debug.m
+++ b/scripts/deprecated/java_debug.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/java_new.m
+++ b/scripts/deprecated/java_new.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/java_unsigned_conversion.m
+++ b/scripts/deprecated/java_unsigned_conversion.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
rename from scripts/audio/loadaudio.m
rename to scripts/deprecated/loadaudio.m
--- a/scripts/audio/loadaudio.m
+++ b/scripts/deprecated/loadaudio.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,6 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} loadaudio (@var{name}, @var{ext}, @var{bps})
+##
+## @code{loadaudio} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{audioread} in all new code.
+##
 ## Load audio data from the file @file{@var{name}.@var{ext}} into the
 ## vector @var{x}.
 ##
@@ -38,6 +42,13 @@
 
 function X = loadaudio (name, ext, bps)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "loadaudio is obsolete and will be removed from a future version of Octave, please use audioread instead");
+  endif
+
   if (nargin == 0 || nargin > 3)
     print_usage ();
   endif
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/luinc.m
@@ -0,0 +1,93 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## @deftypefn  {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, '0')
+## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{droptol})
+## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{opts})
+##
+## @code{luinc} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{ilu} or @code{ichol} in all new code.
+##
+## Produce the incomplete LU@tie{}factorization of the sparse matrix @var{A}.
+## Two types of incomplete factorization are possible, and the type
+## is determined by the second argument to @code{luinc}.
+##
+## Called with a second argument of @qcode{'0'}, the zero-level incomplete
+## LU@tie{}factorization is produced.  This creates a factorization of @var{A}
+## where the position of the nonzero arguments correspond to the same
+## positions as in the matrix @var{A}.
+##
+## Alternatively, the fill-in of the incomplete LU@tie{}factorization can
+## be controlled through the variable @var{droptol} or the structure
+## @var{opts}.  The @sc{umfpack} multifrontal factorization code by Tim A.
+## Davis is used for the incomplete LU@tie{}factorization, (availability
+## @url{http://www.cise.ufl.edu/research/sparse/umfpack/})
+##
+## @var{droptol} determines the values below which the values in the
+## LU@tie{} factorization are dropped and replaced by zero.  It must be a
+## positive scalar, and any values in the factorization whose absolute value
+## are less than this value are dropped, expect if leaving them increase the
+## sparsity of the matrix.  Setting @var{droptol} to zero results in a complete
+## LU@tie{}factorization which is the default.
+##
+## @var{opts} is a structure containing one or more of the fields
+##
+## @table @code
+## @item droptol
+## The drop tolerance as above.  If @var{opts} only contains @code{droptol}
+## then this is equivalent to using the variable @var{droptol}.
+##
+## @item milu
+## A logical variable flagging whether to use the modified incomplete
+## LU@tie{} factorization.  In the case that @code{milu} is true, the dropped
+## values are subtracted from the diagonal of the matrix @var{U} of the
+## factorization.  The default is @code{false}.
+##
+## @item udiag
+## A logical variable that flags whether zero elements on the diagonal of
+## @var{U} should be replaced with @var{droptol} to attempt to avoid singular
+## factors.  The default is @code{false}.
+##
+## @item thresh
+## Defines the pivot threshold in the interval [0,1].  Values outside that
+## range are ignored.
+## @end table
+##
+## All other fields in @var{opts} are ignored.  The outputs from @code{luinc}
+## are the same as for @code{lu}.
+##
+## Given the string argument @qcode{\"vector\"}, @code{luinc} returns the
+## values of @var{p} @var{q} as vector values.
+## @seealso{ilu, ichol, lu, sparse}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function [L, U, P, Q] = luinc (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "luinc is obsolete and will be removed from a future version of Octave, please use ilu or ichol instead");
+  endif
+
+  [L, U, P, Q] = __luinc__ (varargin{:});
+
+endfunction
+
--- a/scripts/deprecated/module.mk
+++ b/scripts/deprecated/module.mk
@@ -1,12 +1,14 @@
 FCN_FILE_DIRS += deprecated
 
 deprecated_FCN_FILES = \
-  deprecated/__error_text__.m \
-  deprecated/cor.m \
-  deprecated/corrcoef.m \
-  deprecated/cut.m \
+  deprecated/bicubic.m \
   deprecated/default_save_options.m \
-  deprecated/error_text.m \
+  deprecated/delaunay3.m \
+  deprecated/dump_prefs.m \
+  deprecated/find_dir_in_path.m \
+  deprecated/finite.m \
+  deprecated/fmod.m \
+  deprecated/fnmatch.m \
   deprecated/gen_doc_cache.m \
   deprecated/interp1q.m \
   deprecated/isequalwithequalnans.m \
@@ -18,13 +20,19 @@
   deprecated/java_unsigned_conversion.m \
   deprecated/javafields.m \
   deprecated/javamethods.m \
-  deprecated/polyderiv.m \
+  deprecated/loadaudio.m \
+  deprecated/luinc.m \
+  deprecated/mouse_wheel_zoom.m \
+  deprecated/nfields.m \
+  deprecated/octave_tmp_file_name.m \
+  deprecated/playaudio.m \
   deprecated/re_read_readline_init_file.m \
   deprecated/read_readline_init_file.m \
+  deprecated/saveaudio.m \
   deprecated/saving_history.m \
-  deprecated/shell_cmd.m \
-  deprecated/studentize.m \
-  deprecated/sylvester_matrix.m
+  deprecated/setaudio.m \
+  deprecated/syl.m \
+  deprecated/usage.m
 
 FCN_FILES += $(deprecated_FCN_FILES)
 
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/mouse_wheel_zoom.m
@@ -0,0 +1,55 @@
+## Copyright (C) 2007-2013 Shai Ayal
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Loadable Function} {@var{old_val} =} mouse_wheel_zoom (@var{new_val})
+## Query or set the mouse wheel zoom factor.
+##
+## The zoom factor is a number in the range (0,1) which is the
+## percentage of the current axis limits that will be used when zooming.
+## For example, if the current x-axis limits are [0, 50] and
+## @code{mouse_wheel_zoom} is 0.4 (40%), then a zoom operation will
+## change the limits by 20.
+#### @end deftypefn
+
+## Deprecated in 4.0
+
+function retval = mouse_wheel_zoom (val)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "mouse_wheel_zoom is obsolete and will be removed from a future version of Octave, please use the mousehweelzoom axes property instead");
+  endif
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  fig = get (0, "currentfigure");
+  if (isempty (fig))
+    retval = get (0, "defaultaxesmousewheelzoom");
+    set (0, "defaultaxesmousewheelzoom", val);
+  else
+    retval = get (gca, "mousewheelzoom");
+    set (gca, "mousewheelzoom", val);
+  endif
+
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/nfields.m
@@ -0,0 +1,46 @@
+## Copyright (C) 2014-2015 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} nfields (@var{s})
+## Return the number of fields of the structure @var{s}.
+##
+## @strong{Warning:} @code{nfields} is scheduled for removal in version 4.4.
+## Use @code{numfields} instead.
+## @seealso{numfields, fieldnames}
+## @end deftypefn
+
+## Deprecated in 4.0
+
+function retval = nfields (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "nfields is obsolete and will be removed from a future version of Octave; please use numfields instead");
+  endif
+
+  if (nargin < 1)
+    print_usage ();
+  endif
+
+  retval = numfields (varargin{:});
+
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/octave_tmp_file_name.m
@@ -0,0 +1,53 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Built-in Function} {@var{fname} =} octave_tmp_file_name ()
+## @deftypefnx {Built-in Function} {@var{fname} =} octave_tmp_file_name (@var{dir})
+## @deftypefnx {Built-in Function} {@var{fname} =} octave_tmp_file_name (@var{dir}, @var{prefix})
+##
+## @code{octave_tmp_file_name} is deprecated and will be removed in Octave
+## version 4.4.  Use @code{tempname} for equivalent functionality.
+##
+## Return a unique temporary file name as a string.
+##
+## If @var{prefix} is omitted, a value of @qcode{"oct-"} is used.
+## If @var{dir} is also omitted, the default directory for temporary files
+## (@code{P_tmpdir} is used.  If @var{dir} is provided, it must exist,
+## otherwise the default directory for temporary files is used.
+## @seealso{tempname, tmpnam, mkstemp, tempdir, P_tmpdir, tmpfile}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function filename = octave_tmp_file_name (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "octave_tmp_file_name is obsolete and will be removed from a future version of Octave, please use tempname instead");
+  endif
+
+  filename = tmpnam (varargin{:});
+
+endfunction
+
+
+%!assert (1)
+
rename from scripts/audio/playaudio.m
rename to scripts/deprecated/playaudio.m
--- a/scripts/audio/playaudio.m
+++ b/scripts/deprecated/playaudio.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,6 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} playaudio (@var{name}, @var{ext})
 ## @deftypefnx {Function File} {} playaudio (@var{x})
+##
+## @code{playaudio} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{audioplayer} in all new code.
+##
 ## Play the audio file @file{@var{name}.@var{ext}} or the audio data
 ## stored in the vector @var{x}.
 ## @seealso{lin2mu, mu2lin, loadaudio, saveaudio, setaudio, record}
@@ -30,6 +34,13 @@
 
 function playaudio (name, ext)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "playaudio is obsolete and will be removed from a future version of Octave, please use audioplayer instead");
+  endif
+
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
@@ -41,7 +52,7 @@
     endif
     X = name(:) + 127;
     unwind_protect
-      file = tmpnam ();
+      file = tempname ();
       fid = fopen (file, "wb");
       fwrite (fid, X, "uchar");
       fclose (fid);
@@ -79,7 +90,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error playaudio ()
 %!error playaudio (1,2,3)
 %!error <X must be a vector> playaudio (magic (3))
deleted file mode 100644
--- a/scripts/deprecated/polyderiv.m
+++ /dev/null
@@ -1,109 +0,0 @@
-## Copyright (C) 1994-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {} polyderiv (@var{p})
-## @deftypefnx {Function File} {[@var{k}] =} polyderiv (@var{a}, @var{b})
-## @deftypefnx {Function File} {[@var{q}, @var{d}] =} polyderiv (@var{b}, @var{a})
-## Return the coefficients of the derivative of the polynomial whose
-## coefficients are given by the vector @var{p}.  If a pair of polynomials
-## is given, return the derivative of the product @math{@var{a}*@var{b}}.
-## If two inputs and two outputs are given, return the derivative of the
-## polynomial quotient @math{@var{b}/@var{a}}.  The quotient numerator is
-## in @var{q} and the denominator in @var{d}.
-## @seealso{poly, polyint, polyreduce, roots, conv, deconv, residue,
-## filter, polygcd, polyval, polyvalm}
-## @end deftypefn
-
-## Author: Tony Richardson <arichard@stark.cc.oh.us>
-## Created: June 1994
-## Adapted-By: jwe
-
-function [q, d] = polyderiv (p, a)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "polyderiv is obsolete and will be removed from a future version of Octave; please use polyder instead");
-  endif
-
-  if (nargin == 1 || nargin == 2)
-    if (! isvector (p))
-      error ("polyderiv: argument must be a vector");
-    endif
-    if (nargin == 2)
-      if (! isvector (a))
-        error ("polyderiv: argument must be a vector");
-      endif
-      if (nargout == 1)
-        ## derivative of p*a returns a single polynomial
-        q = polyderiv (conv (p, a));
-      else
-        ## derivative of p/a returns numerator and denominator
-        d = conv (a, a);
-        if (numel (p) == 1)
-          q = -p * polyderiv (a);
-        elseif (numel (a) == 1)
-          q = a * polyderiv (p);
-        else
-          q = conv (polyderiv (p), a) - conv (p, polyderiv (a));
-          q = polyreduce (q);
-        endif
-
-        ## remove common factors from numerator and denominator
-        x = polygcd (q, d);
-        if (length(x) != 1)
-          q = deconv (q, x);
-          d = deconv (d, x);
-        endif
-
-        ## move all the gain into the numerator
-        q = q/d(1);
-        d = d/d(1);
-      endif
-    else
-      lp = numel (p);
-      if (lp == 1)
-        q = 0;
-        return;
-      elseif (lp == 0)
-        q = [];
-        return;
-      endif
-
-      ## Force P to be a row vector.
-      p = p(:).';
-
-      q = p(1:(lp-1)) .* [(lp-1):-1:1];
-    endif
-  else
-    print_usage ();
-  endif
-
-endfunction
-
-
-%!assert(all (all (polyderiv ([1, 2, 3]) == [2, 2])));
-
-%!assert(polyderiv (13) == 0);
-
-%!error polyderiv ([]);
-
-%!error polyderiv ([1, 2; 3, 4]);
-
--- a/scripts/deprecated/re_read_readline_init_file.m
+++ b/scripts/deprecated/re_read_readline_init_file.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/deprecated/read_readline_init_file.m
+++ b/scripts/deprecated/read_readline_init_file.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
rename from scripts/audio/saveaudio.m
rename to scripts/deprecated/saveaudio.m
--- a/scripts/audio/saveaudio.m
+++ b/scripts/deprecated/saveaudio.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,6 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} saveaudio (@var{name}, @var{x}, @var{ext}, @var{bps})
+##
+## @code{saveaudio} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{audiowrite} in all new code.
+##
 ## Save a vector @var{x} of audio data to the file
 ## @file{@var{name}.@var{ext}}.  The optional parameters @var{ext} and
 ## @var{bps} determine the encoding and the number of bits per sample used
@@ -32,6 +36,13 @@
 
 function saveaudio (name, x, ext, bps)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "saveaudio is obsolete and will be removed from a future version of Octave, please use audiowrite instead");
+  endif
+
   if (nargin < 2 || nargin > 4)
     print_usage ();
   endif
--- a/scripts/deprecated/saving_history.m
+++ b/scripts/deprecated/saving_history.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
rename from scripts/audio/setaudio.m
rename to scripts/deprecated/setaudio.m
--- a/scripts/audio/setaudio.m
+++ b/scripts/deprecated/setaudio.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -20,6 +20,11 @@
 ## @deftypefn  {Function File} {} setaudio ()
 ## @deftypefnx {Function File} {} setaudio (@var{w_type})
 ## @deftypefnx {Function File} {} setaudio (@var{w_type}, @var{value})
+##
+## @code{setaudio} is deprecated and will be removed in Octave version 4.4.
+## Please scale the audio signal in all new code or use the operating system's
+## native tools to adjust audio input and output levels.
+##
 ## Execute the shell command @samp{mixer}, possibly with optional
 ## arguments @var{w_type} and @var{value}.
 ## @end deftypefn
@@ -30,6 +35,13 @@
 
 function setaudio (w_type, value)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "setaudio is obsolete and will be removed from a future version of Octave, please scale the audio signal instead");
+  endif
+
   if (nargin == 0)
     system ("mixer");
   elseif (nargin == 1)
deleted file mode 100644
--- a/scripts/deprecated/shell_cmd.m
+++ /dev/null
@@ -1,68 +0,0 @@
-## Copyright (C) 2012-2013 Rik Wehbring
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## "-*- texinfo -*-
-## @deftypefn  {Built-in Function} {} shell_cmd (@var{string})
-## @deftypefnx {Built-in Function} {} shell_cmd (@var{string}, @var{return_output})
-## @deftypefnx {Built-in Function} {} shell_cmd (@var{string}, @var{return_output}, @var{type})
-## @deftypefnx {Built-in Function} {[@var{status}, @var{output}] =} shell_cmd (@dots{})
-## @deftypefnx {Built-in Function} {[@var{status}, @var{output}] =} shell_cmd (@var{string}, @var{return_output}, @var{type})
-## Execute a shell command specified by @var{string}.
-## If the optional argument @var{type} is @qcode{"async"}, the process
-## is started in the background and the process id of the child process
-## is returned immediately.  Otherwise, the process is started and
-## Octave waits until it exits.  If the @var{type} argument is omitted, it
-## defaults to a value of @qcode{"sync"}.
-##
-## If the optional argument @var{return_output} is true and the subprocess
-## is started synchronously, or if @var{shell_cmd} is called with one input
-## argument and one or more output arguments, then the output from the command
-## is returned.  Otherwise, if the subprocess is executed synchronously, its
-## output is sent to the standard output.
-##
-## The @code{shell_cmd} function can return two values.  The first is the
-## exit status of the command and the second is any output from the
-## command that was written to the standard output stream.  For example,
-##
-## @example
-## [status, output] = shell_cmd ("echo foo; exit 2");
-## @end example
-##
-## @noindent
-## will set the variable @code{output} to the string @samp{foo}, and the
-## variable @code{status} to the integer @samp{2}.
-##
-## For commands run asynchronously, @var{status} is the process id of the
-## command shell that is started to run the command.
-## @seealso{system, unix, dos}
-## @end deftypefn
-
-## Deprecated in version 3.6
-
-function [status, output] = shell_cmd (varargin)
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "shell_cmd is obsolete and will be removed from a future version of Octave; please use system instead");
-  endif
-
-  [status, output] = system (varargin{:});
-
-endfunction
-
deleted file mode 100644
--- a/scripts/deprecated/studentize.m
+++ /dev/null
@@ -1,95 +0,0 @@
-## Copyright (C) 1995-2013 Kurt Hornik
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {} studentize (@var{x})
-## @deftypefnx {Function File} {} studentize (@var{x}, @var{dim})
-## If @var{x} is a vector, subtract its mean and divide by its standard
-## deviation.
-##
-## If @var{x} is a matrix, do the above along the first non-singleton
-## dimension.
-## If the optional argument @var{dim} is given, operate along this dimension.
-## @seealso{center}
-## @end deftypefn
-
-## Author: KH <Kurt.Hornik@wu-wien.ac.at>
-## Description: Subtract mean and divide by standard deviation
-
-function t = studentize (x, dim)
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "studentize is obsolete and will be removed from a future version of Octave; please use zscore instead");
-  endif
-
-  if (nargin != 1 && nargin != 2)
-    print_usage ();
-  endif
-
-  if (! isnumeric(x))
-    error ("studentize: X must be a numeric vector or matrix");
-  endif
-
-  if (isinteger (x))
-    x = double (x);
-  endif
-
-  nd = ndims (x);
-  sz = size (x);
-  if (nargin != 2)
-    ## Find the first non-singleton dimension.
-    dim = find (sz > 1, 1);
-    if (isempty (dim))
-      dim = 1;
-    endif
-  else
-    if (!(isscalar (dim) && dim == fix (dim))
-        || !(1 <= dim && dim <= nd))
-      error ("studentize: DIM must be an integer and a valid dimension");
-    endif
-  endif
-
-  c = sz(dim);
-  if (c == 0)
-    t = x;
-  else
-    idx = ones (1, nd);
-    idx(dim) = c;
-    t = x - repmat (mean (x, dim), idx);
-    t = t ./ repmat (max (cat (dim, std(t, [], dim), ! any (t, dim)), [], dim), idx);
-  endif
-
-endfunction
-
-
-%!assert(studentize ([1,2,3]), [-1,0,1])
-%!assert(studentize (int8 ([1,2,3])), [-1,0,1])
-#%!assert(studentize (ones (3,2,0,2)), zeros (3,2,0,2))
-%!assert(studentize ([2,0,-2;0,2,0;-2,-2,2]), [1,0,-1;0,1,0;-1,-1,1])
-
-%% Test input validation
-%!error studentize ()
-%!error studentize (1, 2, 3)
-%!error studentize ([true true])
-%!error studentize (1, ones(2,2))
-%!error studentize (1, 1.5)
-%!error studentize (1, 0)
-%!error studentize (1, 3)
-
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/syl.m
@@ -0,0 +1,66 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Built-in Function} {@var{x} =} syl (@var{A}, @var{B}, @var{C})
+##
+## @code{syl} is deprecated and will be removed in Octave version 4.4.
+## Use @code{sylvester} for the equivalent functionality.
+##
+## Solve the Sylvester equation
+## @tex
+## $$
+##  A X + X B + C = 0
+## $$
+## @end tex
+## @ifnottex
+##
+## @example
+## A X + X B + C = 0
+## @end example
+##
+## @end ifnottex
+## using standard @sc{lapack} subroutines.  For example:
+##
+## @example
+## @group
+## syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])
+##    @result{} [ -0.50000, -0.66667; -0.66667, -0.50000 ]
+## @end group
+## @end example
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function x = syl (A, B, C)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "syl is obsolete and will be removed from a future version of Octave, please use sylvester instead");
+  endif
+
+  if (nargin != 3 || nargout > 1)
+    print_usage ();
+  endif
+
+  x = -sylvester (A, B, C);
+
+endfunction
+
deleted file mode 100644
--- a/scripts/deprecated/sylvester_matrix.m
+++ /dev/null
@@ -1,70 +0,0 @@
-## Copyright (C) 1996-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} sylvester_matrix (@var{k})
-## Return the Sylvester matrix of order
-## @tex
-## $n = 2^k$.
-## @end tex
-## @ifnottex
-## n = 2^@var{k}.
-## @end ifnottex
-##
-## @seealso{toeplitz, hankel}
-## @end deftypefn
-
-## Author: jwe
-
-function retval = sylvester_matrix (k)
-
-  persistent warned = false;
-  if (! warned)
-    warned = true;
-    warning ("Octave:deprecated-function",
-             "sylvester_matrix is obsolete and will be removed from a future version of Octave; please use hadamard(2^k) instead");
-  endif
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  if (isscalar (k))
-    if (k < 1)
-      retval = 1;
-    else
-      tmp = sylvester_matrix (k-1);
-      retval = [tmp, tmp; tmp, -tmp];
-    endif
-  else
-    error ("sylvester_matrix: expecting scalar argument");
-  endif
-
-endfunction
-
-
-%!assert((sylvester_matrix (1) == [1, 1; 1, -1]
-%! && (sylvester_matrix (2)
-%! == [1, 1, 1, 1; 1, -1, 1, -1; 1, 1, -1, -1; 1, -1, -1, 1])));
-
-%!error sylvester_matrix ([1, 2; 3, 4]);
-
-%!error sylvester_matrix ();
-
-%!error sylvester_matrix (1, 2);
-
new file mode 100644
--- /dev/null
+++ b/scripts/deprecated/usage.m
@@ -0,0 +1,66 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Built-in Function} {} usage (@var{msg})
+##
+## @code{usage} is deprecated and will be removed in Octave version 4.4.
+## Please use @code{print_usage} in all new code.
+##
+## Print the message @var{msg}, prefixed by the string @samp{usage: }, and
+## set Octave's internal error state such that control will return to the
+## top level without evaluating any more commands.  This is useful for
+## aborting from functions.
+##
+## After @code{usage} is evaluated, Octave will print a traceback of all
+## the function calls leading to the usage message.
+##
+## You should use this function for reporting problems errors that result
+## from an improper call to a function, such as calling a function with an
+## incorrect number of arguments, or with arguments of the wrong type.  For
+## example, most functions distributed with Octave begin with code like
+## this
+##
+## @example
+## @group
+## if (nargin != 2)
+##   usage (\"foo (a, b)\");
+## endif
+## @end group
+## @end example
+##
+## @noindent
+## to check for the proper number of arguments.
+## @seealso{print_usage}
+## @end deftypefn
+
+## Deprecated in version 4.0
+
+function retval = usage (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "usage is obsolete and will be removed from a future version of Octave, please use print_usage instead");
+  endif
+
+  retval = __usage__ (varargin{:});
+
+endfunction
+
--- a/scripts/elfun/acosd.m
+++ b/scripts/elfun/acosd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acot.m
+++ b/scripts/elfun/acot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acotd.m
+++ b/scripts/elfun/acotd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acoth.m
+++ b/scripts/elfun/acoth.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acsc.m
+++ b/scripts/elfun/acsc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acscd.m
+++ b/scripts/elfun/acscd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/acsch.m
+++ b/scripts/elfun/acsch.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/asec.m
+++ b/scripts/elfun/asec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/asecd.m
+++ b/scripts/elfun/asecd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/asech.m
+++ b/scripts/elfun/asech.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/asind.m
+++ b/scripts/elfun/asind.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/atan2d.m
+++ b/scripts/elfun/atan2d.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/atand.m
+++ b/scripts/elfun/atand.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/cosd.m
+++ b/scripts/elfun/cosd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
   I = x / 180;
   y = cos (I .* pi);
   I = I + 0.5;
-  y(I == fix (I) & finite (I)) = 0;
+  y(I == fix (I) & isfinite (I)) = 0;
 
 endfunction
 
--- a/scripts/elfun/cot.m
+++ b/scripts/elfun/cot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/cotd.m
+++ b/scripts/elfun/cotd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/coth.m
+++ b/scripts/elfun/coth.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/csc.m
+++ b/scripts/elfun/csc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/cscd.m
+++ b/scripts/elfun/cscd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/csch.m
+++ b/scripts/elfun/csch.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/sec.m
+++ b/scripts/elfun/sec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/secd.m
+++ b/scripts/elfun/secd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/sech.m
+++ b/scripts/elfun/sech.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/elfun/sind.m
+++ b/scripts/elfun/sind.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
 
   I = x / 180;
   y = sin (I .* pi);
-  y(I == fix (I) & finite (I)) = 0;
+  y(I == fix (I) & isfinite (I)) = 0;
 
 endfunction
 
--- a/scripts/elfun/tand.m
+++ b/scripts/elfun/tand.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -35,8 +35,8 @@
   I0 = x / 180;
   I90 = (x-90) / 180;
   y = tan (I0 .* pi);
-  y(I0 == fix (I0) & finite (I0)) = 0;
-  y(I90 == fix (I90) & finite (I90)) = Inf;
+  y(I0 == fix (I0) & isfinite (I0)) = 0;
+  y(I90 == fix (I90) & isfinite (I90)) = Inf;
 
 endfunction
 
--- a/scripts/general/accumarray.m
+++ b/scripts/general/accumarray.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ## Copyright (C) 2009-2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -142,8 +142,7 @@
 
     lensubs = cellfun (@length, subs);
 
-    if (any (lensubs != lensubs(1)) ||
-        (lenvals > 1 && lenvals != lensubs(1)))
+    if (any (lensubs != lensubs(1)) || (lenvals > 1 && lenvals != lensubs(1)))
       error ("accumarray: dimension mismatch");
     endif
 
@@ -239,7 +238,7 @@
       endif
 
       ## Convert multidimensional subscripts.
-      if (ismatrix (subs))
+      if (isnumeric (subs))
         subs = num2cell (subs, 1);
       endif
       subs = sub2ind (sz, subs{:}); # creates index cache
--- a/scripts/general/accumdim.m
+++ b/scripts/general/accumdim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 VZLU Prague
+## Copyright (C) 2010-2015 VZLU Prague
 ##
 ## This file is part of Octave.
 ##
@@ -149,7 +149,7 @@
 endfunction
 
 
-%% Test accumdim vs. accumarray
+## Test accumdim vs. accumarray
 %!shared a
 %! a = rand (5, 5, 5);
 
@@ -158,12 +158,12 @@
 %!assert (accumdim ([2;3;2;1;2], a, 3, 3, @min)(1,5,:), accumarray ([2;3;2;1;2], a(1,5,:), [1,1,3], @min))
 %!assert (accumdim ([1;3;2;2;1], a, 2, 3, @median)(4,:,5), accumarray ([1;3;2;2;1], a(4,:,5), [1,3], @median))
 
-%% Test fillval
+## Test fillval
 %!assert (accumdim ([1;3;1;3;3], a)(2,:,:), zeros (1,5,5))
 %!assert (accumdim ([1;3;1;3;3], a, 1, 4)([2 4],:,:), zeros (2,5,5))
 %!assert (accumdim ([1;3;1;3;3], a, 1, 4, [], pi)([2 4],:,:), pi (2,5,5))
 
-%% Test input validation
+## Test input validation
 %!error accumdim (1)
 %!error accumdim (1,2,3,4,5,6,7)
 %!error <SUBS must be a subscript vector> accumdim (ones (2,2), ones (2,2))
--- a/scripts/general/bincoeff.m
+++ b/scripts/general/bincoeff.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -112,7 +112,7 @@
 
 %!assert (bincoeff ([4 NaN 4], [-1, 2, 2.5]), NaN (1, 3))
 
-%% Test input validation
+## Test input validation
 %!error bincoeff ()
 %!error bincoeff (1, 2, 3)
 %!error bincoeff (ones (3),ones (2))
--- a/scripts/general/bitcmp.m
+++ b/scripts/general/bitcmp.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -31,6 +31,7 @@
 ##   @result{} 110100
 ## @end group
 ## @end example
+##
 ## @seealso{bitand, bitor, bitxor, bitset, bitget, bitcmp, bitshift, bitmax}
 ## @end deftypefn
 
@@ -52,27 +53,11 @@
   elseif (isa (A, "single"))
     bmax = bitmax ("single");
     amax = ceil (log2 (bmax));
+  elseif (isinteger (A))
+    amax = sizeof (ones (1, class (A))) * 8;
+    bmax = bitpack (true (amax, 1), class (A));
   else
-    if (isa (A, "uint8"))
-      amax = 8;
-    elseif (isa (A, "uint16"))
-      amax = 16;
-    elseif (isa (A, "uint32"))
-      amax = 32;
-    elseif (isa (A, "uint64"))
-      amax = 64;
-    elseif (isa (A, "int8"))
-      amax = 8;
-    elseif (isa (A, "int16"))
-      amax = 16;
-    elseif (isa (A, "int32"))
-      amax = 32;
-    elseif (isa (A, "int64"))
-      amax = 64;
-    else
-      error ("bitcmp: invalid class %s", class (A));
-    endif
-    bmax = intmax (class (A));
+    error ("bitcmp: invalid class %s", class (A));
   endif
 
   if (nargin == 1 || k == amax)
@@ -131,3 +116,9 @@
 %! assert (bitcmp (A,Amax-1), bitshift (uint64 (1),Amax-2));
 %! assert (bitcmp (A,Amax-2), uint64 (0));
 
+## Do not forget signed integers
+%!assert (bitcmp (int8 (127)), int8 (-128)) # [1 1 1 1 1 1 1 0]
+%!assert (bitcmp (int8 (1)), int8 (-2))     # [1 0 0 0 0 0 0 0]
+%!assert (bitcmp (int8 (0)), int8 (-1))     # [0 0 0 0 0 0 0 0]
+%!assert (bitcmp (int8 (8)), int8 (-9))     # [0 0 0 1 0 0 0 0]
+
--- a/scripts/general/bitget.m
+++ b/scripts/general/bitget.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/bitset.m
+++ b/scripts/general/bitset.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ## Copyright (C) 2012 Jordi Gutiérrez Hermoso
 ##
 ## This file is part of Octave.
--- a/scripts/general/blkdiag.m
+++ b/scripts/general/blkdiag.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Daniel Calvelo
+## Copyright (C) 2000-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -76,7 +76,7 @@
 ## tests involving sparse matrices
 %!assert (blkdiag (sparse ([1,2;3,4]),[5,6;7,8]), sparse ([1,2,0,0;3,4,0,0;0,0,5,6;0,0,7,8]))
 %!assert (blkdiag (sparse ([1,2;3,4]),[5,6]), sparse ([1,2,0,0;3,4,0,0;0,0,5,6]))
-# sanity checks
+## sanity checks
 %!test
 %! A = rand (round (rand (1, 2) * 10));
 %! assert (blkdiag (A), A);
--- a/scripts/general/cart2pol.m
+++ b/scripts/general/cart2pol.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/cart2sph.m
+++ b/scripts/general/cart2sph.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/cell2mat.m
+++ b/scripts/general/cell2mat.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Laurent Mazet
+## Copyright (C) 2005-2015 Laurent Mazet
 ## Copyright (C) 2010 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -32,15 +32,14 @@
     print_usage ();
   endif
 
-  if (! iscell (c))
-    error ("cell2mat: C is not a cell array");
-  endif
-
   nb = numel (c);
 
   if (nb == 0)
     m = [];
   else
+    if (! iscell (c))
+      error ("cell2mat: C must be a cell array");
+    endif
 
     ## Check first for valid matrix types
     valid = cellfun ("isnumeric", c);
@@ -94,6 +93,7 @@
 %! cell2mat (C)
 
 %!assert (cell2mat ({}), []);
+%!assert (cell2mat ([]), []);
 %!test
 %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]};
 %! D = C; D(:,:,2) = C;
@@ -115,7 +115,7 @@
 
 %!error cell2mat ()
 %!error cell2mat (1,2)
-%!error <C is not a cell array> cell2mat ([1,2])
+%!error <C must be a cell array> cell2mat ([1,2])
 %!error <mixed cells, structs, and matrices> cell2mat ({[1], struct()})
 %!error <mixed cells, structs, and matrices> cell2mat ({[1], {1}})
 %!error <mixed cells, structs, and matrices> cell2mat ({struct(), {1}})
--- a/scripts/general/celldisp.m
+++ b/scripts/general/celldisp.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/chop.m
+++ b/scripts/general/chop.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 John W. Eaton
+## Copyright (C) 2010-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,7 @@
     ## unless base was explicitly provided.
 
     inflate = 10 .^ (ndigits - tmp);
-    deflate = 10 .^ (tmp - ndigits);
+    deflate = 1 ./ inflate;
     if (nargin == 2)
       retval = deflate .* round (x .* inflate);
     else
--- a/scripts/general/circshift.m
+++ b/scripts/general/circshift.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -42,7 +42,7 @@
 ##     9, 7, 8
 ## @end group
 ## @end example
-## @seealso {permute, ipermute, shiftdim}
+## @seealso{permute, ipermute, shiftdim}
 ## @end deftypefn
 
 function y = circshift (x, n)
@@ -94,7 +94,7 @@
 %!assert (circshift (eye (3), 1), circshift (eye (3), 1))
 %!assert (circshift (eye (3), 1), [0,0,1;1,0,0;0,1,0])
 
-%% Test input validation
+## Test input validation
 %!error circshift ()
 %!error circshift (1)
 %!error circshift (1,2,3)
--- a/scripts/general/common_size.m
+++ b/scripts/general/common_size.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2009 VZLU Prague
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
@@ -67,7 +67,7 @@
     else
       errorcode = 0;
       if (nargout > 1)
-        scal = !nscal;
+        scal = ! nscal;
         varargout = varargin;
         if (any (nscal))
           dims = size (varargin{find (nscal, 1)});
--- a/scripts/general/cplxpair.m
+++ b/scripts/general/cplxpair.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -23,7 +23,7 @@
 ## Sort the numbers @var{z} into complex conjugate pairs ordered by
 ## increasing real part.  Place the negative imaginary complex number
 ## first within each pair.  Place all the real numbers (those with
-## @code{abs (imag (@var{z}) / @var{z}) < @var{tol})}) after the
+## @code{abs (imag (@var{z}) / @var{z}) < @var{tol}}) after the
 ## complex pairs.
 ##
 ## If @var{tol} is unspecified the default value is 100*@code{eps}.
@@ -92,7 +92,7 @@
   perm = [dim:nd, 1:dim-1];
   z = permute (z, perm);
   sz = size (z);
-  n = sz (1);
+  n = sz(1);
   m = prod (sz) / n;
   z = reshape (z, n, m);
 
--- a/scripts/general/cumtrapz.m
+++ b/scripts/general/cumtrapz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -90,7 +90,7 @@
   if (! have_xy)
     z = 0.5 * cumsum (x(idx1{:}) + x(idx2{:}), dim);
   else
-    if (isvector (x) && !isvector (y))
+    if (isvector (x) && ! isvector (y))
       if (length (x) != sz(dim))
         error ("cumtrapz: length of X and length of Y along DIM must match");
       endif
@@ -117,17 +117,20 @@
 %! x1 = [0,0,0;2,2,2];
 %! x2 = [0,2,4;0,2,4];
 %! y = [1,2,3;4,5,6];
+%!
 %!assert (cumtrapz (y), [0,0,0;2.5,3.5,4.5])
 %!assert (cumtrapz (x1,y), [0,0,0;5,7,9])
 %!assert (cumtrapz (y,1), [0,0,0;2.5,3.5,4.5])
 %!assert (cumtrapz (x1,y,1), [0,0,0;5,7,9])
 %!assert (cumtrapz (y,2), [0,1.5,4;0,4.5,10])
 %!assert (cumtrapz (x2,y,2), [0,3,8;0,9,20])
-%% Test ND-array implementation
+
+## Test ND-array implementation
 %!shared x1,x2,y
 %! x1 = 1:3;
 %! x2 = reshape ([0,2,4;0,2,4], [1 2 3]);
 %! y = reshape ([1,2,3;4,5,6], [1 2 3]);
+%!
 %!assert (cumtrapz (y,3), reshape ([0,1.5,4;0,4.5,10],[1 2 3]))
 %!assert (cumtrapz (x1,y,3), reshape ([0,1.5,4;0,4.5,10],[1 2 3]))
 %!assert (cumtrapz (x2,y,3), reshape ([0,3,8;0,9,20],[1 2 3]))
--- a/scripts/general/curl.m
+++ b/scripts/general/curl.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Kai Habel
+## Copyright (C) 2009-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -74,8 +74,8 @@
     print_usage ();
   endif
 
-  if ((nargin == 4) || (nargin == 2))
-    if (!size_equal (varargin{fidx}, varargin{fidx + 1}))
+  if (nargin == 4 || nargin == 2)
+    if (! size_equal (varargin{fidx}, varargin{fidx + 1}))
       error ("curl: size of X and Y must match");
     elseif (ndims (varargin{fidx}) != 2)
       error ("curl: expected two-dimensional matrices X and Y");
@@ -95,8 +95,8 @@
       varargout{2} = av;
     endif
 
-  elseif ((nargin == 6) || (nargin == 3))
-    if (!size_equal (varargin{fidx}, varargin{fidx + 1}, varargin{fidx + 2}))
+  elseif (nargin == 6 || nargin == 3)
+    if (! size_equal (varargin{fidx}, varargin{fidx + 1}, varargin{fidx + 2}))
       error ("curl: size of X, Y, and Z must match");
     elseif (ndims (varargin{fidx}) != 3)
       error ("curl: expected two-dimensional matrices X, Y, and Z");
--- a/scripts/general/dblquad.m
+++ b/scripts/general/dblquad.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -75,7 +75,7 @@
 endfunction
 
 
-%% Nasty integrand to show quadcc off
+## Nasty integrand to show quadcc off
 %!assert (dblquad (@(x,y) 1 ./ (x+y), 0, 1, 0, 1), 2*log (2), 1e-6)
 
 %!assert (dblquad (@(x,y) exp (-x.^2 - y.^2) , -1, 1, -1, 1, 1e-6, @quadgk), pi * erf (1).^2, 1e-6)
--- a/scripts/general/deal.m
+++ b/scripts/general/deal.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1998-2013 Ariel Tankus
+## Copyright (C) 1998-2015 Ariel Tankus
 ##
 ## This file is part of Octave.
 ##
@@ -54,6 +54,26 @@
 ## @example
 ## a = b = c = x;
 ## @end example
+##
+## Programming Note: @code{deal} is often used with comma separated lists
+## derived from cell arrays or structures.  This is unnecessary as the
+## interpreter can perform the same action without the overhead of a function
+## call.  For example:
+##
+## @example
+## @group
+## c = @{[1 2], "Three", 4@};
+## [x, y, z ] = c@{:@}
+## @result{}
+##    x =
+##
+##       1   2
+##
+##    y = Three
+##    z =  4
+## @end group
+## @end example
+## @seealso{cell2struct, struct2cell, repmat}
 ## @end deftypefn
 
 ## Author: Ariel Tankus
@@ -83,3 +103,6 @@
 %! assert (a, 1);
 %! assert (b, 1);
 
+%!error deal ()
+%!error <nargin . 1 and nargin != nargout> y = deal (1, 2)
+
--- a/scripts/general/del2.m
+++ b/scripts/general/del2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ## Copyright (C) 2007  David Bateman
 ##
 ## This file is part of Octave.
@@ -140,15 +140,15 @@
         idx1{i} = 1;
         idx2{i} = 2;
         idx3{i} = 3;
-        DD(idx1{:}) = (dx{i}(1) + dx{i}(2)) / dx{i}(2) * DD (idx2{:}) - ...
-            dx{i}(1) / dx{i}(2) * DD (idx3{:});
+        DD(idx1{:}) = (dx{i}(1) + dx{i}(2)) / dx{i}(2) * DD(idx2{:}) - ...
+            dx{i}(1) / dx{i}(2) * DD(idx3{:});
 
         idx1{i} = sz(i);
         idx2{i} = sz(i) - 1;
         idx3{i} = sz(i) - 2;
-        DD(idx1{:}) =  (dx{i}(sz(i) - 1) + dx{i}(sz(i) - 2)) / ...
-            dx{i}(sz(i) - 2) * DD (idx2{:}) - ...
-            dx{i}(sz(i) - 1) / dx{i}(sz(i) - 2) * DD (idx3{:});
+        DD(idx1{:}) = (dx{i}(sz(i) - 1) + dx{i}(sz(i) - 2)) / ...
+            dx{i}(sz(i) - 2) * DD(idx2{:}) - ...
+            dx{i}(sz(i) - 1) / dx{i}(sz(i) - 2) * DD(idx3{:});
       endif
 
       D += DD;
@@ -158,3 +158,164 @@
   D = D ./ nd;
 endfunction
 
+
+## 3x3 constant test
+%!test
+%! a = ones (3,3);
+%! b = del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00]);
+
+## 3x3 planar test
+%!test
+%! a = [1,2,3;2,3,4;3,4,5];
+%! b = del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00]);
+
+## 3x3 corner test
+%!test
+%! a = zeros (3,3);
+%! a(1,1) = 1.0;
+%! b = 2*del2 (a);
+%! assert (b(:,1), [1.00;0.50;0.50]);
+%! assert (b(:,2), [0.50;0.00;0.00]);
+%! assert (b(:,3), [0.50;0.00;0.00]);
+%! assert (b, flipud (2*del2 (flipud (a))));
+%! assert (b, fliplr (2*del2 (fliplr (a))));
+%! assert (b, flipud (fliplr (2*del2 (fliplr (flipud (a))))));
+
+## 3x3 boundary test
+%!test
+%! a = zeros (3,3);
+%! a(2,1)=1.0;
+%! b = 2*del2 (a);
+%! assert (b(:,1), [-1.00;-0.50;-1.00]);
+%! assert (b(:,2), [0.00;0.50;0.00]);
+%! assert (b(:,3), [0.00;0.50;0.00]);
+%! assert (b, flipud (2*del2 (flipud (a))));
+%! assert (b, fliplr (2*del2 (fliplr (a))));
+%! assert (b, flipud (fliplr (2*del2 (fliplr (flipud (a))))));
+
+## 3x3 center test
+%!test
+%! a = zeros (3,3);
+%! a(2,2) = 1.0;
+%! b = del2 (a);
+%! assert (b(:,1), [0.00;-0.50;0.00]);
+%! assert (b(:,2), [-0.50;-1.00;-0.50]);
+%! assert (b(:,3), [0.00;-0.50;0.00]);
+
+## 4x4 constant test
+%!test
+%! a = ones (4,4);
+%! b = del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,4), [0.00;0.00;0.00;0.00]);
+
+## 4x4 planar test
+%!test
+%! a = [1,2,3,4;2,3,4,5;3,4,5,6;4,5,6,7];
+%! b = del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,4), [0.00;0.00;0.00;0.00]);
+
+## 4x4 corner test
+%!test
+%! a = zeros (4,4);
+%! a(1,1) = 1.0;
+%! b = 2*del2 (a);
+%! assert (b(:,1), [2.00;0.50;0.00;-0.50]);
+%! assert (b(:,2), [0.50;0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00;0.00]);
+%! assert (b(:,4), [-0.50;0.00;0.00;0.00]);
+%! assert (b, flipud (2*del2 (flipud (a))));
+%! assert (b, fliplr (2*del2 (fliplr (a))));
+%! assert (b, flipud (fliplr (2*del2 (fliplr (flipud (a))))));
+
+## 9x9 center test
+%!test
+%! a = zeros (9,9);
+%! a(5,5) = 1.0;
+%! b = 2*del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00]);
+%! assert (b(:,3), [0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00]);
+%! assert (b(:,4), [0.00;0.00;0.00;0.00;0.50;0.00;0.00;0.00;0.00]);
+%! assert (b(:,5), [0.00;0.00;0.00;0.50;-2.00;0.50;0.00;0.00;0.00]);
+%! assert (b(:,6), b(:,4));
+%! assert (b(:,7), b(:,3));
+%! assert (b(:,8), b(:,2));
+%! assert (b(:,9), b(:,1));
+
+## 9x9 boundary test
+%!test
+%! a = zeros (9,9);
+%! a(1,5) = 1.0;
+%! b = 2*del2 (a);
+%! assert (b(1,:), [0.00,0.00,0.00,0.50,0.00,0.50,0.00,0.00,0.00]);
+%! assert (b(2,:), [0.00,0.00,0.00,0.00,0.50,0.00,0.00,0.00,0.00]);
+%! assert (b(3:9,:), zeros (7,9));
+%! a(1,5) = 0.0;
+%! a(5,1) = 1.0;
+%! b = 2*del2 (a);
+%! assert (b(:,1), [0.00;0.00;0.00;0.50;0.00;0.50;0.00;0.00;0.00]);
+%! assert (b(:,2), [0.00;0.00;0.00;0.00;0.50;0.00;0.00;0.00;0.00]);
+%! assert (b(:,3:9), zeros (9,7));
+
+## 9x9 dh center test
+%!test
+%! a = zeros (9,9);
+%! a(5,5) = 1.0;
+%! b = 8*del2 (a,2);
+%! assert (b(:,1:3), zeros (9,3));
+%! assert (b(:,4), [0.00;0.00;0.00;0.00;0.50;0.00;0.00;0.00;0.00]);
+%! assert (b(:,5), [0.00;0.00;0.00;0.50;-2.00;0.50;0.00;0.00;0.00]);
+%! assert (b(:,6), b(:,4));
+%! assert (b(:,7:9), zeros (9,3));
+
+## 9x9 dx test
+%!test
+%! a = zeros (9,9);
+%! a(5,5) = 1.0;
+%! b = 4*del2 (a,2,1);
+%! assert (b(1:3,:), zeros (3,9));
+%! assert (b(4,:), [0.00;0.00;0.00;0.00;1.00;0.00;0.00;0.00;0.00]');
+%! assert (b(5,:), [0.00;0.00;0.00;0.25;-2.5;0.25;0.00;0.00;0.00]');
+%! assert (b(6,:), b(4,:));
+%! assert (b(7:9,:), zeros (3,9));
+
+## 9x9 dy test
+%!test
+%! a = zeros (9,9);
+%! a(5,5) = 1.0;
+%! b = 4*del2 (a,1,2);
+%! assert (b(:,1:3), zeros (9,3));
+%! assert (b(:,4), [0.00;0.00;0.00;0.00;1.00;0.00;0.00;0.00;0.00]);
+%! assert (b(:,5), [0.00;0.00;0.00;0.25;-2.5;0.25;0.00;0.00;0.00]);
+%! assert (b(:,6), b(:,4));
+%! assert (b(:,7:9), zeros (9,3));
+
+## 3D test
+%!test
+%! a = zeros (9,9,9);
+%! a(5,5,5) = 1.0;
+%! b = 8*3*del2 (a,2);
+%! assert (b(:,:,1:3), zeros (9,9,3));
+%! assert (b(:,1:3,:), zeros (9,3,9));
+%! assert (b(1:3,:,:), zeros (3,9,9));
+%! assert (b(4:5,4,4), [0.0,0.0]');
+%! assert (b(5,5,4), 1.00);
+%! assert (b(4,4,5), 0.00);
+%! assert (b(5,4,5), 1.00);
+%! assert (b(5,5,5),-6.00);
+%! assert (b, flip (b,1));
+%! assert (b, flip (b,2));
+%! assert (b, flip (b,3));
+
--- a/scripts/general/display.m
+++ b/scripts/general/display.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/divergence.m
+++ b/scripts/general/divergence.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Kai Habel
+## Copyright (C) 2009-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -72,20 +72,21 @@
     print_usage ();
   endif
 
-  if ((nargin == 4) || (nargin == 2))
-    if (!size_equal (varargin{fidx},varargin{fidx + 1}))
+  if (nargin == 4 || nargin == 2)
+    if (! size_equal (varargin{fidx},varargin{fidx + 1}))
       error ("divergence: size of X and Y must match");
     elseif (ndims (varargin{fidx}) != 2)
       error ("divergence: expected two-dimensional matrices X and Y");
-    elseif ((length (dx) != columns (varargin{fidx})) || (length (dy) != rows (varargin{fidx})))
+    elseif (length (dx) != columns (varargin{fidx})
+            || length (dy) != rows (varargin{fidx}))
       error ("divergence: size of dx and dy must match the respective dimension of X and Y");
     endif
 
     retval = gradient (varargin{fidx}, dx, dy);
     retval += gradient (varargin{fidx + 1}.', dy, dx).';
 
-  elseif ((nargin == 6) || (nargin == 3))
-    if (!size_equal (varargin{fidx},varargin{fidx + 1},varargin{fidx + 2}))
+  elseif (nargin == 6 || nargin == 3)
+    if (! size_equal (varargin{fidx},varargin{fidx + 1},varargin{fidx + 2}))
       error ("divergence: size of X, Y, and Z must match");
     elseif (ndims (varargin{fidx}) != 3)
       error ("divergence: expected two-dimensional matrices X, Y, and Z");
--- a/scripts/general/fieldnames.m
+++ b/scripts/general/fieldnames.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
 ## When the input is a Java object @var{javaobj} or Java classname
 ## @var{jclassname} the name are the public data elements of the object or
 ## class.
-## @seealso{nfields, isfield, orderfields, struct, methods}
+## @seealso{numfields, isfield, orderfields, struct, methods}
 ## @end deftypefn
 
 function names = fieldnames (obj)
@@ -48,7 +48,10 @@
   elseif (isjava (obj) || ischar (obj))
     ## FIXME: Function prototype that excepts java obj exists, but doesn't
     ##        work if obj is java.lang.String.  Convert obj to classname.
-    if (! ischar (obj))
+    ## FIXME this is now working for objects whose class is in the dynamic
+    ##        classpath but will continue to fail if such classnames are used
+    ##        instead (see bug #42710)
+    if (isa (obj, "java.lang.String"))
       obj = class (obj);
     endif
     names_str = javaMethod ("getFields", "org.octave.ClassHelper", obj);
@@ -70,9 +73,21 @@
 %! s = struct ();
 %! assert (fieldnames (s), cell (0, 1));
 
-## test Java classname
+## test Java classname by passing classname
 %!testif HAVE_JAVA
 %! names = fieldnames ("java.lang.Double");
-%! search = strfind (names, "java.lang.Double.MAX_VALUE");
-%! assert (! isempty ([search{:}]));
+%! assert (any (strcmp (names, "MAX_VALUE")));
 
+## test Java classname by passing java object
+%!testif HAVE_JAVA
+%! names = fieldnames (javaObject ("java.lang.Double", 10));
+%! assert (any (strcmp (names, "MAX_VALUE")));
+%! assert (all (ismember ({"POSITIVE_INFINITY", "NEGATIVE_INFINITY", ...
+%!                         "NaN", "MAX_VALUE", "MIN_NORMAL", "MIN_VALUE", ...
+%!                         "MAX_EXPONENT", "MIN_EXPONENT", "SIZE", "TYPE"},
+%!                        names)));
+
+%!testif HAVE_JAVA
+%! names = fieldnames (javaObject ("java.lang.String", "Hello"));
+%! assert (any (strcmp (names, "CASE_INSENSITIVE_ORDER")));
+
copy from scripts/general/flipdim.m
copy to scripts/general/flip.m
--- a/scripts/general/flipdim.m
+++ b/scripts/general/flip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -18,27 +18,43 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} flipdim (@var{x})
-## @deftypefnx {Function File} {} flipdim (@var{x}, @var{dim})
+## @deftypefn  {Function File} {} flip (@var{x})
+## @deftypefnx {Function File} {} flip (@var{x}, @var{dim})
+## Flip array across specific dimension.
+##
 ## Return a copy of @var{x} flipped about the dimension @var{dim}.
 ## @var{dim} defaults to the first non-singleton dimension.
 ## For example:
 ##
 ## @example
 ## @group
-## flipdim ([1, 2; 3, 4], 2)
+## flip ([1  2  3  4])
+##       @result{}  4  3  2  1
+##
+## flip ([1; 2; 3; 4])
+##       @result{}  4
+##           3
+##           2
+##           1
+##
+## flip ([1 2; 3 4])
+##       @result{}  3  4
+##           1  2
+##
+## flip ([1 2; 3 4], 2)
 ##       @result{}  2  1
 ##           4  3
 ## @end group
 ## @end example
-## @seealso{fliplr, flipud, rot90, rotdim}
+##
+## @seealso{fliplr, flipud, rot90, rotdim, permute, transpose}
 ## @end deftypefn
 
 ## Author: David Bateman, Jaroslav Hajek
 
-function y = flipdim (x, dim)
+function y = flip (x, dim)
 
-  if (nargin != 1 && nargin != 2)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
@@ -48,7 +64,7 @@
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
   elseif (! (isscalar (dim) && isindex (dim)))
-    error ("flipdim: DIM must be a positive integer");
+    error ("flip: DIM must be a positive integer");
   endif
 
   idx(1:max(nd, dim)) = {':'};
@@ -58,12 +74,33 @@
 endfunction
 
 
-%!assert (flipdim ([1,2;3,4]), flipdim ([1,2 ; 3,4], 1))
-%!assert (flipdim ([1,2;3,4], 2), [2,1;4,3])
-%!assert (flipdim ([1,2;3,4], 3), [1,2;3,4])
+%!assert (flip ([1 2; 3 4], 2), [2 1; 4 3])
+%!assert (flip ([1 2; 3 4], 3), [1 2; 3 4])
+
+## Test defaults
+%!assert (flip ([1 2 3 4]), [4 3 2 1])
+%!assert (flip ([1 2 3 4].'), [4 3 2 1].')
+%!assert (flip ([1 2; 3 4]), flip ([1 2 ; 3 4], 1))
 
-## FIXME -- we need tests for multidimensional arrays.
+## Test NDArrays
+%!test
+%! a(1:2,1:2,1) = [1 2; 3 4];
+%! a(1:2,1:2,2) = [5 6; 7 8];
+%! b(1:2,1:2,1) = [5 6; 7 8];
+%! b(1:2,1:2,2) = [1 2; 3 4];
+%! assert (flip (a, 3), b)
 
-%!error flipdim ()
-%!error flipdim (1, 2, 3)
+%!test
+%! a = b = zeros (2, 2, 1, 2);
+%! a(1:2,1:2,:,1) = [1 2; 3 4];
+%! a(1:2,1:2,:,2) = [5 6; 7 8];
+%! b(1:2,1:2,:,1) = [5 6; 7 8];
+%! b(1:2,1:2,:,2) = [1 2; 3 4];
+%! assert (flip (a, 3), a)
+%! assert (flip (a, 4), b)
+%! assert (flip (a, 5), a)
 
+%!error flip ()
+%!error flip (1, 2, 3)
+%!error <DIM must be a positive integer> flip (magic (3), -1)
+
--- a/scripts/general/flipdim.m
+++ b/scripts/general/flipdim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -20,50 +20,22 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} flipdim (@var{x})
 ## @deftypefnx {Function File} {} flipdim (@var{x}, @var{dim})
-## Return a copy of @var{x} flipped about the dimension @var{dim}.
-## @var{dim} defaults to the first non-singleton dimension.
-## For example:
+## Flip array across specific dimension.
 ##
-## @example
-## @group
-## flipdim ([1, 2; 3, 4], 2)
-##       @result{}  2  1
-##           4  3
-## @end group
-## @end example
-## @seealso{fliplr, flipud, rot90, rotdim}
+## This function is an alias for @code{flip} and exists for backwards
+## and @sc{matlab} compatibility.  See @code{flip} for complete usage
+## information.
+##
+## @seealso{flip, fliplr, flipud, rot90, rotdim}
 ## @end deftypefn
 
 ## Author: David Bateman, Jaroslav Hajek
 
-function y = flipdim (x, dim)
-
-  if (nargin != 1 && nargin != 2)
-    print_usage ();
-  endif
-
-  nd = ndims (x);
-  sz = size (x);
-  if (nargin == 1)
-    ## Find the first non-singleton dimension.
-    (dim = find (sz > 1, 1)) || (dim = 1);
-  elseif (! (isscalar (dim) && isindex (dim)))
-    error ("flipdim: DIM must be a positive integer");
-  endif
-
-  idx(1:max(nd, dim)) = {':'};
-  idx{dim} = size (x, dim):-1:1;
-  y = x(idx{:});
-
+function y = flipdim (varargin)
+  y = flip (varargin{:});
 endfunction
 
 
-%!assert (flipdim ([1,2;3,4]), flipdim ([1,2 ; 3,4], 1))
-%!assert (flipdim ([1,2;3,4], 2), [2,1;4,3])
-%!assert (flipdim ([1,2;3,4], 3), [1,2;3,4])
+## No tests needed for alias.  All tests for functionality are in flip.m
+%!assert (1)
 
-## FIXME -- we need tests for multidimensional arrays.
-
-%!error flipdim ()
-%!error flipdim (1, 2, 3)
-
--- a/scripts/general/fliplr.m
+++ b/scripts/general/fliplr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,6 +18,8 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} fliplr (@var{x})
+## Flip array left to right.
+##
 ## Return a copy of @var{x} with the order of the columns reversed.  In
 ## other words, @var{x} is flipped left-to-right about a vertical axis.  For
 ## example:
@@ -30,9 +32,7 @@
 ## @end group
 ## @end example
 ##
-## Note that @code{fliplr} only works with 2-D arrays.  To flip N-D arrays
-## use @code{flipdim} instead.
-## @seealso{flipud, flipdim, rot90, rotdim}
+## @seealso{flipud, flip, rot90, rotdim}
 ## @end deftypefn
 
 ## Author: jwe
@@ -42,13 +42,7 @@
   if (nargin != 1)
     print_usage ();
   endif
-
-  if (ndims (x) > 2)
-    error ("fliplr: Only works with 2-D arrays");
-  endif
-
-  nc = columns (x);
-  y = x (:, nc:-1:1);
+  y = flip (x, 2);
 
 endfunction
 
@@ -56,6 +50,29 @@
 %!assert (fliplr ([1, 2; 3, 4]), [2, 1; 4, 3])
 %!assert (fliplr ([1, 2; 3, 4; 5, 6]), [2, 1; 4, 3; 6, 5])
 %!assert (fliplr ([1, 2, 3; 4, 5, 6]), [3, 2, 1; 6, 5, 4])
+%!assert (fliplr ([1 2 3].'), [1 2 3].')
+
+## Test NDArrays
+%!test
+%! a(:,:,1) = [ 1  2;  3  4;  5  6];
+%! a(:,:,2) = [ 7  8;  9 10; 11 12];
+%! b(:,:,1) = [ 2  1;  4  3;  6  5];
+%! b(:,:,2) = [ 8  7; 10  9; 12 11];
+%! assert (fliplr (a), b)
+
+## Test NDArray with singleton dimensions
+%!test
+%! a(:,:,:,1) = [ 1  2;  3  4;  5  6];
+%! a(:,:,:,2) = [ 7  8;  9 10; 11 12];
+%! b(:,:,:,1) = [ 2  1;  4  3;  6  5];
+%! b(:,:,:,2) = [ 8  7; 10  9; 12 11];
+%! assert (fliplr (a), b)
+
+## Test for 1 row, i.e., returns the same
+%!test
+%! a(:,1,:,1) = [ 1  2  3  4];
+%! a(:,1,:,2) = [ 5  6  7  8];
+%! assert (fliplr (a), a)
 
 %!error fliplr()
 %!error fliplr (1, 2)
--- a/scripts/general/flipud.m
+++ b/scripts/general/flipud.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,6 +18,8 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} flipud (@var{x})
+## Flip array upside down.
+##
 ## Return a copy of @var{x} with the order of the rows reversed.  In
 ## other words, @var{x} is flipped upside-down about a horizontal axis.  For
 ## example:
@@ -30,9 +32,7 @@
 ## @end group
 ## @end example
 ##
-## Note that @code{flipud} only works with 2-D arrays.  To flip N-D arrays
-## use @code{flipdim} instead.
-## @seealso{fliplr, flipdim, rot90, rotdim}
+## @seealso{fliplr, flip, rot90, rotdim}
 ## @end deftypefn
 
 ## Author: jwe
@@ -42,13 +42,7 @@
   if (nargin != 1)
     print_usage ();
   endif
-
-  if (ndims (x) > 2)
-    error ("flipud: Only works with 2-d arrays");
-  endif
-
-  nr = rows (x);
-  y = x (nr:-1:1, :);
+  y = flip (x, 1);
 
 endfunction
 
@@ -56,6 +50,29 @@
 %!assert (flipud ([1, 2; 3, 4]), [3, 4; 1, 2])
 %!assert (flipud ([1, 2; 3, 4; 5, 6]), [5, 6; 3, 4; 1, 2])
 %!assert (flipud ([1, 2, 3; 4, 5, 6]), [4, 5, 6; 1, 2, 3])
+%!assert (flipud ([1 2 3]), [1 2 3])
+
+## Test NDArrays
+%!test
+%! a(:,:,1) = [ 1  2  3;  4  5  6];
+%! a(:,:,2) = [ 7  8  9; 10 11 12];
+%! b(:,:,1) = [ 4  5  6;  1  2  3];
+%! b(:,:,2) = [10 11 12;  7  8  9];
+%! assert (flipud (a), b)
+
+## Test NDArray with singleton dimensions
+%!test
+%! a(:,:,:,1) = [ 1  2  3;  4  5  6];
+%! a(:,:,:,2) = [ 7  8  9; 10 11 12];
+%! b(:,:,:,1) = [ 4  5  6;  1  2  3];
+%! b(:,:,:,2) = [10 11 12;  7  8  9];
+%! assert (flipud (a), b)
+
+## Test for 1 row, i.e., returns the same
+%!test
+%! a(1,:,:,1) = [ 1  2  3  4];
+%! a(1,:,:,2) = [ 5  6  7  8];
+%! assert (flipud (a), a)
 
 %!error flipud ()
 %!error flipud (1, 2)
--- a/scripts/general/gradient.m
+++ b/scripts/general/gradient.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -71,12 +71,13 @@
   endif
 
   nargout_with_ans = max (1,nargout);
-  if (ismatrix (m))
+  if (isnumeric (m))
     [varargout{1:nargout_with_ans}] = matrix_gradient (m, varargin{:});
   elseif (isa (m, "function_handle"))
     [varargout{1:nargout_with_ans}] = handle_gradient (m, varargin{:});
   elseif (ischar (m))
-    [varargout{1:nargout_with_ans}] = handle_gradient (str2func (m), varargin{:});
+    [varargout{1:nargout_with_ans}] = handle_gradient (str2func (m), ...
+                                                       varargin{:});
   else
     error ("gradient: first input must be an array or a function");
   endif
@@ -179,7 +180,7 @@
   endif
 
   if (any (p0_size == 1))
-    p0 = p0 (:);
+    p0 = p0(:);
     dim = 1;
     num_points = numel (p0);
   else
@@ -201,7 +202,7 @@
 
   if (isscalar (delta))
     delta = repmat (delta, 1, dim);
-  elseif (!isvector (delta))
+  elseif (! isvector (delta))
     error ("gradient: spacing values must be scalars or a vector");
   endif
 
@@ -209,7 +210,7 @@
   p0 = mat2cell (p0, num_points, ones (1, dim));
   varargout = cell (1, dim);
   for d = 1:dim
-    s = delta (d);
+    s = delta(d);
     df_dx = (f (p0{1:d-1}, p0{d}+s, p0{d+1:end})
            - f (p0{1:d-1}, p0{d}-s, p0{d+1:end})) ./ (2*s);
     if (dim == 1)
--- a/scripts/general/idivide.m
+++ b/scripts/general/idivide.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -83,7 +83,7 @@
       typ = class (x);
     else
       typ = class (x);
-      if (!strcmp (class (x), class (y)))
+      if (! strcmp (class (x), class (y)))
         error ("idivide: incompatible types");
       endif
     endif
new file mode 100644
--- /dev/null
+++ b/scripts/general/inputParser.m
@@ -0,0 +1,591 @@
+## Copyright (C) 2011-2014 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{p} =} inputParser ()
+## Create object @var{p} of the inputParser class.
+##
+## This class is designed to allow easy parsing of function arguments.  The
+## class supports four types of arguments:
+##
+## @enumerate
+## @item mandatory (see @command{addRequired});
+##
+## @item optional (see @command{addOptional});
+##
+## @item named (see @command{addParamValue});
+##
+## @item switch (see @command{addSwitch}).
+## @end enumerate
+##
+## After defining the function API with these methods, the supplied arguments
+## can be parsed with the @command{parse} method and the parsing results
+## accessed with the @command{Results} accessor.
+##
+## @end deftypefn
+## @deftypefn {Accessor method} {} inputParser.Parameters
+## Return list of parameter names already defined.
+##
+## @end deftypefn
+## @deftypefn {Accessor method} {} inputParser.Results
+## Return structure with argument names as fieldnames and corresponding values.
+##
+## @end deftypefn
+## @deftypefn {Accessor method} {} inputParser.Unmatched
+## Return structure similar to @command{Results}, but for unmatched parameters.
+## See the @command{KeepUnmatched} property.
+##
+## @end deftypefn
+## @deftypefn {Accessor method} {} inputParser.UsingDefaults
+## Return cell array with the names of arguments that are using default values.
+##
+## @end deftypefn
+## @deftypefn {Class property} {} inputParser.CaseSensitive = @var{boolean}
+## Set whether matching of argument names should be case sensitive.  Defaults
+## to false.
+##
+## @end deftypefn
+## @deftypefn {Class property} {} inputParser.FunctionName = @var{name}
+## Set function name to be used in error messages; Defaults to empty string.
+##
+## @end deftypefn
+## @deftypefn {Class property} {} inputParser.KeepUnmatched = @var{boolean}
+## Set whether an error should be given for non-defined arguments.  Defaults to
+## false.  If set to true, the extra arguments can be accessed through
+## @code{Unmatched} after the @code{parse} method.  Note that since
+## @command{Switch} and @command{ParamValue} arguments can be mixed, it is
+## not possible to know the unmatched type.  If argument is found unmatched
+## it is assumed to be of the @command{ParamValue} type and it is expected to
+## be followed by a value.
+##
+## @end deftypefn
+## @deftypefn {Class property} {} inputParser.StructExpand = @var{boolean}
+## Set whether a structure can be passed to the function instead of
+## parameter/value pairs.  Defaults to true.  Not implemented yet.
+##
+## The following example shows how to use this class:
+##
+## @example
+## @group
+## function check (varargin)
+## @c The next two comments need to be indented by one for alignment
+##   p = inputParser ();                      # create object
+##   p.FunctionName = "check";                # set function name
+##   p.addRequired ("pack", @@ischar);         # mandatory argument
+##   p.addOptional ("path", pwd(), @@ischar);  # optional argument
+##
+##   ## create a function handle to anonymous functions for validators
+##   val_mat = @@(x) isvector (x) && all (x <= 1) && all (x >= 0);
+##   p.addOptional ("mat", [0 0], val_mat);
+##
+##   ## create two arguments of type "ParamValue"
+##   val_type = @@(x) any (strcmp (x, @{"linear", "quadratic"@}));
+##   p.addParamValue ("type", "linear", val_type);
+##   val_verb = @@(x) any (strcmp (x, @{"low", "medium", "high"@}));
+##   p.addParamValue ("tolerance", "low", val_verb);
+##
+##   ## create a switch type of argument
+##   p.addSwitch ("verbose");
+##
+##   p.parse (varargin@{:@});  # Run created parser on inputs
+##
+##   ## the rest of the function can access inputs by using p.Results.
+##   ## for example, get the tolerance input with p.Results.tolerance
+## endfunction
+## @end group
+##
+## check ("mech");           # valid, use defaults for other arguments
+## check ();                 # error, one argument is mandatory
+## check (1);                # error, since ! ischar
+## check ("mech", "~/dev");  # valid, use defaults for other arguments
+##
+## check ("mech", "~/dev", [0 1 0 0], "type", "linear");  # valid
+##
+## ## following is also valid.  Note how the Switch argument type can
+## ## be mixed into or before the ParamValue argument type (but it
+## ## must still appear after any Optional argument).
+## check ("mech", "~/dev", [0 1 0 0], "verbose", "tolerance", "high");
+##
+## ## following returns an error since not all optional arguments,
+## ## `path' and `mat', were given before the named argument `type'.
+## check ("mech", "~/dev", "type", "linear");
+## @end example
+##
+## @emph{Note 1}: A function can have any mixture of the four API types but
+## they must appear in a specific order.  @command{Required} arguments must be
+## first and can be followed by any @command{Optional} arguments.  Only
+## the @command{ParamValue} and @command{Switch} arguments may be mixed
+## together and they must appear at the end.
+##
+## @emph{Note 2}: If both @command{Optional} and @command{ParamValue} arguments
+## are mixed in a function API then once a string Optional argument fails to
+## validate it will be considered the end of the @command{Optional}
+## arguments.  The remaining arguments will be compared against any
+## @command{ParamValue} or @command{Switch} arguments.
+##
+## @seealso{nargin, validateattributes, validatestring, varargin}
+## @end deftypefn
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} addOptional (@var{argname}, @var{default})
+## @deftypefnx {Function File} {} addOptional (@var{argname}, @var{default}, @var{validator})
+## Add new optional argument to the object @var{parser} of the class inputParser
+## to implement an ordered arguments type of API
+##
+## @var{argname} must be a string with the name of the new argument.  The order
+## in which new arguments are added with @command{addOptional}, represents the
+## expected order of arguments.
+##
+## @var{default} will be the value used when the argument is not specified.
+##
+## @var{validator} is an optional anonymous function to validate the given
+## values for the argument with name @var{argname}.  Alternatively, a
+## function name can be used.
+##
+## See @command{help inputParser} for examples.
+##
+## @emph{Note}: if a string argument does not validate, it will be considered a
+## ParamValue key.  If an optional argument is not given a validator, anything
+## will be valid, and so any string will be considered will be the value of the
+## optional argument (in @sc{matlab}, if no validator is given and argument is
+## a string it will also be considered a ParamValue key).
+##
+## @end deftypefn
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} addParamValue (@var{argname}, @var{default})
+## @deftypefnx {Function File} {} addParamValue (@var{argname}, @var{default}, @var{validator})
+## Add new parameter to the object @var{parser} of the class inputParser to
+## implement a name/value pair type of API.
+##
+## @var{argname} must be a string with the name of the new parameter.
+##
+## @var{default} will be the value used when the parameter is not specified.
+##
+## @var{validator} is an optional function handle to validate the given values
+## for the parameter with name @var{argname}.  Alternatively, a function name
+## can be used.
+##
+## See @command{help inputParser} for examples.
+##
+## @end deftypefn
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} addRequired (@var{argname})
+## @deftypefnx {Function File} {} addRequired (@var{argname}, @var{validator})
+## Add new mandatory argument to the object @var{parser} of inputParser class.
+##
+## This method belongs to the inputParser class and implements an ordered
+## arguments type of API.
+##
+## @var{argname} must be a string with the name of the new argument.  The order
+## in which new arguments are added with @command{addrequired}, represents the
+## expected order of arguments.
+##
+## @var{validator} is an optional function handle to validate the given values
+## for the argument with name @var{argname}.  Alternatively, a function name
+## can be used.
+##
+## See @command{help inputParser} for examples.
+##
+## @emph{Note}: this can be used together with the other type of arguments but
+## it must be the first (see @command{@@inputParser}).
+##
+## @end deftypefn
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} addSwitch (@var{argname})
+## Add new switch type of argument to the object @var{parser} of inputParser
+## class.
+##
+## This method belongs to the inputParser class and implements a switch
+## arguments type of API.
+##
+## @var{argname} must be a string with the name of the new argument.  Arguments
+## of this type can be specified at the end, after @code{Required} and
+## @code{Optional}, and mixed between the @code{ParamValue}.  They default to
+## false.  If one of the arguments supplied is a string like @var{argname},
+## then after parsing the value of @var{parse}.Results.@var{argname} will be
+## true.
+##
+## See @command{help inputParser} for examples.
+##
+## @end deftypefn
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} parse (@var{varargin})
+## Parses and validates list of arguments according to object @var{parser} of
+## the class inputParser.
+##
+## After parsing, the results can be accessed with the @command{Results}
+## accessor.  See @command{help inputParser} for a more complete description.
+##
+## @end deftypefn
+
+## Author: Carnë Draug <carandraug@octave.org>
+
+classdef inputParser < handle
+  properties
+    ## TODO set input checking for this properties
+    CaseSensitive     = false;
+    FunctionName      = "";
+    KeepUnmatched     = false;
+    # PartialMatching = true;   # TODO unimplemented
+    # StructExpand    = true;   # TODO unimplemented
+  endproperties
+
+  properties (SetAccess = protected)
+    Parameters    = cell ();
+    Results       = struct ();
+    Unmatched     = struct ();
+    UsingDefaults = cell ();
+  endproperties
+
+  properties (Access = protected)
+    ## Since Required and Optional are ordered, they get a cell array of
+    ## structs with the fields "name", "def" (default), and "val" (validator).
+    Required   = cell ();
+    Optional   = cell ();
+    ## ParamValue and Swicth are unordered so we have a struct whose fieldnames
+    ## are the argname, and values are a struct with fields "def" and "val"
+    ParamValue = struct ();
+    Switch     = struct ();
+
+    ## List of ParamValues and Switch names to ease searches
+    ParamValueNames = cell ();
+    SwitchNames     = cell ();
+
+    ## When checking for fieldnames in a Case Insensitive way, this variable
+    ## holds the correct identifier for the last searched named using the
+    ## is_argname method.
+    last_name  = "";
+  endproperties
+
+  properties (Access = protected, Constant = true)
+    ## Default validator, always returns scalar true.
+    def_val = @() true;
+  endproperties
+
+  methods
+    function addRequired (this, name, val = inputParser.def_val)
+      if (nargin < 2 || nargin > 3)
+        print_usage ();
+      elseif (numel (this.Optional) || numel (fieldnames (this.ParamValue))
+              || numel (fieldnames (this.Switch)))
+        error (["inputParser.addRequired: can't have a Required argument " ...
+                "after Optional, ParamValue, or Switch"]);
+      endif
+      this.validate_name ("Required", name);
+      this.Required{end+1} = struct ("name", name, "val", val);
+    endfunction
+
+    function addOptional (this, name, def, val = inputParser.def_val)
+      if (nargin < 3 || nargin > 4)
+        print_usage ();
+      elseif (numel (fieldnames (this.ParamValue))
+              || numel (fieldnames (this.Switch)))
+        error (["inputParser.Optional: can't have Optional arguments " ...
+                "after ParamValue or Switch"]);
+      endif
+      this.validate_name ("Optional", name);
+      this.validate_default ("Optional", name, def, val);
+      this.Optional{end+1} = struct ("name", name, "def", def, "val", val);
+    endfunction
+
+    function addParamValue (this, name, def, val = inputParser.def_val)
+      if (nargin < 3 || nargin > 4)
+        print_usage ();
+      endif
+      this.validate_name ("ParamValue", name);
+      this.validate_default ("ParamValue", name, def, val);
+      this.ParamValue.(name).def = def;
+      this.ParamValue.(name).val = val;
+    endfunction
+
+    function addSwitch (this, name)
+      if (nargin != 2)
+        print_usage ();
+      endif
+      this.validate_name ("Switch", name);
+      this.Switch.(name).def = false;
+    endfunction
+
+    function parse (this, varargin)
+      if (numel (varargin) < numel (this.Required))
+        if (this.FunctionName)
+          print_usage (this.FunctionName);
+        else
+          this.error ("not enough input arguments");
+        endif
+      endif
+      pnargin = numel (varargin);
+
+      this.ParamValueNames = fieldnames (this.ParamValue);
+      this.SwitchNames     = fieldnames (this.Switch);
+
+      ## Evaluate the Required arguments first
+      nReq = numel (this.Required);
+      for idx = 1:nReq
+        req = this.Required{idx};
+        this.validate_arg (req.name, req.val, varargin{idx});
+      endfor
+
+      vidx = nReq;  # current index in varargin
+
+      ## Search for a list of Optional arguments
+      idx  = 0;     # current index on the array of Optional
+      nOpt = numel (this.Optional);
+      while (vidx < pnargin && idx < nOpt)
+        opt = this.Optional{++idx};
+        in  = varargin{++vidx};
+        if (! opt.val (in))
+          ## If it does not match there's two options:
+          ##    1) input is actually wrong and we should error;
+          ##    2) it's a ParamValue or Switch name and we should use the
+          ##       the default for the rest.
+          if (ischar (in))
+            idx--;
+            vidx--;
+            break
+          else
+            this.error (sprintf ("failed validation of %s",
+                                 toupper (opt.name)));
+          endif
+        endif
+        this.Results.(opt.name) = in;
+      endwhile
+
+      ## Fill in with defaults of missing Optional
+      while (idx++ < nOpt)
+        opt = this.Optional{idx};
+        this.UsingDefaults{end+1} = opt.name;
+        this.Results.(opt.name) = opt.def;
+      endwhile
+
+      ## Search unordered Options (Switch and ParamValue)
+      while (vidx++ < pnargin)
+        name = varargin{vidx};
+        if (this.is_argname ("ParamValue", name))
+          if (vidx++ > pnargin)
+            this.error (sprintf ("no matching value for option '%s'",
+                                 toupper (name)));
+          endif
+          this.validate_arg (this.last_name,
+                             this.ParamValue.(this.last_name).val,
+                             varargin{vidx});
+        elseif (this.is_argname ("Switch", name))
+          this.Results.(this.last_name) = true;
+        else
+          if (vidx++ < pnargin && this.KeepUnmatched)
+            this.Unmatched.(name) = varargin{vidx};
+          else
+            this.error (sprintf ("argument '%s' is not a valid parameter",
+                                  toupper (name)));
+          endif
+        endif
+      endwhile
+      ## Add them to the UsingDeafults list
+      this.add_missing ("ParamValue");
+      this.add_missing ("Switch");
+
+    endfunction
+
+    function display (this)
+      if (nargin > 1)
+        print_usage ();
+      endif
+      printf ("inputParser object with properties:\n\n");
+      b2s = @(x) ifelse (any (x), "true", "false");
+      printf (["   CaseSensitive   : %s\n   FunctionName    : %s\n" ...
+               "   KeepUnmatched   : %s\n   PartialMatching : %s\n" ...
+               "   StructExpand    : %s\n\n"],
+               b2s (this.CaseSensitive), b2s (this.FunctionName),
+               b2s (this.KeepUnmatched), b2s (this.PartialMatching),
+               b2s (this.StructExpand));
+      printf ("Defined parameters:\n\n   {%s}\n",
+              strjoin (this.Parameters, ", "));
+    endfunction
+  endmethods
+
+  methods (Access = private)
+    function validate_name (this, type, name)
+      if (! isvarname (name))
+        error ("inputParser.add%s: NAME is an invalid identifier", method);
+      elseif (any (strcmpi (this.Parameters, name)))
+        ## Even if CaseSensitive is "on", we still shouldn't allow
+        ## two args with the same name.
+        error ("inputParser.add%s: argname '%s' has already been specified",
+               type, name);
+      endif
+      this.Parameters{end+1} = name;
+    endfunction
+
+    function validate_default (this, type, name, def, val)
+      if (! feval (val, def))
+        error ("inputParser.add%s: failed validation for '%s' default value",
+               type, name);
+      endif
+    endfunction
+
+    function validate_arg (this, name, val, in)
+        if (! val (in))
+          this.error (sprintf ("failed validation of %s", toupper (name)));
+        endif
+        this.Results.(name) = in;
+    endfunction
+
+    function r = is_argname (this, type, name)
+      if (this.CaseSensitive)
+        r = isfield (this.(type), name);
+        this.last_name = name;
+      else
+        fnames = this.([type "Names"]);
+        l = strcmpi (name, fnames);
+        r = any (l(:));
+        if (r)
+          this.last_name = fnames{l};
+        endif
+      endif
+    endfunction
+
+    function add_missing (this, type)
+      unmatched = setdiff (fieldnames (this.(type)), fieldnames (this.Results));
+      for namec = unmatched(:)'
+        name = namec{1};
+        this.UsingDefaults{end+1} = name;
+        this.Results.(name) = this.(type).(name).def;
+      endfor
+    endfunction
+
+    function error (this, msg)
+      where = "";
+      if (this.FunctionName)
+        where = [this.FunctionName ": "];
+      endif
+      error ("%s%s", where, msg);
+    endfunction
+  endmethods
+
+endclassdef
+
+%!function p = create_p ()
+%!  p = inputParser ();
+%!  p.CaseSensitive = true;
+%!  p.addRequired ("req1", @(x) ischar (x));
+%!  p.addOptional ("op1", "val", @(x) any (strcmp (x, {"val", "foo"})));
+%!  p.addOptional ("op2", 78, @(x) x > 50);
+%!  p.addSwitch ("verbose");
+%!  p.addParamValue ("line", "tree", @(x) any (strcmp (x, {"tree", "circle"})));
+%!endfunction
+
+## check normal use, only required are given
+%!test
+%! p = create_p ();
+%! p.parse ("file");
+%! r = p.Results;
+%! assert (r.req1, "file");
+%! assert (sort (p.UsingDefaults), sort ({"op1", "op2", "verbose", "line"}));
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!        {"file", "val", 78,    false,     "tree"});
+
+## check normal use, but give values different than defaults
+%!test
+%! p = create_p ();
+%! p.parse ("file", "foo", 80, "line", "circle", "verbose");
+%! r = p.Results;
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!         {"file", "foo", 80,    true,      "circle"});
+
+## check optional is skipped and considered ParamValue if unvalidated string
+%!test
+%! p = create_p ();
+%! p.parse ("file", "line", "circle");
+%! r = p.Results;
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!         {"file", "val", 78,    false,     "circle"});
+
+## check case insensitivity
+%!test
+%! p = create_p ();
+%!  p.CaseSensitive = false;
+%! p.parse ("file", "foo", 80, "LiNE", "circle", "vERbOSe");
+%! r = p.Results;
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!         {"file", "foo", 80,    true,      "circle"});
+
+## check KeepUnmatched
+%!test
+%! p = create_p ();
+%! p.KeepUnmatched = true;
+%! p.parse ("file", "foo", 80, "line", "circle", "verbose", "extra", 50);
+%! assert (p.Unmatched.extra, 50)
+
+## check error when missing required
+%!error <not enough input arguments>
+%! p = create_p ();
+%! p.parse ();
+
+## check error when given required does not validate
+%!error <failed validation of >
+%! p = create_p ();
+%! p.parse (50);
+
+## check error when given optional does not validate
+%!error <is not a valid parameter>
+%! p = create_p ();
+%! p.parse ("file", "no-val");
+
+## check error when given ParamValue does not validate
+%!error <failed validation of >
+%! p = create_p ();
+%! p.parse ("file", "foo", 51, "line", "round");
+
+## check alternative method (obj, ...) API
+%!function p2 = create_p2 ();
+%!  p2 = inputParser;
+%!  addRequired (p2, "req1", @(x) ischar (x));
+%!  addOptional (p2, "op1", "val", @(x) any (strcmp (x, {"val", "foo"})));
+%!  addOptional (p2, "op2", 78, @(x) x > 50);
+%!  addSwitch (p2, "verbose");
+%!  addParamValue (p2, "line", "tree", @(x) any (strcmp (x, {"tree", "circle"})));
+%!endfunction
+
+## check normal use, only required are given
+%!test
+%! p2 = create_p2 ();
+%! parse (p2, "file");
+%! r = p2.Results;
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!         {"file", "val", 78,    false,     "tree"});
+%! assert (sort (p2.UsingDefaults), sort ({"op1", "op2", "verbose", "line"}));
+
+## check normal use, but give values different than defaults
+%!test
+%! p2 = create_p2 ();
+%! parse (p2, "file", "foo", 80, "line", "circle", "verbose");
+%! r = p2.Results;
+%! assert ({r.req1, r.op1, r.op2, r.verbose, r.line},
+%!         {"file", "foo", 80,    true,      "circle"});
+
+## FIXME: This somehow works in Matlab
+#%!test
+#%! p = inputParser;
+#%! p.addOptional ("op1", "val");
+#%! p.addParamValue ("line", "tree");
+#%! p.parse ("line", "circle");
+#%! assert (p.Results, struct ("op1", "val", "line", "circle"));
--- a/scripts/general/int2str.m
+++ b/scripts/general/int2str.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/interp1.m
+++ b/scripts/general/interp1.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2014-2015 Nir Krakauer
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -29,28 +30,35 @@
 ## One-dimensional interpolation.
 ##
 ## Interpolate input data to determine the value of @var{yi} at the points
-## @var{xi}.  If not specified, @var{x} is taken to be the indices of @var{y}.
-## If @var{y} is a matrix or an N-dimensional array, the interpolation is
-## performed on each column of @var{y}.
+## @var{xi}.  If not specified, @var{x} is taken to be the indices of @var{y}
+## (@code{1:length (@var{y})}).  If @var{y} is a matrix or an N-dimensional
+## array, the interpolation is performed on each column of @var{y}.
 ##
-## Method is one of:
+## The interpolation @var{method} is one of:
 ##
 ## @table @asis
 ## @item @qcode{"nearest"}
-## Return the nearest neighbor
+## Return the nearest neighbor.
+##
+## @item @qcode{"previous"}
+## Return the previous neighbor.
 ##
-## @item @qcode{"linear"}
-## Linear interpolation from nearest neighbors
+## @item @qcode{"next"}
+## Return the next neighbor.
+##
+## @item @qcode{"linear"} (default)
+## Linear interpolation from nearest neighbors.
 ##
 ## @item @qcode{"pchip"}
-## Piecewise cubic Hermite interpolating polynomial
+## Piecewise cubic Hermite interpolating polynomial---shape-preserving
+## interpolation with smooth first derivative.
 ##
 ## @item @qcode{"cubic"}
-## Cubic interpolation (same as @code{pchip})
+## Cubic interpolation (same as @qcode{"pchip"}).
 ##
 ## @item @qcode{"spline"}
 ## Cubic spline interpolation---smooth first and second derivatives
-## throughout the curve
+## throughout the curve.
 ## @end table
 ##
 ## Adding '*' to the start of any method above forces @code{interp1}
@@ -61,7 +69,7 @@
 ## If @var{extrap} is the string @qcode{"extrap"}, then extrapolate values
 ## beyond the endpoints using the current @var{method}.  If @var{extrap} is a
 ## number, then replace values beyond the endpoints with that number.  When
-## unspecified, @var{extrap} defaults to NA.
+## unspecified, @var{extrap} defaults to @code{NA}.
 ##
 ## If the string argument @qcode{"pp"} is specified, then @var{xi} should not
 ## be supplied and @code{interp1} returns a piecewise polynomial object.  This
@@ -76,7 +84,7 @@
 ## right-continuous.  If @var{x} is decreasing, the default discontinuous
 ## interpolant is left-continuous.
 ## The continuity condition of the interpolant may be specified by using
-## the options, @qcode{"left"} or @qcode{"right"}, to select a left-continuous
+## the options @qcode{"left"} or @qcode{"right"} to select a left-continuous
 ## or right-continuous interpolant, respectively.
 ## Discontinuous interpolation is only allowed for @qcode{"nearest"} and
 ## @qcode{"linear"} methods; in all other cases, the @var{x}-values must be
@@ -91,16 +99,16 @@
 ## xp = [0:10];
 ## yp = sin (2*pi*xp/5);
 ## lin = interp1 (xp, yp, xf);
+## near = interp1 (xp, yp, xf, "nearest");
+## pch = interp1 (xp, yp, xf, "pchip");
 ## spl = interp1 (xp, yp, xf, "spline");
-## cub = interp1 (xp, yp, xf, "cubic");
-## near = interp1 (xp, yp, xf, "nearest");
-## plot (xf, yf, "r", xf, lin, "g", xf, spl, "b",
-##       xf, cub, "c", xf, near, "m", xp, yp, "r*");
-## legend ("original", "linear", "spline", "cubic", "nearest");
+## plot (xf,yf,"r", xf,near,"g", xf,lin,"b", xf,pch,"c", xf,spl,"m",
+##       xp,yp,"r*");
+## legend ("original", "nearest", "linear", "pchip", "spline");
 ## @end group
 ## @end example
 ##
-## @seealso{interpft, interp2, interp3, interpn}
+## @seealso{pchip, spline, interpft, interp2, interp3, interpn}
 ## @end deftypefn
 
 ## Author: Paul Kienzle
@@ -130,17 +138,18 @@
       arg = varargin{i};
       if (ischar (arg))
         arg = tolower (arg);
-        if (strcmp ("extrap", arg))
-          extrap = "extrap";
-        elseif (strcmp ("pp", arg))
-          ispp = true;
-        elseif (strcmp (arg, "right") || strcmp (arg, "-right"))
-          rightcontinuous = true;
-        elseif (strcmp (arg, "left") || strcmp (arg, "-left"))
-          rightcontinuous = false;
-        else
-          method = arg;
-        endif
+        switch (arg)
+          case "extrap"
+            extrap = "extrap";
+          case "pp"
+            ispp = true;
+          case {"right", "-right"}
+            rightcontinuous = true;
+          case {"left", "-left"}
+            rightcontinuous = false;
+          otherwise
+            method = arg;
+        endswitch
       else
         if (firstnumeric)
           xi = arg;
@@ -177,7 +186,7 @@
 
   ## determine sizes
   if (nx < 2 || ny < 2)
-    error ("interp1: table too short");
+    error ("interp1: minimum of 2 points required in each dimension");
   endif
 
   ## check whether x is sorted; sort if not.
@@ -186,6 +195,10 @@
     y = y(p,:);
   endif
 
+  if (any (strcmp (method, {"previous", "*previous", "next", "*next"})))
+    rightcontinuous = NaN; # needed for these methods to work
+  endif
+
   if (isnan (rightcontinuous))
     ## If not specified, set the continuity condition
     if (x(end) < x(1))
@@ -193,15 +206,25 @@
     else
       rightcontinuous = true;
     endif
-  endif
-
-  if ((rightcontinuous && (x(end) < x(1)))
-      || (! rightcontinuous && (x(end) > x(1))))
+  elseif ((rightcontinuous && (x(end) < x(1)))
+          || (! rightcontinuous && (x(end) > x(1))))
     ## Switch between left-continuous and right-continuous
     x = flipud (x);
     y = flipud (y);
   endif
 
+  ## Because of the way mkpp works, it's easiest to implement "next"
+  ## by running "previous" with vectors flipped.
+  if (strcmp (method, "next"))
+    x = flipud (x);
+    y = flipud (y);
+    method = "previous";
+  elseif (strcmp (method, "*next"))
+    x = flipud (x);
+    y = flipud (y);
+    method = "*previous";
+  endif
+
   starmethod = method(1) == "*";
 
   if (starmethod)
@@ -215,7 +238,8 @@
           warning ("interp1: multiple discontinuities at the same X value");
         endif
       else
-        error ("interp1: discontinuities not supported for method '%s'", method);
+        error ("interp1: discontinuities not supported for method '%s'",
+                                                                   method);
       endif
     endif
   endif
@@ -238,6 +262,29 @@
       pp = mkpp ([x(1), x(1)+[0.5:(nx-1)]*dx, x(nx)],
                  shiftdim (y, 1), szy(2:end));
       pp.orient = "first";
+
+      if (ispp)
+        yi = pp;
+      else
+        yi = ppval (pp, reshape (xi, szx));
+      endif
+
+    case "previous"
+      pp = mkpp ([x(1:nx); 2*x(nx)-x(nx-1)],
+                 shiftdim (y, 1), szy(2:end));
+      pp.orient = "first";
+
+      if (ispp)
+        yi = pp;
+      else
+        yi = ppval (pp, reshape (xi, szx));
+      endif
+
+    case "*previous"
+      pp = mkpp (x(1)+[0:nx]*dx,
+                 shiftdim (y, 1), szy(2:end));
+      pp.orient = "first";
+
       if (ispp)
         yi = pp;
       else
@@ -323,7 +370,7 @@
 
   endswitch
 
-  if (! ispp && ! ischar (extrap))
+  if (! ispp && isnumeric (extrap))
     ## determine which values are out of range and set them to extrap,
     ## unless extrap == "extrap".
     minx = min (x(1), x(nx));
@@ -349,12 +396,13 @@
 %! clf;
 %! xf = 0:0.05:10;  yf = sin (2*pi*xf/5);
 %! xp = 0:10;       yp = sin (2*pi*xp/5);
-%! lin = interp1 (xp,yp,xf, "linear");
-%! spl = interp1 (xp,yp,xf, "spline");
-%! cub = interp1 (xp,yp,xf, "pchip");
-%! near= interp1 (xp,yp,xf, "nearest");
-%! plot (xf,yf,"r",xf,near,"g",xf,lin,"b",xf,cub,"c",xf,spl,"m",xp,yp,"r*");
-%! legend ("original", "nearest", "linear", "pchip", "spline");
+%! lin = interp1 (xp,yp,xf, 'linear');
+%! spl = interp1 (xp,yp,xf, 'spline');
+%! pch = interp1 (xp,yp,xf, 'pchip');
+%! near= interp1 (xp,yp,xf, 'nearest');
+%! plot (xf,yf,'r',xf,near,'g',xf,lin,'b',xf,pch,'c',xf,spl,'m',xp,yp,'r*');
+%! legend ('original', 'nearest', 'linear', 'pchip', 'spline');
+%! title ('Interpolation of continuous function sin (x) w/various methods');
 %! %--------------------------------------------------------
 %! % confirm that interpolated function matches the original
 
@@ -362,36 +410,50 @@
 %! clf;
 %! xf = 0:0.05:10;  yf = sin (2*pi*xf/5);
 %! xp = 0:10;       yp = sin (2*pi*xp/5);
-%! lin = interp1 (xp,yp,xf, "*linear");
-%! spl = interp1 (xp,yp,xf, "*spline");
-%! cub = interp1 (xp,yp,xf, "*cubic");
-%! near= interp1 (xp,yp,xf, "*nearest");
-%! plot (xf,yf,"r",xf,near,"g",xf,lin,"b",xf,cub,"c",xf,spl,"m",xp,yp,"r*");
-%! legend ("*original", "*nearest", "*linear", "*cubic", "*spline");
+%! lin = interp1 (xp,yp,xf, '*linear');
+%! spl = interp1 (xp,yp,xf, '*spline');
+%! pch = interp1 (xp,yp,xf, '*pchip');
+%! near= interp1 (xp,yp,xf, '*nearest');
+%! plot (xf,yf,'r',xf,near,'g',xf,lin,'b',xf,pch,'c',xf,spl,'m',xp,yp,'r*');
+%! legend ('*original', '*nearest', '*linear', '*pchip', '*spline');
+%! title ('Interpolation of continuous function sin (x) w/various *methods');
 %! %--------------------------------------------------------
 %! % confirm that interpolated function matches the original
 
 %!demo
 %! clf;
+%! fstep = @(x) x > 1;
+%! xf = 0:0.05:2;  yf = fstep (xf);
+%! xp = linspace (0,2,10);  yp = fstep (xp);
+%! pch = interp1 (xp,yp,xf, 'pchip');
+%! spl = interp1 (xp,yp,xf, 'spline');
+%! plot (xf,yf,'r',xf,pch,'b',xf,spl,'m',xp,yp,'r*');
+%! title ({'Interpolation of step function with discontinuity at x==1', ...
+%!         'Note: "pchip" is shape-preserving, "spline" (continuous 1st, 2nd derivatives) is not'});
+%! legend ('original', 'pchip', 'spline');
+
+%!demo
+%! clf;
 %! t = 0 : 0.3 : pi; dt = t(2)-t(1);
 %! n = length (t); k = 100; dti = dt*n/k;
 %! ti = t(1) + [0 : k-1]*dti;
 %! y = sin (4*t + 0.3) .* cos (3*t - 0.1);
-%! ddyc = diff (diff (interp1 (t,y,ti, "cubic")) ./dti)./dti;
-%! ddys = diff (diff (interp1 (t,y,ti, "spline"))./dti)./dti;
-%! ddyp = diff (diff (interp1 (t,y,ti, "pchip")) ./dti)./dti;
-%! plot (ti(2:end-1),ddyc,'g+', ti(2:end-1),ddys,'b*', ti(2:end-1),ddyp,'c^');
-%! legend ("cubic", "spline", "pchip");
-%! title ("Second derivative of interpolated 'sin (4*t + 0.3) .* cos (3*t - 0.1)'");
+%! ddys = diff (diff (interp1 (t,y,ti, 'spline'))./dti)./dti;
+%! ddyp = diff (diff (interp1 (t,y,ti, 'pchip')) ./dti)./dti;
+%! ddyc = diff (diff (interp1 (t,y,ti, 'cubic')) ./dti)./dti;
+%! plot (ti(2:end-1),ddys,'b*', ti(2:end-1),ddyp,'c^', ti(2:end-1),ddyc,'g+');
+%! title ({'Second derivative of interpolated "sin (4*t + 0.3) .* cos (3*t - 0.1)"', ...
+%!         'Note: "spline" has continous 2nd derivative, others do not'});
+%! legend ('spline', 'pchip', 'cubic');
 
 %!demo
 %! clf;
 %! xf = 0:0.05:10;                yf = sin (2*pi*xf/5) - (xf >= 5);
 %! xp = [0:.5:4.5,4.99,5:.5:10];  yp = sin (2*pi*xp/5) - (xp >= 5);
-%! lin = interp1 (xp,yp,xf, "linear");
-%! near= interp1 (xp,yp,xf, "nearest");
-%! plot (xf,yf,"r", xf,near,"g", xf,lin,"b", xp,yp,"r*");
-%! legend ("original", "nearest", "linear");
+%! lin = interp1 (xp,yp,xf, 'linear');
+%! near= interp1 (xp,yp,xf, 'nearest');
+%! plot (xf,yf,'r', xf,near,'g', xf,lin,'b', xp,yp,'r*');
+%! legend ('original', 'nearest', 'linear');
 %! %--------------------------------------------------------
 %! % confirm that interpolated function matches the original
 
@@ -412,7 +474,7 @@
 %! %--------------------------------------------------------
 %! % red curve is left-continuous and blue is right-continuous at x = 2
 
-##FIXME: add test for n-d arguments here
+##FIXME: add test for N-d arguments here
 
 ## For each type of interpolated test, confirm that the interpolated
 ## value at the knots match the values at the knots.  Points away
@@ -425,7 +487,7 @@
 %! xi = [-1, 0, 2.2, 4, 6.6, 10, 11];
 
 ## The following BLOCK/ENDBLOCK section is repeated for each style
-##    nearest, linear, cubic, spline, pchip
+##    nearest, previous, next, linear, cubic, spline, pchip
 ## The test for ppval of cubic has looser tolerance, but otherwise
 ## the tests are identical.
 ## Note that the block checks style and *style; if you add more tests
@@ -468,6 +530,78 @@
 %!error interp1 (1,1,1, style)
 ## ENDBLOCK
 
+%!test style = "previous";
+## BLOCK
+%!assert (interp1 (xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA])
+%!assert (interp1 (xp,yp,xp,style), yp, 100*eps)
+%!assert (interp1 (xp,yp,xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp,style), yp, 100*eps)
+%!assert (isempty (interp1 (xp',yp',[],style)))
+%!assert (isempty (interp1 (xp,yp,[],style)))
+%!assert (interp1 (xp,[yp',yp'],xi(:),style),...
+%!        [interp1(xp,yp,xi(:),style),interp1(xp,yp,xi(:),style)])
+## This test is expected to fail, so commented out.
+## "previous" and "next" options are not symmetric w.r.t to flipping xp,yp
+#%!assert (interp1 (xp,yp,xi,style),...
+#%!        interp1 (fliplr (xp),fliplr (yp),xi,style),100*eps)
+%!assert (ppval (interp1 (xp,yp,style,"pp"),xi),
+%!        interp1 (xp,yp,xi,style,"extrap"),10*eps)
+%!error interp1 (1,1,1, style)
+%!assert (interp1 (xp,[yp',yp'],xi,style),
+%!        interp1 (xp,[yp',yp'],xi,["*",style]),100*eps)
+%!test style = ["*",style];
+%!assert (interp1 (xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA])
+%!assert (interp1 (xp,yp,xp,style), yp, 100*eps)
+%!assert (interp1 (xp,yp,xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp,style), yp, 100*eps)
+%!assert (isempty (interp1 (xp',yp',[],style)))
+%!assert (isempty (interp1 (xp,yp,[],style)))
+%!assert (interp1 (xp,[yp',yp'],xi(:),style),...
+%!        [interp1(xp,yp,xi(:),style),interp1(xp,yp,xi(:),style)])
+#%!assert (interp1 (xp,yp,xi,style),...
+#%!        interp1 (fliplr (xp),fliplr (yp),xi,style),100*eps)
+%!assert (ppval (interp1 (xp,yp,style,"pp"),xi),
+%!        interp1 (xp,yp,xi,style,"extrap"),10*eps)
+%!error interp1 (1,1,1, style)
+## ENDBLOCK
+
+%!test style = "next";
+## BLOCK
+%!assert (interp1 (xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA])
+%!assert (interp1 (xp,yp,xp,style), yp, 100*eps)
+%!assert (interp1 (xp,yp,xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp,style), yp, 100*eps)
+%!assert (isempty (interp1 (xp',yp',[],style)))
+%!assert (isempty (interp1 (xp,yp,[],style)))
+%!assert (interp1 (xp,[yp',yp'],xi(:),style),...
+%!        [interp1(xp,yp,xi(:),style),interp1(xp,yp,xi(:),style)])
+#%!assert (interp1 (xp,yp,xi,style),...
+#%!        interp1 (fliplr (xp),fliplr (yp),xi,style),100*eps)
+%!assert (ppval (interp1 (xp,yp,style,"pp"),xi),
+%!        interp1 (xp,yp,xi,style,"extrap"),10*eps)
+%!error interp1 (1,1,1, style)
+%!assert (interp1 (xp,[yp',yp'],xi,style),
+%!        interp1 (xp,[yp',yp'],xi,["*",style]),100*eps)
+%!test style = ["*",style];
+%!assert (interp1 (xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA])
+%!assert (interp1 (xp,yp,xp,style), yp, 100*eps)
+%!assert (interp1 (xp,yp,xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp',style), yp', 100*eps)
+%!assert (interp1 (xp',yp',xp,style), yp, 100*eps)
+%!assert (isempty (interp1 (xp',yp',[],style)))
+%!assert (isempty (interp1 (xp,yp,[],style)))
+%!assert (interp1 (xp,[yp',yp'],xi(:),style),...
+%!        [interp1(xp,yp,xi(:),style),interp1(xp,yp,xi(:),style)])
+#%!assert (interp1 (xp,yp,xi,style),...
+#%!        interp1 (fliplr (xp),fliplr (yp),xi,style),100*eps)
+%!assert (ppval (interp1 (xp,yp,style,"pp"),xi),
+%!        interp1 (xp,yp,xi,style,"extrap"),10*eps)
+%!error interp1 (1,1,1, style)
+## ENDBLOCK
+
 %!test style = "linear";
 ## BLOCK
 %!assert (interp1 (xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA])
@@ -611,20 +745,27 @@
 ## ENDBLOCK
 ## ENDBLOCKTEST
 
-## test extrapolation (linear)
+## test extrapolation
 %!assert (interp1 ([1:5],[3:2:11],[0,6],"linear","extrap"), [1, 13], eps)
+%!assert (interp1 ([1:5],[3:2:11],[0,6],"nearest","extrap"), [3, 11], eps)
+%!assert (interp1 ([1:5],[3:2:11],[0,6],"previous","extrap"), [3, 11], eps)
+%!assert (interp1 ([1:5],[3:2:11],[0,6],"next","extrap"), [3, 11], eps)
 %!assert (interp1 (xp, yp, [-1, max(xp)+1],"linear",5), [5, 5])
 %!assert (interp1 ([0,1],[1,0],[0.1,0.9;0.2,1.1]), [0.9 0.1; 0.8 NA], eps)
 %!assert (interp1 ([0,1],[1,0],[0.1,0.9;0.2,1]), [0.9 0.1; 0.8 0], eps)
 
 ## Basic sanity checks
 %!assert (interp1 (1:2,1:2,1.4,"nearest"), 1)
+%!assert (interp1 (1:2,1:2,1.6,"previous"), 1)
+%!assert (interp1 (1:2,1:2,1.4,"next"), 2)
 %!assert (interp1 (1:2,1:2,1.4,"linear"), 1.4)
 %!assert (interp1 (1:4,1:4,1.4,"cubic"), 1.4)
 %!assert (interp1 (1:2,1:2,1.1,"spline"), 1.1)
 %!assert (interp1 (1:3,1:3,1.4,"spline"), 1.4)
 
 %!assert (interp1 (1:2:4,1:2:4,1.4,"*nearest"), 1)
+%!assert (interp1 (1:2:4,1:2:4,2.2,"*previous"), 1)
+%!assert (interp1 (1:2:4,1:2:4,1.4,"*next"), 3)
 %!assert (interp1 (1:2:4,1:2:4,[0,1,1.4,3,4],"*linear"), [NA,1,1.4,3,NA])
 %!assert (interp1 (1:2:8,1:2:8,1.4,"*cubic"), 1.4)
 %!assert (interp1 (1:2,1:2,1.3, "*spline"), 1.3)
@@ -639,15 +780,18 @@
 %!assert (interp1 ([1,2,2,3,4],[0,1,4,2,1],[-1,1.5,2,2.5,3.5], "linear", "extrap", "right"), [-2,0.5,4,3,1.5])
 %!assert (interp1 ([1,2,2,3,4],[0,1,4,2,1],[-1,1.5,2,2.5,3.5], "linear", "extrap", "left"), [-2,0.5,1,3,1.5])
 
-%% Test input validation
+## Test input validation
 %!error interp1 ()
 %!error interp1 (1,2,3,4,5,6,7)
-%!error <table too short> interp1 (1,1,1, "linear")
-%!error <table too short> interp1 (1,1,1, "*nearest")
-%!error <table too short> interp1 (1,1,1, "*linear")
+%!error <minimum of 2 points required> interp1 (1,1,1, "linear")
+%!error <minimum of 2 points required> interp1 (1,1,1, "*nearest")
+%!error <minimum of 2 points required> interp1 (1,1,1, "*linear")
+%!error <minimum of 2 points required> interp1 (1,1,1, "previous")
+%!error <minimum of 2 points required> interp1 (1,1,1, "*previous")
 %!warning <multiple discontinuities> interp1 ([1 1 1 2], [1 2 3 4], 1);
+%!error <discontinuities not supported> interp1 ([1 1],[1 2],1, "next")
 %!error <discontinuities not supported> interp1 ([1 1],[1 2],1, "pchip")
 %!error <discontinuities not supported> interp1 ([1 1],[1 2],1, "cubic")
 %!error <discontinuities not supported> interp1 ([1 1],[1 2],1, "spline")
-%!error <invalid method> interp1 (1:2,1:2,1, "bogus")
+%!error <invalid method 'bogus'> interp1 (1:2,1:2,1, "bogus")
 
--- a/scripts/general/interp2.m
+++ b/scripts/general/interp2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -19,137 +19,115 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{zi} =} interp2 (@var{x}, @var{y}, @var{z}, @var{xi}, @var{yi})
-## @deftypefnx {Function File} {@var{zi} =} interp2 (@var{Z}, @var{xi}, @var{yi})
-## @deftypefnx {Function File} {@var{zi} =} interp2 (@var{Z}, @var{n})
+## @deftypefnx {Function File} {@var{zi} =} interp2 (@var{z}, @var{xi}, @var{yi})
+## @deftypefnx {Function File} {@var{zi} =} interp2 (@var{z}, @var{n})
+## @deftypefnx {Function File} {@var{zi} =} interp2 (@var{z})
 ## @deftypefnx {Function File} {@var{zi} =} interp2 (@dots{}, @var{method})
-## @deftypefnx {Function File} {@var{zi} =} interp2 (@dots{}, @var{method}, @var{extrapval})
+## @deftypefnx {Function File} {@var{zi} =} interp2 (@dots{}, @var{method}, @var{extrap})
+##
+## Two-dimensional interpolation.
 ##
-## Two-dimensional interpolation.  @var{x}, @var{y} and @var{z} describe a
-## surface function.  If @var{x} and @var{y} are vectors their length
-## must correspondent to the size of @var{z}.  @var{x} and @var{y} must be
-## monotonic.  If they are matrices they must have the @code{meshgrid}
-## format.
-##
-## @table @code
-## @item interp2 (@var{x}, @var{y}, @var{Z}, @var{xi}, @var{yi}, @dots{})
-## Returns a matrix corresponding to the points described by the
-## matrices @var{xi}, @var{yi}.
+## Interpolate reference data @var{x}, @var{y}, @var{z} to determine @var{zi}
+## at the coordinates @var{xi}, @var{yi}.  The reference data @var{x}, @var{y}
+## can be matrices, as returned by @code{meshgrid}, in which case the sizes of
+## @var{x}, @var{y}, and @var{z} must be equal.  If @var{x}, @var{y} are
+## vectors describing a grid then @code{length (@var{x}) == columns (@var{z})}
+## and @code{length (@var{y}) == rows (@var{z})}.  In either case the input
+## data must be strictly monotonic.
 ##
-## If the last argument is a string, the interpolation method can
-## be specified.  The method can be @qcode{"linear"}, @qcode{"nearest"} or
-## @qcode{"cubic"}.  If it is omitted @qcode{"linear"} interpolation is
-## assumed.
+## If called without @var{x}, @var{y}, and just a single reference data matrix
+## @var{z}, the 2-D region
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})} is assumed.
+## This saves memory if the grid is regular and the distance between points is
+## not important.
 ##
-## @item interp2 (@var{z}, @var{xi}, @var{yi})
-## Assumes @code{@var{x} = 1:rows (@var{z})} and @code{@var{y} =
-## 1:columns (@var{z})}
+## If called with a single reference data matrix @var{z} and a refinement
+## value @var{n}, then perform interpolation over a grid where each original
+## interval has been recursively subdivided @var{n} times.  This results in
+## @code{2^@var{n}-1} additional points for every interval in the original
+## grid.  If @var{n} is omitted a value of 1 is used.  As an example, the
+## interval [0,1] with @code{@var{n}==2} results in a refined interval with
+## points at [0, 1/4, 1/2, 3/4, 1].
 ##
-## @item interp2 (@var{z}, @var{n})
-## Interleaves the matrix @var{z} n-times.  If @var{n} is omitted a value
-## of @code{@var{n} = 1} is assumed.
-## @end table
-##
-## The variable @var{method} defines the method to use for the
-## interpolation.  It can take one of the following values
+## The interpolation @var{method} is one of:
 ##
 ## @table @asis
 ## @item @qcode{"nearest"}
 ## Return the nearest neighbor.
 ##
-## @item @qcode{"linear"}
+## @item @qcode{"linear"} (default)
 ## Linear interpolation from nearest neighbors.
 ##
 ## @item @qcode{"pchip"}
-## Piecewise cubic Hermite interpolating polynomial.
+## Piecewise cubic Hermite interpolating polynomial---shape-preserving
+## interpolation with smooth first derivative.
 ##
 ## @item @qcode{"cubic"}
-## Cubic interpolation from four nearest neighbors.
+## Cubic interpolation (same as @qcode{"pchip"}).
 ##
 ## @item @qcode{"spline"}
 ## Cubic spline interpolation---smooth first and second derivatives
 ## throughout the curve.
 ## @end table
 ##
-## If a scalar value @var{extrapval} is defined as the final value, then
-## values outside the mesh as set to this value.  Note that in this case
-## @var{method} must be defined as well.  If @var{extrapval} is not
-## defined then NA is assumed.
-##
-## @seealso{interp1}
+## @var{extrap} is a scalar number.  It replaces values beyond the endpoints
+## with @var{extrap}.  Note that if @var{extrapval} is used, @var{method} must
+## be specified as well.  If @var{extrap} is omitted and the @var{method} is
+## @qcode{"spline"}, then the extrapolated values of the @qcode{"spline"} are
+## used.  Otherwise the default @var{extrap} value for any other @var{method}
+## is @qcode{"NA"}.
+## @seealso{interp1, interp3, interpn, meshgrid}
 ## @end deftypefn
 
-## Author:      Kai Habel <kai.habel@gmx.de>
-## 2005-03-02 Thomas Weber <weber@num.uni-sb.de>
-##     * Add test cases
-## 2005-03-02 Paul Kienzle <pkienzle@users.sf.net>
-##     * Simplify
-## 2005-04-23 Dmitri A. Sergatskov <dasergatskov@gmail.com>
-##     * Modified demo and test for new gnuplot interface
-## 2005-09-07 Hoxide <hoxide_dirac@yahoo.com.cn>
-##     * Add bicubic interpolation method
-##     * Fix the eat line bug when the last element of XI or YI is
-##       negative or zero.
-## 2005-11-26 Pierre Baldensperger <balden@libertysurf.fr>
-##     * Rather big modification (XI,YI no longer need to be
-##       "meshgridded") to be consistent with the help message
-##       above and for compatibility.
+function ZI = interp2 (varargin)
 
-function ZI = interp2 (varargin)
+  narginchk (1, 7);
+  nargs = nargin;
+
   Z = X = Y = XI = YI = n = [];
   method = "linear";
-  extrapval = NA;
+  extrap = [];
 
-  switch (nargin)
+  ## Check for method and extrap
+  if (nargs > 1 && ischar (varargin{end-1}))
+    if (! isnumeric (varargin{end}) || ! isscalar (varargin{end}))
+      error ("interp2: EXTRAP must be a numeric scalar");
+    endif
+    extrap = varargin{end};
+    method = varargin{end-1};
+    nargs -= 2;
+  elseif (ischar (varargin{end}))
+    method = varargin{end};
+    nargs--;
+  endif
+  if (method(1) == "*")
+    warning ("interp2: ignoring unsupported '*' flag to METHOD");
+    method(1) = [];
+  endif
+  method = validatestring (method, ...
+    {"nearest", "linear", "pchip", "cubic", "spline"});
+
+  ## Read numeric input
+  switch (nargs)
     case 1
       Z = varargin{1};
       n = 1;
     case 2
-      if (ischar (varargin{2}))
-        [Z, method] = deal (varargin{:});
-        n = 1;
-      else
-        [Z, n] = deal (varargin{:});
-      endif
+      [Z, n] = deal (varargin{1:nargs});
     case 3
-      if (ischar (varargin{3}))
-        [Z, n, method] = deal (varargin{:});
-      else
-        [Z, XI, YI] = deal (varargin{:});
-      endif
-    case 4
-      if (ischar (varargin{4}))
-        [Z, XI, YI, method] = deal (varargin{:});
-      else
-        [Z, n, method, extrapval] = deal (varargin{:});
-      endif
+      [Z, XI, YI] = deal (varargin{1:nargs});
     case 5
-      if (ischar (varargin{4}))
-        [Z, XI, YI, method, extrapval] = deal (varargin{:});
-      else
-        [X, Y, Z, XI, YI] = deal (varargin{:});
-      endif
-    case 6
-        [X, Y, Z, XI, YI, method] = deal (varargin{:});
-    case 7
-        [X, Y, Z, XI, YI, method, extrapval] = deal (varargin{:});
+      [X, Y, Z, XI, YI] = deal (varargin{1:nargs});
     otherwise
       print_usage ();
   endswitch
 
-  ## Type checking.
-  if (!ismatrix (Z))
-    error ("interp2: Z must be a matrix");
-  endif
-  if (!isempty (n) && !isscalar (n))
-    error ("interp2: N must be a scalar");
+  ## Type checking
+  if (! isnumeric (Z) || isscalar (Z) || ! ismatrix (Z) || ndims (Z) != 2)
+    error ("interp2: Z must be a 2-D matrix");
   endif
-  if (!ischar (method))
-    error ("interp2: METHOD must be a string");
-  endif
-  if (ischar (extrapval) || strcmp (extrapval, "extrap"))
-    extrapval = [];
-  elseif (!isscalar (extrapval))
-    error ("interp2: EXTRAPVAL must be a scalar");
+  if (! isempty (n) && ! (isscalar (n) && n >= 0 && n == fix (n)))
+    error ("interp2: N must be an integer >= 0");
   endif
 
   ## Define X, Y, XI, YI if needed
@@ -171,21 +149,32 @@
     error ("interp2: XI, YI must be numeric");
   endif
 
-
-  if (strcmp (method, "linear") || strcmp (method, "nearest") ...
-      || strcmp (method, "pchip"))
+  if (isvector (X) && isvector (Y))
+    X = X(:);  Y = Y(:);
+  elseif (size_equal (X, Y))
+    X = X(1,:).';  Y = Y(:,1);
+  else
+    error ("interp2: X and Y must be matrices of equal size");
+  endif
+  if (columns (Z) != length (X) || rows (Z) != length (Y))
+    error ("interp2: X and Y size must match the dimensions of Z");
+  endif
+  dx = diff (X);
+  if (all (dx < 0))
+    X = flipud (X);
+    Z = fliplr (Z);
+  elseif (any (dx <= 0))
+    error ("interp2: X must be strictly monotonic");
+  endif
+  dy = diff (Y);
+  if (all (dy < 0))
+    Y = flipud (Y);
+    Z = flipud (Z);
+  elseif (any (dy <= 0))
+    error ("interp2: Y must be strictly monotonic");
+  endif
 
-    ## If X and Y vectors produce a grid from them
-    if (isvector (X) && isvector (Y))
-      X = X(:); Y = Y(:);
-    elseif (size_equal (X, Y))
-      X = X(1,:)'; Y = Y(:,1);
-    else
-      error ("interp2: X and Y must be matrices of same size");
-    endif
-    if (columns (Z) != length (X) || rows (Z) != length (Y))
-      error ("interp2: X and Y size must match the dimensions of Z");
-    endif
+  if (any (strcmp (method, {"nearest", "linear", "pchip", "cubic"})))
 
     ## If Xi and Yi are vectors of different orientation build a grid
     if ((rows (XI) == 1 && columns (YI) == 1)
@@ -244,10 +233,11 @@
       idx = sub2ind (size (Z), yidx+jj, xidx+ii);
       ZI = Z(idx);
 
-    elseif (strcmp (method, "pchip"))
+    elseif (strcmp (method, "pchip") || strcmp (method, "cubic"))
 
       if (length (X) < 2 || length (Y) < 2)
-        error ("interp2: pchip2 requires at least 2 points in each dimension");
+        error ("interp2: %s requires at least 2 points in each dimension",
+               method);
       endif
 
       ## first order derivatives
@@ -303,121 +293,51 @@
 
     endif
 
-    if (! isempty (extrapval))
-      ## set points outside the table to 'extrapval'
-      if (X (1) < X (end))
-        if (Y (1) < Y (end))
-          ZI (XI < X(1,1) | XI > X(end) | YI < Y(1,1) | YI > Y(end)) = ...
-                  extrapval;
-        else
-          ZI (XI < X(1) | XI > X(end) | YI < Y(end) | YI > Y(1)) = ...
-                  extrapval;
-        endif
-      else
-        if (Y (1) < Y (end))
-          ZI (XI < X(end) | XI > X(1) | YI < Y(1) | YI > Y(end)) = ...
-                  extrapval;
-        else
-          ZI (XI < X(1,end) | XI > X(1) | YI < Y(end) | YI > Y(1)) = ...
-                  extrapval;
-        endif
-      endif
-    endif
-
   else
 
-    ## Check dimensions of X and Y
-    if (isvector (X) && isvector (Y))
-      X = X(:).';
-      Y = Y(:);
-      if (!isequal ([length(Y), length(X)], size(Z)))
-        error ("interp2: X and Y size must match the dimensions of Z");
-      endif
-    elseif (!size_equal (X, Y))
-      error ("interp2: X and Y must be matrices of equal size");
-      if (! size_equal (X, Z))
-        error ("interp2: X and Y size must match the dimensions of Z");
-      endif
-    endif
-
     ## Check dimensions of XI and YI
     if (isvector (XI) && isvector (YI) && ! size_equal (XI, YI))
-      XI = XI(:).';
-      YI = YI(:);
-      [XI, YI] = meshgrid (XI, YI);
+      XI = XI(:).';  YI = YI(:);
     elseif (! size_equal (XI, YI))
       error ("interp2: XI and YI must be matrices of equal size");
     endif
 
-    if (strcmp (method, "cubic"))
+    if (strcmp (method, "spline"))
       if (isgriddata (XI) && isgriddata (YI'))
-        ZI = bicubic (X, Y, Z, XI (1, :), YI (:, 1), extrapval);
-      elseif (isgriddata (X) && isgriddata (Y'))
-        ## Allocate output
-        ZI = zeros (size (X));
-
-        ## Find inliers
-        inside = !(XI < X (1) | XI > X (end) | YI < Y (1) | YI > Y (end));
-
-        ## Scale XI and YI to match indices of Z
-        XI = (columns (Z) - 1) * (XI - X (1)) / (X (end) - X (1)) + 1;
-        YI = (rows (Z) - 1) * (YI - Y (1)) / (Y (end) - Y (1)) + 1;
-
-        ## Start the real work
-        K = floor (XI);
-        L = floor (YI);
-
-        ## Coefficients
-        AY1  = bc ((YI - L + 1));
-        AX1  = bc ((XI - K + 1));
-        AY0  = bc ((YI - L + 0));
-        AX0  = bc ((XI - K + 0));
-        AY_1 = bc ((YI - L - 1));
-        AX_1 = bc ((XI - K - 1));
-        AY_2 = bc ((YI - L - 2));
-        AX_2 = bc ((XI - K - 2));
-
-        ## Perform interpolation
-        sz = size (Z);
-        ZI = AY_2 .* AX_2 .* Z (sym_sub2ind (sz, L+2, K+2)) ...
-           + AY_2 .* AX_1 .* Z (sym_sub2ind (sz, L+2, K+1)) ...
-           + AY_2 .* AX0  .* Z (sym_sub2ind (sz, L+2, K))   ...
-           + AY_2 .* AX1  .* Z (sym_sub2ind (sz, L+2, K-1)) ...
-           + AY_1 .* AX_2 .* Z (sym_sub2ind (sz, L+1, K+2)) ...
-           + AY_1 .* AX_1 .* Z (sym_sub2ind (sz, L+1, K+1)) ...
-           + AY_1 .* AX0  .* Z (sym_sub2ind (sz, L+1, K))   ...
-           + AY_1 .* AX1  .* Z (sym_sub2ind (sz, L+1, K-1)) ...
-           + AY0  .* AX_2 .* Z (sym_sub2ind (sz, L,   K+2)) ...
-           + AY0  .* AX_1 .* Z (sym_sub2ind (sz, L,   K+1)) ...
-           + AY0  .* AX0  .* Z (sym_sub2ind (sz, L,   K))   ...
-           + AY0  .* AX1  .* Z (sym_sub2ind (sz, L,   K-1)) ...
-           + AY1  .* AX_2 .* Z (sym_sub2ind (sz, L-1, K+2)) ...
-           + AY1  .* AX_1 .* Z (sym_sub2ind (sz, L-1, K+1)) ...
-           + AY1  .* AX0  .* Z (sym_sub2ind (sz, L-1, K))   ...
-           + AY1  .* AX1  .* Z (sym_sub2ind (sz, L-1, K-1));
-        ZI (!inside) = extrapval;
-
+        ZI = __splinen__ ({Y, X}, Z, {YI(:,1), XI(1,:)}, extrap, "spline");
       else
-        error ("interp2: input data must have 'meshgrid' format");
+        error ("interp2: XI, YI must have uniform spacing ('meshgrid' format)");
       endif
-
-    elseif (strcmp (method, "spline"))
-      if (isgriddata (XI) && isgriddata (YI'))
-        ZI = __splinen__ ({Y(:,1).', X(1,:)}, Z, {YI(:,1), XI(1,:)}, extrapval,
-                        "spline");
-      else
-        error ("interp2: input data must have 'meshgrid' format");
-      endif
-    else
-      error ("interp2: interpolation METHOD not recognized");
     endif
 
+    return; # spline doesn't need NA extrapolation value (MATLAB compatibility)
+
   endif
+
+  ## extrapolation 'extrap'
+  if (isempty (extrap))
+    extrap = NA;
+  endif
+
+  if (X(1) < X(end))
+    if (Y(1) < Y(end))
+      ZI(XI < X(1,1) | XI > X(end) | YI < Y(1,1) | YI > Y(end)) = extrap;
+    else
+      ZI(XI < X(1) | XI > X(end) | YI < Y(end) | YI > Y(1)) = extrap;
+    endif
+  else
+    if (Y(1) < Y(end))
+      ZI(XI < X(end) | XI > X(1) | YI < Y(1) | YI > Y(end)) = extrap;
+    else
+      ZI(XI < X(1,end) | XI > X(1) | YI < Y(end) | YI > Y(1)) = extrap;
+    endif
+  endif
+
 endfunction
 
 function b = isgriddata (X)
   d1 = diff (X, 1, 1);
-  b = all (d1 (:) == 0);
+  b = all (d1(:) == 0);
 endfunction
 
 ## Compute the bicubic interpolation coefficients
@@ -432,16 +352,16 @@
 
 ## This version of sub2ind behaves as if the data was symmetrically padded
 function ind = sym_sub2ind (sz, Y, X)
-  Y (Y < 1) = 1 - Y (Y < 1);
-  while (any (Y (:) > 2 * sz (1)))
-    Y (Y > 2 * sz (1)) = round (Y (Y > 2 * sz (1)) / 2);
+  Y(Y < 1) = 1 - Y(Y < 1);
+  while (any (Y(:) > 2*sz(1)))
+    Y(Y > 2*sz(1)) = round (Y(Y > 2*sz(1)) / 2);
   endwhile
-  Y (Y > sz (1)) = 1 + 2 * sz (1) - Y (Y > sz (1));
-  X (X < 1) = 1 - X (X < 1);
-  while (any (X (:) > 2 * sz (2)))
-    X (X > 2 * sz (2)) = round (X (X > 2 * sz (2)) / 2);
+  Y(Y > sz(1)) = 1 + 2*sz(1) - Y(Y > sz(1));
+  X(X < 1) = 1 - X(X < 1);
+  while (any (X(:) > 2*sz(2)))
+    X(X > 2 * sz(2)) = round (X(X > 2*sz(2)) / 2);
   endwhile
-  X (X > sz (2)) = 1 + 2 * sz (2) - X (X > sz (2));
+  X(X > sz(2)) = 1 + 2*sz(2) - X(X > sz(2));
   ind = sub2ind (sz, Y, X);
 endfunction
 
@@ -455,7 +375,7 @@
 %! yi = linspace (min (y), max (y), 26)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "linear"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -466,7 +386,7 @@
 %! yi = linspace (min (y), max (y), 41)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "linear"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -477,7 +397,7 @@
 %! yi = linspace (min (y), max (y), 26)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "nearest"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -488,9 +408,10 @@
 %! yi = linspace (min (y), max (y), 41)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "nearest"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
-%!demo
+## 'pchip' commented out since it is the same as 'cubic'
+%!#demo
 %! clf;
 %! colormap ("default");
 %! A = [13,-1,12;5,4,3;1,6,2];
@@ -499,9 +420,10 @@
 %! yi = linspace (min (y), max (y), 26)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "pchip"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
-%!demo
+## 'pchip' commented out since it is the same as 'cubic'
+%!#demo
 %! clf;
 %! colormap ("default");
 %! [x,y,A] = peaks (10);
@@ -510,7 +432,7 @@
 %! yi = linspace (min (y), max (y), 41)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "pchip"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -521,7 +443,7 @@
 %! yi = linspace (min (y), max (y), 26)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "cubic"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -532,7 +454,7 @@
 %! yi = linspace (min (y), max (y), 41)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "cubic"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -543,7 +465,7 @@
 %! yi = linspace (min (y), max (y), 26)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "spline"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
 %!demo
 %! clf;
@@ -554,68 +476,78 @@
 %! yi = linspace (min (y), max (y), 41)';
 %! mesh (xi,yi,interp2 (x,y,A,xi,yi, "spline"));
 %! [x,y] = meshgrid (x,y);
-%! hold on; plot3 (x(:),y(:),A(:),"b*"); hold off;
+%! hold on; plot3 (x,y,A,"b*"); hold off;
 
-%!test % simple test
+%!test  # simple test
 %! x = [1,2,3];
 %! y = [4,5,6,7];
 %! [X, Y] = meshgrid (x, y);
-%! Orig = X.^2 + Y.^3;
+%! orig = X.^2 + Y.^3;
 %! xi = [1.2,2, 1.5];
 %! yi = [6.2, 4.0, 5.0]';
 %!
-%! Expected = ...
+%! expected = ...
 %!   [243,   245.4,  243.9;
 %!     65.6,  68,     66.5;
 %!    126.6, 129,    127.5];
-%! Result = interp2 (x,y,Orig, xi, yi);
+%! result = interp2 (x,y,orig, xi, yi);
 %!
-%! assert (Result, Expected, 1000*eps);
+%! assert (result, expected, 1000*eps);
 
-%!test % 2^n form
+%!test  # 2^n refinement form
 %! x = [1,2,3];
 %! y = [4,5,6,7];
 %! [X, Y] = meshgrid (x, y);
-%! Orig = X.^2 + Y.^3;
+%! orig = X.^2 + Y.^3;
 %! xi = [1:0.25:3];  yi = [4:0.25:7]';
-%! Expected = interp2 (x,y,Orig, xi, yi);
-%! Result = interp2 (Orig, 2);
+%! expected = interp2 (x,y,orig, xi, yi);
+%! result = interp2 (orig, 2);
 %!
-%! assert (Result, Expected, 10*eps);
+%! assert (result, expected, 10*eps);
 
-%!test % matrix slice
+%!test  # matrix slice
 %! A = eye (4);
 %! assert (interp2 (A,[1:4],[1:4]), [1,1,1,1]);
 
-%!test % non-gridded XI,YI
+%!test  # non-gridded XI,YI
 %! A = eye (4);
 %! assert (interp2 (A,[1,2;3,4],[1,3;2,4]), [1,0;0,1]);
 
-%!test % for values outside of boundaries
+%!test  # for values outside of boundaries
 %! x = [1,2,3];
 %! y = [4,5,6,7];
 %! [X, Y] = meshgrid (x,y);
-%! Orig = X.^2 + Y.^3;
+%! orig = X.^2 + Y.^3;
 %! xi = [0,4];
 %! yi = [3,8]';
-%! assert (interp2 (x,y,Orig, xi, yi), [NA,NA;NA,NA]);
-%! assert (interp2 (x,y,Orig, xi, yi,"linear", 0), [0,0;0,0]);
+%! assert (interp2 (x,y,orig, xi, yi), [NA,NA;NA,NA]);
+%! assert (interp2 (x,y,orig, xi, yi,"linear", 0), [0,0;0,0]);
+%! assert (interp2 (x,y,orig, xi, yi,"linear", 2), [2,2;2,2]);
+%! assert (interp2 (x,y,orig, xi, yi,"spline", 2), [2,2;2,2]);
+%! assert (interp2 (x,y,orig, xi, yi,"linear", 0+1i), [0+1i,0+1i;0+1i,0+1i]);
+%! assert (interp2 (x,y,orig, xi, yi,"spline"), [27,43;512,528]);
 
-%!test % for values at boundaries
-%! A=[1,2;3,4];
-%! x=[0,1];
-%! y=[2,3]';
+
+%!test  # for values at boundaries
+%! A = [1,2;3,4];
+%! x = [0,1];
+%! y = [2,3]';
 %! assert (interp2 (x,y,A,x,y,"linear"), A);
 %! assert (interp2 (x,y,A,x,y,"nearest"), A);
 
-%!test % for Matlab-compatible rounding for 'nearest'
+%!test  # for Matlab-compatible rounding for 'nearest'
 %! X = meshgrid (1:4);
 %! assert (interp2 (X, 2.5, 2.5, "nearest"), 3);
 
+## re-order monotonically decreasing (bug #41838).
+%!assert (interp2 ([1 2 3], [3 2 1], magic (3), 2.5, 3), 3.5);
+%!assert (interp2 ([3 2 1], [1 2 3], magic (3), 1.5, 1), 3.5);
+
 %!shared z, zout, tol
 %! z = [1 3 5; 3 5 7; 5 7 9];
 %! zout = [1 2 3 4 5; 2 3 4 5 6; 3 4 5 6 7; 4 5 6 7 8; 5 6 7 8 9];
 %! tol = 2 * eps;
+%!
 %!assert (interp2 (z), zout, tol)
 %!assert (interp2 (z, "linear"), zout, tol)
 %!assert (interp2 (z, "pchip"), zout, tol)
@@ -630,3 +562,33 @@
 %!assert (interp2 (z, [2 3 1], [2 2 2], "cubic"), [5 7 3], 10 * tol)
 %!assert (interp2 (z, [2 3 1], [2 2 2], "spline"), [5 7 3], tol)
 
+## Test input validation
+%!error interp2 (1, 1, 1, 1, 1, 2)    #only 5 numeric inputs
+%!error interp2 (1, 1, 1, 1, 1, 2, 2) #only 5 numeric inputs
+%!error <Z must be a 2-D matrix> interp2 ({1})
+%!error <Z must be a 2-D matrix> interp2 (1,1,1)
+%!error <Z must be a 2-D matrix> interp2 (ones (2,2,2))
+%!error <N must be an integer .= 0> interp2 (ones (2), ones (2))
+%!error <N must be an integer .= 0> interp2 (ones (2), -1)
+%!error <N must be an integer .= 0> interp2 (ones (2), 1.5)
+%!warning <ignoring unsupported '\*' flag> interp2 (rand (3,3), 1, "*linear");
+%!error <EXTRAP must be a numeric scalar> interp2 (1, 1, 1, 1, 1, 'linear', {1})
+%!error <EXTRAP must be a numeric scalar> interp2 (1, 1, 1, 1, 1, 'linear', ones (2,2))
+%!error <EXTRAP must be a numeric scalar> interp2 (1, 1, 1, 1, 1, 'linear', "abc")
+%!error <EXTRAP must be a numeric scalar> interp2 (1, 1, 1, 1, 1, 'linear', "extrap")
+%!error <X, Y must be numeric matrices> interp2 ({1}, 1, ones (2), 1, 1)
+%!error <X, Y must be numeric matrices> interp2 (1, {1}, ones (2), 1, 1)
+%!error <XI, YI must be numeric> interp2 (1, 1, ones (2), {1}, 1)
+%!error <XI, YI must be numeric> interp2 (1, 1, ones (2), 1, {1})
+%!error <X and Y must be matrices of equal size> interp2 (ones(2,2), 1, ones (2), 1, 1)
+%!error <X and Y must be matrices of equal size> interp2 (ones(2,2), ones(2,3), ones (2), 1, 1)
+%!error <X and Y size must match the dimensions of Z> interp2 (1:3, 1:3, ones (3,2), 1, 1)
+%!error <X and Y size must match the dimensions of Z> interp2 (1:2, 1:2, ones (3,2), 1, 1)
+%!error <X must be strictly monotonic> interp2 ([1 0 2], 1:3, ones (3,3), 1, 1)
+%!error <Y must be strictly monotonic> interp2 (1:3, [1 0 2], ones (3,3), 1, 1)
+%!error <XI and YI must be matrices of equal size> interp2 (1:2, 1:2, ones (2), ones(2,2), 1)
+%!error <XI and YI must be matrices of equal size> interp2 (1:2, 1:2, ones (2), 1, ones(2,2))
+%!error <XI, YI must have uniform spacing> interp2 (1:2, 1:2, ones (2), [1 2 4], [1 2 3], "spline")
+%!error <XI, YI must have uniform spacing> interp2 (1:2, 1:2, ones (2), [1 2 3], [1 2 4], "spline")
+%!error interp2 (1, 1, 1, 1, 1, "foobar")
+
--- a/scripts/general/interp3.m
+++ b/scripts/general/interp3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -19,168 +19,248 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{vi} =} interp3 (@var{x}, @var{y}, @var{z}, @var{v}, @var{xi}, @var{yi}, @var{zi})
 ## @deftypefnx {Function File} {@var{vi} =} interp3 (@var{v}, @var{xi}, @var{yi}, @var{zi})
-## @deftypefnx {Function File} {@var{vi} =} interp3 (@var{v}, @var{m})
+## @deftypefnx {Function File} {@var{vi} =} interp3 (@var{v}, @var{n})
 ## @deftypefnx {Function File} {@var{vi} =} interp3 (@var{v})
 ## @deftypefnx {Function File} {@var{vi} =} interp3 (@dots{}, @var{method})
 ## @deftypefnx {Function File} {@var{vi} =} interp3 (@dots{}, @var{method}, @var{extrapval})
 ##
-## Perform 3-dimensional interpolation.  Each element of the 3-dimensional
-## array @var{v} represents a value at a location given by the parameters
-## @var{x}, @var{y}, and @var{z}.  The parameters @var{x}, @var{x}, and
-## @var{z} are either 3-dimensional arrays of the same size as the array
-## @var{v} in the @qcode{"meshgrid"} format or vectors.  The parameters
-## @var{xi}, etc. respect a similar format to @var{x}, etc., and they
-## represent the points at which the array @var{vi} is interpolated.
+## Three-dimensional interpolation.
+##
+## Interpolate reference data @var{x}, @var{y}, @var{z}, @var{v} to determine
+## @var{vi} at the coordinates @var{xi}, @var{yi}, @var{zi}.  The reference
+## data @var{x}, @var{y}, @var{z} can be matrices, as returned by
+## @code{meshgrid}, in which case the sizes of
+## @var{x}, @var{y}, @var{z}, and @var{v} must be equal.  If @var{x}, @var{y},
+## @var{z} are vectors describing a cubic grid then
+## @code{length (@var{x}) == columns (@var{v})},
+## @code{length (@var{y}) == rows (@var{v})},
+## and @code{length (@var{z}) == size (@var{v}, 3)}.  In either case the input
+## data must be strictly monotonic.
 ##
-## If @var{x}, @var{y}, @var{z} are omitted, they are assumed to be
-## @code{x = 1 : size (@var{v}, 2)}, @code{y = 1 : size (@var{v}, 1)} and
-## @code{z = 1 : size (@var{v}, 3)}.  If @var{m} is specified, then
-## the interpolation adds a point half way between each of the interpolation
-## points.  This process is performed @var{m} times.  If only @var{v} is
-## specified, then @var{m} is assumed to be @code{1}.
+## If called without @var{x}, @var{y}, @var{z}, and just a single reference
+## data matrix @var{v}, the 3-D region
+## @code{@var{x} = 1:columns (@var{v}), @var{y} = 1:rows (@var{v}),
+## @var{z} = 1:size (@var{v}, 3)} is assumed.
+## This saves memory if the grid is regular and the distance between points is
+## not important.
 ##
-## Method is one of:
+## If called with a single reference data matrix @var{v} and a refinement
+## value @var{n}, then perform interpolation over a 3-D grid where each original
+## interval has been recursively subdivided @var{n} times.  This results in
+## @code{2^@var{n}-1} additional points for every interval in the original
+## grid.  If @var{n} is omitted a value of 1 is used.  As an example, the
+## interval [0,1] with @code{@var{n}==2} results in a refined interval with
+## points at [0, 1/4, 1/2, 3/4, 1].
+##
+## The interpolation @var{method} is one of:
 ##
 ## @table @asis
 ## @item @qcode{"nearest"}
 ## Return the nearest neighbor.
 ##
-## @item @qcode{"linear"}
+## @item @qcode{"linear"} (default)
 ## Linear interpolation from nearest neighbors.
 ##
 ## @item @qcode{"cubic"}
-## Cubic interpolation from four nearest neighbors (not implemented yet).
+## Piecewise cubic Hermite interpolating polynomial---shape-preserving
+## interpolation with smooth first derivative (not implemented yet).
 ##
 ## @item @qcode{"spline"}
 ## Cubic spline interpolation---smooth first and second derivatives
 ## throughout the curve.
 ## @end table
 ##
-## The default method is @qcode{"linear"}.
-##
-## If @var{extrap} is the string @qcode{"extrap"}, then extrapolate values
-## beyond the endpoints.  If @var{extrap} is a number, replace values beyond
-## the endpoints with that number.  If @var{extrap} is missing, assume NA.
-## @seealso{interp1, interp2, spline, meshgrid}
+## @var{extrapval} is a scalar number.  It replaces values beyond the endpoints
+## with @var{extrapval}.  Note that if @var{extrapval} is used, @var{method}
+## must be specified as well.  If @var{extrapval} is omitted and the
+## @var{method} is @qcode{"spline"}, then the extrapolated values of the
+## @qcode{"spline"} are used.  Otherwise the default @var{extrapval} value for
+## any other @var{method} is @qcode{"NA"}.
+## @seealso{interp1, interp2, interpn, meshgrid}
 ## @end deftypefn
 
+## FIXME: Need to add support for 'cubic' method (maybe change interpn).
+
 function vi = interp3 (varargin)
+
+  narginchk (1,9);
+
   method = "linear";
-  extrapval = NA;
+  extrapval = [];
   nargs = nargin;
 
   if (nargin < 1 || ! isnumeric (varargin{1}))
     print_usage ();
   endif
 
-  if (ischar (varargin{end}))
-    method = varargin{end};
-    nargs = nargs - 1;
-  elseif (nargs > 1 && ischar (varargin{end - 1}))
+  if (nargs > 1 && ischar (varargin{end-1}))
     if (! isnumeric (varargin{end}) || ! isscalar (varargin{end}))
-      error ("interp3: extrapal is expected to be a numeric scalar");
+      error ("interp3: EXTRAPVAL must be a numeric scalar");
     endif
     extrapval = varargin{end};
     method = varargin{end-1};
-    nargs = nargs - 2;
+    nargs -= 2;
+  elseif (ischar (varargin{end}))
+    method = varargin{end};
+    nargs--;
   endif
 
-  if (nargs < 3 || (nargs == 4 && ! isvector (varargin{1})
-                    && nargs == (ndims (varargin{1}) + 1)))
+  if (method(1) == "*")
+    warning ("interp3: ignoring unsupported '*' flag to METHOD");
+    method(1) = [];
+  endif
+  method = validatestring (method, ...
+    {"nearest", "linear", "cubic", "spline"});
+
+  if (nargs < 3)
+    ## Calling form interp3 (v) OR interp3 (v, n)
     v = varargin{1};
     if (ndims (v) != 3)
-      error ("interp3: expect 3-dimensional array of values");
+      error ("interp3: V must be a 3-D array of values");
+    endif
+    n = varargin(2:nargs);
+    v = permute (v, [2, 1, 3]);
+    if (isempty (extrapval))
+      vi = interpn (v, n{:}, method);
+    else
+      vi = interpn (v, n{:}, method, extrapval);
     endif
-    x = varargin (2:nargs);
-    if (any (! cellfun (@isvector, x)))
-      for i = 2 : 3
-        if (! size_equal (x{1}, x{i}))
-          error ("interp3: dimensional mismatch");
-        endif
-        x{i} = permute (x{i}, [2, 1, 3]);
+    vi = ipermute (vi, [2, 1, 3]);
+
+  elseif (nargs == 4 && ! isvector (varargin{1}))
+    ## Calling form interp3 (v, xi, yi, zi)
+    v = varargin{1};
+    if (ndims (v) != 3)
+      error ("interp3: V must be a 3-D array of values");
+    endif
+    xi = varargin(2:4);
+    if (any (! cellfun (@isvector, xi)))
+      ## Meshgridded values rather than vectors
+      if (! size_equal (xi{:}))
+        error ("interp3: XI, YI, and ZI dimensions must be equal");
+      endif
+      for i = 1 : 3
+        xi{i} = permute (xi{i}, [2, 1, 3]);
       endfor
-      x{1} = permute (x{1}, [2, 1, 3]);
     endif
     v = permute (v, [2, 1, 3]);
-    vi = ipermute (interpn (v, x{:}, method, extrapval), [2, 1, 3]);
-  elseif (nargs == 7 && nargs == (2 * ndims (varargin{ceil (nargs / 2)})) + 1)
+    if (isempty (extrapval))
+      vi = interpn (v, xi{:}, method);
+    else
+      vi = interpn (v, xi{:}, method, extrapval);
+    endif
+    vi = ipermute (vi, [2, 1, 3]);
+
+  elseif (nargs == 7)
+    ## Calling form interp3 (x, y, z, v, xi, yi, zi)
     v = varargin{4};
     if (ndims (v) != 3)
-      error ("interp3: expect 3-dimensional array of values");
+      error ("interp3: V must be a 3-D array of values");
     endif
-    x = varargin (1:3);
+    x = varargin(1:3);
     if (any (! cellfun (@isvector, x)))
-      for i = 2 : 3
-        if (! size_equal (x{1}, x{i}) || ! size_equal (x{i}, v))
-          error ("interp3: dimensional mismatch");
-        endif
+      ## Meshgridded values rather than vectors
+      if (! size_equal (x{:}, v))
+        error ("interp3: X, Y, Z, and V dimensions must be equal");
+      endif
+      for i = 1 : 3
         x{i} = permute (x{i}, [2, 1, 3]);
       endfor
-      x{1} = permute (x{1}, [2, 1, 3]);
     endif
-    y = varargin (5:7);
-    if (any (! cellfun (@isvector, y)))
-      for i = 2 : 3
-        if (! size_equal (y{1}, y{i}))
-          error ("interp3: dimensional mismatch");
-        endif
-        y{i} = permute (y{i}, [2, 1, 3]);
+    xi = varargin(5:7);
+    if (any (! cellfun (@isvector, xi)))
+      ## Meshgridded values rather than vectors
+      if (! size_equal (xi{:}))
+        error ("interp3: XI, YI, and ZI dimensions must be equal");
+      endif
+      for i = 1 : 3
+        xi{i} = permute (xi{i}, [2, 1, 3]);
       endfor
-      y{1} = permute (y{1}, [2, 1, 3]);
     endif
     v = permute (v, [2, 1, 3]);
-    vi = ipermute (interpn (x{:}, v, y{:}, method, extrapval), [2, 1, 3]);
+    if (isempty (extrapval))
+      vi = interpn (x{:}, v, xi{:}, method);
+    else
+      vi = interpn (x{:}, v, xi{:}, method, extrapval);
+    endif
+    vi = ipermute (vi, [2, 1, 3]);
+
   else
     error ("interp3: wrong number or incorrectly formatted input arguments");
   endif
+
 endfunction
 
 
-%!test
-%! x = y = z = -1:1; y = y + 2;
+## FIXME: Need some demo blocks here to show off the function like interp2.m.
+
+%!test  # basic test
+%! x = y = z = -1:1;  y = y + 2;
 %! f = @(x,y,z) x.^2 - y - z.^2;
 %! [xx, yy, zz] = meshgrid (x, y, z);
 %! v = f (xx,yy,zz);
-%! xi = yi = zi = -1:0.5:1; yi = yi + 2.1;
+%! xi = yi = zi = -1:0.5:1;  yi = yi + 2.1;
 %! [xxi, yyi, zzi] = meshgrid (xi, yi, zi);
 %! vi = interp3 (x, y, z, v, xxi, yyi, zzi);
 %! [xxi, yyi, zzi] = ndgrid (yi, xi, zi);
 %! vi2 = interpn (y, x, z, v, xxi, yyi, zzi);
-%! tol = 10 * eps;
-%! assert (vi, vi2, tol);
+%! assert (vi, vi2, 10*eps);
 
-%!test
-%! x=z=1:2; y=1:3;xi=zi=.6:1.6; yi=1; v=ones([3,2,2]);  v(:,2,1)=[7 ;5;4];  v(:,1,2)=[2 ;3;5];
+%!test  # meshgridded xi, yi, zi
+%! x = z = 1:2;  y = 1:3;
+%! v = ones ([3,2,2]);  v(:,2,1) = [7;5;4];  v(:,1,2) = [2;3;5];
+%! xi = zi = .6:1.6;  yi = 1;
 %! [xxi3, yyi3, zzi3] = meshgrid (xi, yi, zi);
 %! [xxi, yyi, zzi] = ndgrid (yi, xi, zi);
 %! vi = interp3 (x, y, z, v, xxi3, yyi3, zzi3, "nearest");
-%! vi2 = interpn (y, x, z, v, xxi, yyi, zzi,"nearest");
+%! vi2 = interpn (y, x, z, v, xxi, yyi, zzi, "nearest");
 %! assert (vi, vi2);
 
-%!test
-%! x=z=1:2; y=1:3;xi=zi=.6:1.6; yi=1; v=ones([3,2,2]);  v(:,2,1)=[7 ;5;4];  v(:,1,2)=[2 ;3;5];
-%! vi = interp3 (x, y, z, v, xi+1, yi, zi, "nearest",3);
-%! vi2 = interpn (y, x, z, v, yi, xi+1, zi,"nearest", 3);
-%! assert (vi, vi2);
-
-%!test
-%! x=z=1:2; y=1:3;xi=zi=.6:1.6; yi=1; v=ones([3,2,2]);  v(:,2,1)=[7 ;5;4];  v(:,1,2)=[2 ;3;5];
+%!test  # vector xi, yi, zi
+%! x = z = 1:2;  y = 1:3;
+%! v = ones ([3,2,2]);  v(:,2,1) = [7;5;4];  v(:,1,2) = [2;3;5];
+%! xi = zi = .6:1.6;  yi = 1;
 %! vi = interp3 (x, y, z, v, xi, yi, zi, "nearest");
 %! vi2 = interpn (y, x, z, v, yi, xi, zi,"nearest");
 %! assert (vi, vi2);
 
-%!test
-%! x=z=1:2; y=1:3;xi=zi=.6:1.6; yi=1; v=ones([3,2,2]);  v(:,2,1)=[7 ;5;4];  v(:,1,2)=[2 ;3;5];
-%! vi = interp3 (v, xi, yi, zi, "nearest",3);
-%! vi2 = interpn (v, yi, xi, zi,"nearest", 3);
+%!test  # vector xi+1 with extrap value
+%! x = z = 1:2;  y = 1:3;
+%! v = ones ([3,2,2]);  v(:,2,1) = [7;5;4];  v(:,1,2) = [2;3;5];
+%! xi = zi = .6:1.6;  yi = 1;
+%! vi = interp3 (x, y, z, v, xi+1, yi, zi, "nearest", 3);
+%! vi2 = interpn (y, x, z, v, yi, xi+1, zi, "nearest", 3);
 %! assert (vi, vi2);
 
-%!test
-%! xi=zi=.6:1.6; yi=1; v=ones([3,2,2]);  v(:,2,1)=[7 ;5;4];  v(:,1,2)=[2 ;3;5];
+%!test  # input value matrix--no x,y,z
+%! x = z = 1:2;  y = 1:3;
+%! v = ones ([3,2,2]);  v(:,2,1) = [7;5;4];  v(:,1,2) = [2;3;5];
+%! xi = zi = .6:1.6;  yi = 1;
 %! vi = interp3 (v, xi, yi, zi, "nearest");
 %! vi2 = interpn (v, yi, xi, zi,"nearest");
 %! assert (vi, vi2);
 
+%!test  # input value matrix--no x,y,z, with extrap value
+%! x = z = 1:2;  y = 1:3;
+%! v = ones ([3,2,2]);  v(:,2,1) = [7;5;4];  v(:,1,2) = [2;3;5];
+%! xi = zi = .6:1.6;  yi = 1;
+%! vi = interp3 (v, xi, yi, zi, "nearest", 3);
+%! vi2 = interpn (v, yi, xi, zi, "nearest", 3);
+%! assert (vi, vi2);
+
+%!test # extrapolation
+%! X=[0,0.5,1]; Y=X; Z=X;
+%! V = zeros (3,3,3);
+%! V(:,:,1) = [1 3 5; 3 5 7; 5 7 9];
+%! V(:,:,2) = V(:,:,1) + 2;
+%! V(:,:,3) = V(:,:,2) + 2;
+%! tol = 10 * eps;
+%! x=[-0.1,0,0.1]; y=x; z=x;
+%! assert(interp3(X,Y,Z,V,x,y,z,"spline"), [-0.2, 1.0, 2.2]',tol);
+%! assert(interp3(X,Y,Z,V,x,y,z,"linear"), [NA, 1.0, 2.2]',tol);
+%! assert(interp3(X,Y,Z,V,x,y,z,"spline", 0), [0, 1.0, 2.2]',tol);
+%! assert(interp3(X,Y,Z,V,x,y,z,"linear", 0), [0, 1.0, 2.2]',tol);
+
 %!shared z, zout, tol
 %! z = zeros (3, 3, 3);
 %! zout = zeros (5, 5, 5);
@@ -195,7 +275,21 @@
 %!                  5 6 7 8 9] + (n-1);
 %! end
 %! tol = 10 * eps;
+%!
 %!assert (interp3 (z), zout, tol)
 %!assert (interp3 (z, "linear"), zout, tol)
 %!assert (interp3 (z, "spline"), zout, tol)
 
+## Test input validation
+%!error interp3 ()
+%!error interp3 ({1})
+%!error <EXTRAPVAL must be a numeric scalar> interp3 (1,2,3,4,1,2,3,"linear", {1})
+%!error <EXTRAPVAL must be a numeric scalar> interp3 (1,2,3,4,1,2,3,"linear", ones (2,2))
+%!warning <ignoring unsupported '\*' flag> interp3 (rand (3,3,3), 1, "*linear");
+%!error <V must be a 3-D array> interp3 (rand (2,2))
+%!error <V must be a 3-D array> interp3 (rand (2,2), 1,1,1)
+%!error <XI, YI, and ZI dimensions must be equal> interp3 (rand (2,2,2), 1,1, ones (2,2))
+%!error <V must be a 3-D array> interp3 (1:2, 1:2, 1:2, rand (2,2), 1,1,1)
+%!error <X, Y, Z, and V dimensions must be equal> interp3 (ones(1,2,2), ones(2,2,2), ones(2,2,2), rand (2,2,2), 1,1,1)
+%!error <XI, YI, and ZI dimensions must be equal> interp3 (1:2, 1:2, 1:2, rand (2,2,2), 1,1, ones (2,2))
+
--- a/scripts/general/interpft.m
+++ b/scripts/general/interpft.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -120,19 +120,19 @@
 %!assert (interpft (y', n), y', 20*eps);
 %!assert (interpft ([y,y],n), [y,y], 20*eps);
 
-%% Test case with complex input from bug #39566
+## Test case with complex input from bug #39566
 %!test
 %! x = (1 + j) * [1:4]';
 %! y = ifft ([15 + 15*j; -6; -1.5 - 1.5*j; 0; -1.5 - 1.5*j; -6*j]);
 %! assert (interpft (x, 6), y, 10*eps);
 
-%% Test for correct spectral symmetry with even/odd lengths
+## Test for correct spectral symmetry with even/odd lengths
 %!assert (max (abs (imag (interpft ([1:8], 20)))), 0, 20*eps);
 %!assert (max (abs (imag (interpft ([1:8], 21)))), 0, 21*eps);
 %!assert (max (abs (imag (interpft ([1:9], 20)))), 0, 20*eps);
 %!assert (max (abs (imag (interpft ([1:9], 21)))), 0, 21*eps);
 
-%% Test input validation
+## Test input validation
 %!error interpft ()
 %!error interpft (1)
 %!error interpft (1,2,3)
--- a/scripts/general/interpn.m
+++ b/scripts/general/interpn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -39,17 +39,21 @@
 ## points.  This process is performed @var{m} times.  If only @var{v} is
 ## specified, then @var{m} is assumed to be @code{1}.
 ##
-## Method is one of:
+## The interpolation @var{method} is one of:
 ##
 ## @table @asis
 ## @item @qcode{"nearest"}
 ## Return the nearest neighbor.
 ##
-## @item @qcode{"linear"}
+## @item @qcode{"linear"} (default)
 ## Linear interpolation from nearest neighbors.
 ##
+## @item @qcode{"pchip"}
+## Piecewise cubic Hermite interpolating polynomial---shape-preserving
+## interpolation with smooth first derivative (not implemented yet).
+##
 ## @item @qcode{"cubic"}
-## Cubic interpolation from four nearest neighbors (not implemented yet).
+## Cubic interpolation (same as @qcode{"pchip"} [not implemented yet]).
 ##
 ## @item @qcode{"spline"}
 ## Cubic spline interpolation---smooth first and second derivatives
@@ -58,34 +62,44 @@
 ##
 ## The default method is @qcode{"linear"}.
 ##
-## If @var{extrapval} is the scalar value, use it to replace the values
-## beyond the endpoints with that number.  If @var{extrapval} is missing,
-## assume NA.
-## @seealso{interp1, interp2, spline, ndgrid}
+## @var{extrapval} is a scalar number.  It replaces values beyond the endpoints
+## with @var{extrapval}.  Note that if @var{extrapval} is used, @var{method}
+## must be specified as well.  If @var{extrapval} is omitted and the
+## @var{method} is @qcode{"spline"}, then the extrapolated values of the
+## @qcode{"spline"} are used.  Otherwise the default @var{extrapval} value for
+## any other @var{method} is @qcode{"NA"}.
+## @seealso{interp1, interp2, interp3, spline, ndgrid}
 ## @end deftypefn
 
 function vi = interpn (varargin)
 
   method = "linear";
-  extrapval = NA;
+  extrapval = [];
   nargs = nargin;
 
   if (nargin < 1 || ! isnumeric (varargin{1}))
     print_usage ();
   endif
 
-  if (ischar (varargin{end}))
-    method = varargin{end};
-    nargs -= 1;
-  elseif (nargs > 1 && ischar (varargin{end - 1}))
+  if (nargs > 1 && ischar (varargin{end-1}))
     if (! isnumeric (varargin{end}) || ! isscalar (varargin{end}))
-      error ("interpn: extrapal is expected to be a numeric scalar");
+      error ("interpn: EXTRAPVAL must be a numeric scalar");
     endif
-    method = varargin{end - 1};
     extrapval = varargin{end};
+    method = varargin{end-1};
     nargs -= 2;
+  elseif (ischar (varargin{end}))
+    method = varargin{end};
+    nargs--;
   endif
 
+  if (method(1) == "*")
+    warning ("interpn: ignoring unsupported '*' flag to METHOD");
+    method(1) = [];
+  endif
+  method = validatestring (method, ...
+    {"nearest", "linear", "pchip", "cubic", "spline"});
+
   if (nargs < 3)
     v = varargin{1};
     m = 1;
@@ -154,6 +168,9 @@
 
   if (strcmp (method, "linear"))
     vi = __lin_interpn__ (x{:}, v, y{:});
+    if (isempty (extrapval))
+      extrapval = NA;
+    endif
     vi(isna (vi)) = extrapval;
   elseif (strcmp (method, "nearest"))
     yshape = size (y{1});
@@ -164,13 +181,17 @@
     endfor
     idx = cell (1,nd);
     for i = 1 : nd
-      idx{i} = yidx{i} + (y{i} - x{i}(yidx{i})(:) >= x{i}(yidx{i} + 1)(:) - y{i});
+      idx{i} = yidx{i} ...
+               + (y{i} - x{i}(yidx{i})(:) >= x{i}(yidx{i} + 1)(:) - y{i});
     endfor
     vi = v(sub2ind (sz, idx{:}));
     idx = zeros (prod (yshape), 1);
     for i = 1 : nd
       idx |= y{i} < min (x{i}(:)) | y{i} > max (x{i}(:));
     endfor
+    if (isempty (extrapval))
+      extrapval = NA;
+    endif
     vi(idx) = extrapval;
     vi = reshape (vi, yshape);
   elseif (strcmp (method, "spline"))
@@ -318,3 +339,6 @@
 %! assert (interpn (z, "linear"), zout, tol);
 %! assert (interpn (z, "spline"), zout, tol);
 
+## Test input validation
+%!warning <ignoring unsupported '\*' flag> interpn (rand (3,3), 1, "*linear");
+
deleted file mode 100644
--- a/scripts/general/isa.m
+++ /dev/null
@@ -1,110 +0,0 @@
-## Copyright (C) 2004-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} isa (@var{obj}, @var{classname})
-## Return true if @var{obj} is an object from the class @var{classname}.
-##
-## @var{classname} may also be one of the following class categories:
-##
-## @table @asis
-## @item @qcode{"float"}
-## Floating point value comprising classes @qcode{"double"} and
-## @qcode{"single"}.
-##
-## @item @qcode{"integer"}
-## Integer value comprising classes (u)int8, (u)int16, (u)int32, (u)int64.
-##
-## @item @qcode{"numeric"}
-## Numeric value comprising either a floating point or integer value.
-## @end table
-## @seealso{class, typeinfo}
-## @end deftypefn
-
-## Author: Paul Kienzle <pkienzle@users.sf.net>
-## Adapted-by: jwe
-
-function retval = isa (obj, classname)
-
-  if (nargin != 2)
-    print_usage ();
-  endif
-
-  if (strcmp (classname, "float"))
-    retval = isfloat (obj);
-  elseif (strcmp (classname, "integer"))
-    retval = isinteger (obj);
-  elseif (strcmp (classname, "numeric"))
-    retval = isnumeric (obj);
-  else
-    class_of_obj = class (obj);
-    retval = strcmp (class_of_obj, classname);
-    if (! retval && isobject (obj))
-      retval = __isa_parent__ (obj, classname);
-    endif
-  endif
-
-endfunction
-
-
-%!assert (isa ("char", "float"), false)
-%!assert (isa (logical (1), "float"), false)
-%!assert (isa (double (13), "float"), true)
-%!assert (isa (single (13), "float"), true)
-%!assert (isa (int8 (13), "float"), false)
-%!assert (isa (int16 (13), "float"), false)
-%!assert (isa (int32 (13), "float"), false)
-%!assert (isa (int64 (13), "float"), false)
-%!assert (isa (uint8 (13), "float"), false)
-%!assert (isa (uint16 (13), "float"), false)
-%!assert (isa (uint32 (13), "float"), false)
-%!assert (isa (uint64 (13), "float"), false)
-%!assert (isa ("char", "numeric"), false)
-%!assert (isa (logical (1), "numeric"), false)
-%!assert (isa (double (13), "numeric"), true)
-%!assert (isa (single (13), "numeric"), true)
-%!assert (isa (int8 (13), "numeric"), true)
-%!assert (isa (int16 (13), "numeric"), true)
-%!assert (isa (int32 (13), "numeric"), true)
-%!assert (isa (int64 (13), "numeric"), true)
-%!assert (isa (uint8 (13), "numeric"), true)
-%!assert (isa (uint16 (13), "numeric"), true)
-%!assert (isa (uint32 (13), "numeric"), true)
-%!assert (isa (uint64 (13), "numeric"), true)
-%!assert (isa (uint8 (13), "integer"), true)
-%!assert (isa (double (13), "integer"), false)
-%!assert (isa (single (13), "integer"), false)
-
-%!assert (isa (double (13), "double"))
-%!assert (isa (single (13), "single"))
-%!assert (isa (int8 (13), "int8"))
-%!assert (isa (int16 (13), "int16"))
-%!assert (isa (int32 (13), "int32"))
-%!assert (isa (int64 (13), "int64"))
-%!assert (isa (uint8 (13), "uint8"))
-%!assert (isa (uint16 (13), "uint16"))
-%!assert (isa (uint32 (13), "uint32"))
-%!assert (isa (uint64 (13), "uint64"))
-%!assert (isa ("string", "char"))
-%!assert (isa (true, "logical"))
-%!assert (isa (false, "logical"))
-%!assert (isa ({1, 2}, "cell"))
-%!test
-%! a.b = 1;
-%! assert (isa (a, "struct"));
-
deleted file mode 100644
--- a/scripts/general/iscolumn.m
+++ /dev/null
@@ -1,56 +0,0 @@
-## Copyright (C) 2012-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} iscolumn (@var{x})
-## Return true if @var{x} is a column vector.
-## @seealso{isrow, isscalar, isvector, ismatrix}
-## @end deftypefn
-
-## Author: Rik Wehbring
-
-function retval = iscolumn (x)
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  sz = size (x);
-  retval = (ndims (x) == 2 && (sz(2) == 1));
-
-endfunction
-
-
-%!assert (iscolumn ([1, 2, 3]), false)
-%!assert (iscolumn ([1; 2; 3]))
-%!assert (iscolumn (1))
-%!assert (iscolumn ([]), false)
-%!assert (iscolumn ([1, 2; 3, 4]), false)
-
-%!assert (iscolumn ("t"))
-%!assert (iscolumn ("test"), false)
-%!assert (iscolumn (["test"; "ing"]), false)
-
-%!test
-%! s.a = 1;
-%! assert (iscolumn (s));
-
-%% Test input validation
-%!error iscolumn ()
-%!error iscolumn ([1, 2], 2)
-
--- a/scripts/general/isdir.m
+++ b/scripts/general/isdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Alois Schloegl
+## Copyright (C) 2004-2015 Alois Schloegl
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/isequal.m
+++ b/scripts/general/isequal.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2005-2015 William Poetra Yoga Hadisoeseno
 ##
 ## This file is part of Octave.
 ##
@@ -33,53 +33,133 @@
 endfunction
 
 
+## test empty input
+%!assert (isequal ([], []), true)
+%!assert (isequal ([], [], 1), false)
+%!assert (isequal ([], 1, []), false)
+%!assert (isequal (1, [], []), false)
+%!assert (isequal (1, [], []), false)
+
 ## test size and shape
-%!assert (isequal ([1,2,3,4],[1,2,3,4]), true)
-%!assert (isequal ([1;2;3;4],[1;2;3;4]), true)
-%!assert (isequal ([1,2,3,4],[1;2;3;4]), false)
-%!assert (isequal ([1,2,3,4],[1,2;3,4]), false)
-%!assert (isequal ([1,2,3,4],[1,3;2,4]), false)
+%!assert (isequal ([1,2,3,4], [1,2,3,4]), true)
+%!assert (isequal ([1;2;3;4], [1;2;3;4]), true)
+%!assert (isequal ([1,2,3,4], [1;2;3;4]), false)
+%!assert (isequal ([1,2,3,4], [1,2;3,4]), false)
+%!assert (isequal ([1,2,3,4], [1,3;2,4]), false)
 
 %!test
 %! A = 1:8;
 %! B = reshape (A, 2, 2, 2);
 %! assert (isequal (A, B), false);
-
 %!test
 %! A = reshape (1:8, 2, 2, 2);
 %! B = A;
 %! assert (isequal (A, B), true);
-
 %!test
 %! A = reshape (1:8, 2, 4);
 %! B = reshape (A, 2, 2, 2);
 %! assert (isequal (A, B), false);
 
-## test for equality
-%!assert (isequal ([1,2,3,4],[1,2,3,4]), true)
-%!assert (isequal (['a','b','c','d'],['a','b','c','d']), true)
-## Test multi-line strings
-%!assert (isequal (["test";"strings"],["test";"strings"],["test";"strings"]), true)
-## test for inequality
-%!assert (isequal ([1,2,3,4],[1;2;3;4]), false)
-%!assert (isequal ({1,2,3,4},[1,2,3,4]), false)
-%!assert (isequal ([1,2,3,4],{1,2,3,4}), false)
-%!assert (isequal ([1,2,NaN,4],[1,2,NaN,4]), false)
-%!assert (isequal (['a','b','c','d'],['a';'b';'c';'d']), false)
-%!assert (isequal ({'a','b','c','d'},{'a';'b';'c';'d'}), false)
-## test for equality (struct)
-%!assert (isequal (struct ('a',1,'b',2),struct ('a',1,'b',2)), true)
-%!assert (isequal (struct ('a',1,'b',2),struct ('a',1,'b',2),struct ('a',1,'b',2)), true)
-%!assert (isequal (struct ('a',"abc",'b',2),struct ('a',"abc",'b',2)), true)
-## test for inequality (struct)
-%!assert (isequal (struct ('a',NaN,'b',2),struct ('a',NaN,'b',2),struct ('a',NaN,'b',2)), false)
+## test all numeric built-in primitives
+%!assert (isequal (false, logical (0), char (0),
+%!                 int8 (0), int16 (0), int32 (0), int64 (0),
+%!                 uint8 (0), uint16 (0), uint32 (0), uint64 (0),
+%!                 double (0), single (0),
+%!                 double (complex (0,0)), single (complex (0,0))),
+%!        true)
+%!assert (isequal (true, logical (1), char (1),
+%!                 int8 (1), int16 (1), int32 (1), int64 (1),
+%!                 uint8 (1), uint16 (1), uint32 (1), uint64 (1),
+%!                 double (1), single (1),
+%!                 double (complex (1,0)), single (complex (1,0))),
+%!        true)
+
+## test characters and strings
+%!assert (isequal ('a', "a"), true)
+%!assert (isequal ("abab", ["a", "b", "a", "b"]), true)
+%!assert (isequal (["a","b","c","d"], ["a","b","c","d"]), true)
+%!assert (isequal (["test   ";"strings"], ["test   ";"strings"],
+%!                 ["test   ";"strings"]), true)
+%!assert (isequal (["a","b","c","d"], ["a";"b";"c";"d"]), false)
+
+## test function_handle
+%!test
+%! fcn = @(x) x.^2;
+%! assert (isequal (fcn, fcn), true);
+%! assert (isequal (fcn, @(x) x.^2), false);
+%! assert (isequal (@(x) x.^2, fcn), false);
+
+## test structures
+%!assert (isequal (struct ([]),struct ([])), true)
+%!assert (isequal (struct ("a",1), struct ("a",1)), true)
+%!assert (isequal (struct ("a",1), struct ("a",2)), false)
+%!assert (isequal (struct ("a",1), struct ("b",1)), false)
+%!assert (isequal (struct ("a",1,"b",2), struct ("a",1,"b",2)), true)
+%!assert (isequal (struct ("a",1,"b",2), struct ("b",2,"a",1)), true)
+%!assert (isequal (struct ("a",1,"b",2), struct ("a",1,"b",2),
+%!                 struct ("a",1,"b",2)), true)
+%!assert (isequal (struct ("a","abc","b",2), struct ("a","abc","b",2)), true)
+
+## recursive structure
+%!test
+%! x.a = "a1";
+%! x.b.a = "ba1";
+%! x.b.b = "bb1";
+%! assert (isequal (x, x, x), true);
+%! y = x;
+%! y.b.b = "bb2";
+%! assert (isequal (x, y), false);
+%! y = x;
+%! y.b = rmfield (y.b, "b");
+%! y.b.b.a = "bba1";
+%! assert (isequal (x, y), false);
+
+## test cells
+%!assert (isequal (cell (1,1), cell (1,1)), true)
+%!assert (isequal (cell (1,1), cell (1,2)), false)
+%!assert (isequal ({"a",1}, {"a",1}), true)
+%!assert (isequal ({"a",1}, {"a",2}), false)
+%!assert (isequal ({"a",1}, {"b",1}), false)
+%!assert (isequal ({"a",1,"b",2}, {"a",1,"b",2}), true)
+%!assert (isequal ({"a",1,"b",2}, {"b",2,"a",1}), false)
+%!assert (isequal ({"a",1,"b",2}, {"a",1,"b",2}, {"a",1,"b",2}), true)
+%!assert (isequal ({"a","abc","b",2}, {"a","abc","b",2}), true)
+%!assert (isequal ({"a","b","c","d"}, {"a","b","c","d"}), true)
+%!assert (isequal ({"a","b","c","d"}, {"a";"b";"c";"d"}), false)
+%!assert (isequal (["a","b","c","d"], {"a","b","c","d"}), false)
+
+## recursive cell
+%!test
+%! x = cell (1,3);
+%! x{1} = {[1], [1 2]};
+%! x{2} = true;
+%! x{3} = {{"hello"}, {"world"}};
+%! assert (isequal (x, x));
+%! y = x;
+%! y{3}{1}{1} = "goodbye";
+%! assert (isequal (x, y), false);
 
 ## test for sparse matrices
+%!assert (isequal (sparse ([]), []), true)
+%!assert (isequal ([], sparse ([])), true)
 %!assert (isequal (sparse (0,1), sparse (0,1)), true)
+%!assert (isequal (sparse (0,1), zeros (0,1)), true)
+%!assert (isequal (sparse (2,2), sparse (2,2)), true)
+%!assert (isequal (zeros (2,2), sparse (2,2)), true)
+%!assert (isequal (speye (1), eye (1)), true)
+%!assert (isequal (eye (300), speye (300)), true)
 %!assert (isequal (sparse (0,1), sparse (1,0)), false)
-%!assert (isequal (sparse (2, 2), sparse (2, 2)), true)
 
-## Input validation
+## test NaN
+%!assert (isequal (NaN, NaN), false)
+%!assert (isequal (NaN, Inf), false)
+%!assert (isequal (NaN, 1.0), false)
+%!assert (isequal ([1,2,NaN,4], [1,2,NaN,4]), false)
+%!assert (isequal (struct ("a",NaN,"b",2), struct ("a",NaN,"b",2),
+%!                 struct ("a",NaN,"b",2)), false)
+
+## test input validation
 %!error isequal ()
 %!error isequal (1)
+%!error isequal ([1,1])
 
--- a/scripts/general/isequaln.m
+++ b/scripts/general/isequaln.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2005-2015 William Poetra Yoga Hadisoeseno
 ##
 ## This file is part of Octave.
 ##
@@ -36,13 +36,14 @@
 
 
 ## test for equality
-%!assert (isequaln ({1,2,NaN,4},{1,2,NaN,4}), true)
-%!assert (isequaln ([1,2,NaN,4],[1,2,NaN,4]), true)
+%!assert (isequaln ({1,2,NaN,4}, {1,2,NaN,4}), true)
+%!assert (isequaln ([1,2,NaN,4], [1,2,NaN,4]), true)
 ## test for inequality
-%!assert (isequaln ([1,2,NaN,4],[1,NaN,3,4]), false)
-%!assert (isequaln ([1,2,NaN,4],[1,2,3,4]), false)
+%!assert (isequaln ([1,2,NaN,4], [1,NaN,3,4]), false)
+%!assert (isequaln ([1,2,NaN,4], [1,2,3,4]), false)
 ## test for equality (struct)
-%!assert (isequaln (struct ('a',NaN,'b',2),struct ('a',NaN,'b',2),struct ('a',NaN,'b',2)), true)
+%!assert (isequaln (struct ("a",NaN,"b",2), struct ("a",NaN,"b",2),
+%!                  struct ("a",NaN,"b",2)), true)
 %!assert (isequaln (1,2,1), false)
 
 ## Input validation
deleted file mode 100644
--- a/scripts/general/isrow.m
+++ /dev/null
@@ -1,56 +0,0 @@
-## Copyright (C) 2012-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} isrow (@var{x})
-## Return true if @var{x} is a row vector.
-## @seealso{iscolumn, isscalar, isvector, ismatrix}
-## @end deftypefn
-
-## Author: Rik Wehbring
-
-function retval = isrow (x)
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  sz = size (x);
-  retval = (ndims (x) == 2 && (sz(1) == 1));
-
-endfunction
-
-
-%!assert (isrow ([1, 2, 3]))
-%!assert (isrow ([1; 2; 3]), false)
-%!assert (isrow (1))
-%!assert (isrow ([]), false)
-%!assert (isrow ([1, 2; 3, 4]), false)
-
-%!assert (isrow ("t"))
-%!assert (isrow ("test"))
-%!assert (isrow (["test"; "ing"]), false)
-
-%!test
-%! s.a = 1;
-%! assert (isrow (s));
-
-%% Test input validation
-%!error isrow ()
-%!error isrow ([1, 2], 2)
-
deleted file mode 100644
--- a/scripts/general/isscalar.m
+++ /dev/null
@@ -1,54 +0,0 @@
-## Copyright (C) 1996-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} isscalar (@var{x})
-## Return true if @var{x} is a scalar.
-## @seealso{isvector, ismatrix}
-## @end deftypefn
-
-## Author: jwe
-
-function retval = isscalar (x)
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  retval = numel (x) == 1;
-
-endfunction
-
-
-%!assert (isscalar (1))
-%!assert (isscalar ([1, 2]), false)
-%!assert (isscalar ([]), false)
-%!assert (isscalar ([1, 2; 3, 4]), false)
-
-%!assert (isscalar ("t"))
-%!assert (isscalar ("test"), false)
-%!assert (isscalar (["test"; "ing"]), false)
-
-%!test
-%! s.a = 1;
-%! assert (isscalar (s));
-
-%% Test input validation
-%!error isscalar ()
-%!error isscalar (1, 2)
-
deleted file mode 100644
--- a/scripts/general/issquare.m
+++ /dev/null
@@ -1,63 +0,0 @@
-## Copyright (C) 1996-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} issquare (@var{x})
-## Return true if @var{x} is a square matrix.
-## @seealso{isscalar, isvector, ismatrix, size}
-## @end deftypefn
-
-## Author: A. S. Hodel <scotte@eng.auburn.edu>
-## Created: August 1993
-## Adapted-By: jwe
-
-function retval = issquare (x)
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  if (ndims (x) == 2)
-    [r, c] = size (x);
-    retval = r == c;
-  else
-    retval = false;
-  endif
-
-endfunction
-
-
-%!assert (issquare ([]))
-%!assert (issquare (1))
-%!assert (! issquare ([1, 2]))
-%!assert (issquare ([1, 2; 3, 4]))
-%!assert (! issquare ([1, 2; 3, 4; 5, 6]))
-%!assert (! issquare (ones (3,3,3)))
-%!assert (issquare ("t"))
-%!assert (! issquare ("test"))
-%!assert (issquare (["test"; "ing"; "1"; "2"]))
-%!test
-%! s.a = 1;
-%! assert (issquare (s));
-%!assert (issquare ({1, 2; 3, 4}))
-%!assert (sparse (([1, 2; 3, 4])))
-
-%% Test input validation
-%!error issquare ()
-%!error issquare ([1, 2; 3, 4], 2)
-
deleted file mode 100644
--- a/scripts/general/isvector.m
+++ /dev/null
@@ -1,57 +0,0 @@
-## Copyright (C) 1996-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} isvector (@var{x})
-## Return true if @var{x} is a vector.  A vector is a 2-D array
-## where one of the dimensions is equal to 1.  As a consequence a
-## 1x1 array, or scalar, is also a vector.
-## @seealso{isscalar, ismatrix, size, rows, columns, length}
-## @end deftypefn
-
-## Author: jwe
-
-function retval = isvector (x)
-
-  if (nargin != 1)
-    print_usage ();
-  endif
-
-  sz = size (x);
-  retval = (ndims (x) == 2 && (sz(1) == 1 || sz(2) == 1));
-
-endfunction
-
-
-%!assert (isvector (1))
-%!assert (isvector ([1; 2; 3]))
-%!assert (isvector ([]), false)
-%!assert (isvector ([1, 2; 3, 4]), false)
-
-%!assert (isvector ("t"))
-%!assert (isvector ("test"))
-%!assert (isvector (["test"; "ing"]), false)
-
-%!test
-%! s.a = 1;
-%! assert (isvector (s));
-
-%% Test input validation
-%!error isvector ()
-%!error isvector ([1, 2], 2)
-
--- a/scripts/general/loadobj.m
+++ b/scripts/general/loadobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/logspace.m
+++ b/scripts/general/logspace.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -90,7 +90,7 @@
 %! assert (size (x3) == [1, 10] && abs (x3(1) - 10) < eps && abs (x3(10) - 0.01) < eps);
 %! assert (size (x4) == [1, 10] && abs (x4(1) - 10) < eps && abs (x4(10) - pi) < sqrt (eps));
 
-%% Test input validation
+## Test input validation
 %!error logspace ()
 %!error logspace (1, 2, 3, 4)
 %!error logspace ([1, 2; 3, 4], 5, 6)
--- a/scripts/general/methods.m
+++ b/scripts/general/methods.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/module.mk
+++ b/scripts/general/module.mk
@@ -7,7 +7,6 @@
 general_FCN_FILES = \
   general/accumarray.m \
   general/accumdim.m \
-  general/bicubic.m \
   general/bincoeff.m \
   general/bitcmp.m \
   general/bitget.m \
@@ -29,34 +28,30 @@
   general/display.m \
   general/divergence.m \
   general/fieldnames.m \
+  general/flip.m \
   general/flipdim.m \
   general/fliplr.m \
   general/flipud.m \
   general/gradient.m \
   general/idivide.m \
+  general/inputParser.m \
   general/int2str.m \
   general/interp1.m \
   general/interp2.m \
   general/interp3.m \
+  general/interpft.m \
   general/interpn.m \
-  general/interpft.m \
-  general/isa.m \
-  general/iscolumn.m \
   general/isdir.m \
   general/isequal.m \
   general/isequaln.m \
-  general/isrow.m \
-  general/isscalar.m \
-  general/issquare.m \
-  general/isvector.m \
   general/loadobj.m \
   general/logspace.m \
   general/methods.m \
   general/nargchk.m \
   general/narginchk.m \
   general/nargoutchk.m \
+  general/nextpow2.m \
   general/nthargout.m \
-  general/nextpow2.m \
   general/num2str.m \
   general/pol2cart.m \
   general/polyarea.m \
@@ -80,8 +75,9 @@
   general/sph2cart.m \
   general/structfun.m \
   general/subsindex.m \
+  general/trapz.m \
   general/triplequad.m \
-  general/trapz.m \
+  general/validateattributes.m \
   $(general_PRIVATE_FCN_FILES)
 
 FCN_FILES += $(general_FCN_FILES)
--- a/scripts/general/nargchk.m
+++ b/scripts/general/nargchk.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -25,6 +25,9 @@
 ##
 ## This is useful for checking to see that the number of input arguments
 ## supplied to a function is within an acceptable range.
+##
+## @strong{Caution}: @code{nargchk} is scheduled for deprecation.  Use
+## @code{narginchk} in all new code.
 ## @seealso{nargoutchk, narginchk, error, nargin, nargout}
 ## @end deftypefn
 
--- a/scripts/general/narginchk.m
+++ b/scripts/general/narginchk.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Carnë Draug
+## Copyright (C) 2012-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -28,7 +28,7 @@
 ##
 ## Note that this function evaluates @code{nargin} on the caller.
 ##
-## @seealso{nargchk, nargoutchk, error, nargout, nargin}
+## @seealso{nargoutchk, error, nargout, nargin}
 ## @end deftypefn
 
 ## Author: Carnë Draug <carandraug+dev@gmail.com>
@@ -37,9 +37,9 @@
 
   if (nargin != 2)
     print_usage;
-  elseif (!isnumeric (minargs) || !isscalar (minargs))
+  elseif (! isnumeric (minargs) || ! isscalar (minargs))
     error ("minargs must be a numeric scalar");
-  elseif (!isnumeric (maxargs) || !isscalar (maxargs))
+  elseif (! isnumeric (maxargs) || ! isscalar (maxargs))
     error ("maxargs must be a numeric scalar");
   elseif (minargs > maxargs)
     error ("minargs cannot be larger than maxargs");
--- a/scripts/general/nargoutchk.m
+++ b/scripts/general/nargoutchk.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ## Copyright (C) 2012 Carnë Draug
 ##
 ## This file is part of Octave.
@@ -38,7 +38,7 @@
 ##
 ## This is useful for checking to see that the number of output
 ## arguments supplied to a function is within an acceptable range.
-## @seealso{nargchk, narginchk, error, nargout, nargin}
+## @seealso{narginchk, error, nargout, nargin}
 ## @end deftypefn
 
 ## Author: Bill Denney <bill@denney.ws>
@@ -50,7 +50,8 @@
   ## message in a string). With 2011b, it no longer returns anything, it simply
   ## gives an error if the args number is incorrect.
   ## To try to keep compatibility with both versions, check nargout and nargin
-  ## to guess if the caller is expecting a value (old syntax) or none (new syntax)
+  ## to guess if the caller is expecting a value (old syntax)
+  ## or none (new syntax).
 
   if (nargout == 1 && (nargin == 3 || nargin == 4))
 
@@ -76,15 +77,15 @@
     if (strcmpi (outtype, "string"))
       msg = msg.message;
     elseif (isempty (msg.message))
-      ## Compatability: Matlab returns a 0x1 empty struct when nargchk passes
+      ## Compatibility: Matlab returns a 0x1 empty struct when nargoutchk passes
       msg = resize (msg, 0, 1);
     endif
 
   elseif (nargout == 0 && nargin == 2)
 
-    if (!isnumeric (minargs) || !isscalar (minargs))
+    if (! isnumeric (minargs) || ! isscalar (minargs))
       error ("minargs must be a numeric scalar");
-    elseif (!isnumeric (maxargs) || !isscalar (maxargs))
+    elseif (! isnumeric (maxargs) || ! isscalar (maxargs))
       error ("maxargs must be a numeric scalar");
     elseif (minargs > maxargs)
       error ("minargs cannot be larger than maxargs");
--- a/scripts/general/nextpow2.m
+++ b/scripts/general/nextpow2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} nextpow2 (@var{x})
-## If @var{x} is a scalar, return the first integer @var{n} such that
+## Compute exponent for smallest power of two larger than input.
+##
+## For each element in the input array @var{x}, returns the first integer
+## @var{n} such that
 ## @tex
 ## $2^n \ge |x|$.
 ## @end tex
@@ -26,7 +29,6 @@
 ## 2^n @geq{} abs (x).
 ## @end ifnottex
 ##
-## If @var{x} is a vector, return @code{nextpow2 (length (@var{x}))}.
 ## @seealso{pow2, log2}
 ## @end deftypefn
 
@@ -40,19 +42,12 @@
     print_usage ();
   endif
 
-  if (! (isscalar (x) || isvector (x)))
-    error ("nextpow2: X must be a scalar or a vector");
-  endif
-
-  t = length (x);
-  if (t > 1)
-    x = t;
+  if (! isnumeric (x))
+    error ("nextpow2: X must be numeric");
   endif
 
   [f, n] = log2 (abs (x));
-  if (f == 0.5)
-    n = n - 1;
-  endif
+  n(f == 0.5)--;
 
 endfunction
 
@@ -63,7 +58,7 @@
 %!assert (nextpow2 (-16), 4)
 %!assert (nextpow2 (-17), 5)
 %!assert (nextpow2 (-31), 5)
-%!assert (nextpow2 (1:17), 5)
+%!assert (nextpow2 (1:17), [0 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5])
 
 %!error nexpow2 ()
 %!error nexpow2 (1, 2)
--- a/scripts/general/nthargout.m
+++ b/scripts/general/nthargout.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Jordi Gutiérrez Hermoso
+## Copyright (C) 2012-2015 Jordi Gutiérrez Hermoso
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/num2str.m
+++ b/scripts/general/num2str.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -71,7 +71,7 @@
 
   if (nargin != 1 && nargin != 2)
     print_usage ();
-  elseif (! ismatrix (x))
+  elseif (! (isnumeric (x) || islogical (x) || ischar (x)))
     error ("num2str: X must be a numeric, logical, or character array");
   endif
 
@@ -83,7 +83,7 @@
     if (nargin == 2)
       if (ischar (arg))
         fmt = arg;
-      elseif (isnumeric (arg) && isscalar (arg) && arg >= 0)
+      elseif (isnumeric (arg) && isscalar (arg) && arg >= 0 && arg == fix (arg))
         fmt = sprintf ("%%%d.%dg", arg+7, arg);
       else
         error ("num2str: PRECISION must be a scalar integer >= 0");
@@ -91,7 +91,7 @@
     else
       if (isnumeric (x))
         ## Setup a suitable format string, ignoring inf entries
-        dgt = floor (log10 (max (abs (x(!isinf (x(:)))))));
+        dgt = floor (log10 (max (abs (x(! isinf (x(:)))))));
         if (isempty (dgt))
           ## If the whole input array is inf...
           dgt = 1;
@@ -122,15 +122,15 @@
     if (nargin == 2)
       if (ischar (arg))
         fmt = [arg "%-+" arg(2:end) "i"];
-      elseif (isnumeric (arg) && isscalar (arg) && arg >= 0)
+      elseif (isnumeric (arg) && isscalar (arg) && arg >= 0 && arg == fix (arg))
         fmt = sprintf ("%%%d.%dg%%-+%d.%dgi", arg+7, arg, arg+7, arg);
       else
         error ("num2str: PRECISION must be a scalar integer >= 0");
       endif
     else
       ## Setup a suitable format string
-      dgt = floor (log10 (max (max (abs (real (x(!isinf (real (x(:))))))),
-                               max (abs (imag (x(!isinf (imag (x(:))))))))));
+      dgt = floor (log10 (max (max (abs (real (x(! isinf (real (x(:))))))),
+                               max (abs (imag (x(! isinf (imag (x(:))))))))));
       if (isempty (dgt))
         ## If the whole input array is inf...
         dgt = 1;
--- a/scripts/general/pol2cart.m
+++ b/scripts/general/pol2cart.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/polyarea.m
+++ b/scripts/general/polyarea.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 David M. Doolin
+## Copyright (C) 1999-2015 David M. Doolin
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/postpad.m
+++ b/scripts/general/postpad.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -30,6 +30,9 @@
 ##
 ## If the optional argument @var{dim} is given, operate along this
 ## dimension.
+##
+## If @var{dim} is larger than the dimensions of @var{x}, the result will
+## have @var{dim} dimensions.
 ## @seealso{prepad, cat, resize}
 ## @end deftypefn
 
@@ -56,8 +59,7 @@
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
   else
-    if (!(isscalar (dim) && dim == fix (dim))
-        || !(1 <= dim && dim <= nd))
+    if (!(isscalar (dim) && dim == fix (dim) && dim >= 1))
       error ("postpad: DIM must be an integer and a valid dimension");
     endif
   endif
@@ -70,14 +72,14 @@
     sz(nd+1:dim) = 1;
   endif
 
-  d = sz (dim);
+  d = sz(dim);
 
   if (d >= l)
     idx = repmat ({':'}, nd, 1);
     idx{dim} = 1:l;
     y = x(idx{:});
   else
-    sz (dim) = l - d;
+    sz(dim) = l - d;
     y = cat (dim, x, c(ones (sz)));
   endif
 
@@ -89,9 +91,14 @@
 %!assert (postpad ([1,2], 4, 2), [1,2,2,2])
 %!assert (postpad ([1;2], 4, 2), [1;2;2;2])
 %!assert (postpad ([1,2], 2, 2, 1), [1,2;2,2])
+%!assert (postpad ([1;2], 2, 2, 3), reshape ([1;2;2;2], 2, 1, 2))
+%!assert (postpad ([1,2], 2, 2, 3), reshape ([1,2,2,2], 1, 2, 2))
+
+%! ## Test with string concatenation (bug #44162)
+%!assert (postpad ("Octave", 16, "x"), "Octavexxxxxxxxxx")
+%!assert (postpad ("Octave", 4), "Octa")
 
 %!error postpad ()
 %!error postpad (1)
 %!error postpad (1,2,3,4,5)
-%!error postpad ([1,2], 2, 2,3)
 
--- a/scripts/general/prepad.m
+++ b/scripts/general/prepad.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -30,6 +30,9 @@
 ##
 ## If the optional argument @var{dim} is given, operate along this
 ## dimension.
+##
+## If @var{dim} is larger than the dimensions of @var{x}, the result will
+## have @var{dim} dimensions.
 ## @seealso{postpad, cat, resize}
 ## @end deftypefn
 
@@ -56,8 +59,7 @@
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
   else
-    if (!(isscalar (dim) && dim == fix (dim))
-        || !(1 <= dim && dim <= nd))
+    if (!(isscalar (dim) && dim == fix (dim) && dim >= 1))
       error ("prepad: DIM must be an integer and a valid dimension");
     endif
   endif
@@ -70,15 +72,15 @@
     sz(nd+1:dim) = 1;
   endif
 
-  d = sz (dim);
+  d = sz(dim);
 
   if (d >= l)
     idx = repmat ({':'}, nd, 1);
     idx{dim} = d-l+1:d;
     y = x(idx{:});
   else
-    sz (dim) = l - d;
-    y = cat (dim, c * ones (sz), x);
+    sz(dim) = l - d;
+    y = cat (dim, c(ones (sz)), x);
   endif
 
 endfunction
@@ -92,7 +94,14 @@
 
 %!assert (prepad ([1,2], 2, 2, 1), [2,2;1,2])
 
-## FIXME -- we need tests for multidimensional arrays.
+%!assert (prepad ([1,2], 2, 2, 3), reshape ([2,2,1,2], 1, 2, 2))
+%!assert (prepad ([1;2], 2, 2, 3), reshape ([2;2;1;2], 2, 1, 2))
+
+%! ## Test with string concatenation (bug #44162)
+%!assert (prepad ("Octave", 16, "x"), "xxxxxxxxxxOctave")
+%!assert (prepad ("Octave", 4), "tave")
+
+## FIXME: We need tests for multidimensional arrays.
 
 %!error prepad ()
 %!error prepad (1)
@@ -100,7 +109,6 @@
 %!error <C must be empty or a scalar> prepad ([1,2], 2, ones (2))
 %!error <DIM must be an integer> prepad ([1,2], 2, 2, ones (3))
 %!error <DIM must be an integer> prepad ([1,2], 2, 2, 1.1)
-%!error <DIM must be an integer> prepad ([1,2], 2, 2, 3)
 %!error <L must be a positive scalar> prepad ([1,2], ones (2))
 %!error <L must be a positive scalar> prepad ([1,2], -1)
 
--- a/scripts/general/private/__isequal__.m
+++ b/scripts/general/private/__isequal__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -33,17 +33,19 @@
 ## Algorithm:
 ##
 ## 1. Determine the class of x
-## 2. If x is of the struct, cell, list or char class, for each
-##    argument after x, determine whether it has the same class
-##    and size as x.
-##    Otherwise, for each argument after x, verify that it is not
-##    of the struct, cell, list or char class, and that it has
-##    the same size as x.
+## 2. If x and all other arguments have the same class, then check that the
+##    number of dimensions and then the size of each dimension match.
+##    If not all arguments share the same class, then verify that all of the
+##    arguments belong to a comparable "numeric" class which includes
+##    numeric, logical, and character arrays.  Check that number of dimensions
+##    and size of each dimension match.
 ## 3. For each argument after x, compare it for equality with x:
 ##    a. struct     compare each member by name, not by order (recursive)
-##    b. cell/list  compare each member by order (recursive)
-##    c. char       compare each member with strcmp
-##    d. <other>    compare each nonzero member, and assume NaN == NaN
+##    b. object     convert to struct, and then compare as stated above
+##    c. cell       compare each member by order (recursive)
+##    d. char       compare each member with strcmp
+##    e  fcn_handle compare using overloade 'eq' operator
+##    f. <other>    compare each nonzero member, and assume NaN == NaN
 ##                  if nans_compare_equal is nonzero.
 
 function t = __isequal__ (nans_compare_equal, x, varargin)
@@ -53,39 +55,33 @@
   ## Generic tests.
 
   ## All arguments must either be of the same class or they must be
-  ## numeric values.
+  ## "numeric" values.
   t = (all (strcmp (class (x),
                     cellfun ("class", varargin, "uniformoutput", false)))
-       || ((isnumeric (x) || islogical (x))
-           && all (cellfun ("isnumeric", varargin)
-                   | cellfun ("islogical", varargin))));
+       || ((isreal (x) || isnumeric (x))
+           && all (cellfun ("isreal", varargin)
+                   | cellfun ("isnumeric", varargin))));
 
   if (t)
     ## Test that everything has the same number of dimensions.
-    s_x = size (x);
-    s_v = cellfun (@size, varargin, "uniformoutput", false);
-    t = all (length (s_x) == cellfun ("length", s_v));
+    t = all (ndims (x) == cellfun ("ndims", varargin));
   endif
 
   if (t)
-    ## Test that everything is the same size since it has the same
-    ## dimensionality.
-    l_x = length (s_x);
-    s_v = reshape ([s_v{:}], length (s_x), []);
-    idx = 0;
-    while (t && idx < l_x)
-      idx++;
-      t = all (s_x(idx) == s_v(idx,:));
-    endwhile
+    ## Test that everything is the same size since the dimensionality matches.
+    nd = ndims (x);
+    k = 1;
+    do
+      t = all (size (x,k) == cellfun ("size", varargin, k));
+    until (!t || k++ == nd);
   endif
 
   ## From here on, compare objects as if they were structures.
-  if (isobject (x))
+  if (t && isobject (x))
+    ## Locally suppress class-to-struct warning.  We know what we are doing.
+    warning ("off", "Octave:classdef-to-struct", "local");
     x = builtin ("struct", x);
     for i = 1:numel (varargin)
-      if (! isobject (varargin{i}))
-        break;
-      endif
       varargin{i} = builtin ("struct", varargin{i});
     endfor
   endif
@@ -95,9 +91,9 @@
     if (isstruct (x))
       ## Test the number of fields.
       fn_x = fieldnames (x);
-      l_fn_x = length (fn_x);
+      l_fn_x = numfields (x);
       fn_v = cellfun ("fieldnames", varargin, "uniformoutput", false);
-      t = all (l_fn_x == cellfun ("length", fn_v));
+      t = all (l_fn_x == cellfun ("numel", fn_v));
 
       ## Test that all the names are equal.
       idx = 0;
@@ -112,12 +108,12 @@
       while (t && idx < l_fn_x)
         ## Test that all field values are equal.
         idx++;
-        args = {nans_compare_equal, {x.(fn_x{idx})}};
+        args = cell (1, 2+l_v);
+        args(1:2) = {nans_compare_equal, {x.(fn_x{idx})}};
         for argn = 1:l_v
           args{argn+2} = {varargin{argn}.(fn_x{idx})};
         endfor
-        ## Minimize function calls by calling for all the arguments at
-        ## once.
+        ## Minimize function calls by calling for all the arguments at once.
         t = __isequal__ (args{:});
       endwhile
 
@@ -127,24 +123,24 @@
       idx = 0;
       while (t && idx < l_x)
         idx++;
-        args = {nans_compare_equal, x{idx}};
-        for p = 1:l_v
-          args{p+2} = varargin{p}{idx};
-        endfor
+        args = cell (1, 2+l_v);
+        args(1:2) = {nans_compare_equal, x{idx}};
+        args(3:end) = [cellindexmat(varargin, idx){:}];
+
         t = __isequal__ (args{:});
       endwhile
 
-    elseif (ischar (x))
-
+    elseif (ischar (x) && all (cellfun ("isclass", varargin, "char")))
       ## Sizes are equal already, so we can just make everything into a
       ## row and test the rows.
+      n_x = numel (x);
+      strings = cell (1, l_v);
       for i = 1:l_v
-        strings{i} = reshape (varargin{i}, 1, []);
+        strings{i} = reshape (varargin{i}, 1, n_x);
       endfor
-      t = all (strcmp (reshape (x, 1, []), strings));
+      t = all (strcmp (reshape (x, 1, n_x), strings));
 
     elseif (isa (x, "function_handle"))
-
       ## The == operator is overloaded for handles.
       t = all (cellfun ("eq", {x}, varargin));
 
@@ -179,11 +175,5 @@
     endif
   endif
 
-  if (!t)
-    t = false;
-  else
-    t = true;
-  endif
-
 endfunction
 
--- a/scripts/general/private/__splinen__.m
+++ b/scripts/general/private/__splinen__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -28,8 +28,9 @@
 function yi = __splinen__ (x, y, xi, extrapval, f)
   ## ND isvector function.
   isvec = @(x) numel (x) == length (x);
-  if (!iscell (x) || length (x) < ndims (y) || any (! cellfun (isvec, x))
-      || !iscell (xi) || length (xi) < ndims (y) || any (! cellfun (isvec, xi)))
+  if (! iscell (x) || length (x) < ndims (y) || any (! cellfun (isvec, x))
+      || ! iscell (xi) || length (xi) < ndims (y)
+      || any (! cellfun (isvec, xi)))
     error ("__splinen__: %s: non-gridded data or dimensions inconsistent", f);
   endif
   yi = y;
@@ -38,10 +39,12 @@
   endfor
 
   [xi{:}] = ndgrid (cellfun (@(x) x(:), xi, "uniformoutput", false){:});
-  idx = zeros (size (xi{1}));
-  for i = 1 : length (x)
-    idx |= xi{i} < min (x{i}(:)) | xi{i} > max (x{i}(:));
-  endfor
-  yi(idx) = extrapval;
+  if (! isempty (extrapval))
+    idx = zeros (size (xi{1}));
+    for i = 1 : length (x)
+      idx |= xi{i} < min (x{i}(:)) | xi{i} > max (x{i}(:));
+    endfor
+    yi(idx) = extrapval;
+  endif
 endfunction
 
--- a/scripts/general/profexplore.m
+++ b/scripts/general/profexplore.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Daniel Kraft
+## Copyright (C) 2012-2015 Daniel Kraft
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/profile.m
+++ b/scripts/general/profile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Daniel Kraft
+## Copyright (C) 2012-2015 Daniel Kraft
 ##
 ## This file is part of Octave.
 ##
@@ -147,7 +147,7 @@
 %! assert (size (hier), [0, 1]);
 %! assert (fieldnames (hier), {"Index"; "SelfTime"; "NumCalls"; "Children"});
 
-%% Test input validation
+## Test input validation
 %!error profile ()
 %!error profile ("on", 2)
 %!error profile ("INVALID_OPTION")
--- a/scripts/general/profshow.m
+++ b/scripts/general/profshow.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Daniel Kraft
+## Copyright (C) 2012-2014 Daniel Kraft
 ##
 ## This file is part of Octave.
 ##
@@ -19,17 +19,20 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} profshow (@var{data})
 ## @deftypefnx {Function File} {} profshow (@var{data}, @var{n})
-## Show flat profiler results.
+## @deftypefnx {Function File} {} profshow ()
+## @deftypefnx {Function File} {} profshow (@var{n})
+## Display flat per-function profiler results.
 ##
-## This command prints out profiler data as a flat profile.  @var{data} is the
-## structure returned by @code{profile ("info")}.  If @var{n} is given, it
-## specifies the number of functions to show in the profile; functions are
-## sorted in descending order by total time spent in them.  If there are more
-## than @var{n} included in the profile, those will not be shown.  @var{n}
+## Print out profiler data (execution time, number of calls) for the most
+## critical @var{n} functions.  The results are sorted in descending order by
+## the total time spent in each function.  If @var{n} is unspecified it
 ## defaults to 20.
 ##
-## The attribute column shows @samp{R} for recursive functions and nothing
-## otherwise.
+## The input @var{data} is the structure returned by @code{profile ("info")}.
+## If unspecified, @code{profshow} will use the current profile dataset.
+##
+## The attribute column displays @samp{R} for recursive functions, and is blank
+## for all other function types.
 ## @seealso{profexplore, profile}
 ## @end deftypefn
 
@@ -38,10 +41,17 @@
 
 function profshow (data, n = 20)
 
-  if (nargin < 1 || nargin > 2)
+  if (nargin > 2)
     print_usage ();
   endif
 
+  if (nargin == 0)
+    data = profile ("info");
+  elseif (nargin == 1 && ! isstruct (data))
+    n = data;
+    data = profile ("info");
+  endif
+
   n = fix (n);
   if (! isscalar (n) || ! isreal (n) || ! (n > 0))
     error ("profile: N must be a positive integer");
@@ -53,30 +63,32 @@
   ## We want to sort by times in descending order.  For this, extract the
   ## times to an array, then sort this, and use the resulting index permutation
   ## to print out our table.
-  times = -[ data.FunctionTable.TotalTime ];
+  times = [ data.FunctionTable.TotalTime ];
+  totalTime = sum (times);
 
-  [~, p] = sort (times);
+  [~, p] = sort (times, "descend");
 
   ## For printing the table, find out the maximum length of a function name
   ## so that we can proportion the table accordingly.  Based on this,
   ## we can build the format used for printing table rows.
-  nameLen = length ("Function");
-  for i = 1 : n
-    nameLen = max (nameLen, length (data.FunctionTable(p(i)).FunctionName));
-  endfor
-  headerFormat = sprintf ("%%4s %%%ds %%4s %%12s %%12s\n", nameLen);
-  rowFormat = sprintf ("%%4d %%%ds %%4s %%12.3f %%12d\n", nameLen);
+  nameLen = max (length ("Function"),
+                 columns (char (data.FunctionTable(p(1:n)).FunctionName)));
+  headerFormat = sprintf ("%%4s %%%ds %%4s %%12s %%10s %%12s\n", nameLen);
+  rowFormat = sprintf ("%%4d %%%ds %%4s %%12.3f %%10.2f %%12d\n", nameLen);
 
-  printf (headerFormat, "#", "Function", "Attr", "Time (s)", "Calls");
-  printf ("%s\n", repmat ("-", 1, nameLen + 2 * 5 + 2 * 13));
+  printf (headerFormat, ...
+          "#", "Function", "Attr", "Time (s)", "Time (%)", "Calls");
+  printf ("%s\n", repmat ("-", 1, nameLen + 2 * 5 + 11 + 2 * 13));
+
   for i = 1 : n
     row = data.FunctionTable(p(i));
+    timePercent = 100 * row.TotalTime / totalTime;
     attr = "";
     if (row.IsRecursive)
       attr = "R";
     endif
-    printf (rowFormat, p(i), row.FunctionName, attr, ...
-            row.TotalTime, row.NumCalls);
+    printf (rowFormat, p(i), row.FunctionName, attr,
+            row.TotalTime, timePercent, row.NumCalls);
   endfor
 
 endfunction
@@ -96,7 +108,6 @@
 %! profile off;
 %! profshow (profile ("info"), 5);
 
-%!error profshow ()
 %!error profshow (1, 2, 3)
 %!error <N must be a positive integer> profshow (struct (), ones (2))
 %!error <N must be a positive integer> profshow (struct (), 1+i)
--- a/scripts/general/quadgk.m
+++ b/scripts/general/quadgk.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -27,7 +27,7 @@
 ## using adaptive Gauss-Konrod quadrature.
 ## @var{f} is a function handle, inline function, or string
 ## containing the name of the function to evaluate.
-## The formulation is based on a proposal by L.F. Shampine,
+## The formulation is based on a proposal by @nospell{L.F. Shampine},
 ## @cite{"Vectorized adaptive quadrature in @sc{matlab}", Journal of
 ## Computational and Applied Mathematics, pp131-140, Vol 211, Issue 2,
 ## Feb 2008} where all function evaluations at an iteration are
@@ -163,7 +163,7 @@
             elseif (strcmpi (str, "waypoints"))
               waypoints = varargin{idx++} (:);
               if (isreal (waypoints))
-                waypoints (waypoints < a | waypoints > b) = [];
+                waypoints(waypoints < a | waypoints > b) = [];
               endif
             elseif (strcmpi (str, "maxintervalcount"))
               maxint = varargin{idx++};
--- a/scripts/general/quadl.m
+++ b/scripts/general/quadl.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1998-2013 Walter Gautschi
+## Copyright (C) 1998-2015 Walter Gautschi
 ##
 ## This file is part of Octave.
 ##
@@ -45,7 +45,7 @@
 ## @var{f}.  To use default values for @var{tol} and @var{trace}, one may pass
 ## empty matrices ([]).
 ##
-## Reference: W. Gander and W. Gautschi, @cite{Adaptive Quadrature -
+## Reference: @nospell{W. Gander and W. Gautschi}, @cite{Adaptive Quadrature -
 ## Revisited}, BIT Vol. 40, No. 1, March 2000, pp. 84--101.
 ## @url{http://www.inf.ethz.ch/personal/gander/}
 ## @seealso{quad, quadv, quadgk, quadcc, trapz, dblquad, triplequad}
--- a/scripts/general/quadv.m
+++ b/scripts/general/quadv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ## Copyright (C) 2012 Alexander Klein
 ##
 ## This file is part of Octave.
@@ -152,12 +152,12 @@
 %!assert (quadv (@sin, 0, 2 * pi), 0, 1e-5)
 %!assert (quadv (@sin, 0, pi), 2, 1e-5)
 
-%% Handles weak singularities at the edge
+## Handles weak singularities at the edge
 %!assert (quadv (@(x) 1 ./ sqrt (x), 0, 1), 2, 1e-5)
 
-%% Handles vector-valued functions
+## Handles vector-valued functions
 %!assert (quadv (@(x) [(sin (x)), (sin (2 * x))], 0, pi), [2, 0], 1e-5)
 
-%% Handles matrix-valued functions
+## Handles matrix-valued functions
 %!assert (quadv (@(x) [ x, x, x; x, 1./sqrt(x), x; x, x, x ], 0, 1 ), [0.5, 0.5, 0.5; 0.5, 2, 0.5; 0.5, 0.5, 0.5], 1e-5)
 
--- a/scripts/general/randi.m
+++ b/scripts/general/randi.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Rik Wehbring
+## Copyright (C) 2010-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
@@ -129,7 +129,7 @@
 %!
 %!assert (size (randi (10, 3,1,2)), [3, 1, 2])
 
-%% Test input validation
+## Test input validation
 %!error (randi ())
 %!error (randi ("test"))
 %!error (randi (10+2i))
--- a/scripts/general/rat.m
+++ b/scripts/general/rat.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -142,7 +142,7 @@
       s_nc = columns (s);
       if (n_nc > s_nc)
         s(:,s_nc+1:n_nc) = " ";
-      elseif (s_nc > n_nc)
+      elseif (s_nc > n_nc && n_nc != 0)
         n(:,n_nc+1:s_nc) = " ";
       endif
       n = cat (1, n, s);
@@ -157,6 +157,9 @@
 %! assert (n, [1, 3, 1]);
 %! assert (d, [2, 10, 3]);
 
+## bug #43374
+%!assert (eval (rat (0.75)), [0.75])
+
 %!error rat ();
 %!error rat (1, 2, 3);
 
--- a/scripts/general/repmat.m
+++ b/scripts/general/repmat.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2014-2015 Markus Bergholz
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2008 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -20,6 +21,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} repmat (@var{A}, @var{m})
 ## @deftypefnx {Function File} {} repmat (@var{A}, @var{m}, @var{n})
+## @deftypefnx {Function File} {} repmat (@var{A}, @var{m}, @var{n}, @var{p} @dots{})
 ## @deftypefnx {Function File} {} repmat (@var{A}, [@var{m} @var{n}])
 ## @deftypefnx {Function File} {} repmat (@var{A}, [@var{m} @var{n} @var{p} @dots{}])
 ## Form a block matrix of size @var{m} by @var{n}, with a copy of matrix
@@ -33,13 +35,14 @@
 ## Author: Paul Kienzle <pkienzle@kienzle.powernet.co.uk>
 ## Created: July 2000
 
-function x = repmat (A, m, n)
+function x = repmat (A, m, varargin)
 
-  if (nargin < 2 || nargin > 3)
+  if (nargin < 2)
     print_usage ();
   endif
 
   if (nargin == 3)
+    n = varargin{1};
     if (! isempty (m) && isempty (n))
       m = m(:).';
       n = 1;
@@ -64,12 +67,20 @@
       n = n(:).';
     endif
   else
-    if (isempty (m))
+    if (nargin > 3)
+      ## input check for m and varargin
+      if (isscalar (m) && all (cellfun ("numel", varargin) == 1))
+        m = [m varargin{:}];
+        n = [];
+      else
+        error ("repmat: all input arguments must be scalar");
+      end
+    elseif (isempty (m))
       m = n = 1;
     elseif (isscalar (m))
       n = m;
     elseif (ndims (m) > 2)
-      error ("repmat: M has more than 2 dimensions")
+      error ("repmat: M has more than 2 dimensions");
     elseif (all (size (m) > 1))
       m = m(:,1).';
       n = [];
@@ -81,7 +92,7 @@
   idx = [m, n];
 
   if (all (idx < 0))
-    error ("repmat: invalid dimensions")
+    error ("repmat: invalid dimensions");
   else
     idx = max (idx, 0);
   endif
@@ -126,7 +137,7 @@
 endfunction
 
 
-# Tests for ML compatibility
+## Tests for ML compatibility
 %!shared x
 %! x = [1 2 3];
 %!assert (repmat (x, [3, 1]), repmat (x, 3, []))
@@ -141,7 +152,7 @@
 %!assert (repmat (x, [1 1], 4), repmat (x, [1 1 4]));
 %!assert (repmat (x, [1 1], 4), repmat (x, 1, [1 4]));
 
-# Test various methods of providing size parameters
+## Test various methods of providing size parameters
 %!shared x
 %! x = [1 2;3 4];
 %!assert (repmat (x, [1 1]), repmat (x, 1))
@@ -150,8 +161,9 @@
 %!assert (repmat (x, [1 3]), repmat (x, 1, 3))
 %!assert (repmat (x, [3 1]), repmat (x, 3, 1))
 %!assert (repmat (x, [3 3]), repmat (x, 3, 3))
+%!assert (repmat (pi, [1,2,3,4]), repmat (pi, 1,2,3,4))
 
-# Tests for numel==1 case:
+## Tests for numel==1 case:
 %!shared x, r
 %! x = [ 65 ];
 %! r = kron (ones (2,2), x);
@@ -159,7 +171,7 @@
 %!assert (char (r), repmat (char (x), [2 2]))
 %!assert (int8 (r), repmat (int8 (x), [2 2]))
 
-# Tests for ndims==2 case:
+## Tests for ndims==2 case:
 %!shared x, r
 %! x = [ 65 66 67 ];
 %! r = kron (ones (2,2), x);
@@ -167,7 +179,7 @@
 %!assert (char (r), repmat (char (x), [2 2]))
 %!assert (int8 (r), repmat (int8 (x), [2 2]))
 
-# Tests for dim>2 case:
+## Tests for dim>2 case:
 %!shared x, r
 %! x = [ 65 66 67 ];
 %! r = kron (ones (2,2), x);
@@ -176,7 +188,7 @@
 %!assert (char (r), repmat (char (x), [2 2 2]))
 %!assert (int8 (r), repmat (int8 (x), [2 2 2]))
 
-# Test that sparsity is kept
+## Test that sparsity is kept
 %!assert (sparse (4,4), repmat (sparse (2,2),[2 2]))
 
 %!assert (size (repmat (".", -1, 1)), [0, 1])
--- a/scripts/general/rot90.m
+++ b/scripts/general/rot90.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,6 +19,8 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} rot90 (@var{A})
 ## @deftypefnx {Function File} {} rot90 (@var{A}, @var{k})
+## Rotate array by 90 degree increments.
+##
 ## Return a copy of @var{A} with the elements rotated counterclockwise in
 ## 90-degree increments.  The second argument is optional, and specifies
 ## how many 90-degree rotations are to be applied (the default value is 1).
@@ -45,9 +47,11 @@
 ## @end group
 ## @end example
 ##
-## Note that @code{rot90} only works with 2-D arrays.  To rotate N-D arrays
-## use @code{rotdim} instead.
-## @seealso{rotdim, flipud, fliplr, flipdim}
+## The rotation is always performed on the plane of the first two dimensions,
+## i.e., rows and columns.  To perform a rotation on any other plane, use
+## @code{rotdim}.
+##
+## @seealso{rotdim, fliplr, flipud, flip}
 ## @end deftypefn
 
 ## Author: jwe
@@ -58,22 +62,24 @@
     print_usage ();
   endif
 
-  if (ndims (A) > 2)
-    error ("rot90: A must be a 2-D array");
-  elseif (! (isscalar (k) && isreal (k) && k == fix (k)))
+  if (! (isscalar (k) && isreal (k) && k == fix (k)))
     error ("rot90: K must be a single real integer");
   endif
 
   k = mod (k, 4);
+  nd = ndims (A);
 
   if (k == 0)
     B = A;
   elseif (k == 1)
-    B = flipud (A.');
+    B = flipud (permute (A, [2 1 3:1:nd]));
   elseif (k == 2)
-    B = flipud (fliplr (A));
+    idx(1:nd) = {':'};
+    idx{1} = rows (A):-1:1;
+    idx{2} = columns (A):-1:1;
+    B = A(idx{:});
   elseif (k == 3)
-    B = (flipud (A)).';
+    B = permute (flipud (A), [2 1 3:1:nd]);
   else
     error ("rot90: internal error!");
   endif
@@ -94,7 +100,39 @@
 %! assert (rot90 (x1, 5), x2);
 %! assert (rot90 (x1, -1), x4);
 
-%% Test input validation
+## Test NDArrays
+%!test
+%! a(1:2,1:2,1) = [1 2; 3 4];
+%! a(1:2,1:2,2) = [5 6; 7 8];
+%! b(1:2,1:2,1) = [2 4; 1 3];
+%! b(1:2,1:2,2) = [6 8; 5 7];
+%! assert (rot90 (a, 1), b)
+%! assert (rot90 (a, 2), rot90 (b, 1))
+%! assert (rot90 (a, 3), rot90 (b, 2))
+
+%!test
+%! a = b = zeros (2, 2, 1, 2);
+%! a(1:2,1:2,:,1) = [1 2; 3 4];
+%! a(1:2,1:2,:,2) = [5 6; 7 8];
+%! b(1:2,1:2,:,1) = [2 4; 1 3];
+%! b(1:2,1:2,:,2) = [6 8; 5 7];
+%! assert (rot90 (a, 1), b)
+%! assert (rot90 (a, 2), rot90 (b, 1))
+%! assert (rot90 (a, 3), rot90 (b, 2))
+
+## With non-square matrices
+%!test
+%! a = zeros (3, 2, 1, 2);
+%! b = zeros (2, 3, 1, 2);
+%! a(1:2,1:3,:,1) = [ 1  2  3;  4  5  6];
+%! a(1:2,1:3,:,2) = [ 7  8  9; 10 11 12];
+%! b(1:3,1:2,:,1) = [ 3  6;  2  5;  1  4];
+%! b(1:3,1:2,:,2) = [ 9 12;  8 11;  7 10];
+%! assert (rot90 (a, 1), b)
+%! assert (rot90 (a, 2), rot90 (b, 1))
+%! assert (rot90 (a, 3), rot90 (b, 2))
+
+## Test input validation
 %!error rot90 ()
 %!error rot90 (1, 2, 3)
 %!error rot90 (1, ones (2))
--- a/scripts/general/rotdim.m
+++ b/scripts/general/rotdim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman
+## Copyright (C) 2004-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -51,7 +51,7 @@
 ## rotdim ([1, 2; 3, 4], 7, [1, 2])
 ## @end group
 ## @end example
-## @seealso{rot90, flipud, fliplr, flipdim}
+## @seealso{rot90, fliplr, flipud, flip}
 ## @end deftypefn
 
 function y = rotdim (x, n, plane)
@@ -61,7 +61,7 @@
   endif
 
   if (nargin > 1 && ! isempty (n))
-    if (!isscalar (n) || !isreal (n) || fix (n) != n)
+    if (! isscalar (n) || ! isreal (n) || fix (n) != n)
       error ("rotdim: N must be a scalar integer");
     endif
   else
@@ -107,16 +107,16 @@
   if (n == 0)
     y = x;
   elseif (n == 2)
-    y = flipdim (flipdim (x, plane(1)), plane(2));
+    y = flip (flip (x, plane(1)), plane(2));
   elseif (n == 1 || n == 3)
     perm = 1:nd;
     perm(plane(1)) = plane(2);
     perm(plane(2)) = plane(1);
     y = permute (x, perm);
     if (n == 1)
-      y = flipdim (y, min (plane));
+      y = flip (y, min (plane));
     else
-      y = flipdim (y, max (plane));
+      y = flip (y, max (plane));
     endif
   else
     error ("rotdim: internal error!");
@@ -152,8 +152,8 @@
 %!assert (rotdim (m, 3), rotdim (m, -1))
 %!assert (rotdim (m, 1), rotdim (m))
 
-## FIXME -- we need tests for multidimensional arrays and different
-## values of PLANE.
+## FIXME: We need tests for multidimensional arrays
+##        and different values of PLANE.
 
 %!error rotdim ()
 %!error rotdim (1, 2, 3, 4)
--- a/scripts/general/saveobj.m
+++ b/scripts/general/saveobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/shift.m
+++ b/scripts/general/shift.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -87,7 +87,7 @@
 %! assert (shift (m, 1), [c; a; b]);
 %! assert (shift (m, -2), [c; a; b]);
 
-%% Test input validation
+## Test input validation
 %!error shift ()
 %!error shift (1, 2, 3, 4)
 %!error shift ([], 1)
--- a/scripts/general/shiftdim.m
+++ b/scripts/general/shiftdim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John Eaton and David Bateman
+## Copyright (C) 2004-2015 John Eaton and David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
 ##    @result{} ns = 1
 ## @end group
 ## @end example
-## @seealso {reshape, permute, ipermute, circshift, squeeze}
+## @seealso{reshape, permute, ipermute, circshift, squeeze}
 ## @end deftypefn
 
 function [y, ns]  = shiftdim (x, n)
@@ -93,7 +93,7 @@
 
 %!assert (size (shiftdim (rand (0, 1, 2))), [0 1 2])
 
-%% Test input validation
+## Test input validation
 %!error (shiftdim ())
 %!error (shiftdim (1,2,3))
 %!error (shiftdim (1, ones (2)))
--- a/scripts/general/sortrows.m
+++ b/scripts/general/sortrows.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Daniel Calvelo
+## Copyright (C) 2000-2015 Daniel Calvelo
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -127,7 +127,7 @@
 %! assert (x, full (sx));
 %! assert (idx, sidx);
 
-%% Test input validation
+## Test input validation
 %!error sortrows ()
 %!error sortrows (1, 2, 3)
 %!error sortrows (1, "ascend")
--- a/scripts/general/sph2cart.m
+++ b/scripts/general/sph2cart.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/structfun.m
+++ b/scripts/general/structfun.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -106,7 +106,8 @@
   [varargout{:}] = cellfun (func, struct2cell (S), varargin{:});
 
   if (! uniform_output)
-    varargout = cellfun ("cell2struct", varargout, {fieldnames(S)}, {1}, uo_str, false);
+    varargout = cellfun ("cell2struct", varargout, {fieldnames(S)}, {1}, ...
+                         uo_str, false);
   endif
 endfunction
 
--- a/scripts/general/subsindex.m
+++ b/scripts/general/subsindex.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/general/trapz.m
+++ b/scripts/general/trapz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -104,7 +104,7 @@
   if (! have_xy)
     z = 0.5 * sum (x(idx1{:}) + x(idx2{:}), dim);
   else
-    if (isvector (x) && !isvector (y))
+    if (isvector (x) && ! isvector (y))
       if (length (x) != sz(dim))
         error ("trapz: length of X and length of Y along DIM must match");
       endif
--- a/scripts/general/triplequad.m
+++ b/scripts/general/triplequad.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -65,7 +65,8 @@
     varargin = {};
   endif
 
-  q = dblquad (@(y, z) inner (y, z, f, xa, xb, tol, quadf, varargin{:}), ya, yb, za, zb, tol);
+  q = dblquad (@(y, z) inner (y, z, f, xa, xb, tol, quadf, varargin{:}), ...
+               ya, yb, za, zb, tol);
 
 endfunction
 
@@ -79,7 +80,7 @@
 
 %!assert (triplequad (@(x,y,z) exp (-x.^2 - y.^2 - z.^2) , -1, 1, -1, 1, -1, 1, [], @quadcc), pi^(3/2) * erf (1).^3, 1e-6)
 
-%% These tests are too expensive to run normally (~30 sec each).  Disable them
+## These tests are too expensive to run normally (~30 sec each).  Disable them
 #%!assert (triplequad (@(x,y,z) exp (-x.^2 - y.^2 - z.^2) , -1, 1, -1, 1, -1, 1, [], @quadgk), pi^(3/2) * erf (1).^3, 1e-6)
 #%!#assert (triplequad (@(x,y,z) exp (-x.^2 - y.^2 - z.^2) , -1, 1, -1, 1, -1, 1, [], @quadl), pi^(3/2) * erf (1).^3, 1e-6)
 #%!#assert (triplequad (@(x,y,z) exp (-x.^2 - y.^2 - z.^2) , -1, 1, -1, 1, -1, 1, [], @quadv), pi^(3/2) * erf (1).^3, 1e-6)
new file mode 100644
--- /dev/null
+++ b/scripts/general/validateattributes.m
@@ -0,0 +1,433 @@
+## Copyright (C) 2013-2015 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} validateattributes (@var{A}, @var{classes}, @var{attributes})
+## @deftypefnx {Function File} {} validateattributes (@var{A}, @var{classes}, @var{attributes}, @var{arg_idx})
+## @deftypefnx {Function File} {} validateattributes (@var{A}, @var{classes}, @var{attributes}, @var{func_name})
+## @deftypefnx {Function File} {} validateattributes (@var{A}, @var{classes}, @var{attributes}, @var{func_name}, @var{arg_name})
+## @deftypefnx {Function File} {} validateattributes (@var{A}, @var{classes}, @var{attributes}, @var{func_name}, @var{arg_name}, @var{arg_idx})
+## Check validity of input argument.
+##
+## Confirms that the argument @var{A} is valid by belonging to one of
+## @var{classes}, and holding all of the @var{attributes}.  If it does not,
+## an error is thrown, with a message formatted accordingly.  The error
+## message can be made further complete by the function name @var{fun_name},
+## the argument name @var{arg_name}, and its position in the input
+## @var{arg_idx}.
+##
+## @var{classes} must be a cell array of strings (an empty cell array is
+## allowed) with the name of classes (remember that a class name is case
+## sensitive).  In addition to the class name, the following categories
+## names are also valid:
+##
+## @table @asis
+## @item @qcode{"float"}
+## Floating point value comprising classes @qcode{"double"} and
+## @qcode{"single"}.
+##
+## @item @qcode{"integer"}
+## Integer value comprising classes (u)int8, (u)int16, (u)int32, (u)int64.
+##
+## @item @qcode{"numeric"}
+## Numeric value comprising either a floating point or integer value.
+##
+## @end table
+##
+## @var{attributes} must be a cell array with names of checks for @var{A}.
+## Some of them require an additional value to be supplied right after the
+## name (see details for each below).
+##
+## @table @asis
+## @item @qcode{"<="}
+## All values are less than or equal to the following value in @var{attributes}.
+##
+## @item @qcode{"<"}
+## All values are less than the following value in @var{attributes}.
+##
+## @item @qcode{">="}
+## All values are greater than or equal to the following value in
+## @var{attributes}.
+##
+## @item @qcode{">"}
+## All values are greater than the following value in @var{attributes}.
+##
+## @item @qcode{"2d"}
+## A 2-dimensional matrix.  Note that vectors and empty matrices have
+## 2 dimensions, one of them being of length 1, or both length 0.
+##
+## @item @qcode{"3d"}
+## Has no more than 3 dimensions.  A 2-dimensional matrix is a 3-D matrix
+## whose 3rd dimension is of length 1.
+##
+## @item @qcode{"binary"}
+## All values are either 1 or 0.
+##
+## @item @qcode{"column"}
+## Values are arranged in a single column.
+##
+## @item @qcode{"decreasing"}
+## No value is @var{NaN}, and each is less than the preceding one.
+##
+## @item @qcode{"even"}
+## All values are even numbers.
+##
+## @item @qcode{"finite"}
+## All values are finite.
+##
+## @item @qcode{"increasing"}
+## No value is @var{NaN}, and each is greater than the preceding one.
+##
+## @item @qcode{"integer"}
+## All values are integer.  This is different than using @code{isinteger}
+## which only checks its an integer type.  This checks that each value in
+## @var{A} is an integer value, i.e., it has no decimal part.
+##
+## @item @qcode{"ncols"}
+## Has exactly as many columns as the next value in @var{attributes}.
+##
+## @item @qcode{"ndims"}
+## Has exactly as many dimensions as the next value in @var{attributes}.
+##
+## @item @qcode{"nondecreasing"}
+## No value is @var{NaN}, and each is greater than or equal to the preceding
+## one.
+##
+## @item @qcode{"nonempty"}
+## It is not empty.
+##
+## @item @qcode{"nonincreasing"}
+## No value is @var{NaN}, and each is less than or equal to the preceding one.
+##
+## @item @qcode{"nonnan"}
+## No value is a @code{NaN}.
+##
+## @item @qcode{"non-negative"}
+## All values are non negative.
+##
+## @item @qcode{"nonsparse"}
+## It is not a sparse matrix.
+##
+## @item @qcode{"nonzero"}
+## No value is zero.
+##
+## @item @qcode{"nrows"}
+## Has exactly as many rows as the next value in @var{attributes}.
+##
+## @item @qcode{"numel"}
+## Has exactly as many elements as the next value in @var{attributes}.
+##
+## @item @qcode{"odd"}
+## All values are odd numbers.
+##
+## @item @qcode{"positive"}
+## All values are positive.
+##
+## @item @qcode{"real"}
+## It is a non-complex matrix.
+##
+## @item @qcode{"row"}
+## Values are arranged in a single row.
+##
+## @item @qcode{"scalar"}
+## It is a scalar.
+##
+## @item @qcode{"size"}
+## Its size has length equal to the values of the next in @var{attributes}.
+## The next value must is an array with the length for each dimension.  To
+## ignore the check for a certain dimension, the value of @code{NaN} can be
+## used.
+##
+## @item @qcode{"square"}
+## Is a square matrix.
+##
+## @item @qcode{"vector"}
+## Values are arranged in a single vector (column or vector).
+##
+## @end table
+##
+## @seealso{isa, validatestring, inputParser}
+## @end deftypefn
+
+function validateattributes (A, cls, attr, varargin)
+  if (nargin < 3 || nargin > 6)
+    print_usage ();
+  elseif (! iscellstr (cls))
+    error ("validateattributes: CLASSES must be a cell array of strings");
+  elseif (! iscell (attr))
+    error ("validateattributes: ATTRIBUTES must be a cell array");
+  endif
+
+  ## Built start of error message from the extra optional arguments
+  func_name = "";
+  var_name  = "input";
+  if (nargin > 3)
+    fourth = varargin{1};
+    if (ischar (fourth))
+      func_name = [fourth ": "];
+    elseif (nargin == 4 && valid_arg_idx (fourth))
+      var_name = sprintf ("input %d", fourth);
+    else
+      error ("validateattributes: 4th input argument must be ARG_IDX or FUNC_NAME");
+    endif
+
+    if (nargin > 4)
+      var_name = varargin{2};
+      if (! ischar (var_name))
+        error ("validateattributes: VAR_NAME must be a string");
+      endif
+
+      if (nargin > 5)
+        arg_idx = varargin{3};
+        if (! valid_arg_idx (arg_idx))
+          error ("validateattributes: ARG_IDX must be a positive integer");
+        endif
+        var_name = sprintf ("%s (argument #%i)", var_name, arg_idx);
+      endif
+    endif
+  endif
+  err_ini = [func_name var_name];
+
+  check_cl = isa (A, cls);
+  if (! isempty (check_cl) && ! any (check_cl))
+    ## Allowing for an empty list of classes is Matlab incompatible but
+    ## that should count as a just a Matlab bug, not an incompatibility.
+
+    ## Replace the category names with the classes that belong to it.
+    integer = { "int8"  "int16"  "int32"  "int64" ...
+               "uint8" "uint16" "uint32" "uint64"};
+    float   = {"single" "double"};
+    numeric = {integer{:} float{:}};
+    cls = replace_cl_group (cls, "integer", integer);
+    cls = replace_cl_group (cls, "float",   float  );
+    cls = replace_cl_group (cls, "numeric", numeric);
+    cls = unique (cls);
+
+    classes = sprintf (" %s", cls{:});
+    error ("%s must be of class:\n\n %s\n\nbut was of class %s",
+           err_ini, classes, class (A));
+  endif
+
+  ## We use a while loop because some attributes require the following value
+  ## in the cell array. Also, we can't just get the boolean value for the
+  ## test and check at the end the error message since some of the tests
+  ## require some more complex error message.
+
+  ## It may look like that we don't perform enough input check in this
+  ## function (e.g., we don't check if there's a value after the size
+  ## attribute). The reasoning is that this will be a function mostly used
+  ## by developers with fairly static input so any problem would be caught
+  ## immediately during that functino development, it's no dependent on the
+  ## final user input. In addition, it can be called so many times at the
+  ## start of every function, we want it to run specially fast.
+  idx = 1;
+  problem = false; # becomes true when one of the tests fails
+  while (idx <= numel (attr))
+    ## TODO: once we use this in Octave core, it might be worthy to find
+    ## which attributes are checked more often, and place them in that
+    ## order inside the switch block.
+    switch (tolower (attr{idx++}))
+      case "2d",            problem = ndims (A) != 2;
+      case "3d",            problem = ndims (A) > 3;
+      case "column",        problem = ! iscolumn (A);
+      case "row",           problem = ! isrow (A);
+      case "scalar",        problem = ! isscalar (A);
+      case "vector",        problem = ! isvector (A);
+      case "square",        problem = ! issquare (A);
+      case "nonempty",      problem = isempty (A);
+      case "nonsparse",     problem = issparse (A);
+      case "binary",        problem = ! islogical (A) && ...
+                                      any ((A(:) != 1) & (A(:) != 0));
+      case "even",          problem = any (rem (A(:), 2) != 0);
+      case "odd",           problem = any (mod (A(:), 2) != 1);
+      case "integer",       problem = ! isinteger (A) && ...
+                                      any (ceil (A(:)) != A(:));
+      case "real",          problem = ! isreal (A);
+      case "finite",        problem = ! isinteger (A) && ...
+                                      ! all (isfinite (A(:)));
+      case "nonnan",        problem = ! isinteger (A) && ...
+                                      any (isnan (A(:)));
+      case "nonnegative",   problem = any (A(:) < 0);
+      case "nonzero",       problem = any (A(:) == 0);
+      case "positive",      problem = any (A(:) <= 0);
+      case "decreasing",    problem = (any (isnan (A(:)))
+                                       || any (diff (A(:)) >= 0));
+      case "increasing",    problem = (any (isnan (A(:)))
+                                       || any (diff (A(:)) <= 0));
+      case "nondecreasing", problem = (any (isnan (A(:)))
+                                       || any (diff (A(:)) <  0));
+      case "nonincreasing", problem = (any (isnan (A(:)))
+                                       || any (diff (A(:)) >  0));
+      case "size",
+        A_size = size (A);
+        w_size = attr{idx++};
+        A_size(isnan (w_size)) = NaN;
+        if (! isequaln (A_size, w_size))
+          A_size_str = sprintf ("%dx", size (A))(1:end-1);
+          w_size_str = sprintf ("%ix", w_size)(1:end-1);
+          w_size_str = strrep (w_size_str, "NaN", "N");
+          error ("%s must be of size %s but was %s", err_ini, w_size_str, A_size_str);
+        endif
+      case "numel",
+        if (numel (A) != attr{idx++})
+          error ("%s must have %d elements", err_ini, attr{idx-1});
+        endif
+      case "ncols",
+        if (columns (A) != attr{idx++})
+          error ("%s must have %d columns", err_ini, attr{idx-1});
+        endif
+      case "nrows",
+        if (rows (A) != attr{idx++})
+          error ("%s must have %d rows", err_ini, attr{idx-1});
+        endif
+      case "ndims",
+        ## Note that a [4 5 1] matrix is not considered to have ndims == 3
+        ## but is ok for "3d". This is not a bug.
+        if (ndims (A) != attr{idx++})
+          error ("%s must have %d dimensions", err_ini, attr{idx-1});
+        endif
+      case ">"
+        if (! all (A(:) > attr{idx++}))
+          error ("%s must be greater than %f", err_ini, attr{idx-1});
+        endif
+      case ">="
+        if (! all (A(:) >= attr{idx++}))
+          error ("%s must be greater than or equal to %f", err_ini, attr{idx-1});
+        endif
+      case "<"
+        if (! all (A(:) < attr{idx++}))
+          error ("%s must be less than %f", err_ini, attr{idx-1});
+        endif
+      case "<="
+        if (! all (A(:) <= attr{idx++}))
+          error ("%s must be less than or equal to %f", err_ini, attr{idx-1});
+        endif
+      otherwise
+        error ("validateattributes: unknown ATTRIBUTE %s", attr{idx-1});
+    endswitch
+    if (problem)
+      error ("%s must be %s", err_ini, attr{idx-1});
+    endif
+  endwhile
+endfunction
+
+function retval = valid_arg_idx (arg)
+  retval = isnumeric (arg) && isscalar (arg) && arg > 0 && arg == fix (arg);
+endfunction
+
+function cls = replace_cl_group (cls, name, group)
+  num_pos = strcmpi (cls, name);
+  if (any (num_pos))
+    cls(num_pos) = [];
+    cls(end+1:end+numel(group)) = group;
+  endif
+endfunction
+
+
+%!error <double> validateattributes (rand (5), {"uint8"}, {})
+%!error <single> validateattributes (uint8 (rand (5)), {"float"}, {})
+%!error <2d> validateattributes (rand (5, 5, 5), {}, {"2d"})
+%!error <3d> validateattributes (rand (5, 5, 5, 7), {}, {"3d"})
+%!error <column> validateattributes (rand (5, 5), {}, {"column"})
+%!error <column> validateattributes (rand (1, 5), {}, {"column"})
+%!error <row> validateattributes (rand (5, 5), {}, {"row"})
+%!error <row> validateattributes (rand (5, 1), {}, {"row"})
+%!error <scalar> validateattributes (rand (1, 5), {}, {"scalar"})
+%!error <vector> validateattributes (rand (5), {}, {"vector"})
+%!error <square> validateattributes (rand (5, 6), {}, {"square"})
+%!error <nonempty> validateattributes ([], {}, {"nonempty"})
+%!error <nonsparse> validateattributes (sparse(rand(5)), {}, {"nonsparse"})
+%!error <binary> validateattributes ("text", {}, {"binary"})
+%!error <binary> validateattributes ([0 1 0 3 0], {}, {"binary"})
+%!error <even> validateattributes ([2 3 6 8], {}, {"even"})
+%!error <even> validateattributes ([2 NaN], {}, {"even"})
+%!error <odd> validateattributes ([3 4 7 5], {}, {"odd"})
+%!error <odd> validateattributes ([5 NaN], {}, {"odd"})
+%!error <integer> validateattributes ([5 5.2 5.7], {}, {"integer"})
+%!error <real> validateattributes ([5i 8 9], {}, {"real"})
+%!error <finite> validateattributes ([5i Inf 8], {}, {"finite"})
+%!error <nonnan> validateattributes ([NaN Inf 8], {}, {"nonnan"})
+%!error <nonnegative> validateattributes ([7 8 -9], {}, {"nonnegative"})
+%!error <nonzero> validateattributes ([7 8 0], {}, {"nonzero"})
+%!error <positive> validateattributes ([7 0 8], {}, {"positive"})
+%!error <decreasing> validateattributes ([7 8 4 3 -5], {}, {"decreasing"})
+%!error <decreasing> validateattributes ([7 NaN 4 3 -5], {}, {"decreasing"})
+%!error <increasing> validateattributes ([7 8 4 9 20], {}, {"increasing"})
+%!error <increasing> validateattributes ([7 8 NaN 9 20], {}, {"increasing"})
+%!error <nonincreasing> validateattributes ([7 8 4 9 20], {}, {"nonincreasing"})
+%!error <nonincreasing> validateattributes ([7 8 NaN 9 20], {}, {"nonincreasing"})
+%!error <nondecreasing> validateattributes ([7 8 4 3 -5], {}, {"nondecreasing"})
+%!error <nondecreasing> validateattributes ([7 NaN 4 3 -5], {}, {"nondecreasing"})
+%!error <size> validateattributes (ones (5, 3, 6), {}, {"size", [5 4 7]})
+%!error <size> validateattributes (ones (5, 3, 6), {}, {"size", [5 NaN 7]})
+%!error <size> validateattributes (ones (5, 3, 6), {}, {"size", [5 3 6 2]})
+%!error <elements> validateattributes (ones (6, 3), {}, {"numel", 12})
+%!error <columns> validateattributes (ones (6, 2), {}, {"ncols", 3})
+%!error <rows> validateattributes (ones (6, 2), {}, {"nrows", 3})
+%!error <dimensions> validateattributes (ones (6, 2, 6, 3), {}, {"ndims", 3})
+%!error <greater than> validateattributes ([6 7 8 5], {}, {">", 5})
+%!error <greater than> validateattributes ([6 7 8 5], {}, {">=", 6})
+%!error <less than> validateattributes ([6 7 8 5], {}, {"<", 8})
+%!error <less than> validateattributes ([6 7 8 5], {}, {"<=", 7})
+
+%!test
+%! validateattributes (rand (5), {"numeric"}, {})
+%! validateattributes (rand (5), {"float"}, {})
+%! validateattributes (rand (5), {"double"}, {})
+%! validateattributes ("text", {"char"}, {})
+%! validateattributes (rand (5), {}, {"2d"})
+%! validateattributes (rand (5), {}, {"3d"})
+%! validateattributes (rand (5, 5, 5), {}, {"3d"})
+%! validateattributes (rand (5, 1), {}, {"column"})
+%! validateattributes (rand (1, 5), {}, {"row"})
+%! validateattributes ("a", {}, {"scalar"})
+%! validateattributes (5, {}, {"scalar"})
+%! validateattributes (rand (1, 5), {}, {"vector"})
+%! validateattributes (rand (5, 1), {}, {"vector"})
+%! validateattributes (rand (5), {}, {"square"})
+%! validateattributes (rand (5), {}, {"nonempty"})
+%! validateattributes (rand (5), {}, {"nonsparse"})
+%! validateattributes ([0 1 0 1 0], {}, {"binary"})
+%! validateattributes (rand (5) > 0.5, {}, {"binary"})
+%! validateattributes ([8 4 0 6], {}, {"even"})
+%! validateattributes ([-1 3 5], {}, {"odd"})
+%! validateattributes ([8 4 0 6], {}, {"real"})
+%! validateattributes ([8 4i 0 6], {}, {"finite"})
+%! validateattributes (uint8 ([8 4]), {}, {"finite"})
+%! validateattributes ([8 Inf], {}, {"nonnan"})
+%! validateattributes ([0 7 4], {}, {"nonnegative"})
+%! validateattributes ([-8 7 4], {}, {"nonzero"})
+%! validateattributes ([8 7 4], {}, {"positive"})
+%! validateattributes ([8 7 4 -5], {}, {"decreasing"})
+%! validateattributes ([-8 -7 4 5], {}, {"increasing"})
+%! validateattributes ([8 4 4 -5], {}, {"nonincreasing"})
+%! validateattributes ([-8 -8 4 5], {}, {"nondecreasing"})
+%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 7 2]})
+%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 NaN 7 2]})
+%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 NaN 2 NaN]})
+%! validateattributes (rand (6, 2), {}, {"numel", 12})
+%! validateattributes (rand (6, 2), {}, {"ncols", 2})
+%! validateattributes (rand (6, 2), {}, {"nrows", 6})
+%! validateattributes (rand (6, 2, 4, 5), {}, {"ndims", 4})
+%! validateattributes ([4 5 6 7], {}, {">", 3})
+%! validateattributes ([4 5 6 7], {}, {">=", 4})
+%! validateattributes ([4 5 6 7], {}, {"<", 8})
+%! validateattributes ([4 5 6 7], {}, {"<=", 7})
+
+%!test
+%! validateattributes ([0 1 0 1], {"double", "uint8"}, {"binary", "size", [NaN 4], "nonnan"})
--- a/scripts/geometry/convhull.m
+++ b/scripts/geometry/convhull.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -100,5 +100,5 @@
 %! y = abs (sin (x));
 %! assert (convhull (x, y), [1;7;13;12;11;10;4;3;2;1]);
 
-%% FIXME: Need input validation tests
+## FIXME: Need input validation tests
 
--- a/scripts/geometry/delaunay.m
+++ b/scripts/geometry/delaunay.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -17,22 +17,32 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} delaunay (@var{x}, @var{y})
-## @deftypefnx {Function File} {} delaunay (@var{x})
-## @deftypefnx {Function File} {} delaunay (@dots{}, @var{options})
-## @deftypefnx {Function File} {@var{tri} =} delaunay (@dots{})
-## Compute the Delaunay triangulation for a 2-D set of points.
-## The return value @var{tri} is a set of triangles which satisfies the
-## Delaunay circum-circle criterion, i.e., only a single data point from
-## [@var{x}, @var{y}] is within the circum-circle of the defining triangle.
-## The input @var{x} may also be a matrix with two columns where the first
-## column contains x-data and the second y-data.
+## @deftypefn  {Function File} {@var{tri} =} delaunay (@var{x}, @var{y})
+## @deftypefnx {Function File} {@var{tetr} =} delaunay (@var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {@var{tri} =} delaunay (@var{x})
+## @deftypefnx {Function File} {@var{tri} =} delaunay (@dots{}, @var{options})
+## Compute the Delaunay triangulation for a 2-D or 3-D set of points.
 ##
-## The set of triangles @var{tri} is a matrix of size [n, 3].  Each
-## row defines a triangle and the three columns are the three vertices
-## of the triangle.  The value of @code{@var{tri}(i,j)} is an index into
-## @var{x} and @var{y} for the location of the j-th vertex of the i-th
-## triangle.
+## For 2-D sets, the return value @var{tri} is a set of triangles which
+## satisfies the Delaunay circum-circle criterion, i.e., only a single data
+## point from [@var{x}, @var{y}] is within the circum-circle of the defining
+## triangle.  The set of triangles @var{tri} is a matrix of size [n, 3].  Each
+## row defines a triangle and the three columns are the three vertices of the
+## triangle.  The value of @code{@var{tri}(i,j)} is an index into @var{x} and
+## @var{y} for the location of the j-th vertex of the i-th triangle.
+##
+## For 3-D sets, the return value @var{tetr} is a set of tetrahedrons which
+## satisfies the Delaunay circum-circle criterion, i.e., only a single data
+## point from [@var{x}, @var{y}, @var{z}] is within the circum-circle of the
+## defining tetrahedron.  The set of tetrahedrons is a matrix of size [n, 4].
+## Each row defines a tetrahedron and the four columns are the four vertices of
+## the tetrahedron.  The value of @code{@var{tetr}(i,j)} is an index into
+## @var{x}, @var{y}, @var{z} for the location of the j-th vertex of the i-th
+## tetrahedron.
+##
+## The input @var{x} may also be a matrix with two or three columns where the
+## first column contains x-data, the second y-data, and the optional third
+## column contains z-data.
 ##
 ## The optional last argument, which must be a string or cell array of strings,
 ## contains options passed to the underlying qhull command.
@@ -45,63 +55,84 @@
 ## To append user options to the defaults it is necessary to repeat the
 ## default arguments in @var{options}.  Use a null string to pass no arguments.
 ##
-## If no output argument is specified the resulting Delaunay triangulation
-## is plotted along with the original set of points.
-##
 ## @example
 ## @group
 ## x = rand (1, 10);
 ## y = rand (1, 10);
-## T = delaunay (x, y);
-## VX = [ x(T(:,1)); x(T(:,2)); x(T(:,3)); x(T(:,1)) ];
-## VY = [ y(T(:,1)); y(T(:,2)); y(T(:,3)); y(T(:,1)) ];
+## tri = delaunay (x, y);
+## triplot (tri, x, y);
+## hold on;
+## plot (x, y, "r*");
 ## axis ([0,1,0,1]);
-## plot (VX, VY, "b", x, y, "r*");
 ## @end group
 ## @end example
-## @seealso{delaunay3, delaunayn, convhull, voronoi, triplot, trimesh, trisurf}
+## @seealso{delaunayn, convhull, voronoi, triplot, trimesh, tetramesh, trisurf}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
 
 function tri = delaunay (varargin)
 
-  if (nargin < 1 || nargin > 3)
+  if (nargin < 1 || nargin > 4)
     print_usage ();
   endif
 
+  z = [];
   options = [];
 
   switch (nargin)
 
     case 1
-      if (! ismatrix (varargin{1}) || columns (varargin{1}) != 2)
-          error ("delaunay: X must be a matrix with 2 columns");
+      if (! ismatrix (varargin{1})
+          || (columns (varargin{1}) != 2 && columns (varargin{1}) != 3))
+          error ("delaunay: X must be a matrix with 2 or 3 columns");
       else
         x = varargin{1}(:,1);
         y = varargin{1}(:,2);
+        if (columns (varargin{1}) == 3)
+          z = varargin{1}(:,3);
+        endif
       endif
 
     case 2
       if (isnumeric (varargin{2}))
         x = varargin{1};
         y = varargin{2};
-      elseif (ischar (varargin{2}) || iscellstr (varargin{2}))
+      elseif (! (ischar (varargin{2}) || iscellstr (varargin{2})))
+        error ("delaunay: OPTIONS must be a string or cell array of strings");
+      else
         options = varargin{2};
-        if (! ismatrix (varargin{1}) && columns (varargin{1}) != 2)
-            error ("delaunay: X must be a matrix with 2 columns");
+        ncols = columns (varargin{1});
+
+        if (! ismatrix (varargin{1}) || (ncols != 2 && ncols != 3))
+          error ("delaunay: X must be a matrix with 2 or 3 columns");
         else
           x = varargin{1}(:,1);
           y = varargin{1}(:,2);
+          if (ncols == 3)
+            z = varargin{1}(:,3);
+          endif
         endif
-      else
-        error ("delaunay: OPTIONS must be a string or cell array of strings");
       endif
 
     case 3
+      if (isnumeric (varargin{3}))
+        x = varargin{1};
+        y = varargin{2};
+        z = varargin{3};
+      elseif (! (ischar (varargin{3}) || iscellstr (varargin{3})))
+        error ("delaunay: OPTIONS must be a string or cell array of strings");
+      else
+        x = varargin{1};
+        y = varargin{2};
+        options = varargin{3};
+      endif
+
+    case 4
       x = varargin{1};
       y = varargin{2};
-      options = varargin{3};
+      z = varargin{3};
+      options = varargin{4};
 
       if (! (ischar (options) || iscellstr (options)))
         error ("delaunay: OPTIONS must be a string or cell array of strings");
@@ -109,20 +140,16 @@
 
   endswitch
 
-  if (! (isequal(size(x),size(y))))
-    error ("delaunay: X and Y must be the same size");
-  endif
-
-  T = delaunayn ([x(:), y(:)], options);
-
-  if (nargout == 0)
-    x = x(:).';
-    y = y(:).';
-    VX = [ x(T(:,1)); x(T(:,2)); x(T(:,3)); x(T(:,1)) ];
-    VY = [ y(T(:,1)); y(T(:,2)); y(T(:,3)); y(T(:,1)) ];
-    plot (VX, VY, "b", x, y, "r*");
+  if (isempty (z))
+    if (! size_equal (x, y))
+      error ("delaunay: X and Y must be the same size");
+    endif
+    tri = delaunayn ([x(:), y(:)], options);
   else
-    tri = T;
+    if (! size_equal (x, y, z))
+      error ("delaunay: X, Y, and Z must be the same size");
+    endif
+    tri = delaunayn ([x(:), y(:), z(:)], options);
   endif
 
 endfunction
@@ -134,11 +161,11 @@
 %! rand ("state", 1);
 %! x = rand (1,10);
 %! y = rand (1,10);
-%! T = delaunay (x,y);
-%! VX = [ x(T(:,1)); x(T(:,2)); x(T(:,3)); x(T(:,1)) ];
-%! VY = [ y(T(:,1)); y(T(:,2)); y(T(:,3)); y(T(:,1)) ];
+%! tri = delaunay (x,y);
 %! clf;
-%! plot (VX,VY,"b", x,y,"r*");
+%! triplot (tri, x, y);
+%! hold on;
+%! plot (x, y, "r*");
 %! axis ([0,1,0,1]);
 
 %!testif HAVE_QHULL
@@ -165,5 +192,19 @@
 %! y = [5 7 8; 1 2 3];
 %! assert (sortrows (sort (delaunay (x, y), 2)), [1,2,4;1,3,4;1,3,5;3,4,6]);
 
-%% FIXME: Need input validation tests
+## Test 3-D input
+%!testif HAVE_QHULL
+%! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1];
+%! assert (sortrows (sort (delaunay (x, y, z), 2)), [1,2,3,4;1,2,4,5])
 
+## Input validation tests
+%!error delaunay ()
+%!error delaunay (1,2,3,4,5)
+%!error <X must be a matrix with 2 or 3 columns> delaunay (ones (2,4))
+%!error <OPTIONS must be a string or cell array> delaunay (ones (2,2), struct())
+%!error <X must be a matrix with 2 or 3 columns> delaunay (ones (2,4), "")
+%!error <OPTIONS must be a string or cell array> delaunay (ones (2,2), ones (2,2), struct())
+%!error <OPTIONS must be a string or cell array> delaunay (ones (2,2), ones (2,2), ones (2,2), struct())
+%!error <X and Y must be the same size> delaunay (1, [1 2])
+%!error <X, Y, and Z must be the same size> delaunay (1, [1 2], [1 2])
+
--- a/scripts/geometry/delaunayn.m
+++ b/scripts/geometry/delaunayn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -47,7 +47,7 @@
 ## To append user options to the defaults it is necessary to repeat the
 ## default arguments in @var{options}.  Use a null string to pass no arguments.
 ##
-## @seealso{delaunay, delaunay3, convhulln, voronoin, trimesh, tetramesh}
+## @seealso{delaunay, convhulln, voronoin, trimesh, tetramesh}
 ## @end deftypefn
 
 function T = delaunayn (pts, varargin)
@@ -59,9 +59,9 @@
   T = __delaunayn__ (pts, varargin{:});
 
   if (isa (pts, "single"))
-    myeps = eps ("single");
+    tol = 1e3 * eps ("single");
   else
-    myeps = eps;
+    tol = 1e3 * eps;
   endif
 
   ## Try to remove the zero volume simplices.  The volume of the i-th simplex is
@@ -75,10 +75,10 @@
   ## prod(1:n) is dropped.
   idx = [];
   [nt, n] = size (T);
-  ## FIXME: Vectorize this for loop or convert to delaunayn to .oct function
+  ## FIXME: Vectorize this for loop or convert delaunayn to .oct function
   for i = 1:nt
     X = pts(T(i,1:end-1),:) - pts(T(i,2:end),:);
-    if (abs (det (X)) / sqrt (sum (X .^ 2, 2)) < 1e3 * myeps)
+    if (abs (det (X)) / sqrt (sumsq (X, 2)) < tol)
       idx(end+1) = i;
     endif
   endfor
@@ -87,7 +87,17 @@
 endfunction
 
 
-%% FIXME: Need tests for delaunayn
+%!testif HAVE_QHULL
+%! x = [-1, 0; 0, 1; 1, 0; 0, -1; 0, 0];
+%! assert (sortrows (sort (delaunayn (x), 2)), [1,2,5;1,4,5;2,3,5;3,4,5]);
 
-%% FIXME: Need input validation tests
+## Test 3-D input
+%!testif HAVE_QHULL
+%! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1];
+%! assert (sortrows (sort (delaunayn ([x(:) y(:) z(:)]), 2)), [1,2,3,4;1,2,4,5])
 
+## FIXME: Need tests for delaunayn
+
+## Input validation tests
+%!error delaunayn ()
+
--- a/scripts/geometry/dsearch.m
+++ b/scripts/geometry/dsearch.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/geometry/dsearchn.m
+++ b/scripts/geometry/dsearchn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/geometry/griddata.m
+++ b/scripts/geometry/griddata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -89,7 +89,7 @@
   elseif (strcmp (method, "nearest"))
     ## Search index of nearest point.
     idx = dsearch (x, y, tri, xi, yi);
-    valid = !isnan (idx);
+    valid = ! isnan (idx);
     zi(valid) = z(idx(valid));
 
   elseif (strcmp (method, "linear"))
@@ -97,7 +97,7 @@
     tri_list = tsearch (x, y, tri, xi(:), yi(:));
 
     ## Only keep the points within triangles.
-    valid = !isnan (tri_list);
+    valid = ! isnan (tri_list);
     tri_list = tri_list(valid);
     nr_t = rows (tri_list);
 
@@ -187,7 +187,7 @@
 %! zz2(isnan (zz)) = NaN;
 %! assert (zz, zz2, 100*eps);
 
-%% Test input validation
+## Test input validation
 %!error griddata ()
 %!error griddata (1)
 %!error griddata (1,2)
--- a/scripts/geometry/griddata3.m
+++ b/scripts/geometry/griddata3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/geometry/griddatan.m
+++ b/scripts/geometry/griddatan.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -62,7 +62,7 @@
   if (strcmp (method, "nearest"))
     ## search index of nearest point
     idx = dsearchn (x, tri, xi);
-    valid = !isnan (idx);
+    valid = ! isnan (idx);
     yi(valid) = y(idx(valid));
 
   elseif (strcmp (method, "linear"))
@@ -70,13 +70,13 @@
     [tri_list, bary_list] = tsearchn (x, tri, xi);
 
     ## only keep the points within triangles.
-    valid = !isnan (tri_list);
-    tri_list = tri_list(!isnan (tri_list));
-    bary_list = bary_list(!isnan (tri_list), :);
+    valid = ! isnan (tri_list);
+    tri_list = tri_list(! isnan (tri_list));
+    bary_list = bary_list(! isnan (tri_list), :);
     nr_t = rows (tri_list);
 
     ## assign x,y for each point of simplex
-    xt =  reshape (x(tri(tri_list,:),:), [nr_t, n+1, n]);
+    xt = reshape (x(tri(tri_list,:),:), [nr_t, n+1, n]);
     yt = y(tri(tri_list,:));
 
     ## Use barycentric coordinate of point to calculate yi
--- a/scripts/geometry/inpolygon.m
+++ b/scripts/geometry/inpolygon.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Frederick (Rick) A Niles
+## Copyright (C) 2006-2015 Frederick (Rick) A Niles
 ##               and Søren Hauberg
 ##
 ## This file is part of Octave.
@@ -18,13 +18,17 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{in}, @var{on}] =} inpolygon (@var{x}, @var{y}, @var{xv}, @var{yv})
+## @deftypefn  {Function File} {@var{in} =} inpolygon (@var{x}, @var{y}, @var{xv}, @var{yv})
+## @deftypefnx {Function File} {[@var{in}, @var{on}] =} inpolygon (@var{x}, @var{y}, @var{xv}, @var{yv})
 ##
-## For a polygon defined by vertex points @code{(@var{xv}, @var{yv})}, determine
-## if the points @code{(@var{x}, @var{y})} are inside or outside the polygon.
+## For a polygon defined by vertex points @code{(@var{xv}, @var{yv})}, return
+## true if the points @code{(@var{x}, @var{y})} are inside (or on the boundary)
+## of the polygon; Otherwise, return false.
+##
 ## The variables @var{x}, @var{y}, must have the same dimension.  The optional
-## output @var{on} gives the points that are on the polygon.
-##
+## output @var{on} returns true if the points are exactly on the polygon
+## edge, and false otherwise.
+## @seealso{delaunay}
 ## @end deftypefn
 
 ## Author: Frederick (Rick) A Niles <niles@rickniles.com>
@@ -34,8 +38,8 @@
 
 ## The method for determining if a point is in in a polygon is based on
 ## the algorithm shown on
-## http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ and is
-## credited to Randolph Franklin.
+## http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/
+## and is credited to Randolph Franklin.
 
 function [in, on] = inpolygon (x, y, xv, yv)
 
@@ -45,19 +49,15 @@
 
   if (! (isreal (x) && isreal (y) && ismatrix (y) && ismatrix (y)
          && size_equal (x, y)))
-    error ("inpolygon: first two arguments must be real matrices of same size");
+    error ("inpolygon: X and Y must be real matrices of the same size");
   elseif (! (isreal (xv) && isreal (yv) && isvector (xv) && isvector (yv)
              && size_equal (xv, yv)))
-    error ("inpolygon: last two arguments must be real vectors of same size");
+    error ("inpolygon: XV and YV must be real vectors of the same size");
   endif
 
   npol = length (xv);
-  do_boundary = (nargout >= 2);
 
-  in = zeros (size (x), "logical");
-  if (do_boundary)
-    on = zeros (size (x), "logical");
-  endif
+  in = on = false (size (x));
 
   j = npol;
   for i = 1 : npol
@@ -65,23 +65,24 @@
     delta_yv = yv(j) - yv(i);
     ## distance = [distance from (x,y) to edge] * length(edge)
     distance = delta_xv .* (y - yv(i)) - (x - xv(i)) .* delta_yv;
-    ##
-    ## is y between the y-values of edge i,j
-    ##        AND (x,y) on the left of the edge ?
+
+    ## is y between the y-values of edge i,j AND (x,y) on the left of the edge?
     idx1 = (((yv(i) <= y & y < yv(j)) | (yv(j) <= y & y < yv(i)))
             & 0 < distance.*delta_yv);
-    in (idx1) = !in (idx1);
+    in(idx1) = ! in(idx1);
 
     ## Check if (x,y) are actually on the boundary of the polygon.
-    if (do_boundary)
-       idx2 = (((yv(i) <= y & y <= yv(j)) | (yv(j) <= y & y <= yv(i)))
-               & ((xv(i) <= x & x <= xv(j)) | (xv(j) <= x & x <= xv(i)))
-               & (0 == distance | !delta_xv));
-       on (idx2) = true;
-    endif
+    idx2 = (((yv(i) <= y & y <= yv(j)) | (yv(j) <= y & y <= yv(i)))
+            & ((xv(i) <= x & x <= xv(j)) | (xv(j) <= x & x <= xv(i)))
+            & (0 == distance | !delta_xv));
+    on(idx2) = true;
+
     j = i;
   endfor
 
+  ## Matlab definition include both in polygon and on polygon points. 
+  in |= on;
+
 endfunction
 
 
@@ -119,8 +120,8 @@
 %!         0.82096, 0.60628];
 %! xa = [0:0.1:2.3];
 %! ya = [0:0.1:1.4];
-%! [x,y] = meshgrid (xa, ya);
-%! [in,on] = inpolygon (x, y, xv, yv);
+%! [x, y] = meshgrid (xa, ya);
+%! [in, on] = inpolygon (x, y, xv, yv);
 %! inside = in & !on;
 %!
 %! clf;
@@ -134,14 +135,19 @@
 %! disp ("and blue are on boundary.");
 
 %!test
-%! [in, on] = inpolygon ([1, 0], [1, 0], [-1, -1, 1, 1], [-1, 1, 1, -1]);
-%! assert (in, [false, true]);
-%! assert (on, [true, false]);
+%! [in, on] = inpolygon ([1, 0, 2], [1, 0, 0], [-1, -1, 1, 1], [-1, 1, 1, -1]);
+%! assert (in, [true, true, false]);
+%! assert (on, [true, false, false]);
 
-%% Test input validation
+## Test input validation
 %!error inpolygon ()
 %!error inpolygon (1, 2)
 %!error inpolygon (1, 2, 3)
-%!error inpolygon (1, [1,2], [3, 4], [5, 6])
-%!error inpolygon ([1,2], [3, 4], [5, 6], 1)
+%!error inpolygon (1, 2, 3, 4, 5)
+%!error <X and Y must be real matrices> inpolygon (1i, 1, [3, 4], [5, 6])
+%!error <X and Y must be real matrices> inpolygon (1, {1}, [3, 4], [5, 6])
+%!error <X and Y must be .* the same size> inpolygon (1, [1,2], [3, 4], [5, 6])
+%!error <XV and YV must be real vectors> inpolygon (1, 1, [3i, 4], [5, 6])
+%!error <XV and YV must be real vectors> inpolygon (1, 1, [3, 4], {5, 6})
+%!error <XV and YV must .* the same size> inpolygon ([1,2], [3, 4], [5, 6], 1)
 
--- a/scripts/geometry/module.mk
+++ b/scripts/geometry/module.mk
@@ -2,7 +2,6 @@
 
 geometry_FCN_FILES = \
   geometry/convhull.m \
-  geometry/delaunay3.m \
   geometry/delaunayn.m \
   geometry/delaunay.m \
   geometry/dsearch.m \
--- a/scripts/geometry/rectint.m
+++ b/scripts/geometry/rectint.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -18,100 +18,64 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{area} =} rectint (@var{a}, @var{b})
+## Compute area or volume of intersection of rectangles or ND boxes.
 ##
 ## Compute the area of intersection of rectangles in @var{a} and
-## rectangles in @var{b}.  Rectangles are defined as [x y width height]
-## where x and y are the minimum values of the two orthogonal
-## dimensions.
+## rectangles in @var{b}.  N dimensional boxes are supported in which
+## case the volume, or hypervolume is computed according to the number
+## of dimensions.
 ##
-## If @var{a} or @var{b} are matrices, then the output, @var{area}, is a
-## matrix where the i-th row corresponds to the i-th row of a and the j-th
-## column corresponds to the j-th row of b.
+## 2 dimensional rectangles are defined as @code{[xpos ypos width height]}
+## where xpos and ypos are the position of the bottom left corner.
+## Higher dimensions are supported where the coordinates for the minimum
+## value of each dimension follow the length of the box in that dimension,
+## e.g., @code{[xpos ypos zpos kpos @dots{} width height depth k_length @dots{}]}.
+##
+## Each row of @var{a} and @var{b} define a rectangle, and if both define
+## multiple rectangles, then the output, @var{area}, is a matrix where
+## the i-th row corresponds to the i-th row of a and the j-th column
+## corresponds to the j-th row of b.
 ##
 ## @seealso{polyarea}
 ## @end deftypefn
 
-## Author: Bill Denney <bill@denney.ws>
+## Author: 2015 Carnë Draug <carandraug@octave.org>
 
-function area = rectint (a, b)
+function dists = rectint (a, b)
 
   if (nargin != 2)
     print_usage ();
-  elseif (ndims (a) != 2 || ndims (b) != 2)
-    error ("rectint: expecting arguments to be 2-d arrays");
-  elseif (columns (a) != 4)
-    error ("rectint: A must have 4 columns");
-  elseif (columns (b) != 4)
-    error ("rectint: B must have 4 columns");
-  elseif (any ([a(:,3:4);b(:,3:4)](:) < 0))
-    error ("rectint: all widths and heights must be > 0");
-  endif
-
-  ## This runs faster if the number of rows of a is greater than the
-  ## number of rows of b.  Swap them and transpose to make it run
-  ## faster.
-  swapinputs = false ();
-  if (rows (a) > rows (b))
-    tmp = a;
-    a = b;
-    b = tmp;
-    swapinputs = true ();
+  elseif (columns (a) != columns (b))
+    error ("rectint: A and B must have same number of columns");
+  elseif (ndims (a) > 2)
+    error ("rectint: A and B must be 2-d arrays");
+  elseif (mod (columns (a), 2))
+    error ("rectint: number of columns of A and B must be a multiple of two");
   endif
 
-  area = zeros (rows (a), rows (b));
-  r1 = [a(:,1:2) a(:,1:2)+a(:,3:4)];
-  r2 = [b(:,1:2) b(:,1:2)+b(:,3:4)];
-  for i = 1:columns (area)
-    ## Find the location of each point relative to the other points.
-    r1x1small = r1(:,1) < r2(i,1);
-    r1x1large = r1(:,1) > r2(i,3);
-    r1x1mid = (r1(:,1) >= r2(i,1)) & (r1(:,1) <= r2(i,3));
-    r1x2small = r1(:,3) < r2(i,1);
-    r1x2large = r1(:,3) > r2(i,3);
-    r1x2mid = (r1(:,3) >= r2(i,1)) & (r1(:,3) <= r2(i,3));
+  nd = columns (a) / 2;
+  na = rows (a);
+  nb = rows (b);
 
-    r1y1small = r1(:,2) < r2(i,2);
-    r1y1large = r1(:,2) > r2(i,4);
-    r1y1mid = (r1(:,2) >= r2(i,2)) & (r1(:,2) <= r2(i,4));
-    r1y2small = r1(:,4) < r2(i,2);
-    r1y2large = r1(:,4) > r2(i,4);
-    r1y2mid = (r1(:,4) >= r2(i,2)) & (r1(:,4) <= r2(i,4));
+  a_start = a(:,1:nd);
+  b_start = b(:,1:nd);
+
+  a_end = a_start + a(:,nd+1:end);
+  b_end = b_start + b(:,nd+1:end);
 
-    ## determine the width of the rectangle
-    ## r1 completely encloses r2
-    area(r1x1small & r1x2large,i) = r2(i,3) - r2(i,1);
-    ## the range goes from r2x min to r1x max
-    mask = r1x1small & r1x2mid;
-    area(mask,i) = r1(mask,3) - r2(i,1);
-    ## the range goes from r1x min to r2x max
-    mask = r1x1mid & r1x2large;
-    area(mask,i) = r2(i,3) - r1(mask,1);
-    ## the range goes from r1x min to r1x max
-    mask = r1x1mid & r1x2mid;
-    area(mask,i) = r1(mask,3) - r1(mask,1);
+  a_start = reshape (a_start, [na 1 nd]);
+  b_start = reshape (b_start, [1 nb nd]);
 
-    ## determine the height of the rectangle
-    ## r1 completely encloses r2
-    area(r1y1small & r1y2large,i) .*= r2(i,4) - r2(i,2);
-    ## the range goes from r2y min to r1y max
-    mask = r1y1small & r1y2mid;
-    area(mask,i) .*= r1(mask,4) - r2(i,2);
-    ## the range goes from r1y min to r2y max
-    mask = r1y1mid & r1y2large;
-    area(mask,i) .*= r2(i,4) - r1(mask,2);
-    ## the range goes from r1x min to r1x max
-    mask = r1y1mid & r1y2mid;
-    area(mask,i) .*= r1(mask,4) - r1(mask,2);
+  a_end   = reshape (a_end,   [na 1 nd]);
+  b_end   = reshape (b_end,   [1 nb nd]);
 
-  endfor
-
-  if (swapinputs)
-    area = area';
-  endif
+  ## We get a 3d matrix where each dimension is in the 3rd dimension
+  dists = bsxfun (@min , a_end, b_end) - bsxfun (@max, a_start, b_start);
+  dists(dists < 0) = 0;
+  dists = prod (dists, 3);
 
 endfunction
 
-
 ## Exactly overlapping
 %!assert (rectint ([0 0 1 1], [0 0 1 1]), 1)
 ## rect2 completely enclosed by rect1
@@ -130,3 +94,23 @@
 %!assert (rectint ([0 0 1 1;0.5 0.5 1 1;-1 -1 2 2], [1 1 2 2]), [0;0.25;0])
 %!assert (rectint ([1 1 2 2], [0 0 1 1;0.5 0.5 1 1;-1 -1 2 2]), [0 0.25 0])
 
+## bug #44904
+%!assert (rectint ([0 0 5 5], [6 6 5 5]), 0)
+%!assert (rectint ([0 0 5 5], [0 6 5 5]), 0)
+%!assert (rectint ([0 0 5 5], [6 0 5 5]), 0)
+%!assert (rectint ([0 0 0 5 5 5], [0 0 6 5 5 5]), 0)
+
+## Test volumes
+%!shared r1, r2, r3, r4, r5
+%! r1 = [  5   3 0  7   5 2];
+%! r2 = [  2   5 0  4   2 2];
+%! r3 = [ 10   7 0 10   3 2];
+%! r4 = [ 10  -5 0  5   7 2];
+%! r5 = [-10   0 0 40  11 2];
+
+%!assert (rectint (r5, r1), 70)
+%!assert (rectint (r5, r4), 20)
+%!assert (rectint (r5, [r1; r2; r3; r4]), [70 16 60 20])
+
+## Test multiple volumes in both A and B
+%!assert (rectint ([r2; r5], [r1; r3; r4]), [4 0 0; 70 60 20])
--- a/scripts/geometry/tsearchn.m
+++ b/scripts/geometry/tsearchn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/geometry/voronoi.m
+++ b/scripts/geometry/voronoi.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -74,14 +74,13 @@
   endif
 
   narg = 1;
+  hax = NaN;
   if (isscalar (varargin{1}) && ishandle (varargin{1}))
     hax = varargin{1};
-    if (! isaxes (harg))
-      error ("imagesc: HAX argument must be an axes object");
+    if (! isaxes (hax))
+      error ("voronoi: HAX argument must be an axes object");
     endif
     narg++;
-  elseif (nargout < 2)
-    hax = gca ();
   endif
 
   if (nargin < 1 + narg || nargin > 3 + narg)
@@ -108,6 +107,8 @@
 
   if (length (x) != length (y))
     error ("voronoi: X and Y must be vectors of the same length");
+  elseif (length (x) < 2)
+    error ("voronoi: minimum of 2 points needed");
   endif
 
   ## Add box to approximate rays to infinity. For Voronoi diagrams the
@@ -142,19 +143,35 @@
   edges = edges(:, [(edges(1, 1 :end - 1) != edges(1, 2 : end) | ...
                      edges(2, 1 :end - 1) != edges(2, 2 : end)), true]);
 
-  ## Eliminate the edges of the diagram representing the box
-  poutside = (1:rows (p)) ...
-      (p(:, 1) < xmin - xdelta | p(:, 1) > xmax + xdelta | ...
-       p(:, 2) < ymin - ydelta | p(:, 2) > ymax + ydelta);
-  edgeoutside = ismember (edges(1, :), poutside) & ...
-                ismember (edges(2, :), poutside);
-  edges(:, edgeoutside) = [];
+  if (numel (x) > 2)
+    ## Eliminate the edges of the diagram representing the box
+    poutside = (1:rows (p)) ...
+        (p(:, 1) < xmin - xdelta | p(:, 1) > xmax + xdelta | ...
+         p(:, 2) < ymin - ydelta | p(:, 2) > ymax + ydelta);
+    edgeoutside = ismember (edges(1, :), poutside) & ...
+                  ismember (edges(2, :), poutside);
+    edges(:, edgeoutside) = [];
+  else
+    ## look for the edge between the two given points
+    for edge = edges(1:2,:)
+      if (det ([[[1;1],p(edge,1:2)];1,x(1),y(1)])
+          * det ([[[1;1],p(edge,1:2)];1,x(2),y(2)]) < 0)
+        edges = edge;
+        break;
+      endif
+    endfor
+    ## Use larger plot limits to make it more likely single bisector is shown.
+    xdelta = ydelta = max (xdelta, ydelta);
+  endif
 
   ## Get points of the diagram
   Vvx = reshape (p(edges, 1), size (edges));
   Vvy = reshape (p(edges, 2), size (edges));
 
   if (nargout < 2)
+    if (isnan (hax))
+      hax = gca ();
+    endif
     h = plot (hax, Vvx, Vvy, linespec{:}, x, y, '+');
     lim = [xmin, xmax, ymin, ymax];
     axis (lim + 0.1 * [[-1, 1] * xdelta, [-1, 1] * ydelta]);
@@ -179,5 +196,18 @@
 %! assert (vx(2,:), zeros (1, columns (vx)), eps);
 %! assert (vy(2,:), zeros (1, columns (vy)), eps);
 
-%% FIXME: Need input validation tests
+%!testif HAVE_QHULL
+%! ## Special case of just 2 points
+%! x = [0 1];  y = [1 0];
+%! [vx, vy] = voronoi (x,y);
+%! assert (vx, [-0.7; 1.7], eps);
+%! assert (vy, [-0.7; 1.7], eps);
 
+## Input validation tests
+%!error voronoi ()
+%!error voronoi (ones (3,1))
+%!error voronoi (ones (3,1), ones (3,1), "bogus1", "bogus2", "bogus3")
+%!error <HAX argument must be an axes object> voronoi (0, ones (3,1), ones (3,1))
+%!error <X and Y must be vectors of the same length> voronoi (ones (3,1), ones (4,1))
+%!error <minimum of 2 points needed> voronoi (2.5, 3.5)
+
--- a/scripts/geometry/voronoin.m
+++ b/scripts/geometry/voronoin.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -75,7 +75,7 @@
 endfunction
 
 
-%% FIXME: Need functional tests
+## FIXME: Need functional tests
 
 %!error voronoin ()
 %!error voronoin (1,2,3)
--- a/scripts/gui/errordlg.m
+++ b/scripts/gui/errordlg.m
@@ -19,6 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{h} =} errordlg (@var{msg})
 ## @deftypefnx {Function File} {@var{h} =} errordlg (@var{msg}, @var{title})
+## @deftypefnx {Function File} {@var{h} =} errordlg (@var{msg}, @var{title}, @var{createmode})
 ## Display @var{msg} using an error dialog box.
 ##
 ## The message may have multiple lines separated by newline characters
@@ -27,16 +28,20 @@
 ## set the dialog caption.  The default title is @qcode{"Error Dialog"}.
 ##
 ## The return value is always 1.
+##
+## Compatibility Note: The optional argument @var{createmode} is accepted for
+## @sc{matlab} compatibility, but is not implemented.
+##
 ## @seealso{helpdlg, inputdlg, listdlg, msgbox, questdlg, warndlg}
 ## @end deftypefn
 
-function retval = errordlg (msg, title = "Error Dialog")
+function retval = errordlg (msg, title = "Error Dialog", varargin)
 
-  if (nargin < 1 || nargin > 2)
+  if (nargin < 1 || nargin > 3)
     print_usage ();
   endif
 
-  retval = message_dialog ("errdlg", msg, title, "error");
+  retval = message_dialog ("errordlg", msg, title, "error", varargin{:});
 
 endfunction
 
--- a/scripts/gui/guidata.m
+++ b/scripts/gui/guidata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -59,7 +59,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error guidata ()
 %!error guidata (1,2,3)
 %!error <H must be a valid object handle> guidata ({1})
--- a/scripts/gui/guihandles.m
+++ b/scripts/gui/guihandles.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/gui/inputdlg.m
+++ b/scripts/gui/inputdlg.m
@@ -100,16 +100,20 @@
   ## r3  3   30   third  text field is 3x30
   if (isscalar (linespec))
     ## only scalar value in lineTo, copy from linespec and add defaults
-    rowscols = zeros (columns (prompt), 2);
+    rowscols = zeros (numel (prompt), 2);
     ## cols
     rowscols(:,2) = 25;
     rowscols(:,1) = linespec;
   elseif (isvector (linespec))
+    if (numel (linespec) == numel (prompt))
       ## only one column in lineTo, copy from vector linespec and add defaults
-      rowscols = zeros (columns (prompt), 2);
+      rowscols = zeros (numel (prompt), 2);
       ## rows from colum vector linespec, columns are set to default
       rowscols(:,2) = 25;
       rowscols(:,1) = linespec(:);
+    else
+      error ("inputdlg: ROWSCOLS vector does not match size of PROMPT");
+    endif
   elseif (ismatrix (linespec))
     if (rows (linespec) == columns (prompt) && columns (linespec) == 2)
       ## (rows x columns) match, copy array linespec
--- a/scripts/gui/listdlg.m
+++ b/scripts/gui/listdlg.m
@@ -97,7 +97,7 @@
     if (strcmpi (varargin{i}, "ListString"))
       listcell = varargin{i+1};
     elseif (strcmpi (varargin{i}, "SelectionMode"))
-      selmode = varargin{i+1};
+      selmode = tolower (varargin{i+1});
     elseif (strcmpi (varargin{i}, "ListSize"))
       listsize = varargin{i+1};
     elseif (strcmpi (varargin{i}, "InitialValue"))
@@ -121,11 +121,13 @@
   ## make sure listcell strings are a cell array
   if (! iscell (listcell))
     listcell = {listcell};
+  elseif (iscellstr (listcell{1})) 
+    listcell = listcell{1};
   endif
 
   ## make sure valid selection mode
-  if (! strcmp (selmode, "Multiple") && ! strcmp (selmode, "Single"))
-    error ("invalid SelectionMode");
+  if (! strcmpi (selmode, "multiple") && ! strcmpi (selmode, "single"))
+    error ("listdlg: invalid SelectionMode");
   endif
 
   if (__octave_link_enabled__ ())
--- a/scripts/gui/module.mk
+++ b/scripts/gui/module.mk
@@ -3,6 +3,7 @@
 gui_PRIVATE_FCN_FILES = \
   gui/private/__file_filter__.m \
   gui/private/__fltk_file_filter__.m \
+  gui/private/__get_funcname__.m \
   gui/private/__is_function__.m \
   gui/private/__uigetdir_fltk__.m \
   gui/private/__uigetfile_fltk__.m \
--- a/scripts/gui/msgbox.m
+++ b/scripts/gui/msgbox.m
@@ -20,10 +20,11 @@
 ## @deftypefn  {Function File} {@var{h} =} msgbox (@var{msg})
 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title})
 ## @deftypefnx {Function File} {@var{h} =} msgbox (@var{msg}, @var{title}, @var{icon})
+## @deftypefnx {Function File} {@var{h} =} msgbox (@dots{}, @var{createmode})
 ## Display @var{msg} using a message dialog box.
 ##
 ## The message may have multiple lines separated by newline characters
-## (@qcode{"\n"}), or it may be a cellstr array with one element for each
+## ("\n"), or it may be a cellstr array with one element for each
 ## line.  The optional input @var{title} (character string) can be used to
 ## decorate the dialog caption.
 ##
@@ -32,12 +33,16 @@
 ## @qcode{"help"}, or @qcode{"warn"}.
 ##
 ## The return value is always 1.
+##
+## Compatibility Note: The optional argument @var{createmode} is accepted for
+## @sc{matlab} compatibility, but is not implemented.
+#
 ## @seealso{errordlg, helpdlg, inputdlg, listdlg, questdlg, warndlg}
 ## @end deftypefn
 
 function retval = msgbox (msg, title = "", varargin)
 
-  if (nargin < 1 || nargin > 3)
+  if (nargin < 1 || nargin > 4)
     print_usage ();
   endif
 
--- a/scripts/gui/private/__file_filter__.m
+++ b/scripts/gui/private/__file_filter__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -53,7 +53,7 @@
     if (! strcmp (fname, "*"))
       defname = strcat (fname, fext);
     endif
-    if (length (fext) > 0)
+    if ((length (fext) > 0) && (! strcmp(fext, '.*')))
       fext = strcat ("*", fext);
       retval = {fext, __default_filtername__(fext)};
     endif
--- a/scripts/gui/private/__fltk_file_filter__.m
+++ b/scripts/gui/private/__fltk_file_filter__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
new file mode 100644
--- /dev/null
+++ b/scripts/gui/private/__get_funcname__.m
@@ -0,0 +1,44 @@
+## Copyright (C) 2014-2015 Andreas Weber
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{funcname} =} __get_funcname__ (@var{basename})
+## Internal function.
+##
+## Build function name for the current graphics toolkit according to schema
+## __[basename]_[graphics_toolkit]__, use fltk as default.
+## @end deftypefn
+
+## Author: Andreas Weber
+
+function funcname = __get_funcname__ (basename)
+
+  if (! __octave_link_enabled__ ())
+    tk = graphics_toolkit ();
+    funcname = strcat ("__", basename, "_", tk, "__");
+    if (numel (tk) > 0 && ! strcmp (tk, "fltk")
+        && ! __is_function__ (funcname))
+      warning ("%s: no implementation for toolkit '%s', using 'fltk' instead",
+               basename, tk);
+    endif
+    funcname = strcat ("__", basename, "_fltk__");
+  else
+    funcname = "";
+  endif
+
+endfunction
--- a/scripts/gui/private/__is_function__.m
+++ b/scripts/gui/private/__is_function__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -26,7 +26,7 @@
 function result = __is_function__ (func)
 
   existval = exist (func);
-  result = (existval == 2 || existval == 3 || existval == 5 || existval == 6);
+  result = (existval == 2 || existval == 3 || existval == 5);
 
 endfunction
 
--- a/scripts/gui/private/__uigetdir_fltk__.m
+++ b/scripts/gui/private/__uigetdir_fltk__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -29,7 +29,8 @@
     error ("uigetdir: fltk graphics toolkit required");
   endif
 
-  dirname = __fltk_uigetfile__ ("", dialog_title, start_path, [240, 120], "dir");
+  dirname = __fltk_uigetfile__ ("", dialog_title,
+                                start_path, [240, 120], "dir");
 
 endfunction
 
--- a/scripts/gui/private/__uigetfile_fltk__.m
+++ b/scripts/gui/private/__uigetfile_fltk__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,8 @@
   if (length (defdir) > 0)
     defval = fullfile (defdir, defval);
   endif
-  [retval, retpath, retindex] = __fltk_uigetfile__ (filters, title, defval, position, multiselect);
+  [retval, retpath, retindex] = ...
+    __fltk_uigetfile__ (filters, title, defval, position, multiselect);
 
 endfunction
 
--- a/scripts/gui/private/__uiobject_split_args__.m
+++ b/scripts/gui/private/__uiobject_split_args__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,8 @@
   endif
 
   if (! isempty (parent))
-    if (! isempty (parent_type) && isempty (find (strcmpi (get (parent, "type"), parent_type))))
+    if (! isempty (parent_type)
+        && isempty (find (strcmpi (get (parent, "type"), parent_type))))
       error ("%s: invalid parent, the parent type must be: %s", ...
              who, sprintf ("%s, ", parent_type{:})(1:end-2));
     endif
--- a/scripts/gui/private/__uiputfile_fltk__.m
+++ b/scripts/gui/private/__uiputfile_fltk__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,8 @@
   if (length (defdir) > 0)
     defval = fullfile (defdir, defval);
   endif
-  [retval, retpath, retindex] = __fltk_uigetfile__ (filters, title, defval, position, tag);
+  [retval, retpath, retindex] = ...
+    __fltk_uigetfile__ (filters, title, defval, position, tag);
 
 endfunction
 
--- a/scripts/gui/private/message_dialog.m
+++ b/scripts/gui/private/message_dialog.m
@@ -17,11 +17,11 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{h} =} message_dialog (@var{caller}, @var{msg}, @var{title}, @var{icon})
+## @deftypefn {Function File} {@var{h} =} message_dialog (@var{caller}, @var{msg}, @var{title}, @var{icon}, @var{createmode})
 ## Undocumented internal function.
 ## @end deftypefn
 
-function retval = message_dialog (caller, msg, title = "", icon)
+function retval = message_dialog (caller, msg, title = "", icon, createmode)
 
   if (! ischar (msg))
     if (iscell (msg))
@@ -37,7 +37,7 @@
   endif
 
   dlg = "emptydlg";
-  if (nargin == 4)
+  if (nargin >= 4)
     switch (icon)
       case "error"
         dlg = "errordlg";
@@ -47,6 +47,9 @@
         dlg = "warndlg";
       case "none"
         dlg = "emptydlg";
+      case "custom"
+        icon = "emptydlg";
+        warning ("%s: custom icons not yet supported", caller);
       otherwise
         error ("%s: ICON is not a valid type", caller);
     endswitch
@@ -54,6 +57,18 @@
     icon = "none";
   endif
 
+  if (nargin == 5)
+    if ((isstruct (createmode)) && (isfield (createmode, "WindowStyle")))
+      createmode = createmode.WindowStyle;
+    endif
+    switch (createmode)
+      case {"nonmodal", "non-modal", "modal", "replace"}
+        warning ("%s: %s is not yet supported", caller, createmode);
+      otherwise
+        error ("%s: CREATEMODE is not a valid type", caller);
+    endswitch
+  endif
+  
   if (__octave_link_enabled__ ())
     retval = __octave_link_message_dialog__ (icon, msg, title);
   elseif (__have_feature__ ("JAVA"))
--- a/scripts/gui/uicontextmenu.m
+++ b/scripts/gui/uicontextmenu.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,15 +17,15 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{handle} =} uicontextmenu ("Name", value, @dots{})
+## @deftypefn {Function File} {@var{hui} =} uicontextmenu ("Name", value, @dots{})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uicontextmenu (varargin)
+function hui = uicontextmenu (varargin)
 
   [h, args] = __uiobject_split_args__ ("uicontextmenu", varargin, {"figure"});
-  handle = __go_uicontextmenu__ (h, args{:});
+  hui = __go_uicontextmenu__ (h, args{:});
 
 endfunction
 
--- a/scripts/gui/uicontrol.m
+++ b/scripts/gui/uicontrol.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,21 +17,23 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{handle} =} uicontrol ("Name", value, @dots{})
-## @deftypefnx {Function File} {@var{handle} =} uicontrol (@var{parent}, "Name", value, @dots{})
-## @deftypefnx {Function File} {} uicontrol (@var{handle})
+## @deftypefn  {Function File} {@var{hui} =} uicontrol ("Name", value, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uicontrol (@var{parent}, "Name", value, @dots{})
+## @deftypefnx {Function File} {} uicontrol (@var{h})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uicontrol (varargin)
+function hui = uicontrol (varargin)
 
-  if (nargin == 1 && ishandle (varargin{1}) && strcmpi (get (varargin{1}, "type"), "uicontrol"))
+  if (nargin == 1 && ishandle (varargin{1})
+      && strcmpi (get (varargin{1}, "type"), "uicontrol"))
     error ("uicontrol focusing not implemented yet.");
-  else
-    [h, args] = __uiobject_split_args__ ("uicontrol", varargin, {"figure", "uipanel", "uibuttongroup"});
-    handle = __go_uicontrol__ (h, args{:});
   endif
 
+  [h, args] = __uiobject_split_args__ ("uicontrol", varargin,
+                                       {"figure", "uipanel", "uibuttongroup"});
+  hui = __go_uicontrol__ (h, args{:});
+
 endfunction
 
--- a/scripts/gui/uigetdir.m
+++ b/scripts/gui/uigetdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -20,9 +20,10 @@
 ## @deftypefn  {Function File} {@var{dirname} =} uigetdir ()
 ## @deftypefnx {Function File} {@var{dirname} =} uigetdir (@var{init_path})
 ## @deftypefnx {Function File} {@var{dirname} =} uigetdir (@var{init_path}, @var{dialog_name})
-## Open a GUI dialog for selecting a directory.  If @var{init_path} is not
-## given the current working directory is used.  @var{dialog_name} may be
-## used to customize the dialog title.
+## Open a GUI dialog for selecting a directory.
+##
+## If @var{init_path} is not given the current working directory is used.
+## @var{dialog_name} may be used to customize the dialog title.
 ## @seealso{uigetfile, uiputfile}
 ## @end deftypefn
 
@@ -30,30 +31,15 @@
 
 function dirname = uigetdir (init_path = pwd, dialog_name = "Select Directory to Open")
 
-  if (! __octave_link_enabled__ ())
-    defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__");
-    funcname = ["__uigetdir_", defaulttoolkit, "__"];
-    functype = exist (funcname);
-    if (! __is_function__ (funcname))
-      funcname = "__uigetdir_fltk__";
-      if (! __is_function__ (funcname))
-        error ("uigetdir: fltk graphics toolkit required");
-      elseif (! strcmp (defaulttoolkit, "gnuplot"))
-        warning ("uigetdir: no implementation for toolkit '%s', using 'fltk' instead",
-                 defaulttoolkit);
-      endif
-    endif
-  endif
-
   if (nargin > 2)
     print_usage ();
   endif
 
-  if (!ischar (init_path) || !ischar (dialog_name))
+  if (! ischar (init_path) || ! ischar (dialog_name))
     error ("uigetdir: INIT_PATH and DIALOG_NAME must be string arguments");
   endif
 
-  if (!isdir (init_path))
+  if (! isdir (init_path))
     init_path = fileparts (init_path);
   endif
 
@@ -68,8 +54,10 @@
                                      default_file_name, dialog_position,
                                      dialog_mode, init_path);
   else
+    funcname = __get_funcname__ (mfilename ());
     dirname = feval (funcname, init_path, dialog_name);
   endif
+
 endfunction
 
 
--- a/scripts/gui/uigetfile.m
+++ b/scripts/gui/uigetfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -26,6 +26,7 @@
 ##
 ## Open a GUI dialog for selecting a file and return the filename @var{fname},
 ## the path to this file @var{fpath}, and the filter index @var{fltidx}.
+##
 ## @var{flt} contains a (list of) file filter string(s) in one of the following
 ## formats:
 ##
@@ -66,36 +67,17 @@
 
 function [retfile, retpath, retindex] = uigetfile (varargin)
 
-  if (! __octave_link_enabled__ ())
-    defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__");
-    funcname = ["__uigetfile_", defaulttoolkit, "__"];
-    functype = exist (funcname);
-    if (! __is_function__ (funcname))
-      funcname = "__uigetfile_fltk__";
-      if (! __is_function__ (funcname))
-        error ("uigetfile: fltk graphics toolkit required");
-      elseif (! strcmp (defaulttoolkit, "gnuplot"))
-        warning ("uigetfile: no implementation for toolkit '%s', using 'fltk' instead",
-               defaulttoolkit);
-      endif
-    endif
-  endif
-
   if (nargin > 7)
     error ("uigetfile: number of input arguments must be less than eight");
   endif
 
-  defaultvals = {cell(0, 2),         # File Filter
-                 "Open File",        # Dialog Title
-                 "",                 # Default file name
-                 [240, 120],         # Dialog Position (pixel x/y)
-                 "off",              # MultiSelect on/off
-                 pwd};               # Default directory
-
-  outargs = cell (6, 1);
-  for i = 1 : 6
-    outargs{i} = defaultvals{i};
-  endfor
+  ## Preset default values
+  outargs = {cell(0, 2),         # File Filter
+             "Open File",        # Dialog Title
+             "",                 # Default file name
+             [240, 120],         # Dialog Position (pixel x/y)
+             "off",              # MultiSelect on/off
+             pwd};               # Default directory
 
   idx1 = idx2 = [];
   if (length (varargin) > 0)
@@ -145,7 +127,12 @@
 
   if (len > 2)
     if (ischar (args{3}))
-      [fdir, fname, fext] = fileparts (args{3});
+      if (isdir (args{3}))
+        fdir = args{3};
+        fname = fext = "";
+      else
+        [fdir, fname, fext] = fileparts (varargin{3});
+      endif
       if (length (fdir) > 0)
         outargs{6} = fdir;
       endif
@@ -158,7 +145,7 @@
   endif
 
   if (stridx)
-    ## we have string arguments ("position" or "multiselect")
+    ## string arguments ("position" or "multiselect")
 
     ## check for even number of remaining arguments, prop/value pair(s)
     if (rem (nargin - stridx + 1, 2))
@@ -189,6 +176,7 @@
   if (__octave_link_enabled__ ())
     [retfile, retpath, retindex] = __octave_link_file_dialog__ (outargs{:});
   else
+    funcname = __get_funcname__ (mfilename ());
     [retfile, retpath, retindex] = feval (funcname, outargs{:});
   endif
 
--- a/scripts/gui/uimenu.m
+++ b/scripts/gui/uimenu.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -17,11 +17,12 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} uimenu (@var{property}, @var{value}, @dots{})
-## @deftypefnx {Function File} {} uimenu (@var{h}, @var{property}, @var{value}, @dots{})
-## Create a uimenu object and return a handle to it.  If @var{h} is omitted
-## then a top-level menu for the current figure is created.  If @var{h}
-## is given then a submenu relative to @var{h} is created.
+## @deftypefn  {Function File} {@var{hui} =} uimenu (@var{property}, @var{value}, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uimenu (@var{h}, @var{property}, @var{value}, @dots{})
+## Create a uimenu object and return a handle to it.
+##
+## If @var{h} is omitted then a top-level menu for the current figure is
+## created.  If @var{h} is given then a submenu relative to @var{h} is created.
 ##
 ## uimenu objects have the following specific properties:
 ##
@@ -80,7 +81,8 @@
 
 function hui = uimenu (varargin)
 
-  [h, args] = __uiobject_split_args__ ("uimenu", varargin, {"figure", "uicontextmenu", "uimenu"});
+  [h, args] = __uiobject_split_args__ ("uimenu", varargin,
+                                       {"figure", "uicontextmenu", "uimenu"});
 
   tmp = __go_uimenu__ (h, args{:});
 
@@ -111,13 +113,13 @@
 %!   assert (get (ui, "checked"), "off");
 %!   assert (get (ui, "separator"), "off");
 %!   assert (get (ui, "enable"), "on");
-%!   assert (get (ui, "position"), 9);
+%!   assert (get (ui, "position"), 0);
 %! unwind_protect_cleanup
 %!   close (hf);
 %!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
-%% check for top level menus file, edit, and help
+## check for top level menus file and edit
 %!testif HAVE_FLTK
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
@@ -126,8 +128,6 @@
 %!   assert (ishghandle (uif));
 %!   uie = findall (hf, "label", "&edit");
 %!   assert (ishghandle (uie));
-%!   uih = findall (hf, "label", "&help");
-%!   assert (ishghandle (uih));
 %! unwind_protect_cleanup
 %!   close (hf);
 %!   graphics_toolkit (toolkit);
--- a/scripts/gui/uipanel.m
+++ b/scripts/gui/uipanel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,16 +17,17 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{handle} =} uipanel ("Name", value, @dots{})
-## @deftypefnx {Function File} {@var{handle} =} uipanel (@var{parent}, "Name", value, @dots{})
+## @deftypefn  {Function File} {@var{hui} =} uipanel ("Name", value, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uipanel (@var{parent}, "Name", value, @dots{})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uipanel (varargin)
+function hui = uipanel (varargin)
 
-  [h, args] = __uiobject_split_args__ ("uipanel", varargin, {"figure", "uipanel", "uibuttongroup"});
-  handle = __go_uipanel__ (h, args{:});
+  [h, args] = __uiobject_split_args__ ("uipanel", varargin,
+                                       {"figure", "uipanel", "uibuttongroup"});
+  hui = __go_uipanel__ (h, args{:});
 
 endfunction
 
--- a/scripts/gui/uipushtool.m
+++ b/scripts/gui/uipushtool.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,15 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{handle} =} uipushtool ("Name", value, @dots{})
-## @deftypefnx {Function File} {@var{handle} =} uipushtool (@var{parent}, "Name", value, @dots{})
+## @deftypefn  {Function File} {@var{hui} =} uipushtool ("Name", value, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uipushtool (@var{parent}, "Name", value, @dots{})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uipushtool (varargin)
+function hui = uipushtool (varargin)
 
-  [h, args] = __uiobject_split_args__ ("uipushtool", varargin, {"uitoolbar"}, 0);
+  [h, args] = __uiobject_split_args__ ("uipushtool", varargin,
+                                       {"uitoolbar"}, 0);
   if (isempty (h))
     h = findobj (gcf, "-depth", 1, "type", "uitoolbar");
     if (isempty (h))
@@ -34,7 +35,7 @@
       h = h(1);
     endif
   endif
-  handle = __go_uipushtool__ (h, args{:});
+  hui = __go_uipushtool__ (h, args{:});
 
 endfunction
 
--- a/scripts/gui/uiputfile.m
+++ b/scripts/gui/uiputfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -21,8 +21,10 @@
 ## @deftypefnx {Function File} {[@var{fname}, @var{fpath}, @var{fltidx}] =} uiputfile (@var{flt})
 ## @deftypefnx {Function File} {[@var{fname}, @var{fpath}, @var{fltidx}] =} uiputfile (@var{flt}, @var{dialog_name})
 ## @deftypefnx {Function File} {[@var{fname}, @var{fpath}, @var{fltidx}] =} uiputfile (@var{flt}, @var{dialog_name}, @var{default_file})
-## Open a GUI dialog for selecting a file.  @var{flt} contains a (list of) file
-## filter string(s) in one of the following formats:
+## Open a GUI dialog for selecting a file.
+##
+## @var{flt} contains a (list of) file filter string(s) in one of the following
+## formats:
 ##
 ## @table @asis
 ## @item @qcode{"/path/to/filename.ext"}
@@ -56,36 +58,17 @@
 
 function [retfile, retpath, retindex] = uiputfile (varargin)
 
-  if (! __octave_link_enabled__ ())
-    defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__");
-    funcname = ["__uiputfile_", defaulttoolkit, "__"];
-    functype = exist (funcname);
-    if (! __is_function__ (funcname))
-      funcname = "__uiputfile_fltk__";
-      if (! __is_function__ (funcname))
-        error ("uiputfile: fltk graphics toolkit required");
-      elseif (! strcmp (defaulttoolkit, "gnuplot"))
-        warning ("uiputfile: no implementation for toolkit '%s', using 'fltk' instead",
-               defaulttoolkit);
-      endif
-    endif
-  endif
-
   if (nargin > 3)
     print_usage ();
   endif
 
-  defaultvals = {cell(0, 2),     # File Filter
-                 "Save File",    # Dialog Title
-                 "",             # Default file name
-                 [240, 120],     # Dialog Position (pixel x/y)
-                 "create",
-                 pwd};           # Default directory
-
-  outargs = cell (6, 1);
-  for i = 1 : 6
-    outargs{i} = defaultvals{i};
-  endfor
+  ## Preset default values
+  outargs = {cell(0, 2),     # File Filter
+             "Save File",    # Dialog Title
+             "",             # Default file name
+             [240, 120],     # Dialog Position (pixel x/y)
+             "create",
+             pwd};           # Default directory
 
   if (nargin > 0)
     file_filter = varargin{1};
@@ -107,7 +90,12 @@
 
   if (nargin > 2)
     if (ischar (varargin{3}))
-      [fdir, fname, fext] = fileparts (varargin{3});
+      if (isdir (varargin{3}))
+        fdir = varargin{3};
+        fname = fext = "";
+      else
+        [fdir, fname, fext] = fileparts (varargin{3});
+      endif
       if (! isempty (fdir))
         outargs{6} = fdir;
       endif
@@ -122,9 +110,22 @@
   if (__octave_link_enabled__ ())
     [retfile, retpath, retindex] = __octave_link_file_dialog__ (outargs{:});
   else
+    funcname = __get_funcname__ (mfilename ());
     [retfile, retpath, retindex] = feval (funcname, outargs{:});
   endif
 
+  ## Append extension to the name if it isn't already added.
+  if (ischar (retfile))
+    ext = outargs{1}{retindex};
+    ext = strrep (ext, "*", "");
+
+    if (length (retfile) >= length (ext))
+      if (! strcmp (retfile(end-length (ext)+1:end), ext))
+        retfile = [retfile ext];
+      endif
+    endif
+  endif
+
 endfunction
 
 
--- a/scripts/gui/uiresume.m
+++ b/scripts/gui/uiresume.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -18,10 +18,11 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} uiresume (@var{h})
-## Resume program execution suspended with @code{uiwait}.  The handle @var{h}
-## must be the same as the on specified in @code{uiwait}.  If the handle
-## is invalid or there is no @code{uiwait} call pending for the figure
-## with handle @var{h}, this function does nothing.
+## Resume program execution suspended with @code{uiwait}.
+##
+## The handle @var{h} must be the same as the on specified in @code{uiwait}.
+## If the handle is invalid or there is no @code{uiwait} call pending for the
+## figure with handle @var{h}, this function does nothing.
 ## @seealso{uiwait}
 ## @end deftypefn
 
--- a/scripts/gui/uitoggletool.m
+++ b/scripts/gui/uitoggletool.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,15 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{handle} =} uitoggletool ("Name", value, @dots{})
-## @deftypefnx {Function File} {@var{handle} =} uitoggletool (@var{parent}, "Name", value, @dots{})
+## @deftypefn  {Function File} {@var{hui} =} uitoggletool ("Name", value, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uitoggletool (@var{parent}, "Name", value, @dots{})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uitoggletool (varargin)
+function hui = uitoggletool (varargin)
 
-  [h, args] = __uiobject_split_args__ ("uitoggletool", varargin, {"uitoolbar"}, 0);
+  [h, args] = __uiobject_split_args__ ("uitoggletool", varargin,
+                                       {"uitoolbar"}, 0);
   if (isempty (h))
     h = findobj (gcf, "-depth", 1, "type", "uitoolbar");
     if (isempty (h))
@@ -34,7 +35,7 @@
       h = h(1);
     endif
   endif
-  handle = __go_uitoggletool__ (h, args{:});
+  hui = __go_uitoggletool__ (h, args{:});
 
 endfunction
 
--- a/scripts/gui/uitoolbar.m
+++ b/scripts/gui/uitoolbar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -17,16 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{handle} =} uitoolbar ("Name", value, @dots{})
-## @deftypefnx {Function File} {@var{handle} =} uitoolbar (@var{parent}, "Name", value, @dots{})
+## @deftypefn  {Function File} {@var{hui} =} uitoolbar ("Name", value, @dots{})
+## @deftypefnx {Function File} {@var{hui} =} uitoolbar (@var{parent}, "Name", value, @dots{})
 ## @end deftypefn
 
 ## Author: goffioul
 
-function handle = uitoolbar (varargin)
+function hui = uitoolbar (varargin)
 
   [h, args] = __uiobject_split_args__ ("uitoolbar", varargin, {"figure"});
-  handle = __go_uitoolbar__ (h, args{:});
+  hui = __go_uitoolbar__ (h, args{:});
 
 endfunction
 
--- a/scripts/gui/uiwait.m
+++ b/scripts/gui/uiwait.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -21,9 +21,9 @@
 ## @deftypefnx {Function File} {} uiwait (@var{h})
 ## @deftypefnx {Function File} {} uiwait (@var{h}, @var{timeout})
 ## Suspend program execution until the figure with handle @var{h} is
-## deleted or @code{uiresume} is called.  When no figure handle is specified,
-## this function uses the current figure.
+## deleted or @code{uiresume} is called.
 ##
+## When no figure handle is specified this function uses the current figure.
 ## If the figure handle is invalid or there is no current figure, this
 ## functions returns immediately.
 ##
--- a/scripts/gui/waitbar.m
+++ b/scripts/gui/waitbar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -106,7 +106,8 @@
     ## Save and restore current figure
     cf = get (0, "currentfigure");
 
-    hf = figure ("position", [250, 500, 400, 100],
+    hf = figure ("units", "pixels",
+                 "position", [250, 500, 400, 100],
                  "numbertitle", "off",
                  "menubar", "none", "toolbar", "none",
                  "integerhandle", "off",
@@ -189,7 +190,7 @@
 %! close (h1);
 %! close (h2);
 
-%% Test input validation
+## Test input validation
 %!error <FRAC must be between 0 and 1> waitbar (-0.5)
 %!error <FRAC must be between 0 and 1> waitbar (1.5)
 %!error <MSG must be a character string> waitbar (0.5, struct ())
--- a/scripts/gui/waitforbuttonpress.m
+++ b/scripts/gui/waitforbuttonpress.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Petr Mikulik
+## Copyright (C) 2004-2015 Petr Mikulik
 ##
 ## This file is part of Octave.
 ##
@@ -49,7 +49,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error waitforbuttonpress (1)
 %!error [a,b,c] = waitforbuttonpress ()
 
--- a/scripts/gui/warndlg.m
+++ b/scripts/gui/warndlg.m
@@ -19,6 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{h} =} warndlg (@var{msg})
 ## @deftypefnx {Function File} {@var{h} =} warndlg (@var{msg}, @var{title})
+## @deftypefnx {Function File} {@var{h} =} warndlg (@var{msg}, @var{title}, @var{createmode})
 ## Display @var{msg} using a warning dialog box.
 ##
 ## The message may have multiple lines separated by newline characters
@@ -26,16 +27,21 @@
 ## line.  The optional input @var{title} (character string) can be used to
 ## set the dialog caption.  The default title is @qcode{"Warning Dialog"}.
 ##
+## The return value is always 1.
+##
+## Compatibility Note: The optional argument @var{createmode} is accepted for
+## @sc{matlab} compatibility, but is not implemented.
+##
 ## @seealso{helpdlg, inputdlg, listdlg, questdlg}
 ## @end deftypefn
 
-function retval = warndlg (msg, title = "Warning Dialog")
+function retval = warndlg (msg, title = "Warning Dialog", varargin)
 
-  if (nargin < 1 || nargin > 2)
+  if (nargin < 1 || nargin > 3)
     print_usage ();
   endif
 
-  retval = message_dialog ("warndlg", msg, title, "warn");
+  retval = message_dialog ("warndlg", msg, title, "warn", varargin{:});
 
 endfunction
 
--- a/scripts/help/__gripe_missing_component__.m
+++ b/scripts/help/__gripe_missing_component__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Mike Miller
+## Copyright (C) 2013-2015 Mike Miller
 ##
 ## This file is part of Octave.
 ##
@@ -17,7 +17,7 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} __gripe_missing_component__ (@var{caller}, @var{component})
+## @deftypefn {Function File} {} __gripe_missing_component__ (@var{caller}, @var{component})
 ## Undocumented internal function.
 ## @end deftypefn
 
@@ -46,7 +46,7 @@
       case "octave-config"
         msg = "unable to find the octave-config command, Octave installation is incomplete";
       otherwise
-        msg = ["unable to find required Octave component \"" component "\""];
+        msg = ['unable to find required Octave component "' component '"'];
     endswitch
   endif
 
@@ -54,3 +54,14 @@
 
 endfunction
 
+
+## Some trivial testing
+%!error <abc: unable to find the Octave info manual> __gripe_missing_component__ ("abc", "info-file")
+%!error <abc: unable to find the octave executable> __gripe_missing_component__ ("abc", "octave")
+%!error <abc: unable to find the octave-config command> __gripe_missing_component__ ("abc", "octave-config")
+%!error <abc: unable to find required Octave component "xyz"> __gripe_missing_component__ ("abc", "xyz")
+
+%!error __gripe_missing_component__ ()
+%!error __gripe_missing_component__ ("fcn")
+%!error __gripe_missing_component__ ("fcn", 1 , 2)
+
--- a/scripts/help/__makeinfo__.m
+++ b/scripts/help/__makeinfo__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -141,6 +141,13 @@
     ## Call makeinfo
     [status, retval] = system (cmd);
 
+    ## Clean up extra newlines generated by makeinfo
+    if (strcmpi (output_type, "plain text"))
+      if (numel (retval) > 2 && retval(end-1:end) == "\n\n")
+        retval = retval(1:end-2);
+      endif
+    endif
+
   unwind_protect_cleanup
     if (exist (name, "file"))
       delete (name);
--- a/scripts/help/__unimplemented__.m
+++ b/scripts/help/__unimplemented__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 John W. Eaton
+## Copyright (C) 2010-2015 John W. Eaton
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -103,7 +103,7 @@
 
     ## control system
     case {"absorbDelay", "allmargin", "append", "augstate", "balreal", ...
-          "balred", "balredOptions", "bandwidth", "bdschur", "bode", ...
+          "balred", "balredOptions", "bdschur", "bode", ...
           "bodemag", "bodeoptions", "bodeplot", "c2d", "c2dOptions", ...
           "canon", "care", "chgFreqUnit", "chgTimeUnit", "connect", ...
           "connectOptions", "covar", "ctrb", "ctrbf", "ctrlpref", "d2c", ...
@@ -479,6 +479,23 @@
           "wblstat", "wishrnd", "x2fx", "xlsread", "xptread", "ztest"}
       txt = check_package (fcn, "statistics");
 
+    ## symbolic
+    case {"argnames", "bernoulli", "catalan", "charpoly", "chebyshevT", ...
+          "chebyshevU", "children", "coshint", "cosint", "dawson", ...
+          "digits", "dilog", "dirac", "divisors", "dsolve", "ei", ...
+          "ellipticCE", "ellipticCK", "ellipticCPi", "ellipticE", ...
+          "ellipticF", "ellipticK", "ellipticPi", "euler", "eulergamma", ...
+          "finverse", "formula", "fresnelc", "fresnels", "funtool", ...
+          "gegenbauerC", "harmonic", "heaviside", "hermiteH", "hypergeom", ...
+          "igamma", "jacobiP", "kroneckerDelta", "kummerU", "laguerreL", ...
+          "legendreP", "logint", "minpoly", "pochhammer", "poles", ...
+          "poly2sym", "polylog", "pretty", "quorem", "rectangularPulse", ...
+          "signIm", "simplify", "sinhint", "sinint", "solve", "ssinint", ...
+          "sym", "sym2poly", "symfun", "sympref", "syms", "symvar", ...
+          "triangularPulse", "vpa", "vpasolve", "whittakerM", "whittakerW", ...
+          "zeta"}
+      txt = check_package (fcn, "symbolic");
+
     ## optimization
     case {"bintprog", "color", "fgoalattain", "fmincon", "fminimax", ...
           "fminsearch", "fseminf", "fzmult", "gangstr", "ktrlink", ...
@@ -534,17 +551,13 @@
   "Tiff",
   "VideoReader",
   "VideoWriter",
+  "addCause",
+  "addcats",
   "align",
   "alim",
   "alpha",
   "alphamap",
-  "annotation",
-  "audiodevinfo",
-  "audioinfo",
-  "audioplayer",
-  "audioread",
-  "audiorecorder",
-  "audiowrite",
+  "array2table",
   "bar3",
   "bar3h",
   "bench",
@@ -572,16 +585,19 @@
   "camup",
   "camva",
   "camzoom",
+  "categorical",
+  "categories",
   "cdf2rdf",
   "cdfepoch",
   "cdfinfo",
+  "cdflib",
   "cdfread",
   "cdfwrite",
+  "cell2table",
   "cellplot",
-  "checkin",
   "checkcode",
+  "checkin",
   "checkout",
-  "cholinc",
   "clearvars",
   "clipboard",
   "cmopts",
@@ -593,6 +609,8 @@
   "coneplot",
   "containers.Map",
   "contourslice",
+  "corrcoef",
+  "countcats",
   "createClassFromWsdl",
   "createSoapMessage",
   "customverctrl",
@@ -607,6 +625,7 @@
   "delaunayTriangulation",
   "depdir",
   "depfun",
+  "details",
   "deval",
   "dialog",
   "dither",
@@ -614,20 +633,24 @@
   "dragrect",
   "dynamicprops",
   "echodemo",
+  "empty",
+  "enumeration",
   "evalc",
+  "events",
   "export2wsdlg",
   "figurepalette",
   "filebrowser",
   "fill3",
+  "findprop",
   "fitsdisp",
   "fitsinfo",
   "fitsread",
   "fitswrite",
   "flow",
-  "frame2im",
   "freqspace",
   "funm",
   "gammaincinv",
+  "getReport",
   "getframe",
   "getpixelposition",
   "gobjects",
@@ -635,10 +658,7 @@
   "graymon",
   "griddedInterpolant",
   "gsvd",
-  "guidata",
   "guide",
-  "guihandles",
-  "handle",
   "h5create",
   "h5disp",
   "h5info",
@@ -646,35 +666,39 @@
   "h5readatt",
   "h5write",
   "h5writeatt",
+  "handle",
   "hdfinfo",
   "hdfread",
+  "height",
   "hgexport",
-  "hgload",
-  "hgsave",
   "hgsetget",
   "hgtransform",
-  "ichol",
-  "ilu",
-  "im2frame",
   "im2java",
   "imapprox",
   "import",
   "inmem",
-  "inputParser",
+  "innerjoin",
   "inspect",
-  "instrcallback",
-  "instrfind",
-  "instrfindall",
   "integral",
   "integral2",
   "integral3",
   "interpstreamspeed",
-  "iscom",
-  "isinterface",
-  "isjava",
+  "isKey",
+  "iscategorical",
+  "iscategory",
+  "ismissing",
   "isocaps",
+  "isordinal",
+  "isprotected",
   "isstudent",
-  "javachk",
+  "istable",
+  "isundefined",
+  "isvalid",
+  "javaMethodEDT",
+  "javaObjectEDT",
+  "join",
+  "keys",
+  "last",
   "ldl",
   "libfunctions",
   "libfunctionsview",
@@ -684,11 +708,10 @@
   "light",
   "lightangle",
   "lighting",
-  "linkaxes",
   "linkdata",
   "listfonts",
   "loadlibrary",
-  "lscov",
+  "localfunctions",
   "lsqr",
   "makehgtform",
   "material",
@@ -696,7 +719,7 @@
   "matlabrc",
   "memmapfile",
   "memory",
-  "metaclass",
+  "mergecats",
   "methodsview",
   "minres",
   "mlintrpt",
@@ -715,8 +738,10 @@
   "ncwrite",
   "ncwriteatt",
   "ncwriteschema",
+  "netcdf",
   "noanimate",
   "notebook",
+  "notify",
   "ode113",
   "ode15i",
   "ode15s",
@@ -728,15 +753,13 @@
   "odeget",
   "odeset",
   "odextend",
-  "open",
   "openfig",
   "opengl",
   "openvar",
   "ordeig",
   "ordqz",
-  "ordschur",
+  "outerjoin",
   "padecoef",
-  "pan",
   "parseSoapResponse",
   "pathtool",
   "pcode",
@@ -750,32 +773,34 @@
   "printpreview",
   "profsave",
   "propedit",
+  "properties",
   "propertyeditor",
   "psi",
   "publish",
-  "qmr",
   "quad2d",
   "rbbox",
+  "readtable",
   "reducepatch",
   "reducevolume",
-  "readasync",
+  "remove",
+  "removecats",
+  "renamecats",
+  "reordercats",
   "rng",
-  "rotate",
-  "rotate3d",
+  "rowfun",
+  "savefig",
   "scatteredInterpolant",
   "selectmoveresize",
   "sendmail",
   "serial",
-  "serialbreak",
   "setpixelposition",
   "showplottool",
   "smooth3",
   "snapnow",
-  "sound",
-  "soundsc",
   "ss2tf",
+  "stack",
+  "standardizeMissing",
   "startup",
-  "stopasync",
   "stream2",
   "stream3",
   "streamline",
@@ -783,30 +808,32 @@
   "streamribbon",
   "streamslice",
   "streamtube",
-  "strings",
+  "struct2table",
   "subvolume",
+  "summary",
   "superclasses",
   "surf2patch",
+  "sylvester",
   "symmlq",
-  "syntax",
+  "table2array",
+  "table2cell",
+  "table2struct",
   "texlabel",
   "textwrap",
   "tfqmr",
+  "throw",
+  "throwAsCaller",
+  "timeit",
   "timer",
   "timeseries",
   "todatenum",
   "toolboxdir",
   "triangulation",
   "tscollection",
-  "tstool",
   "uibuttongroup",
-  "uicontextmenu",
-  "uicontrol",
   "uigetpref",
   "uiimport",
   "uiopen",
-  "uipanel",
-  "uipushtool",
   "uiresume",
   "uisave",
   "uisetcolor",
@@ -821,22 +848,27 @@
   "unicode2native",
   "unloadlibrary",
   "unmesh",
+  "unstack",
   "userpath",
-  "validateattributes",
+  "values",
+  "varfun",
+  "verLessThan",
   "verctrl",
-  "verLessThan",
   "viewmtx",
   "visdiff",
   "volumebounds",
   "web",
-  "whatsnew",
+  "width",
   "winopen",
   "winqueryreg",
   "workspace",
+  "writetable",
+  "xlsfinfo",
+  "xlsread",
+  "xlswrite",
   "xmlread",
   "xmlwrite",
   "xslt",
-  "zoom",
   };
 endfunction
 
--- a/scripts/help/doc.m
+++ b/scripts/help/doc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -42,7 +42,7 @@
 
     if (nargin == 1)
       ## Get the directory where the function lives.
-      ## FIXME -- maybe we should have a better way of doing this.
+      ## FIXME: Maybe we should have a better way of doing this?
 
       if (ischar (fname))
         ftype = exist (fname);
@@ -54,7 +54,7 @@
     endif
 
     ## if GUI is running, let it display the function
-    if isguirunning ()
+    if (isguirunning ())
       __octave_link_show_doc__ (fname);
     else
 
@@ -81,12 +81,13 @@
         info_file_name = info_file ();
 
         if (! exist (info_file_name, "file")
-            && ! exist ([info_file_name ".gz"], "file"))
+            && ! exist ([info_file_name ".gz"], "file")
+            && ! exist ([info_file_name ".bz2"], "file"))
           __gripe_missing_component__ ("doc", "info-file");
         endif
       endif
 
-      ## FIXME -- don't change the order of the arguments below because
+      ## FIXME: Don't change the order of the arguments below because
       ## the info-emacs-info script currently expects --directory DIR as
       ## the third and fourth arguments.  Someone should fix that.
 
--- a/scripts/help/doc_cache_create.m
+++ b/scripts/help/doc_cache_create.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -55,6 +55,7 @@
 
   ## Save cache
   if (! isempty (cache))
+     save_header_format_string (["# doc-cache created by Octave " OCTAVE_VERSION], "local");
      save ("-text", out_file, "cache");
   endif
 
@@ -123,7 +124,7 @@
   if (! iscell (directory))
     directory = {directory};
   endif
-  dirs_notpath = {directory{!dir_in_path}};
+  dirs_notpath = {directory{! dir_in_path}};
 
   ## add them
   if (! isempty (dirs_notpath))
@@ -154,7 +155,7 @@
 endfunction
 
 
-%% No true tests desirable for this function.
-%% Test input validation
+## No true tests desirable for this function.
+## Test input validation
 %!error doc_cache_create (1)
 
--- a/scripts/help/get_first_help_sentence.m
+++ b/scripts/help/get_first_help_sentence.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -28,7 +28,7 @@
 ##
 ## The optional output argument @var{status} returns the status reported by
 ## @code{makeinfo}.  If only one output argument is requested, and @var{status}
-## is non-zero, a warning is displayed.
+## is nonzero, a warning is displayed.
 ##
 ## As an example, the first sentence of this help text is
 ##
@@ -46,7 +46,7 @@
     print_usage ();
   endif
 
-  if (!ischar (name))
+  if (! ischar (name))
     error ("get_first_help_sentence: NAME must be a string");
   endif
 
@@ -92,7 +92,8 @@
 
 ## This function extracts the first sentence from a Texinfo help text.
 ## The function works by removing @def* from the texinfo text. After this, we
-## render the text to plain text using makeinfo, and then extract the first line.
+## render the text to plain text using makeinfo, and then extract the first
+## line.
 function [text, status] = first_sentence_texinfo (help_text, max_len)
   ## Lines ending with "@\n" are continuation lines, so they should be
   ## concatenated with the following line.
@@ -154,7 +155,7 @@
 %!assert (get_first_help_sentence ('get_first_help_sentence'), ...
 %!        "Return the first sentence of a function's help text.")
 
-%% Test input validation
+## Test input validation
 %!error get_first_help_sentence ()
 %!error get_first_help_sentence (1, 2, 3)
 %!error <NAME must be a string> get_first_help_sentence (1)
--- a/scripts/help/help.m
+++ b/scripts/help/help.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -20,9 +20,11 @@
 ## @deftypefn  {Command} {} help @var{name}
 ## @deftypefnx {Command} {} help @code{--list}
 ## @deftypefnx {Command} {} help @code{.}
-## Display the help text for @var{name}.  For example, the command
-## @kbd{help help} prints a short message describing the @code{help}
-## command.
+## @deftypefnx {Command} {} help
+## Display the help text for @var{name}.
+##
+## For example, the command @kbd{help help} prints a short message describing
+## the @code{help} command.
 ##
 ## Given the single argument @code{--list}, list all operators,
 ## keywords, built-in functions, and loadable functions available
@@ -34,10 +36,11 @@
 ## If invoked without any arguments, @code{help} display instructions
 ## on how to access help from the command line.
 ##
-## The help command can give you information about operators, but not the
-## comma and semicolons that are used as command separators.  To get help
-## for those, you must type @kbd{help comma} or @kbd{help semicolon}.
-## @seealso{doc, lookfor, which}
+## The help command can provide information about most operators, for example
+## @code{help +}, but not the comma and semicolon characters which are used
+## by the Octave interpreter as command separators.  For help on either of
+## these type @kbd{help comma} or @kbd{help semicolon}.
+## @seealso{doc, lookfor, which, info}
 ## @end deftypefn
 
 function retval = help (name)
@@ -69,21 +72,21 @@
   elseif (nargin == 1 && ischar (name))
 
     if (strcmp (name, "--list"))
-      tmp = do_list_functions ();
+      list = do_list_functions ();
       if (nargout == 0)
-        printf ("%s", tmp);
+        printf ("%s", list);
       else
-        retval = tmp;
+        retval = list;
       endif
       return;
     endif
 
     if (strcmp (name, "."))
-      tmp = do_list_operators ();
+      list = do_list_operators ();
       if (nargout == 0)
-        printf ("%s", tmp);
+        printf ("%s", list);
       else
-        retval = tmp;
+        retval = list;
       endif
       return;
     endif
@@ -129,7 +132,7 @@
 function retval = do_list_operators ()
 
   retval = sprintf ("*** operators:\n\n%s\n\n",
-                       list_in_columns (__operators__ ()));
+                    list_in_columns (__operators__ ()));
 endfunction
 
 function retval = do_list_functions ()
@@ -163,7 +166,7 @@
 
   found = false;
 
-  dlist = find_dir_in_path (name, "all");
+  dlist = dir_in_loadpath (name, "all");
 
   for i = 1:numel (dlist)
     fname = make_absolute_filename (fullfile (dlist{i}, "Contents.m"));
@@ -207,5 +210,10 @@
 
 
 %!assert (! isempty (strfind (help ("ls"), "List directory contents")))
+%!assert (! isempty (strfind (help ("."), "||")))
+
+## Test input validation
 %!error <invalid input> help (42)
+%!error <invalid input> help ("abc", "def")
+%!error <'_!UNLIKELY_FCN!_' not found> help ("_!UNLIKELY_FCN!_")
 
--- a/scripts/help/lookfor.m
+++ b/scripts/help/lookfor.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -19,50 +19,52 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} lookfor @var{str}
 ## @deftypefnx {Command} {} lookfor -all @var{str}
-## @deftypefnx {Function File} {[@var{func}, @var{helpstring}] =} lookfor (@var{str})
-## @deftypefnx {Function File} {[@var{func}, @var{helpstring}] =} lookfor ("-all", @var{str})
-## Search for the string @var{str} in all functions found in the current
-## function search path.  By default, @code{lookfor} searches for @var{str}
-## in the first sentence of the help string of each function found.  The entire
-## help text of each function can be searched if the @qcode{"-all"} argument is
-## supplied.  All searches are case insensitive.
+## @deftypefnx {Function File} {[@var{fcn}, @var{help1str}] =} lookfor (@var{str})
+## @deftypefnx {Function File} {[@var{fcn}, @var{help1str}] =} lookfor ("-all", @var{str})
+## Search for the string @var{str} in all functions using the current function
+## search path.
+##
+## By default, @code{lookfor} looks for @var{str} in the first sentence of the
+## help string for each function found.  The entire help text of each function
+## can be searched by using the @qcode{"-all"} argument.  All searches are case
+## insensitive.
 ##
-## Called with no output arguments, @code{lookfor} prints the list of
-## matching functions to the terminal.  Otherwise, the output arguments
-## @var{func} and @var{helpstring} define the matching functions and the
-## first sentence of each of their help strings.
+## When called with no output arguments, @code{lookfor} prints the list of
+## matching functions to the terminal.  Otherwise, the output argument
+## @var{fcns} contains the function names and @var{help1str} contains the first
+## sentence from the help string of each function.
 ##
-## The ability of @code{lookfor} to correctly identify the first
-## sentence of the help text is dependent on the format of the
-## function's help.  All Octave core functions are correctly
-## formatted, but the same can not be guaranteed for external packages and
-## user-supplied functions.  Therefore, the use of the @qcode{"-all"}
-## argument may be necessary to find related functions that are not a part of
-## Octave.
+## Programming Note: The ability of @code{lookfor} to correctly identify the
+## first sentence of the help text is dependent on the format of the function's
+## help.  All Octave core functions are correctly formatted, but the same can
+## not be guaranteed for external packages and user-supplied functions.
+## Therefore, the use of the @qcode{"-all"} argument may be necessary to find
+## related functions that are not a part of Octave.
 ## @seealso{help, doc, which}
 ## @end deftypefn
 
-function [out_fun, out_help_text] = lookfor (str, arg2)
+function [fcn, help1str] = lookfor (str, arg2)
 
   if (strcmpi (str, "-all"))
-    ## The difference between using '-all' and not, is which part of the caches
-    ## we search.  The cache is organized such that the first column contains
-    ## the function name, the second column contains the full help text, and
-    ## the third column contains the first sentence of the help text.
+    ## The difference between using '-all' and not is which part of the caches
+    ## we search.  The cache is organized such that row
+    ## 1) contains the function name
+    ## 2) contains the full help text
+    ## 3) contains the first sentence of the help text.
     str = arg2;
-    search_type = 2; # when using caches, search the second column
+    search_type = 2;  # search the second row (full help text)
   else
-    search_type = 3; # when using caches, search the third column
+    search_type = 3;  # search the third column (first help sentence)
   endif
-  str = lower (str);   # Compare is case insensitive
+  str = lower (str);  # Compare is case insensitive
 
   ## Search functions, operators, and keywords that come with Octave
   cache_file = doc_cache_file ();
   if (exist (cache_file, "file"))
-    [fun, help_text] = search_cache (str, cache_file, search_type);
+    [fcnlist, help_text] = search_cache (str, cache_file, search_type);
     had_core_cache = true;
   else
-    fun = help_text = {};
+    fcnlist = help_text = {};
     had_core_cache = false;
   endif
 
@@ -72,37 +74,38 @@
   ## ditto for path.
   new_path = ostrsplit (path (), pathsep ());
 
-  ## scratch out directories already covered by orig_path.
+  ## remove  directories already covered by orig_path.
   if (had_core_cache)
     new_path = setdiff (new_path, orig_path);
   endif
 
   for n = 1:numel (new_path)
-    elt = new_path{n};
-    cache_file = fullfile (elt, "doc-cache");
+    fcndir = new_path{n};
+    cache_file = fullfile (fcndir, "doc-cache");
     if (exist (cache_file, "file"))
       ## We have a cache in the directory, then read it and search it!
-      [funs, hts] = search_cache (str, cache_file, search_type);
-      fun(end+1:end+length (funs)) = funs;
-      help_text(end+1:end+length (hts)) = hts;
+      [fcns, htext] = search_cache (str, cache_file, search_type);
+      fcnlist(end+1:end+length (fcns)) = fcns;
+      help_text(end+1:end+length (htext)) = htext;
+
     else
-    ## We don't have a cache. Search files
-      funs_in_f = __list_functions__ (elt);
-      for m = 1:length (funs_in_f)
-        fn = funs_in_f{m};
+      ## We don't have a cache.  Search files.
+      for fcn_in_fcndir = (__list_functions__ (fcndir)).'
+        fn = fcn_in_fcndir{1};
 
-        ## Skip files that start with __
-        if (length (fn) > 2 && strcmp (fn(1:2), "__"))
+        ## Skip files that start with "__"
+        if (strncmp (fn, "__", 2))
           continue;
         endif
 
+        status = 0;
+
         ## Extract first sentence
         try
           warn_state = warning ();
           unwind_protect
             warning ("off");
             first_sentence = get_first_help_sentence (fn, 1024);
-            status = 0;
           unwind_protect_cleanup
             warning (warn_state);
           end_unwind_protect
@@ -110,39 +113,39 @@
           status = 1;
         end_try_catch
 
-        if (search_type == 2) # search entire help text
+        if (status)
+          ## Error getting first help sentence
+        elseif (search_type == 3)
+          ## only search the first sentence of the help text
+          text = first_sentence;
+        elseif (search_type == 2)
+          ## search entire help text
           try
             warn_state = warning ();
             unwind_protect
               warning ("off");
               [text, fmt] = get_help_text (fn);
-              status = 0;
+              switch (lower (fmt))
+                case "plain text"
+                  status = 0;
+                case "texinfo"
+                  [text, status] = __makeinfo__ (text, "plain text");
+                case "html"
+                  [text, status] = strip_html_tags (text);
+                otherwise
+                  status = 1;
+              endswitch
             unwind_protect_cleanup
               warning (warn_state);
             end_unwind_protect
           catch
             status = 1;
           end_try_catch
-
-          ## Take action depending on help text fmt
-          switch (lower (fmt))
-            case "plain text"
-              status = 0;
-            case "texinfo"
-              [text, status] = __makeinfo__ (text, "plain text");
-            case "html"
-              [text, status] = strip_html_tags (text);
-            otherwise
-              status = 1;
-          endswitch
-
-        elseif (status == 0) # only search the first sentence of the help text
-          text = first_sentence;
         endif
 
-        ## Search the help text, if we can
-        if (status == 0 && ! isempty (strfind (lower (text), str)))
-          fun(end+1) = fn;
+        ## Search the help text
+        if (status == 0 && strfind (lower (text), str))
+          fcnlist(end+1) = fn;
           help_text(end+1) = first_sentence;
         endif
       endfor
@@ -155,8 +158,8 @@
     term_width = (terminal_size ())(2);
     desc_width = term_width - indent - 2;
     indent_space = blanks (indent);
-    for k = 1:length (fun)
-      f = fun{k};
+    for k = 1:length (fcnlist)
+      f = fcnlist{k};
       f(end+1:indent-1) = " ";
       puts ([f " "]);
       lf = length (f);
@@ -168,25 +171,24 @@
         printf ("%s%s\n", indent_space, strtrim (desc (start:stop)));
       endfor
     endfor
-
   else
     ## Return the results instead of displaying them
-    out_fun = fun;
-    out_help_text = help_text;
+    fcn = fcnlist;
+    help1str = help_text;
   endif
 
 endfunction
 
-function [funs, help_texts] = search_cache (str, cache_file, search_type)
+function [fcns, help_texts] = search_cache (str, cache_file, search_type)
   load (cache_file);
   if (! isempty (cache))
     t1 = strfind (lower (cache (1, :)), str);
     t2 = strfind (lower (cache (search_type, :)), str);
     cache_idx = find (! (cellfun ("isempty", t1) & cellfun ("isempty", t2)));
-    funs = cache(1, cache_idx);
+    fcns = cache(1, cache_idx);
     help_texts = cache(3, cache_idx);
   else
-    funs = help_texts = {};
+    fcns = help_texts = {};
   endif
 endfunction
 
--- a/scripts/help/print_usage.m
+++ b/scripts/help/print_usage.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -113,7 +113,7 @@
     endl_idx = find (help_text == "\n");
     buffer = "";
     for k = 1:length (def_idx)
-      endl = endl_idx (find (endl_idx > def_idx(k), 1));
+      endl = endl_idx(find (endl_idx > def_idx(k), 1));
       if (isempty (endl))
         buffer = strcat (buffer, help_text (def_idx(k):end), "\n");
       else
--- a/scripts/help/private/__additional_help_message__.m
+++ b/scripts/help/private/__additional_help_message__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -26,7 +26,7 @@
   if (suppress_verbose_help_message ())
     msg = "";
   else
-    msg = "\
+    msg = "\n\
 Additional help for built-in functions and operators is\n\
 available in the online version of the manual.  Use the command\n\
 'doc <topic>' to search the manual index.\n\
--- a/scripts/help/private/__strip_html_tags__.m
+++ b/scripts/help/private/__strip_html_tags__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -50,9 +50,9 @@
   groups = [els(1), 1]; # list containing [start, length] of each group
   for k = 1:length (dels)
     if (dels (k) == 1)
-      groups (end, 2) ++;
+      groups(end, 2) ++;
     else
-      groups (end+1, 1:2) = [els(k+1), 1];
+      groups(end+1, 1:2) = [els(k+1), 1];
     endif
   endfor
 
@@ -60,20 +60,20 @@
 
   ## Remove end-lines in the beginning
   if (groups (1, 1) == 1)
-    keep (1:groups (1, 2)) = false;
+    keep(1:groups (1, 2)) = false;
   endif
 
   ## Remove end-lines from the end
-  if (sum (groups (end, :)) - 1 == length (text))
-    keep (groups (end, 1):end) = false;
+  if (sum (groups(end, :)) - 1 == length (text))
+    keep(groups(end, 1):end) = false;
   endif
 
   ## Remove groups of end-lines with more than 3 end-lines next to each other
   idx = find (groups (:, 2) >= 3);
   for k = 1:length (idx)
-    start = groups (idx (k), 1);
-    stop = start + groups (idx (k), 2) - 1;
-    keep (start+2:stop) = false;
+    start = groups(idx(k), 1);
+    stop = start + groups(idx(k), 2) - 1;
+    keep(start+2:stop) = false;
   endfor
 
   ## Actually remove the elements
--- a/scripts/help/type.m
+++ b/scripts/help/type.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/help/which.m
+++ b/scripts/help/which.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 John W. Eaton
+## Copyright (C) 2009-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -28,9 +28,21 @@
   if (nargin > 0 && iscellstr (varargin))
     m = __which__ (varargin{:});
 
+    ## Check whether each name is a variable, variables take precedence over
+    ## functions in name resolution.
+    for i = 1:nargin
+      m(i).is_variable = evalin ("caller",
+                                 ["exist (\"" m(i).name "\", \"var\")"], false);
+      if (m(i).is_variable)
+        m(i).file = "variable";
+      endif
+    endfor
+
     if (nargout == 0)
       for i = 1:nargin
-        if (isempty (m(i).file))
+        if (m(i).is_variable)
+          printf ("'%s' is a variable\n", m(i).name);
+        elseif (isempty (m(i).file))
           if (! isempty (m(i).type))
             printf ("'%s' is a %s\n",
                     m(i).name, m(i).type);
@@ -64,3 +76,17 @@
 
 %!assert (which ("_NO_SUCH_NAME_"), "")
 
+%!test
+%! x = 3;
+%! str = which ("x");
+%! assert (str, "variable");
+
+%!test
+%! str = which ("amd");
+%! assert (str(end-6:end), "amd.oct");
+%! amd = 12;
+%! str = which ("amd");
+%! assert (str, "variable");
+%! clear amd;
+%! str = which ("amd");
+%! assert (str(end-6:end), "amd.oct");
--- a/scripts/image/autumn.m
+++ b/scripts/image/autumn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,17 +31,14 @@
 ## PKG_ADD: colormap ("register", "autumn");
 ## PKG_DEL: colormap ("unregister", "autumn");
 
-function map = autumn (n)
+function map = autumn (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("autumn: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("autumn: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [1, 0, 0];
--- a/scripts/image/bone.m
+++ b/scripts/image/bone.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,17 +31,14 @@
 ## PKG_ADD: colormap ("register", "bone");
 ## PKG_DEL: colormap ("unregister", "bone");
 
-function map = bone (n)
+function map = bone (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("bone: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("bone: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [1/8 1/8 1/8];
--- a/scripts/image/brighten.m
+++ b/scripts/image/brighten.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/cmpermute.m
+++ b/scripts/image/cmpermute.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2004 Josep Mones i Teixidor
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/cmunique.m
+++ b/scripts/image/cmunique.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2004 Josep Mones i Teixidor
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/colorcube.m
+++ b/scripts/image/colorcube.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/colormap.m
+++ b/scripts/image/colormap.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2012 Carnë Draug
 ##
 ## This file is part of Octave.
@@ -60,6 +60,7 @@
 ## Adapted-By: jwe
 
 function cmap = colormap (varargin)
+  mlock; # prevent map_list to be cleared by "clear all"
   persistent map_list = cell ();
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("colormap", varargin{:});
@@ -142,34 +143,42 @@
 
 %!test
 %! hf = figure ("visible", "off");
-%! cmaptst = [0 1 0; 1 0 1; 1 1 1];
-%! cmap = colormap (cmaptst);
-%! assert (cmap, cmaptst);
-%! cmap = colormap ();
-%! assert (cmap, cmaptst);
-%! cmap = (get (gcf, "colormap"));
-%! assert (cmap, cmaptst);
-%! colormap ("default");
-%! assert (colormap (), jet (64));
-%! colormap ("ocean");
-%! assert (colormap, ocean (64));
-%! close (hf);  # done with temp. figure
+%! unwind_protect
+%!   cmaptst = [0 1 0; 1 0 1; 1 1 1];
+%!   cmap = colormap (cmaptst);
+%!   assert (cmap, cmaptst);
+%!   cmap = colormap ();
+%!   assert (cmap, cmaptst);
+%!   cmap = (get (gcf, "colormap"));
+%!   assert (cmap, cmaptst);
+%!   colormap ("default");
+%!   assert (colormap (), jet (64));
+%!   colormap ("ocean");
+%!   assert (colormap, ocean (64));
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
 
 %!test
-%! cmaplst = colormap ("list");
-%! assert (iscell (cmaplst));
-%! colormap ("register", "__mycmap__");
-%! cmaplst2 = colormap ("list");
-%! assert (numel (cmaplst2), numel (cmaplst) + 1);
-%! assert (any (strcmp (cmaplst2, "__mycmap__")));
-%! colormap ("unregister", "__mycmap__");
-%! cmaplst2 = colormap ("list");
-%! assert (numel (cmaplst2), numel (cmaplst));
-%! assert (! any (strcmp (cmaplst2, "__mycmap__")));
-%! ## Unregister again and verify that nothing has happened
-%! colormap ("unregister", "__mycmap__");
-%! cmaplst3 = colormap ("list");
-%! assert (isequal (cmaplst2, cmaplst3));
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   cmaplst = colormap ("list");
+%!   assert (iscell (cmaplst));
+%!   colormap ("register", "__mycmap__");
+%!   cmaplst2 = colormap ("list");
+%!   assert (numel (cmaplst2), numel (cmaplst) + 1);
+%!   assert (any (strcmp (cmaplst2, "__mycmap__")));
+%!   colormap ("unregister", "__mycmap__");
+%!   cmaplst2 = colormap ("list");
+%!   assert (numel (cmaplst2), numel (cmaplst));
+%!   assert (! any (strcmp (cmaplst2, "__mycmap__")));
+%!   ## Unregister again and verify that nothing has happened
+%!   colormap ("unregister", "__mycmap__");
+%!   cmaplst3 = colormap ("list");
+%!   assert (isequal (cmaplst2, cmaplst3));
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
 
 ## Test input validation
 %!error colormap (1,2,3)
--- a/scripts/image/contrast.m
+++ b/scripts/image/contrast.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/cool.m
+++ b/scripts/image/cool.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -30,17 +30,14 @@
 ## PKG_ADD: colormap ("register", "cool");
 ## PKG_DEL: colormap ("unregister", "cool");
 
-function map = cool (n)
+function map = cool (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("cool: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("cool: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 1, 1];
--- a/scripts/image/copper.m
+++ b/scripts/image/copper.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,17 +31,14 @@
 ## PKG_ADD: colormap ("register", "copper");
 ## PKG_DEL: colormap ("unregister", "copper");
 
-function map = copper (n)
+function map = copper (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("copper: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("copper: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 0, 0];
new file mode 100644
--- /dev/null
+++ b/scripts/image/cubehelix.m
@@ -0,0 +1,87 @@
+## Copyright (C) 2014-2015 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{map} =} cubehelix ()
+## @deftypefnx {Function File} {@var{map} =} cubehelix (@var{n})
+## Create cubehelix colormap.
+##
+## This colormap varies from black to white going though blue, green, and red
+## tones while maintaining a monotonically increasing perception of intensity.
+## This is achieved by transversing a color cube from black to white through
+## a helix, hence the name cubehelix, while taking into account the perceived
+## brightness of each channel according to the NTSC specifications from 1953.
+##
+## @example
+## rgbplot (cubehelix (256))
+## @end example
+##
+## The argument @var{n} must be a scalar and corresponds to the lenght of the
+## colormap.  Defaults to the length of the current colormap.
+##
+## Development of this colormap is described in @cite{Green, D. A., 2011,
+## "A @nospell{colour} scheme for the display of astronomical intensity images",
+## Bulletin of the Astronomical Society of India, 39, 289.}.
+##
+## @seealso{colormap}
+## @end deftypefn
+
+## Author: Carnë Draug <carandraug@octave.org>
+
+## PKG_ADD: colormap ("register", "cubehelix");
+## PKG_DEL: colormap ("unregister", "cubehelix");
+
+function map = cubehelix (n = rows (colormap ()), start = 0.5,
+                          rots = -1.5, hue = 1, gamma = 1)
+
+  if (nargin > 5)
+    print_usage ()
+  elseif (! isscalar (n))
+    error ("cubehelix: N must be a scalar");
+  endif
+  n = double (n);
+
+  if (n > 1)
+    coeff = [ -0.14861  -0.29227   1.97294
+               1.78277  -0.90649   0.00000];
+
+    fract = ((0:n-1) / (n-1))';
+    angle = 2 * pi * (start/3 + 1 + rots*fract);
+    fract = fract .^ gamma;
+    amp   = hue * fract .* (1-fract) /2;
+    map   = fract + amp .* ([cos(angle) sin(angle)] * coeff);
+
+    ## Clip values (only in case users have changed values of hue or gamma)
+    map(map < 0) = 0;
+    map(map > 1) = 1;
+
+  elseif (n > 0)
+    map = [0, 0, 0];
+  else
+    map = zeros (0, 3);
+  endif
+
+endfunction
+
+
+%!demo
+%! subplot (1, 2, 1)
+%! rgbplot (cubehelix (256), "composite")
+%! subplot (1, 2, 2)
+%! rgbplot (cubehelix (256))
+
--- a/scripts/image/flag.m
+++ b/scripts/image/flag.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,16 +31,12 @@
 ## PKG_ADD: colormap ("register", "flag");
 ## PKG_DEL: colormap ("unregister", "flag");
 
-function map = flag (n)
+function map = flag (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("flag: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("flag: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/gmap40.m
+++ b/scripts/image/gmap40.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -31,19 +31,15 @@
 ## PKG_ADD: colormap ("register", "gmap40");
 ## PKG_DEL: colormap ("unregister", "gmap40");
 
-function map = gmap40 (n)
+function map = gmap40 (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = 6;
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("gmap40: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("gmap40: N must be a scalar");
   endif
 
-  if (n > 1)
+  if (n > 0)
     C = [1, 0, 0; 0, 1, 0; 0, 0, 1; 1, 1, 0; 1, 0, 1; 0, 1, 1];
     map = C(rem (0:(n-1), 6) + 1, :);
   else
--- a/scripts/image/gray.m
+++ b/scripts/image/gray.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -33,17 +33,14 @@
 ## PKG_ADD: colormap ("register", "gray");
 ## PKG_DEL: colormap ("unregister", "gray");
 
-function map = gray (n)
+function map = gray (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("gray: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("gray: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 0, 0];
--- a/scripts/image/gray2ind.m
+++ b/scripts/image/gray2ind.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,8 @@
   endif
 
   cls = class (I);
-  if (! any (strcmp (cls, {"logical", "uint8", "uint16", "int16", "single", "double"})))
+  if (! any (strcmp (cls, {"logical", "uint8", "uint16", "int16", ...
+                           "single", "double"})))
     error ("gray2ind: invalid data type '%s'", cls);
   elseif (isfloat (I) && (min (I(:) < 0) || max (I(:) > 1)))
     error ("gray2ind: floating point images may only contain values between 0 and 1");
@@ -75,7 +76,7 @@
 
   ## Note: no separate call to round () necessary because
   ##       type conversion does that automatically.
-  if (n < 256)
+  if (n <= 256)
     I = uint8 (I);
   else
     I = uint16 (I);
@@ -94,7 +95,16 @@
 %! g2i = gray2ind (i2g, 100);
 %! assert (g2i, uint8 (0:99));
 
-%% Test input validation
+%!assert (gray2ind ([0 0.25 0.5 1], 256), uint8 ([0 64 128 255]))
+%!assert (gray2ind ([0 (1/511) (1/510) 1-(1/509) 1-(1/510) 1], 256),
+%!        uint8 ([0 0 1 254 255 255]))
+
+%!test
+%! assert (class (gray2ind ([0.0 0.5 1.0], 255)), "uint8")
+%! assert (class (gray2ind ([0.0 0.5 1.0], 256)), "uint8")
+%! assert (class (gray2ind ([0.0 0.5 1.0], 257)), "uint16")
+
+## Test input validation
 %!error gray2ind ()
 %!error gray2ind (1,2,3)
 %!error <I must be a grayscale or binary image> gray2ind ({1})
--- a/scripts/image/hot.m
+++ b/scripts/image/hot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,16 +31,12 @@
 ## PKG_ADD: colormap ("register", "hot");
 ## PKG_DEL: colormap ("unregister", "hot");
 
-function map = hot (n)
+function map = hot (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("hot: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("hot: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/hsv.m
+++ b/scripts/image/hsv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -35,17 +35,14 @@
 ## PKG_ADD: colormap ("register", "hsv");
 ## PKG_DEL: colormap ("unregister", "hsv");
 
-function map = hsv (n)
+function map = hsv (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("hsv: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("hsv: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [1, 0, 0];
--- a/scripts/image/hsv2rgb.m
+++ b/scripts/image/hsv2rgb.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -106,7 +106,7 @@
 endfunction
 
 
-%% Test pure colors
+## Test pure colors
 %!assert (hsv2rgb ([0 1 1]), [1 0 0])
 %!assert (hsv2rgb ([1 1 1]), [1 0 0])
 %!assert (hsv2rgb ([1/3 1 1]), [0 1 0])
@@ -120,7 +120,7 @@
 %! hsv_img = rand (64, 64, 3);
 %! assert (rgb2hsv (hsv2rgb (hsv_img)), hsv_img, 1e-6);
 
-%% Test input validation
+## Test input validation
 %!error hsv2rgb ()
 %!error hsv2rgb (1,2)
 %!error <invalid data type> hsv2rgb ({1})
--- a/scripts/image/image.m
+++ b/scripts/image/image.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -69,7 +69,7 @@
 
   do_new = true;
   if (nargin == 0)
-    img = imread ("default.img");
+    img = get (0, "defaultimagecdata");
     x = y = [];
   elseif (chararg == 1)
     ## Low-Level syntax
@@ -111,6 +111,8 @@
       hax = newplot (hax);
     elseif (isempty (hax))
       hax = gca ();
+    else
+      hax = hax(1);
     endif
 
     htmp = __img__ (hax, do_new, x, y, img, varargin{chararg:end});
@@ -139,26 +141,20 @@
 
 function h = __img__ (hax, do_new, x, y, img, varargin)
 
-  ## FIXME: Hack for integer formats which use zero-based indexing
-  ##        Hack favors correctness of display over size of image in memory.
-  ##        True fix must be done in C++ code for renderer.
-  if (ndims (img) == 2 && (isinteger (img) || islogical (img)))
-    img = single (img) + 1;
-  endif
-
   if (! isempty (img))
 
     if (isempty (x))
-      x = [1, columns(img)];
+      xdata = [];
+    else
+      xdata = x([1, end])(:).';  # (:).' is a hack to guarantee row vector
     endif
 
     if (isempty (y))
-      y = [1, rows(img)];
+      ydata = [];
+    else
+      ydata = y([1, end])(:).';
     endif
 
-    xdata = x([1, end])(:).';  # (:).' is a hack to guarantee row vector
-    ydata = y([1, end])(:).';
-
     if (numel (x) > 2 && numel (y) > 2)
       ## Test data for non-linear spacing which is unsupported
       tol = .01;  # 1% tolerance.  FIXME: this value was chosen without thought.
@@ -176,14 +172,13 @@
 
   endif  # ! isempty (img)
 
-  h = __go_image__ (hax, "cdata", img, "xdata", xdata, "ydata", ydata,
-                         "cdatamapping", "direct", varargin{:});
-
   if (do_new && ! ishold (hax))
     ## Set axis properties for new images
-
+    ## NOTE: Do this before calling __go_image__ so that image is not drawn
+    ##       once with default auto-scale axis limits and then a second time
+    ##       with tight axis limits.
     if (! isempty (img))
-      if (isscalar (get (hax, "children")))
+      if (isempty (get (hax, "children")))
         axis (hax, "tight");
       endif
 
@@ -198,10 +193,19 @@
 
     endif  # ! isempty (img)
 
-    set (hax, "view", [0, 90], "ydir", "reverse", "layer", "bottom");
+    set (hax, "view", [0, 90], "ydir", "reverse", "layer", "top");
 
   endif  # do_new
 
+  h = __go_image__ (hax, "cdata", img, "xdata", xdata, "ydata", ydata,
+                         "cdatamapping", "direct", varargin{:});
+
+  if (do_new && ! ishold (hax) && ! isempty (img)
+      && isscalar (get (hax, "children")))
+    ## Re-scale axis limits for an image in a new figure or axis.
+    axis (hax, "tight");
+  endif
+
 endfunction
 
 
@@ -225,4 +229,31 @@
 %!  h = image (-x, -y, img);
 %!  title ("image (-x, -y, img)");
 
+%!test
+%! ## test hidden properties x/ydatamode (bug #42121)
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   nx = 64; ny = 64;
+%!   cdata = rand (ny, nx)*127;
+%!   hi = image (cdata);             # x/ydatamode is auto
+%!   assert (get (hi, "xdata"), [1 nx])
+%!   assert (get (hi, "ydata"), [1 ny])
+%!   set (hi, "cdata", cdata(1:2:end, 1:2:end))
+%!   assert (get (hi, "xdata"), [1 nx/2])
+%!   assert (get (hi, "ydata"), [1 ny/2])
+%!
+%!   set (hi, "xdata", [10 100])     # xdatamode is now manual
+%!   set (hi, "ydata", [10 1000])    # ydatamode is now manual
+%!   set (hi, "cdata", cdata)
+%!   assert (get (hi, "xdata"), [10 100])
+%!   assert (get (hi, "ydata"), [10 1000])
+%!
+%!   set (hi, "ydata", [])           # ydatamode is now auto
+%!   set (hi, "cdata", cdata(1:2:end, 1:2:end))
+%!   assert (get (hi, "xdata"), [10 100])
+%!   assert (get (hi, "ydata"), [1 ny/2])
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
+
 ## FIXME: Need %!tests for linear
--- a/scripts/image/imagesc.m
+++ b/scripts/image/imagesc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/imfinfo.m
+++ b/scripts/image/imfinfo.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Soren Hauberg
+## Copyright (C) 2008-2015 Soren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -18,8 +18,8 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{info} =} imfinfo (@var{filename})
-## @deftypefnx {Function File} {@var{info} =} imfinfo (@var{filename}, @var{ext})
 ## @deftypefnx {Function File} {@var{info} =} imfinfo (@var{url})
+## @deftypefnx {Function File} {@var{info} =} imfinfo (@dots{}, @var{ext})
 ## Read image information from a file.
 ##
 ## @code{imfinfo} returns a structure containing information about the image
@@ -148,14 +148,32 @@
 
 ## Author: Soren Hauberg <hauberg@gmail.com>
 
-function info = imfinfo (varargin)
+function info = imfinfo (filename, varargin)
   if (nargin < 1 || nargin > 2)
     print_usage ();
-  elseif (! ischar (varargin{1}))
+  elseif (! ischar (filename))
     error ("imfinfo: FILENAME must be a string");
-  elseif (nargin > 1 && ! ischar (varargin{2}))
+  elseif (nargin > 1 && ! ischar (ext))
     error ("imfinfo: EXT must be a string");
   endif
-  info = imageIO (@__imfinfo__, "info", varargin, varargin{:});
+  info = imageIO ("imfinfo", @__imfinfo__, "info", filename, varargin{:});
 endfunction
 
+## This test is the same as the similar one in imread. imfinfo must check
+## if file exists before calling __imfinfo_. This test confirm this.
+%!testif HAVE_MAGICK
+%! fmt = fmt_ori = imformats ("jpg");
+%! fmt.info = @true;
+%! error_thrown = false;
+%! imformats ("update", "jpg", fmt);
+%! unwind_protect
+%!   try
+%!     imread ("I sure hope this file does not exist.jpg");
+%!   catch
+%!     error_thrown = true;
+%!   end_try_catch
+%! unwind_protect_cleanup
+%!   imformats ("update", "jpg", fmt_ori);
+%! end_unwind_protect
+%! assert (error_thrown, true);
+
--- a/scripts/image/imformats.m
+++ b/scripts/image/imformats.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -75,6 +75,7 @@
     print_usage ();
   endif
 
+  mlock (); # prevent formats to be removed by "clear all"
   persistent formats = default_formats ();
 
   if (nargin == 0 && nargout == 0)
@@ -266,11 +267,10 @@
 endfunction
 
 function match = find_ext_idx (formats, ext)
-  ## FIXME: is matlab sensitive to file extensions?
   ## XXX: what should we do if there's more than one hit?
   ##      Should this function prevent the addition of
   ##      duplicated extensions?
-  match = cellfun (@(x) any (strcmp (x, ext)), {formats.ext});
+  match = cellfun (@(x) any (strcmpi (x, ext)), {formats.ext});
 endfunction
 
 function bool = isa_magick (coder, filename)
@@ -281,34 +281,68 @@
   end_try_catch
 endfunction
 
+## When imread or imfinfo are called, the file must exist or the
+## function defined by imformats will never be called.  Because
+## of this, we must create a file for the tests to work.
 
-## changing the function to read
+## changing the function that does the reading
 %!testif HAVE_MAGICK
-%! fmt = imformats ("jpg");
-%! fmt.read = @(x) size (x, 2);
-%! imformats ("update", "jpg", fmt);
-%! assert (imread ("this is 30 characters long.jpg"), 30);
+%! fname = [tempname() ".jpg"];
+%! def_fmt = imformats ();
+%! fid = fopen (fname, "w");
+%! unwind_protect
+%!   fmt = imformats ("jpg");
+%!   fmt.read = @numel;
+%!   imformats ("update", "jpg", fmt);
+%!   assert (imread (fname), numel (fname));
+%! unwind_protect_cleanup
+%!   fclose (fid);
+%!   unlink (fname);
+%!   imformats (def_fmt);
+%! end_unwind_protect
 
 ## adding a new format
 %!testif HAVE_MAGICK
-%! fmt = imformats ("jpg");
-%! fmt.ext = "junk";
-%! fmt.read = @(x) true();
-%! imformats ("add", fmt);
-%! assert (imread ("some file.junk"), true);
+%! fname = [tempname() ".new_fmt"];
+%! def_fmt = imformats ();
+%! fid = fopen (fname, "w");
+%! unwind_protect
+%!   fmt = imformats ("jpg"); # take jpg as template
+%!   fmt.ext = "new_fmt";
+%!   fmt.read = @() true ();
+%!   imformats ("add", fmt);
+%!   assert (imread (fname), true);
+%! unwind_protect_cleanup
+%!   fclose (fid);
+%!   unlink (fname);
+%!   imformats (def_fmt);
+%! end_unwind_protect
 
-## adding multiple formats in one way
+## adding multiple formats at the same time
 %!testif HAVE_MAGICK
-%! fmt = imformats ("jpg");
-%! fmt.ext = "junk1";
-%! fmt.read = @(x) true();
-%! fmt(2) = fmt(1);
-%! fmt(2).ext = "junk2";
-%! imformats ("add", fmt);
-%! assert (imread ("some file.junk1"), true);
-%! assert (imread ("some file.junk2"), true);
+%! fname1 = [tempname() ".new_fmt1"];
+%! fid1 = fopen (fname1, "w");
+%! fname2 = [tempname() ".new_fmt2"];
+%! fid2 = fopen (fname2, "w");
+%! def_fmt = imformats ();
+%! unwind_protect
+%!   fmt = imformats ("jpg"); # take jpg as template
+%!   fmt.ext = "new_fmt1";
+%!   fmt.read = @() true();
+%!   fmt(2) = fmt(1);
+%!   fmt(2).ext = "new_fmt2";
+%!   imformats ("add", fmt);
+%!   assert (imread (fname1), true);
+%!   assert (imread (fname2), true);
+%! unwind_protect_cleanup
+%!   fclose (fid1);
+%!   fclose (fid2);
+%!   unlink (fname1);
+%!   unlink (fname2);
+%!   imformats (def_fmt);
+%! end_unwind_protect
 
-## changing format
+## changing format and resetting back to default
 %!testif HAVE_MAGICK
 %! ori_fmt = mod_fmt = imformats ("jpg");
 %! mod_fmt.description = "Another description";
@@ -319,10 +353,15 @@
 %! new_fmt = imformats ("jpg");
 %! assert (new_fmt.description, ori_fmt.description);
 
-## FIXME: how to test for error together with testif?
-## update to an invalid format
-#%!testif HAVE_MAGICK
-#%! fmt = imformats ("jpg");
-#%! fmt = rmfield (fmt, "read");
-#%! error imformats ("update", "jpg", fmt);
+## updating to an invalid format should cause an error
+%!testif HAVE_MAGICK
+%! fmt = imformats ("jpg");
+%! fmt = rmfield (fmt, "read");
+%! error_thrown = false;
+%! try
+%!   imformats ("update", "jpg", fmt);
+%! catch
+%!   error_thrown = true;
+%! end_try_catch
+%! assert (error_thrown, true);
 
--- a/scripts/image/imread.m
+++ b/scripts/image/imread.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Carnë Draug
-## Copyright (C) 2008-2013 Thomas L. Scofield
+## Copyright (C) 2013-2015 Carnë Draug
+## Copyright (C) 2008-2015 Thomas L. Scofield
 ## Copyright (C) 2008 Kristian Rumberg
 ## Copyright (C) 2006 Thomas Weber
 ## Copyright (C) 2005 Stefan van der Walt
@@ -23,16 +23,16 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {[@var{img}, @var{map}, @var{alpha}] =} imread (@var{filename})
-## @deftypefnx {Function File} {[@dots{}] =} imread (@var{filename}, @var{ext})
 ## @deftypefnx {Function File} {[@dots{}] =} imread (@var{url})
+## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{ext})
 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{idx})
 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{param1}, @var{val1}, @dots{})
 ## Read images from various file formats.
 ##
 ## Reads an image as a matrix from the file @var{filename}.  If there is
 ## no file @var{filename}, and @var{ext} was specified, it will look for
-## a file named @var{filename} and extension @var{ext}, i.e., a file named
-## @var{filename}.@var{ext}.
+## a file with the extension @var{ext}.  Finally, it will attempt to download
+## and read an image from @var{url}.
 ##
 ## The size and class of the output depends on the
 ## format of the image.  A color image is returned as an
@@ -75,7 +75,17 @@
 ## Controls the image region that is read.  Takes as value a cell array
 ## with two arrays of 3 elements @code{@{@var{rows} @var{cols}@}}.  The
 ## elements in the array are the start, increment and end pixel to be
-## read.  If the increment value is omitted, defaults to 1.
+## read.  If the increment value is omitted, defaults to 1.  For example,
+## the following are all equivalent:
+##
+## @example
+## @group
+## imread (filename, "PixelRegion", @{[200 600] [300 700]@});
+## imread (filename, "PixelRegion", @{[200 1 600] [300 1 700]@});
+## imread (filename)(200:600, 300:700);
+## @end group
+## @end example
+##
 ## @end table
 ##
 ## @seealso{imwrite, imfinfo, imformats}
@@ -88,23 +98,16 @@
 ## Author: Stefan van der Walt <stefan@sun.ac.za>
 ## Author: Andy Adler
 
-function [img, varargout] = imread (varargin)
+function [img, varargout] = imread (filename, varargin)
   if (nargin < 1)
     print_usage ();
-  elseif (! ischar (varargin{1}))
+  elseif (! ischar (filename))
     error ("imread: FILENAME must be a string");
   endif
-  ## In case the file format was specified as a separate argument we
-  ## do this. imageIO() will ignore the second part if filename on its
-  ## own is enough. And if the second argument was a parameter name instead
-  ## of an extension, it is still going to be passed to the next function
-  ## since we are passing the whole function input as well.
-  filename = {varargin{1}};
-  if (nargin > 1 && ischar (varargin {2}))
-    filename{2} = varargin{2};
-  endif
 
-  [img, varargout{1:nargout-1}] = imageIO (@__imread__, "read", filename, varargin{:});
+  [img, varargout{1:nargout-1}] = ...
+    imageIO ("imread", @__imread__, "read", filename, varargin{:});
+
 endfunction
 
 
@@ -126,7 +129,7 @@
 %!   16,  28, 160,  16,   0, 197, 214,  13,  34,  74, ...
 %!  117, 213,  17,   0,   0,   0,   0,  73,  69,  78, ...
 %!   68, 174,  66,  96, 130];
-%! filename = [tmpnam() ".png"];
+%! filename = [tempname() ".png"];
 %! unwind_protect
 %!   fid = fopen (filename, "wb");
 %!   fwrite (fid, vpng);
@@ -139,3 +142,66 @@
 %! assert (A(:,:,2), uint8 ([0, 255, 0; 255,  28, 255; 0, 255, 0]));
 %! assert (A(:,:,3), uint8 ([0, 255, 0; 255,  36, 255; 0, 255, 0]));
 
+%!function [r, cmap, a] = write_and_read (w, varargin)
+%!  filename = [tempname() ".tif"];
+%!  unwind_protect
+%!    imwrite (w, filename);
+%!    [r, cmap, a] = imread (filename, varargin{:});
+%!  unwind_protect_cleanup
+%!    unlink (filename);
+%!  end_unwind_protect
+%!endfunction
+
+## test PixelRegion option
+%!testif HAVE_MAGICK
+%! w = randi (255, 100, 100, "uint8");
+%! [r, cmap, a] = write_and_read (w, "PixelRegion", {[50 70] [20 40]});
+%! assert (r, w(50:70, 20:40))
+%! [r, cmap, a] = write_and_read (w, "PixelRegion", {[50 2 70] [20 3 40]});
+%! assert (r, w(50:2:70, 20:3:40))
+
+## If a file does not exist, it's the job of imread to check the file
+## exists before sending it over to __imread__ or whatever function
+## is defined in imformats to handle that specific format.  This is the
+## same in imfinfo.  So in this test we replace one format in imformats
+## with something that will not give an error if the file is missing
+## and make sure we do get an error.
+%!testif HAVE_MAGICK
+%! fmt = fmt_ori = imformats ("jpg");
+%! fmt.read = @true;
+%! error_thrown = false;
+%! imformats ("update", "jpg", fmt);
+%! unwind_protect
+%!   try
+%!     imread ("I sure hope this file does not exist.jpg");
+%!   catch
+%!     error_thrown = true;
+%!   end_try_catch
+%! unwind_protect_cleanup
+%!   imformats ("update", "jpg", fmt_ori);
+%! end_unwind_protect
+%! assert (error_thrown, true);
+
+## make one of the formats read, return what it received as input to
+## confirm that the input parsing is working correcly
+%!testif HAVE_MAGICK
+%! fname = [tempname() ".jpg"];
+%! def_fmt = imformats ();
+%! fid = fopen (fname, "w");
+%! unwind_protect
+%!   fmt = imformats ("jpg");
+%!   fmt.read = @(varargin) varargin;
+%!   imformats ("update", "jpg", fmt);
+%!   assert (imread (fname), {fname});
+%!   assert (imread (fname, "jpg"), {fname});
+%!   assert (imread (fname(1:end-4), "jpg"), {fname});
+%!   extra_inputs = {"some", 89, i, {6 7 8}};
+%!   assert (imread (fname, extra_inputs{:}), {fname, extra_inputs{:}});
+%!   assert (imread (fname, "jpg", extra_inputs{:}), {fname, extra_inputs{:}});
+%!   assert (imread (fname(1:end-4), "jpg", extra_inputs{:}), {fname, extra_inputs{:}});
+%! unwind_protect_cleanup
+%!   fclose (fid);
+%!   unlink (fname);
+%!   imformats (def_fmt);
+%! end_unwind_protect
+
--- a/scripts/image/imshow.m
+++ b/scripts/image/imshow.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -46,6 +46,9 @@
 ## @item @qcode{"displayrange"}
 ## @var{value1} is the display range as described above.
 ##
+## @item @qcode{"colormap"}
+## @var{value1} is the colormap to use when displaying an indexed image.
+##
 ## @item @qcode{"xdata"}
 ## If @var{value1} is a two element vector, it must contain horizontal axis
 ## limits in the form [xmin xmax]; Otherwise @var{value1} must be a
@@ -75,7 +78,7 @@
   endif
 
   display_range = NA;
-  true_color = false;
+  truecolor = false;
   indexed = false;
   xdata = ydata = [];
 
@@ -98,9 +101,9 @@
     endif
   elseif (size (im, 3) == 3)
     if (ismember (class (im), {"uint8", "uint16", "double", "single"}))
-      true_color = true;
+      truecolor = true;
     else
-      error ("imshow: color image must be uint8, uint16, double, or single");
+      error ("imshow: TrueColor image must be uint8, uint16, double, or single");
     endif
   else
     error ("imshow: expecting MxN or MxNx3 matrix for image");
@@ -114,34 +117,47 @@
         display_range = arg;
       elseif (columns (arg) == 3)
         indexed = true;
-        colormap (arg);
+        if (iscolormap (arg))
+          colormap (arg);
+        else
+          error ("imshow: invalid colormap MAP");
+        endif
       elseif (! isempty (arg))
-        error ("imshow: argument number %d is invalid", narg+1);
+        error ("imshow: argument number %d is invalid", narg);
       endif
     elseif (ischar (arg))
       switch (tolower (arg))
-        case "displayrange";
+        case "colormap"
+          map = varargin{narg++};
+          if (iscolormap (map))
+            colormap (map);
+          else
+            error ("imshow: invalid colormap");
+          endif
+        case "displayrange"
           display_range = varargin{narg++};
-        case "xdata";
+        case "parent"
+          warning ("imshow: parent argument is not implemented");
+        case {"truesize", "initialmagnification"}
+          warning ("image: zoom argument ignored -- use GUI features");
+        case "xdata"
           xdata = varargin{narg++};
           if (! isvector (xdata))
             error ("imshow: xdata must be a vector")
           endif
           xdata = [xdata(1) xdata(end)];
-        case "ydata";
+        case "ydata"
           ydata = varargin{narg++};
           if (! isvector (ydata))
-            error ("imshow: expect a vector for ydata")
+            error ("imshow: ydata must be a vector")
           endif
           ydata = [ydata(1) ydata(end)];
-        case {"truesize", "initialmagnification"}
-          warning ("image: zoom argument ignored -- use GUI features");
         otherwise
           warning ("imshow: unrecognized property %s", arg);
           narg++;
       endswitch
     else
-      error ("imshow: argument number %d is invalid", narg+1);
+      error ("imshow: argument number %d is invalid", narg);
     endif
   endwhile
 
@@ -159,46 +175,45 @@
     switch (t)
       case {"double", "single", "logical"}
         display_range = [0, 1];
-      case {"int8", "int16", "int32", "uint8", "uint16", "uint32"}
+      case {"uint8", "uint16", "int16"}
         display_range = [intmin(t), intmax(t)];
       otherwise
         error ("imshow: invalid data type for image");
     endswitch
   endif
 
-  nans = isnan (im(:));
-  if (any (nans))
-    warning ("Octave:imshow-NaN",
-             "imshow: pixels with NaN or NA values are set to minimum pixel value");
-    im(nans) = display_range(1);
-  endif
-
-  ## This is for compatibility.
-  if (! (indexed || (true_color && isinteger (im))) || islogical (im))
-    im = double (im);
+  if (isfloat (im))
+    nans = isnan (im(:));
+    if (any (nans))
+      warning ("Octave:imshow-NaN",
+               "imshow: pixels with NaN or NA values are set to minimum pixel value");
+      im(nans) = display_range(1);
+    endif
   endif
 
+  ## FIXME: Commented out 2014/05/01.  imagesc and 'clim' will automatically
+  ## take care of displaying out-of-range data clamped to the limits.
+  ## Eventually, this can be deleted if no problems arise.
   ## Clamp the image to the range boundaries
-  if (! (true_color || indexed || islogical (im)))
-    low = display_range(1);
-    high = display_range(2);
-    im(im < low) = low;
-    im(im > high) = high;
-  endif
+  ##if (! (truecolor || indexed || islogical (im)))
+  ##  low = display_range(1);
+  ##  high = display_range(2);
+  ##  im(im < low) = low;
+  ##  im(im > high) = high;
+  ##endif
 
-  if (true_color || indexed)
-    tmp = image (xdata, ydata, im);
+  if (truecolor || indexed)
+    htmp = image (xdata, ydata, im);
   else
-    tmp = image (xdata, ydata, im);
-    set (tmp, "cdatamapping", "scaled");
-    ## The backend is responsible for scaling to clim if necessary.
+    htmp = imagesc (xdata, ydata, im, display_range);
     set (gca (), "clim", display_range);
   endif
-  set (gca (), "visible", "off", "ydir", "reverse");
+  set (gca (), "visible", "off", "view", [0, 90],
+               "ydir", "reverse", "layer", "top");
   axis ("image");
 
   if (nargout > 0)
-    h = tmp;
+    h = htmp;
   endif
 
 endfunction
@@ -241,8 +256,25 @@
 %! imshow (rand (100, 100));
 %! colormap (jet (64));
 
-%% Test input validation
+## Test input validation
 %!error imshow ()
 %!error <IM must be an image> imshow ({"cell"})
+%!error <TrueColor image must be uint8> imshow (ones (3,3,3, "uint32"))
+%!error <TrueColor image must be uint8> imshow (ones (3,3,3, "int16"))
 %!error <expecting MxN or MxNx3 matrix> imshow (ones (4,4,4))
 
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   fail ("imshow ([1,1], [2 0 0])", "invalid colormap MAP");
+%!   fail ("imshow ([1,1], [1 0 0 0])", "argument number 2 is invalid");
+%!   fail ('imshow ([1,1], "colormap", [2 0 0])', "invalid colormap");
+%!   fail ('imshow ([1,1], "xdata", ones (2,2))', "xdata must be a vector");
+%!   fail ('imshow ([1,1], "ydata", ones (2,2))', "ydata must be a vector");
+%!   fail ('imshow ([1,1], "foobar")', "warning", "unrecognized property foobar")
+%!   fail ("imshow ([1,1], {1})", "argument number 2 is invalid");
+%!   fail ("imshow ([1+i,1-i])", "warning", "only showing real part of complex image");
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
--- a/scripts/image/imwrite.m
+++ b/scripts/image/imwrite.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2008-2013 John W. Eaton
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2008-2015 John W. Eaton
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -49,7 +49,7 @@
 ##
 ## @item DelayTime
 ## For formats that accept animations (such as GIF), controls for how long a
-## frame is displayed until it moves to the next one. The value must be scalar
+## frame is displayed until it moves to the next one.  The value must be scalar
 ## (which will applied to all frames in @var{img}), or a vector of length
 ## equal to the number of frames in @var{im}.  The value is in seconds, must
 ## be between 0 and 655.35, and defaults to 0.5.
@@ -100,7 +100,7 @@
   fmt = imformats (ext);
   ## When there is no match, fmt will be a 1x1 structure with
   ## no fields, so we can't just use `isempty (fmt)'.
-  if (isempty (fieldnames (fmt)))
+  if (numfields (fmt) == 0)
     if (isempty (ext))
       error ("imwrite: no extension found for %s to identify the image format",
              filename);
@@ -114,7 +114,7 @@
 
 endfunction
 
-%% Test input validation
+## Test input validation
 %!error imwrite ()                            # Wrong # of args
 %!error imwrite (1)                           # Wrong # of args
 %!error imwrite ({"cell"}, "filename.jpg")    # Wrong class for img
@@ -125,8 +125,8 @@
 %!error imwrite ([], "filename.jpg")          # Empty img matrix
 %!error imwrite (spones (2), "filename.jpg")  # Invalid sparse img
 
-%!function [r, cmap, a] = write_and_read (varargin)
-%!  filename = [tmpnam() ".tif"];
+%!function [r, cmap, a] = write_and_read (format, varargin)
+%!  filename = [tempname() format];
 %!  unwind_protect
 %!    imwrite (varargin{1}, filename, varargin{2:end});
 %!    [r, cmap, a] = imread (filename, "Index", "all");
@@ -138,56 +138,66 @@
 ## typical usage with grayscale uint8 images
 %!testif HAVE_MAGICK
 %! gray  = randi (255, 10, 10, 1, "uint8");
-%! r  = write_and_read (gray);
+%! r  = write_and_read (".tif", gray);
 %! assert (r, gray)
 
 ## grayscale uint8 images with alpha channel
 %!testif HAVE_MAGICK
 %! gray  = randi (255, 10, 10, 1, "uint8");
 %! alpha = randi (255, 10, 10, 1, "uint8");
-%! [r, ~, a] = write_and_read (gray, "Alpha", alpha);
+%! [r, ~, a] = write_and_read (".tif", gray, "Alpha", alpha);
 %! assert (r, gray)
 %! assert (a, alpha)
 
 ## multipage grayscale uint8 images
 %!testif HAVE_MAGICK
 %! gray  = randi (255, 10, 10, 1, 5, "uint8");
-%! r     = write_and_read (gray);
+%! r     = write_and_read (".tif", gray);
 %! assert (r, gray)
 
 ## multipage RGB uint8 images with alpha channel
 %!testif HAVE_MAGICK
 %! gray  = randi (255, 10, 10, 3, 5, "uint8");
 %! alpha = randi (255, 10, 10, 1, 5, "uint8");
-%! [r, ~, a] = write_and_read (gray, "Alpha", alpha);
+%! [r, ~, a] = write_and_read (".tif", gray, "Alpha", alpha);
 %! assert (r, gray)
 %! assert (a, alpha)
 
 ## typical usage with RGB uint8 images
 %!testif HAVE_MAGICK
 %! rgb = randi (255, 10, 10, 3, "uint8");
-%! r = write_and_read (rgb);
+%! r = write_and_read (".tif", rgb);
 %! assert (r, rgb)
 
 ## RGB uint8 images with alpha channel
 %!testif HAVE_MAGICK
 %! rgb   = randi (255, 10, 10, 3, "uint8");
 %! alpha = randi (255, 10, 10, 1, "uint8");
-%! [r, ~, a] = write_and_read (rgb, "Alpha", alpha);
+%! [r, ~, a] = write_and_read (".tif", rgb, "Alpha", alpha);
 %! assert (r, rgb)
 %! assert (a, alpha)
 
 ## multipage RGB uint8 images
 %!testif HAVE_MAGICK
 %! rgb = randi (255, 10, 10, 3, 5, "uint8");
-%! r = write_and_read (rgb);
+%! r = write_and_read (".tif", rgb);
 %! assert (r, rgb)
 
 ## multipage RGB uint8 images with alpha channel
 %!testif HAVE_MAGICK
 %! rgb   = randi (255, 10, 10, 3, 5, "uint8");
 %! alpha = randi (255, 10, 10, 1, 5, "uint8");
-%! [r, ~, a] = write_and_read (rgb, "Alpha", alpha);
+%! [r, ~, a] = write_and_read (".tif", rgb, "Alpha", alpha);
 %! assert (r, rgb)
 %! assert (a, alpha)
 
+%!testif HAVE_MAGICK
+%! gray = repmat (uint8 (0:255), 100, 1);
+%! [g] = write_and_read (".jpeg", gray);
+%! assert (g, gray, 2)
+
+%!testif HAVE_MAGICK
+%! gray = repmat (uint8 (0:255), 100, 1);
+%! [g] = write_and_read (".jpeg", gray, "quality", 100);
+%! assert (g, gray)
+
--- a/scripts/image/ind2gray.m
+++ b/scripts/image/ind2gray.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -69,18 +69,19 @@
 
 %!shared i2g
 %! i2g = ind2gray (1:100, gray (100));
-%!assert (i2g, 0:1/99:1, eps);
-%!assert (gray2ind (i2g, 100), uint8 (0:99));
+%!
+%!assert (i2g, 0:1/99:1, eps)
+%!assert (gray2ind (i2g, 100), uint8 (0:99))
 
-%% Test input validation
+## Test input validation
 %!error ind2gray ()
 %!error ind2gray (1)
 %!error ind2gray (1,2,3)
-%!error <X must be an indexed image> ind2gray ({1}, jet (64))
+%!error <X must be an indexed image> ind2gray (ones (3,3,3), jet (64))
 %!error <X must be an indexed image> ind2gray (1+i, jet (64))
 %!error <X must be an indexed image> ind2gray (sparse (1), jet (64))
-%!error <X must be an indexed image> ind2gray (0, jet (64))
 %!error <X must be an indexed image> ind2gray (1.1, jet (64))
+%!error <X must be an indexed image> ind2gray ({1}, jet (64))
 %!error <MAP must be a valid colormap> ind2gray (1, {1})
 %!error <MAP must be a valid colormap> ind2gray (1, 1+i)
 %!error <MAP must be a valid colormap> ind2gray (1, ones (2,2,2))
@@ -88,3 +89,7 @@
 %!error <MAP must be a valid colormap> ind2gray (1, [-1])
 %!error <MAP must be a valid colormap> ind2gray (1, [2])
 
+%!warning <contains colors outside of colormap> ind2gray ([0 1 2], gray (5));
+%!warning <contains colors outside of colormap> ind2gray ([1 2 6], gray (5));
+%!warning <contains colors outside of colormap> ind2gray (uint8 ([1 2 5]), gray (5));
+
--- a/scripts/image/ind2rgb.m
+++ b/scripts/image/ind2rgb.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -59,7 +59,8 @@
     if (ndims (x) == 2)
       R = reshape ([R(:); G(:); B(:)], [sz, 3]);
     elseif (ndims (x) == 4)
-      R = permute (reshape ([R(:); G(:); B(:)], [sz(1) sz(2) sz(4) 3]), [1 2 4 3]);
+      R = permute (reshape ([R(:); G(:); B(:)], [sz(1) sz(2) sz(4) 3]), ...
+                   [1 2 4 3]);
     else
       ## we should never reach here since ind2x() should filter them out
       error ("ind2rgb: an indexed image must have 2 or 4 dimensions.");
@@ -82,23 +83,29 @@
 %! ## test basic usage with 1 and 3 outputs
 %! [rgb] = ind2rgb (img, map);
 %! [r, g, b] = ind2rgb (img, map);
-%!assert (ergb, rgb);
-%!assert (ergb, reshape ([r(:) g(:) b(:)], [size(img) 3]));
+%!
+%!assert (ergb, rgb)
+%!assert (ergb, reshape ([r(:) g(:) b(:)], [size(img) 3]))
+%!test
 %! ## test correction for integers
-%! img = uint8 (img -1);
+%! img = uint8 (img - 1);
 %! [rgb] = ind2rgb (img, map);
-%!assert (ergb, rgb);
-%! ## check it fails when image is a float with an index value of 0
-%!fail ("[rgb] = ind2rgb (double(img), map)")
+%! assert (ergb, rgb);
+%!test
+%! ## Check that values below lower bound are mapped to first color value
+%! warning ("off", "Octave:ind2rgb:invalid-idx-img", "local");
+%! rgb = ind2rgb ([-1 0 2], gray (64));
+%! assert (rgb(:,1:2,:), zeros (1,2,3));
+%! assert (rgb(:,3,:), 1/63 * ones (1,1,3));
 
-%% Test input validation
+## Test input validation
 %!error ind2rgb ()
 %!error ind2rgb (1,2,3)
-%!error <X must be an indexed image> ind2rgb ({1}, jet (64))
+%!error <X must be an indexed image> ind2rgb (ones (3,3,3), jet (64))
 %!error <X must be an indexed image> ind2rgb (1+i, jet (64))
 %!error <X must be an indexed image> ind2rgb (sparse (1), jet (64))
-%!error <X must be an indexed image> ind2rgb (0, jet (64))
 %!error <X must be an indexed image> ind2rgb (1.1, jet (64))
+%!error <X must be an indexed image> ind2rgb ({1}, jet (64))
 %!error <MAP must be a valid colormap> ind2rgb (1, {1})
 %!error <MAP must be a valid colormap> ind2rgb (1, 1+i)
 %!error <MAP must be a valid colormap> ind2rgb (1, ones (2,2,2))
@@ -106,3 +113,8 @@
 %!error <MAP must be a valid colormap> ind2rgb (1, [-1])
 %!error <MAP must be a valid colormap> ind2rgb (1, [2])
 
+%!warning <contains colors outside of colormap> ind2rgb ([-1 1], jet (64));
+%!warning <contains colors outside of colormap> ind2rgb ([0 1 2], gray (5));
+%!warning <contains colors outside of colormap> ind2rgb ([1 2 6], gray (5));
+%!warning <contains colors outside of colormap> ind2rgb (uint8 ([1 2 5]), gray (5));
+
--- a/scripts/image/iscolormap.m
+++ b/scripts/image/iscolormap.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Carnë Draug
+## Copyright (C) 2012-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -35,9 +35,9 @@
     print_usage;
   endif
 
-  retval = (isnumeric (cmap) && isreal (cmap) &&
-            ndims (cmap) == 2 && columns (cmap) == 3 && isa (cmap, "double") &&
-            min (cmap(:)) >= 0 && max (cmap(:)) <= 1);
+  retval = (isnumeric (cmap) && isreal (cmap) && ndims (cmap) == 2
+            && columns (cmap) == 3 && isa (cmap, "double")
+            && min (cmap(:)) >= 0 && max (cmap(:)) <= 1);
 
 endfunction
 
--- a/scripts/image/jet.m
+++ b/scripts/image/jet.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,16 +31,12 @@
 ## PKG_ADD: colormap ("register", "jet");
 ## PKG_DEL: colormap ("unregister", "jet");
 
-function map = jet (n)
+function map = jet (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("jet: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("jet: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/lines.m
+++ b/scripts/image/lines.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
@@ -30,16 +30,12 @@
 ## PKG_ADD: colormap ("register", "lines");
 ## PKG_DEL: colormap ("unregister", "lines");
 
-function map = lines (n)
+function map = lines (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("lines: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("lines: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/module.mk
+++ b/scripts/image/module.mk
@@ -19,6 +19,7 @@
   image/contrast.m \
   image/cool.m \
   image/copper.m \
+  image/cubehelix.m \
   image/flag.m \
   image/gmap40.m \
   image/gray.m \
--- a/scripts/image/ntsc2rgb.m
+++ b/scripts/image/ntsc2rgb.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -50,7 +50,7 @@
   endif
 
   ## If we have an image convert it into a color map.
-  if (ismatrix (yiq) && ndims (yiq) == 3)
+  if (isnumeric (yiq) && ndims (yiq) == 3)
     is_image = true;
     sz = size (yiq);
     yiq = [yiq(:,:,1)(:), yiq(:,:,2)(:), yiq(:,:,3)(:)];
@@ -81,7 +81,7 @@
 endfunction
 
 
-%% Test pure R, G, B colors
+## Test pure R, G, B colors
 %!assert (ntsc2rgb ([.299  .596  .211]), [1 0 0], 1e-5)
 %!assert (ntsc2rgb ([.587 -.274 -.523]), [0 1 0], 1e-5)
 %!assert (ntsc2rgb ([.114 -.322  .312]), [0 0 1], 1e-5)
@@ -94,7 +94,7 @@
 %! rgb_img = rand (64, 64, 3);
 %! assert (ntsc2rgb (rgb2ntsc (rgb_img)), rgb_img, 1e-3);
 
-%% Test input validation
+## Test input validation
 %!error ntsc2rgb ()
 %!error ntsc2rgb (1,2)
 %!error <YIQ must be of type double> ntsc2rgb (uint8 (1))
--- a/scripts/image/ocean.m
+++ b/scripts/image/ocean.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -33,17 +33,14 @@
 ## PKG_ADD: colormap ("register", "ocean");
 ## PKG_DEL: colormap ("unregister", "ocean");
 
-function map = ocean (n)
+function map = ocean (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("ocean: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("ocean: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 0, 0];
--- a/scripts/image/pink.m
+++ b/scripts/image/pink.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,16 +31,12 @@
 ## PKG_ADD: colormap ("register", "pink");
 ## PKG_DEL: colormap ("unregister", "pink");
 
-function map = pink (n)
+function map = pink (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("pink: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("pink: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/prism.m
+++ b/scripts/image/prism.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,16 +31,12 @@
 ## PKG_ADD: colormap ("register", "prism");
 ## PKG_DEL: colormap ("unregister", "prism");
 
-function map = prism (n)
+function map = prism (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("prism: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("prism: N must be a scalar");
   endif
 
   if (n == 1)
--- a/scripts/image/private/__imfinfo__.m
+++ b/scripts/image/private/__imfinfo__.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2008-2013 Soren Hauberg
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2008-2015 Soren Hauberg
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -17,56 +17,22 @@
 ## along with Octave; see the file COPYING.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-## This function does al the work of imfinfo. It exists here as private
+## This function does all the work of imfinfo. It exists here as private
 ## function so that imfinfo can use other functions if imformats is
 ## configured to. It is also needed so that imformats can create a
 ## function handle for it.
 
 ## Author: Soren Hauberg <hauberg@gmail.com>
 
-function info = __imfinfo__ (filename, ext)
+function info = __imfinfo__ (filename)
 
-  if (nargin < 1 || nargin > 2)
+  if (nargin != 1)
     print_usage ("imfinfo");
+  elseif (! ischar (filename))
+    error ("imfinfo: FILENAME must be a string");
   endif
 
-  if (! ischar (filename))
-    error ("imfinfo: FILENAME must be a string");
-  elseif (nargin >= 2 && ! ischar (ext))
-    error ("imfinfo: EXT must be a string");
-  endif
-  filename = tilde_expand (filename);
-
-  delete_file = false;
-  unwind_protect
-
-    fn = file_in_path (IMAGE_PATH, filename);
-    if (isempty (fn))
-      ## We couldn't find the file so...
-      if (nargin >= 2)
-        ## try adding a possible file extesion
-        filename  = [filename "." ext];
-        fn        = file_in_path (IMAGE_PATH, filename);
-        if (isempty (fn))
-          error ("imfinfo: cannot find file %s", filename);
-        endif
-      else
-        ## try filename as an URL
-        [fn, status, msg] = urlwrite (filename, tmpnam ());
-        if (! status)
-          error ("imfinfo: cannot find or download %s: %s", filename, msg);
-        endif
-        delete_file = true;
-      endif
-    endif
-
-    info = __magick_finfo__ (fn);
-
-  unwind_protect_cleanup
-    if (delete_file)
-      unlink (fn);
-    endif
-  end_unwind_protect
+  info = __magick_finfo__ (filename);
 
 endfunction
 
--- a/scripts/image/private/__imread__.m
+++ b/scripts/image/private/__imread__.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Carnë Draug
-## Copyright (C) 2008-2013 Thomas L. Scofield
+## Copyright (C) 2013-2015 Carnë Draug
+## Copyright (C) 2008-2015 Thomas L. Scofield
 ## Copyright (C) 2008 Kristian Rumberg
 ## Copyright (C) 2006 Thomas Weber
 ## Copyright (C) 2005 Stefan van der Walt
@@ -44,18 +44,6 @@
   ## keep track of the varargin offset we're looking at each moment
   offset    = 1;
 
-  filename  = tilde_expand (filename);
-  fn        = file_in_path (IMAGE_PATH, filename);
-  if (isempty (fn) && nargin >= offset + 1 && ischar (varargin{offset}))
-    ## if we can't find the file, check if the next input is the file extension
-    filename  = [filename "." varargin{offset}];
-    fn        = file_in_path (IMAGE_PATH, filename);
-    offset++;
-  endif
-  if (isempty (fn))
-    error ("imread: cannot find %s", filename);
-  endif
-
   ## It is possible for an file with multiple pages to have very different
   ## images on each page. Specifically, they may have different sizes. Because
   ## of this, we need to first find out the index of the images to read so
@@ -80,124 +68,73 @@
 
   ## Check key/value options.
   indexes = cellfun ("isclass", varargin, "char");
-  indexes(indexes) &= ismember (tolower (varargin(indexes)), {"frames", "index"});
+  indexes(indexes) &= ismember (tolower (varargin(indexes)),
+                                {"frames", "index"});
   indexes = find (indexes);
   if (indexes)
     options.index = varargin{indexes+1};
-    if (! (is_valid_index_option (options.index)) &&
-        ! (ischar (options.index) && strcmpi (options.index, "all")))
+    if (! is_valid_index_option (options.index)
+        && ! (ischar (options.index) && strcmpi (options.index, "all")))
       error ("imread: value for %s must be a vector or the string `all'");
     endif
   endif
 
-  try
-    ## Use information from the first image to be read to set defaults.
-    if (ischar (options.index) && strcmpi (options.index, "all"))
-      info = __magick_ping__ (fn, 1);
-    else
-      info = __magick_ping__ (fn, options.index(1));
-    endif
+  ## Use information from the first image to be read to set defaults.
+  if (ischar (options.index) && strcmpi (options.index, "all"))
+    info = __magick_ping__ (filename, 1);
+  else
+    info = __magick_ping__ (filename, options.index(1));
+  endif
 
-    ## Set default for options.
-    options.region = {1:1:info.rows 1:1:info.columns};
+  ## Set default for options.
+  options.region = {1:1:info.rows 1:1:info.columns};
+
+  for idx = offset:2:(numel (varargin) - offset + 1)
+    switch (tolower (varargin{idx}))
 
-    for idx = offset:2:(numel (varargin) - offset + 1)
-      switch (tolower (varargin{idx}))
+      case {"frames", "index"}
+        ## Do nothing. This options were already processed before the loop.
 
-        case {"frames", "index"}
-          ## Do nothing. This options were already processed before the loop.
-
-        case "pixelregion",
-          options.region = varargin{idx+1};
-          if (! iscell (options.region) || numel (options.region) != 2)
-            error ("imread: value for %s must be a 2 element cell array",
+      case "pixelregion",
+        options.region = varargin{idx+1};
+        if (! iscell (options.region) || numel (options.region) != 2)
+          error ("imread: value for %s must be a 2 element cell array",
+                 varargin{idx});
+        endif
+        for reg_idx = 1:2
+          if (numel (options.region{reg_idx}) == 3)
+            ## do nothing
+          elseif (numel (options.region{reg_idx}) == 2)
+            options.region{reg_idx}(3) = options.region{reg_idx}(2);
+            options.region{reg_idx}(2) = 1;
+          else
+            error ("imread: range for %s must be a 2 or 3 element vector",
                    varargin{idx});
           endif
-          for reg_idx = 1:2
-            if (numel (options.region{reg_idx}) == 3)
-              ## do nothing
-            elseif (numel (options.region{reg_idx}) == 2)
-              options.region{reg_idx}(3) = options.region{reg_idx}(2);
-              options.region{reg_idx}(2) = 1;
-            else
-              error ("imread: range for %s must be a 2 or 3 element vector",
-                     varargin{idx});
-            endif
-            options.region{reg_idx} = floor (options.region{reg_idx}(1)): ...
-                                      floor (options.region{reg_idx}(2)): ...
-                                      floor (options.region{reg_idx}(3));
-          endfor
-          if (options.region{1}(end) > info.rows)
-            error ("imread: end ROWS for PixelRegions option is larger than image height");
-          elseif (options.region{2}(end) > info.columns)
-            error ("imread: end COLS for PixelRegions option is larger than image width");
-          endif
-
-        case "info",
-          ## We ignore this option. This parameter exists in Matlab to
-          ## speed up the reading of multipage TIFF by passing a structure
-          ## that contains information about the start on the file of each
-          ## page.  We can't control it through GraphicsMagic but at least
-          ## we allow to load multiple pages with one command.
-
-        otherwise
-          error ("imread: invalid PARAMETER `%s'", varargin{idx});
-
-      endswitch
-    endfor
-
-    [varargout{1:nargout}] = __magick_read__ (fn, options);
+          options.region{reg_idx} = floor (options.region{reg_idx}(1)): ...
+                                    floor (options.region{reg_idx}(2)): ...
+                                    floor (options.region{reg_idx}(3));
+        endfor
+        if (options.region{1}(end) > info.rows)
+          error ("imread: end ROWS for PixelRegions option is larger than image height");
+        elseif (options.region{2}(end) > info.columns)
+          error ("imread: end COLS for PixelRegions option is larger than image width");
+        endif
 
-  catch
-    ## If we can't read it with Magick, maybe the image is in Octave's
-    ## native image format.  This is from back before Octave had 'imread'
-    ## and 'imwrite'. Then we had the functions 'loadimage' and 'saveimage'.
-    ##
-    ## This "image format" seems to be any file that can be read with
-    ## load() and contains 2 variables.  The variable named "map" is a
-    ## colormap and must exist whether the image is indexed or not. The
-    ## other variable must be named "img" or "X" for a "normal" or
-    ## indexed image.
-    ##
-    ## FIXME: this has been deprecated for the next major release (3.8 or 4.0).
-    ##        If someone wants to revive this as yet another image format, a
-    ##        separate Octave package can be written for it, that register the
-    ##        format through imformats.
-
-    magick_error = lasterr ();
-
-    img_field = false;
-    x_field   = false;
-    map_field = false;
+      case "info",
+        ## We ignore this option. This parameter exists in Matlab to
+        ## speed up the reading of multipage TIFF by passing a structure
+        ## that contains information about the start on the file of each
+        ## page.  We can't control it through GraphicsMagic but at least
+        ## we allow to load multiple pages with one command.
 
-    try
-      vars = load (fn);
-      if (isstruct (vars))
-        img_field = isfield (vars, "img");
-        x_field   = isfield (vars, "X");
-        map_field = isfield (vars, "map");
-      endif
-    catch
-      error ("imread: invalid image file: %s", magick_error);
-    end_try_catch
+      otherwise
+        error ("imread: invalid PARAMETER `%s'", varargin{idx});
 
-    if (map_field && (img_field || x_field))
-      varargout{2} = vars.map;
-      if (img_field)
-        varargout{1} = vars.img;
-      else
-        varargout{1} = vars.X;
-      endif
-      persistent warned = false;
-      if (! warned)
-        warning ("Octave's native image format has been deprecated.");
-        warned = true;
-      endif
-    else
-      error ("imread: invalid Octave image file format");
-    endif
+    endswitch
+  endfor
 
-  end_try_catch
+  [varargout{1:nargout}] = __magick_read__ (filename, options);
 
 endfunction
 
@@ -205,10 +142,6 @@
 ## can be defined in two places, but only in one place can it also be the
 ## string "all"
 function bool = is_valid_index_option (arg)
-  ## is the index option
-  bool = false;
-  if (isvector (arg) && isnumeric (arg) && isreal (arg))
-    bool = true;
-  endif
+  bool = isvector (arg) && isnumeric (arg) && isreal (arg);
 endfunction
 
--- a/scripts/image/private/__imwrite__.m
+++ b/scripts/image/private/__imwrite__.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2008-2013 John W. Eaton
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2008-2015 John W. Eaton
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -60,9 +60,9 @@
         elseif (size (options.alpha, 3) != 1)
           error ("imwrite: 3rd dimension of matrix for %s must be singleton",
                  param_list{idx});
-        elseif (ndims (options.alpha) > 4 ||
-                any (size (options.alpha)([1 2]) != size (img)([1 2])) ||
-                size (options.alpha, 4) != size (img, 4))
+        elseif (ndims (options.alpha) > 4
+                || any (size (options.alpha)([1 2]) != size (img)([1 2]))
+                || size (options.alpha, 4) != size (img, 4))
           error ("imwrite: matrix for %s must have same dimension as image",
                  param_list{idx});
         endif
@@ -80,15 +80,16 @@
           error ("imwrite: value for %s must either be a scalar or the number of frames",
                  param_list{idx});
         endif
-        if (any (options.delaytime(:) < 0) || any (options.delaytime(:) > 65535))
+        if (any (options.delaytime(:) < 0)
+            || any (options.delaytime(:) > 65535))
           error ("imwrite: value for %s must be between 0 and 655.35 seconds",
                  param_list{idx});
         endif
 
       case "disposalmethod"
         options.disposalmethod = param_list{idx+1};
-        if (! ischar (options.disposalmethod) &&
-            ! iscellstr (options.disposalmethod))
+        if (! ischar (options.disposalmethod)
+            && ! iscellstr (options.disposalmethod))
           error ("imwrite: value for %s must be a string or cell array of strings",
                  param_list{idx});
         elseif (! iscell (options.disposalmethod))
@@ -96,14 +97,16 @@
         endif
         options.disposalmethod = tolower (options.disposalmethod);
         matches = ismember (options.disposalmethod,
-                            {"donotspecify", "leaveinplace", "restorebg", "restoreprevious"});
+                            {"donotspecify", "leaveinplace", ...
+                             "restorebg", "restoreprevious"});
         if (any (! matches))
           error ("imwrite: unknow method %s for option %s",
                  options.disposalmethod{find (! matches, 1)},
                  param_list{idx});
         endif
         if (isscalar (options.disposalmethod))
-          options.disposalmethod = repmat (options.disposalmethod, 1, size (img, 4));
+          options.disposalmethod = repmat (options.disposalmethod, ...
+                                           1, size (img, 4));
         elseif (numel (options.disposalmethod) != size (img, 4))
           error ("imwrite: if value %s is a cell array must have same length as number of frames",
                  param_list{idx});
@@ -112,8 +115,8 @@
       case "loopcount"
         options.loopcount = param_list{idx+1};
         if (! isscalar (options.loopcount) || ! isnumeric (options.loopcount)
-            || (! isinf (options.loopcount) && (options.loopcount < 0 ||
-                                                options.loopcount > 65535)))
+            || (! isinf (options.loopcount)
+                && (options.loopcount < 0 || options.loopcount > 65535)))
           error ("imwrite: value for %s must be Inf or between 0 and 65535",
                  param_list{idx});
         endif
--- a/scripts/image/private/imageIO.m
+++ b/scripts/image/private/imageIO.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -16,54 +16,111 @@
 ## along with Octave; see the file COPYING.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-## This function simply connects imread and imfinfo() to the function
-## to be used based on their format. It does it by checking the file extension
-## of the file and redirecting to the appropriate function after checking
-## with imformats.
+## This function the image input functions imread() and imfinfo() to the
+## functions that will actually be used, based on their format.  See below
+## on the details on how it identifies the format, and to what it defaults.
+##
+## It will change the input arguments that were passed to imread() and
+## imfinfo().  It will change the filename to provide the absolute filepath
+## for the file, it will extract the possible format name from the rest of
+## the input arguments (in case there was one), and will give an error if
+## the file can't be found.
 ##
-## First argument is a function handle for the default imageIO function (what
-## to use if the file extension for the image file is not listed by imformats).
-## Second argument is the fieldname in the struct returned by imformats with a
-## function handle for the function to use. Third argument is a cell array, its
-## first element the filename, and the second, an optional file extension to
-## add to filename, if filename alone does not exist. All the others are the
-## original input arguments passed to the original imageIO function which will
-## be passed on to the destination function.
+## Usage:
 ##
-## No input checking whatsoever is performed. That should be performed by the
-## function calling it.
-
-function varargout = imageIO (core_func, fieldname, filename, varargin)
+## func      - Function name to use on error message.
+## core_func - Function handle for the default function to use if we can't
+##             find the format in imformats.
+## fieldname - Name of the field in the struct returned by imformats that
+##             has the function to use.
+## filename  - Most likely the first input argument from the function that
+##             called this. May be missing the file extension which can be
+##             on varargin.
+## varargin  - Followed by all the OTHER arguments passed to imread and
+##             imfinfo.
 
-  ## It should not be this function job to check if the file exists or not.
-  ## However, we need to know the file extension to use with imformats and
-  ## that means we need to know the actual filename that will be used which
-  ## is dependent on whether a file exists.
-  ##
-  ## If a file named filename{1} exists, then that's it, we will use that
-  ## wether it has an extension or not. If it does not exist and we have
-  ## something in filename{2}, then we will consider it the file extension.
-  ## Note the detail that if we find a file using filename{1} only, then we
-  ## should completely ignore filename{2}. It won't even be used by
-  ## imformats() at all, even if filename{1} has no extension to use with
-  ## imformats().
-  if (isscalar (filename) || ! isempty (file_in_path (IMAGE_PATH, filename{1})))
-    [~, ~, ext] = fileparts (filename{1});
-    if (! isempty (ext))
-      ## remove dot from extension
-      ext = ext(2:end);
-    endif
-  else
-    ext = filename{2};
+function varargout = imageIO (func, core_func, fieldname, filename, varargin)
+
+  ## First thing: figure out the filename and possibly download it.
+  ## The first attempt is to try the filename and see if it exists.  If it
+  ## does not, we try to add the next argument since the file extension can
+  ## be given as a separate argument.  If we still can't find the file, it
+  ## can be a URL.  Lastly, if we still didn't found a file, try adding the
+  ## extension to the URL
+
+  file_2_delete = false;  # will we have to remove the file in the end?
+  persistent abs_path = @(x) file_in_path (IMAGE_PATH, tilde_expand (x));
+
+  ## Filename was given with file extension
+  fn = abs_path (filename);
+  if (isempty (fn) && ! isempty (varargin))
+    ## Maybe if we add a file extension
+    fn = abs_path ([filename "." varargin{1}]);
   endif
 
-  fmt = imformats (ext);
-  ## When there is no match, fmt will be a 1x1 structure with no fields,
-  ## so we can't just use `isempty (fmt)'.
-  if (isempty (fieldnames (fmt)))
-    [varargout{1:nargout}] = core_func (varargin{:});
-  else
-    [varargout{1:nargout}] = fmt.(fieldname) (varargin{:});
+  ## Maybe we have an URL
+  if (isempty (fn))
+    file_2_delete = true; # mark file for deletion
+    [fn, ~] = urlwrite (filename, tempname ());
+    ## Maybe the URL is missing the file extension
+    if (isempty (fn) && ! isempty (varargin))
+      [fn, ~] = urlwrite ([filename "." varargin{1}], tempname ());
+    endif
+
+    if (isempty (fn))
+      error ("%s: unable to find file %s", func, filename);
+    endif
   endif
+
+  ## unwind_protect block because we may have a file to remove in the end
+  unwind_protect
+
+    ## When guessing the format to use, we first check if the second
+    ## argument is a format defined in imformats.  If so, we remove it
+    ## from the rest of arguments before passing them on.  If not, we
+    ## try to guess the format from the file extension.  Finally, if
+    ## we still don't know the format, we use the Octave core functions
+    ## which is the same for all formats.
+    foo = []; # the function we will use
+
+    ## We check if the call to imformats (ext) worked using
+    ## "numfields (fmt) > 0 because when it fails, the returned
+    ## struct is not considered empty.
+
+    ## try the second input argument
+    if (! isempty (varargin) && ischar (varargin{1}))
+      fmt = imformats (varargin{1});
+      if (numfields (fmt) > 0)
+        foo = fmt.(fieldname);
+        varargin(1) = []; # remove format name from arguments
+      endif
+    endif
+
+    ## try extension from file name
+    if (isempty (foo))
+      [~, ~, ext] = fileparts (fn);
+      if (! isempty (ext))
+        ## remove dot from extension
+        ext = ext(2:end);
+      endif
+      fmt = imformats (ext);
+      if (numfields (fmt) > 0)
+        foo = fmt.(fieldname);
+      endif
+    endif
+
+    ## use the core function
+    if (isempty (foo))
+      foo = core_func;
+    endif
+
+    [varargout{1:nargout}] = foo (fn, varargin{:});
+
+  unwind_protect_cleanup
+    if (file_2_delete)
+      unlink (fn);
+    endif
+  end_unwind_protect
+
 endfunction
 
--- a/scripts/image/private/imwrite_filename.m
+++ b/scripts/image/private/imwrite_filename.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,8 @@
   cmap = [];
   if (ischar (varargin{1}))
     filename_idx = 1;
-  elseif (numel (varargin) >= 2 && iscolormap (varargin{1}) && ischar (varargin{2}))
+  elseif (numel (varargin) >= 2
+          && iscolormap (varargin{1}) && ischar (varargin{2}))
     filename_idx = 2;
     cmap = varargin{1};
   else
@@ -47,9 +48,9 @@
   ## is a string, we consider it the file extension. Otherwise we will
   ## extract what we can from the previously found filename.
   options_idx = filename_idx + 1;
-  if (numel (varargin) > filename_idx &&
-      rem (length (varargin) - filename_idx, 2) != 0 &&
-      ischar (varargin{filename_idx + 1}))
+  if (numel (varargin) > filename_idx
+      && rem (length (varargin) - filename_idx, 2) != 0
+      && ischar (varargin{filename_idx + 1}))
     ext = varargin{filename_idx + 1};
     options_idx++;
   else
--- a/scripts/image/private/ind2x.m
+++ b/scripts/image/private/ind2x.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2012 Carnë Draug
 ##
 ## This file is part of Octave.
@@ -22,12 +22,13 @@
 function [x, map] = ind2x (caller, x, map)
 
   ## Check if X is an indexed image.
-  ## an indexed image is defined has having only 2D, and that's how Matlab
+  ## An indexed image is defined has having only 2D, and that's how Matlab
   ## behaves.  But we want to support ND images, so we will allow up to 4D
-  ## and check that the 3rd is a singleton
-  if (all (ndims (x) != [2 4]) || size (x, 3) != 1 || issparse (x) ||
-      (isfloat (x) && ! isindex (x)) ||
-      ! any (strcmp (class (x), {"uint8", "uint16", "single", "double"})))
+  ## and check that the 3rd dimension is a singleton.
+  if (all (ndims (x) != [2 4]) || size (x, 3) != 1
+      || iscomplex (x) || issparse (x)
+      || (isfloat (x) && x != fix (x))
+      || ! any (strcmp (class (x), {"uint8", "uint16", "single", "double"})))
     error ("%s: X must be an indexed image", caller);
   endif
 
@@ -36,10 +37,20 @@
     error ("%s: MAP must be a valid colormap", caller);
   endif
 
-  ## Do we have enough colors in the color map?
-  ## there's an offset of 1 when the indexed image is an integer class so we fix
-  ## it now and convert it to float only if really necessary and even then only
-  ## to single precision since that is enough for both uint8 and uint16.
+  ## Any color indices below the lower bound of the color map are modified
+  ## to point to the first color in the map (see bug #41851).
+  if (isfloat (x))
+    invalid_idx = x < 1;
+    if (any (invalid_idx(:)))
+      warning (["Octave:" caller ":invalid-idx-img"],
+               [caller ": indexed image contains colors outside of colormap"]);
+      x(invalid_idx) = 1;
+    endif
+  endif
+
+  ## Switch to using 1-based indexing.
+  ## It is possible that an integer storage class may not have enough room
+  ## to make the switch, in which case we convert the data to single.
   maxidx = max (x(:));
   if (isinteger (x))
     if (maxidx == intmax (class (x)))
@@ -49,9 +60,12 @@
     maxidx += 1;
   endif
 
+  ## When there are more colors in the image, than there are in the map,
+  ## pad the colormap with the last color in the map for Matlab compatibility.
   num_colors = rows (map);
   if (num_colors < maxidx)
-    ## Pad with the last color in the map for Matlab compatibility
+    warning (["Octave:" caller ":invalid-idx-img"],
+             [caller ": indexed image contains colors outside of colormap"]);
     pad = repmat (map(end,:), maxidx - num_colors, 1);
     map(end+1:maxidx, :) = pad;
   endif
--- a/scripts/image/rainbow.m
+++ b/scripts/image/rainbow.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -34,17 +34,14 @@
 ## PKG_ADD: colormap ("register", "rainbow");
 ## PKG_DEL: colormap ("unregister", "rainbow");
 
-function map = rainbow (n)
+function map = rainbow (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("rainbow: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("rainbow: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [1, 0, 0];
--- a/scripts/image/rgb2hsv.m
+++ b/scripts/image/rgb2hsv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -109,7 +109,7 @@
 endfunction
 
 
-%% Test pure colors and gray
+## Test pure colors and gray
 %!assert (rgb2hsv ([1 0 0]), [0 1 1])
 %!assert (rgb2hsv ([0 1 0]), [1/3 1 1])
 %!assert (rgb2hsv ([0 0 1]), [2/3 1 1])
@@ -123,7 +123,7 @@
 %! rgb_img = rand (64, 64, 3);
 %! assert (hsv2rgb (rgb2hsv (rgb_img)), rgb_img, 1e-6);
 
-%% Test input validation
+## Test input validation
 %!error rgb2hsv ()
 %!error rgb2hsv (1,2)
 %!error <invalid data type 'cell'> rgb2hsv ({1})
--- a/scripts/image/rgb2ind.m
+++ b/scripts/image/rgb2ind.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2012 Carnë Draug
 ##
 ## This file is part of Octave.
@@ -24,7 +24,7 @@
 ##
 ## The input image @var{rgb} can be specified as a single matrix of size
 ## @nospell{MxNx3}, or as three separate variables, @var{R}, @var{G}, and
-## @var{B}, its three colour channels, red, green, and blue.
+## @var{B}, its three color channels, red, green, and blue.
 ##
 ## It outputs an indexed image @var{x} and a colormap @var{map} to interpret
 ## an image exactly the same as the input.  No dithering or other form of color
@@ -34,7 +34,7 @@
 ## of rows in @var{map}) in order
 ##
 ## Multi-dimensional indexed images (of size @nospell{MxNx3xK}) are also
-## supported, both via a single input (@var{rgb}) or its three colour channels
+## supported, both via a single input (@var{rgb}) or its three color channels
 ## as separate variables.
 ##
 ## @seealso{ind2rgb, rgb2hsv, rgb2ntsc}
@@ -99,7 +99,7 @@
 
 endfunction
 
-%% Test input validation
+## Test input validation
 %!error rgb2ind ()
 %!error rgb2ind (1,2,3,4,5,6,7)
 %!error <RGB> rgb2ind (rand (10, 10, 4))
--- a/scripts/image/rgb2ntsc.m
+++ b/scripts/image/rgb2ntsc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -97,7 +97,7 @@
 endfunction
 
 
-%% Test pure RED, GREEN, BLUE colors
+## Test pure RED, GREEN, BLUE colors
 %!assert (rgb2ntsc ([1 0 0]), [.299  .596  .211])
 %!assert (rgb2ntsc ([0 1 0]), [.587 -.274 -.523])
 %!assert (rgb2ntsc ([0 0 1]), [.114 -.322  .312])
@@ -110,7 +110,7 @@
 %! rgb_img = rand (64, 64, 3);
 %! assert (ntsc2rgb (rgb2ntsc (rgb_img)), rgb_img, 1e-3);
 
-%% Test input validation
+## Test input validation
 %!error rgb2ntsc ()
 %!error rgb2ntsc (1,2)
 %!error <invalid data type 'cell'> rgb2ntsc ({1})
--- a/scripts/image/rgbplot.m
+++ b/scripts/image/rgbplot.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2012-2013 Rik Wehbring
-## Copyright (C) 2012-2013 Carnë Draug
+## Copyright (C) 2012-2015 Rik Wehbring
+## Copyright (C) 2012-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -83,7 +83,7 @@
 %! subplot (1, 2, 2);
 %! rgbplot (ocean, "composite");
 
-%% Test input validation
+## Test input validation
 %!error rgbplot ()
 %!error rgbplot (1,2)
 %!error <CMAP must be a valid colormap> rgbplot ({0 1 0})
--- a/scripts/image/spinmap.m
+++ b/scripts/image/spinmap.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel
+## Copyright (C) 2007-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/image/spring.m
+++ b/scripts/image/spring.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -30,17 +30,14 @@
 ## PKG_ADD: colormap ("register", "spring");
 ## PKG_DEL: colormap ("unregister", "spring");
 
-function map = spring (n)
+function map = spring (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("spring: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("spring: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [1, 0, 1];
--- a/scripts/image/summer.m
+++ b/scripts/image/summer.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -31,17 +31,14 @@
 ## PKG_ADD: colormap ("register", "summer");
 ## PKG_DEL: colormap ("unregister", "summer");
 
-function map = summer (n)
+function map = summer (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("summer: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("summer: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 0.5, 0.4];
--- a/scripts/image/white.m
+++ b/scripts/image/white.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -30,16 +30,12 @@
 ## PKG_ADD: colormap ("register", "white");
 ## PKG_DEL: colormap ("unregister", "white");
 
-function map = white (n)
+function map = white (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("white: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("white: N must be a scalar");
   endif
 
   map = ones (n, 3);
--- a/scripts/image/winter.m
+++ b/scripts/image/winter.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Kai Habel
+## Copyright (C) 1999-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -30,17 +30,14 @@
 ## PKG_ADD: colormap ("register", "winter");
 ## PKG_DEL: colormap ("unregister", "winter");
 
-function map = winter (n)
+function map = winter (n = rows (colormap ()))
 
-  if (nargin == 0)
-    n = rows (colormap);
-  elseif (nargin == 1)
-    if (! isscalar (n))
-      error ("winter: N must be a scalar");
-    endif
-  else
+  if (nargin > 1)
     print_usage ();
+  elseif (! isscalar (n))
+    error ("winter: N must be a scalar");
   endif
+  n = double (n);
 
   if (n == 1)
     map = [0, 0, 1];
--- a/scripts/io/beep.m
+++ b/scripts/io/beep.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 John W. Eaton
+## Copyright (C) 2003-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/io/csvread.m
+++ b/scripts/io/csvread.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
 endfunction
 
 
-%% Tests for csvread() are in csvwrite()
-%% Mark file as being tested
+## Tests for csvread() are in csvwrite()
+## Mark file as being tested
 %!assert (1)
 
--- a/scripts/io/csvwrite.m
+++ b/scripts/io/csvwrite.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -37,7 +37,7 @@
 
 
 %!shared fname
-%! fname = tmpnam ();
+%! fname = tempname ();
 
 %!test
 %! csvwrite (fname, magic (3));
--- a/scripts/io/dlmwrite.m
+++ b/scripts/io/dlmwrite.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2002-2013 Paul Kienzle
+## Copyright (C) 2002-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -50,9 +50,11 @@
 ##
 ## @item @qcode{"newline"}
 ## The character(s) to use to separate each row.  Three special cases
-## exist for this option.  @qcode{"unix"} is changed into @qcode{"\n"},
-## @qcode{"pc"} is changed into @qcode{"\r\n"}, and @qcode{"mac"} is changed
-## into @qcode{"\r"}.  Other values for this option are kept as is.
+## exist for this option.  @qcode{"unix"} is changed into
+## @qcode{"@xbackslashchar{}n"}, @qcode{"pc"} is changed into
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}, and @qcode{"mac"} is changed
+## into @qcode{"@xbackslashchar{}r"}.  Any other value is used directly as the
+## newline separator.
 ##
 ## @item @qcode{"roffset"}
 ## See @var{r} above.
@@ -70,7 +72,7 @@
 ## @end example
 ##
 ## @example
-## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\\n")
+## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\n")
 ## @end example
 ##
 ## @seealso{dlmread, csvread, csvwrite}
@@ -201,7 +203,7 @@
 
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! dlmwrite (f,[1,2;3,4],"precision","%5.2f","newline","unix","roffset",1,"coffset",1);
 %! fid = fopen (f,"rt");
 %! f1 = char (fread (fid,Inf,"char")');
--- a/scripts/io/fileread.m
+++ b/scripts/io/fileread.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 VZLU Prague
+## Copyright (C) 2010-2015 VZLU Prague
 ##
 ## This file is part of Octave.
 ##
@@ -48,7 +48,7 @@
 
 %!test
 %! cstr = {"Hello World", "The answer is 42", "Goodbye World"};
-%! fname = tmpnam ();
+%! fname = tempname ();
 %! fid = fopen (fname, "w");
 %! fprintf (fid, "%s\n", cstr{:});
 %! fclose (fid);
@@ -56,7 +56,7 @@
 %! unlink (fname);
 %! assert (str, [cstr{1} "\n" cstr{2} "\n" cstr{3} "\n"]);
 
-%% Test input validation
+## Test input validation
 %!error fileread ()
 %!error fileread (1, 2)
 %!error <FILENAME argument must be a string> fileread (1)
--- a/scripts/io/importdata.m
+++ b/scripts/io/importdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Erik Kjellson
+## Copyright (C) 2012-2015 Erik Kjellson
 ##
 ## This file is part of Octave.
 ##
@@ -129,8 +129,8 @@
       [output.data, output.fs] = wavread (fname);
     otherwise
       ## Assume the file is in ASCII format.
-      [output, delimiter, header_rows]  = ...
-          importdata_ascii (fname, delimiter, header_rows);
+      [output, delimiter, header_rows] = ...
+        importdata_ascii (fname, delimiter, header_rows);
   endswitch
 
   ## If there are any empty fields in the output structure, then remove them
@@ -146,8 +146,7 @@
     ## i.e., output = output.onlyFieldLeft
 
     ## Update the list of fields
-    fields = fieldnames (output);
-    if (numel (fields) == 1)
+    if (numfields (output) == 1)
       output = output.(fields{1});
     endif
   endif
@@ -210,11 +209,33 @@
 
   endwhile
 
-  fclose (fid);
+  if (row == -1)
+    ## No numeric data found => return file as cellstr array
+    ## 1. Read as char string
+    fseek (fid, 0, "bof");
+    output = fread (fid, Inf, "*char")';
+    fclose (fid);
+    ## 2. Find EOL type
+    idx = find (output(1:min (4096, length (output))) == "\n", 1) - 1;
+    if (isindex (idx) && output(idx) == "\r")
+      dlm = "\r\n";
+    else
+      dlm = "\n";
+    endif
+    ## 3. Split each line into a cell (column vector)
+    output = strsplit (output, dlm)';
+    ## 4. Remove last cell (for files with -proper- EOL before EOF)
+    if (isempty (output{end}))
+      output(end) = [];
+    endif
+    ## 5. Return after setting some output data
+    delimiter = "";
+    header_rows = numel (output);
+    return;
+  else
+    fclose (fid);
+  endif
 
-  if (row == -1)
-    error ("importdata: Unable to determine delimiter");
-  endif
   if (num_header_rows >= 0)
     header_rows = num_header_rows;
   endif
@@ -271,7 +292,7 @@
 %!test
 %! ## Comma separated values
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1,-7.2,0\n0.012,6.5,128");
 %! fclose (fid);
@@ -288,7 +309,7 @@
 %!test
 %! ## Tab separated values
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\t-7.2\t0\n0.012\t6.5\t128");
 %! fclose (fid);
@@ -305,7 +326,7 @@
 %!test
 %! ## Space separated values, using multiple spaces to align in columns.
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%10.3f %10.3f %10.3f\n", A');
 %! fclose (fid);
@@ -322,7 +343,7 @@
 %!test
 %! ## No separator, 1 column of data only
 %! A = [3.1;-7.2;0;0.012;6.5;128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%f\n", A);
 %! fclose (fid);
@@ -342,7 +363,7 @@
 %! A.textdata = {"This is a header row."; ...
 %!               "this row does not contain any data, but the next one does."};
 %! A.colheaders = A.textdata (2);
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%s\n", A.textdata{:});
 %! fputs (fid, "3.1\t-7.2\t0\n0.012\t6.5\t128");
@@ -359,7 +380,7 @@
 %! A.textdata = {"Label1\tLabel2\tLabel3";
 %!               "col 1\tcol 2\tcol 3"};
 %! A.colheaders = {"col 1", "col 2", "col 3"};
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%s\n", A.textdata{:});
 %! fputs (fid, "3.1\t-7.2\t0\n0.012\t6.5\t128");
@@ -375,7 +396,7 @@
 %! A.data = [3.1 -7.2 0; 0.012 6.5 128];
 %! A.textdata = {"row1"; "row2"};
 %! A.rowheaders = A.textdata;
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "row1\t3.1\t-7.2\t0\nrow2\t0.012\t6.5\t128");
 %! fclose (fid);
@@ -392,7 +413,7 @@
 %!               "      col1 col2 col3"
 %!               "row1"
 %!               "row2"};
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%s\n", A.textdata{1:2});
 %! fputs (fid, "row1\t3.1\t-7.2\t0\nrow2\t0.012\t6.5\t128");
@@ -406,7 +427,7 @@
 %!test
 %! ## Ignore empty rows containing only spaces
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fprintf (fid, "%10.3f %10.3f %10.3f\n", A(1,:));
 %! fputs (fid, "      ");
@@ -421,7 +442,7 @@
 %!test
 %! ## Exponentials
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "+3.1e0\t-72E-1\t0\n12e-3\t6.5\t128");
 %! fclose (fid);
@@ -434,7 +455,7 @@
 %!test
 %! ## Complex numbers
 %! A = [3.1 -7.2 0-3.4i; 0.012 -6.5+7.2i 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\t-7.2\t0-3.4i\n0.012\t-6.5+7.2i\t128");
 %! fclose (fid);
@@ -447,7 +468,7 @@
 %!test
 %! ## Exceptional values (Inf, NaN, NA)
 %! A = [3.1 Inf NA; -Inf NaN 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\tInf\tNA\n-Inf\tNaN\t128");
 %! fclose (fid);
@@ -462,7 +483,7 @@
 %! A.data = [3.1 NA 0; 0.012 NA 128];
 %! A.textdata = {char(zeros(1,0))
 %!               "NO DATA"};
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\t\t0\n0.012\tNO DATA\t128");
 %! fclose (fid);
@@ -475,7 +496,7 @@
 %!#test
 %! ## CRLF for line breaks
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\t-7.2\t0\r\n0.012\t6.5\t128");
 %! fclose (fid);
@@ -488,7 +509,7 @@
 %!#test
 %! ## CR for line breaks
 %! A = [3.1 -7.2 0; 0.012 6.5 128];
-%! fn  = tmpnam ();
+%! fn  = tempname ();
 %! fid = fopen (fn, "w");
 %! fputs (fid, "3.1\t-7.2\t0\r0.012\t6.5\t128");
 %! fclose (fid);
@@ -510,6 +531,30 @@
 %! assert (d, " ");
 %! assert (h, 0);
 
+%!test
+%! ## Only text / no numeric data; \n as EOL
+%! fn  = tempname ();
+%! fid = fopen (fn, "w");
+%! fputs (fid, "aaaa 11\nbbbbb 22\nccccc 3\n");
+%! fclose (fid);
+%! [a, d, h] = importdata (fn);
+%! unlink (fn);
+%! assert (a, {"aaaa 11"; "bbbbb 22"; "ccccc 3"});
+%! assert (d, "");
+%! assert (h, 3);
+
+%!test
+%! ## Only text / no numeric data; \r\n as EOL; missing last EOL before EOF
+%! fn  = tempname ();
+%! fid = fopen (fn, "w");
+%! fputs (fid, "aaaa 11\r\nbbbbb 22\r\nccccc 3");
+%! fclose (fid);
+%! [a, d, h] = importdata (fn);
+%! unlink (fn);
+%! assert (a, {"aaaa 11"; "bbbbb 22"; "ccccc 3"});
+%! assert (d, "");
+%! assert (h, 3);
+
 %!error importdata ()
 %!error importdata (1,2,3,4)
 %!error <FNAME must be a string> importdata (1)
--- a/scripts/io/is_valid_file_id.m
+++ b/scripts/io/is_valid_file_id.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 John W. Eaton
+## Copyright (C) 2010-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,7 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} is_valid_file_id (@var{fid})
 ## Return true if @var{fid} refers to an open file.
-## @seealso{fopen}
+## @seealso{freport, fopen}
 ## @end deftypefn
 
 function retval = is_valid_file_id (fid)
--- a/scripts/io/strread.m
+++ b/scripts/io/strread.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Eric Chassande-Mottin, CNRS (France)
+## Copyright (C) 2009-2015 Eric Chassande-Mottin, CNRS (France)
 ## Parts Copyright (C) 2012 Philip Nienhuis
 ##
 ## This file is part of Octave.
@@ -147,8 +147,10 @@
 ## @item @qcode{"whitespace"}
 ## Any character in @var{value} will be interpreted as whitespace and
 ## trimmed; the string defining whitespace must be enclosed in double
-## quotes for proper processing of special characters like \t.
-## The default value for whitespace = @qcode{" \b\r\n\t"} (note the space).
+## quotes for proper processing of special characters like
+## @qcode{"@xbackslashchar{}t"}.  The default value for whitespace is
+## @qcode{" @xbackslashchar{}b@xbackslashchar{}r@xbackslashchar{}n@xbackslashchar{}t"}
+## (note the space).
 ## Unless whitespace is set to '' (empty) AND at least one @qcode{"%s"} format
 ## conversion specifier is supplied, a space is always part of whitespace.
 ##
@@ -159,11 +161,11 @@
 ## depends on the last character of @var{str}:
 ##
 ## @table @asis
-## @item last character = @qcode{"\n"}
+## @item last character = @qcode{"@xbackslashchar{}n"}
 ## Data columns are padded with empty fields or Nan so that all columns
 ## have equal length
 ##
-## @item last character is not @qcode{"\n"}
+## @item last character is not @qcode{"@xbackslashchar{}n"}
 ## Data columns are not padded; strread returns columns of unequal length
 ##
 ## @end table
@@ -197,10 +199,12 @@
   endif
 
   ## Parse format string to compare number of conversion fields and nargout
-  nfields = length (strfind (format, "%")) - length (strfind (format, "%*"));
+  nfields = numel (regexp (format, '(%(\d*|\d*\.\d*)?[nfduscq]|%\[)', "match"));
   ## If str only has numeric fields, a (default) format ("%f") will do.
   ## Otherwise:
-  if ((max (nargout, 1) != nfields) && ! strcmp (format, "%f"))
+  if (! nfields)
+    error ("strread.m: no valid format conversion specifiers found\n");
+  elseif ((max (nargout, 1) != nfields) && ! strcmp (format, "%f"))
     error ("strread: the number of output variables must match that specified by FORMAT");
   endif
 
@@ -243,14 +247,14 @@
           case "matlab"
             [comment_start, comment_end] = deal ("%" , "eol_char");
           otherwise
-            if (ischar (varargin{n+1}) ||
-               (numel (varargin{n+1}) == 1 && iscellstr (varargin{n+1})))
+            if (ischar (varargin{n+1})
+                || (numel (varargin{n+1}) == 1 && iscellstr (varargin{n+1})))
               [comment_start, comment_end] = deal (char (varargin{n+1}), "eol_char");
             elseif (iscellstr (varargin{n+1}) && numel (varargin{n+1}) == 2)
               [comment_start, comment_end] = deal (varargin{n+1}{:});
             else
-              ## FIXME - a user may have numeric values specified: {'//', 7}
-              ##         this will lead to an error in the warning message
+              ## FIXME: A user may have numeric values specified: {'//', 7}
+              ##        this will lead to an error in the warning message
               error ("strread: unknown or unrecognized comment style '%s'",
                       varargin{n+1});
             endif
@@ -304,7 +308,8 @@
     fmt_words = regexp (format, '[^ ]+', "match");
 
     ## Find position of conversion specifiers (they start with %)
-    idy2 = find (! cellfun ("isempty", regexp (fmt_words, '^%')));
+    fcs_ptrn = '(%\*?(\d*|\d*\.\d*)?[nfduscq]|%\*?\[)';
+    idy2 = find (! cellfun ("isempty", regexp (fmt_words, fcs_ptrn)));
 
     ## Check for unsupported format specifiers
     errpat = '(\[.*\]|[cq]|[nfdu]8|[nfdu]16|[nfdu]32|[nfdu]64)';
@@ -370,6 +375,10 @@
     endif
     len = length (str);
     c2len = length (comment_end);
+    if (cstop + c2len == len)
+      ## Ignore last char of to-the-end-of-line comments
+      c2len++;
+    end
     str = cellslices (str, [1, cstop + c2len], [cstart - 1, len]);
     str = [str{:}];
   endif
@@ -409,7 +418,7 @@
   if (! isempty (white_spaces))
     ## Check if trailing "\n" might signal padding output arrays to equal size
     ## before it is trimmed away below
-    if ((str(end) == 10) && (nargout > 1))
+    if (str(end) == "\n" && nargout > 1)
       pad_out = 1;
     endif
     ## Condense all repeated whitespace into one single space
@@ -417,7 +426,7 @@
     rxp_wsp = sprintf ("[%s]+", white_spaces);
     str = regexprep (str, rxp_wsp, ' ');
     ## Remove possible leading space at string
-    if (str(1) == 32)
+    if (str(1) == " ")
        str = str(2:end);
     endif
     ## Check for single delimiter followed/preceded by whitespace
@@ -486,9 +495,10 @@
 
       ## 1. Assess "period" in the split-up words array ( < num_words_per_line).
       ## Could be done using EndOfLine but that prohibits EndOfLine = "" option.
-      ## Alternative below goes by simply parsing a first grab of words
-      ## and matching fmt_words to words until the fmt_words array is exhausted.
-      ## iwrd: ptr to current analyzed word; iwrdp: ptr to pos before analyzed char
+      ## Alternative below goes by simply parsing a first grab of words and
+      ## matching fmt_words to words until the fmt_words array is exhausted.
+      ## iwrd: ptr to current analyzed word.
+      ## iwrdp: ptr to pos before analyzed char.
       iwrd = 1; iwrdp = 0; iwrdl = length (words{1});
       fwptr = zeros (1, numel (fmt_words));
       ii = 1;
@@ -594,29 +604,31 @@
             e = s(1) + length (fmt_words{ii}) - 1;
           endif
           if (! strcmp (fmt_words{ii}, words{icol, 1}))
-            ## Column doesn't exactly match literal => split needed.  Insert a column
+            ## Column doesn't exactly match literal => split needed.
+            ## Insert a column
             words(icol+1:end+1, :) = words(icol:end, :);
             ## Watch out for empty cells
             jptr = find (! cellfun ("isempty", words(icol, :)));
 
             ## Distinguish leading or trailing literals
             if (! idg(ii) && ! isempty (s) && s(1) == 1)
-              ## Leading literal.  Assign literal to icol, paste rest in icol + 1
+              ## Leading literal.
+              ## Assign literal to icol, paste rest in icol + 1
               ## Apply only to those cells that do have something beyond literal
               jptr = find (cellfun ("length", words(icol+1, jptr), ...
                                     "UniformOutput", false) > e(1));
               words(icol+1, :) = {""};
-              words(icol+1, jptr) = cellfun ...
-                (@(x) substr (x, e(1)+1, length (x) - e(1)), words(icol, jptr), ...
+              words(icol+1, jptr) = cellfun (
+                @(x) substr (x, e(1)+1, length (x) - e(1)), words(icol, jptr),
                 "UniformOutput", false);
               words(icol, jptr) = fmt_words{ii};
               fwptr = [fwptr(1:ii) (++fwptr(ii+1:end))];
 
             else
               if (! idg(ii) && ! isempty (strfind (fmt_words{ii-1}, "%s")))
-                ## Trailing literal.  If preceding format == '%s' this is an error
-                warning ...
-                 ("strread: ambiguous '%s' specifier next to literal in column %d", icol);
+                ## Trailing literal.
+                ## If preceding format == '%s' this is an error.
+                warning ("strread: ambiguous '%s' specifier next to literal in column %d", icol);
               elseif (idg(ii))
                 ## Current field = fixed width. Strip into icol, rest in icol+1
                 sw = regexp (fmt_words{ii}, '\d', "once");
@@ -654,7 +666,8 @@
           endif
 
         else
-          ## Conv. specifier.  Peek if next fmt_word needs split from current column
+          ## Conversion specifier.
+          ## Peek if next fmt_word needs split from current column.
           if (ii < num_words_per_line)
             if (fwptr(ii) == fwptr(ii+1))
               --icol;
@@ -665,7 +678,8 @@
         ++ii; ++icol;
       endwhile
 
-      ## Done.  Reshape words back into 1 long vector and strip padded empty words
+      ## Done.
+      ## Reshape words back into one long vector and strip padded empty words
       words = reshape (words, 1, numel (words))(1 : end-num_words_padded);
 
     catch
@@ -690,8 +704,8 @@
       endif
 
       ## Map to format
-      ## FIXME - add support for formats like "<%s>", "%[a-zA-Z]"
-      ##         Someone with regexp experience is needed.
+      ## FIXME: Add support for formats like "<%s>", "%[a-zA-Z]"
+      ##        Someone with regexp experience is needed.
       switch (fmt_words{m}(1:min (2, length (fmt_words{m}))))
         case "%s"
           if (pad_out)
@@ -701,7 +715,7 @@
           k++;
         case {"%d", "%u", "%f", "%n"}
           n = cellfun ("isempty", data);
-          ### FIXME - erroneously formatted data lead to NaN, not an error
+          ### FIXME: Erroneously formatted data lead to NaN, not an error
           data = str2double (data);
           if (! isempty (regexp (fmt_words{m}, "%[du]")))
             ## Cast to integer
@@ -722,8 +736,8 @@
           switch (fmt_words{m}(ew+1))
             case {"d", "u", "f", "n"}
               n = cellfun ("isempty", data);
-              ### FIXME - erroneously formatted data lead to NaN, not an error
-              ###         => ReturnOnError can't be implemented for numeric data
+              ### FIXME: Erroneously formatted data lead to NaN, not an error
+              ###        => ReturnOnError can't be implemented for numeric data
               data = str2double (strtrunc (data, swidth));
               data(n) = numeric_fill_value;
               if (pad_out)
@@ -793,7 +807,7 @@
   out = ostrsplit (text, sep, mult_dlms_s1);
   if (index (sep, eol_char)); out = strrep (out, char (255), ''); endif
   ## In case of trailing delimiter, strip stray last empty word
-  if (!isempty (out) && any (sep == text(end)))
+  if (! isempty (out) && any (sep == text(end)) && ! mult_dlms_s1)
     out(end) = [];
   endif
 
@@ -841,6 +855,17 @@
 %! assert (b, {"2"});
 
 %!test
+%! assert (strread ("Hello World! // this is comment", "%s",...
+%! "commentstyle", "c++"), ...
+%! {"Hello"; "World!"});
+%! assert (strread ("Hello World! % this is comment", "%s",...
+%! "commentstyle", "matlab"), ...
+%! {"Hello"; "World!"});
+%! assert (strread ("Hello World! # this is comment", "%s",...
+%! "commentstyle", "shell"), ...
+%! {"Hello"; "World!"});
+
+%!test
 %! str = sprintf ("Tom 100 miles/hr\nDick 90 miles/hr\nHarry 80 miles/hr");
 %! fmt = "%s %f miles/hr";
 %! c = cell (1, 2);
@@ -905,7 +930,7 @@
 %! assert (b(1:2), {"2"; "4"});
 %! assert (isempty (b{3}), true);
 
-%% MultipleDelimsAsOne
+## MultipleDelimsAsOne
 %!test
 %! str = "11, 12, 13,, 15\n21,, 23, 24, 25\n,, 33, 34, 35";
 %! [a b c d] = strread (str, "%f %f %f %f", "delimiter", ",", "multipledelimsasone", 1, "endofline", "\n");
@@ -914,12 +939,17 @@
 %! assert (c', [13, 24, 34]);
 %! assert (d', [15, 25, 35]);
 
-%% delimiter as sq_string and dq_string
+## Bug #44750
+%!test
+%! assert (strread ('/home/foo/','%s','delimiter','/','MultipleDelimsAsOne',1), ...
+%!         {"home"; "foo"});
+
+## delimiter as sq_string and dq_string
 %!test
 %! assert (strread ("1\n2\n3", "%d", "delimiter", "\n"),
 %!         strread ("1\n2\n3", "%d", "delimiter", '\n'))
 
-%% whitespace as sq_string and dq_string
+## whitespace as sq_string and dq_string
 %!test
 %! assert (strread ("1\b2\r3\b4\t5", "%d", "whitespace", "\b\r\n\t"),
 %!         strread ("1\b2\r3\b4\t5", "%d", "whitespace", '\b\r\n\t'))
@@ -928,7 +958,7 @@
 %! str =  "0.31 0.86 0.94\n 0.60 0.72 0.87";
 %! fmt = "%f %f %f";
 %! args = {"delimiter", " ", "endofline", "\n", "whitespace", " "};
-%! [a, b, c] = strread (str, fmt, args {:});
+%! [a, b, c] = strread (str, fmt, args{:});
 %! assert (a, [0.31; 0.60], 0.01)
 %! assert (b, [0.86; 0.72], 0.01)
 %! assert (c, [0.94; 0.87], 0.01)
@@ -937,7 +967,7 @@
 %! str =  "0.31,0.86,0.94\n0.60,0.72,0.87";
 %! fmt = "%f %f %f";
 %! args = {"delimiter", ",", "endofline", "\n", "whitespace", " "};
-%! [a, b, c] = strread (str, fmt, args {:});
+%! [a, b, c] = strread (str, fmt, args{:});
 %! assert (a, [0.31; 0.60], 0.01)
 %! assert (b, [0.86; 0.72], 0.01)
 %! assert (c, [0.94; 0.87], 0.01)
@@ -946,7 +976,7 @@
 %! str =  "0.31 0.86 0.94\n 0.60 0.72 0.87";
 %! fmt = "%f %f %f";
 %! args = {"delimiter", ",", "endofline", "\n", "whitespace", " "};
-%! [a, b, c] = strread (str, fmt, args {:});
+%! [a, b, c] = strread (str, fmt, args{:});
 %! assert (a, [0.31; 0.60], 0.01)
 %! assert (b, [0.86; 0.72], 0.01)
 %! assert (c, [0.94; 0.87], 0.01)
@@ -955,7 +985,7 @@
 %! str =  "0.31, 0.86, 0.94\n 0.60, 0.72, 0.87";
 %! fmt = "%f %f %f";
 %! args = {"delimiter", ",", "endofline", "\n", "whitespace", " "};
-%! [a, b, c] = strread (str, fmt, args {:});
+%! [a, b, c] = strread (str, fmt, args{:});
 %! assert (a, [0.31; 0.60], 0.01)
 %! assert (b, [0.86; 0.72], 0.01)
 %! assert (c, [0.94; 0.87], 0.01)
@@ -983,39 +1013,39 @@
 %! assert (a, [1; 2], 1e-15);
 %! assert (b, [1; 3], 1e-15);
 
-%% Test for no output arg (interactive use)
+## Test for no output arg (interactive use)
 %!test
 %! assert (strread (",2,,4\n5,,7,", "", "delimiter", ","), [NaN; 2; NaN; 4; 5; NaN; 7]);
 
-%% Test #1 bug #42609
+## Test #1 bug #42609
 %!test
 %! [a, b, c] = strread ("1 2 3\n4 5 6\n7 8 9\n", "%f %f %f\n");
 %! assert (a, [1; 4; 7]);
 %! assert (b, [2; 5; 8]);
 %! assert (c, [3; 6; 9]);
 
-%% Test #2 bug #42609
+## Test #2 bug #42609
 %!test
 %! [a, b, c] = strread ("1 2\n3\n4 5\n6\n7 8\n9\n", "%f %f\n%f");
 %! assert (a, [1;4;7]);
 %! assert (b, [2; 5; 8]);
 %! assert (c, [3; 6; 9]);
 
-%% Test #3 bug #42609
+## Test #3 bug #42609
 %!test
 %! [a, b, c] = strread ("1 2 3\n4 5 6\n7 8 9\n", '%f %f %f\n');
 %! assert (a, [1; 4; 7]);
 %! assert (b, [2; 5; 8]);
 %! assert (c, [3; 6; 9]);
 
-%% Test #3 bug #42609
+## Test #3 bug #42609
 %!test
 %! [a, b, c] = strread ("1 2\n3\n4 5\n6\n7 8\n9\n", '%f %f\n%f');
 %! assert (a, [1;4;7]);
 %! assert (b, [2; 5; 8]);
 %! assert (c, [3; 6; 9]);
 
-%% Unsupported format specifiers
+## Unsupported format specifiers
 %!test
 %!error <format specifiers are not supported> strread ("a", "%c")
 %!error <format specifiers are not supported> strread ("a", "%*c %d")
@@ -1032,7 +1062,10 @@
 %!error <format specifiers are not supported> strread ("a", "%u32")
 %!error <format specifiers are not supported> strread ("a", "%*u32 %d")
 
-%% Illegal format specifiers
+## Illegal format specifiers
 %!test
-%!error <unknown format specifier> strread ("1.0", "%z")
+%!error <no valid format conversion specifiers> strread ("1.0", "%z");
 
+## Test for false positives in check for non-supported format specifiers
+%!test
+%! assert (strread ("Total: 32.5 % (of cm values)","Total: %f % (of cm values)"), 32.5, 1e-5);
--- a/scripts/io/textread.m
+++ b/scripts/io/textread.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Eric Chassande-Mottin, CNRS (France)
+## Copyright (C) 2009-2015 Eric Chassande-Mottin, CNRS (France)
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,8 @@
 ## The first @var{value} number of lines of @var{filename} are skipped.
 ##
 ## @item @qcode{"endofline"}:
-## Specify a single character or @qcode{"\r\n"}.  If no value is given, it
+## Specify a single character or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}.  If no value is given, it
 ## will be inferred from the file.  If set to "" (empty string) EOLs are
 ## ignored as delimiters.
 ## @end itemize
@@ -118,7 +119,8 @@
       error ("character value required for EndOfLine");
     endif
   else
-    ## Determine EOL from file.  Search for EOL candidates in first BUFLENGTH chars
+    ## Determine EOL from file.
+    ## Search for EOL candidates in the first BUFLENGTH chars
     eol_srch_len = min (length (str), BUFLENGTH);
     ## First try DOS (CRLF)
     if (! isempty (strfind (str(1 : eol_srch_len), "\r\n")))
@@ -135,7 +137,7 @@
   endif
 
   ## Now that we know what EOL looks like, we can process format_repeat_count.
-  ## FIXME The below isn't ML-compatible: counts lines, not format string uses
+  ## FIXME: The below isn't ML-compatible: counts lines, not format string uses
   if (isfinite (nlines) && (nlines > 0))
     l_eol_char = length (eol_char);
     eoi = findstr (str, eol_char);
@@ -158,7 +160,7 @@
     endwhile
     ## Found EOL delimiting last requested line. Compute ptr (incl. EOL)
     if (isempty (eoi))
-      printf ("textread: format repeat count specified but no endofline found\n");
+      disp ("textread: format repeat count specified but no endofline found");
       eoi_pos = nblks * BUFLENGTH + count;
     else
       eoi_pos = (nblks * BUFLENGTH) + eoi(end + min (nlines, n_eoi) - n_eoi);
@@ -177,7 +179,7 @@
   endif
 
   ## Call strread to make it do the real work
-  [varargout{1:max (nargout, 1)}] = strread (str, format, varargin {:});
+  [varargout{1:max (nargout, 1)}] = strread (str, format, varargin{:});
 
   ## Hack to concatenate/reshape numeric output into 2D array (undocumented ML)
   ## In ML this only works in case of an empty format string
@@ -202,7 +204,7 @@
       ncols = numel (strfind (str, " ")) + 1;
     else
       ## 3B. Just count delimiters. FIXME: delimiters could occur in literals
-      delimiter = varargin {idelimiter+1};
+      delimiter = varargin{idelimiter+1};
       ncols = numel (regexp (str, sprintf ("[%s]", delimiter))) + 1;
     endif
     ## 6. Reshape; watch out, we need a transpose
@@ -221,7 +223,7 @@
 
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! d = rand (5, 3);
 %! dlmwrite (f, d, "precision", "%5.2f");
 %! [a, b, c] = textread (f, "%f %f %f", "delimiter", ",", "headerlines", 3);
@@ -231,25 +233,25 @@
 %! assert (c, d(4:5, 3), 1e-2);
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! d = rand (7, 2);
 %! dlmwrite (f, d, "precision", "%5.2f");
 %! [a, b] = textread (f, "%f, %f", "headerlines", 1);
 %! unlink (f);
 %! assert (a, d(2:7, 1), 1e-2);
 
-%% Test reading 2D matrix with empty format
+## Test reading 2D matrix with empty format
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! d = rand (5, 2);
 %! dlmwrite (f, d, "precision", "%5.2f");
 %! A = textread (f, "", "headerlines", 3);
 %! unlink (f);
 %! assert (A, d(4:5, :), 1e-2);
 
-%% Read multiple lines using empty format string
+## Read multiple lines using empty format string
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! unlink (f);
 %! fid = fopen (f, "w");
 %! d = rand (1, 4);
@@ -259,9 +261,9 @@
 %! unlink (f);
 %! assert (A, d, 1e-6);
 
-%% Empty format, corner case = one line w/o EOL
+## Empty format, corner case = one line w/o EOL
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! unlink (f);
 %! fid = fopen (f, "w");
 %! d = rand (1, 4);
@@ -271,9 +273,9 @@
 %! unlink (f);
 %! assert (A, d, 1e-6);
 
-%% Read multiple lines using empty format string, missing data (should be 0)
+## Read multiple lines using empty format string, missing data (should be 0)
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! unlink (f);
 %! fid = fopen (f, "w");
 %! d = rand (1, 4);
@@ -283,9 +285,9 @@
 %! unlink (f);
 %! assert (A, [ d(1:2) 0 d(3:4)], 1e-6);
 
-%% Test with empty positions - ML returns 0 for empty fields
+## Test with empty positions - ML returns 0 for empty fields
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! unlink (f);
 %! fid = fopen (f, "w");
 %! d = rand (1, 4);
@@ -295,10 +297,10 @@
 %! unlink (f);
 %! assert (A, [0 2 0 4; 5 0 7 0], 1e-6);
 
-%% Another test with empty format + positions, now with more incomplete lower
-%% row (must be appended with zeros to get rectangular matrix)
+## Another test with empty format + positions, now with more incomplete lower
+## row (must be appended with zeros to get rectangular matrix)
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! unlink (f);
 %! fid = fopen (f, "w");
 %! d = rand (1, 4);
@@ -308,7 +310,7 @@
 %! unlink (f);
 %! assert (A, [0 2 0 4; 5 0 0 0], 1e-6);
 
-%% Test input validation
+## Test input validation
 %!error textread ()
 %!error textread (1)
 %!error <arguments must be strings> textread (1, "%f")
--- a/scripts/io/textscan.m
+++ b/scripts/io/textscan.m
@@ -40,10 +40,10 @@
 ## leaves output in distinct columns.
 ##
 ## @item @qcode{"endofline"}:
-## Specify @qcode{"\r"}, @qcode{"\n"} or @qcode{"\r\n"} (for CR, LF, or
-## CRLF).  If no value is given, it will be inferred from the file.  If set
-## to "" (empty string) EOLs are ignored as delimiters and added to
-## whitespace.
+## Specify @qcode{"@xbackslashchar{}r"}, @qcode{"@xbackslashchar{}n"} or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"} (for CR, LF, or CRLF).  If no
+## value is given, it will be inferred from the file.  If set to "" (empty
+## string) EOLs are ignored as delimiters and added to whitespace.
 ##
 ## @item @qcode{"headerlines"}:
 ## The first @var{value} number of lines of @var{fid} are skipped.
@@ -98,7 +98,10 @@
   endif
 
   ## Determine the number of data fields & initialize output array
-  num_fields = numel (strfind (format, "%")) - numel (strfind (format, "%*"));
+  num_fields = numel (regexp (format, '(%(\d*|\d*\.\d*)?[nfduscq]|%\[)', "match"));
+  if (! num_fields)
+    error ("textscan.m: no valid format conversion specifiers found\n");
+  endif
   C = cell (1, num_fields);
 
   if (! (isa (fid, "double") && fid > 0) && ! ischar (fid))
@@ -229,7 +232,8 @@
     endif
   else
     if (! ischar (fid))
-    ## Determine EOL from file.  Search for EOL candidates in first BUFLENGTH chars
+    ## Determine EOL from file.
+    ## Search for EOL candidates in the first BUFLENGTH chars
     eol_srch_len = min (length (str), BUFLENGTH);
     ## First try DOS (CRLF)
     if (! isempty (strfind (str(1 : eol_srch_len), "\r\n")))
@@ -248,7 +252,7 @@
     args(end+1:end+2) = {"endofline", eol_char};
   endif
 
-  if (!ischar (fid))
+  if (! ischar (fid))
     ## Now that we know what EOL looks like, we can process format_repeat_count.
     ## FIXME The below isn't ML-compatible: counts lines, not format string uses
     if (isfinite (nlines) && (nlines >= 0))
@@ -273,11 +277,12 @@
       endwhile
       ## OK, found EOL delimiting last requested line. Compute ptr (incl. EOL)
       if (isempty (eoi))
-        printf ("textscan: format repeat count specified but no endofline found\n");
+        disp ("textscan: format repeat count specified but no endofline found");
         data_size = nblks * BUFLENGTH + count;
       else
         ## Compute data size to read incl complete EOL
-        data_size = (nblks * BUFLENGTH) + eoi(end + min (nlines, n_eoi) - n_eoi) ...
+        data_size = (nblks * BUFLENGTH) ...
+                    + eoi(end + min (nlines, n_eoi) - n_eoi) ...
                     + l_eol_char - 1;
       endif
       fseek (fid, st_pos, "bof");
@@ -316,18 +321,20 @@
       ## See if lowermost data row must be completed
       pad = mod (numel (C{1}), ncols);
       if (pad)
-        ## Textscan returns NaNs for empty fields
-        C(1) = [C{1}; NaN(ncols - pad, 1)];
-      endif
-      ## Replace NaNs with EmptyValue, if any
-      ipos = find (strcmpi (args, "emptyvalue"));
-      if (ipos)
-        C{1}(find (isnan (C{1}))) = args{ipos+1};
+        ## Pad output with emptyvalues (rest has been done by stread.m)
+        emptv = find (strcmpi (args, "emptyvalue"));
+        if (isempty (emptv))
+          ## By default textscan returns NaNs for empty fields
+          C(1) = [C{1}; NaN(ncols - pad, 1)];
+        else
+          ## Otherwise return supplied emptyvalue. Pick last occurrence
+          C(1) = [C{1}; repmat(args{emptv(end)+1}, ncols - pad, 1)];
+        endif
       endif
       ## Compute nr. of rows
       nrows = floor (numel (C{1}) / ncols);
       ## Reshape C; watch out, transpose needed
-      C(1) = reshape (C{1}, ncols, numel (C{1}) / ncols)';
+      C(1) = reshape (C{1}, ncols, numel (C{1}) / ncols).';
       ## Distribute columns over C and wipe cols 2:end of C{1}
       for ii=2:ncols
         C(ii) = C{1}(:, ii);
@@ -429,12 +436,12 @@
 %! assert (a{2}', {'B' 'J' 'R' 'Z'});
 %! assert (a{3}', int32 ([16 241 3 0]));
 
-%% Test with default endofline parameter
+## Test with default endofline parameter
 %!test
 %! c = textscan ("L1\nL2", "%s");
 %! assert (c{:}, {"L1"; "L2"});
 
-%% Test with endofline parameter set to "" (empty) - newline should be in word
+## Test with endofline parameter set to "" (empty) - newline should be in word
 %!test
 %! c = textscan ("L1\nL2", "%s", "endofline", "");
 %! assert (int8 (c{:}{:}), int8 ([ 76,  49,  10,  76,  50 ]));
@@ -445,8 +452,8 @@
 %! c = textscan (str, "Text%*dText%dText");
 %! assert (c{1}, int32 ([2; 4; 0]));
 
+## CollectOutput test
 %!test
-%% CollectOutput test
 %! b = [10:10:100];
 %! b = [b; 8*b/5; 8*b*1000/5];
 %! str = sprintf ("%g miles/hr = %g (%g) kilometers (meters)/hr\n", b);
@@ -455,8 +462,8 @@
 %! assert (size (c{3}), [10, 2]);
 %! assert (size (c{2}), [10, 2]);
 
+## CollectOutput test with uneven column length files
 %!test
-%% CollectOutput test with uneven column length files
 %! b = [10:10:100];
 %! b = [b; 8*b/5; 8*b*1000/5];
 %! str = sprintf ("%g miles/hr = %g (%g) kilometers (meters)/hr\n", b);
@@ -470,7 +477,7 @@
 %! assert (c{2}{11, 1}, "/hr");
 %! assert (isempty (c{2}{11, 2}), true);
 
-%% Test input validation
+## Test input validation
 %!error textscan ()
 %!error textscan (single (4))
 %!error textscan ({4})
@@ -483,13 +490,13 @@
 %! assert (R{1}, int32 (1));
 %! assert (isempty (R{2}), true);
 
-%% bug #37023 (actually a strread test)
+## bug #37023 (actually a strread test)
 %!test
 %! data = textscan("   1. 1 \n 2 3\n", '%f %f');
 %! assert (data{1}, [1; 2], 1e-15);
 %! assert (data{2}, [1; 3], 1e-15);
 
-%%  Whitespace test (bug #37333) using delimiter ";"
+## Whitespace test (bug #37333) using delimiter ";"
 %!test
 %! tc = [];
 %! tc{1, 1} = "C:/code;";
@@ -506,7 +513,7 @@
 %!   assert (strcmp (lh, rh));
 %! end
 
-%%  Whitespace test (bug #37333), adding multipleDelimsAsOne true arg
+## Whitespace test (bug #37333), adding multipleDelimsAsOne true arg
 %!test
 %! tc = [];
 %! tc{1, 1} = "C:/code;";
@@ -523,7 +530,7 @@
 %!   assert (strcmp (lh, rh));
 %! end
 
-%%  Whitespace test (bug #37333), adding multipleDelimsAsOne false arg
+## Whitespace test (bug #37333), adding multipleDelimsAsOne false arg
 %!test
 %! tc = [];
 %! tc{1, 1} = "C:/code;";
@@ -541,7 +548,7 @@
 %!   assert (strcmp (lh, rh));
 %! end
 
-%%  Whitespace test (bug #37333) whitespace "" arg
+## Whitespace test (bug #37333) whitespace "" arg
 %!test
 %! tc = [];
 %! tc{1, 1} = "C:/code;";
@@ -557,7 +564,7 @@
 %!   assert (strcmp (lh, rh));
 %! end
 
-%%  Whitespace test (bug #37333), whitespace " " arg
+## Whitespace test (bug #37333), whitespace " " arg
 %!test
 %! tc = [];
 %! tc{1, 1} = "C:/code;";
@@ -574,9 +581,9 @@
 %!   assert (strcmp (lh, rh));
 %! end
 
-%% Test reading from a real file
+## Test reading from a real file
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! d = rand (1, 4);
 %! fprintf (fid, "  %f %f   %f  %f ", d);
@@ -587,9 +594,9 @@
 %! assert (A{1}, [d(1); d(3)], 1e-6);
 %! assert (A{2}, [d(2); d(4)], 1e-6);
 
-%% Tests reading with empty format, should return proper nr of columns
+## Tests reading with empty format, should return proper nr of columns
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! fprintf (fid, " 1 2 3 4\n5 6 7 8");
 %! fseek (fid, 0, "bof");
@@ -601,9 +608,9 @@
 %! assert (A{3}, [3 ; 7], 1e-6);
 %! assert (A{4}, [4 ; 8], 1e-6);
 
-%% Tests reading with empty format; empty fields & incomplete lower row
+## Tests reading with empty format; empty fields & incomplete lower row
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! fprintf (fid, " ,2,,4\n5,6");
 %! fseek (fid, 0, "bof");
@@ -612,10 +619,10 @@
 %! unlink (f);
 %! assert (A{1}, [999, 2, 999, 4; 5, 6, 999, 999], 1e-6);
 
-%% Error message tests
+## Error message tests
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! msg1 = "Missing or illegal value for 'headerlines'";
 %! try
@@ -626,7 +633,7 @@
 %! assert (msg1, lasterr);
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! msg1 = "Missing or illegal value for 'headerlines'";
 %! try
@@ -637,7 +644,7 @@
 %! assert (msg1, lasterr);
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! fprintf (fid,"some_string");
 %! fseek (fid, 0, "bof");
@@ -650,7 +657,7 @@
 %! assert (msg1, lasterr);
 
 %!test
-%! f = tmpnam ();
+%! f = tempname ();
 %! fid = fopen (f, "w+");
 %! fprintf (fid,"some_string");
 %! fseek (fid, 0, "bof");
@@ -662,7 +669,24 @@
 %! unlink (f);
 %! assert (msg1, lasterr);
 
-%% Bug #41824
+## Bug #41824
 %!test
 %! assert (textscan ("123", "", "whitespace", " "){:}, 123);
 
+## Bug #42343-1, just test supplied emptyvalue (actually done by strread.m)
+%!test
+%! assert (textscan (",NaN", "", "delimiter", "," ,"emptyValue" ,Inf), {Inf, NaN});
+
+## Bug #42343-2, test padding with supplied emptyvalue (done by textscan.m)
+%!test
+%! a = textscan (",1,,4\nInf,  ,NaN", "", "delimiter", ",", "emptyvalue", -10);
+%! assert (cell2mat (a), [-10, 1, -10, 4; Inf, -10, NaN, -10]);
+
+## Bug #42528
+%!test
+%! assert (textscan ("1i", ""){1},  0+1i);
+%! assert (cell2mat (textscan ("3, 2-4i, NaN\n -i, 1, 23.4+2.2i", "")), [3+0i, 2-4i, NaN+0i; 0-i,  1+0i, 23.4+2.2i]);
+
+## Illegal format specifiers
+%!test
+%!error <no valid format conversion specifiers> textscan ("1.0", "%z");
--- a/scripts/java/java_get.m
+++ b/scripts/java/java_get.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/java/java_set.m
+++ b/scripts/java/java_set.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Rik Wehbring
+## Copyright (C) 2012-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
new file mode 100644
--- /dev/null
+++ b/scripts/java/javachk.m
@@ -0,0 +1,151 @@
+## Copyright (C) 2014-2015 Philip Nienhuis
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} javachk (@var{feature})
+## @deftypefnx {Function File} {} javachk (@var{feature}, @var{component})
+## @deftypefnx {Function File} {@var{msg} =} javachk (@dots{})
+## Check for the presence of the Java @var{feature} in the current session
+## and print or return an error message if it is not.
+##
+## Possible features are:
+##
+## @table @asis
+## @item @qcode{"awt"}
+## Abstract Window Toolkit for GUIs.
+##
+## @item @qcode{"desktop"}
+## Interactive desktop is running.
+##
+## @item @qcode{"jvm"}
+## Java Virtual Machine.
+##
+## @item @qcode{"swing"}
+## Swing components for lightweight GUIs.
+## @end table
+##
+## If @var{feature} is supported and:
+##
+## @itemize @bullet
+## @item
+## No output argument is requested:
+##
+## Return an empty string
+##
+## @item
+## An output argument is requested:
+##
+## Return a struct with fields @qcode{"feature"} and @qcode{"identifier"}
+## both empty
+##
+## @end itemize
+##
+## If @var{feature} is not supported and:
+##
+## @itemize @bullet
+## @item
+## No output argument is requested:
+##
+## Emit an error message.
+##
+## @item
+## An output argument is requested:
+##
+## Return a struct with field @qcode{"feature"} set to @var{feature} and
+## field @qcode{"identifier"} set to @var{component}
+##
+## @end itemize
+##
+## The optional input @var{component} will be used in place of @var{feature}
+## in any error messages for greater specificity.
+##
+## @code{javachk} determines if specific Java features are available in an
+## Octave session.  This function is provided for scripts which may alter
+## their behavior based on the availability of Java.  The feature
+## @qcode{"desktop"} is never available as Octave has no Java-based desktop.
+## Other features may be available if Octave was compiled with the Java
+## Interface and Java is installed.
+##
+## @seealso{error, usejava}
+## @end deftypefn
+
+## Author: Philip Nienhuis <prnienhuis at users.sf.net>
+## Created: 2014-04-19
+
+function msg = javachk (feature, component="")
+
+  msg = "";
+  chk = false;
+  switch (feature)
+    ## For each feature, try methods() on a Java class of a feature
+    case "awt"
+      try
+        dum = methods ("java.awt.Frame");
+        chk = true;
+      end_try_catch
+    case "desktop"
+      ## Octave has no Java based GUI/desktop, leave chk = false
+    case "jvm"
+      try
+        dum = methods ("java.lang.Runtime");
+        chk = true;
+      end_try_catch
+    case "swing"
+      try
+        dum = methods ("javax.swing.Popup");
+        chk = true;
+      end_try_catch
+    otherwise
+      error ("javachk: unrecognized feature '%s', can be one of 'awt'|'desktop'|'jvm'|'swing'\n", feature);
+  endswitch
+
+  if (! chk)
+    ## Desired feature not present
+    if (nargout >= 1)
+      msg.message = sprintf ("javachk: %s is not supported", feature);
+      msg.identifier = component;
+    else
+      if (! isempty (component))
+        err = sprintf ("javachk: %s is not supported\n", component);
+      else
+        err = sprintf ("javachk: %s is not supported\n", feature);
+      endif
+      error (err);
+    endif
+  endif
+
+endfunction
+
+
+%!error <javachk: desktop is not supported> javachk ("desktop")
+%!error <Java DESKTOP is not supported> javachk ("desktop", "Java DESKTOP")
+%!test
+%! msg = javachk ("desktop");
+%! assert (msg.message, "javachk: desktop is not supported");
+%! assert (msg.identifier, "");
+%!test
+%! msg = javachk ("desktop", "Java DESKTOP");
+%! assert (msg.message, "javachk: desktop is not supported");
+%! assert (msg.identifier, "Java DESKTOP");
+
+%!testif HAVE_JAVA
+%! assert (javachk ("jvm"), "");
+
+## Test input validation
+%!error <javachk: unrecognized feature 'foobar'> javachk ("foobar")
+
--- a/scripts/java/javaclasspath.m
+++ b/scripts/java/javaclasspath.m
@@ -28,8 +28,8 @@
 ## If called with no inputs:
 ##
 ## @itemize
-## @item If no output is requested, the dynamic and static classpaths are printed
-## to the standard output.
+## @item If no output is requested, the dynamic and static classpaths are
+## printed to the standard output.
 ##
 ## @item If one output value @var{dpath} is requested, the result is
 ## the dynamic classpath.
@@ -54,14 +54,19 @@
 ## @seealso{javaaddpath, javarmpath}
 ## @end deftypefn
 
-function varargout = javaclasspath (which)
+function [path1, path2] = javaclasspath (which)
+
+  if (nargin > 1)
+    print_usage ();
+  endif
 
   ## dynamic classpath
   dynamic_path = javaMethod ("getClassPath", "org.octave.ClassHelper");
   dynamic_path_list = ostrsplit (dynamic_path, pathsep ());
 
   ## static classpath
-  static_path = javaMethod ("getProperty", "java.lang.System", "java.class.path");
+  static_path = javaMethod ("getProperty",
+                            "java.lang.System", "java.class.path");
   static_path_list = ostrsplit (static_path, pathsep ());
   if (numel (static_path_list) > 1)
     ## remove first element (which is .../octave.jar)
@@ -70,45 +75,38 @@
     static_path_list = {};
   endif
 
-  switch (nargin)
-    case 0
-      switch (nargout)
-        case 0
-          disp_path_list ("STATIC", static_path_list)
-          disp ("");
-          disp_path_list ("DYNAMIC", dynamic_path_list)
-
-        case 1
-          varargout{1} = cellstr (dynamic_path_list);
-
-        case 2
-          varargout{1} = cellstr (dynamic_path_list);
-          varargout{2} = cellstr (static_path_list);
-      endswitch
+  if (nargout == 0)
+    if (! nargin)
+      which = "-all";
+    endif
+    switch (tolower (which))
+      case "-dynamic", disp_path_list ("DYNAMIC", dynamic_path_list);
+      case "-static",  disp_path_list ("STATIC", static_path_list);
+      case "-all"
+        disp_path_list ("STATIC", static_path_list);
+        disp ("");
+        disp_path_list ("DYNAMIC", dynamic_path_list);
+      otherwise
+        error ("javaclasspath: invalid value for WHAT");
+    endswitch
 
-    case 1
-      switch (nargout)
-        case 0
-          if (strcmp (which, "-static"))
-            disp_path_list ("STATIC", static_path_list)
-          elseif (strcmp (which, "-dynamic"))
-            disp_path_list ("DYNAMIC", dynamic_path_list)
-          elseif (strcmp (which, "-all") == 1)
-            disp_path_list ("STATIC", static_path_list)
-            disp ("");
-            disp_path_list ("DYNAMIC", dynamic_path_list)
-          endif
-
-        case 1
-          if (strcmp (which, "-static") == 1)
-            varargout{1} = cellstr (static_path_list);
-          elseif (strcmp (which, "-dynamic") == 1)
-            varargout{1} = cellstr (dynamic_path_list);
-          elseif (strcmp (which, "-all") == 1)
-            varargout{1} = cellstr ([static_path_list, dynamic_path_list]);
-          endif
+  else
+    if (! nargin)
+      ## This is to allow retrieval of both paths in separate variables with
+      ## a single call to javaclasspath(). Matlab returns only the -dynamic
+      ## path in this case but this won't break compatibility.
+      path1 = cellstr (dynamic_path_list);
+      path2 = cellstr (static_path_list);
+    else
+      switch (tolower (which))
+        case "-all",     path1 = cellstr ([static_path_list,dynamic_path_list]);
+        case "-dynamic", path1 = cellstr (dynamic_path_list);
+        case "-static",  path1 = cellstr (static_path_list);
+        otherwise
+          error ("javaclasspath: invalid value for WHAT");
       endswitch
-  endswitch
+    endif
+  endif
 
 endfunction
 
--- a/scripts/java/javamem.m
+++ b/scripts/java/javamem.m
@@ -36,7 +36,7 @@
 ## determined by the environment variable @w{@env{OCTAVE_JAVA_DIR}}.
 ## If unset, the directory where @file{javaaddpath.m} resides is used instead
 ## (typically
-## @file{@w{@env{OCTAVE_HOME}}/share/octave/@w{@env{OCTAVE_VERSION}}/m/java/}
+## @file{@w{@env{OCTAVE_HOME}}/share/octave/@w{@env{OCTAVE_VERSION}}/m/java/}).
 ##
 ## @file{java.opts} is a plain text file with one option per line.  The
 ## default initial memory size and default maximum memory size (which
--- a/scripts/java/module.mk
+++ b/scripts/java/module.mk
@@ -5,6 +5,7 @@
   java/java_set.m \
   java/javaArray.m \
   java/javaaddpath.m \
+  java/javachk.m \
   java/javaclasspath.m \
   java/javamem.m \
   java/javarmpath.m \
@@ -53,20 +54,22 @@
 srcdir_java_JAVA_IMAGES = $(addprefix $(srcdir)/java/, $(JAVA_IMAGES))
 
 %.class : %.java
-	$(MKDIR_P) java/$(org_octave_dir)
+	$(AM_V_GEN)$(MKDIR_P) java/$(org_octave_dir) && \
 	( cd $(srcdir)/java; "$(JAVAC)" -source 1.3 -target 1.3 -d $(abs_builddir)/java $(org_octave_dir)/$(<F) )
 
 java/images.stamp: $(srcdir_java_JAVA_IMAGES)
-	if [ "x$(srcdir)" != "x." ]; then \
+	$(AM_V_GEN)if [ "x$(srcdir)" != "x." ]; then \
 	  $(MKDIR_P) java/$(org_octave_dir)/images; \
 	  cp $(srcdir_java_JAVA_IMAGES) java/$(org_octave_dir)/images; \
-	fi
+	fi && \
 	touch $@
 
 if AMCOND_HAVE_JAVA
 java/octave.jar: java/images.stamp $(java_JAVA_CLASSES)
-	( cd java; "$(JAR)" cf octave.jar.t $(JAVA_CLASSES) $(JAVA_IMAGES) )
-	mv $@.t $@
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	( cd java; \
+	  "$(JAR)" cf octave.jar-t $(JAVA_CLASSES) $(JAVA_IMAGES) ) && \
+	mv $@-t $@
 endif
 
 EXTRA_DIST += $(JAR_FILES) $(java_JAVA_SRC) $(java_JAVA_IMAGES)
--- a/scripts/java/org/octave/ClassHelper.java
+++ b/scripts/java/org/octave/ClassHelper.java
@@ -199,7 +199,7 @@
           {
             sb.append (";");
           }
-        sb.append (theField[i].toString ());
+        sb.append (theField[i].getName ());
       }
 
     return (sb.toString ());
--- a/scripts/java/org/octave/JDialogBox.java
+++ b/scripts/java/org/octave/JDialogBox.java
@@ -1,5 +1,6 @@
 /*
 
+Copyright (C) 2014-2015 Colin Foster
 Copyright (C) 2010, 2013 Martin Hepperle
 
 This file is part of Octave.
@@ -551,24 +552,28 @@
           {
             lst[i] = theTranslator.replace (list[i]);
           }
+
+        JScrollPane scrollPane = new JScrollPane();
         m_List = new JList (lst);
+        scrollPane.setViewportView(m_List);
+
 
         // replace ugly monospaced font
-        m_List.setFont (p.getFont ());
+        scrollPane.setFont (p.getFont ());
 
-        m_List.setMinimumSize (new Dimension (Math.max (1,
-                                                        Integer.parseInt (RowsCols[0].toString ())),
-                                              Math.max (1,
-                                                        Integer.parseInt (RowsCols[1].toString ()))));
-        m_List.setPreferredSize (new Dimension (Math.max (1,
-                                                          Integer.parseInt (RowsCols[1].toString ())),
-                                                Math.max (1,
-                                                          Integer.parseInt (RowsCols[0].toString ()))));
-        m_List.setBorder (new javax.swing.border.EtchedBorder ());
+        scrollPane.setMinimumSize (
+          new Dimension (
+            Math.max (1, Integer.parseInt (RowsCols[0].toString ())),
+            Math.max (1, Integer.parseInt (RowsCols[1].toString ()))));
+        scrollPane.setPreferredSize (
+          new Dimension (
+            Math.max (1, Integer.parseInt (RowsCols[1].toString ())),
+            Math.max (1, Integer.parseInt (RowsCols[0].toString ()))));
+        scrollPane.setBorder (new javax.swing.border.EtchedBorder ());
 
         gbc.gridy = message.length;
         gbc.fill = GridBagConstraints.HORIZONTAL;
-        p.add (m_List, gbc);
+        p.add (scrollPane, gbc);
 
         if (on.toLowerCase ().equals ("single"))
           {
--- a/scripts/java/usejava.m
+++ b/scripts/java/usejava.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2012-2013 Rik Wehbring
-## Parts Copyright (C) 2012-2013 Philip Nienhuis
+## Copyright (C) 2012-2015 Rik Wehbring
+## Parts Copyright (C) 2012-2015 Philip Nienhuis
 ##
 ## This file is part of Octave.
 ##
@@ -43,6 +43,7 @@
 ## @qcode{"desktop"} always returns @code{false} as Octave has no Java-based
 ## desktop.  Other features may be available if Octave was compiled with the
 ## Java Interface and Java is installed.
+## @seealso{javachk}
 ## @end deftypefn
 
 ## Author: Rik Wehbring
@@ -56,7 +57,7 @@
 
   retval = false;
 
-  switch feature
+  switch (feature)
     ## For each feature, try methods() on a Java class of a feature
     case "awt"
       try
@@ -87,7 +88,7 @@
 %!testif HAVE_JAVA
 %! assert (usejava ("jvm"), true);
 
-%% Test input validation
+## Test input validation
 %!error usejava ()
 %!error usejava (1, 2)
 %!error usejava (1)
new file mode 100644
--- /dev/null
+++ b/scripts/linear-algebra/bandwidth.m
@@ -0,0 +1,110 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{bw} =} bandwidth (@var{A}, @var{type})
+## @deftypefnx {Function File} {[@var{lower}, @var{upper}] =} bandwidth (@var{A})
+## Compute the bandwidth of @var{A}.
+##
+## The @var{type} argument is the string @qcode{"lower"} for the lower
+## bandwidth and @qcode{"upper"} for the upper bandwidth.
+## If no @var{type} is specified return both the lower and upper bandwidth
+## of @var{A}.
+##
+## The lower/upper bandwidth of a matrix is the number of
+## subdiagonals/superdiagonals with nonzero entries.
+##
+## @seealso{isbanded, isdiag, istril, istriu}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function [lower, upper] = bandwidth (A, type)
+
+  if (! ((nargin == 1 && nargout == 2) || (nargin == 2 && nargout <= 1)))
+    print_usage ();
+  endif
+
+  if (! isnumeric (A) && ! islogical (A) || ndims (A) != 2)
+    error ("bandwidth: A must be a 2-D numeric or logical matrix");
+  elseif (nargin == 2 && ! (strcmp (type, "lower") || strcmp (type, "upper")))
+    error ('bandwidth: TYPE must be "lower" or "upper"');
+  endif
+
+  if (nargin == 1)
+    [i, j] = find (A);
+    if (isempty (i))
+      lower = upper = 0;
+    else
+      lower = max (i - j);
+      upper = max (j - i);
+    endif
+  else
+    [i, j] = find (A);
+    if (isempty (i))
+      lower = 0;
+    elseif (strcmp (type, "lower"))
+      lower = max (i - j);
+    else
+      lower = max (j - i);
+    endif
+  endif
+
+endfunction
+
+
+%!test
+%! [a,b] = bandwidth (speye (100));
+%! assert ([a,b] == [0,0]);
+%! assert (bandwidth (speye (100), "upper"), 0);
+%! assert (bandwidth (speye (100), "lower"), 0);
+
+%!test
+%! A = [2 3 0 0 0; 1 2 3 0 0; 0 1 2 3 0; 0 0 1 2 3; 0 0 0 1 2];
+%! [a,b] = bandwidth (A);
+%! assert ([a,b] == [1,1]);
+%! assert (bandwidth (A, "lower"), 1);
+%! assert (bandwidth (A, "upper"), 1);
+
+%!assert (bandwidth ([], "lower"), 0)
+%!assert (bandwidth ([], "upper"), 0)
+%!assert (bandwidth (zeros (3,3), "lower"), 0)
+%!assert (bandwidth (zeros (3,3), "upper"), 0)
+%!assert (bandwidth (ones (5,5), "lower"), 4)
+%!assert (bandwidth (ones (5,5), "upper"), 4)
+
+%!test
+%! [a,b] = bandwidth ([]);
+%! assert ([a,b] == [0,0]);
+%!test
+%! [a,b] = bandwidth (zeros (3,3));
+%! assert ([a,b] == [0,0]);
+%!test
+%! [a,b] = bandwidth (ones (5,5));
+%! assert ([a,b] == [4,4]);
+
+## Test input validation
+%!error bandwidth ()
+%!error bandwidth (1,2,3)
+%!error [a,b,c] = bandwidth (ones (2))
+%!error [a,b] = bandwidth (ones (2), "upper")
+%!error <A must be a 2-D numeric or logical> bandwidth ("string", "lower")
+%!error <A must be a 2-D numeric or logical> bandwidth (ones (3,3,3), "lower")
+%!error <TYPE must be "lower" or "upper"> bandwidth (ones (2), "uper")
+%!error <TYPE must be "lower" or "upper"> bandwidth (ones (2), "uppper")
+
--- a/scripts/linear-algebra/commutation_matrix.m
+++ b/scripts/linear-algebra/commutation_matrix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -63,8 +63,8 @@
 ## @end ifnottex
 ##  is returned.
 ##
-## See Magnus and Neudecker (1988), @cite{Matrix Differential Calculus with
-## Applications in Statistics and Econometrics.}
+## See @nospell{Magnus and Neudecker} (1988), @cite{Matrix Differential
+## Calculus with Applications in Statistics and Econometrics.}
 ## @end deftypefn
 
 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
@@ -90,7 +90,7 @@
   k = zeros (m * n, m * n);
   for i = 1 : m
     for j = 1 : n
-      k ((i - 1) * n + j, (j - 1) * m + i) = 1;
+      k((i - 1) * n + j, (j - 1) * m + i) = 1;
     endfor
   endfor
 
--- a/scripts/linear-algebra/cond.m
+++ b/scripts/linear-algebra/cond.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/linear-algebra/condest.m
+++ b/scripts/linear-algebra/condest.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Regents of the University of California
+## Copyright (C) 2007-2015 Regents of the University of California
 ##
 ## This file is part of Octave.
 ##
@@ -59,13 +59,13 @@
 ##
 ## @itemize
 ## @item
-## N.J. Higham and F. Tisseur, @cite{A Block Algorithm
+## @nospell{N.J. Higham and F. Tisseur}, @cite{A Block Algorithm
 ## for Matrix 1-Norm Estimation, with an Application to 1-Norm
 ## Pseudospectra}. SIMAX vol 21, no 4, pp 1185-1201.
 ## @url{http://dx.doi.org/10.1137/S0895479899356080}
 ##
 ## @item
-## N.J. Higham and F. Tisseur, @cite{A Block Algorithm
+## @nospell{N.J. Higham and F. Tisseur}, @cite{A Block Algorithm
 ## for Matrix 1-Norm Estimation, with an Application to 1-Norm
 ## Pseudospectra}. @url{http://citeseer.ist.psu.edu/223007.html}
 ## @end itemize
@@ -124,7 +124,7 @@
   have_t = false;
   have_solve = false;
 
-  if (ismatrix (varargin{1}))
+  if (isnumeric (varargin{1}))
     A = varargin{1};
     if (! issquare (A))
       error ("condest: matrix must be square");
@@ -233,6 +233,7 @@
 %! assert (cA, cA_test, -2^-6);
 
 %!test
+%! warning ("off", "Octave:nearly-singular-matrix", "local");
 %! N = 12;
 %! A = hilb (N);
 %! [rcondA, v] = condest (A);
--- a/scripts/linear-algebra/cross.m
+++ b/scripts/linear-algebra/cross.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/linear-algebra/duplication_matrix.m
+++ b/scripts/linear-algebra/duplication_matrix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -54,8 +54,8 @@
 ##  @math{A}.
 ## @end ifnottex
 ##
-## See Magnus and Neudecker (1988), Matrix differential calculus with
-## applications in statistics and econometrics.
+## See @nospell{Magnus and Neudecker} (1988), @cite{Matrix Differential
+## Calculus with Applications in Statistics and Econometrics.}
 ## @end deftypefn
 
 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
@@ -77,10 +77,10 @@
   ## It is clearly possible to make this a LOT faster!
   count = 0;
   for j = 1 : n
-    d ((j - 1) * n + j, count + j) = 1;
+    d((j - 1) * n + j, count + j) = 1;
     for i = (j + 1) : n
-      d ((j - 1) * n + i, count + i) = 1;
-      d ((i - 1) * n + j, count + i) = 1;
+      d((j - 1) * n + i, count + i) = 1;
+      d((i - 1) * n + j, count + i) = 1;
     endfor
     count = count + n - j;
   endfor
--- a/scripts/linear-algebra/expm.m
+++ b/scripts/linear-algebra/expm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek, Marco Caliari
+## Copyright (C) 2008-2015 Jaroslav Hajek, Marco Caliari
 ##
 ## This file is part of Octave.
 ##
@@ -33,8 +33,8 @@
 ##
 ## @end ifnottex
 ## The Taylor series is @emph{not} the way to compute the matrix
-## exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to
-## Compute the Exponential of a Matrix}, SIAM Review, 1978.  This routine
+## exponential; see @nospell{Moler and Van Loan}, @cite{Nineteen Dubious Ways
+## to Compute the Exponential of a Matrix}, SIAM Review, 1978.  This routine
 ## uses Ward's diagonal Pad@'e approximation method with three step
 ## preconditioning (SIAM Journal on Numerical Analysis, 1977).  Diagonal
 ## Pad@'e approximations are rational polynomials of matrices
@@ -77,7 +77,7 @@
     print_usage ();
   endif
 
-  if (! ismatrix (A) || ! issquare (A))
+  if (! isnumeric (A) || ! issquare (A))
     error ("expm: A must be a square matrix");
   endif
 
@@ -149,7 +149,7 @@
 %!assert (full (expm (eye (3))), expm (full (eye (3))))
 %!assert (full (expm (10*eye (3))), expm (full (10*eye (3))), 8*eps)
 
-%% Test input validation
+## Test input validation
 %!error expm ()
 %!error expm (1, 2)
 %!error <expm: A must be a square matrix> expm ([1 0;0 1; 2 2])
--- a/scripts/linear-algebra/housh.m
+++ b/scripts/linear-algebra/housh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 A. Scottedward Hodel
+## Copyright (C) 1995-2015 A. Scottedward Hodel
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 ## @end table
 ##
 ## @noindent
-## Outputs (see Golub and Van Loan):
+## Outputs (see @nospell{Golub and Van Loan}):
 ##
 ## @table @var
 ## @item beta
new file mode 100644
--- /dev/null
+++ b/scripts/linear-algebra/isbanded.m
@@ -0,0 +1,86 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} isbanded (@var{A}, @var{lower}, @var{upper})
+## Return true if @var{A} is a matrix with entries confined between
+## @var{lower} diagonals below the main diagonal and @var{upper} diagonals
+## above the main diagonal.
+##
+## @var{lower} and @var{upper} must be non-negative integers.
+## @seealso{isdiag, istril, istriu, bandwidth}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function retval = isbanded (A, lower, upper)
+
+  if (nargin != 3)
+    print_usage ();
+  endif
+
+  if (! isreal (lower) || ! isreal (upper) || lower < 0 || upper < 0)
+    error ("isbanded: LOWER and UPPER must be non-negative integers");
+  endif
+
+  if (isempty (A))
+    retval = [];
+  else
+    retval = (isnumeric (A) || islogical (A)) && ndims (A) == 2;
+    if (retval)
+      [i, j] = find (A);
+      pupp = j >= i;
+      retval = all (j(pupp) - i(pupp) <= upper);
+      if (retval)
+        plow = i >= j;
+        retval = all (i(plow) - j(plow) <= lower);
+      endif
+    endif
+  endif
+
+endfunction
+
+
+%!assert (! isbanded ("string", 0, 0))
+%!assert (! isbanded (zeros (2,2,2), 0, 0))
+%!assert (isbanded ([], 0, 0), [])
+%!assert (isbanded (1,0,0))
+%!assert (isbanded (1,10,10))
+
+%!assert (isbanded ([1, 1],1,1))
+%!assert (isbanded ([1; 1],1,1))
+%!assert (isbanded (eye(10),0,0))
+%!assert (isbanded (eye(10),1,1))
+%!assert (isbanded (i*eye(10),1,1))
+%!assert (isbanded (logical (eye (10)),1,1))
+
+%! A = [2 3 0 0 0; 1 2 3 0 0; 0 1 2 3 0; 0 0 1 2 3; 0 0 0 1 2];
+%! assert (isbanded (A,1,1))
+%! assert (! isbanded (A,0,1))
+%! assert (! isbanded (A,1,0))
+
+## Test input validation
+%!error isbanded ()
+%!error isbanded (1)
+%!error isbanded (1,2)
+%!error isbanded (1,2,3,4)
+%!error <LOWER and UPPER must be non-negative> isbanded (1, -1, 1)
+%!error <LOWER and UPPER must be non-negative> isbanded (1, 1, -1)
+%!error <LOWER and UPPER must be non-negative> isbanded (1, {1}, 1)
+%!error <LOWER and UPPER must be non-negative> isbanded (1, 1, {1})
+
--- a/scripts/linear-algebra/isdefinite.m
+++ b/scripts/linear-algebra/isdefinite.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 Gabriele Pannocchia
+## Copyright (C) 2003-2015 Gabriele Pannocchia
 ##
 ## This file is part of Octave.
 ##
@@ -17,13 +17,13 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} isdefinite (@var{x})
-## @deftypefnx {Function File} {} isdefinite (@var{x}, @var{tol})
-## Return 1 if @var{x} is symmetric positive definite within the
-## tolerance specified by @var{tol} or 0 if @var{x} is symmetric
+## @deftypefn  {Function File} {} isdefinite (@var{A})
+## @deftypefnx {Function File} {} isdefinite (@var{A}, @var{tol})
+## Return 1 if @var{A} is symmetric positive definite within the
+## tolerance specified by @var{tol} or 0 if @var{A} is symmetric
 ## positive semidefinite.  Otherwise, return -1.  If @var{tol}
 ## is omitted, use a tolerance of
-## @code{100 * eps * norm (@var{x}, "fro")}
+## @code{100 * eps * norm (@var{A}, "fro")}
 ## @seealso{issymmetric, ishermitian}
 ## @end deftypefn
 
@@ -31,30 +31,30 @@
 ## Created: November 2003
 ## Adapted-By: jwe
 
-function retval = isdefinite (x, tol)
+function retval = isdefinite (A, tol)
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
-  if (! isfloat (x))
-    x = double (x);
+  if (! isfloat (A))
+    A = double (A);
   endif
 
   if (nargin == 1)
-    tol = 100 * eps (class (x)) * norm (x, "fro");
+    tol = 100 * eps (class (A)) * norm (A, "fro");
   endif
 
-  if (! ishermitian (x, tol))
-    error ("isdefinite: X must be a Hermitian matrix");
+  if (! ishermitian (A, tol))
+    error ("isdefinite: A must be a Hermitian matrix");
   endif
 
-  e = tol * eye (rows (x));
-  [r, p] = chol (x - e);
+  e = tol * eye (rows (A));
+  [r, p] = chol (A - e);
   if (p == 0)
     retval = 1;
   else
-    [r, p] = chol (x + e);
+    [r, p] = chol (A + e);
     if (p == 0)
       retval = 0;
     else
@@ -83,5 +83,5 @@
 
 %!error isdefinite ()
 %!error isdefinite (1,2,3)
-%!error <X must be a Hermitian matrix> isdefinite ([1 2; 3 4])
+%!error <A must be a Hermitian matrix> isdefinite ([1 2; 3 4])
 
new file mode 100644
--- /dev/null
+++ b/scripts/linear-algebra/isdiag.m
@@ -0,0 +1,56 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} isdiag (@var{A})
+## Return true if @var{A} is a diagonal matrix.
+## @seealso{isbanded, istril, istriu, diag, bandwidth}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function retval = isdiag (A)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  retval = (isnumeric (A) || islogical (A)) && ndims (A) == 2;
+  if (retval)
+    [i, j] = find (A);
+    retval = all (i == j);
+  endif
+
+endfunction
+
+
+%!assert (! isdiag ("string"))
+%!assert (isdiag ([]))
+
+%!assert (isdiag (1))
+%!assert (! isdiag ([1, 1]))
+%!assert (! isdiag ([1; 1]))
+%!assert (isdiag (eye (10)))
+%!assert (issymmetric ([i, 0; 0, 1 + i]))
+%!assert (isdiag (speye (1000000)))
+%!assert (isdiag (logical (eye (10))))
+
+## Test input validation
+%!error isdiag ()
+%!error isdiag (1,2)
+
--- a/scripts/linear-algebra/ishermitian.m
+++ b/scripts/linear-algebra/ishermitian.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -18,13 +18,14 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} ishermitian (@var{x})
-## @deftypefnx {Function File} {} ishermitian (@var{x}, @var{tol})
-## Return true if @var{x} is Hermitian within the tolerance specified by
+## @deftypefn  {Function File} {} ishermitian (@var{A})
+## @deftypefnx {Function File} {} ishermitian (@var{A}, @var{tol})
+## Return true if @var{A} is Hermitian within the tolerance specified by
 ## @var{tol}.
+##
 ## The default tolerance is zero (uses faster code).
-## Matrix @var{x} is considered symmetric if
-## @code{norm (@var{x} - @var{x}', Inf) / norm (@var{x}, Inf) < @var{tol}}.
+## Matrix @var{A} is considered symmetric if
+## @code{norm (@var{A} - @var{A}', Inf) / norm (@var{A}, Inf) < @var{tol}}.
 ## @seealso{issymmetric, isdefinite}
 ## @end deftypefn
 
@@ -32,19 +33,19 @@
 ## Created: August 1993
 ## Adapted-By: jwe
 
-function retval = ishermitian (x, tol = 0)
+function retval = ishermitian (A, tol = 0)
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
-  retval = isnumeric (x) && issquare (x);
+  retval = isnumeric (A) && issquare (A);
   if (retval)
     if (tol == 0)
-      retval = all ((x == x')(:));
+      retval = all ((A == A')(:));
     else
-      norm_x = norm (x, inf);
-      retval = norm_x == 0 || norm (x - x', inf) / norm_x <= tol;
+      norm_x = norm (A, inf);
+      retval = norm_x == 0 || norm (A - A', inf) / norm_x <= tol;
     endif
   endif
 
--- a/scripts/linear-algebra/issymmetric.m
+++ b/scripts/linear-algebra/issymmetric.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -18,12 +18,14 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} issymmetric (@var{x})
-## @deftypefnx {Function File} {} issymmetric (@var{x}, @var{tol})
-## Return true if @var{x} is a symmetric matrix within the tolerance specified
-## by @var{tol}.  The default tolerance is zero (uses faster code).
-## Matrix @var{x} is considered symmetric if
-## @code{norm (@var{x} - @var{x}.', Inf) / norm (@var{x}, Inf) < @var{tol}}.
+## @deftypefn  {Function File} {} issymmetric (@var{A})
+## @deftypefnx {Function File} {} issymmetric (@var{A}, @var{tol})
+## Return true if @var{A} is a symmetric matrix within the tolerance specified
+## by @var{tol}.
+##
+## The default tolerance is zero (uses faster code).
+## Matrix @var{A} is considered symmetric if
+## @code{norm (@var{A} - @var{A}.', Inf) / norm (@var{A}, Inf) < @var{tol}}.
 ## @seealso{ishermitian, isdefinite}
 ## @end deftypefn
 
@@ -31,19 +33,20 @@
 ## Created: August 1993
 ## Adapted-By: jwe
 
-function retval = issymmetric (x, tol = 0)
+function retval = issymmetric (A, tol = 0)
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
-  retval = isnumeric (x) && issquare (x);
+  retval = (isnumeric (A) || islogical (A)) && issquare (A);
   if (retval)
     if (tol == 0)
-      retval = all ((x == x.')(:));
+      ## Handle large sparse matrices as well as full ones
+      retval = nnz (A != A.') == 0;
     else
-      norm_x = norm (x, inf);
-      retval = norm_x == 0 || norm (x - x.', inf) / norm_x <= tol;
+      norm_x = norm (A, inf);
+      retval = norm_x == 0 || norm (A - A.', inf) / norm_x <= tol;
     endif
   endif
 
@@ -59,6 +62,8 @@
 %!assert (issymmetric ([1, 2i; 2i, 1]))
 %!assert (! (issymmetric ("t")))
 %!assert (! (issymmetric (["te"; "et"])))
+%!assert (issymmetric (speye (100000)))
+%!assert (issymmetric (logical (eye (2))))
 
 %!test
 %! s.a = 1;
new file mode 100644
--- /dev/null
+++ b/scripts/linear-algebra/istril.m
@@ -0,0 +1,61 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} istril (@var{A})
+## Return true if @var{A} is a lower triangular matrix.
+##
+## A lower triangular matrix has nonzero entries only on the main diagonal
+## and below.
+## @seealso{istriu, isbanded, isdiag, tril, bandwidth}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function retval = istril (A)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  retval = (isnumeric (A) || islogical (A)) && ndims (A) == 2;
+  if (retval)
+    [i, j] = find (A);
+    retval = all (i >= j);
+  endif
+
+endfunction
+
+
+%!assert (! istril ("string"))
+%!assert (istril ([]))
+%!assert (! istril (zeros (2,2,2)))
+
+%!assert (istril (1))
+%!assert (! istril ([1, 1]))
+%!assert (istril ([1; 1]))
+%!assert (istril (eye (10)))
+%!assert (istril (speye (100)))
+
+%!assert (istril (tril (randn (10))))
+%!assert (! istril (randn (10)))
+
+## Test input validation
+%!error istril ()
+%!error istril (1,2)
+
new file mode 100644
--- /dev/null
+++ b/scripts/linear-algebra/istriu.m
@@ -0,0 +1,61 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} istriu (@var{A})
+## Return true if @var{A} is an upper triangular matrix.
+##
+## An upper triangular matrix has nonzero entries only on the main diagonal
+## and above.
+## @seealso{isdiag, isbanded, istril, triu, bandwidth}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function retval = istriu (A)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  retval = (isnumeric (A) || islogical (A)) && ndims (A) == 2;
+  if (retval)
+    [i, j] = find (A);
+    retval = all (i <= j);
+  endif
+
+endfunction
+
+
+%!assert (! istriu ("string"))
+%!assert (istriu ([]))
+%!assert (! istriu (zeros (2,2,2)))
+
+%!assert (istriu (1))
+%!assert (istriu ([1, 1]))
+%!assert (! istriu ([1; 1]))
+%!assert (istriu (eye (10)))
+%!assert (istriu (speye (100)))
+
+%!assert (istriu (triu (randn (10))))
+%!assert (! istriu (randn (10)))
+
+## Test input validation
+%!error istriu ()
+%!error istriu (1,2)
+
--- a/scripts/linear-algebra/krylov.m
+++ b/scripts/linear-algebra/krylov.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 Auburn University.  All rights reserved.
+## Copyright (C) 1993-2015 Auburn University.  All rights reserved.
 ##
 ## This file is part of Octave.
 ##
@@ -49,9 +49,9 @@
 ## If the optional parameter @var{pflg} is nonzero, row pivoting is used
 ## to improve numerical behavior.  The default value is 0.
 ##
-## Reference: A. Hodel, P. Misra, @cite{Partial Pivoting in the Computation of
-## Krylov Subspaces of Large Sparse Systems}, Proceedings of the 42nd IEEE
-## Conference on Decision and Control, December 2003.
+## Reference: @nospell{A. Hodel, P. Misra}, @cite{Partial Pivoting in the
+## Computation of Krylov Subspaces of Large Sparse Systems}, Proceedings of
+## the 42nd IEEE Conference on Decision and Control, December 2003.
 ## @end deftypefn
 
 ## Author: A. Scottedward Hodel <a.s.hodel@eng.auburn.edu>
@@ -133,8 +133,8 @@
         nv = columns (V);
         if (jj != nv)
           [V(:,jj), V(:,nv)] = swap (V(:,jj), V(:,nv));
-          ## FIXME -- H columns should be swapped too.  Not done
-          ## since Block Hessenberg structure is lost anyway.
+          ## FIXME: H columns should be swapped too.
+          ##        Not done since Block Hessenberg structure is lost anyway.
         endif
         V = V(:,1:(nv-1));
         ## One less reflection.
@@ -167,7 +167,7 @@
         ## Reduce V per the reflection.
         V(idx,:) = V(idx,:) - av*hv*(hv' * V(idx,:));
         if(iter > 1)
-          ## FIXME -- not done correctly for block case.
+          ## FIXME: not done correctly for block case.
           H(nu,nu-1) = V(pivot_vec(nu),jj);
         endif
 
--- a/scripts/linear-algebra/linsolve.m
+++ b/scripts/linear-algebra/linsolve.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Nir Krakauer
+## Copyright (C) 2013-2015 Nir Krakauer
 ##
 ## This file is part of Octave.
 ##
@@ -87,28 +87,24 @@
     trans_A = false;
     if (isfield (opts, "TRANSA") && opts.TRANSA)
       trans_A = true;
-      A = A';
     endif
     if (isfield (opts, "POSDEF") && opts.POSDEF)
       A = matrix_type (A, "positive definite");
     endif
     if (isfield (opts, "LT") && opts.LT)
-      if (trans_A)
-        A = matrix_type (A, "upper");
-      else
-        A = matrix_type (A, "lower");
-      endif
-    endif
-    if (isfield (opts, "UT") && opts.UT)
-      if (trans_A)
-        A = matrix_type (A, "lower");
-      else
-        A = matrix_type (A, "upper");
-      endif
+      A = matrix_type (A, "lower");
+    elseif (isfield (opts, "UT") && opts.UT)
+      A = matrix_type (A, "upper");
     endif
   endif
 
-  x = A \ b;
+  ## This way is faster as the transpose is not calculated in Octave,
+  ## but forwarded as a flag option to BLAS.
+  if (trans_A)
+    x = A' \ b;
+  else
+    x = A \ b;
+  endif
 
   if (nargout > 1)
     if (issquare (A))
@@ -117,12 +113,13 @@
       R = 0;
     endif
   endif
+
 endfunction
 
 
 %!test
-%! n = 4;
-%! A = triu (rand (n));
+%! n = 10;
+%! A = triu (gallery ("condex", n));
 %! x = rand (n, 1);
 %! b = A' * x;
 %! opts.UT = true;
--- a/scripts/linear-algebra/logm.m
+++ b/scripts/linear-algebra/logm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 N. J. Higham
+## Copyright (C) 2008-2015 N. J. Higham
 ## Copyright (C) 2010 Richard T. Guy
 ## Copyright (C) 2010 Marco Caliari
 ##
@@ -161,14 +161,16 @@
 
 
 %!assert (norm (logm ([1 -1;0 1]) - [0 -1; 0 0]) < 1e-5)
-%!assert (norm (expm (logm ([-1 2 ; 4 -1])) - [-1 2 ; 4 -1]) < 1e-5)
+%!test
+%! warning ("off", "Octave:logm:non-principal", "local");
+%! assert (norm (expm (logm ([-1 2 ; 4 -1])) - [-1 2 ; 4 -1]) < 1e-5);
 %!assert (logm ([1 -1 -1;0 1 -1; 0 0 1]), [0 -1 -1.5; 0 0 -1; 0 0 0], 1e-5)
 %!assert (logm (10), log (10))
 %!assert (full (logm (eye (3))), logm (full (eye (3))))
 %!assert (full (logm (10*eye (3))), logm (full (10*eye (3))), 8*eps)
 %!assert (logm (expm ([0 1i; -1i 0])), [0 1i; -1i 0], 10 * eps)
 
-%% Test input validation
+## Test input validation
 %!error logm ()
 %!error logm (1, 2, 3)
 %!error <logm: A must be a square matrix> logm ([1 0;0 1; 2 2])
--- a/scripts/linear-algebra/module.mk
+++ b/scripts/linear-algebra/module.mk
@@ -1,6 +1,7 @@
 FCN_FILE_DIRS += linear-algebra
 
 linear_algebra_FCN_FILES = \
+  linear-algebra/bandwidth.m \
   linear-algebra/commutation_matrix.m \
   linear-algebra/cond.m \
   linear-algebra/condest.m \
@@ -8,9 +9,13 @@
   linear-algebra/duplication_matrix.m \
   linear-algebra/expm.m \
   linear-algebra/housh.m \
+  linear-algebra/isbanded.m \
   linear-algebra/isdefinite.m \
+  linear-algebra/isdiag.m \
   linear-algebra/ishermitian.m \
   linear-algebra/issymmetric.m \
+  linear-algebra/istril.m \
+  linear-algebra/istriu.m \
   linear-algebra/krylov.m \
   linear-algebra/linsolve.m \
   linear-algebra/logm.m \
--- a/scripts/linear-algebra/normest.m
+++ b/scripts/linear-algebra/normest.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman and Marco Caliari
+## Copyright (C) 2006-2015 David Bateman and Marco Caliari
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -84,7 +84,7 @@
 %! A = rand (10);
 %! assert (normest (A), norm (A), 1e-6);
 
-%% Test input validation
+## Test input validation
 %!error normest ()
 %!error normest (1, 2, 3)
 %!error normest ([true true])
--- a/scripts/linear-algebra/null.m
+++ b/scripts/linear-algebra/null.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -65,7 +65,7 @@
     rank = sum (s > tol);
 
     if (rank < cols)
-      retval = V (:, rank+1:cols);
+      retval = V(:, rank+1:cols);
       if (isa (A, "single"))
         retval (abs (retval) < eps ("single")) = 0;
       else
@@ -79,7 +79,7 @@
 endfunction
 
 
-%% FIXME: Need some tests for 'single' variables as well
+## FIXME: Need some tests for 'single' variables as well
 
 %!test
 %! A = 0;
--- a/scripts/linear-algebra/onenormest.m
+++ b/scripts/linear-algebra/onenormest.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Regents of the University of California
+## Copyright (C) 2007-2015 Regents of the University of California
 ##
 ## This file is part of Octave.
 ##
@@ -20,7 +20,7 @@
 ## @deftypefn  {Function File} {[@var{est}, @var{v}, @var{w}, @var{iter}] =} onenormest (@var{A}, @var{t})
 ## @deftypefnx {Function File} {[@var{est}, @var{v}, @var{w}, @var{iter}] =} onenormest (@var{apply}, @var{apply_t}, @var{n}, @var{t})
 ##
-## Apply Higham and Tisseur's randomized block 1-norm estimator to
+## Apply @nospell{Higham and Tisseur's} randomized block 1-norm estimator to
 ## matrix @var{A} using @var{t} test vectors.  If @var{t} exceeds 5, then
 ## only 5 test vectors are used.
 ##
@@ -41,13 +41,13 @@
 ##
 ## @itemize
 ## @item
-## N.J. Higham and F. Tisseur, @cite{A Block Algorithm
+## @nospell{N.J. Higham and F. Tisseur}, @cite{A Block Algorithm
 ## for Matrix 1-Norm Estimation, with an Application to 1-Norm
 ## Pseudospectra}. SIMAX vol 21, no 4, pp 1185-1201.
 ## @url{http://dx.doi.org/10.1137/S0895479899356080}
 ##
 ## @item
-## N.J. Higham and F. Tisseur, @cite{A Block Algorithm
+## @nospell{N.J. Higham and F. Tisseur}, @cite{A Block Algorithm
 ## for Matrix 1-Norm Estimation, with an Application to 1-Norm
 ## Pseudospectra}. @url{http://citeseer.ist.psu.edu/223007.html}
 ## @end itemize
@@ -103,7 +103,7 @@
   default_t = 5;
   itmax = 10;
 
-  if (ismatrix (varargin{1}))
+  if (isnumeric (varargin{1}))
     [n, nc] = size (varargin{1});
     if (n != nc)
       error ("onenormest: matrix must be square");
--- a/scripts/linear-algebra/orth.m
+++ b/scripts/linear-algebra/orth.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -67,7 +67,7 @@
     rank = sum (s > tol);
 
     if (rank > 0)
-      retval = -U (:, 1:rank);
+      retval = -U(:, 1:rank);
     else
       retval = zeros (rows, 0);
     endif
--- a/scripts/linear-algebra/planerot.m
+++ b/scripts/linear-algebra/planerot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -17,8 +17,8 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{g}, @var{y}] =} planerot (@var{x})
-## Given a two-element column vector, returns the
+## @deftypefn {Function File} {[@var{G}, @var{y}] =} planerot (@var{x})
+## Given a two-element column vector, return the
 ## @tex
 ## $2 \times 2$ orthogonal matrix
 ## @end tex
@@ -31,8 +31,16 @@
 ## @end deftypefn
 
 function [G, y] = planerot (x)
+
+  if (nargin != 1)
+    print_usage ();
+  elseif (! (isvector (x) && numel (x) == 2))
+    error ("planerot: X must be a 2-element vector");
+  endif
+
   G = givens (x(1), x(2));
   y = G * x(:);
+
 endfunction
 
 
@@ -42,7 +50,8 @@
 %! assert (g, [x(1) x(2); -x(2) x(1)] / sqrt (x(1)^2 + x(2)^2), 2e-8);
 %! assert (y(2), 0, 2e-8);
 
-%!error planerot ([0])
-%!error planerot ([0 0 0])
 %!error planerot ()
+%!error planerot (1,2)
+%!error <X must be a 2-element vector> planerot (ones (2,2))
+%!error <X must be a 2-element vector> planerot ([0 0 0])
 
--- a/scripts/linear-algebra/qzhess.m
+++ b/scripts/linear-algebra/qzhess.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -35,9 +35,9 @@
 ## @end example
 ##
 ## The Hessenberg-triangular decomposition is the first step in
-## Moler and Stewart's QZ@tie{}decomposition algorithm.
+## @nospell{Moler and Stewart's} QZ@tie{}decomposition algorithm.
 ##
-## Algorithm taken from Golub and Van Loan,
+## Algorithm taken from @nospell{Golub and Van Loan},
 ## @cite{Matrix Computations, 2nd edition}.
 ##
 ## @seealso{lu, chol, hess, qr, qz, schur, svd}
@@ -71,21 +71,21 @@
       ## disp (["zero out aa(", num2str(i), ",", num2str(j), ")"])
 
       rot = givens (aa (i-1, j), aa (i, j));
-      aa ((i-1):i, :) = rot *aa ((i-1):i, :);
-      bb ((i-1):i, :) = rot *bb ((i-1):i, :);
-      q  ((i-1):i, :) = rot *q  ((i-1):i, :);
+      aa((i-1):i, :) = rot *aa((i-1):i, :);
+      bb((i-1):i, :) = rot *bb((i-1):i, :);
+       q((i-1):i, :) = rot * q((i-1):i, :);
 
       ## disp (["now zero out bb(", num2str(i), ",", num2str(i-1), ")"])
 
       rot = givens (bb (i, i), bb (i, i-1))';
-      bb (:, (i-1):i) = bb (:, (i-1):i) * rot';
-      aa (:, (i-1):i) = aa (:, (i-1):i) * rot';
-      z  (:, (i-1):i) = z  (:, (i-1):i) * rot';
+      bb(:, (i-1):i) = bb(:, (i-1):i) * rot';
+      aa(:, (i-1):i) = aa(:, (i-1):i) * rot';
+       z(:, (i-1):i) =  z(:, (i-1):i) * rot';
 
     endfor
   endfor
 
-  bb (2, 1) = 0.0;
+  bb(2, 1) = 0.0;
   for i = 3:na
     bb (i, 1:(i-1)) = zeros (1, i-1);
     aa (i, 1:(i-2)) = zeros (1, i-2);
--- a/scripts/linear-algebra/rank.m
+++ b/scripts/linear-algebra/rank.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/linear-algebra/rref.m
+++ b/scripts/linear-algebra/rref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -65,7 +65,7 @@
       A(r:rows, c) = zeros (rows-r+1, 1);
     else
       ## keep track of bound variables
-      used (1, c) = 1;
+      used(1, c) = 1;
 
       ## Swap current row and pivot row
       A([pivot, r], c:cols) = A([r, pivot], c:cols);
--- a/scripts/linear-algebra/subspace.m
+++ b/scripts/linear-algebra/subspace.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s., Czech Republic
+## Copyright (C) 2008-2015 VZLU Prague, a.s., Czech Republic
 ##
 ## This file is part of Octave.
 ##
@@ -60,3 +60,18 @@
 
 endfunction
 
+
+%!test
+%! ## For random vectors
+%! a = rand (2,1);
+%! b = rand (2,1);
+%! a1 = norm (a,2);
+%! b1 = norm (b,2);
+%! theta = acos (dot (a,b)/(a1*b1));
+%! assert (theta, subspace (a, b), 100*eps);
+
+%!test
+%! ## For random matrices
+%! M = rand (3, 3);
+%! assert (0, subspace (M, M'), 100*eps);
+
--- a/scripts/linear-algebra/trace.m
+++ b/scripts/linear-algebra/trace.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/linear-algebra/vech.m
+++ b/scripts/linear-algebra/vech.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -19,7 +19,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} vech (@var{x})
-## Return the vector obtained by eliminating all supradiagonal elements of
+## Return the vector obtained by eliminating all superdiagonal elements of
 ## the square matrix @var{x} and stacking the result one column above the
 ## other.  This has uses in matrix calculus where the underlying matrix
 ## is symmetric and it would be pointless to keep values above the main
--- a/scripts/miscellaneous/ans.m
+++ b/scripts/miscellaneous/ans.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,8 +18,10 @@
 
 ## -*- texinfo -*-
 ## @defvr {Automatic Variable} ans
-## The most recently computed result that was not
-## explicitly assigned to a variable.  For example, after the expression
+## The most recently computed result that was not explicitly assigned to a
+## variable.
+##
+## For example, after the expression
 ##
 ## @example
 ## 3^2 + 4^2
--- a/scripts/miscellaneous/bug_report.m
+++ b/scripts/miscellaneous/bug_report.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -25,22 +25,22 @@
 
 function bug_report ()
 
-  puts ("\n");
-  puts ("  Bug reports play an essential role in making Octave\n");
-  puts ("  reliable.  Please use the Octave bug tracker at\n");
-  puts ("\n");
-  puts ("    http://bugs.octave.org\n");
-  puts ("\n");
-  puts ("  to report problems.\n");
-  puts ("\n");
-  puts ("  Please also read the bug reporting guidelines at\n");
-  puts ("\n");
-  puts ("    http://www.octave.org/bugs.html\n");
-  puts ("\n");
-  puts ("  to learn how to submit useful bug reports that will\n");
-  puts ("  help the Octave community diagnose and fix the problem\n");
-  puts ("  quickly and efficiently.\n");
-  puts ("\n");
+  disp (" ");
+  disp ("  Bug reports play an essential role in making Octave");
+  disp ("  reliable.  Please use the Octave bug tracker at");
+  disp (" ");
+  disp ("    http://bugs.octave.org");
+  disp (" ");
+  disp ("  to report problems.");
+  disp (" ");
+  disp ("  Please also read the bug reporting guidelines at");
+  disp (" ");
+  disp ("    http://www.octave.org/bugs.html");
+  disp (" ");
+  disp ("  to learn how to submit useful bug reports that will");
+  disp ("  help the Octave community diagnose and fix the problem");
+  disp ("  quickly and efficiently.");
+  disp (" ");
 
 endfunction
 
--- a/scripts/miscellaneous/bunzip2.m
+++ b/scripts/miscellaneous/bunzip2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Bill Denney
+## Copyright (C) 2006-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -17,27 +17,39 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} bunzip2 (@var{bzfile})
-## @deftypefnx {Function File} {} bunzip2 (@var{bzfile}, @var{dir})
-## Unpack the bzip2 archive @var{bzfile} to the directory @var{dir}.  If
-## @var{dir} is not specified, it defaults to the current directory.
+## @deftypefn  {Function File} {@var{filelist} =} bunzip2 (@var{bzfile})
+## @deftypefnx {Function File} {@var{filelist} =} bunzip2 (@var{bzfile}, @var{dir})
+## Unpack the bzip2 archive @var{bzfile}.
+##
+## If @var{dir} is specified the files are unpacked in this directory rather
+## than the one where @var{bzfile} is located.
+##
+## The optional output @var{filelist} is a list of the uncompressed files.
 ## @seealso{bzip2, unpack, gunzip, unzip, untar}
 ## @end deftypefn
 
 ## Author: Bill Denney <denney@seas.upenn.edu>
 
-function varargout = bunzip2 (bzfile, dir = ".")
+function filelist = bunzip2 (bzfile, dir = [])
 
-  if (nargin != 1 && nargin != 2)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
+  if (isempty (dir))
+    dir = fileparts (bzfile);
+  endif
+
   if (nargout > 0)
-    varargout = cell (1, nargout);
-    [varargout{:}] = unpack (bzfile, dir, mfilename ());
+    filelist = unpack (bzfile, dir, "bunzip2");
   else
-    unpack (bzfile, dir, mfilename ());
+    unpack (bzfile, dir, "bunzip2");
   endif
 
 endfunction
 
+
+## Tests for this m-file are located in bzip2.m
+## Remove from test statistics
+%!assert (1)
+
--- a/scripts/miscellaneous/bzip2.m
+++ b/scripts/miscellaneous/bzip2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Thorsten Meyer
+## Copyright (C) 2008-2015 Thorsten Meyer
 ## (based on gzip.m by David Bateman)
 ##
 ## This file is part of Octave.
@@ -18,46 +18,71 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{entries} =} bzip2 (@var{files})
-## @deftypefnx {Function File} {@var{entries} =} bzip2 (@var{files}, @var{outdir})
+## @deftypefn  {Function File} {@var{filelist} =} bzip2 (@var{files})
+## @deftypefnx {Function File} {@var{filelist} =} bzip2 (@var{files}, @var{dir})
 ## Compress the list of files specified in @var{files}.
-## Each file is compressed separately and a new file with a @file{".bz2"}
-## extension is created.  The original files are not modified.  Existing
-## compressed files are silently overwritten.  If @var{outdir} is defined the
-## compressed files are placed in this directory.
-## @seealso{bunzip2, gzip, zip, tar}
+##
+## @var{files} is a character array or cell array of strings.  Shell
+## wildcards in the filename such as @samp{*} or @samp{?} are accepted and
+## expanded.  Each file is compressed separately and a new file with a
+## @file{".bz2"} extension is created.  The original files are not modified,
+## but existing compressed files will be silently overwritten.
+##
+## If @var{dir} is defined the compressed files are placed in this directory,
+## rather than the original directory where the uncompressed file resides.
+## If @var{dir} does not exist it is created.
+##
+## The optional output @var{filelist} is a list of the compressed files.
+## @seealso{bunzip2, unpack, gzip, zip, tar}
 ## @end deftypefn
 
-function entries = bzip2 (varargin)
+function filelist = bzip2 (varargin)
 
-  if (nargin == 1 || nargin == 2)
-    if (nargout == 0)
-      __xzip__ ("bzip2", "bz2", "bzip2 %s", varargin{:});
-    else
-      entries = __xzip__ ("bzip2", "bz2", "bzip2 %s", varargin{:});
-    endif
+  if (nargin < 1 || nargin > 2 || nargout > 1)
+    print_usage ();
+  endif
+
+  if (nargout == 0)
+    __xzip__ ("bzip2", "bz2", "bzip2 %s", varargin{:});
   else
-    print_usage ();
+    filelist = __xzip__ ("bzip2", "bz2", "bzip2 %s", varargin{:});
   endif
 
 endfunction
 
 
 %!xtest
-%! ## test for correct cleanup of temporary files
+%! ## test bzip2 together with bunzip2
 %! unwind_protect
-%!   filename = tmpnam;
-%!   dummy    = 1;
+%!   filename = tempname;
+%!   dummy    = pi;
 %!   save (filename, "dummy");
-%!   n_tmpfiles_before = length (find (strncmp ("oct-", cellstr (ls (tempdir)), 4)));
-%!   entry = bzip2 (filename);
-%!   n_tmpfiles_after = length (find (strncmp ("oct-", cellstr (ls (tempdir)), 4)));
-%!   if (n_tmpfiles_before != n_tmpfiles_after)
-%!     error ("bzip2 has not cleaned up temporary files correctly!");
+%!   dirname  = tempname;
+%!   mkdir (dirname);
+%!   filelist = bzip2 (filename, dirname);
+%!   filelist = filelist{1};
+%!   [~, basename, extension] = fileparts (filename);
+%!   if (! strcmp (filelist, [dirname, filesep, basename, extension, ".bz2"]))
+%!     error ("bzipped file does not match expected name!");
+%!   endif
+%!   if (! exist (filelist, "file"))
+%!     error ("bzipped file cannot be found!");
+%!   endif
+%!   bunzip2 (filelist);
+%!   fid = fopen (filename, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen ([dirname filesep basename extension], "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("bunzipped file not equal to original file!");
 %!   endif
 %! unwind_protect_cleanup
 %!   delete (filename);
-%!   [path, basename, extension] = fileparts (filename);
-%!   delete ([basename, extension, ".bz2"]);
+%!   delete ([dirname, filesep, basename, extension]);
+%!   rmdir (dirname);
 %! end_unwind_protect
 
--- a/scripts/miscellaneous/cast.m
+++ b/scripts/miscellaneous/cast.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,30 +17,82 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} cast (@var{val}, @var{type})
+## @deftypefn {Function File} {} cast (@var{val}, "@var{type}")
 ## Convert @var{val} to data type @var{type}.
-## @seealso{int8, uint8, int16, uint16, int32, uint32, int64, uint64, double}
+##
+## @var{val} must be one of the numeric classes:
+##
+## @example
+## @group
+## "double"
+## "single"
+## "logical"
+## "char"
+## "int8"
+## "int16"
+## "int32"
+## "int64"
+## "uint8"
+## "uint16"
+## "uint32"
+## "uint64"
+## @end group
+## @end example
+##
+## The value @var{val} may be modified to fit within the range of the new type.
+##
+## Examples:
+##
+## @example
+## @group
+## cast (-5, "uint8")
+##    @result{} 0
+## cast (300, "int8")
+##    @result{} 127
+## @end group
+## @end example
+##
+## @seealso{typecast, int8, uint8, int16, uint16, int32, uint32, int64, uint64, double, single, logical, char, class, typeinfo}
 ## @end deftypefn
 
 ## Author: jwe
 
-function retval = cast (val, typ)
+function retval = cast (val, type)
 
-  if (nargin == 2)
-    if (ischar (typ))
-      if (any (strcmp (typ, {"int8"; "uint8"; "int16"; "uint16";
-                             "int32"; "uint32"; "int64"; "uint64";
-                             "double"; "single"; "logical"; "char"})))
-        retval = feval (typ, val);
-      else
-        error ("cast: type name '%s' is not a built-in type", typ);
-      endif
-    else
-      error ("cast: expecting TYPE name as second argument");
-    endif
-  else
+  if (nargin != 2)
     print_usage ();
   endif
 
+  if (! ischar (type))
+    error ("cast: TYPE must be a string");
+  elseif (! any (strcmp (type, {"int8"; "uint8"; "int16"; "uint16";
+                                "int32"; "uint32"; "int64"; "uint64";
+                                "double"; "single"; "logical"; "char"})))
+    error ("cast: TYPE '%s' is not a built-in type", type);
+  endif
+
+  retval = feval (type, val);
+
 endfunction
 
+
+%!assert (cast (single (2.5), "double"), 2.5)
+%!assert (cast (2.5, "single"), single (2.5))
+%!assert (cast ([5 0 -5], "logical"), [true false true])
+%!assert (cast ([65 66 67], "char"), "ABC")
+%!assert (cast ([-2.5 1.1 2.5], "int8"), int8 ([-3 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "uint8"), uint8 ([0 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "int16"), int16 ([-3 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "uint16"), uint16 ([0 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "int32"), int32 ([-3 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "uint32"), uint32 ([0 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "int64"), int64 ([-3 1 3]))
+%!assert (cast ([-2.5 1.1 2.5], "uint64"), uint64 ([0 1 3]))
+
+## Test input validation
+%!error cast ()
+%!error cast (1)
+%!error cast (1,2,3)
+%!error <TYPE 'foobar' is not a built-in type> cast (1, "foobar")
+%!error <TYPE must be a string> cast (1, {"foobar"})
+
--- a/scripts/miscellaneous/citation.m
+++ b/scripts/miscellaneous/citation.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -47,7 +47,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error citation (1, 2)
 %!error <citation: PACKAGE must be a string> citation (1)
 %!error <citation: package .* is not installed> citation ("__NOT_A_VALID_PKG_NAME__")
deleted file mode 100644
--- a/scripts/miscellaneous/colon.m
+++ /dev/null
@@ -1,46 +0,0 @@
-## Copyright (C) 2008-2013 David Bateman
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{r} =} colon (@var{a}, @var{b})
-## @deftypefnx {Function File} {@var{r} =} colon (@var{a}, @var{b}, @var{c})
-## Method of a class to construct a range with the @code{:} operator.  For
-## example:
-##
-## @example
-## @group
-## a = myclass (@dots{});
-## b = myclass (@dots{});
-## c = a : b
-## @end group
-## @end example
-##
-## @seealso{class, subsref, subsasgn}
-## @end deftypefn
-
-function r = colon (varargin)
-  if (nargin != 0)
-    error ('colon: not defined for class "%s"', class (varargin{1}));
-  endif
-endfunction
-
-
-%!error colon (1)
-
-## FIXME -- what does colon () mean since it doesn't set a return value?
-
--- a/scripts/miscellaneous/comma.m
+++ b/scripts/miscellaneous/comma.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/compare_versions.m
+++ b/scripts/miscellaneous/compare_versions.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Bill Denney
+## Copyright (C) 2006-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -80,87 +80,68 @@
 
   ## Make sure that the version numbers are valid.
   if (! (ischar (v1) && ischar (v2)))
-    error ("compare_versions: both version numbers must be strings");
+    error ("compare_versions: version numbers V1 and V2 must be strings");
   elseif (rows (v1) != 1 || rows (v2) != 1)
-    error ("compare_versions: version numbers must be a single row");
+    error ("compare_versions: version numbers V1 and V2 must be a single row");
   endif
 
   ## check and make sure that the operator is valid
   if (! ischar (operator))
-    error ("compare_versions: OPERATOR must be a character string");
+    error ("compare_versions: OPERATOR must be a string");
   elseif (numel (operator) > 2)
     error ("compare_versions: OPERATOR must be 1 or 2 characters long");
   endif
 
-  ## trim off any character data that is not part of a normal version
-  ## number
-  numbers = "0123456789.";
+  ## trim off any character data that is not part of a normal version number
+  v1firstchar = find (! (isdigit (v1) | v1 == "."), 1);
+  v2firstchar = find (! (isdigit (v2) | v2 == "."), 1);
 
-  v1firstchar = find (! ismember (v1, numbers), 1);
-  v2firstchar = find (! ismember (v2, numbers), 1);
-  if (! isempty (v1firstchar))
-    v1c = v1(v1firstchar:length (v1));
-    v1nochar = v1(1:v1firstchar-1);
-  else
+  if (isempty (v1firstchar))
     v1c = "";
     v1nochar = v1;
+  else
+    v1c = v1(v1firstchar:end);
+    v1nochar = v1(1:v1firstchar-1);
   endif
-  if (! isempty (v2firstchar))
-    v2c = v2(v2firstchar:length (v2));
-    v2nochar = v2(1:v2firstchar-1);
-  else
+  if (isempty (v2firstchar))
     v2c = "";
     v2nochar = v2;
-  endif
-
-  v1n = str2num (char (ostrsplit (v1nochar, ".")));
-  v2n = str2num (char (ostrsplit (v2nochar, ".")));
-  if ((isempty (v1n) && isempty (v1c)) || (isempty (v2n) && isempty (v2c)))
-    error ("compare_versions: given version strings are not valid: %s %s",
-           v1, v2);
+  else
+    v2c = v2(v2firstchar:end);
+    v2nochar = v2(1:v2firstchar-1);
   endif
 
-  ## Assume that any additional elements would be 0 if one is longer
-  ## than the other.
-  maxnumlen = max ([length(v1n) length(v2n)]);
-  if (length (v1n) < maxnumlen)
-    v1n(length(v1n)+1:maxnumlen) = 0;
+  v1n = str2double (ostrsplit (v1nochar, ".")');
+  if (isnan (v1n))
+    v1n = [];
   endif
-  if (length (v2n) < maxnumlen)
-    v2n(length(v2n)+1:maxnumlen) = 0;
+  v2n = str2double (ostrsplit (v2nochar, ".")');
+  if (isnan (v2n))
+    v2n = [];
   endif
 
-  ## Assume that any additional character elements would be 0 if one is
-  ## longer than the other.
+  if (isempty (v1n) && isempty (v1c))
+    error ("compare_versions: version string V1 is not valid: %s", v1);
+  elseif (isempty (v2n) && isempty (v2c))
+    error ("compare_versions: version string V2 is not valid: %s", v2);
+  endif
+
+  ## Assume any additional elements would be 0 if one is longer than the other.
+  maxnumlen = max ([length(v1n) length(v2n)]);
+  v1n(end+1:maxnumlen) = 0;
+  v2n(end+1:maxnumlen) = 0;
+
+  ## Assume any additional character elements would be 0,
+  ## if one is longer than the other.
   maxcharlen = max ([length(v1c), length(v2c)]);
-  if (length (v1c) < maxcharlen)
-    v1c(length(v1c)+1:maxcharlen) = "\0";
-  endif
-  if (length (v2c) < maxcharlen)
-    v2c(length(v2c)+1:maxcharlen) = "\0";
-  endif
+  v1c(end+1:maxcharlen) = "\0";
+  v2c(end+1:maxcharlen) = "\0";
 
   ## Determine the operator.
-  if (any (ismember (operator, "=")))
-    equal_op = true;
-  else
-    equal_op = false;
-  endif
-  if (any (ismember (operator, "~!")))
-    not_op = true;
-  else
-    not_op = false;
-  endif
-  if (any (ismember (operator, "<")))
-    lt_op = true;
-  else
-    lt_op = false;
-  endif
-  if (any (ismember (operator, ">")))
-    gt_op = true;
-  else
-    gt_op = false;
-  endif
+  equal_op = any (operator == "=");
+  not_op = any (operator == "!" | operator == "~");
+  lt_op = any (operator == "<");
+  gt_op = any (operator == ">");
 
   ## Make sure that we don't have conflicting operators.
   if (gt_op && lt_op)
@@ -168,9 +149,9 @@
   elseif ((gt_op || lt_op) && not_op)
     error ("compare_versions: OPERATOR cannot contain not and greater than or less than symbols");
   elseif (strcmp (operator, "="))
-    error ("compare_versions: equality OPERATOR is \"==\", not \"=\"");
+    error ('compare_versions: equality OPERATOR is "==", not "="');
   elseif (! (equal_op || not_op || lt_op || gt_op))
-    error ("compare_versions: No valid OPERATOR specified");
+    error ("compare_versions: no valid OPERATOR specified");
   endif
 
   ## Compare the versions (making sure that they're the same shape)
@@ -180,7 +161,7 @@
     ## so that we only need to check for the output being greater than 1
     vcmp = -vcmp;
   endif
-  firstdiff = find (vcmp != 0, 1);
+  firstdiff = find (vcmp, 1);
 
   if (isempty (firstdiff))
     ## They're equal.
@@ -241,13 +222,23 @@
 %!assert (compare_versions ("0.1", "0.1", "!="), false)
 %!assert (compare_versions ("0.1", "0.1", "~="), false)
 
-%% Test input validation
-%!error (compare_versions (0.1, "0.1", "=="))
-%!error (compare_versions ("0.1", 0.1, "=="))
-%!error (compare_versions (["0";".";"1"], "0.1", "=="))
-%!error (compare_versions ("0.1", ["0";".";"1"], "=="))
-%!error (compare_versions ("0.1", "0.1", "<>"))
-%!error (compare_versions ("0.1", "0.1", "!>"))
-%!error (compare_versions ("0.1", "0.1", "="))
-%!error (compare_versions ("0.1", "0.1", "aa"))
+## Test input validation
+%!error compare_versions ()
+%!error compare_versions (1)
+%!error compare_versions (1,2)
+%!error compare_versions (1,2,3,4)
+%!error <V1 and V2 must be strings> compare_versions (0.1, "0.1", "==")
+%!error <V1 and V2 must be strings> compare_versions ("0.1", 0.1, "==")
+%!error <V1 and V2 must be a single row> compare_versions (["0";".";"1"], "0.1", "==")
+%!error <V1 and V2 must be a single row> compare_versions ("0.1", ["0";".";"1"], "==")
+%!error <OPERATOR must be a string> compare_versions ("0.1", "0.1", 1)
+%!error <OPERATOR must be 1 or 2> compare_versions ("0.1", "0.1", "==>")
+%!error <V1 is not valid> compare_versions (".", "0.1", "==")
+%!error <V2 is not valid> compare_versions ("0.1", ".", "==")
 
+%!error <cannot contain both greater and less than> compare_versions ("0.1", "0.1", "<>")
+%!error <cannot contain not and greater than> compare_versions ("0.1", "0.1", "!>")
+%!error <cannot contain not and greater than> compare_versions ("0.1", "0.1", "!<")
+%!error <equality OPERATOR is "=="> compare_versions ("0.1", "0.1", "=")
+%!error <no valid OPERATOR> compare_versions ("0.1", "0.1", "aa")
+
--- a/scripts/miscellaneous/computer.m
+++ b/scripts/miscellaneous/computer.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,45 +17,49 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{c}, @var{maxsize}, @var{endian}] =} computer ()
+## @deftypefn  {Function File} {} computer ()
+## @deftypefnx {Function File} {@var{c} =} computer ()
+## @deftypefnx {Function File} {[@var{c}, @var{maxsize}] =} computer ()
+## @deftypefnx {Function File} {[@var{c}, @var{maxsize}, @var{endian}] =} computer ()
 ## @deftypefnx {Function File} {@var{arch} =} computer ("arch")
 ## Print or return a string of the form @var{cpu}-@var{vendor}-@var{os}
-## that identifies the kind of computer Octave is running on.  If invoked
-## with an output argument, the value is returned instead of printed.  For
-## example:
+## that identifies the type of computer that Octave is running on.
+##
+## If invoked with an output argument, the value is returned instead of
+## printed.  For example:
 ##
 ## @example
 ## @group
 ## computer ()
 ##    @print{} i586-pc-linux-gnu
 ##
-## x = computer ()
-##    @result{} x = "i586-pc-linux-gnu"
+## mycomp = computer ()
+##    @result{} mycomp = "i586-pc-linux-gnu"
 ## @end group
 ## @end example
 ##
 ## If two output arguments are requested, also return the maximum number
-## of elements for an array.
+## of elements for an array.  This will depend on whether Octave has been
+## compiled with 32-bit or 64-bit index vectors.
 ##
 ## If three output arguments are requested, also return the byte order
 ## of the current system as a character (@qcode{"B"} for big-endian or
 ## @qcode{"L"} for little-endian).
 ##
-## If the argument @qcode{"arch"} is specified, return a string
-## indicating the architecture of the computer on which Octave is
-## running.
+## If the argument @qcode{"arch"} is specified, return a string indicating the
+## architecture of the computer on which Octave is running.
+## @seealso{isunix, ismac, ispc}
 ## @end deftypefn
 
 function [c, maxsize, endian] = computer (a)
 
-  if (nargin == 1 && ischar (a) && strcmpi (a, "arch"))
-    tmp = ostrsplit (octave_config_info ("canonical_host_type"), "-");
-    if (numel (tmp) == 4)
-      c = sprintf ("%s-%s-%s", tmp{4}, tmp{3}, tmp{1});
-    else
-      c = sprintf ("%s-%s", tmp{3}, tmp{1});
-    endif
-  elseif (nargin == 0)
+  if (nargin > 1)
+    print_usage ();
+  elseif (nargin == 1 && ! strcmpi (a, "arch"))
+    error ('computer: "arch" is only valid argument');
+  endif
+
+  if (nargin == 0)
     msg = octave_config_info ("canonical_host_type");
 
     if (strcmp (msg, "unknown"))
@@ -63,24 +67,35 @@
     endif
 
     if (nargout == 0)
-      printf ("%s\n", msg);
+      disp (msg);
     else
       c = msg;
-      if (strcmp (octave_config_info ("USE_64_BIT_IDX_T"), "true"))
-        maxsize = 2^63-1;
-      else
-        maxsize = 2^31-1;
+      if (isargout (2))
+        if (strcmp (octave_config_info ("USE_64_BIT_IDX_T"), "true"))
+          maxsize = 2^63-1;
+        else
+          maxsize = 2^31-1;
+        endif
       endif
-      if (octave_config_info ("words_big_endian"))
-        endian = "B";
-      elseif (octave_config_info ("words_little_endian"))
-        endian = "L";
-      else
-        endian = "?";
+      if (isargout (3))
+        if (octave_config_info ("words_big_endian"))
+          endian = "B";
+        elseif (octave_config_info ("words_little_endian"))
+          endian = "L";
+        else
+          endian = "?";
+        endif
       endif
     endif
   else
-    print_usage ();
+    ## "arch" argument asked for
+    tmp = ostrsplit (octave_config_info ("canonical_host_type"), "-");
+    if (numel (tmp) == 4)
+      c = sprintf ("%s-%s-%s", tmp{4}, tmp{3}, tmp{1});
+    else
+      c = sprintf ("%s-%s", tmp{3}, tmp{1});
+    endif
+
   endif
 
 endfunction
@@ -90,5 +105,6 @@
 %!assert (computer (), octave_config_info ("canonical_host_type"))
 %!assert (ischar (computer ("arch")))
 
-%!error computer (2)
+%!error computer (1,2)
+%!error <"arch" is only valid argument> computer ("xyz")
 
--- a/scripts/miscellaneous/copyfile.m
+++ b/scripts/miscellaneous/copyfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,11 +19,12 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {[@var{status}, @var{msg}, @var{msgid}] =} copyfile (@var{f1}, @var{f2})
 ## @deftypefnx {Function File} {[@var{status}, @var{msg}, @var{msgid}] =} copyfile (@var{f1}, @var{f2}, 'f')
-## Copy the file @var{f1} to the destination @var{f2}.
+## Copy the source files or directories @var{f1} to the destination @var{f2}.
 ##
 ## The name @var{f1} may contain globbing patterns.  If @var{f1} expands to
 ## multiple file names, @var{f2} must be a directory.
-## when the force flag @qcode{'f'} is given any existing files will be
+##
+## When the force flag @qcode{'f'} is given any existing files will be
 ## overwritten without prompting.
 ##
 ## If successful, @var{status} is 1, and @var{msg}, @var{msgid} are empty
@@ -45,8 +46,8 @@
   msg = "";
   msgid = "";
 
-  ## FIXME: maybe use the same method as in ls to allow users control
-  ## over the command that is executed.
+  ## FIXME: Maybe use the same method as in ls to allow users control
+  ##        over the command that is executed.
 
   if (ispc () && ! isunix ()
       && isempty (file_in_path (getenv ("PATH"), "cp.exe")))
@@ -59,26 +60,22 @@
   endif
 
   ## Input type check.
-  if (! (ischar (f1) || iscellstr (f1)))
-    error ("copyfile: F1 must be a character string or a cell array of character strings");
+  if (ischar (f1))
+    f1 = cellstr (f1);
+  elseif (! iscellstr (f1))
+    error ("copyfile: F1 must be a string or a cell array of strings");
   endif
-
   if (! ischar (f2))
-    error ("copyfile: F2 must be a character string");
+    error ("copyfile: F2 must be a string");
   endif
 
   if (nargin == 3 && strcmp (force, "f"))
     cmd = [cmd " " cmd_force_flag];
   endif
 
-  ## If f1 isn't a cellstr convert it to one.
-  if (ischar (f1))
-    f1 = cellstr (f1);
-  endif
-
-  ## If f1 has more than 1 element f2 must be a directory
+  ## If f1 has more than 1 element then f2 must be a directory
   isdir = (exist (f2, "dir") != 0);
-  if (length (f1) > 1 && ! isdir)
+  if (numel (f1) > 1 && ! isdir)
     error ("copyfile: when copying multiple files, F2 must be a directory");
   endif
 
@@ -132,3 +129,36 @@
 
 endfunction
 
+
+%!test
+%! unwind_protect
+%!   f1 = tempname;
+%!   tmp_var = pi;
+%!   save (f1, "tmp_var");
+%!   f2 = tempname;
+%!   assert (copyfile (f1, f2));
+%!   assert (exist (f2, "file"));
+%!   fid = fopen (f1, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen (f2, "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("copied file not equal to original file!");
+%!   endif
+%! unwind_protect_cleanup
+%!   delete (f1);
+%!   delete (f2);
+%! end_unwind_protect
+
+## Test input validation
+%!error copyfile ()
+%!error copyfile (1)
+%!error copyfile (1,2,3,4)
+%!error <F1 must be a string> copyfile (1, "foobar")
+%!error <F2 must be a string> copyfile ("foobar", 1)
+%!error <F2 must be a directory> copyfile ({"a", "b"}, "%_NOT_A_DIR_%")
+
--- a/scripts/miscellaneous/debug.m
+++ b/scripts/miscellaneous/debug.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -18,8 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} debug ()
-## Summary of debugging commands.  For more information on each command
-## and available options use @code{help CMD}.
+## Summary of debugging commands.
+##
+## For more information on each command and available options use
+## @code{help CMD}.
 ##
 ## The debugging commands available in Octave are
 ##
@@ -96,3 +98,7 @@
   help ("debug");
 endfunction
 
+
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
+
--- a/scripts/miscellaneous/delete.m
+++ b/scripts/miscellaneous/delete.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,37 +18,47 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} delete (@var{file})
+## @deftypefnx {Function File} {} delete (@var{file1}, @var{file2}, @dots{})
 ## @deftypefnx {Function File} {} delete (@var{handle})
 ## Delete the named file or graphics handle.
 ##
-## Deleting graphics objects is the proper way to remove
+## @var{file} may contain globbing patterns such as @samp{*}.  Multiple files
+## to be deleted may be specified in the same function call.
+##
+## @var{handle} may be a scalar or vector of graphic handles to delete.
+##
+## Programming Note: Deleting graphics objects is the proper way to remove
 ## features from a plot without clearing the entire figure.
-## @seealso{clf, cla, unlink}
+## @seealso{clf, cla, unlink, rmdir}
 ## @end deftypefn
 
 ## Author: jwe
 
-function delete (arg)
+function delete (varargin)
 
-  if (nargin != 1)
+  if (nargin == 0)
     print_usage ();
   endif
 
-  if (ischar (arg))
-    files = glob (arg);
-    if (isempty (files))
-      warning ("delete: no such file: %s", arg);
-    endif
-    for i = 1:length (files)
-      file = files{i};
-      [err, msg] = unlink (file);
-      if (err)
-        warning ("delete: %s: %s", file, msg);
+  if (iscellstr (varargin))
+    for arg = varargin
+      files = glob (arg{1});
+      if (isempty (files))
+        warning ("delete: no such file: %s", arg{1});
       endif
+      for i = 1:length (files)
+        file = files{i};
+        [err, msg] = unlink (file);
+        if (err)
+          warning ("delete: %s: %s", file, msg);
+        endif
+      endfor
     endfor
-  elseif (all (ishandle (arg(:))))
+
+  elseif (isscalar (varargin) && all (ishandle (varargin{1}(:))))
     ## Delete a graphics object.
-    __go_delete__ (arg);
+    __go_delete__ (varargin{1});
+
   else
     error ("delete: first argument must be a filename or graphics handle");
   endif
@@ -56,8 +66,30 @@
 endfunction
 
 
-%% Test input validation
+%!test
+%! unwind_protect
+%!   file = tempname;
+%!   tmp_var = pi;
+%!   save (file, "tmp_var");
+%!   assert (exist (file, "file"));
+%!   delete (file);
+%!   assert (! exist (file, "file"));
+%! unwind_protect_cleanup
+%!   unlink (file);
+%! end_unwind_protect
+
+%!test
+%! unwind_protect
+%!   hf = figure ("visible", "off");
+%!   hl = plot (1:10);
+%!   assert (get (gca, "children"), hl);
+%!   delete (hl);
+%!   assert (get (gca, "children"), zeros (0,1));
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
+## Test input validation
 %!error delete ()
-%!error delete (1, 2)
 %!error <first argument must be a filename> delete (struct ())
 
--- a/scripts/miscellaneous/desktop.m
+++ b/scripts/miscellaneous/desktop.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 John W. Eaton
+## Copyright (C) 2013-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,7 +17,7 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} @var{used} = desktop ("-inuse")
+## @deftypefn {Function File} {@var{used} =} desktop ("-inuse")
 ## Return true if the desktop (GUI) is currently in use.
 ## @seealso{isguirunning}
 ## @end deftypefn
--- a/scripts/miscellaneous/dir.m
+++ b/scripts/miscellaneous/dir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -51,21 +51,21 @@
 ## than a single directory or file.
 ##
 ## @var{directory} is subject to shell expansion if it contains any wildcard
-## characters @samp{*}, @samp{?}, @samp{[]}.  If you want to find a
-## literal example of a wildcard character you must escape it using the
-## backslash operator @samp{\}.
+## characters @samp{*}, @samp{?}, @samp{[]}.  To find a literal example of a
+## wildcard character the wildcard must be escaped using the backslash operator
+## @samp{\}.
 ##
 ## Note that for symbolic links, @code{dir} returns information about
 ## the file that the symbolic link points to rather than the link itself.
 ## However, if the link points to a nonexistent file, @code{dir} returns
 ## information about the link.
-## @seealso{ls, readdir, glob, what, stat}
+## @seealso{ls, readdir, glob, what, stat, lstat}
 ## @end deftypefn
 
 ## Author: jwe
 
-## FIXME: This is quite slow for large directories, so perhaps
-##        it should be converted to C++.
+## FIXME: This is quite slow for large directories.
+##        Perhaps it should be converted to C++?
 
 function retval = dir (directory)
 
@@ -75,79 +75,78 @@
     print_usage ();
   endif
 
+  if (! ischar (directory))
+    error ("dir: DIRECTORY argument must be a string");
+  endif
+
   ## Prep the retval.
   info = struct (zeros (0, 1),
                  {"name", "date", "bytes", "isdir", "datenum", "statinfo"});
 
-  if (ischar (directory))
-    if (strcmp (directory, "*"))
-      directory = ".";
-    endif
-    if (strcmp (directory, "."))
-      flst = {"."};
-      nf = 1;
-    else
-      flst = glob (directory);
-      nf = length (flst);
-    endif
 
-    ## Determine the file list for the case where a single directory is
-    ## specified.
-    if (nf == 1)
-      fn = flst{1};
-      [st, err, msg] = stat (fn);
-      if (err < 0)
-        warning ("dir: 'stat (%s)' failed: %s", fn, msg);
-        nf = 0;
-      elseif (S_ISDIR (st.mode))
-        flst = readdir (flst{1});
-        nf = length (flst);
-        for i = 1:nf
-          flst{i} = fullfile (fn, flst{i});
-        endfor
-      endif
-    endif
+  if (strcmp (directory, "*"))
+    directory = ".";
+  endif
+  if (strcmp (directory, "."))
+    flst = {"."};
+    nf = 1;
+  else
+    flst = glob (directory);
+    nf = numel (flst);
+  endif
 
-    if (length (flst) > 0)
-      ## Collect results.
-      for i = nf:-1:1
-        fn = flst{i};
-        [st, err, msg] = lstat (fn);
-        if (err < 0)
-          warning ("dir: 'lstat (%s)' failed: %s", fn, msg);
-        else
-          ## If we are looking at a link that points to something,
-          ## return info about the target of the link, otherwise, return
-          ## info about the link itself.
-          if (S_ISLNK (st.mode))
-            [xst, err, msg] = stat (fn);
-            if (! err)
-              st = xst;
-            endif
-          endif
-          [dummy, fn, ext] = fileparts (fn);
-          fn = [fn ext];
-          info(i,1).name = fn;
-          lt = localtime (st.mtime);
-          info(i,1).date = strftime ("%d-%b-%Y %T", lt);
-          info(i,1).bytes = st.size;
-          info(i,1).isdir = S_ISDIR (st.mode);
-          info(i,1).datenum = datenum (lt.year + 1900, lt.mon + 1, lt.mday,
-                                       lt.hour, lt.min, lt.sec);
-          info(i,1).statinfo = st;
-        endif
+  ## Determine the file list for the case where a single directory is specified.
+  if (nf == 1)
+    fn = flst{1};
+    [st, err, msg] = stat (fn);
+    if (err < 0)
+      warning ("dir: 'stat (%s)' failed: %s", fn, msg);
+      nf = 0;
+    elseif (S_ISDIR (st.mode))
+      flst = readdir (flst{1});
+      nf = numel (flst);
+      for i = 1:nf
+        flst{i} = fullfile (fn, flst{i});
       endfor
     endif
+  endif
 
-  else
-    error ("dir: expecting directory or filename to be a char array");
+  if (numel (flst) > 0)
+    ## Collect results.
+    for i = nf:-1:1
+      fn = flst{i};
+      [st, err, msg] = lstat (fn);
+      if (err < 0)
+        warning ("dir: 'lstat (%s)' failed: %s", fn, msg);
+      else
+        ## If we are looking at a link that points to something,
+        ## return info about the target of the link, otherwise, return
+        ## info about the link itself.
+        if (S_ISLNK (st.mode))
+          [xst, err, msg] = stat (fn);
+          if (! err)
+            st = xst;
+          endif
+        endif
+        [dummy, fn, ext] = fileparts (fn);
+        fn = [fn ext];
+        info(i,1).name = fn;
+        lt = localtime (st.mtime);
+        info(i,1).date = strftime ("%d-%b-%Y %T", lt);
+        info(i,1).bytes = st.size;
+        info(i,1).isdir = S_ISDIR (st.mode);
+        info(i,1).datenum = datenum (lt.year + 1900, lt.mon + 1, lt.mday,
+                                     lt.hour, lt.min, lt.sec);
+        info(i,1).statinfo = st;
+      endif
+    endfor
   endif
 
   ## Return the output arguments.
   if (nargout > 0)
     ## Return the requested structure.
     retval = info;
-  elseif (length (info) > 0)
+  elseif (numel (info) > 0)
     ## Print the structure to the screen.
     printf ("%s", list_in_columns ({info.name}));
   else
@@ -156,3 +155,26 @@
 
 endfunction
 
+
+%!test
+%! list = dir ();
+%! assert (isstruct (list) && ! isempty (list));
+%! assert (fieldnames (list),
+%!         {"name"; "date"; "bytes"; "isdir"; "datenum"; "statinfo"});
+%!
+%! if (isunix ())
+%!   assert ({list(1:2).name}, {".", ".."});
+%!   assert ([list(1:2).isdir], [true true]);
+%! endif
+%!
+%! ## test that specifying a filename works the same as using a directory.
+%! found = find (! [list.isdir], 1);
+%! if (! isempty (found))
+%!   list2 = dir (list(found).name);
+%!   assert (list(found), list2);
+%! endif
+
+## Test input validation
+%!error <DIRECTORY argument must be a string> dir (1)
+%!warning <nonexistent directory> dir ("_%UNLIKELY_DIR_NAME%_");
+
--- a/scripts/miscellaneous/dos.m
+++ b/scripts/miscellaneous/dos.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -21,12 +21,15 @@
 ## @deftypefnx {Function File} {@var{status} =} dos ("@var{command}")
 ## @deftypefnx {Function File} {[@var{status}, @var{text}] =} dos ("@var{command"})
 ## @deftypefnx {Function File} {[@dots{}] =} dos ("@var{command}", "-echo")
-## Execute a system command if running under a Windows-like operating
-## system, otherwise do nothing.  Return the exit status of the program
-## in @var{status} and any output from the command in @var{text}.
+## Execute a system command if running under a Windows-like operating system,
+## otherwise do nothing.
+##
+## Octave waits for the external command to finish before returning the exit
+## status of the program in @var{status} and any output in @var{text}.
+##
 ## When called with no output argument, or the @qcode{"-echo"} argument is
 ## given, then @var{text} is also sent to standard output.
-## @seealso{unix, system, isunix, ispc}
+## @seealso{unix, system, isunix, ismac, ispc}
 ## @end deftypefn
 
 ## Author: octave-forge ???
--- a/scripts/miscellaneous/edit.m
+++ b/scripts/miscellaneous/edit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -23,7 +23,7 @@
 ## Edit the named function, or change editor settings.
 ##
 ## If @code{edit} is called with the name of a file or function as
-## its argument it will be opened in the text editor defined by @code{EDITOR}.
+## its argument it will be opened in the text editor defined by @env{EDITOR}.
 ##
 ## @itemize @bullet
 ## @item
@@ -125,7 +125,8 @@
 
   ## Pick up globals or default them.
 
-  persistent FUNCTION = struct ("HOME", fullfile (default_home, "octave"),
+  persistent FUNCTION = struct ("HOME",
+                                fullfile (get_home_directory (), "octave"),
                                 "AUTHOR", default_user(1),
                                 "EMAIL", [],
                                 "LICENSE", "GPL",
@@ -164,7 +165,7 @@
         return;
       case "HOME"
         if (! isempty (stateval) && stateval(1) == "~")
-          stateval = [ default_home, stateval(2:end) ];
+          stateval = [ get_home_directory, stateval(2:end) ];
         endif
         FUNCTION.HOME = stateval;
         return;
@@ -221,10 +222,10 @@
     if (exist (FUNCTION.HOME, "dir") == 7)
       curr_dir = pwd ();
       unwind_protect
-        chdir (FUNCTION.HOME);
+        cd (FUNCTION.HOME);
         do_edit (FUNCTION.EDITOR, "", FUNCTION.MODE);
       unwind_protect_cleanup
-        chdir (curr_dir);
+        cd (curr_dir);
       end_unwind_protect
     else
       do_edit (FUNCTION.EDITOR, "", FUNCTION.MODE);
@@ -284,7 +285,7 @@
     endif
 
     ## If the file includes a path, it may be an overloaded function.
-    if (! index (file, "@") && index (file, filesep))
+    if (! index (file, "@") && strchr (file, '/\'))
       ## No "@" at the beginning of the file, add to the list.
       numfiles = numel (filelist);
       for n = 1:numfiles
@@ -330,7 +331,7 @@
 
     ## If editing a new file, prompt for creation if gui is running
     if (isguirunning ())
-      if (! __octave_link_edit_file__ (file,"prompt"));
+      if (! __octave_link_edit_file__ (file, "prompt"));
         return;
       endif
     endif
@@ -340,12 +341,22 @@
     ## If in gui-mode, create it before or editor would prompt again.
     fileandpath = file;
     idx = rindex (file, ".");
-    name = file(1:idx-1);
-    ext = file(idx+1:end);
+    if (idx)
+      name = file(1:idx-1);
+      ext = file(idx+1:end);
+    else
+      name = file;
+      ext = "";
+    endif
     if (! any (strcmp (ext, {"cc", "m"})))
       ## Some unknown file.  Create and open it or just open it.
+      if (isempty (ext))
+        fileandpath = [fileandpath ".m"];  # Add .m extension per default
+      endif
       if (isguirunning ())
         ## Write the initial file (if there is anything to write)
+        ## Give user the opportunity to change the file extension
+        fileandpath = uiputfile (fileandpath);
         fid = fopen (fileandpath, "wt");
         if (fid < 0)
           error ("edit: could not create %s", fileandpath);
@@ -507,20 +518,6 @@
 
 endfunction
 
-function retval = default_home ()
-
-  retval = getenv ("HOME");
-  if (isempty (retval))
-    retval = glob ("~");
-    if (! isempty (retval))
-      retval = retval{1};
-    else
-      retval = "";
-    endif
-  endif
-
-endfunction
-
 ## Return the name associated with the current user ID.
 ##
 ## If LONG_FORM is 1, return the full name.  This will be the
@@ -549,12 +546,9 @@
 
 function do_edit (editor, file, mode)
 
-  ## Give the hook function a chance.
-  ## If that fails, fall back on running an editor with the system function.
-
-  status = __octave_link_edit_file__ (file);
-
-  if (! status)
+  if (isguirunning ())
+    __octave_link_edit_file__ (file);
+  else
     system (sprintf (undo_string_escapes (editor), ['"' file '"']), [], mode);
   endif
 
@@ -572,7 +566,7 @@
 %! edit author none
 %! edit email none
 %! edit license none
-%! edit ("editinplace", !s.editinplace)
+%! edit ("editinplace", ! s.editinplace)
 %! if (s.mode(1) == "a")
 %!   edit mode sync
 %! else
--- a/scripts/miscellaneous/error_ids.m
+++ b/scripts/miscellaneous/error_ids.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Juan Pablo Carbajal
+## Copyright (C) 2012-2015 Juan Pablo Carbajal
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
 ##
 ## @item Octave:invalid-indexing
 ## Indicates that a data-type was indexed incorrectly, e.g., real-value index
-## for arrays, non-existent field of a structure.
+## for arrays, nonexistent field of a structure.
 ##
 ## @item Octave:bad-alloc
 ## Indicates that memory couldn't be allocated.
@@ -46,12 +46,11 @@
 ## @end table
 ##
 
-
 function error_ids ()
   help ("error_ids");
 endfunction
 
 
-## Remove from test statistics.  No real tests possible
+## Mark file as being tested.  No real test needed for a documentation .m file
 %!assert (1)
 
--- a/scripts/miscellaneous/fact.m
+++ b/scripts/miscellaneous/fact.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Jordi Gutiérrez Hermoso
+## Copyright (C) 2007-2015 Jordi Gutiérrez Hermoso
 ## Copyright (C) 2007 Stallmanfacts.com
 ##
 ## This file is part of Octave.
@@ -19,255 +19,256 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} fact
-## @deftypefnx {Function File} {T =} fact()
+## @deftypefnx {Function File} {@var{truth} =} fact ()
 ## Display an amazing and random fact about the world's greatest hacker.
 ## @end deftypefn
 
 
-function f = fact ()
+function truth = fact ()
   persistent wisdom = ...
-      {
-       "Richard Stallman takes notes in binary.";
-       "Richard Stallman doesn't need sudo. I will make him a sandwich anyway.";
-       "Richard Stallman is my shephurd, and I am his GNU.";
-       "Richard Stallman doesn't wget, Richard Stallman wdemands!";
-       "Richard Stallman can touch MC Hammer.";
-       "Richard Stallman doesn't read web pages. They write to him.";
-       "Richard Stallman gets 9 bits to the byte.";
-       "Richard Stallman doesn't really believe in open software, because it's not free enough.";
-       "Richard Stallman can leave neutral or negative feedback on eBay.";
-       "Richard Stallman is the only man alive who can pronounce GNU the way it is meant to be pronounced.";
-       "Richard Stallman does not own a mobile phone because he can fashion a crude convex dish and shout into it at the exact resonant frequency of the ozone, causing a voice to seemingly come from the sky above his intended recipient.";
-       "Richard Stallman is so handsome that when he was young he was responsible for all other geeks not being able to get girls. This is why he has to cover his face with a thick layer of hair.";
-       "Some people check their computers for viruses. Viruses check their computers for Richard Stallman.";
-       "Richard Stallman memorises all his documents. In binary. He just types everything in whenever he needs a document.";
-       "When Richard Stallman makes a sudo command, he loses permissions.";
-       "Richard Stallman's beard is made of parentheses.";
-       "Richard Stallman's DNA is in binary.";
-       "Richard Stallman's nervous system is completely wireless.";
-       "Richard Stallman's brain accepts UNIX commands.";
-       "If Richard Stallman has 1GB of RAM, and if you have 1GB of RAM, Richard Stallman has more RAM than you.";
-       "Richard Stallman eats ethernet cables. That's why they invented wireless.";
-       "Richard Stallman has a katana. 'Nuff said.";
-       "Richard Stallman wrote a program that divides by zero.";
-       "Richard Stallman doesn't use zip drives; he just squeezes the hard drive.";
-       "Richard Stallman's compiler is afraid to report errors.";
-       "Richard Stallman wrote the compiler God used. The Big Bang was the Universe's first segfault.";
-       "Richard Stallman successfully compiled a kernel of popcorn.";
-       "Richard Stallman doesn't write programs; they write themselves out of reverence.";
-       "Richard Stallman can make infinite loops end.";
-       "Richard Stallman's anti-virus programs cures HIV.";
-       "Richard Stallman's computer doesn't have a clock; it defines what time it is.";
-       "Richard Stallman wrote a program to compute the last digit of pi.";
-       "Richard Stallman doesn't use web browsers. He sends a link to a daemon that uses wget to fetch the page and sends it back to him.";
-       "Richard Stallman can solve the halting problem... in polynomial time.";
-       "For Richard Stallman, polynomial time is O(1).";
-       "Richard Stallman didn't \"write\" Emacs or created it in his own image. Richard Stallman made Emacs an instance of himself.";
-       "Richard Stallman can coerce meaningful data from /dev/null.";
-       "Some people wear Linus Torvalds pyjamas to bed, Linus Torvalds wears Richard Stallman pyjamas.";
-       "There is no software development process, only a bunch of programs Richard Stallman allows to exist.";
-       "Richard Stallman spends his leisure time programming with Guile on GNU Hurd.";
-       "Richard Stallman's left and right hands are named \"(\" and \")\" ";
-       "Richard Stallman first words were actually syscalls.";
-       "Richard Stallman didn't create the singularity. He is the singularity. GNU/Linux is only the event horizon.";
-       "When Richard Stallman pipes to more, he gets less ";
-       "Richard Stallman never showers; he runs 'make clean'.";
-       "Richard Stallman needs neither mouse nor keyboard to operate his computer. He just stares it down until it does what he wants.";
-       "Richard Stallman didn't write the GPL. He is the GPL.";
-       "Richard Stallman's pinky finger is really a USB memory stick.";
-       "Richard Stallman called his operating system GNU because he created it before computers existed, when actual gnus were used for calculations.";
-       "In Soviet Russia, Richard Stallman is still Richard Stallman!";
-       "Richard Stallman's flute only plays free music.";
-       "When Richard Stallman uses floats, there are no rounding errors.";
-       "Richard Stallman wrote a program so powerful it knows the question to 42.";
-       "Richard Stallman released his own DNA under GNU FDL.";
-       "Richard Stallman knows the entire Wikipedia by heart, markup included.";
-       "Richard Stallman wrote the HAL9000 OS.";
-       "Richard Stallman's laser pointer is a lightsaber.";
-       "Richard Stallman never steps down; he shifts the universe up.";
-       "Richard Stallman doesn't maintain code; he stares at it until it fixes itself out of reverence.";
-       "Richard Stallman doesn't use an editor; he sets the fundamental constants of the universe so that a magnetic platter with his code on it evolves itself.";
-       "Richard Stallman doesn’t code; he dares the computer to not do his bidding.";
-       "Global warming is caused by Richard Stallman's rage towards non-free software.";
-       "Rather than being birthed like a normal child, Richard Stallman instead instantiated himself polymorphically. Shortly thereafter he grew a beard.";
-       "Richard Stallman discovered extra-terrestrial life but killed them because they distributed non-free software.";
-       "Richard Stallman doesn't evaluate expressions; expressions evaluate to Richard Stallman.";
-       "Richard Stallman can see Russia from his house.";
-       "Richard Stallman proved P=NP, twice!";
-       "Richard Stallman knows of an unfixed bug in TeX.";
-       "Richard Stallman can write a context-free grammar for C.";
-       "Richard Stallman can determine whether an arbitrary program will terminate.";
-       "Richard Stallman's computer has only two buttons. One is for guests.";
-       "Richard Stallman does not actually write programs. He comes up with a length and digit index in pi.";
-       "Richard Stallman's distributed version control system is a flamewar on Usenet.";
-       "Richard Stallman wrote the first version of Emacs on a typewriter.";
-       "Richard Stallman has no known weaknesses, except for a phobia against soap.";
-       "Richard Stallman is not affected by Godwin's Law.";
-       "Richard Stallman can write an anti-virus program that cures HIV. Too bad he never writes anti-virus programs.";
-       "Richard Stallman' facial hair is \"free as in beard\"";
-       "Richard Stallman is licensed under GPL, so you can clone him and redistribute copies so you can help your neighbor. For example a version that take a bath more often.";
-       "Richard Stallman doesn't code; he just travels around the world.";
-       "Richard Stallman was coded by himself in lisp with Emacs.";
-       "Richard Stallman doesn't eat McDonald's because the machine that kills the cows uses proprietary software.";
-       "There is no chin behind Richard Stallman's legendary beard, there is only another Emacs.";
-       "In an average living room there are 1,242 objects Richard Stallman could use to write an OS, including the room itself.";
-       "Vendor lock-in is when vendors lock themselves inside of a building out of fear of Richard Stallman's wrath.";
-       "When Richard Stallman executes ps -e, you show up.";
-       "When Richard Stallman gets angry he doesn't swear; he recurses.";
-       "On Richard Stallman's computer the bootloader is contained in his .emacs.";
-       "Richard Stallman can make any operating system free, free from drivers.";
-       "Richard Stallman programmed Chuck Norris.";
-       "Behind Richard Stallman's beard there is another fist, to code faster.";
-       "Richard Stallman won a Sudoku that started with only one number in each line.";
-       "Richard Stallman's brain compiles and runs C code.";
-       "Richard Stallman wrote the first version of Emacs using Emacs.";
-       "Richard Stallman never gonna give you up, never gonna let you down, never gonna run around and desert you, never gonna make you cry, never gonna say goodbye, never gonna tell a lie and hurt you.";
-       "Richard Stallman, upon reading these facts, didn't laugh at all. Instead, he complained that he is being linked to that dirty \"open source\" software. He also asked it to be changed to \"free software\", in order to raise awareness for software freedom in our society.";
-       "Richard Stallman has no problem using Emacs. He wrote it with his 4 hands.";
-       "Richard Stallman will revert the big rip by adding parenthesis to the dark matter.";
-       "When you make a Google search and it doesn't find the answer, Google gently consults Richard Stallman.";
-       "Richard Stallman's uptime is over 53 years. And counting up.";
-       "Richard Stallman's portable music player can play ogg and WMA, but is too afraid to invoke Richard Stallman's wrath by playing WMA. Ogg it is, then.";
-       "Richard Stallman will never die, but may some day go to /dev/null.";
-       "Richard Stallman once got swine flu, but it got cleansed by hereditary GPL and thus got assimilated.";
-       "Richard Stallman don't cut his hair because there are no GNU/Scissors.";
-       "Richard Stallman is the one who trims Chuck Norris beard. And he does it freely, of course.";
-       "Richard Stallman does not take bath, for the hydroelectric company uses proprietary software.";
-       "Agent Smith loves Richard Stallman's scent.";
-       "Richard Stallman is the One.";
-       "\"They can take our lives, but they can never take our freedom.\" -- William Wallace after a little talk with Richard Stallman.";
-       "Richard Stallman can connect to any brain using an Emacs ssh client.";
-       "Richard Stallman ported Emacs to Intel 4004 chip.";
-       "Richard Stallman did not write GNU Emacs, he simply read the source code from /dev/null.";
-       "Richard Stallman once used GDB to reverse-engineer Windows 7 into a free operating system - able to run on GNU Emacs!";
-       "Richard Stallman does not contribute to open source projects; open source projects contribute to Richard Stallman, and then call themselves free software projects.";
-       "Richard Stallman programmed himself before he could even exist";
-       "Richard Stallman can fill up /dev/null.";
-       "Richard Stallman is so zealous about privacy he has /dev/null as his home.";
-       "When Richard Stallman runs /bin/false, it returns \"true\".";
-       "Richard Stallman doesn't like money, because banks don't run on free software.";
-       "Richard Stallman uses GNU tar to compress air.";
-       "When Richard Stallman reports a bug, the bug prefers to squash itself instead of facing Richard Stallman's wrath.";
-       "There are no Windows in Richard Stallman's house... only Doors...";
-       "Richard Stallman doesn't like neither PCs-Intel nor Burger King... He prefers e-Macs...";
-       "Richard Stallman can use grep to find Jimmy Hoffa.";
-       "Richard Stallman made it possible to not absolutely abhor HPUX.";
-       "When Richard Stallman pours his alphabets cereal into a bowl, only G's, N's, and U's come out.";
-       "Richard Stallman is pronounced \"GNU slash Stallman\"";
-       "Richard Stallman doesn't mind if you read his mail as long as you don't delete it before he reads it.";
-       "Richard Stallman is just a guy who has strong principles and decided to follow them.";
-       "Richard Stallman knows that you don't have class because it is a keyword that he defined.";
-       "Richard Stallman doesn't need a qwerty/dvorak keyboard only two buttons \"1\" and \"0\" and his erect penis.";
-       "On the first day Richard Stallman said M-x create-light.";
-       "Richard Stallman once went out of scope for a while. The garbage collector never dared to touch him.";
-       "Richard Stallman does not compile; he closes his eyes, and see energy lines created between bit blocks by the compiler optimizations.";
-       "intx80 first calls Richard Stallman before calling sys_call.";
-       "Tron is actually a biographical story about Richard Stallman. The director decided to tone it down or audiences wouldn't find it believable.";
-       "Richard Stallman always wears a red shirt to make sure that whatever attacks his away-team has to go through him first.";
-       "kill -9 invokes Richard Stallman's rage against a process.";
-       "If Richard were to stumble upon stallmanfacts.com, he would find it a gnuisance.";
-       "Richard Stallman can telnet into Mordor.";
-       "sudo chown Richard:Stallman /all/your/base";
-       "Richard Stallman's nervous system is completely wireless.";
-       "Richard Stallman does not sleep. He yields.";
-       "Some people say M-x psychoanalyse-pinhead is a merely a program. Others say M-x psychoanalyse-pinhead *is* Richard Stallman. All I know is, Richard Stallman is The Stig.";
-       "If you execute Emacs backward it either undoes the industrial revolution or induces the rapture. But only Richard Stallman knows which.";
-       "If Richard Stallman's beard were ever trimmed, the clippings would re-marshal into an exact copy of Richard Stallman.";
-       "Richard Stallman never sleeps because he altered his own source to gain background garbage collection.";
-       "Richard Stallman's doctor can retrieve a blood sample via CVS.";
-       "Richard Stallman can touch this.";
-       "Because Richard Stallman's DNA is licensed under the FDL, his doctor can't draw his blood without violating HIPAA.";
-       "Richard Stallman can remove his own appendix, using only GDB.";
-       "Richard Stallman's DNA includes debugging symbols. But he doesn't need them.";
-       "Richard Stallman met Chuck Norris once. Chuck tried a roundhouse, but Richard bashed him in the skull.";
-       "Richard Stallman doesn't need to buy a bigger hard drive. He can compress data infinitely.";
-       "When Richard Stallman cannot take your call, his beard answers the phone for you.";
-       "The R in RMS stands for RMS.";
-       "Richard Stallman can parse HTML with regular expressions.";
-       "Richard Stallman's traceroute goes all the way through an infinite number of anonymous proxies back to the traffic's source.";
-       "Richard Stallman's beard is in fact not a just a beard, but a microprinted hard copy of Emacs source code. New patches must be checked against new hair growth before being approved.";
-       "In the beginning-of-buffer there was Richard Stallman.";
-       "The NOOP was created to give Richard Stallman some time to comb his beard.";
-       "Whenever Richard Stallman looks at a Windows computer, it segfaults. Whenever Richard Stallman doesn't look at a Windows computer, it segfaults.";
-       "Richard Stallman can walk on Windows!";
-       "After being unable to satisfy my wife for years, Richard Stallman was able to single-handedly unlock her orgasm within seconds and managed to write a texinfo manual minutes later for other users.";
-       "Richard Stallman's tabbed browser is a set to wget/telnet fg/bg processes.";
-       "There is no chin under Richard Stallman' beard. There's only another beard. Recursively.";
-       "Richard Stallman can chown anything! stallman@stallman~$ chown stallman:stallman Earth (for example)";
-       "Richard Stallman freed his beard so he can always check what's in it.";
-       "In the beginning was the Word, and the Word was with RMS, and the Word was GNU.";
-       "RMS means \"RMS means Stallman\"";
-       "Richard Stallman is the babelfish of his own speeches.";
-       "Richard Stallman wrote his own library and lives in it.";
-       "Richard Stallman found Waldo using grep in /dev/null";
-       "Richard Stallman doesn't sleep; he is compiling.";
-       "Richard Stallman will get Coca Cola to release their recipe under the GPL.";
-       "Richard Stallman doesn't change clothes. He makes case mods.";
-       "Richard Stallman compiled the first version of gcc with an hexadecimal editor.";
-       "Richard Stallman will be the last guest on Linux Outlaws.";
-       "Richard Stallman calculates the universe's entropy by exploiting forced stack overflows.";
-       "Richard Stallman's consciousness will one day become the singularity, which will create Deep Thought, and answer the meaning of life, the universe and everything.";
-       "C is actually written in RMS.";
-       "Richard Stallman can write software that does not have a buffer overflow when counting money lost by Jerome Kerviel.";
-       "There were no double rainbows before Richard Stallman.";
-       "Chuck Norris had to shorten his beard in the presence of Richard Stallman because two beards that awesome, so close would segfault the universe (again).";
-       "RMS is Titanic.";
-       "Richard Stallman is the answer to the Turing Test.";
-       "Richard Stallman's beard makes ads for Gillette and Braun appear.";
-       "for i = 1 to Stallman will never stop.";
-       "\"RMS\" stands for \"RMS Makes Software\"";
-       "Whenever someone writes a \"Hello, world\" program, Richard Stallman says \"Hello\" back.";
-       "Richard Stallman wasn't born. He was compiled from source.";
-       "Richard Stallman has a URL tattooed on the left side of his chest where you can download his genetic code.";
-       "The GNU command line idiom that Richard Stallman never needs: \"date | more\"";
-       "Richard Stallman's toe cheese is aged to perfection.";
-       "Richard Stallman doesn't always run an OS kernel, but when he does he prefers GNU/Hurd. He is... the most interesting hacker in the world. Stay free, my friends.";
-       "When Richard Stallman gets hungry, he just picks debris from his foot and eats it.";
-       "Richard Stallman can GPL your code just by looking at it funny.";
-       "Richard Stallman loves birds. Birds make auricular love to Richard Stallman.";
-       "Richard Stallman is so free that the primitive recursive function for computing his liberty causes a stack overflow.";
-       "GNU Hurd is taking more than twenty years to develop because Richard Stallman is using a programming language comprised entirely of different lengths of time.";
-       "Richard Stallman's beard contains Richard Stallman, whose beard contains Richard Stallman....";
-       "Richard Stallman could have had a Google Plus account in 2010. Too bad he didn't want it.";
-       "Richard Stallman pipes the Emacs binaries to /dev/dsp before he goes to sleep.";
-       "When Richard Stallman counted his fingers as a kid, he always started with 0.";
-       "When Richard Stallman's computer gets a virus, he simply applies a GPL license to it which converts the whole botnet to Linux. I mean, GNU/Linux.";
-       "Richard Stallman's beard trimmings can cure cancer. Too bad he never shaves.";
-       "Richard Stallman's doesn't kill a process; he just dares it to stay running.";
-       "Richard Stallman exists because he compiled himself into being.";
-       "Richard Stallman's first words were in binary. When they couldn't understand him, he wrote a parser.";
-       "Richard Stallman doesn't need any codecs, he just opens a multimedia file with Emacs, and reads the bytes of the file as plain text. He then performs all the necessary decoding in his mind. But he refuses to decode files encrypted with DRM, although his mind is able to.";
-       "Richard Stallman was right. Sadly.";
-       "Richard Stallman can wiretap the NSA.";
-       "This is how Richard Stallman created Emacs: http://stallman.org/photos/rms-working/img_0631.jpg";
-       "Join Richard Stallman now and share the software, you'll be a free hacker, you'll be free!";
-       "Richard Stallman has not agreed to the terms and conditions and privacy policy because only he can actually read all of it.";
-       "Richard Stallman knows how of a backdoor to AES, but he respects your freedom and privacy too much to actually use it.";
-       "Richard Stallman will never get tired of being mocked for the foot cheese incident.";
-       "You like to release non-free software around Richard Stallman? I too like to live dangerously...";
-       "Yeah, if could just go ahead and make all software free for Richard Stallman, that'd be great, thanks.";
-       "Richard Stallman knows exactly what you mean when you talk about the cloud. But do you?";
-       "Richard Stallman satisfies Greenspun's Tenth Rule of programming, since his DNA also contains a complete implementation of all of Common Lisp.";
-       "Richard Stallman can violate the GPL. In a vulgar display of power, he once did so with the Emacs source code, but he undid the violation before most people noticed.";
-       "Good guy Richard Stallman does not try to shake you down for money. He will just kindly ask you to comply with the GPL.";
-       "Richard Stallman is in fact also a little sad that Steve Jobs is gone because it has diminished the size of the loyal opposition.";
-       "Richard Stallman can release LLVM and clang under the GPL.";
-       "No, really, Richard Stallman has a katana.";
-       "Every day Richard Stallman finds at least fifteen things in the world to rage about. You can read his findings here: http://stallman.org/archives/polnotes.html"
-       "Some of these Richard Stallman facts are completely true. Seriously.";
-       };
+    {
+      "Richard Stallman takes notes in binary.";
+      "Richard Stallman doesn't need sudo. I will make him a sandwich anyway.";
+      "Richard Stallman is my shephurd, and I am his GNU.";
+      "Richard Stallman doesn't wget, Richard Stallman wdemands!";
+      "Richard Stallman can touch MC Hammer.";
+      "Richard Stallman doesn't read web pages. They write to him.";
+      "Richard Stallman gets 9 bits to the byte.";
+      "Richard Stallman doesn't really believe in open software, because it's not free enough.";
+      "Richard Stallman can leave neutral or negative feedback on eBay.";
+      "Richard Stallman is the only man alive who can pronounce GNU the way it is meant to be pronounced.";
+      "Richard Stallman does not own a mobile phone because he can fashion a crude convex dish and shout into it at the exact resonant frequency of the ozone, causing a voice to seemingly come from the sky above his intended recipient.";
+      "Richard Stallman is so handsome that when he was young he was responsible for all other geeks not being able to get girls. This is why he has to cover his face with a thick layer of hair.";
+      "Some people check their computers for viruses. Viruses check their computers for Richard Stallman.";
+      "Richard Stallman memorises all his documents. In binary. He just types everything in whenever he needs a document.";
+      "When Richard Stallman makes a sudo command, he loses permissions.";
+      "Richard Stallman's beard is made of parentheses.";
+      "Richard Stallman's DNA is in binary.";
+      "Richard Stallman's nervous system is completely wireless.";
+      "Richard Stallman's brain accepts UNIX commands.";
+      "If Richard Stallman has 1GB of RAM, and if you have 1GB of RAM, Richard Stallman has more RAM than you.";
+      "Richard Stallman eats ethernet cables. That's why they invented wireless.";
+      "Richard Stallman has a katana. 'Nuff said.";
+      "Richard Stallman wrote a program that divides by zero.";
+      "Richard Stallman doesn't use zip drives; he just squeezes the hard drive.";
+      "Richard Stallman's compiler is afraid to report errors.";
+      "Richard Stallman wrote the compiler God used. The Big Bang was the Universe's first segfault.";
+      "Richard Stallman successfully compiled a kernel of popcorn.";
+      "Richard Stallman doesn't write programs; they write themselves out of reverence.";
+      "Richard Stallman can make infinite loops end.";
+      "Richard Stallman's anti-virus programs cures HIV.";
+      "Richard Stallman's computer doesn't have a clock; it defines what time it is.";
+      "Richard Stallman wrote a program to compute the last digit of pi.";
+      "Richard Stallman doesn't use web browsers. He sends a link to a daemon that uses wget to fetch the page and sends it back to him.";
+      "Richard Stallman can solve the halting problem... in polynomial time.";
+      "For Richard Stallman, polynomial time is O(1).";
+      "Richard Stallman didn't \"write\" Emacs or created it in his own image. Richard Stallman made Emacs an instance of himself.";
+      "Richard Stallman can coerce meaningful data from /dev/null.";
+      "Some people wear Linus Torvalds pyjamas to bed, Linus Torvalds wears Richard Stallman pyjamas.";
+      "There is no software development process, only a bunch of programs Richard Stallman allows to exist.";
+      "Richard Stallman spends his leisure time programming with Guile on GNU Hurd.";
+      "Richard Stallman's left and right hands are named \"(\" and \")\" ";
+      "Richard Stallman first words were actually syscalls.";
+      "Richard Stallman didn't create the singularity. He is the singularity. GNU/Linux is only the event horizon.";
+      "When Richard Stallman pipes to more, he gets less ";
+      "Richard Stallman never showers; he runs 'make clean'.";
+      "Richard Stallman needs neither mouse nor keyboard to operate his computer. He just stares it down until it does what he wants.";
+      "Richard Stallman didn't write the GPL. He is the GPL.";
+      "Richard Stallman's pinky finger is really a USB memory stick.";
+      "Richard Stallman called his operating system GNU because he created it before computers existed, when actual gnus were used for calculations.";
+      "In Soviet Russia, Richard Stallman is still Richard Stallman!";
+      "Richard Stallman's flute only plays free music.";
+      "When Richard Stallman uses floats, there are no rounding errors.";
+      "Richard Stallman wrote a program so powerful it knows the question to 42.";
+      "Richard Stallman released his own DNA under GNU FDL.";
+      "Richard Stallman knows the entire Wikipedia by heart, markup included.";
+      "Richard Stallman wrote the HAL9000 OS.";
+      "Richard Stallman's laser pointer is a lightsaber.";
+      "Richard Stallman never steps down; he shifts the universe up.";
+      "Richard Stallman doesn't maintain code; he stares at it until it fixes itself out of reverence.";
+      "Richard Stallman doesn't use an editor; he sets the fundamental constants of the universe so that a magnetic platter with his code on it evolves itself.";
+      "Richard Stallman doesn’t code; he dares the computer to not do his bidding.";
+      "Global warming is caused by Richard Stallman's rage towards non-free software.";
+      "Rather than being birthed like a normal child, Richard Stallman instead instantiated himself polymorphically. Shortly thereafter he grew a beard.";
+      "Richard Stallman discovered extra-terrestrial life but killed them because they distributed non-free software.";
+      "Richard Stallman doesn't evaluate expressions; expressions evaluate to Richard Stallman.";
+      "Richard Stallman can see Russia from his house.";
+      "Richard Stallman proved P=NP, twice!";
+      "Richard Stallman knows of an unfixed bug in TeX.";
+      "Richard Stallman can write a context-free grammar for C.";
+      "Richard Stallman can determine whether an arbitrary program will terminate.";
+      "Richard Stallman's computer has only two buttons. One is for guests.";
+      "Richard Stallman does not actually write programs. He comes up with a length and digit index in pi.";
+      "Richard Stallman's distributed version control system is a flamewar on Usenet.";
+      "Richard Stallman wrote the first version of Emacs on a typewriter.";
+      "Richard Stallman has no known weaknesses, except for a phobia against soap.";
+      "Richard Stallman is not affected by Godwin's Law.";
+      "Richard Stallman can write an anti-virus program that cures HIV. Too bad he never writes anti-virus programs.";
+      "Richard Stallman' facial hair is \"free as in beard\"";
+      "Richard Stallman is licensed under GPL, so you can clone him and redistribute copies so you can help your neighbor. For example a version that take a bath more often.";
+      "Richard Stallman doesn't code; he just travels around the world.";
+      "Richard Stallman was coded by himself in lisp with Emacs.";
+      "Richard Stallman doesn't eat McDonald's because the machine that kills the cows uses proprietary software.";
+      "There is no chin behind Richard Stallman's legendary beard, there is only another Emacs.";
+      "In an average living room there are 1,242 objects Richard Stallman could use to write an OS, including the room itself.";
+      "Vendor lock-in is when vendors lock themselves inside of a building out of fear of Richard Stallman's wrath.";
+      "When Richard Stallman executes ps -e, you show up.";
+      "When Richard Stallman gets angry he doesn't swear; he recurses.";
+      "On Richard Stallman's computer the bootloader is contained in his .emacs.";
+      "Richard Stallman can make any operating system free, free from drivers.";
+      "Richard Stallman programmed Chuck Norris.";
+      "Behind Richard Stallman's beard there is another fist, to code faster.";
+      "Richard Stallman won a Sudoku that started with only one number in each line.";
+      "Richard Stallman's brain compiles and runs C code.";
+      "Richard Stallman wrote the first version of Emacs using Emacs.";
+      "Richard Stallman never gonna give you up, never gonna let you down, never gonna run around and desert you, never gonna make you cry, never gonna say goodbye, never gonna tell a lie and hurt you.";
+      "Richard Stallman, upon reading these facts, didn't laugh at all. Instead, he complained that he is being linked to that dirty \"open source\" software. He also asked it to be changed to \"free software\", in order to raise awareness for software freedom in our society.";
+      "Richard Stallman has no problem using Emacs. He wrote it with his 4 hands.";
+      "Richard Stallman will revert the big rip by adding parenthesis to the dark matter.";
+      "When you make a Google search and it doesn't find the answer, Google gently consults Richard Stallman.";
+      "Richard Stallman's uptime is over 53 years. And counting up.";
+      "Richard Stallman's portable music player can play ogg and WMA, but is too afraid to invoke Richard Stallman's wrath by playing WMA. Ogg it is, then.";
+      "Richard Stallman will never die, but may some day go to /dev/null.";
+      "Richard Stallman once got swine flu, but it got cleansed by hereditary GPL and thus got assimilated.";
+      "Richard Stallman don't cut his hair because there are no GNU/Scissors.";
+      "Richard Stallman is the one who trims Chuck Norris beard. And he does it freely, of course.";
+      "Richard Stallman does not take bath, for the hydroelectric company uses proprietary software.";
+      "Agent Smith loves Richard Stallman's scent.";
+      "Richard Stallman is the One.";
+      "\"They can take our lives, but they can never take our freedom.\" -- William Wallace after a little talk with Richard Stallman.";
+      "Richard Stallman can connect to any brain using an Emacs ssh client.";
+      "Richard Stallman ported Emacs to Intel 4004 chip.";
+      "Richard Stallman did not write GNU Emacs, he simply read the source code from /dev/null.";
+      "Richard Stallman once used GDB to reverse-engineer Windows 7 into a free operating system - able to run on GNU Emacs!";
+      "Richard Stallman does not contribute to open source projects; open source projects contribute to Richard Stallman, and then call themselves free software projects.";
+      "Richard Stallman programmed himself before he could even exist";
+      "Richard Stallman can fill up /dev/null.";
+      "Richard Stallman is so zealous about privacy he has /dev/null as his home.";
+      "When Richard Stallman runs /bin/false, it returns \"true\".";
+      "Richard Stallman doesn't like money, because banks don't run on free software.";
+      "Richard Stallman uses GNU tar to compress air.";
+      "When Richard Stallman reports a bug, the bug prefers to squash itself instead of facing Richard Stallman's wrath.";
+      "There are no Windows in Richard Stallman's house... only Doors...";
+      "Richard Stallman doesn't like neither PCs-Intel nor Burger King... He prefers e-Macs...";
+      "Richard Stallman can use grep to find Jimmy Hoffa.";
+      "Richard Stallman made it possible to not absolutely abhor HPUX.";
+      "When Richard Stallman pours his alphabets cereal into a bowl, only G's, N's, and U's come out.";
+      "Richard Stallman is pronounced \"GNU slash Stallman\"";
+      "Richard Stallman doesn't mind if you read his mail as long as you don't delete it before he reads it.";
+      "Richard Stallman is just a guy who has strong principles and decided to follow them.";
+      "Richard Stallman knows that you don't have class because it is a keyword that he defined.";
+      "Richard Stallman doesn't need a qwerty/dvorak keyboard only two buttons \"1\" and \"0\" and his erect penis.";
+      "On the first day Richard Stallman said M-x create-light.";
+      "Richard Stallman once went out of scope for a while. The garbage collector never dared to touch him.";
+      "Richard Stallman does not compile; he closes his eyes, and see energy lines created between bit blocks by the compiler optimizations.";
+      "intx80 first calls Richard Stallman before calling sys_call.";
+      "Tron is actually a biographical story about Richard Stallman. The director decided to tone it down or audiences wouldn't find it believable.";
+      "Richard Stallman always wears a red shirt to make sure that whatever attacks his away-team has to go through him first.";
+      "kill -9 invokes Richard Stallman's rage against a process.";
+      "If Richard were to stumble upon stallmanfacts.com, he would find it a gnuisance.";
+      "Richard Stallman can telnet into Mordor.";
+      "sudo chown Richard:Stallman /all/your/base";
+      "Richard Stallman's nervous system is completely wireless.";
+      "Richard Stallman does not sleep. He yields.";
+      "Some people say M-x psychoanalyse-pinhead is a merely a program. Others say M-x psychoanalyse-pinhead *is* Richard Stallman. All I know is, Richard Stallman is The Stig.";
+      "If you execute Emacs backward it either undoes the industrial revolution or induces the rapture. But only Richard Stallman knows which.";
+      "If Richard Stallman's beard were ever trimmed, the clippings would re-marshal into an exact copy of Richard Stallman.";
+      "Richard Stallman never sleeps because he altered his own source to gain background garbage collection.";
+      "Richard Stallman's doctor can retrieve a blood sample via CVS.";
+      "Richard Stallman can touch this.";
+      "Because Richard Stallman's DNA is licensed under the FDL, his doctor can't draw his blood without violating HIPAA.";
+      "Richard Stallman can remove his own appendix, using only GDB.";
+      "Richard Stallman's DNA includes debugging symbols. But he doesn't need them.";
+      "Richard Stallman met Chuck Norris once. Chuck tried a roundhouse, but Richard bashed him in the skull.";
+      "Richard Stallman doesn't need to buy a bigger hard drive. He can compress data infinitely.";
+      "When Richard Stallman cannot take your call, his beard answers the phone for you.";
+      "The R in RMS stands for RMS.";
+      "Richard Stallman can parse HTML with regular expressions.";
+      "Richard Stallman's traceroute goes all the way through an infinite number of anonymous proxies back to the traffic's source.";
+      "Richard Stallman's beard is in fact not a just a beard, but a microprinted hard copy of Emacs source code. New patches must be checked against new hair growth before being approved.";
+      "In the beginning-of-buffer there was Richard Stallman.";
+      "The NOOP was created to give Richard Stallman some time to comb his beard.";
+      "Whenever Richard Stallman looks at a Windows computer, it segfaults. Whenever Richard Stallman doesn't look at a Windows computer, it segfaults.";
+      "Richard Stallman can walk on Windows!";
+      "After being unable to satisfy my wife for years, Richard Stallman was able to single-handedly unlock her orgasm within seconds and managed to write a texinfo manual minutes later for other users.";
+      "Richard Stallman's tabbed browser is a set to wget/telnet fg/bg processes.";
+      "There is no chin under Richard Stallman' beard. There's only another beard. Recursively.";
+      "Richard Stallman can chown anything! stallman@stallman~$ chown stallman:stallman Earth (for example)";
+      "Richard Stallman freed his beard so he can always check what's in it.";
+      "In the beginning was the Word, and the Word was with RMS, and the Word was GNU.";
+      "RMS means \"RMS means Stallman\"";
+      "Richard Stallman is the babelfish of his own speeches.";
+      "Richard Stallman wrote his own library and lives in it.";
+      "Richard Stallman found Waldo using grep in /dev/null";
+      "Richard Stallman doesn't sleep; he is compiling.";
+      "Richard Stallman will get Coca Cola to release their recipe under the GPL.";
+      "Richard Stallman doesn't change clothes. He makes case mods.";
+      "Richard Stallman compiled the first version of gcc with an hexadecimal editor.";
+      "Richard Stallman will be the last guest on Linux Outlaws.";
+      "Richard Stallman calculates the universe's entropy by exploiting forced stack overflows.";
+      "Richard Stallman's consciousness will one day become the singularity, which will create Deep Thought, and answer the meaning of life, the universe and everything.";
+      "C is actually written in RMS.";
+      "Richard Stallman can write software that does not have a buffer overflow when counting money lost by Jerome Kerviel.";
+      "There were no double rainbows before Richard Stallman.";
+      "Chuck Norris had to shorten his beard in the presence of Richard Stallman because two beards that awesome, so close would segfault the universe (again).";
+      "RMS is Titanic.";
+      "Richard Stallman is the answer to the Turing Test.";
+      "Richard Stallman's beard makes ads for Gillette and Braun appear.";
+      "for i = 1 to Stallman will never stop.";
+      "\"RMS\" stands for \"RMS Makes Software\"";
+      "Whenever someone writes a \"Hello, world\" program, Richard Stallman says \"Hello\" back.";
+      "Richard Stallman wasn't born. He was compiled from source.";
+      "Richard Stallman has a URL tattooed on the left side of his chest where you can download his genetic code.";
+      "The GNU command line idiom that Richard Stallman never needs: \"date | more\"";
+      "Richard Stallman's toe cheese is aged to perfection.";
+      "Richard Stallman doesn't always run an OS kernel, but when he does he prefers GNU/Hurd. He is... the most interesting hacker in the world. Stay free, my friends.";
+      "When Richard Stallman gets hungry, he just picks debris from his foot and eats it.";
+      "Richard Stallman can GPL your code just by looking at it funny.";
+      "Richard Stallman loves birds. Birds make auricular love to Richard Stallman.";
+      "Richard Stallman is so free that the primitive recursive function for computing his liberty causes a stack overflow.";
+      "GNU Hurd is taking more than twenty years to develop because Richard Stallman is using a programming language comprised entirely of different lengths of time.";
+      "Richard Stallman's beard contains Richard Stallman, whose beard contains Richard Stallman....";
+      "Richard Stallman could have had a Google Plus account in 2010. Too bad he didn't want it.";
+      "Richard Stallman pipes the Emacs binaries to /dev/dsp before he goes to sleep.";
+      "When Richard Stallman counted his fingers as a kid, he always started with 0.";
+      "When Richard Stallman's computer gets a virus, he simply applies a GPL license to it which converts the whole botnet to Linux. I mean, GNU/Linux.";
+      "Richard Stallman's beard trimmings can cure cancer. Too bad he never shaves.";
+      "Richard Stallman's doesn't kill a process; he just dares it to stay running.";
+      "Richard Stallman exists because he compiled himself into being.";
+      "Richard Stallman's first words were in binary. When they couldn't understand him, he wrote a parser.";
+      "Richard Stallman doesn't need any codecs, he just opens a multimedia file with Emacs, and reads the bytes of the file as plain text. He then performs all the necessary decoding in his mind. But he refuses to decode files encrypted with DRM, although his mind is able to.";
+      "Richard Stallman was right. Sadly.";
+      "Richard Stallman can wiretap the NSA.";
+      "This is how Richard Stallman created Emacs: http://stallman.org/photos/rms-working/img_0631.jpg";
+      "Join Richard Stallman now and share the software, you'll be a free hacker, you'll be free!";
+      "Richard Stallman has not agreed to the terms and conditions and privacy policy because only he can actually read all of it.";
+      "Richard Stallman knows how of a backdoor to AES, but he respects your freedom and privacy too much to actually use it.";
+      "Richard Stallman will never get tired of being mocked for the foot cheese incident.";
+      "You like to release non-free software around Richard Stallman? I too like to live dangerously...";
+      "Yeah, if could just go ahead and make all software free for Richard Stallman, that'd be great, thanks.";
+      "Richard Stallman knows exactly what you mean when you talk about the cloud. But do you?";
+      "Richard Stallman satisfies Greenspun's Tenth Rule of programming, since his DNA also contains a complete implementation of all of Common Lisp.";
+      "Richard Stallman can violate the GPL. In a vulgar display of power, he once did so with the Emacs source code, but he undid the violation before most people noticed.";
+      "Good guy Richard Stallman does not try to shake you down for money. He will just kindly ask you to comply with the GPL.";
+      "Richard Stallman is in fact also a little sad that Steve Jobs is gone because it has diminished the size of the loyal opposition.";
+      "Richard Stallman can release LLVM and clang under the GPL.";
+      "No, really, Richard Stallman has a katana.";
+      "Every day Richard Stallman finds at least fifteen things in the world to rage about. You can read his findings here: http://stallman.org/archives/polnotes.html"
+      "Some of these Richard Stallman facts are completely true. Seriously.";
+    };
 
-  w = wisdom{randi([1, numel(wisdom)])};
+  w = wisdom{randi(numel(wisdom))};
   if (nargout > 0)
-    f = w;
+    truth = w;
   else
     w = wordwrap (w);
     printf ("%s", w);
   endif
+
 endfunction
 
 function out = wordwrap (w)
-  cols = terminal_size ()(2);
+  ncol = terminal_size ()(2);
   wc = ostrsplit (w, " ");
   out = "\n";
   i = 1;
@@ -275,7 +276,7 @@
   while (i <= numwords);
     line = wc{i};
     while (i < numwords
-           && length (newline = [line " " wc{i+1}]) < cols)
+           && length (newline = [line " " wc{i+1}]) < ncol)
       line = newline;
       i++;
     endwhile
@@ -285,3 +286,7 @@
   out = [out, "\n"];
 endfunction
 
+
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
+
--- a/scripts/miscellaneous/fileattrib.m
+++ b/scripts/miscellaneous/fileattrib.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -108,7 +108,7 @@
         r_s{i} = NaN;
         r_h{i} = NaN;
         r_d{i} = S_ISDIR (info.mode);
-        ## FIXME -- maybe we should have S_IRUSR etc. masks?
+        ## FIXME: Maybe we should have S_IRUSR etc. masks?
         modestr = info.modestr;
         r_u_r{i} = modestr(2) == "r";
         r_u_w{i} = modestr(3) == "w";
--- a/scripts/miscellaneous/fileparts.m
+++ b/scripts/miscellaneous/fileparts.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 John W. Eaton
+## Copyright (C) 2003-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,13 +17,15 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{dir}, @var{name}, @var{ext}, @var{ver}] =} fileparts (@var{filename})
-## Return the directory, name, extension, and version components of
-## @var{filename}.
-## @seealso{fullfile}
+## @deftypefn {Function File} {[@var{dir}, @var{name}, @var{ext}] =} fileparts (@var{filename})
+## Return the directory, name, and extension components of @var{filename}.
+##
+## The input @var{filename} is a string which is parsed.  There is no attempt
+## to check whether the filename or directory specified actually exists.
+## @seealso{fullfile, filesep}
 ## @end deftypefn
 
-function [directory, name, extension, version] = fileparts (filename)
+function [dir, name, ext] = fileparts (filename)
 
   if (nargin != 1)
     print_usage ();
@@ -42,20 +44,25 @@
   if (es <= ds)
     es = length (filename)+1;
   endif
+
   if (ds == 0)
-    directory = "";
+    dir = "";
   elseif (ds == 1)
-    directory = filename(1);
+    dir = filename(1);
   else
-    directory = filename(1:ds-1);
+    dir = filename(1:ds-1);
   endif
+
   name = filename(ds+1:es-1);
+  if (isempty (name))
+    name = "";
+  endif
+
   if (es > 0 && es <= length (filename))
-    extension = filename(es:end);
+    ext = filename(es:end);
   else
-    extension = "";
+    ext = "";
   endif
-  version = "";
 
 endfunction
 
@@ -90,13 +97,13 @@
 
 %!test
 %! [d, n, e] = fileparts ("/.ext");
-%! assert (strcmp (d, "/") && strcmp (n, char (zeros (1, 0))) && strcmp (e, ".ext"));
+%! assert (strcmp (d, "/") && strcmp (n, "") && strcmp (e, ".ext"));
 
 %!test
 %! [d, n, e] = fileparts (".ext");
-%! assert (strcmp (d, "") && strcmp (n, char (zeros (1, 0))) && strcmp (e, ".ext"));
+%! assert (strcmp (d, "") && strcmp (n, "") && strcmp (e, ".ext"));
 
-%% Test input validation
+## Test input validation
 %!error fileparts ()
 %!error fileparts (1,2)
 %!error <FILENAME must be a single string> fileparts (1)
--- a/scripts/miscellaneous/fullfile.m
+++ b/scripts/miscellaneous/fullfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 John W. Eaton
+## Copyright (C) 2014-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -17,49 +17,62 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{filename} =} fullfile (@var{dir1}, @var{dir2}, @dots{}, @var{file})
-## Return a complete filename constructed from the given components.
-## @seealso{fileparts}
+## @deftypefn  {Function File} {@var{filename} =} fullfile (@var{dir1}, @var{dir2}, @dots{}, @var{file})
+## @deftypefnx {Function File} {@var{filenames} =} fullfile (@dots{}, @var{files})
+## Build complete filename from separate parts.
+##
+## Joins any number of path components intelligently.  The return value
+## is the concatenation of each component with exactly one file separator
+## between each non empty part and at most one leading and/or trailing file
+## separator.
+##
+## If the last component part is a cell array, returns a cell array of
+## filepaths, one for each element in the last component, e.g.:
+##
+## @example
+## @group
+## fullfile ("/home/username", "data", @{"f1.csv", "f2.csv", "f3.csv"@})
+## @result{}  /home/username/data/f1.csv
+##     /home/username/data/f2.csv
+##     /home/username/data/f3.csv
+## @end group
+## @end example
+##
+## On Windows systems, while forward slash file separators do work, they
+## are replaced by backslashes; in addition drive letters are stripped of
+## leading file separators to obtain a valid file path.
+##
+## @seealso{fileparts, filesep}
 ## @end deftypefn
 
+## Author: Carnë Draug <carandraug@octave.org>
+
 function filename = fullfile (varargin)
 
-  if (nargin > 0)
-    ## Discard all empty arguments
-    varargin(cellfun ("isempty", varargin)) = [];
-    nargs = numel (varargin);
-    if (nargs > 1)
-      filename = varargin{1};
-      if (strcmp (filename(end), filesep))
-        filename(end) = "";
-      endif
-      for i = 2:nargs
-        tmp = varargin{i};
-        if (i < nargs && strcmp (tmp(end), filesep))
-          tmp(end) = "";
-        elseif (i == nargs && strcmp (tmp, filesep))
-          tmp = "";
-        endif
-        filename = [filename filesep tmp];
-      endfor
-    elseif (nargs == 1)
-      filename = varargin{1};
-    else
-      filename = "";
+  if (nargin && iscell (varargin{end}))
+    filename = cellfun (@(x) fullfile (varargin{1:end-1}, x), varargin{end},
+                                       "UniformOutput", false);
+  else
+    non_empty = cellfun ("isempty", varargin);
+    if (ispc && ! isempty (varargin))
+      varargin = strrep (varargin, "/", filesep);
+      varargin(1) = regexprep (varargin{1}, '[\\/]*([a-zA-Z]:[\\/]*)', "$1");
     endif
-  else
-    print_usage ();
+    filename = strjoin (varargin(! non_empty), filesep);
+    filename(strfind (filename, [filesep filesep])) = "";
   endif
 
 endfunction
 
 
-%!shared fs, fsx, xfs, fsxfs, xfsy
+%!shared fs, fsx, xfs, fsxfs, xfsy, xfsyfs
 %! fs = filesep ();
 %! fsx = [fs "x"];
 %! xfs = ["x" fs];
 %! fsxfs = [fs "x" fs];
 %! xfsy = ["x" fs "y"];
+%! xfsyfs = ["x" fs "y" fs];
+
 %!assert (fullfile (""), "")
 %!assert (fullfile (fs), fs)
 %!assert (fullfile ("", fs), fs)
@@ -80,3 +93,27 @@
 %!assert (fullfile (fsx, fs), fsxfs)
 %!assert (fullfile (fs, "x", fs), fsxfs)
 
+%!assert (fullfile ("x/", "/", "/", "y", "/", "/"), xfsyfs)
+%!assert (fullfile ("/", "x/", "/", "/", "y", "/", "/"), [fs xfsyfs])
+%!assert (fullfile ("/x/", "/", "/", "y", "/", "/"), [fs xfsyfs])
+
+## different on purpose so that "fullfile (c{:})" works for empty c
+%!assert (fullfile (), "")
+
+%!assert (fullfile ("x", "y", {"c", "d"}), {[xfsyfs "c"], [xfsyfs "d"]})
+
+## Windows specific - drive letters and file sep type
+%!test
+%! if (ispc)
+%!   assert (fullfile ('\/\/\//A:/\/\', "x/", "/", "/", "y", "/", "/"), ...
+%!           ['A:\' xfsyfs]);
+%! endif
+
+## Windows specific - drive letters and file sep type, cell array
+%!test
+%! if (ispc)
+%!  tmp = fullfile ({"\\\/B:\//", "A://c", "\\\C:/g/h/i/j\/"});
+%!  assert (tmp{1}, 'B:\');
+%!  assert (tmp{2}, 'A:\c');
+%!  assert (tmp{3}, 'C:\g\h\i\j\');
+%! endif
--- a/scripts/miscellaneous/genvarname.m
+++ b/scripts/miscellaneous/genvarname.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney, Robert Platt
+## Copyright (C) 2008-2015 Bill Denney, Robert Platt
 ##
 ## This file is part of Octave.
 ##
@@ -19,26 +19,13 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{varname} =} genvarname (@var{str})
 ## @deftypefnx {Function File} {@var{varname} =} genvarname (@var{str}, @var{exclusions})
-## Create unique variable(s) from @var{str}.  If @var{exclusions} is
-## given, then the variable(s) will be unique to each other and to
-## @var{exclusions} (@var{exclusions} may be either a string or a cellstr).
+## Create valid unique variable name(s) from @var{str}.
 ##
 ## If @var{str} is a cellstr, then a unique variable is created for each
 ## cell in @var{str}.
 ##
 ## @example
 ## @group
-## x = 3.141;
-## genvarname ("x", who ())
-##   @result{} x1
-## @end group
-## @end example
-##
-## If @var{wanted} is a cell array, genvarname will make sure the returned
-## strings are distinct:
-##
-## @example
-## @group
 ## genvarname (@{"foo", "foo"@})
 ##   @result{}
 ##      @{
@@ -48,7 +35,19 @@
 ## @end group
 ## @end example
 ##
-## Note that the result is a char array/cell array of strings, not the
+## If @var{exclusions} is given, then the variable(s) will be unique to each
+## other and to @var{exclusions} (@var{exclusions} may be either a string or
+## a cellstr).
+##
+## @example
+## @group
+## x = 3.141;
+## genvarname ("x", who ())
+##   @result{} x1
+## @end group
+## @end example
+##
+## Note that the result is a char array or cell array of strings, not the
 ## variables themselves.  To define a variable, @code{eval()} can be
 ## used.  The following trivial example sets @code{x} to @code{42}.
 ##
@@ -60,7 +59,7 @@
 ## @end group
 ## @end example
 ##
-## Also, this can be useful for creating unique struct field names.
+## This can be useful for creating unique struct field names.
 ##
 ## @example
 ## @group
@@ -77,50 +76,53 @@
 ## @end group
 ## @end example
 ##
-## Since variable names may only contain letters, digits and underscores,
-## genvarname replaces any sequence of disallowed characters with
+## Since variable names may only contain letters, digits, and underscores,
+## @code{genvarname} will replace any sequence of disallowed characters with
 ## an underscore.  Also, variables may not begin with a digit; in this
-## case an underscore is added before the variable name.
+## case an @samp{x} is added before the variable name.
 ##
 ## Variable names beginning and ending with two underscores @qcode{"__"} are
-## valid but they are used internally by octave and should generally be
-## avoided, therefore genvarname will not generate such names.
+## valid, but they are used internally by Octave and should generally be
+## avoided; therefore, @code{genvarname} will not generate such names.
 ##
-## genvarname will also make sure that returned names do not clash with
+## @code{genvarname} will also ensure that returned names do not clash with
 ## keywords such as @qcode{"for"} and @qcode{"if"}.  A number will be
 ## appended if necessary.  Note, however, that this does @strong{not} include
-## function names, such as @qcode{"sin"}.  Such names should be included in
-## @var{avoid} if necessary.
-## @seealso{isvarname, exist, tmpnam, eval}
+## function names such as @qcode{"sin"}.  Such names should be included in
+## @var{exclusions} if necessary.
+## @seealso{isvarname, iskeyword, exist, who, tempname, eval}
 ## @end deftypefn
 
 ## Authors: Rob Platt <robert.platt@postgrad.manchester.ac.uk>
 ##          Bill Denney <bill@denney.ws>
 
-function varname = genvarname (str, exclusions)
+function varname = genvarname (str, exclusions = {})
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
 
   strinput = ischar (str);
   ## Process the inputs
-  if (nargin < 2)
-    exclusions = {};
-  elseif (ischar (exclusions))
+  if (strinput)
+    if (rows (str) != 1)
+      error ("genvarname: if more than one STR is given, it must be a cellstr");
+    endif
+    str = {str};
+  elseif (! iscellstr (str))
+    error ("genvarname: STR must be a string or cellstr");
+  endif
+
+  if (ischar (exclusions))
     if (rows (exclusions) != 1)
       error ("genvarname: if more than one exclusion is given, it must be a cellstr");
     endif
     exclusions = {exclusions};
   elseif (! iscellstr (exclusions))
-    error ("genvarname: EXCLUSIONS must be a string or a cellstr");
+    error ("genvarname: EXCLUSIONS must be a string or cellstr");
+  else
+    exclusions = exclusions(:);
   endif
-  if (ischar (str))
-    if (rows (str) != 1)
-      error ("genvarname: if more than one STR is given, it must be a cellstr");
-    endif
-    str = {str};
-  elseif (! iscellstr (str))
-    error ("genvarname: STR must be a string or a cellstr");
-  endif
-
-  validchars = ["A":"Z", "a":"z", "0":"9", "_"];
 
   varname = cell (size (str));
   for i = 1:numel (str)
@@ -128,34 +130,32 @@
     ## a valid variable name.
 
     ## remove invalid characters
-    str{i}(! ismember (str{i}, validchars)) = "_";
+    str{i}(! (isalnum (str{i}) | str{i} == "_")) = "_";
     ## do not use keywords
     if (iskeyword (str{i}))
-      str{i} = ["_" str{i}];
-    endif
-    ## double underscores at the beginning and end are reserved variables
-    underscores = (str{i} == "_");
-    if (any (underscores))
-      firstnon = find (!underscores, 1);
-      lastnon = find (!underscores, 1, "last");
-      str{i}([1:firstnon-2, lastnon+2:end]) = [];
+      firstcharacter = toupper (str{i}(1));
+      str{i} = ["x", firstcharacter, str{i}(2:end)];
     endif
     ## The variable cannot be empty
     if (isempty (str{i}))
       str{i} = "x";
     endif
+    ## Leading underscores are not Matlab compatible
+    if (str{i}(1) == "_")
+      str{i} = ["x", str{i}];
+    endif
     ## it cannot start with a number
-    if (ismember (str{i}(1), "0":"9"))
-      str{i} = ["_" str{i}];
+    if (isdigit (str{i}(1)))
+      str{i} = ["x", str{i}];
     endif
 
     ## make sure that the variable is unique relative to other variables
     ## and the exclusions list
     excluded = any (strcmp (str{i}, exclusions));
-    if (excluded && ismember (str{i}(end), "0":"9"))
+    if (excluded && isdigit (str{i}(end)))
       ## if it is not unique and ends with a digit, add an underscore to
       ## make the variable name more readable ("x1_1" instead of "x11")
-      str{i}(end+1) = "_";
+      str{i} = [str{i}, "_"];
     endif
     varname(i) = str(i);
     idx = 0;
@@ -199,12 +199,22 @@
 ## more than one repetition not in order
 %!assert (genvarname ({"a" "b" "a" "b" "a"}), {"a" "b" "a1" "b1" "a2"})
 ## Variable name munging
-%!assert (genvarname ("__x__"), "_x_")
-%!assert (genvarname ("123456789"), "_123456789")
-%!assert (genvarname ("_$1__"), "_1_")
-%!assert (genvarname ("__foo__", "_foo_"), "_foo_1")
-%!assert (genvarname ("1million_and1", "_1million_and1"), "_1million_and1_1")
+%!assert (genvarname ("__x__"), "x__x__")
+%!assert (genvarname ("123456789"), "x123456789")
+%!assert (genvarname ("_$1__"), "x__1__")
+%!assert (genvarname ("__foo__", "x__foo__"), "x__foo__1")
+%!assert (genvarname ("1million_and1", "x1million_and1"), "x1million_and1_1")
 %!assert (genvarname ({"", "", ""}), {"x", "x1", "x2"})
-%!assert (genvarname ("if"), "_if")
-%!assert (genvarname ({"if", "if", "if"}), {"_if", "_if1", "_if2"})
+%!assert (genvarname ("if"), "xIf")
+%!assert (genvarname ({"if", "if", "if"}), {"xIf", "xIf1", "xIf2"})
+## Exclusions in odd format
+%!assert (genvarname ("x", {"a", "b"; "x", "d"}), "x1")
 
+## Test input validation
+%!error genvarname ()
+%!error genvarname (1,2,3)
+%!error <more than one STR is given, it must be a cellstr> genvarname (char ("a", "b", "c"))
+%!error <STR must be a string or cellstr> genvarname (1)
+%!error <more than one exclusion is given, it must be a cellstr> genvarname ("x", char ("a", "b", "c"))
+%!error <EXCLUSIONS must be a string or cellstr> genvarname ("x", 1)
+
--- a/scripts/miscellaneous/getappdata.m
+++ b/scripts/miscellaneous/getappdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -19,47 +19,79 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{value} =} getappdata (@var{h}, @var{name})
 ## @deftypefnx {Function File} {@var{appdata} =} getappdata (@var{h})
-##
-## Return the @var{value} for named application data for the object(s) with
-## handle(s) @var{h}.
+## Return the @var{value} of the application data @var{name} for the graphics
+## object with handle @var{h}.
 ##
-## @code{getappdata(@var{h})} returns a structure, @var{appdata}, whose fields
-## correspond to the appdata properties.
+## @var{h} may also be a vector of graphics handles.  If no second argument
+## @var{name} is given then @code{getappdata} returns a structure,
+## @var{appdata}, whose fields correspond to the appdata properties.
 ##
-## @seealso{setappdata, guidata, get, set, getpref, setpref}
+## @seealso{setappdata, isappdata, rmappdata, guidata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
 ## Created: 2010-07-15
 
-function val = getappdata (h, name)
+function value = getappdata (h, name)
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
 
-  if (all (ishandle (h)) && nargin == 2 && ischar (name))
-    ## FIXME - Is there a better way to handle non-existent appdata
-    ## and missing fields?
-    val = cell (numel (h), 1);
+  if (! all (ishandle (h(:))))
+    error ("getappdata: H must be a scalar or vector of graphic handles");
+  endif
+
+  if (nargin == 2)
+    if (! ischar (name))
+      error ("getappdata: NAME must be a string");
+    endif
+
+    value = cell (numel (h), 1);
     appdata = struct ();
-    for nh = 1:numel (h)
-      try
-        appdata = get (h(nh), "__appdata__");
-      end_try_catch
-      if (! isfield (appdata, name))
-        appdata.(name) = [];
+    for i = 1:numel (h)
+      value{i} = [];
+      pval = get (h(i));
+      if (isfield (pval, "__appdata__") && isfield (pval.__appdata__, name))
+        value{i} = pval.__appdata__.(name);
       endif
-      val(nh) = {appdata.(name)};
     endfor
-    if (nh == 1)
-      val = val{1};
+
+    if (i == 1)
+      value = value{1};
     endif
-  elseif (ishandle (h) && numel (h) == 1 && nargin == 1)
+
+  else  # nargin == 1
+    if (numel (h) != 1)
+      error ("getappdata: Only one handle H may be used when fetching appdata");
+    endif
     try
-      val = get (h, "__appdata__");
+      value = get (h, "__appdata__");
     catch
-      val = struct ();
+      value = struct ();
     end_try_catch
-  else
-    error ("getappdata: invalid input");
   endif
 
 endfunction
 
+
+%!test
+%! unwind_protect
+%!   setappdata (0, "%data1%", ones (3), "%data2%", "hello world");
+%!   assert (getappdata (0, "%data1%"), ones (3));
+%!   assert (getappdata (0, "%data2%"), "hello world");
+%!   appdata = getappdata (0);
+%!   name1 = "%data1%";  name2 = "%data2%";
+%!   assert (appdata.(name1), ones (3));
+%!   assert (appdata.(name2), "hello world");
+%! unwind_protect_cleanup
+%!   rmappdata (0, "%data1%", "%data2%");
+%! end_unwind_protect
+
+## Test input validation
+%!error getappdata ()
+%!error getappdata (1,2,3)
+%!error <H must be a scalar .* graphic handle> getappdata (-1, "hello")
+%!error <NAME must be a string> getappdata (0, 1)
+%!error <Only one handle H may be used when fetching appdata> getappdata ([0 0])
+
--- a/scripts/miscellaneous/getfield.m
+++ b/scripts/miscellaneous/getfield.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Etienne Grossmann
+## Copyright (C) 2000-2015 Etienne Grossmann
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -18,30 +18,38 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{val}] =} getfield (@var{s}, @var{field})
-## @deftypefnx {Function File} {[@var{val}] =} getfield (@var{s}, @var{idx1}, @var{field1}, @var{idx2}, @var{field2}, @dots{})
-## Extract a field from a structure (or a nested structure).  The syntax
-## is the same as @code{setfield}, except it omits the final @var{val}
-## argument, returning this value instead of setting it.
+## @deftypefn  {Function File} {@var{val} =} getfield (@var{s}, @var{field})
+## @deftypefnx {Function File} {@var{val} =} getfield (@var{s}, @var{sidx1}, @var{field1}, @var{fidx1}, @dots{})
+## Get the value of the field named @var{field} from a structure or nested
+## structure @var{s}.
 ##
-## @seealso{setfield, rmfield, isfield, fieldnames, isstruct, struct}
+## If @var{s} is a structure array then @var{sidx} selects an element of the
+## structure array, @var{field} specifies the field name of the selected
+## element, and @var{fidx} selects which element of the field (in the case of
+## an array or cell array).  See @code{setfield} for a more complete
+## description of the syntax.
+##
+## @seealso{setfield, rmfield, orderfields, isfield, fieldnames, isstruct, struct}
 ## @end deftypefn
 
 ## Author: Etienne Grossmann <etienne@cs.uky.edu>
 
-function obj = getfield (s, varargin)
+function val = getfield (s, varargin)
+
   if (nargin < 2)
     print_usage ();
   endif
+
   subs = varargin;
   flds = cellfun ("isclass", subs, "char");
   idxs = cellfun ("isclass", subs, "cell");
-  if (all (flds | idxs))
-    typs = merge (flds, {"."}, {"()"});
-    obj = subsref (s, struct ("type", typs, "subs", subs));
-  else
+  if (! all (flds | idxs))
     error ("getfield: invalid index");
   endif
+
+  typs = merge (flds, {"."}, {"()"});
+  val = subsref (s, struct ("type", typs, "subs", subs));
+
 endfunction
 
 
@@ -49,6 +57,11 @@
 %! x.a = "hello";
 %! assert (getfield (x, "a"), "hello");
 %!test
-%! ss(1,2).fd(3).b = 5;
-%! assert (getfield (ss,{1,2},"fd",{3},"b"), 5);
+%! ss(1,2).fd(3).b(1,4) = 5;
+%! assert (getfield (ss,{1,2},"fd",{3},"b", {1,4}), 5);
 
+## Test input validation
+%!error getfield ()
+%!error getfield (1)
+%!error <invalid index> getfield (1,2)
+
--- a/scripts/miscellaneous/gunzip.m
+++ b/scripts/miscellaneous/gunzip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Bill Denney
+## Copyright (C) 2006-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -17,28 +17,42 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} gunzip (@var{gzfile}, @var{dir})
-## Unpack the gzip archive @var{gzfile} to the directory @var{dir}.  If
-## @var{dir} is not specified, it defaults to the current directory.  If
-## @var{gzfile} is a directory, all gzfiles in the directory will be
-## recursively gunzipped.
+## @deftypefn  {Function File} {@var{filelist} =} gunzip (@var{gzfile})
+## @deftypefnx {Function File} {@var{filelist} =} gunzip (@var{gzfile}, @var{dir})
+## Unpack the gzip archive @var{gzfile}.
+##
+## If @var{gzfile} is a directory, all gzfiles in the directory will be
+## recursively unpacked.
+##
+## If @var{dir} is specified the files are unpacked in this directory rather
+## than the one where @var{gzfile} is located.
+##
+## The optional output @var{filelist} is a list of the uncompressed files.
 ## @seealso{gzip, unpack, bunzip2, unzip, untar}
 ## @end deftypefn
 
 ## Author: Bill Denney <denney@seas.upenn.edu>
 
-function varargout = gunzip (gzfile, dir = ".")
+function filelist = gunzip (gzfile, dir = [])
 
-  if (nargin != 1 && nargin != 2)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
+  if (isempty (dir))
+    dir = fileparts (gzfile);
+  endif
+
   if (nargout > 0)
-    varargout = cell (1, nargout);
-    [varargout{:}] = unpack (gzfile, dir, mfilename ());
+    filelist = unpack (gzfile, dir, "gunzip");
   else
-    unpack (gzfile, dir, mfilename ());
+    unpack (gzfile, dir, "gunzip");
   endif
 
 endfunction
 
+
+## Tests for this m-file are located in gzip.m
+## Remove from test statistics
+%!assert (1)
+
--- a/scripts/miscellaneous/gzip.m
+++ b/scripts/miscellaneous/gzip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -17,25 +17,36 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{entries} =} gzip (@var{files})
-## @deftypefnx {Function File} {@var{entries} =} gzip (@var{files}, @var{outdir})
-## Compress the list of files and/or directories specified in @var{files}.
-## Each file is compressed separately and a new file with a @file{".gz"}
-## extension is created.  The original files are not modified.  Existing
-## compressed files are silently overwritten.  If @var{outdir} is defined the
-## compressed files are placed in this directory.
-## @seealso{gunzip, bzip2, zip, tar}
+## @deftypefn  {Function File} {@var{filelist} =} gzip (@var{files})
+## @deftypefnx {Function File} {@var{filelist} =} gzip (@var{files}, @var{dir})
+## Compress the list of files and directories specified in @var{files}.
+##
+## @var{files} is a character array or cell array of strings.  Shell
+## wildcards in the filename such as @samp{*} or @samp{?} are accepted and
+## expanded.  Each file is compressed separately and a new file with a
+## @file{".gz"} extension is created.  The original files are not modified,
+## but existing compressed files will be silently overwritten.  If a directory
+## is specified then @code{gzip} recursively compresses all files in the
+## directory.
+##
+## If @var{dir} is defined the compressed files are placed in this directory,
+## rather than the original directory where the uncompressed file resides.
+## If @var{dir} does not exist it is created.
+##
+## The optional output @var{filelist} is a list of the compressed files.
+## @seealso{gunzip, unpack, bzip2, zip, tar}
 ## @end deftypefn
 
-function entries = gzip (varargin)
-  if (nargin != 1 && nargin != 2) || (nargout > 1)
+function filelist = gzip (varargin)
+
+  if (nargin < 1 || nargin > 2 || nargout > 1)
     print_usage ();
   endif
 
   if (nargout == 0)
     __xzip__ ("gzip", "gz", "gzip -r %s", varargin{:});
   else
-    entries = __xzip__ ("gzip", "gz", "gzip -r %s", varargin{:});
+    filelist = __xzip__ ("gzip", "gz", "gzip -r %s", varargin{:});
   endif
 
 endfunction
@@ -44,24 +55,32 @@
 %!xtest
 %! ## test gzip together with gunzip
 %! unwind_protect
-%!   filename = tmpnam;
-%!   dummy    = 1;
+%!   filename = tempname;
+%!   dummy    = pi;
 %!   save (filename, "dummy");
-%!   dirname  = tmpnam;
+%!   dirname  = tempname;
 %!   mkdir (dirname);
-%!   entry = gzip (filename, dirname);
-%!   [path, basename, extension] = fileparts (filename);
-%!   if (! strcmp (entry, [dirname, filesep, basename, extension, ".gz"]))
+%!   filelist = gzip (filename, dirname);
+%!   filelist = filelist{1};
+%!   [~, basename, extension] = fileparts (filename);
+%!   if (! strcmp (filelist, [dirname, filesep, basename, extension, ".gz"]))
 %!     error ("gzipped file does not match expected name!");
 %!   endif
-%!   if (! exist (entry, "file"))
+%!   if (! exist (filelist, "file"))
 %!     error ("gzipped file cannot be found!");
 %!   endif
-%!   gunzip (entry);
-%!   if (system (sprintf ("diff %s %s%c%s%s", filename, dirname, filesep,
-%!                                            basename, extension)))
-%!     error ("unzipped file not equal to original file!");
-%!   end
+%!   gunzip (filelist);
+%!   fid = fopen (filename, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen ([dirname filesep basename extension], "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("gunzipped file not equal to original file!");
+%!   endif
 %! unwind_protect_cleanup
 %!   delete (filename);
 %!   delete ([dirname, filesep, basename, extension]);
@@ -70,6 +89,5 @@
 
 %!error gzip ()
 %!error gzip ("1", "2", "3")
-%!error <output directory does not exist> gzip ("1", tmpnam)
 %!error <FILES must be a character array or cellstr> gzip (1)
 
--- a/scripts/miscellaneous/info.m
+++ b/scripts/miscellaneous/info.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Julian Schnidder
+## Copyright (C) 2008-2015 Julian Schnidder
 ##
 ## This file is part of Octave.
 ##
@@ -31,7 +31,8 @@
   Octave are available at\n\
   http://www.octave.org/support.html\n\
 \n\
-  You may also find some information in the Octave Wiki at\n\
+  The Octave Wiki has user-generated content on a variety of subjects\n\
+  including installation and is available at\n\
   http://wiki.octave.org\n\
 \n\
   Additional functionality can be enabled by using packages from\n\
@@ -46,6 +47,6 @@
 endfunction
 
 
-## Mark file as being tested.  No real test needed for this function.
-%! assert (1)
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
 
--- a/scripts/miscellaneous/inputname.m
+++ b/scripts/miscellaneous/inputname.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -22,22 +22,26 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} inputname (@var{n})
 ## Return the name of the @var{n}-th argument to the calling function.
+##
 ## If the argument is not a simple variable name, return an empty string.
+## @code{inputname} may only be used within a function body, not at the
+## command line.
+## @seealso{nargin, nthargout}
 ## @end deftypefn
 
 function s = inputname (n)
 
-  if (nargin == 1)
-    s = evalin ("caller", sprintf ("__varval__ (\".argn.\"){%d};", n));
-    ## For compatibility with Matlab, return empty string if argument
-    ## name is not a valid identifier.
-    if (! isvarname (s))
-      s = "";
-    endif
-  else
+  if (nargin != 1)
     print_usage ();
   endif
 
+  s = evalin ("caller", sprintf ("__varval__ (\".argn.\"){%d};", fix (n)));
+  ## For compatibility with Matlab,
+  ## return empty string if argument name is not a valid identifier.
+  if (! isvarname (s))
+    s = "";
+  endif
+
 endfunction
 
 
@@ -57,3 +61,12 @@
 %!assert (inputname (1), "hello")
 %!assert (inputname (2), "worldly")
 
+%!function r = foo (x, y)
+%!  r = inputname (2);
+%!endfunction
+%!assert (foo (pi, e), "e");
+%!assert (feval (@foo, pi, e), "e");
+
+%!error inputname ()
+%!error inputname (1,2)
+
--- a/scripts/miscellaneous/isappdata.m
+++ b/scripts/miscellaneous/isappdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -17,35 +17,55 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{V} =} isappdata (@var{h}, @var{name})
+## @deftypefn {Function File} {@var{valid} =} isappdata (@var{h}, @var{name})
 ## Return true if the named application data, @var{name}, exists for the
-## object with handle @var{h}.
-## @seealso{getappdata, setappdata, rmappdata}
+## graphics object with handle @var{h}.
+##
+## @var{h} may also be a vector of graphics handles.
+## @seealso{getappdata, setappdata, rmappdata, guidata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
 ## Created: 2010-07-15
 
-function res = isappdata (h, name)
+function valid = isappdata (h, name)
 
-  if (! (all (ishandle (h)) && ischar (name)))
-    error ("isappdata: invalid input");
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
   endif
 
-  for nh = 1:numel (h)
-    data = get (h(nh));
-    if (isfield (data, "__appdata__") && isfield (data.__appdata__, name))
-      res(nh) = true;
-    else
-      res(nh) = false;
-    endif
+  if (! all (ishandle (h(:))))
+    error ("isappdata: H must be a scalar or vector of graphic handles");
+  elseif (! ischar (name))
+    error ("isappdata: NAME must be a string");
+  endif
+
+  valid = false (size (h));
+  for i = 1:numel (h)
+    try
+      appdata = get (h(i), "__appdata__");
+      if (isfield (appdata, name))
+        valid(i) = true;
+      endif
+    end_try_catch
   endfor
 
 endfunction
 
 
 %!test
-%! setappdata (0, "hello", "world");
-%! assert (isappdata (0, "hello"), true);
-%! assert (isappdata (0, "foobar"), false);
+%! unwind_protect
+%!   setappdata (0, "%hello%", "world");
+%!   assert (isappdata (0, "%hello%"), true);
+%!   assert (isappdata ([0 0], "%hello%"), [true, true]);
+%!   assert (isappdata (0, "%foobar%"), false);
+%! unwind_protect_cleanup
+%!   rmappdata (0, "%hello%");
+%! end_unwind_protect
 
+## Test input validation
+%!error isappdata ()
+%!error isappdata (1,2,3)
+%!error <H must be a scalar .* graphic handle> isappdata (-1, "hello")
+%!error <NAME must be a string> isappdata (0, 1)
+
--- a/scripts/miscellaneous/isdeployed.m
+++ b/scripts/miscellaneous/isdeployed.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -20,8 +20,9 @@
 ## @deftypefn {Function File} {} isdeployed ()
 ## Return true if the current program has been compiled and is running
 ## separately from the Octave interpreter and false if it is running in
-## the Octave interpreter.  Currently, this function always returns
-## false in Octave.
+## the Octave interpreter.
+##
+## Currently, this function always returns false in Octave.
 ## @end deftypefn
 
 function retval = isdeployed ()
--- a/scripts/miscellaneous/ismac.m
+++ b/scripts/miscellaneous/ismac.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Thomas Treichl
+## Copyright (C) 2007-2015 Thomas Treichl
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/ispc.m
+++ b/scripts/miscellaneous/ispc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/isunix.m
+++ b/scripts/miscellaneous/isunix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/license.m
+++ b/scripts/miscellaneous/license.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2005-2015 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2014-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -18,181 +19,170 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} license
+## @deftypefnx {Command} {} license inuse
+## @deftypefnx {Command} {} license inuse @var{feature}
 ## @deftypefnx {Function File} {} license ("inuse")
 ## @deftypefnx {Function File} {@var{retval} =} license ("inuse")
 ## @deftypefnx {Function File} {@var{retval} =} license ("test", @var{feature})
-## @deftypefnx {Function File} {} license ("test", @var{feature}, @var{toggle})
 ## @deftypefnx {Function File} {@var{retval} =} license ("checkout", @var{feature})
-##
-## Display the license of Octave.
-##
-## @code{license ("inuse")}
-##
-## Display a list of packages currently being used.
-##
-## @code{@var{retval} = license ("inuse")}
+## @deftypefnx {Function File} {[@var{retval}, @var{errmsg}] =} license ("checkout", @var{feature})
+## Get license information for Octave and Octave packages.
 ##
-## Return a structure containing the fields @code{feature} and @code{user}.
-##
-## @code{@var{retval} = license ("test", @var{feature})}
+## GNU Octave is free software distributed under the GNU General Public
+## License (GPL), and a license manager makes no sense.  This function is
+## provided only for @sc{matlab} compatibility.
 ##
-## Return 1 if a license exists for the product identified by the string
-## @var{feature} and 0 otherwise.  The argument @var{feature} is case
-## insensitive and only the first 27 characters are checked.
-##
-## @code{license ("test", @var{feature}, @var{toggle})}
-##
-## Enable or disable license testing for @var{feature}, depending on
-## @var{toggle}, which may be one of:
+## When called with no extra input arguments, it returns the Octave license,
+## otherwise the first input defines the operation mode and must be one of
+## the following strings: @code{inuse}, @code{test}, and @code{checkout}.
+## The optional @var{feature} argument can either be @qcode{"octave"} (core),
+## or an Octave package.
 ##
 ## @table @asis
-## @item @qcode{"enable"}
-## Future tests for the specified license of @var{feature} are conducted
-## as usual.
+## @item @qcode{"inuse"}
+## Returns a list of loaded features, i.e., octave and the list of loaded
+## packages.  If an output is requested, it returns a struct array with
+## the fields @qcode{"feature"}, and @qcode{"user"}.
+##
+## @item @qcode{"test"}
+## Return true if the specified @var{feature} is installed, false otherwise.
 ##
-## @item @qcode{"disable"}
-## Future tests for the specified license of @var{feature} return 0.
+## An optional third argument @qcode{"enable"} or @qcode{"disable"} is
+## accepted but ignored.
+##
+## @item @qcode{"checkout"}
+## Return true if the specified @var{feature} is installed, false otherwise.
+## An optional second output will have an error message if a package is not
+## installed.
+##
 ## @end table
 ##
-## @code{@var{retval} = license ("checkout", @var{feature})}
-##
-## Check out a license for @var{feature}, returning 1 on success and 0
-## on failure.
-##
-## This function is provided for compatibility with @sc{matlab}.
-## @seealso{ver, version}
+## @seealso{pkg, ver, version}
 ## @end deftypefn
 
 ## Author: William Poetra Yoga Hadisoeseno <williampoetra@gmail.com>
 
-function retval = license (varargin)
-
-  persistent __octave_licenses__;
+function [retval, errmsg] = license (cmd, feature, toogle)
 
-  if (isempty (__octave_licenses__))
-    __octave_licenses__ = cell ();
-    __octave_licenses__{1,1} = "Octave";
-    __octave_licenses__{1,2} = "GNU General Public License";
-    __octave_licenses__{1,3} = true;
-    if (exist ("OCTAVE_FORGE_VERSION"))
-      __octave_licenses__{2,1} = "octave-forge";
-      __octave_licenses__{2,2} = "<various licenses>";
-      __octave_licenses__{2,3} = true;
-    endif
-  endif
-
-  nout = nargout;
-  nin = nargin;
-  nr_licenses = rows (__octave_licenses__);
-
-  if (nout > 1 || nin > 3)
+  if (nargin > 3)
     print_usage ();
   endif
 
-  if (nin == 0)
-
-    found = find (strcmp (__octave_licenses__(:,1), "Octave"), 1);
-
-    if (! isempty (found))
-      result = __octave_licenses__{found,2};
-    else
-      result = "unknown";
-    endif
+  ## Then only give information about Octave core
+  if (nargin == 0)
+    retval = "GNU General Public License";
+    return;
+  endif
 
-    if (nout == 0)
-      printf ("%s\n", result);
-    else
-      retval = result;
-    endif
+  [features, loaded] = get_all_features ();
 
-  elseif (nin == 1)
-
-    if (nout == 0)
-
-      if (! strcmp (varargin{1}, "inuse"))
-        usage ('license ("inuse")');
+  switch (tolower (cmd))
+    case "inuse"
+      if (nargin > 2)
+        print_usage ();
       endif
 
-      printf ("%s\n", __octave_licenses__{:,1});
+      features = features(loaded);
 
-    else
-
-      if (! strcmp (varargin{1}, "inuse"))
-        usage ('retval = license ("inuse")');
+      if (nargin > 1)
+        features = features(strcmp (features, feature));
+      endif
+      if (nargout == 0)
+        printf ("%s\n", features{:});
+      else
+        retval = struct ("feature", features, "user", get_username ());
       endif
 
-      pw = getpwuid (getuid ());
-      if (isstruct (pw))
-        username = pw.name;
-      else
-        username = "octave_user";
+    case "test"
+      if (nargin < 2)
+        print_usage ();
       endif
 
-      retval = struct ("feature", __octave_licenses__(:,1), "user", username);
-
-    endif
-
-  else
-
-    feature = varargin{2}(1:(min ([(length (varargin{2})), 27])));
-
-    if (strcmp (varargin{1}, "test"))
-
-      found = find (strcmpi (__octave_licenses__(:,1), feature), 1);
-
-      if (nin == 2)
-        retval = ! isempty (found) && __octave_licenses__{found,3};
-      else
-        if (! isempty (found))
-          if (strcmp (varargin{3}, "enable"))
-            __octave_licenses__{found,3} = true;
-          elseif (strcmp (varargin{3}, "disable"))
-            __octave_licenses__{found,3} = false;
-          else
-            error ("license: TOGGLE must be either 'enable' or 'disable'");
-          endif
-        else
-          error ("license: FEATURE '%s' not found", feature);
-        endif
+      if (nargin > 2)
+        ## We ignore the toogle argument because... what's the point?  We
+        ## don't need a license management system on Octave.  This function
+        ## will return true, even if anyone tries to disabled a license.
+        switch (tolower (toogle))
+          case "enable"   # do nothing
+          case "disable"  # do nothing
+          otherwise       error ("license: TOOGLE must be enable or disable");
+        endswitch
       endif
 
-    elseif (strcmp (varargin{1}, "checkout"))
+      retval = any (strcmp (features, feature));
 
-      if (nin != 2)
-        usage ('retval = license ("checkout", feature)');
+    case "checkout"
+      ## I guess we could have the checkout command load packages but it's not
+      ## really the same thing.  The closest we have is simply to check if
+      ## there is a package with the feature name, and give an error if not.
+
+      if (nargin != 2)
+        print_usage ();
       endif
 
-      found = find (strcmpi (__octave_licenses__(:,1), feature), 1);
-
-      retval = ! isempty (found) && __octave_licenses__{found,3};
+      retval = any (strcmp (features, feature));
+      errmsg = "";
 
-    else
+      if (! retval)
+        errmsg = ['No package named "' feature '" installed'];
+      endif
+
+    otherwise
       print_usage ();
-    endif
-
-  endif
+  endswitch
 
 endfunction
 
+function username = get_username ()
+  pw = getpwuid (getuid ());
+  if (isstruct (pw))
+    username = pw.name;
+  else
+    username = "octave_user";
+  endif
+endfunction
 
-%!assert (license(), "GNU General Public License")
-%!assert ((license ("inuse")).feature, "Octave")
+function [features, loaded] = get_all_features ()
+  pkg_list = pkg ("list");
+  features = {"octave", ...
+              cellfun(@(x) x.name, pkg_list, "uniformoutput", false){:}};
+  loaded = [true, cellfun(@(x) x.loaded, pkg_list)];
+endfunction
+
+
+%!assert (license (), "GNU General Public License")
+%!assert ((license ("inuse", "octave")).feature, "octave")
+
+%!shared list
+%!test
+%! list = pkg ("list");
+%! for idx = 1: numel (list)
+%!   name = list{idx}.name;
+%!   if (list{idx}.loaded);
+%!     assert ((license ("inuse", name)).feature, name);
+%!   else
+%!     rv = license ("inuse", name);
+%!     assert (isstruct (rv));
+%!     assert (all (isfield (rv, {"feature", "user"})));
+%!   endif
+%! endfor
+
+%!assert (license ("test", "octave"), true)
+%!assert (license ("test", "not_a_valid package name"), false)
 
 %!test
-%! lstate = license ("test", "Octave");
-%! license ("test", "Octave", "disable");
-%! assert (license ("test", "Octave"), false);
-%! license ("test", "Octave", "enable");
-%! assert (license ("test", "Octave"), true);
-%! if (lstate == false)
-%!   license ("test", "Octave", "disable");
-%! endif
+%! for idx = 1: numel (list)
+%!   assert (license ("test", list{idx}.name), true)
+%! endfor
+
+%!assert (license ("checkout", "octave"), true)
 
-%!assert (license ("checkout", "Octave"), true)
+%!test
+%! [s, e] = license ("checkout", "NOT_A_PACKAGE");
+%! assert (e, 'No package named "NOT_A_PACKAGE" installed');
 
-%% Test input validation
+## Test input validation
 %!error license ("not_inuse")
-%!error <TOGGLE must be either> license ("test", "Octave", "not_enable")
-%!error <FEATURE 'INVALID' not found> license ("test", "INVALID", "enable")
-%!error license ("not_test", "Octave", "enable")
+%!error license ("not_test", "octave", "enable")
+%!error <TOOGLE must be enable or disable> license ("test", "octave", "invalid_toogle")
 
--- a/scripts/miscellaneous/list_primes.m
+++ b/scripts/miscellaneous/list_primes.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,73 +19,52 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} list_primes ()
 ## @deftypefnx {Function File} {} list_primes (@var{n})
-## List the first @var{n} primes.  If @var{n} is unspecified, the first
-## 25 primes are listed.
+## List the first @var{n} primes.
 ##
-## The algorithm used is from page 218 of the @TeX{}book.
+## If @var{n} is unspecified, the first 25 primes are listed.
 ## @seealso{primes, isprime}
 ## @end deftypefn
 
 ## Author: jwe
 
-function retval = list_primes (n)
+function retval = list_primes (n = 25)
 
-  if (nargin > 0)
-    if (! isscalar (n))
-      error ("list_primes: argument must be a scalar");
-    endif
+  if (nargin > 1)
+    print_usage ();
+  elseif (! isreal (n) || ! isscalar (n))
+    error ("list_primes: N must be a real scalar");
   endif
 
-  if (nargin == 0)
-    n = 25;
-  endif
+  n = floor (n);
 
-  if (n == 1)
+  if (n < 1)
+    retval = [];
+    return;
+  elseif (n == 1)
     retval = 2;
     return;
   endif
 
-  if (n == 2)
-    retval = [2; 3];
-    return;
+  list = primes (n * log (5 * n));
+  if (numel (list) < n)
+    ## Algorithm tested up to n=10,000 without failure.
+    error ("list_primes: Algorithm failed.  Try primes (n*log (6*n))(1:n)");
   endif
 
-  retval = zeros (1, n);
-  retval(1) = 2;
-  retval(2) = 3;
-
-  n = n - 2;
-  i = 3;
-  p = 5;
-  while (n > 0)
-
-    is_prime = 1;
-    is_unknown = 1;
-    d = 3;
-    while (is_unknown)
-      a = fix (p / d);
-      if (a <= d)
-        is_unknown = 0;
-      endif
-      if (a * d == p)
-        is_prime = 0;
-        is_unknown = 0;
-      endif
-      d = d + 2;
-    endwhile
-
-    if (is_prime)
-      retval(i++) = p;
-      n--;
-    endif
-    p = p + 2;
-
-  endwhile
+  retval = list(1:n);
 
 endfunction
 
 
 %!assert (list_primes (), [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, ...
 %!                         43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97])
-%!assert (list_primes (5), [2, 3, 5, 7, 11]);
+%!assert (list_primes (5), [2, 3, 5, 7, 11])
+
+%!assert (list_primes (0), [])
+%!assert (list_primes (1), [2])
 
+## Test input validation
+%!error list_primes (1, 2)
+%!error <N must be a real scalar> list_primes (i)
+%!error <N must be a real scalar> list_primes ([1 2])
+
--- a/scripts/miscellaneous/ls.m
+++ b/scripts/miscellaneous/ls.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,10 +18,26 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} ls
-## @deftypefnx {Command} {} ls filenames
-## @deftypefnx {Command} {} ls options
-## @deftypefnx {Command} {} ls options filenames
-## List directory contents.  For example:
+## @deftypefnx {Command} {} ls @var{filenames}
+## @deftypefnx {Command} {} ls @var{options}
+## @deftypefnx {Command} {} ls @var{options} @var{filenames}
+## @deftypefnx {Function File} {@var{list} =} ls (@dots{})
+##
+## List directory contents.
+##
+## The @code{ls} command is implemented by calling the native operating
+## system's directory listing command---available @var{options} will vary from
+## system to system.
+##
+## Filenames are subject to shell expansion if they contain any wildcard
+## characters @samp{*}, @samp{?}, @samp{[]}.  To find a literal example of a
+## wildcard character the wildcard must be escaped using the backslash operator
+## @samp{\}.
+##
+## If the optional output @var{list} is requested then @code{ls} returns a
+## character array with one row for each file/directory name.
+##
+## Example usage on a UNIX-like system:
 ##
 ## @example
 ## @group
@@ -32,14 +48,6 @@
 ## @end group
 ## @end example
 ##
-## The @code{dir} and @code{ls} commands are implemented by calling your
-## system's directory listing command, so the available options will vary
-## from system to system.
-##
-## Filenames are subject to shell expansion if they contain any wildcard
-## characters @samp{*}, @samp{?}, @samp{[]}.  If you want to find a
-## literal example of a wildcard character you must escape it using the
-## backslash operator @samp{\}.
 ## @seealso{dir, readdir, glob, what, stat, filesep, ls_command}
 ## @end deftypefn
 
@@ -50,8 +58,7 @@
   global __ls_command__;
 
   if (isempty (__ls_command__) || ! ischar (__ls_command__))
-    ## Initialize value for __ls_command__.
-    ls_command ();
+    ls_command ();  # Initialize global value for __ls_command__.
   endif
 
   if (! iscellstr (varargin))
@@ -61,17 +68,25 @@
   if (nargin > 0)
     args = tilde_expand (varargin);
     if (ispc () && ! isunix ())
+      idx = ! strncmp (args, '/', 1);
+      ## Enclose paths, potentially having spaces, in double quotes:
+      args(idx) = strcat ('"', args(idx), '"');
       ## shell (cmd.exe) on MinGW uses '^' as escape character
-      args = regexprep (args, '([^\w.*? -])', '^$1');
+      args = regexprep (args, '([^\w.*?])', '^$1');
     else
-      args = regexprep (args, '([^\w.*?-])', '\\$1');
+      ## Escape any special characters in filename
+      args = regexprep (args, '([^][\w.*?-])', '\\$1');
+      ## Undo escaped spaces following command args
+      ## Only used for command form where single str contains many args.
+      ## Example: list = ls ("-l /usr/bin")
+      args = regexprep (args, '(-\w+)(?:\\ )+', '$1 ');
     endif
     args = sprintf ("%s ", args{:});
   else
     args = "";
   endif
 
-  cmd = sprintf ("%s %s", __ls_command__, args);
+  cmd = [__ls_command__ " " args];
 
   if (page_screen_output () || nargout > 0)
     [status, output] = system (cmd);
@@ -80,10 +95,8 @@
       error ("ls: command exited abnormally with status %d\n", status);
     elseif (nargout == 0)
       puts (output);
-    elseif (isempty (output))
-      retval = "";
     else
-      retval = strvcat (regexp (output, '\S+', 'match'){:});
+      retval = strvcat (regexp (output, "[\r\n]+", "split"){:});
     endif
   else
     ## Just let the output flow if the pager is off.  That way the
@@ -100,5 +113,18 @@
 %! assert (ischar (list));
 %! assert (! isempty (list));
 
-%!error ls (1)
+%!test
+%! if (isunix ())
+%!   list = ls ("/");
+%!   list = (list')(:)';   # transform to a single row vector
+%!   assert (! isempty (strfind (list, "sbin")));
+%!   list2 = ls ("-l /");
+%!   list2 = (list2')(:)';   # transform to a single row vector
+%!   assert (! isempty (strfind (list2, "sbin")));
+%!   assert (rows (list) == rows (list2));
+%! endif
 
+%!error <all arguments must be character strings> ls (1)
+## Test below is valid, but produces confusing output on screen
+%!#error <command exited abnormally> ls ("-!")
+
--- a/scripts/miscellaneous/ls_command.m
+++ b/scripts/miscellaneous/ls_command.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -47,7 +47,7 @@
       if (ischar (cmd))
         __ls_command__ = cmd;
       else
-        error ("ls_command: expecting argument to be a character string");
+        error ("ls_command: argument must be a character string");
       endif
     endif
 
@@ -65,3 +65,5 @@
 %!   assert (cmd(1:2), "ls");
 %! endif
 
+%!error <argument must be a character string> ls_command (123)
+
--- a/scripts/miscellaneous/menu.m
+++ b/scripts/miscellaneous/menu.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -17,82 +17,83 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} menu (@var{title}, @var{opt1}, @dots{})
-## Print a title string followed by a series of options.  Each option will
-## be printed along with a number.  The return value is the number of the
-## option selected by the user.  This function is useful for interactive
-## programs.  There is no limit to the number of options that may be passed
-## in, but it may be confusing to present more than will fit easily on one
-## screen.
+## @deftypefn  {Function File} {@var{choice} =} menu (@var{title}, @var{opt1}, @dots{})
+## @deftypefnx {Function File} {@var{choice} =} menu (@var{title}, @{@var{opt1}, @dots{}@})
+## Display a menu with heading @var{title} and options @var{opt1}, @dots{},
+## and wait for user input.
+##
+## If the GUI is running, or Java is available, the menu is displayed
+## graphically using @code{listdlg}.  Otherwise, the title and menu options
+## are printed on the console.
+##
+## @var{title} is a string and the options may be input as individual strings
+## or as a cell array of strings.
+##
+## The return value @var{choice} is the number of the option selected by the
+## user counting from 1.
+##
+## This function is useful for interactive programs.  There is no limit to the
+## number of options that may be passed in, but it may be confusing to present
+## more than will fit easily on one screen.
 ## @seealso{input, listdlg}
 ## @end deftypefn
 
 ## Author: jwe
 
-function num = menu (title, varargin)
+function choice = menu (title, varargin)
 
   if (nargin < 2)
     print_usage ();
   endif
 
-  ## Force pending output to appear before the menu.
-
-  fflush (stdout);
-
-  ## Don't send the menu through the pager since doing that can cause
-  ## major confusion.
-
-  page_screen_output (0, "local");
-
-  ## Process Supplied Options
-  if (nargin == 2)
-    ## List in a cell array
-    if (iscell (varargin{1}))
-      varargin = varargin{1};
-      nopt = length (varargin);
-      for i = 1:nopt
-        while (iscell (varargin{i}))
-          varargin{i} = varargin{i}{1};
-        endwhile
-      endfor
-    else
-      nopt = nargin - 1;
-    endif
-  else
-    ## List with random elements in it - pick the first always
-    for i = 1:nargin - 1
-      if (iscell (varargin{i}))
-        while (iscell (varargin{i}))
-          varargin{i} = varargin{i}{1};
-        endwhile
-      else
-        if (! ischar (varargin{i}))
-          varargin{i} = varargin{i}(1);
-        endif
-      endif
-    endfor
-    nopt = length (varargin);
+  if (! ischar (title))
+    error ("menu: TITLE must be a string");
+  elseif (nargin > 2 && ! iscellstr (varargin))
+    error ("menu: All OPTIONS must be strings");
+  elseif (! ischar (varargin{1}) && ! iscellstr (varargin{1}))
+    error ("menu: OPTIONS must be string or cell array of strings");
   endif
 
-  if (! isempty (title))
-    disp (title);
-    printf ("\n");
-  endif
+  if (isguirunning () || usejava ("awt"))
+    [choice, ok] = listdlg ("Name", "menu", "PromptString", title,
+                            "ListString", varargin, "SelectionMode", "Single");
+    if (! ok)
+      choice = 1;
+    endif
+  else  # console menu
+    ## Force pending output to appear before the menu.
+    fflush (stdout);
+
+    ## Don't send the menu through the pager since doing that can cause
+    ## major confusion.
+    page_screen_output (0, "local");
 
-  while (1)
-    for i = 1:nopt
-      printf ("  [%2d] ", i);
-      disp (varargin{i});
-    endfor
-    printf ("\n");
-    s = input ("pick a number, any number: ", "s");
-    num = sscanf (s, "%d");
-    if (! isscalar (num) || num < 1 || num > nopt)
-      printf ("\nerror: input invalid or out of range\n\n");
-    else
-      break;
+    if (! isempty (title))
+      printf ("%s\n", title);
     endif
-  endwhile
+
+    nopt = numel (varargin);
+    while (1)
+      for i = 1:nopt
+        printf ("  [%2d] %s\n", i, varargin{i});
+      endfor
+      printf ("\n");
+      s = input ("Select a number: ", "s");
+      choice = sscanf (s, "%d");
+      if (! isscalar (choice) || choice < 1 || choice > nopt)
+        printf ("\nerror: input invalid or out of range\n\n");
+      else
+        break;
+      endif
+    endwhile
+  endif
 
 endfunction
 
+
+%!error menu ()
+%!error menu ("title")
+%!error <TITLE must be a string> menu (1, "opt1")
+%!error <All OPTIONS must be strings> menu ("title", "opt1", 1)
+%!error <OPTIONS must be string or cell array of strings> menu ("title", 1)
+
--- a/scripts/miscellaneous/mex.m
+++ b/scripts/miscellaneous/mex.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -19,12 +19,25 @@
 ## -*- texinfo -*-
 ## @deftypefn {Command} {} mex [options] file @dots{}
 ## Compile source code written in C, C++, or Fortran, to a MEX file.
+##
 ## This is equivalent to @code{mkoctfile --mex [options] file}.
-## @seealso{mkoctfile}
+## @seealso{mkoctfile, mexext}
 ## @end deftypefn
 
-function mex (varargin)
-  args = {"--mex", varargin{:}};
-  mkoctfile (args{:});
+function retval = mex (varargin)
+
+  [output, status] = mkoctfile ("--mex", varargin{:});
+
+  if (! isempty (output))
+    disp (output);
+  endif
+  if (nargout > 0)
+    retval = status;
+  endif
+
 endfunction
 
+
+## Remove from test statistics.  All real tests are in mkoctfile.
+%!assert (1)
+
--- a/scripts/miscellaneous/mexext.m
+++ b/scripts/miscellaneous/mexext.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/mkoctfile.m
+++ b/scripts/miscellaneous/mkoctfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Keith Goodman
+## Copyright (C) 2006-2015 Keith Goodman
 ##
 ## This file is part of Octave.
 ##
@@ -148,7 +148,8 @@
   bindir = octave_config_info ("bindir");
   ext = octave_config_info ("EXEEXT");
 
-  shell_script = fullfile (bindir, sprintf ("mkoctfile-%s%s", OCTAVE_VERSION, ext));
+  shell_script = fullfile (bindir,
+                           sprintf ("mkoctfile-%s%s", OCTAVE_VERSION, ext));
 
   if (! exist (shell_script, "file"))
     __gripe_missing_component__ ("mkoctfile", "mkoctfile");
--- a/scripts/miscellaneous/module.mk
+++ b/scripts/miscellaneous/module.mk
@@ -2,6 +2,7 @@
 
 miscellaneous_PRIVATE_FCN_FILES = \
   miscellaneous/private/display_info_file.m \
+  miscellaneous/private/__w2mpth__.m \
   miscellaneous/private/__xzip__.m
 
 miscellaneous_FCN_FILES = \
@@ -10,7 +11,6 @@
   miscellaneous/bunzip2.m \
   miscellaneous/bzip2.m \
   miscellaneous/cast.m \
-  miscellaneous/colon.m \
   miscellaneous/citation.m \
   miscellaneous/comma.m \
   miscellaneous/compare_versions.m \
@@ -21,7 +21,6 @@
   miscellaneous/desktop.m \
   miscellaneous/dir.m \
   miscellaneous/dos.m \
-  miscellaneous/dump_prefs.m \
   miscellaneous/edit.m \
   miscellaneous/error_ids.m \
   miscellaneous/fact.m \
@@ -51,6 +50,7 @@
   miscellaneous/movefile.m \
   miscellaneous/namelengthmax.m \
   miscellaneous/news.m \
+  miscellaneous/open.m \
   miscellaneous/orderfields.m \
   miscellaneous/pack.m \
   miscellaneous/paren.m \
@@ -68,7 +68,7 @@
   miscellaneous/symvar.m \
   miscellaneous/tar.m \
   miscellaneous/tempdir.m \
-  miscellaneous/tempname.m \
+  miscellaneous/tmpnam.m \
   miscellaneous/unix.m \
   miscellaneous/unpack.m \
   miscellaneous/untar.m \
--- a/scripts/miscellaneous/movefile.m
+++ b/scripts/miscellaneous/movefile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -21,12 +21,13 @@
 ## @deftypefnx {Function File} {} movefile (@var{f1}, @var{f2})
 ## @deftypefnx {Function File} {} movefile (@var{f1}, @var{f2}, 'f')
 ## @deftypefnx {Function File} {[@var{status}, @var{msg}, @var{msgid}] =} movefile (@dots{})
-## Move the file @var{f1} to the destination @var{f2}.
+## Move the source files or directories @var{f1} to the destination @var{f2}.
 ##
 ## The name @var{f1} may contain globbing patterns.  If @var{f1} expands to
 ## multiple file names, @var{f2} must be a directory.  If no destination
 ## @var{f2} is specified then the destination is the present working directory.
 ## If @var{f2} is a file name then @var{f1} is renamed to @var{f2}.
+##
 ## When the force flag @qcode{'f'} is given any existing files will be
 ## overwritten without prompting.
 ##
@@ -50,7 +51,7 @@
   msgid = "";
 
   ## FIXME: maybe use the same method as in ls to allow users control
-  ## over the command that is executed.
+  ##        over the command that is executed.
 
   if (ispc () && ! isunix ()
       && isempty (file_in_path (getenv ("PATH"), "mv.exe")))
@@ -63,28 +64,25 @@
   endif
 
   ## Input type check.
-  if (! (ischar (f1) || iscellstr (f1)))
-    error ("movefile: F1 must be a character string or a cell array of character strings");
+  if (ischar (f1))
+    f1 = cellstr (f1);
+  elseif (! iscellstr (f1))
+    error ("copyfile: F1 must be a string or a cell array of strings");
   endif
 
   if (nargin == 1)
     f2 = pwd ();
   elseif (! ischar (f2))
-    error ("movefile: F2 must be a character string");
+    error ("movefile: F2 must be a string");
   endif
 
   if (nargin == 3 && strcmp (force, "f"))
     cmd = [cmd " " cmd_force_flag];
   endif
 
-  ## If f1 isn't a cellstr convert it to one.
-  if (ischar (f1))
-    f1 = cellstr (f1);
-  endif
-
   ## If f1 has more than 1 element f2 must be a directory
   isdir = (exist (f2, "dir") != 0);
-  if (length (f1) > 1 && ! isdir)
+  if (numel (f1) > 1 && ! isdir)
     error ("movefile: when moving multiple files, F2 must be a directory");
   endif
 
@@ -137,3 +135,35 @@
 
 endfunction
 
+
+%!test
+%! unwind_protect
+%!   f1 = tempname;
+%!   tmp_var = pi;
+%!   save (f1, "tmp_var");
+%!   fid = fopen (f1, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   f2 = tempname;
+%!   assert (movefile (f1, f2));
+%!   assert (! exist (f1, "file"));
+%!   assert (exist (f2, "file"));
+%!   fid = fopen (f2, "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("moved file not equal to original file!");
+%!   endif
+%! unwind_protect_cleanup
+%!   delete (f2);
+%! end_unwind_protect
+
+## Test input validation
+%!error movefile ()
+%!error movefile (1,2,3,4)
+%!error <F1 must be a string> movefile (1, "foobar")
+%!error <F2 must be a string> movefile ("foobar", 1)
+%!error <F2 must be a directory> movefile ({"a", "b"}, "%_NOT_A_DIR_%")
+
--- a/scripts/miscellaneous/namelengthmax.m
+++ b/scripts/miscellaneous/namelengthmax.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -18,12 +18,13 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} namelengthmax ()
-## Return the @sc{matlab} compatible maximum variable name length.  Octave is
-## capable of storing strings up to @math{2^{31} - 1} in length.
-## However for @sc{matlab} compatibility all variable, function,
-## and structure field names should be shorter than the length supplied by
-## @code{namelengthmax}.  In particular variables stored to a @sc{matlab} file
-## format will have their names truncated to this length.
+## Return the @sc{matlab} compatible maximum variable name length.
+##
+## Octave is capable of storing strings up to @math{2^{31} - 1} in length.
+## However for @sc{matlab} compatibility all variable, function, and structure
+## field names should be shorter than the length returned by
+## @code{namelengthmax}.  In particular, variables stored to a @sc{matlab} file
+## format (@file{*.mat}) will have their names truncated to this length.
 ## @end deftypefn
 
 function n = namelengthmax ()
--- a/scripts/miscellaneous/news.m
+++ b/scripts/miscellaneous/news.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -24,6 +24,7 @@
 ## When called without an argument, display the NEWS file for Octave.
 ## When given a package name @var{package}, display the current NEWS file for
 ## that package.
+## @seealso{ver, pkg}
 ## @end deftypefn
 
 function news (package = "octave")
new file mode 100644
--- /dev/null
+++ b/scripts/miscellaneous/open.m
@@ -0,0 +1,78 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{output} =} open @var{file}
+## @deftypefnx {Function File} {@var{output} =} open (@var{file})
+## Open the file @var{file} in Octave or in an external application
+## based on the file type as determined by the file name extension.
+##
+## Recognized file types are
+##
+## @table @code
+## @item .m
+## Open file in the editor.
+##
+## @item .mat
+## Load the file in the base workspace.
+##
+## @item .exe
+## Execute the program (on Windows systems only).
+## @end table
+##
+## Other file types are opened in the appropriate external application.
+## @end deftypefn
+
+function output = open (file)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  if (! ischar (file))
+    error ("expecting argument to be a file name");
+  endif
+
+  [~, ~, ext] = fileparts (file);
+
+  if (strcmpi (ext, ".m"))
+    edit (file);
+  elseif (strcmpi (ext, ".mat"))
+    if (nargout > 0)
+      output = load (file);
+    else
+      evalin ("base", sprintf ("load ('%s');", file));
+    endif
+  elseif (any (strcmpi (ext, {".fig", ".mdl", ".slx", ".prj"})))
+    error ("opening file type '%s' is not supported", ext);
+  elseif (strcmpi (ext, ".exe"))
+    if (ispc ())
+      dos (file);
+    else
+      error ("executing .exe files is only supported on Windows systems");
+    endif
+  else
+    __open_with_system_app__ (file);
+  endif
+
+endfunction
+
+## Test input validation
+%!error open
+%!error open (1)
+%!error output = open (1)
--- a/scripts/miscellaneous/orderfields.m
+++ b/scripts/miscellaneous/orderfields.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Paul Kienzle
+## Copyright (C) 2006-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -17,20 +17,23 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{t}, @var{p}] =} orderfields (@var{s1})
-## @deftypefnx {Function File} {[@var{t}, @var{p}] =} orderfields (@var{s1}, @var{s2})
-## Return a copy of @var{s1} with fields arranged alphabetically or as
-## specified by @var{s2}.
-##
-## Given one struct, arrange field names in @var{s1} alphabetically.
+## @deftypefn  {Function File} {@var{sout}] =} orderfields (@var{s1})
+## @deftypefnx {Function File} {@var{sout}] =} orderfields (@var{s1}, @var{s2})
+## @deftypefnx {Function File} {@var{sout}] =} orderfields (@var{s1}, @{@var{cellstr}@})
+## @deftypefnx {Function File} {@var{sout}] =} orderfields (@var{s1}, @var{p})
+## @deftypefnx {Function File} {[@var{sout}, @var{p}] =} orderfields (@dots{})
+## Return a @emph{copy} of @var{s1} with fields arranged alphabetically, or as
+## specified by the second input.
 ##
-## If the second argument is a struct, arrange field names in @var{s1} as they
+## Given one input struct @var{s1}, arrange field names alphabetically.
+##
+## If a second struct argument is given, arrange field names in @var{s1} as they
 ## appear in @var{s2}.  The second argument may also specify the order in a
-## permutation vector or a cell array of strings containing the fieldnames of
-## @var{s1} in the desired order.
+## cell array of strings @var{cellstr}.  The second argument may also be a
+## permutation vector.
 ##
-## The optional second output argument @var{p} is assigned the permutation
-## vector which converts the original name order into the new name order.
+## The optional second output argument @var{p} is the permutation vector which
+## converts the original name order to the new name order.
 ##
 ## Examples:
 ##
@@ -84,20 +87,18 @@
 ## @end group
 ## @end example
 ##
-## @seealso{getfield, rmfield, isfield, isstruct, fieldnames, struct}
+## @seealso{fieldnames, getfield, setfield, rmfield, isfield, isstruct, struct}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
 ## Adapted-By: jwe
 
-function [t, p] = orderfields (s1, s2)
+function [sout, p] = orderfields (s1, s2)
 
-  if (nargin == 1 || nargin == 2)
-    if (! isstruct (s1))
-      error ("orderfields: S1 must be a struct");
-    endif
-  else
+  if (nargin < 1 || nargin > 2)
     print_usage ();
+  elseif (! isstruct (s1))
+    error ("orderfields: S1 must be a struct");
   endif
 
   if (nargin == 1)
@@ -110,32 +111,34 @@
       ## Two structures: return the fields in the order of s2.
       names = fieldnames (s2);
       if (! isequal (sort (fieldnames (s1)), sort (names)))
-        error ("orderfields: structures do not have the same fields");
+        error ("orderfields: structures S1 and S2 do not have the same fields");
       endif
     elseif (iscellstr (s2))
       ## A structure and a list of fields: order by the list of fields.
       t1 = sort (fieldnames (s1));
       t2 = sort (s2(:));
       if (! isequal (t1, t2))
-        error ("orderfields: name list does not match structure fields");
+        error ("orderfields: CELLSTR list does not match structure fields");
       endif
       names = s2;
     elseif (isvector (s2))
       ## A structure and a permutation vector: permute the order of s1.
       names = fieldnames (s1);
-      t1 = sort (s2);
-      t1 = t1(:)';
-      t2 = 1:numel (names);
+      t1 = 1:numel (names);
+      t2 = sort (s2);
+      t2 = t2(:)';
       if (! isequal (t1, t2))
-        error ("orderfields: invalid permutation vector");
+        error ("orderfields: invalid permutation vector P");
       endif
       names = names(s2);
+    else
+      error ("orderfields: second argument must be structure, cellstr, or permutation vector");
     endif
   endif
 
   ## Corner case of empty struct
   if (isempty (names))
-    t = struct ();
+    sout = struct ();
     p = [];
   endif
 
@@ -150,19 +153,22 @@
   endif
 
   ## Permute the names in the structure.
-  if (numel (s1) == 0)
+  if (isempty (s1))
+    ## Corner case of empty structure.  Still need to re-order fields.
     args = cell (1, 2 * numel (names));
     args(1:2:end) = names;
     args(2:2:end) = {[]};
-    t = struct (args{:});
+    sout = struct (args{:});
+    ## inherit dimensions
+    sout = resize (sout, size (s1));
   else
     n = numel (s1);
     for i = 1:numel (names)
       el = names{i};
-      [t(1:n).(el)] = s1(:).(el);
+      [sout(1:n).(el)] = s1(:).(el);
     endfor
     ## inherit dimensions
-    t = reshape (t, size (s1));
+    sout = reshape (sout, size (s1));
   endif
 
 endfunction
@@ -202,4 +208,28 @@
 
 ## Corner case of empty struct, bug #40224
 %!assert (orderfields (struct ()), struct ())
+%!test
+%! s(2,2).a = 1;
+%! s(1,1).b = 2;
+%! s = resize (s, [1 0]);
+%! s2 = orderfields (s, {"b", "a"});
+%! assert (fieldnames (s2), {"b"; "a"});
+%! assert (size_equal (s, s2));
 
+## Test input validation
+%!error orderfields ()
+%!error orderfields (1,2,3)
+%!error <S1 must be a struct> orderfields (1)
+%!error <S1 and S2 do not have the same fields>
+%! s1.a = 1;
+%! s2.b = 2;
+%! orderfields (s1, s2);
+%!error <CELLSTR list does not match structure fields>
+%! s1.a = 1;
+%! orderfields (s1, {"b"});
+%!error <invalid permutation vector P>
+%! s1.a = 1;
+%! orderfields (s1, [2 1]);
+%!error <second argument must be structure, cellstr, or permutation vector>
+%! s1.a = 1;
+%! orderfields (s1, ones (2,2));
--- a/scripts/miscellaneous/pack.m
+++ b/scripts/miscellaneous/pack.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 John W. Eaton
+## Copyright (C) 1999-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,8 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} pack ()
-## Consolidate workspace memory in @sc{matlab}.  This function is provided for
-## compatibility, but does nothing in Octave.
+## Consolidate workspace memory in @sc{matlab}.
+##
+## This function is provided for compatibility, but does nothing in Octave.
+## @seealso{clear}
 ## @end deftypefn
 
 ## Author: jwe
@@ -28,3 +30,7 @@
 
 endfunction
 
+
+## No test needed for empty function
+%!assert (1)
+
--- a/scripts/miscellaneous/paren.m
+++ b/scripts/miscellaneous/paren.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/parseparams.m
+++ b/scripts/miscellaneous/parseparams.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Alexander Barth
+## Copyright (C) 2006-2015 Alexander Barth
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -52,7 +52,7 @@
 ## name of the caller function.
 ## The matching of options is case-insensitive.
 ##
-## @seealso{varargin}
+## @seealso{varargin, inputParser}
 ## @end deftypefn
 
 ## Author: Alexander Barth <abarth93@users.sourceforge.net>
@@ -105,3 +105,25 @@
   error ([fname, ": ", msg], varargin{:});
 endfunction
 
+
+%!test
+%! [reg, prop] = parseparams ({1, 2, "linewidth", 10});
+%! assert (reg, {[1], [2]});
+%! assert (prop, {"linewidth", 10});
+%!test
+%! [reg, prop] = parseparams ({1, 2, 3});
+%! assert (reg, {[1], [2], [3]});
+%! assert (isempty (prop));
+%!test
+%! [reg, prop] = parseparams ({"prop1", "val1"});
+%! assert (isempty (reg));
+%! assert (prop, {"prop1", "val1"});
+%!test
+%! [reg, prop1] = parseparams ({"linewidth", 5}, "linewidth", 10);
+%! assert (isempty (reg));
+%! assert (prop1, 5);
+
+%!error <needs odd number of arguments> parseparams ({1}, "linewidth")
+%!error <must be given as name-value pairs> parseparams ({1, "color"}, "linewidth", 5)
+%!error <unrecognized option: color> parseparams ({1, "color", 5}, "linewidth", 5)
+
--- a/scripts/miscellaneous/perl.m
+++ b/scripts/miscellaneous/perl.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Julian Schnidder
+## Copyright (C) 2008-2015 Julian Schnidder
 ##
 ## This file is part of Octave.
 ##
@@ -21,9 +21,11 @@
 ## @deftypefnx {Function File} {@var{output} =} perl (@var{scriptfile}, @var{argument1}, @var{argument2}, @dots{})
 ## @deftypefnx {Function File} {[@var{output}, @var{status}] =} perl (@dots{})
 ## Invoke Perl script @var{scriptfile}, possibly with a list of command line
-## arguments.  Return output in @var{output} and optional status in
-## @var{status}.  If @var{scriptfile} is not an absolute file name it is
-## is searched for in the current directory and then in the Octave loadpath.
+## arguments.
+##
+## Return output in @var{output} and optional status in @var{status}.  If
+## @var{scriptfile} is not an absolute file name it is searched for in the
+## current directory and then in the Octave loadpath.
 ## @seealso{system, python}
 ## @end deftypefn
 
@@ -49,3 +51,6 @@
 
 endfunction
 
+
+%!error <invalid arguments> perl (123)
+
new file mode 100644
--- /dev/null
+++ b/scripts/miscellaneous/private/__w2mpth__.m
@@ -0,0 +1,72 @@
+## Copyright (C) 2015 Philip Nienhuis
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*- 
+## @deftypefn {Function File} {@var{mingwpath} =} __w2mpth__ (@var{winpath})
+## Convert a Windows-style relative or full path name to MinGW style.
+##
+## @strong{Caution:} __w2mpth__ does not check the validity of the path.
+##
+## Examples:
+##
+## @example
+## @group
+##   mpth = __w2mpth__ ('D:\full\path\to\file.dat')
+##   @result{} '/D/full/path/to/file.dat'
+## @end group
+## @end example
+##
+## @example
+## @group
+##   mpth = __w2mpth__ ('relative\path\to\file.dat')
+##   @result{} 'relative/path/to/file.dat'
+## @end group
+## @end example
+##
+## @end deftypefn
+
+## Author: Philip Nienhuis <prnienhuis@users.sf.net>
+## Created: 2015-01-16
+
+function mingwpath = __w2mpth__ (winpath)
+
+  ## Check for platform
+  if (! ispc)
+    error ("__w2mpth__ should only be called on Windows platforms\n");
+  endif
+
+  ## Replace backslash file separators by forward slashes
+  mingwpath = strrep (winpath, '\', '/');
+  ## Also treat drive letter but beware of relative filenames
+  mingwpath = regexprep (mingwpath, '^([a-zA-Z]):', '/$1');
+
+endfunction
+
+
+## Use single quote strings for winpaths to cope with backslashes.
+## These tests are commented out until a better place is found (bug #44581)
+##%!test
+##%! if (ispc)
+##%!   assert (__w2mpth__ ('file.fil'), 'file.fil');
+##%!   assert (__w2mpth__ ('\file.fil'), '/file.fil');
+##%!   assert (__w2mpth__ ('G:\file.fil'), '/G/file.fil');
+##%!   assert (__w2mpth__ ('r:\subdir\file.fil'), '/r/subdir/file.fil');
+##%!   assert (__w2mpth__ ('relative\path\to\file.dat'),
+##%!                       'relative/path/to/file.dat')
+##%! endif
+
--- a/scripts/miscellaneous/private/__xzip__.m
+++ b/scripts/miscellaneous/private/__xzip__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Thorsten Meyer
+## Copyright (C) 2008-2015 Thorsten Meyer
 ## based on the original gzip function by David Bateman
 ##
 ## This file is part of Octave.
@@ -18,7 +18,7 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{entries} =} __xzip__ (@var{commandname}, @var{extension}, @var{commandtemplate}, @var{files}, @var{outdir})
+## @deftypefn {Function File} {@var{filelist} =} __xzip__ (@var{commandname}, @var{extension}, @var{commandtemplate}, @var{files}, @var{outdir})
 ## Undocumented internal function.
 ## @end deftypefn
 
@@ -30,23 +30,28 @@
 ## are not touched. Existing compressed files are silently overwritten.
 ## This is an internal function. Do not use directly.
 
-function entries = __xzip__ (commandname, extension,
-                             commandtemplate, files, outdir)
+function filelist = __xzip__ (commandname, extension, commandtemplate,
+                              files, outdir)
 
   if (nargin == 5 && ! exist (outdir, "dir"))
-    error ("__xzip__: OUTDIR output directory does not exist");
+    r = mkdir (outdir);
+    if (! r)
+      error ("%s: Failed to create output directory DIR", commandname);
+    endif
   endif
 
   if (ischar (files))
     files = cellstr (files);
-  endif
-  if (! iscellstr (files))
-    error ("__xzip__: FILES must be a character array or cellstr");
+  elseif (! iscellstr (files))
+    error ("%s: FILES must be a character array or cellstr", commandname);
   endif
 
   if (nargin == 4)
-    outdir = tmpnam ();
-    mkdir (outdir);
+    outdir = tempname ();
+    r = mkdir (outdir);
+    if (! r)
+      error ("%s: Failed to create temporary output directory", commandname);
+    endif
   endif
 
   cwd = pwd ();
@@ -61,31 +66,35 @@
 
     copyfile (files, outdir);
 
-    [d, f] = myfileparts (files);
+    fnames = fname_only (files);
 
     cd (outdir);
 
-    cmd = sprintf (commandtemplate, sprintf (" %s", f{:}));
+    cmd = sprintf (commandtemplate, sprintf (" %s", fnames{:}));
 
     [status, output] = system (cmd);
     if (status)
-      error ("__xzip__: %s command failed with exit status = %d",
-             commandname, status);
+      fcn = evalin ("caller", "mfilename ()");
+      error ("%s: %s command failed with exit status = %d",
+             fcn, commandname, status);
     endif
 
     if (nargin == 5)
       if (nargout > 0)
-        entries = cellfun(
+        ## FIXME: This doesn't work if a directory is compressed
+        filelist = cellfun (
             @(x) fullfile (outdir, sprintf ("%s.%s", x, extension)),
-            f, "uniformoutput", false);
+            fnames, "uniformoutput", false);
       endif
     else
-      movefile (cellfun (@(x) sprintf ("%s.%s", x, extension), f,
-                        "uniformoutput", false), cwd);
+      ## FIXME: This does not work when you try to compress directories
+      ##        The resulting name is dir/.gz which is totally wrong.
+      ##        See bug #43431.
+      movefile (cellfun (@(x) sprintf ("%s.%s", x, extension),
+                         fnames, "uniformoutput", false), cwd);
       if (nargout > 0)
-        ## FIXME this does not work when you try to compress directories
-        entries  = cellfun (@(x) sprintf ("%s.%s", x, extension),
-                            files, "uniformoutput", false);
+        filelist  = cellfun (@(x) sprintf ("%s.%s", x, extension),
+                             files, "uniformoutput", false);
       endif
     endif
 
@@ -99,35 +108,10 @@
 
 endfunction
 
-function [d, f] = myfileparts (files)
-  [d, f, ext] = cellfun ("fileparts", files, "uniformoutput", false);
-  f = cellfun (@(x, y) sprintf ("%s%s", x, y), f, ext,
-               "uniformoutput", false);
+function f = fname_only (files)
+  [~, f, ext] = cellfun ("fileparts", files, "uniformoutput", false);
+  f = cellfun (@(x, y) sprintf ("%s%s", x, y), f, ext, "uniformoutput", false);
   idx = cellfun ("isdir", files);
-  d(idx) = "";
   f(idx) = files(idx);
 endfunction
 
-
-## FIXME -- reinstate these tests if we invent a way to test private
-## functions directly.
-##
-## %!error <extension has to be a string with finite length>
-## %!  __xzip__ ("gzip", "", "gzip -r %s", "bla");
-## %!error <no files to move>
-## %!  __xzip__ ("gzip", ".gz", "gzip -r %s", tmpnam);
-## %!error <command failed with exit status>
-## %!  # test __xzip__ with invalid compression command
-## %!  unwind_protect
-## %!    filename = tmpnam;
-## %!    dummy    = 1;
-## %!    save (filename, "dummy");
-## %!    dirname  = tmpnam;
-## %!    mkdir (dirname);
-## %!    entry = __xzip__ ("gzip", ".gz", "xxxzipxxx -r %s 2>/dev/null",
-## %!                     filename, dirname);
-## %!  unwind_protect_cleanup
-## %!    delete (filename);
-## %!    rmdir (dirname);
-## %!  end_unwind_protect
-
--- a/scripts/miscellaneous/private/display_info_file.m
+++ b/scripts/miscellaneous/private/display_info_file.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/python.m
+++ b/scripts/miscellaneous/python.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Julian Schnidder
+## Copyright (C) 2008-2015 Julian Schnidder
 ## Copyright (C) 2012 Carnë Draug
 ##
 ## This file is part of Octave.
@@ -22,9 +22,11 @@
 ## @deftypefnx {Function File} {@var{output} =} python (@var{scriptfile}, @var{argument1}, @var{argument2}, @dots{})
 ## @deftypefnx {Function File} {[@var{output}, @var{status}] =} python (@dots{})
 ## Invoke Python script @var{scriptfile}, possibly with a list of command line
-## arguments.  Return output in @var{output} and optional status in
-## @var{status}.  If @var{scriptfile} is not an absolute file name it is
-## is searched for in the current directory and then in the Octave loadpath.
+## arguments.
+##
+## Return output in @var{output} and optional status in @var{status}.  If
+## @var{scriptfile} is not an absolute file name it is searched for in the
+## current directory and then in the Octave loadpath.
 ## @seealso{system, perl}
 ## @end deftypefn
 
@@ -48,3 +50,6 @@
 
 endfunction
 
+
+%!error <invalid arguments> python (123)
+
--- a/scripts/miscellaneous/recycle.m
+++ b/scripts/miscellaneous/recycle.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -21,10 +21,15 @@
 ## @deftypefnx {Function File} {@var{old_state} =} recycle (@var{new_state})
 ## Query or set the preference for recycling deleted files.
 ##
-## Recycling files, instead of permanently deleting them, is not currently
-## implemented in Octave.  To help avoid accidental data loss an error
-## will be raised if an attempt is made to enable file recycling.
-## @seealso{delete}
+## When recycling is enabled, commands which would permanently erase files
+## instead move them to a temporary location (such as the directory labeled
+## Trash).
+##
+## Programming Note: This function is provided for @sc{matlab} compatibility,
+## but recycling is not implemented in Octave.  To help avoid accidental data
+## loss an error will be raised if an attempt is made to enable file
+## recycling.
+## @seealso{delete, rmdir}
 ## @end deftypefn
 
 ## Author: jwe
@@ -42,16 +47,16 @@
   endif
 
   if (nargin == 1)
-    if (ischar (state))
-      if (strcmpi (state, "on"))
-        error ("recycle: recycling files is not implemented");
-      elseif (strcmpi (state, "off"))
-        current_state = "off";
-      else
-        error ("recycle: invalid value of STATE = '%s'", state);
-      endif
+    if (! ischar (state))
+      error ("recycle: STATE must be a character string");
+    endif
+
+    if (strcmpi (state, "on"))
+      error ("recycle: recycling files is not implemented");
+    elseif (strcmpi (state, "off"))
+      current_state = "off";
     else
-      error ("recycle: STATE must be a character string");
+      error ("recycle: invalid value of STATE = '%s'", state);
     endif
   endif
 
@@ -62,7 +67,8 @@
 %! recycle ("off");
 %! assert (recycle ("off"), "off");
 
-%!error <recycling files is not implemented> recycle ("on")
 %!error recycle ("on", "and I mean it")
 %!error <STATE must be a character string> recycle (1)
+%!error <recycling files is not implemented> recycle ("on")
+%!error <invalid value of STATE = 'foobar'> recycle ("foobar")
 
--- a/scripts/miscellaneous/rmappdata.m
+++ b/scripts/miscellaneous/rmappdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -17,9 +17,15 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} rmappdata (@var{h}, @var{name})
-## Delete the named application data for the object(s) with
-## handle(s) @var{h}.
+## @deftypefn  {Function File} {} rmappdata (@var{h}, @var{name})
+## @deftypefnx {Function File} {} rmappdata (@var{h}, @var{name1}, @var{name2}, @dots{})
+## Delete the application data @var{name} from the graphics object with handle
+## @var{h}.
+##
+## @var{h} may also be a vector of graphics handles.  Multiple application data
+## names may be supplied to delete several properties at once.
+##
+## @seealso{setappdata, getappdata, isappdata}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
@@ -27,21 +33,28 @@
 
 function rmappdata (h, varargin)
 
-  if (! (all (ishandle (h)) && iscellstr (varargin)))
-    error ("rmappdata: invalid input");
+  if (nargin < 2)
+    print_usage ();
+  endif
+
+  h = h(:).';
+  if (! all (ishandle (h)))
+    error ("rmappdata: H must be a scalar or vector of graphic handles");
+  elseif (! iscellstr (varargin))
+    error ("rmappdata: NAME must be a string");
   endif
 
-  for nh = 1:numel (h)
-    if (isprop (h(nh), "__appdata__"))
-      appdata = get (h(nh), "__appdata__");
-      for v = 1:numel(varargin)
-        if (isfield (appdata, varargin{v}))
-          appdata = rmfield (appdata, varargin{v});
-        else
-          error ("rmappdata: appdata '%s' is not present")
-        endif
-      endfor
-      set (h(nh), "__appdata__", appdata);
+  for hg = h
+    if (isprop (hg, "__appdata__"))
+      appdata = get (hg, "__appdata__");
+      vld = isfield (appdata, varargin);
+      if (! all (vld))
+        ## FIXME: Should we bother to error out?  Or just silently continue?
+        missing = varargin{find (! vld, 1)};
+        error ("rmappdata: appdata '%s' is not present", missing);
+      endif
+      appdata = rmfield (appdata, varargin);
+      set (hg, "__appdata__", appdata);
     endif
   endfor
 
@@ -49,14 +62,21 @@
 
 
 %!test
-%! setappdata (0, "hello", "world");
-%! rmappdata (0, "hello");
-%! assert (isappdata (0, "hello"), false);
+%! setappdata (0, "%hello%", "world");
+%! rmappdata (0, "%hello%");
+%! assert (isappdata (0, "%hello%"), false);
 
 %!test
-%! setappdata (0, "data1", rand (3));
-%! setappdata (0, "data2", {"hello", "world"});
-%! rmappdata (0, "data1", "data2");
-%! assert (isappdata (0, "data1"), false);
-%! assert (isappdata (0, "data2"), false);
+%! setappdata (0, "%data1%", ones (3));
+%! setappdata (0, "%data2%", {"hello", "world"});
+%! rmappdata (0, "%data1%", "%data2%");
+%! assert (isappdata (0, "%data1%"), false);
+%! assert (isappdata (0, "%data2%"), false);
 
+## Test input validation
+%!error rmappdata ()
+%!error rmappdata (1)
+%!error <H must be a scalar .* graphic handle> rmappdata (-1, "hello")
+%!error <NAME must be a string> rmappdata (0, 1)
+%!error <appdata 'foobar' is not present> rmappdata (0, "foobar")
+
--- a/scripts/miscellaneous/run.m
+++ b/scripts/miscellaneous/run.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -31,9 +31,10 @@
 ## falling back to the script name without an extension.
 ##
 ## Implementation Note: If @var{script} includes a path component, then
-## @code{run} first changes the directory to the directory where @var{script}
-## is found.  @code{run} then executes the script, and returns to the original
-## directory.
+## @code{run} first changes the working directory to the directory where
+## @var{script} is found.  Next, the script is executed.  Finally, @code{run}
+## returns to the original working directory unless @code{script} has
+## specifically changed directories.
 ## @seealso{path, addpath, source}
 ## @end deftypefn
 
@@ -59,13 +60,16 @@
 
   if (! isempty (d))
     if (exist (d, "dir"))
-      wd = pwd ();
+      startdir = pwd ();
+      d = canonicalize_file_name (d);
       unwind_protect
         cd (d);
-        evalin ("caller", sprintf ('source ("%s%s");', f, ext),
+        evalin ("caller", sprintf ("source ('%s%s');", f, ext),
                 "rethrow (lasterror ())");
       unwind_protect_cleanup
-        cd (wd);
+        if (strcmp (d, pwd ()))
+          cd (startdir);
+        endif
       end_unwind_protect
     else
       error ("run: the path %s doesn't exist", d);
@@ -77,13 +81,13 @@
       ## Search PATH with null extension ('.' will be stripped and ext = "")
       script = which ([script "."]);
     endif
-    evalin ("caller", sprintf ('source ("%s");', script),
+    evalin ("caller", sprintf ("source ('%s');", script),
             "rethrow (lasterror ())");
   endif
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error run ()
 %!error run ("a", "b")
 %!error <SCRIPT must exist> run ("__A_very_#unlikely#_file_name__")
--- a/scripts/miscellaneous/semicolon.m
+++ b/scripts/miscellaneous/semicolon.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/miscellaneous/setappdata.m
+++ b/scripts/miscellaneous/setappdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -17,11 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} setappdata (@var{h}, @var{name}, @var{value})
-## Set the named application data to @var{value} for the object(s) with
-## handle(s) @var{h}.  If the application data with the specified name does
-## not exist, it is created.
-## @seealso{getappdata, guidata, get, set, getpref, setpref}
+## @deftypefn  {Function File} {} setappdata (@var{h}, @var{name}, @var{value})
+## @deftypefnx {Function File} {} setappdata (@var{h}, @var{name1}, @var{value1}, @var{name2}, @var{value3}, @dots{})
+## Set the application data @var{name} to @var{value} for the graphics object
+## with handle @var{h}.
+##
+## @var{h} may also be a vector of graphics handles.  If the application data
+## with the specified @var{name} does not exist, it is created.  Multiple
+## @var{name}/@var{value} pairs can be specified at a time.
+##
+## @seealso{getappdata, isappdata, rmappdata, guidata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
@@ -29,35 +34,62 @@
 
 function setappdata (h, varargin)
 
-  if (! (all (ishandle (h)) && mod (numel (varargin), 2) == 0))
-    error ("setappdata: invalid input");
+  h = h(:).';
+  if (! all (ishandle (h)))
+    error ("setappdata: H must be a scalar or vector of graphic handles");
+  elseif (mod (numel (varargin), 2) != 0)
+    error ("setappdata: NAME/VALUE arguments must occur in pairs");
   endif
 
-  for nh = 1:numel (h)
-    if (! isfield (get (h(nh)), "__appdata__"))
-      addproperty ("__appdata__", h(nh), "any", struct ());
-    endif
-    appdata = get (h(nh), "__appdata__");
+  for hg = h
+    try
+      appdata = get (hg, "__appdata__");
+    catch
+      appdata = struct ();
+      addproperty ("__appdata__", hg, "any", appdata);
+    end_try_catch
+
     for narg = 1:2:numel (varargin)
-      if (iscellstr (varargin{narg}))
+      if (ischar (varargin{narg}))
+        appdata.(varargin{narg}) = varargin{narg+1};
+      elseif (iscellstr (varargin{narg}))
         ## Handle cell arrays like set() does.
-        set (h(nh), "__appdata__", appdata);
-        setappdata (h(nh), vertcat (varargin{narg}', varargin{narg+1}'){:});
-        appdata = get (h(nh), "__appdata__");
-      elseif (ischar (varargin{narg}))
-        appdata.(varargin{narg}) = varargin{narg+1};
+        set (hg, "__appdata__", appdata);
+        setappdata (hg, vertcat (varargin{narg}', varargin{narg+1}'){:});
+        appdata = get (hg, "__appdata__");
       else
-        error ("setappdata: invalid input");
+        error ("setappdata: NAME must be a string or cellstr");
       endif
     endfor
-    set (h(nh), "__appdata__", appdata);
+
+    set (hg, "__appdata__", appdata);
   endfor
 
 endfunction
 
 
 %!test
-%! setappdata (0, "hello", "world");
-%! assert (isappdata (0, "hello"), true);
-%! assert (getappdata (0, "hello"), "world");
+%! unwind_protect
+%!   setappdata (0, "%hello%", "world");
+%!   assert (isappdata (0, "%hello%"), true);
+%!   assert (getappdata (0, "%hello%"), "world");
+%! unwind_protect_cleanup
+%!   rmappdata (0, "%hello%");
+%! end_unwind_protect
 
+%!test
+%! unwind_protect
+%!   setappdata (0, "%data1%", ones (3), "%data2%", "hello world");
+%!   assert (getappdata (0, "%data1%"), ones (3));
+%!   assert (getappdata (0, "%data2%"), "hello world");
+%!   setappdata (0, "%data1%", zeros (3));
+%!   assert (getappdata (0, "%data1%"), zeros (3));
+%! unwind_protect_cleanup
+%!   rmappdata (0, "%data1%", "%data2%");
+%! end_unwind_protect
+
+## Test input validation
+%!error <H must be a scalar .* graphic handle> rmappdata (-1, "hello")
+%!error <NAME must be a string> setappdata (0, 1, 2)
+%!error <NAME/VALUE arguments must occur in pairs> setappdata (0, "1")
+
--- a/scripts/miscellaneous/setfield.m
+++ b/scripts/miscellaneous/setfield.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Etienne Grossmann
+## Copyright (C) 2000-2015 Etienne Grossmann
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -18,10 +18,12 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{s} =} setfield (@var{s}, @var{field}, @var{val})
-## @deftypefnx {Function File} {@var{s} =} setfield (@var{s}, @var{idx1}, @var{field1}, @var{idx2}, @var{field2}, @dots{}, @var{val})
+## @deftypefn  {Function File} {@var{sout} =} setfield (@var{s}, @var{field}, @var{val})
+## @deftypefnx {Function File} {@var{sout} =} setfield (@var{s}, @var{sidx1}, @var{field1}, @var{fidx1}, @var{sidx2}, @var{field2}, @var{fidx2}, @dots{}, @var{val})
 ##
-## Set a field member @var{field} in a structure @var{s} equal to @var{val}.
+## Return a @emph{copy} of the structure @var{s} with the field member
+## @var{field} set to the value @var{val}.
+##
 ## For example:
 ##
 ## @example
@@ -40,24 +42,29 @@
 ##
 ## @noindent
 ## Note that ordinary structure syntax @code{@var{s}.foo bar = 42} cannot be
-## used here, as the field name is not a valid Octave identifier.  Using
-## arbitrary strings for field name is incompatible with @sc{matlab}, so
-## this usage will warn if the @code{Octave:matlab-incompatible} warning
-## is set.  @xref{XREFwarning_ids}.
+## used here, as the field name is not a valid Octave identifier because of
+## the space character.  Using arbitrary strings for field names is
+## incompatible with @sc{matlab}, and this usage will emit a warning if the
+## warning ID @code{Octave:language-extension} is enabled.
+## @xref{XREFwarning_ids}.
 ##
-## With the second calling form, set a field on a structure array,
-## possibly nested, with successive nested indices @var{idx1},
-## @var{idx2}, @dots{} and fields @var{field1}, @var{field2}, @dots{}
-## The indices must be cells containing the desired index at this
-## nesting depth.
+## With the second calling form, set a field of a structure array.  The
+## input @var{sidx} selects an element of the structure array, @var{field}
+## specifies the field name of the selected element, and @var{fidx} selects
+## which element of the field (in the case of an array or cell array).
+## The @var{sidx}, @var{field}, and @var{fidx} inputs can be repeated to
+## address nested structure array elements.  The structure array index and
+## field element index must be cell arrays while the field name must be a
+## string.
 ##
-## Thus consider instead,
+## For example:
 ##
 ## @example
 ## @group
 ## @var{s} = struct ("baz", 42);
-## setfield (@var{s}, @{1@}, "foo", @{1@}, "bar", 5)
-##     @result{} ans =
+## setfield (@var{s}, @{1@}, "foo", @{1@}, "bar", 54)
+## @result{}
+##   ans =
 ##     scalar structure containing the fields:
 ##       baz =  42
 ##       foo =
@@ -66,54 +73,61 @@
 ## @end group
 ## @end example
 ##
-## Here we first have an ordinary structure array with one field
-## @code{baz} set to 42.  Then we set another field in a nested scalar structure
-## indexing with two single cells containing the unique desired indices.
+## The example begins with an ordinary scalar structure to which a nested
+## scalar structure is added.  In all cases, if the structure index @var{sidx}
+## is not specified it defaults to 1 (scalar structure).  Thus, the example
+## above could be written more concisely as
+## @code{setfield (@var{s}, "foo", "bar", 54)}
 ##
-## Finally an example with nested structure arrays,
+## Finally, an example with nested structure arrays:
 ##
 ## @example
 ## @group
 ## @var{sa}.foo = 1;
-## @var{sa} = setfield (@var{sa}, @{2@}, "bar", @{3@}, "baz", 6);
+## @var{sa} = setfield (@var{sa}, @{2@}, "bar", @{3@}, "baz", @{1, 4@}, 5);
 ## @var{sa}(2).bar(3)
-##      @result{} ans =
-##      scalar structure containing the fields:
-##        baz =  6
+## @result{}
+##   ans =
+##     scalar structure containing the fields:
+##       baz =  0   0   0   5
 ## @end group
 ## @end example
 ##
-## Here @var{sa} is a structure array whose field @code{fd} at elements
-## 1 and 2 field is in turn
-## another structure array whose third element is a structure
+## Here @var{sa} is a structure array whose field at elements 1 and 2 is in
+## turn another structure array whose third element is a simple scalar
+## structure.  The terminal scalar structure has a field which contains a
+## matrix value.
 ##
 ## Note that the same result as in the above example could be achieved by:
 ##
 ## @example
 ## @group
-## @var{SA}.foo = 1;
-## @var{SA}(2).bar(3).baz = 6
+## @var{sa}.foo = 1;
+## @var{sa}(2).bar(3).baz(1,4) = 5
 ## @end group
 ## @end example
-## @seealso{getfield, rmfield, isfield, fieldnames, isstruct, struct}
+## @seealso{getfield, rmfield, orderfields, isfield, fieldnames, isstruct, struct}
 ## @end deftypefn
 
 ## Author:  Etienne Grossmann <etienne@cs.uky.edu>
 
-function obj = setfield (obj, varargin)
+function sout = setfield (s, varargin)
+
   if (nargin < 3)
     print_usage ();
   endif
+
   subs = varargin(1:end-1);
-  rhs = varargin{end};
+  val = varargin{end};
   flds = cellfun ("isclass", subs, "char");
   idxs = cellfun ("isclass", subs, "cell");
-  if (all (flds | idxs))
-    typs = merge (flds, {"."}, {"()"});
-    obj = subsasgn (obj, struct ("type", typs, "subs", subs), rhs);
-  else
+  if (! all (flds | idxs))
     error ("setfield: invalid index");
   endif
+
+  typs = ifelse (flds, {"."}, {"()"});
+  sout = subsasgn (s, struct ("type", typs, "subs", subs), val);
+
 endfunction
 
 
@@ -121,9 +135,15 @@
 %! x.a = "hello";
 %! x = setfield (x, "b", "world");
 %! y = struct ("a", "hello", "b", "world");
-%! assert (x,y);
+%! assert (x, y);
 %!test
 %! oo(1,1).f0 = 1;
-%! oo = setfield (oo,{1,2},"fd",{3},"b", 6);
-%! assert (oo(1,2).fd(3).b, 6);
+%! oo = setfield (oo,{1,2},"fd",{3},"b", {1,4}, 6);
+%! assert (oo(1,2).fd(3).b(1,4), 6);
 
+## Test input validation
+%!error setfield ()
+%!error setfield (1)
+%!error setfield (1,2)
+%!error <invalid index> setfield (1,2,3)
+
--- a/scripts/miscellaneous/substruct.m
+++ b/scripts/miscellaneous/substruct.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -19,8 +19,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} substruct (@var{type}, @var{subs}, @dots{})
-## Create a subscript structure for use with @code{subsref} or
-## @code{subsasgn}.  For example:
+## Create a subscript structure for use with @code{subsref} or @code{subsasgn}.
+##
+## For example:
 ##
 ## @example
 ## @group
@@ -35,7 +36,9 @@
 ##            [1,2] = :
 ##          @}
 ##        @}
-## x = [1, 2, 3; 4, 5, 6; 7, 8, 9];
+## x = [1, 2, 3;
+##      4, 5, 6;
+##      7, 8, 9];
 ## subsref (x, idx)
 ##    @result{} 7  8  9
 ## @end group
@@ -47,30 +50,28 @@
 
 function retval = substruct (varargin)
 
-  nargs = nargin;
-
-  if (nargs > 1 && mod (nargs, 2) == 0)
-    typ = varargin(1:2:nargs);
-    sub = varargin(2:2:nargs);
-    braces = strcmp (typ, "()") | strcmp (typ, "{}");
-    dots = strcmp (typ, ".");
-    if (all (braces | dots))
-      cells = cellfun ("isclass", sub, "cell");
-      chars = cellfun ("isclass", sub, "char");
-      if (any (braces &! cells))
-        error ("substruct: for TYPE == () or {}, SUBS must be a cell array");
-      elseif (any (dots &! chars))
-        error ("substruct: for TYPE == ., SUBS must be a character string");
-      endif
-    else
-      error ("substruct: expecting TYPE to be one of \"()\", \"{}\", or \".\"");
-    endif
-
-    retval = struct ("type", typ, "subs", sub);
-  else
+  if (nargin < 2 || mod (nargin, 2) != 0)
     print_usage ();
   endif
 
+  typ = varargin(1:2:nargin);
+  sub = varargin(2:2:nargin);
+  braces = strcmp (typ, "()") | strcmp (typ, "{}");
+  dots = strcmp (typ, ".");
+  if (all (braces | dots))
+    cells = cellfun ("isclass", sub, "cell");
+    chars = cellfun ("isclass", sub, "char");
+    if (any (braces & !cells))
+      error ("substruct: for TYPE == () or {}, SUBS must be a cell array");
+    elseif (any (dots & !chars))
+      error ("substruct: for TYPE == ., SUBS must be a character string");
+    endif
+  else
+    error ('substruct: expecting TYPE to be one of "()", "{}", or "."');
+  endif
+
+  retval = struct ("type", typ, "subs", sub);
+
 endfunction
 
 
--- a/scripts/miscellaneous/swapbytes.m
+++ b/scripts/miscellaneous/swapbytes.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -19,7 +19,9 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} swapbytes (@var{x})
 ## Swap the byte order on values, converting from little endian to big
-## endian and vice versa.  For example:
+## endian and vice versa.
+##
+## For example:
 ##
 ## @example
 ## @group
@@ -37,28 +39,35 @@
     print_usage ();
   endif
 
-  clx = class (x);
-  if (strcmp (clx, "int8") || strcmp (clx, "uint8") || isempty (x))
+  cls = class (x);
+  if (strcmp (cls, "int8") || strcmp (cls, "uint8") || isempty (x))
     y = x;
   else
-    if (strcmp (clx, "int16") || strcmp (clx, "uint16"))
+    if (strcmp (cls, "int16") || strcmp (cls, "uint16"))
       nb = 2;
-    elseif (strcmp (clx, "int32") || strcmp (clx, "uint32"))
+    elseif (strcmp (cls, "single")
+            || strcmp (cls, "int32") || strcmp (cls, "uint32"))
       nb = 4;
-    elseif (strcmp (clx, "int64") || strcmp (clx, "uint64")
-            || strcmp (clx, "double"))
+    elseif (strcmp (cls, "double")
+            || strcmp (cls, "int64") || strcmp (cls, "uint64"))
       nb = 8;
     else
-      error ("swapbytes: invalid class of object");
+      error ("swapbytes: invalid object of class '%s'", cls);
     endif
     y = reshape (typecast (reshape (typecast (x(:), "uint8"), nb, numel (x))
-                           ([nb : -1 : 1], :) (:), clx), size (x));
+                           ([nb : -1 : 1], :) (:), cls), size (x));
   endif
 
 endfunction
 
 
-%!assert (double (swapbytes (uint16 (1:4))), [256 512 768 1024])
-%!error (swapbytes ())
-%!error (swapbytes (1, 2))
+%!assert (swapbytes (uint16 (1:4)), uint16 ([256 512 768 1024]))
+%!test
+%! assert (swapbytes (swapbytes (pi)), pi);
+%! assert (swapbytes (swapbytes (single (pi))), single (pi));
 
+## Test input validation
+%!error swapbytes ()
+%!error swapbytes (1, 2)
+%!error <invalid object of class 'cell'> swapbytes ({1})
+
--- a/scripts/miscellaneous/symvar.m
+++ b/scripts/miscellaneous/symvar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -17,19 +17,39 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} symvar (@var{s})
-## Identify the argument names in the function defined by a string.
-## Common constant names such as @code{pi}, @code{NaN}, @code{Inf},
-## @code{eps}, @code{i} or @code{j} are ignored.  The arguments that are
-## found are returned in a cell array of strings.  If no variables are
-## found then the returned cell array is empty.
+## @deftypefn {Function File} {@var{vars} =} symvar (@var{str})
+## Identify the symbolic variable names in the string @var{str}.
+##
+## Common constant names such as @code{i}, @code{j}, @code{pi}, @code{Inf} and
+## Octave functions such as @code{sin} or @code{plot} are ignored.
+##
+## Any names identified are returned in a cell array of strings.  The array is
+## empty if no variables were found.
+##
+## Example:
+##
+## @example
+## @group
+## symvar ("x^2 + y^2 == 4")
+## @result{} @{
+##      [1,1] = x
+##      [2,1] = y
+##    @}
+## @end group
+## @end example
 ## @end deftypefn
 
-function args = symvar (s)
-  args = argnames (inline (s));
+function vars = symvar (str)
+  vars = argnames (inline (str));
+  ## Correct for auto-generated 'x' variable when no symvar was found.
+  if (numel (vars) == 1 && strcmp (vars{1}, "x") && ! any (str == "x"))
+    vars = {};
+  endif
+
 endfunction
 
 
-## This function is tested by the tests for argnames().
-%!assert (1)
+%!assert (symvar ("3*x + 4*y + 5*cos (z)"), {"x"; "y"; "z"})
+%!assert (symvar ("sin()^2 + cos()^2 == 1"), {})
+%!assert (symvar ("1./x"), {"x"})
 
--- a/scripts/miscellaneous/tar.m
+++ b/scripts/miscellaneous/tar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -17,37 +17,51 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{entries} =} tar (@var{tarfile}, @var{files})
-## @deftypefnx {Function File} {@var{entries} =} tar (@var{tarfile}, @var{files}, @var{root})
-## Pack @var{files} @var{files} into the TAR archive @var{tarfile}.  The
-## list of files must be a string or a cell array of strings.
+## @deftypefn  {Function File} {@var{filelist} =} tar (@var{tarfile}, @var{files})
+## @deftypefnx {Function File} {@var{filelist} =} tar (@var{tarfile}, @var{files}, @var{rootdir})
+## Pack the list of files and directories specified in @var{files} into the
+## TAR archive @var{tarfile}.
 ##
-## The optional argument @var{root} changes the relative path of @var{files}
-## from the current directory.
+## @var{files} is a character array or cell array of strings.  Shell
+## wildcards in the filename such as @samp{*} or @samp{?} are accepted and
+## expanded.  Directories are recursively traversed and all files are added to
+## the archive.
 ##
-## If an output argument is requested the entries in the archive are
-## returned in a cell array.
-## @seealso{untar, bzip2, gzip, zip}
+## If @var{rootdir} is defined then any files without absolute pathnames are
+## located relative to @var{rootdir} rather than the current directory.
+##
+## The optional output @var{filelist} is a list of the files that were included
+## in the archive.
+## @seealso{untar, unpack, bzip2, gzip, zip}
 ## @end deftypefn
 
 ## Author: Søren Hauberg <hauberg@gmail.com>
 
-function entries = tar (tarfile, files, root = ".")
+function filelist = tar (tarfile, files, rootdir = ".")
 
   if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
-  if (ischar (files))
+  if (! ischar (tarfile))
+    error ("tar: TARFILE must be a string");
+  elseif (ischar (files))
     files = cellstr (files);
+  elseif (! iscellstr (files))
+    error ("tar: FILES must be a character array or cellstr");
   endif
 
-  if (! (ischar (tarfile) && iscellstr (files) && ischar (root)))
-    error ("tar: all arguments must be character strings");
+  rootdir = tilde_expand (rootdir);
+
+  tarfile = make_absolute_filename (tarfile);
+
+  if (ispc)
+    ## Change tarfile into a mingw style acceptable for tar
+    tarfile = __w2mpth__ (tarfile);
   endif
 
-  cmd = sprintf ("tar cvf %s -C %s %s", tarfile, root,
-                 sprintf (" %s", files{:}));
+  cmd = sprintf ("tar cvf %s -C %s %s",
+                          tarfile, rootdir, sprintf (" %s", files{:}));
 
   [status, output] = system (cmd);
 
@@ -56,12 +70,69 @@
   endif
 
   if (nargout > 0)
-    if (output(end) == "\n")
-      output(end) = [];
-    endif
-    entries = ostrsplit (output, "\n");
-    entries = entries';
+    filelist = ostrsplit (output, "\r\n", true);
+    filelist = filelist';
   endif
 
 endfunction
 
+
+%!xtest
+%! ## test tar together with untar
+%! orig_dir = pwd ();
+%! unwind_protect
+%!   dirname = tarname = outdir = "";
+%!   dirname = tempname ();
+%!   assert (mkdir (dirname));
+%!   chdir (dirname);
+%!   dirname2 = "dir2";
+%!   assert (mkdir (dirname2));
+%!   fname1 = "file1";
+%!   fname2 = fullfile (dirname2, "file2");
+%!   fid = fopen (fname1, "wt");
+%!   assert (fid >= 0);
+%!   fdisp (fid, "Hello World");
+%!   fclose (fid);
+%!   fid = fopen (fname2, "wt");
+%!   assert (fid >= 0);
+%!   fdisp (fid, "Goodbye World");
+%!   fclose (fid);
+%!   tarname = [tempname() ".tar"];
+%!   filelist = tar (tarname, {dirname2, fname1});
+%!   if (! strcmp (filelist{3}, fname1))
+%!     error ("tar file contents does not match expected file");
+%!   endif
+%!   if (! exist (tarname, "file"))
+%!     error ("tar archive file cannot be found!");
+%!   endif
+%!   outdir = tempname;
+%!   untar (tarname, outdir);
+%!   fid = fopen (fullfile (outdir, fname1), "rt");
+%!   assert (fid >= 0);
+%!   str = fgetl (fid);
+%!   fclose (fid);
+%!   assert (str, "Hello World");
+%!   fid = fopen (fullfile (outdir, fname2), "rt");
+%!   assert (fid >= 0);
+%!   str = fgetl (fid);
+%!   fclose (fid);
+%!   assert (str, "Goodbye World");
+%! unwind_protect_cleanup
+%!   chdir (orig_dir);
+%!   unlink (tarname);
+%!   confirm_recursive_rmdir (false, "local");
+%!   if (exist (dirname))
+%!     rmdir (dirname, "s");
+%!   endif
+%!   if (exist (outdir))
+%!     rmdir (outdir, "s");
+%!   endif
+%! end_unwind_protect
+
+## Test input validation
+%!error tar ()
+%!error tar (1)
+%!error tar (1,2,3,4)
+%!error <TARFILE must be a string> tar (1, "foobar")
+%!error <FILES must be a character array or cellstr> tar ("foobar", 1)
+
--- a/scripts/miscellaneous/tempdir.m
+++ b/scripts/miscellaneous/tempdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 John W. Eaton
+## Copyright (C) 2003-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,12 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{dir} =} tempdir ()
-## Return the name of the system's directory for temporary files.
+## Return the name of the host system's directory for temporary files.
+##
+## The directory name is taken first from the environment variable
+## @env{TMPDIR}.  If that does not exist the system default returned by
+## @code{P_tmpdir} is used.
+## @seealso{P_tmpdir, tempname, mkstemp, tmpfile}
 ## @end deftypefn
 
 function dirname = tempdir ()
@@ -49,7 +54,11 @@
 %!   setenv ("TMPDIR", "__MY_TMP_DIR__");
 %!   assert (tempdir (), ["__MY_TMP_DIR__" filesep()]);
 %! unwind_protect_cleanup
-%!   setenv ("TMPDIR", old_tmpdir);
+%!   if (! isempty (old_tmpdir))
+%!     setenv ("TMPDIR", old_tmpdir);
+%!   else
+%!     unsetenv ("TMPDIR");
+%!   endif
 %!   warning (old_wstate);
 %! end_unwind_protect
 
deleted file mode 100644
--- a/scripts/miscellaneous/tempname.m
+++ /dev/null
@@ -1,36 +0,0 @@
-## Copyright (C) 2003-2013 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {Function File} {} tempname ()
-## @deftypefnx {Function File} {} tempname (@var{dir})
-## @deftypefnx {Function File} {} tempname (@var{dir}, @var{prefix})
-## This function is an alias for @code{tmpnam}.
-## @seealso{tmpnam}
-## @end deftypefn
-
-function filename = tempname (varargin)
-
-  filename = tmpnam (varargin{:});
-
-endfunction
-
-
-%% No tests needed for alias.
-%!assert (1)
-
new file mode 100644
--- /dev/null
+++ b/scripts/miscellaneous/tmpnam.m
@@ -0,0 +1,50 @@
+## Copyright (C) 2003-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{fname} =} tmpnam ()
+## @deftypefnx {Function File} {@var{fname} =} tmpnam (@var{dir})
+## @deftypefnx {Function File} {@var{fname} =} tmpnam (@var{dir}, @var{prefix})
+## Return a unique temporary file name as a string.
+##
+## If @var{prefix} is omitted, a value of @qcode{"oct-"} is used.
+## If @var{dir} is also omitted, the default directory for temporary files
+## (@code{P_tmpdir} is used.  If @var{dir} is provided, it must exist,
+## otherwise the default directory for temporary files is used.
+##
+## Programming Note: Because the named file is not opened by @code{tmpnam},
+## it is possible, though relatively unlikely, that it will not be available
+## by the time your program attempts to open it.  If this is a concern,
+## see @code{tmpfile}.  The functions @code{tmpnam} and @code{tempname} are
+## equivalent with the latter provided for @sc{matlab} compatibility.
+##
+## @strong{Caution}: @code{tmpnam} will be removed in a future version of
+## Octave.  Use the equivalent @code{tempname} in all new code.
+## @seealso{tempname, mkstemp, tempdir, P_tmpdir, tmpfile}
+## @end deftypefn
+
+function filename = tmpnam (varargin)
+
+  filename = tempname (varargin{:});
+
+endfunction
+
+
+## No tests needed for alias.
+%!assert (1)
+
--- a/scripts/miscellaneous/unix.m
+++ b/scripts/miscellaneous/unix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 John W. Eaton
+## Copyright (C) 2004-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -21,12 +21,15 @@
 ## @deftypefnx {Function File} {@var{status} =} unix ("@var{command}")
 ## @deftypefnx {Function File} {[@var{status}, @var{text}] =} unix ("@var{command}")
 ## @deftypefnx {Function File} {[@dots{}] =} unix ("@var{command}", "-echo")
-## Execute a system command if running under a Unix-like operating
-## system, otherwise do nothing.  Return the exit status of the program
-## in @var{status} and any output from the command in @var{text}.
+## Execute a system command if running under a Unix-like operating system,
+## otherwise do nothing.
+##
+## Octave waits for the external command to finish before returning the exit
+## status of the program in @var{status} and any output in @var{text}.
+##
 ## When called with no output argument, or the @qcode{"-echo"} argument is
 ## given, then @var{text} is also sent to standard output.
-## @seealso{dos, system, isunix, ispc}
+## @seealso{dos, system, isunix, ismac, ispc}
 ## @end deftypefn
 
 ## Author: octave-forge ???
--- a/scripts/miscellaneous/unpack.m
+++ b/scripts/miscellaneous/unpack.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Bill Denney
+## Copyright (C) 2006-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -21,13 +21,52 @@
 ## @deftypefnx {Function File} {@var{files} =} unpack (@var{file}, @var{dir})
 ## @deftypefnx {Function File} {@var{files} =} unpack (@var{file}, @var{dir}, @var{filetype})
 ## Unpack the archive @var{file} based on its extension to the directory
-## @var{dir}.  If @var{file} is a list of strings, then each file is
-## unpacked individually.  If @var{dir} is not specified, it defaults to
-## the current directory.  If a directory is in the file list, then the
-## @var{filetype} must also be specified.
+## @var{dir}.
+##
+## If @var{file} is a list of strings, then each file is unpacked
+## individually.  Shell wildcards in the filename such as @samp{*} or @samp{?}
+## are accepted and expanded.
+##
+## If @var{dir} is not specified or is empty (@code{[]}), it defaults to the
+## current directory.  If a directory is in the file list, then @var{filetype}
+## must also be specified.
+##
+## The specific archive filetype is inferred from the extension of the file.
+## The @var{filetype} may also be specified directly using a string which
+## corresponds to a known extension.
+##
+## Valid filetype extensions:
+##
+## @table @code
+## @item  bz
+## @itemx bz2
+## bzip archive
+##
+## @item gz
+## gzip archive
+##
+## @item tar
+## tar archive
+##
+## @item  tarbz
+## @itemx tarbz2
+## @itemx tbz
+## @itemx tbz2
+## tar + bzip archive
+##
+## @item  targz
+## @itemx tgz
+## tar + gzip archive
+##
+## @item z
+## compress archive
+##
+## @item zip
+## zip archive
+## @end table
 ##
 ## The optional return value is a list of @var{files} unpacked.
-## @seealso{bzip2, gzip, zip, tar}
+## @seealso{bunzip2, gunzip, unzip, untar, bzip2, gzip, zip, tar}
 ## @end deftypefn
 
 ## Author: Bill Denney <denney@seas.upenn.edu>
@@ -39,16 +78,24 @@
   endif
 
   if (! ischar (file) && ! iscellstr (file))
-    error ("unpack: invalid input file class, %s", class (file));
+    error ("unpack: FILE must be a string or cell array of strings");
   endif
 
-  ## character arrays of more than one string must be treated as cell strings
-  if (ischar (file) && ! isvector (file))
+  ## Convert char arrays to cell strings to simplify further processing
+  if (ischar (file))
     file = cellstr (file);
   endif
+  if (numel (file) == 1)
+    gfile = glob (file);
+    if (isempty (gfile))
+      error ('unpack: file "%s" not found', file{1});
+    else
+      file = gfile;
+    endif
+  endif
 
   ## Recursively unpack cellstr arrays one file at a time
-  if (iscellstr (file))
+  if (numel (file) > 1)
     files = {};
     for i = 1:numel (file)
       tmpfiles = unpack (file{i}, dir);
@@ -59,15 +106,17 @@
     if (nargout > 0)
       filelist = files;
     endif
+    return;
 
-    return;
+  else
+    file = file{1};
   endif
 
   if (isdir (file))
     if (isempty (filetype))
       error ("unpack: FILETYPE must be given for a directory");
     elseif (! any (strcmpi (filetype, "gunzip")))
-      error ("unpack: FILETYPE must be gunzip for a directory");
+      error ('unpack: FILETYPE must be "gunzip" for a directory');
     endif
     ext = ".gz";
   else
@@ -84,28 +133,18 @@
 
     ## If the file is a URL, download it and then work with that file.
     if (! isempty (strfind (file, "://")))
-      ## FIXME -- the above is not a perfect test for a URL
+      ## FIXME: The above code is not a perfect test for a URL
       urlfile = file;
-      ## FIXME -- should we name the file that we download with the
-      ## same file name as the URL requests?
-      tmpfile = [tmpnam() ext];
+      tmpfile = [tempname ext];
       [file, success, msg] = urlwrite (urlfile, tmpfile);
       if (! success)
-        error ('unpack: could not get "%s": %s', urlfile, msg);
+        error ('unpack: could not fetch "%s": %s', urlfile, msg);
       endif
     endif
 
   endif
 
-  ## canonicalize_file_name returns empty if the file isn't found, so
-  ## use that to check for existence.
-  cfile = canonicalize_file_name (file);
-
-  if (isempty (cfile))
-    error ('unpack: file "%s" not found', file);
-  else
-    file = cfile;
-  endif
+  file = make_absolute_filename (file);
 
   ## Instructions on what to do for any extension.
   ##
@@ -145,18 +184,27 @@
   endif
 
   ## Unzip doesn't actually care about the extension
-  if (strcmp (filetype, "unzip"))
+  if (strcmpi (filetype, "unzip"))
     nodotext = "zip";
   else
     nodotext = ext(ext != '.');
   endif
 
-  origdir = pwd ();
+  if (ispc && strcmp (nodotext, "tar"))
+    ## Change file pathname into a mingw style acceptable for tar
+    file = __w2mpth__ (file);
+  endif
 
-  if (isfield (commandlist, nodotext))
-    [commandv, commandq, parser, move] = deal (commandlist.(nodotext){:});
-    cstartdir = canonicalize_file_name (origdir);
-    cenddir = canonicalize_file_name (dir);
+  if (isfield (commandlist, tolower (nodotext)))
+    [commandv, commandq, parsefcn, move] = deal (commandlist.(nodotext){:});
+    origdir = pwd ();
+    if (move)
+      startdir = fileparts (file);
+    else
+      startdir = origdir;
+    endif
+    cstartdir = make_absolute_filename (startdir);
+    cenddir = make_absolute_filename (dir);
     needmove = move && ! strcmp (cstartdir, cenddir);
     if (nargout > 0 || needmove)
       command = commandv;
@@ -164,7 +212,7 @@
       command = commandq;
     endif
   else
-    warning ("unpack:filetype", "unrecognized file type, %s", ext);
+    warning ("unpack: unrecognized FILETYPE <%s>", ext);
     files = file;
     return;
   endif
@@ -193,24 +241,18 @@
   endif
 
   if (nargout > 0 || needmove)
-    ## Trim the last CR if needed.
-    ## FIXME -- will this need to change to a check for "\r\n" for windows?
-    if (output(end) == "\n")
-      output(end) = [];
-    endif
-    files = parser (ostrsplit (output, "\n"))';
+    ## Trim the last CR or NL if needed.
+    files = parsefcn (ostrsplit (output, "\r\n", true))';
 
-    ## Move files if necessary
+    ## Move files if necessary.
     if (needmove)
-      [st, msg, ~] = movefile (files, dir);
+      [st, msg] = movefile (files, cenddir);
       if (! st)
         error ('unpack: unable to move files to "%s": %s', dir, msg);
       endif
 
-      ## Fix the names for the files since they were moved.
-      for i = 1:numel (files)
-        files{i} = strrep (files{i}, cstartdir, cenddir);
-      endfor
+      ## Fix the names of the files since they were moved.
+      files = strrep (files, cstartdir, cenddir);
     endif
 
     ## Return output if requested.
@@ -224,9 +266,9 @@
 function files = __parse_zip__ (output)
   ## Parse the output from zip and unzip.
 
-  ## Skip first line which is Archive header
+  ## Skip first line which is Archive header.
   files = char (output(2:end));
-  ## Trim constant width prefix and return cell array
+  ## Trim constant width prefix and return cell array.
   files = cellstr (files(:,14:end))
 endfunction
 
@@ -249,3 +291,57 @@
   files = regexprep (output, '^\s+(.*)\.bz2: .*', '$1');
 endfunction
 
+
+%!test
+%! ## Create temporary directory and file for packing and unpacking
+%! dirname = tempname ();
+%! assert (mkdir (dirname));
+%! filename = tempname ();
+%! fid = fopen (filename, "wt");
+%! assert (fid >= 0);
+%! fprintf (fid, "Hello World\n");
+%! fprintf (fid, "123 456 789\n");
+%! fclose (fid);
+%! unwind_protect
+%!   copyfile (filename, [filename ".orig"]);
+%!   gzip (filename, dirname);
+%!   [~, f] = fileparts (filename);
+%!   filelist = unpack (fullfile (dirname, [f ".gz"]), P_tmpdir);
+%!   assert (filelist{1}, filename);
+%!   fid = fopen ([filename ".orig"], "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen (filename, "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("unpack: Unpacked file does not equal original");
+%!   endif
+%! unwind_protect_cleanup
+%!   unlink (filename);
+%!   unlink ([filename ".orig"]);
+%!   rmdir (dirname);
+%! end_unwind_protect
+
+## Test input validation
+%!error unpack ()
+%!error unpack (1,2,3,4)
+%!error <FILE must be a string or cell array of strings> unpack (1)
+%!error <file "_%NOT_A_FILENAME%_" not found> unpack ("_%NOT_A_FILENAME%_")
+%!error <file "_%NOT_A_FILENAME%_" not found> unpack ({"_%NOT_A_FILENAME%_"})
+%!error <file "_%NOT_A_FILENAME%_" not found> unpack ({"_%NOT_A_FILENAME%_", "2nd_filename"})
+%!error <FILETYPE must be given for a directory>
+%! if (isunix || ismac)
+%!   unpack ("/");
+%! else
+%!   unpack ('C:\');
+%! endif
+%!error <FILETYPE must be "gunzip" for a directory>
+%! if (isunix || ismac)
+%!   unpack ("/", [], "foobar");
+%! else
+%!   unpack ('C:\', [], "foobar");
+%! endif
+
--- a/scripts/miscellaneous/untar.m
+++ b/scripts/miscellaneous/untar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -19,26 +19,38 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} untar (@var{tarfile})
 ## @deftypefnx {Function File} {} untar (@var{tarfile}, @var{dir})
-## Unpack the TAR archive @var{tarfile} to the directory @var{dir}.
-## If @var{dir} is not specified, it defaults to the current directory.
+## Unpack the TAR archive @var{tarfile}.
+##
+## If @var{dir} is specified the files are unpacked in this directory rather
+## than the one where @var{tarfile} is located.
+##
+## The optional output @var{filelist} is a list of the uncompressed files.
 ## @seealso{tar, unpack, bunzip2, gunzip, unzip}
 ## @end deftypefn
 
 ## Author: Søren Hauberg <hauberg@gmail.com>
 ## Adapted-By: jwe, Bill Denney
 
-function varargout = untar (tarfile, dir = ".")
+function filelist = untar (tarfile, dir = [])
 
-  if (nargin != 1 && nargin != 2)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
+  if (isempty (dir))
+    dir = fileparts (tarfile);
+  endif
+
   if (nargout > 0)
-    varargout = cell (1, nargout);
-    [varargout{:}] = unpack (tarfile, dir, mfilename ());
+    filelist = unpack (tarfile, dir, "untar");
   else
-    unpack (tarfile, dir, mfilename ());
+    unpack (tarfile, dir, "untar");
   endif
 
 endfunction
 
+
+## Tests for this m-file are located in tar.m
+## Remove from test statistics
+%!assert (1)
+
--- a/scripts/miscellaneous/unzip.m
+++ b/scripts/miscellaneous/unzip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ##
 ## This file is part of Octave.
 ##
@@ -17,28 +17,40 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} unzip (@var{zipfile})
-## @deftypefnx {Function File} {} unzip (@var{zipfile}, @var{dir})
-## Unpack the ZIP archive @var{zipfile} to the directory @var{dir}.
-## If @var{dir} is not specified, it defaults to the current directory.
+## @deftypefn  {Function File} {@var{filelist} =} unzip (@var{zipfile})
+## @deftypefnx {Function File} {@var{filelist} =} unzip (@var{zipfile}, @var{dir})
+## Unpack the ZIP archive @var{zipfile}.
+##
+## If @var{dir} is specified the files are unpacked in this directory rather
+## than the one where @var{zipfile} is located.
+##
+## The optional output @var{filelist} is a list of the uncompressed files.
 ## @seealso{zip, unpack, bunzip2, gunzip, untar}
 ## @end deftypefn
 
 ## Author: Søren Hauberg <hauberg@gmail.com>
 ## Adapted-By: jwe, Bill Denney
 
-function varargout = unzip (zipfile, dir = ".")
+function filelist = unzip (zipfile, dir = [])
 
-  if (nargin != 1 && nargin != 2)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
+  if (isempty (dir))
+    dir = fileparts (zipfile);
+  endif
+
   if (nargout > 0)
-    varargout = cell (1, nargout);
-    [varargout{:}] = unpack (zipfile, dir, mfilename ());
+    filelist = unpack (zipfile, dir, "unzip");
   else
-    unpack (zipfile, dir, mfilename ());
+    unpack (zipfile, dir, "unzip");
   endif
 
 endfunction
 
+
+## Tests for this m-file are located in zip.m
+## Remove from test statistics
+%!assert (1)
+
--- a/scripts/miscellaneous/ver.m
+++ b/scripts/miscellaneous/ver.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2005-2015 William Poetra Yoga Hadisoeseno
 ##
 ## This file is part of Octave.
 ##
@@ -17,19 +17,21 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} ver ()
-## @deftypefnx {Function File} {v =} ver ()
-## @deftypefnx {Function File} {v =} ver ("Octave")
-## @deftypefnx {Function File} {v =} ver (@var{package})
+## @deftypefn  {Function File} {} ver
+## @deftypefnx {Function File} {} ver Octave
+## @deftypefnx {Function File} {} ver @var{package}
+## @deftypefnx {Function File} {v =} ver (@dots{})
 ##
 ## Display a header containing the current Octave version number, license
-## string, and operating system followed by a list of installed packages,
-## versions, and installation directories.
+## string, and operating system.  The header is followed by a list of installed
+## packages, versions, and installation directories.
 ##
-## @code{v = ver ()}
+## Use the package name @var{package} or Octave to limit the listing to a
+## desired component.
 ##
-## Return a vector of structures describing Octave and each installed package.
-## The structure includes the following fields.
+## When called with an output argument, return a vector of structures
+## describing Octave and each installed package.  The structure includes the
+## following fields.
 ##
 ## @table @code
 ## @item Name
@@ -45,71 +47,67 @@
 ## Date of the version/revision.
 ## @end table
 ##
-## @code{v = ver ("Octave")}
-##
-## Return version information for Octave only.
-##
-## @code{v = ver (@var{package})}
-##
-## Return version information for @var{package}.
-##
-## @seealso{version, octave_config_info}
+## @seealso{version, octave_config_info, usejava, pkg}
 ## @end deftypefn
 
 ## Author: William Poetra Yoga Hadisoeseno <williampoetra@gmail.com>
 
-function varargout = ver (package = "")
+function retval = ver (package = "")
 
   if (nargin > 1)
     print_usage ();
   endif
 
-  ## Start with the version info for Octave
-  ret = struct ("Name", "Octave", "Version", version,
-                "Release", [], "Date", []);
+  if (nargout == 0)
+    [unm, err] = uname ();
 
-  ## Add the installed packages
-  lst = pkg ("list");
-  for i = 1:length (lst)
-    ret(end+1) = struct ("Name", lst{i}.name, "Version", lst{i}.version,
-                         "Release", [], "Date", lst{i}.date);
-  endfor
-
-  if (nargout == 0)
-    octave_license = license ();
-
-    [unm, status] = uname ();
-
-    if (status < 0)
+    if (err)
       os_string = "unknown";
     else
-      os_string = sprintf ("%s %s %s %s", unm.sysname, unm.release,
-                           unm.version, unm.machine);
+      os_string = sprintf ("%s %s %s %s",
+                           unm.sysname, unm.release, unm.version, unm.machine);
     endif
 
     hbar(1:70) = "-";
-    ver_line1 = "GNU Octave Version ";
-    ver_line2 = "GNU Octave License: ";
-    ver_line3 = "Operating System: ";
+    desc = {hbar
+            ["GNU Octave Version: " OCTAVE_VERSION]
+            ["GNU Octave License: " license]
+            ["Operating System: " os_string]
+            hbar};
+
+    printf ("%s\n", desc{:});
 
-    ver_desc = sprintf ("%s\n%s%s\n%s%s\n%s%s\n%s\n", hbar, ver_line1, version,
-                        ver_line2, octave_license, ver_line3, os_string, hbar);
-
-    puts (ver_desc);
-
-    pkg ("list");
+    if (isempty (package))
+      pkg ("list");
+    elseif (strcmpi (package, "Octave"))
+      ## Nothing to do, Octave version was already reported
+    else
+      pkg ("list", package);
+    endif
   else
-    if (! isempty (package))
-      n = [];
-      for r = 1:numel (ret)
-        if (strcmpi (ret(r).Name, package))
-          n = r;
-          break;
-        endif
+    ## Get the installed packages
+    if (isempty (package))
+      lst = pkg ("list");
+      ## Start with the version info for Octave
+      retval = struct ("Name", "Octave", "Version", version,
+                       "Release", [], "Date", []);
+      for i = 1:numel (lst)
+        retval(end+1) = struct ("Name", lst{i}.name, "Version", lst{i}.version,
+                                "Release", [], "Date", lst{i}.date);
       endfor
-      ret = ret(n);
+    elseif (strcmpi (package, "Octave"))
+      retval = struct ("Name", "Octave", "Version", version,
+                       "Release", [], "Date", []);
+    else
+      lst = pkg ("list", package);
+      if (isempty (lst))
+        retval = struct ("Name", "", "Version", [],
+                         "Release", [], "Date", []);
+      else
+        retval = struct ("Name", lst{1}.name, "Version", lst{1}.version,
+                         "Release", [], "Date", lst{1}.date);
+      endif
     endif
-    varargout{1} = ret;
   endif
 
 endfunction
--- a/scripts/miscellaneous/version.m
+++ b/scripts/miscellaneous/version.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,11 +18,11 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} version ()
-## Return the version number of Octave, as a string.
+## Return the version number of Octave as a string.
 ##
 ## This is an alias for the function @w{@env{OCTAVE_VERSION}} provided for
 ## compatibility.
-## @seealso{OCTAVE_VERSION}
+## @seealso{OCTAVE_VERSION, ver}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/miscellaneous/warning_ids.m
+++ b/scripts/miscellaneous/warning_ids.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -122,11 +122,6 @@
 ## directory as the .oct file referred to by the autoload() command.
 ## By default, the @code{Octave:autoload-relative-file-name} warning is enabled.
 ##
-## @item Octave:broadcast
-## Warn when performing broadcasting operations.  By default, this is
-## enabled.  See @ref{Broadcasting} in the chapter Vectorization and Faster
-## Code Execution of the manual.
-##
 ## @item Octave:built-in-variable-assignment
 ## By default, the @code{Octave:built-in-variable-assignment} warning is
 ## enabled.
@@ -166,19 +161,19 @@
 ## printed for implicit conversions of complex numbers to real numbers.
 ## By default, the @code{Octave:imag-to-real} warning is disabled.
 ##
+## @item Octave:language-extension
+## Print warnings when using features that are unique to the Octave
+## language and that may still be missing in @sc{matlab}.
+## By default, the @code{Octave:language-extension} warning is disabled.
+## The @option{--traditional} or @option{--braindead} startup options for
+## Octave may also be of use, @pxref{Command Line Options}.
+##
 ## @item Octave:load-file-in-path
 ## By default, the @code{Octave:load-file-in-path} warning is enabled.
 ##
 ## @item Octave:logical-conversion
 ## By default, the @code{Octave:logical-conversion} warning is enabled.
 ##
-## @item Octave:matlab-incompatible
-## Print warnings for Octave language features that may cause
-## compatibility problems with @sc{matlab}.
-## By default, the @code{Octave:matlab-incompatible} warning is disabled.
-## The --traditional or --braindead startup options for Octave may also
-## be of use, @pxref{Command Line Options}.
-##
 ## @item Octave:md5sum-file-in-path
 ## By default, the @code{Octave:md5sum-file-in-path} warning is enabled.
 ##
@@ -299,8 +294,10 @@
 ## string constant.
 ## By default, the @code{Octave:single-quote-string} warning is disabled.
 ##
-## @item Octave:singular-matrix-div
-## By default, the @code{Octave:singular-matrix-div} warning is enabled.
+## @item  Octave:nearly-singular-matrix
+## @itemx Octave:singular-matrix
+## By default, the @code{Octave:nearly-singular-matrix} and
+## @code{Octave:singular-matrix} warnings are enabled.
 ##
 ## @item Octave:sqrtm:SingularMatrix
 ## By default, the @code{Octave:sqrtm:SingularMatrix} warning is enabled.
@@ -335,12 +332,11 @@
 ## @end table
 ##
 
-
 function warning_ids ()
   help ("warning_ids");
 endfunction
 
 
-## Remove from test statistics.  No real tests possible
+## Mark file as being tested.  No real test needed for a documentation .m file
 %!assert (1)
 
--- a/scripts/miscellaneous/what.m
+++ b/scripts/miscellaneous/what.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -20,56 +20,103 @@
 ## @deftypefn  {Command} {} what
 ## @deftypefnx {Command} {} what @var{dir}
 ## @deftypefnx {Function File} {w =} what (@var{dir})
-## List the Octave specific files in directory @var{dir}.  If @var{dir} is
-## not specified then the current directory is used.  If a return argument is
-## requested, the files found are returned in the structure @var{w}.
-## @seealso{which}
+## List the Octave specific files in directory @var{dir}.
+##
+## If @var{dir} is not specified then the current directory is used.
+##
+## If a return argument is requested, the files found are returned in the
+## structure @var{w}.  The structure contains the following fields:
+##
+## @table @asis
+## @item path
+## Full path to directory @var{dir}
+##
+## @item m
+## Cell array of m-files
+##
+## @item mat
+## Cell array of mat files
+##
+## @item mex
+## Cell array of mex files
+##
+## @item oct
+## Cell array of oct files
+##
+## @item mdl
+## Cell array of mdl files
+##
+## @item slx
+## Cell array of slx files
+##
+## @item p
+## Cell array of p-files
+##
+## @item classes
+## Cell array of class directories (@file{@@@var{classname}/})
+##
+## @item packages
+## Cell array of package directories (@file{+@var{pkgname}/})
+## @end table
+##
+## Compatibility Note: Octave does not support mdl, slx, and p files; nor
+## does it support package directories.  @code{what} will always return an
+## empty list for these categories.
+## @seealso{which, ls, exist}
 ## @end deftypefn
 
-function ret = what (d)
+function retval = what (dir)
+
+  if (nargin > 1)
+    print_usage ();
+  endif
 
   if (nargin == 0)
-    d = pwd ();
-  elseif (isempty (strfind (d, filesep ())))
-    ## Find the appropriate directory on the path.
-    p = strtrim (ostrsplit (path (), pathsep ()));
-    d = p{find (cellfun (@(x) ! isempty (strfind (x, d)), p))(end)};
+    dir = pwd ();
   else
-    [status, msg, msgid] = fileattrib (d);
-    if (status != 1)
-      error ("what: could not find the file or path %s", d);
-    else
-      d = msg.Name;
+    dtmp = canonicalize_file_name (dir);
+    if (isempty (dtmp))
+      ## Search for directory name in path
+      if (dir(end) == '/' || dir(end) == '\')
+        dir(end) = [];
+      endif
+      dtmp = dir_in_loadpath (dir);
+      if (isempty (dtmp))
+        error ("what: could not find the directory %s", dir);
+      endif
     endif
+    dir = dtmp;
   endif
 
-  files = dir (d);
-  w.path = d;
+  files = readdir (dir);
+  w.path = dir;
   w.m = cell (0, 1);
+  w.mat = cell (0, 1);
   w.mex = cell (0, 1);
   w.oct = cell (0, 1);
-  w.mat = cell (0, 1);
   w.mdl = cell (0, 1);
+  w.slx = cell (0, 1);
   w.p = cell (0, 1);
   w.classes = cell (0, 1);
+  w.packages = cell (0, 1);
 
   for i = 1 : length (files)
-    n = files(i).name;
+    n = files{i};
     ## Ignore . and ..
     if (strcmp (n, ".") || strcmp (n, ".."))
       continue;
     else
-      ## Ignore mdl and p files
-      [dummy, f, e] = fileparts (n);
+      ## Ignore mdl, slx, p, and packages since they are not
+      [~, f, e] = fileparts (n);
       if (strcmp (e, ".m"))
         w.m{end+1} = n;
+      elseif (strcmp (e, ".mat"))
+        w.mat{end+1} = n;
       elseif (strcmp (e, ".oct"))
         w.oct{end+1} = n;
       elseif (strcmp (e, mexext ()))
         w.mex{end+1} = n;
-      elseif (strcmp (e, ".mat"))
-        w.mat{end+1} = n;
-      elseif (strcmp (n(1), "@"))
+      elseif (n(1) == "@" && isdir (n))
         w.classes{end+1} = n;
       endif
     endif
@@ -77,35 +124,45 @@
 
   if (nargout == 0)
     __display_filenames__ ("M-files in directory", w.path, w.m);
+    __display_filenames__ ("\nMAT-files in directory", w.path, w.mat);
     __display_filenames__ ("\nMEX-files in directory", w.path, w.mex);
     __display_filenames__ ("\nOCT-files in directory", w.path, w.oct);
-    __display_filenames__ ("\nMAT-files in directory", w.path, w.mat);
     __display_filenames__ ("\nClasses in directory", w.path, w.classes);
   else
-    ret = w;
+    retval = w;
   endif
+
 endfunction
 
 function __display_filenames__ (msg, p, f)
+
   if (length (f) > 0)
     printf ("%s %s:\n\n", msg, p);
 
     maxlen = max (cellfun ("length", f));
     ncols = max (1, floor (terminal_size ()(2) / (maxlen + 3)));
-    fmt = "";
-    for i = 1: ncols
-      fmt = sprintf ("%s   %%-%ds", fmt, maxlen);
-    endfor
-    fmt = [fmt, "\n"];
+    fmt = sprintf ("   %%-%ds", maxlen);
+    fmt = repmat (fmt, [1, ncols]);
+    fmt = [fmt "\n"];
 
     nrows = ceil (length (f) / ncols);
     for i = 1 : nrows
       args  = f(i:nrows:end);
       if (length (args) < ncols)
-        args(end + 1 : ncols) = {""};
+        args(end+1 : ncols) = {""};
       endif
       printf (fmt, args{:});
     endfor
   endif
+
 endfunction
 
+
+%!test
+%! w = what ();
+%! assert (w.path, pwd);
+%! assert (fieldnames (w), {"path"; "m"; "mat"; "mex"; "oct"; "mdl"; "slx";
+%!                          "p"; "classes"; "packages"});
+
+%!error what (1, 2)
+
--- a/scripts/miscellaneous/xor.m
+++ b/scripts/miscellaneous/xor.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -17,23 +17,33 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Mapping Function} {@var{z} =} xor (@var{x}, @var{y})
-## Return the @dfn{exclusive or} of the entries of @var{x} and @var{y}.
+## @deftypefn  {Function File} {@var{z} =} xor (@var{x}, @var{y})
+## @deftypefnx {Function File} {@var{z} =} xor (@var{x1}, @var{x2}, @dots{})
+## Return the @dfn{exclusive or} of @var{x} and @var{y}.
+##
 ## For boolean expressions @var{x} and @var{y},
 ## @code{xor (@var{x}, @var{y})} is true if and only if one of @var{x} or
-## @var{y} is true.  Otherwise, for @var{x} and @var{y} both true or both
+## @var{y} is true.  Otherwise, if @var{x} and @var{y} are both true or both
 ## false, @code{xor} returns false.
 ##
 ## The truth table for the xor operation is
 ##
 ## @multitable @columnfractions 0.44 .03 .05 .03 0.44
 ## @item @tab @var{x} @tab @var{y} @tab @var{z} @tab
+## @item @tab - @tab - @tab - @tab
 ## @item @tab 0 @tab 0 @tab 0 @tab
 ## @item @tab 1 @tab 0 @tab 1 @tab
 ## @item @tab 0 @tab 1 @tab 1 @tab
 ## @item @tab 1 @tab 1 @tab 0 @tab
 ## @end multitable
 ##
+## If more than two arguments are given the xor operation is applied
+## cumulatively from left to right:
+##
+## @example
+## (@dots{}((x1 XOR x2) XOR x3) XOR @dots{})
+## @end example
+##
 ## @seealso{and, or, not}
 ## @end deftypefn
 
@@ -41,21 +51,35 @@
 ## Created: 16 September 1994
 ## Adapted-By: jwe
 
-function z = xor (x, y)
+function z = xor (x, y, varargin)
+
+  if (nargin < 2)
+    print_usage ();
+  endif
+
+  z = __xor__ (x, y);
 
-  if (nargin == 2)
-    if (isscalar (x) || isscalar (y) || size_equal (x, y))
-      ## Typecast to logicals is necessary for other numeric types.
-      z = logical (x) != logical (y);
-    else
-      try
-        z = bsxfun (@xor, x, y);
-      catch
-        error ("xor: X and Y must be of compatible size or scalars");
-      end_try_catch
-    endif
+  ## Slow expansion to multiple arguments.
+  ## Probably okay number of elements ## will be small.
+  if (! isempty (varargin))
+    for i = 1:numel (varargin)
+      z = __xor__ (z, varargin{i});
+    endfor
+  endif
+
+endfunction
+
+function z = __xor__ (x, y)
+
+  if (isscalar (x) || isscalar (y) || size_equal (x, y))
+    ## Typecast to logicals is necessary for other numeric types.
+    z = logical (x) != logical (y);
   else
-    print_usage ();
+    try
+      z = bsxfun (@xor, x, y);
+    catch
+      error ("xor: X and Y must be of compatible size or scalars");
+    end_try_catch
   endif
 
 endfunction
@@ -65,7 +89,13 @@
 %!assert (xor ([i, i, 0, 0], [1, 0, 1, 0]), logical ([0, 1, 1, 0]))
 
 %!assert (xor (eye (2), fliplr (eye (2))), logical (ones (2)))
+%!assert (xor (speye (2), fliplr (speye (2))), sparse (logical (ones (2))))
 
+## Test XOR reduction
+%!assert (xor ([1 0], [1 1], [0 0]), logical ([0 1]))
+
+## Test input validation
 %!error xor ()
-%!error xor (1, 2, 3)
+%!error xor (1)
+%!error <X and Y must be of compatible size> xor (ones (3,2), ones (2,3))
 
--- a/scripts/miscellaneous/zip.m
+++ b/scripts/miscellaneous/zip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Sylvain Pelissier
+## Copyright (C) 2006-2015 Sylvain Pelissier
 ##
 ## This file is part of Octave.
 ##
@@ -17,53 +17,107 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{entries} =} zip (@var{zipfile}, @var{files})
-## @deftypefnx {Function File} {@var{entries} =} zip (@var{zipfile}, @var{files}, @var{rootdir})
-## Compress the list of files and/or directories specified in @var{files}
-## into the archive @var{zipfile} in the same directory.  If @var{rootdir}
-## is defined the @var{files} are located relative to @var{rootdir} rather
-## than the current directory.
-## @seealso{unzip, bzip2, gzip, tar}
+## @deftypefn  {Function File} {@var{filelist} =} zip (@var{zipfile}, @var{files})
+## @deftypefnx {Function File} {@var{filelist} =} zip (@var{zipfile}, @var{files}, @var{rootdir})
+## Compress the list of files and directories specified in @var{files} into the
+## ZIP archive @var{zipfile}.
+##
+## @var{files} is a character array or cell array of strings.  Shell
+## wildcards in the filename such as @samp{*} or @samp{?} are accepted and
+## expanded.  Directories are recursively traversed and all files are
+## compressed and added to the archive.
+##
+## If @var{rootdir} is defined then any files without absolute pathnames are
+## located relative to @var{rootdir} rather than the current directory.
+##
+## The optional output @var{filelist} is a list of the files that were included
+## in the archive.
+## @seealso{unzip, unpack, bzip2, gzip, tar}
 ## @end deftypefn
 
 ## Author: Sylvain Pelissier <sylvain.pelissier@gmail.com>
 
-function entries = zip (zipfile, files, rootdir = ".")
+function filelist = zip (zipfile, files, rootdir = ".")
+
+  if (nargin < 2 || nargin > 3)
+    print_usage ();
+  endif
 
-  if (nargin != 2 && nargin != 3)
-    print_usage ();
+  if (! ischar (zipfile))
+    error ("zip: ZIPFILE must be a string");
+  elseif (ischar (files))
+    files = cellstr (files);
+  elseif (! iscellstr (files))
+    error ("zip: FILES must be a character array or cellstr");
   endif
 
   rootdir = tilde_expand (rootdir);
 
-  if (ischar (files))
-    files = cellstr (files);
-  endif
+  zipfile = make_absolute_filename (zipfile);
+
+  cmd = sprintf ("zip -r %s %s", zipfile, sprintf (" %s", files{:}));
 
-  if (! ischar (zipfile) && ! iscellstr (files))
-    error ("zip: expecting all arguments to be character strings");
-  endif
-
-  cmd = sprintf ("cd %s; zip -r %s/%s %s", rootdir, pwd (), zipfile,
-                 sprintf (" %s", files{:}));
-
+  origdir = pwd ();
+  cd (rootdir);
   [status, output] = system (cmd);
+  cd (origdir);
 
   if (status)
     error ("zip: zip failed with exit status = %d", status);
   endif
 
   if (nargout > 0)
-    cmd = sprintf ("unzip -Z -1 %s", zipfile);
-    [status, entries] = system (cmd);
+    cmd = ["unzip -Z -1 " zipfile];
+    [status, filelist] = system (cmd);
     if (status)
       error ("zip: zipinfo failed with exit status = %d", status);
     endif
-    if (entries(end) == "\n")
-      entries(end) = [];
-    endif
-    entries = ostrsplit (entries, "\n");
+    filelist = ostrsplit (filelist, "\r\n", true);
   endif
 
 endfunction
 
+
+%!xtest
+%! ## test zip together with unzip
+%! unwind_protect
+%!   filename = tempname ();
+%!   tmp_var  = pi;
+%!   save (filename, "tmp_var");
+%!   dirname = tempname ();
+%!   mkdir (dirname);
+%!   zipfile = tempname ();
+%!   [~, basename, ext] = fileparts (filename);
+%!   filelist = zip (zipfile, [basename ext], tempdir);
+%!   filelist = filelist{1};
+%!   if (! strcmp (filelist, [basename ext]))
+%!     error ("zip archive does not contain expected name!");
+%!   endif
+%!   if (! exist ([zipfile ".zip"], "file"))
+%!     error ("zip file cannot be found!");
+%!   endif
+%!   unzip ([zipfile ".zip"], dirname);
+%!   fid = fopen (filename, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen ([dirname filesep basename ext], "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   if (orig_data != new_data)
+%!     error ("unzipped file not equal to original file!");
+%!   endif
+%! unwind_protect_cleanup
+%!   unlink (filename);
+%!   unlink ([dirname, filesep, basename, ext]);
+%!   rmdir (dirname);
+%! end_unwind_protect
+
+## Test input validation
+%!error zip ()
+%!error zip (1)
+%!error zip (1,2,3,4)
+%!error <ZIPFILE must be a string> zip (1, "foobar")
+%!error <FILES must be a character array or cellstr> zip ("foobar", 1)
+
--- a/scripts/mk-pkg-add
+++ b/scripts/mk-pkg-add
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2002-2013 John W. Eaton
+# Copyright (C) 2002-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
deleted file mode 100755
--- a/scripts/mkdoc
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 1999-2013 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-#
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-## Expecting arguments in this order:
-##
-##  SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ...
-
-set -e
-
-PERL=${PERL:-'perl'}
-
-prefix="$1/"
-shift
-
-if test -f gethelp; then
-  cat << EOF
-### DO NOT EDIT!
-###
-### This file is generated automatically from the Octave sources.
-### Edit those files instead and run make to update this file.
-
-EOF
-  for arg
-  do
-    if [ "$arg" = "--" ]; then
-      prefix="./"
-    else
-      $PERL -w -e '
-        unless (@ARGV == 2) { die "Usage: $0 srcdir m_filename" ; }
-        ($srcdir, $m_fname) = ($ARGV[0], $ARGV[1]);
-        $full_fname = $srcdir . $m_fname;
-        exit unless ( $full_fname =~ m{(.*)/(@|)([^/]*)/(.*)\.m} );
-        if ($2) {
-          $fcn = "$2$3/$4";
-        } else {
-          $fcn = $4;
-        }
-        $re_srcdir = quotemeta($srcdir);
-        for (qx{ ./gethelp $fcn "$full_fname" < "$full_fname"} ) {
-          s/^\s+\@/\@/ unless $in_example;
-          s/^\s+\@group/\@group/;
-          s/^\s+\@end\s+group/\@end group/;
-          s|\@c $fcn $re_srcdir|\@c $fcn scripts/|o;
-          $in_example = (/\s*\@example\b/ .. /\s*\@end\s+example\b/);
-          print;
-        }' "$prefix" "$arg"
-    fi
-  done
-else
-  echo "gethelp program seems to be missing!" 1>&2
-  exit 1
-fi
--- a/scripts/mkdoc.pl
+++ b/scripts/mkdoc.pl
@@ -1,6 +1,7 @@
-#! /usr/bin/perl -w
-#
-# Copyright (C) 2012-2013 Rik Wehbring
+#! /usr/bin/perl
+use utf8;
+
+# Copyright (C) 2012-2015 Rik Wehbring
 #
 # This file is part of Octave.
 #
@@ -18,13 +19,18 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
+use strict;
+use warnings;
+use File::Spec;
+use Cwd;
+
 ## Expecting arguments in this order:
 ##
 ##  SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ...
 
 unless (@ARGV >= 2) { die "Usage: $0 srcdir m_filename1 ..." ; }
 
-$srcdir = shift (@ARGV) . '/';
+my $srcdir = shift (@ARGV);
 
 print <<__END_OF_MSG__;
 ### DO NOT EDIT!
@@ -34,35 +40,38 @@
 
 __END_OF_MSG__
 
-MFILE: foreach $m_fname (@ARGV)
+MFILE: foreach my $m_fname (@ARGV)
 {
   if ($m_fname eq "--")
-  {
-    $srcdir = "./";
-    next MFILE;
-  }
+    {
+      $srcdir = getcwd ();
+      next MFILE;
+    }
 
-  $full_fname = $srcdir . $m_fname;
-  next MFILE unless ( $full_fname =~ m{(.*)/(@|)([^/]*)/(.*)\.m} );
-  if ($2)
-    { $fcn = "$2$3/$4"; }
-  else
-    { $fcn = $4; }
+  my $full_fname = File::Spec->catfile ($srcdir, $m_fname);
+  my @paths = File::Spec->splitdir ($full_fname);
+  if (@paths < 3
+      || $paths[-2] eq "private"   # skip private directories
+      || $paths[-1] !~ s/\.m$//i)  # skip non m-files, and remove extension
+    { next MFILE; }
 
-  @help_txt = gethelp ($fcn, $full_fname);
-  next MFILE if ($help_txt[0] eq "");
+  ## @classes will have @class/method as their function name
+  my $fcn = $paths[-2] =~ m/^@/ ? File::Spec->catfile (@paths[-2, -1])
+                                : $paths[-1];
+
+  my @help_txt = gethelp ($fcn, $full_fname);
+  next MFILE unless @help_txt;
 
   print "\x{1d}$fcn\n";
-  print "\@c $fcn scripts/$m_fname\n";
+  print "\@c $fcn ", File::Spec->catfile ("scripts", $m_fname), "\n";
 
   foreach $_ (@help_txt)
-  {
-    s/^\s+\@/\@/ unless $in_example;
-    s/^\s+\@group/\@group/;
-    s/^\s+\@end\s+group/\@end group/;
-    $in_example = (/\s*\@example\b/ .. /\s*\@end\s+example\b/);
-    print $_;
-  }
+    {
+      my $in_example = (m/\s*\@example\b/ .. m/\s*\@end\s+example\b/);
+      s/^\s+\@/\@/ unless $in_example;
+      s/^\s+(\@(?:end)\s+(group|example))/$1/;
+      print $_;
+    }
 }
 
 ################################################################################
@@ -70,34 +79,32 @@
 ################################################################################
 sub gethelp
 {
-  ($fcn, $fname) = @_[0..1];
-  open (FH, $fname) or return "";
+  my $fcn   = shift;
+  my $fname = shift;
+  open (my $fh, "<", $fname) or return;
 
-  do
-  {
-    @help_txt = ();
+  my @help_txt;
+  while (my $line = <$fh>)
+    {
+      next if $line =~ m/^\s*$/;      # skip empty lines
+      last if $line !~ m/^\s*(#|%)/;  # out of here once code starts
+
+      my $reading_block = sub {defined ($line = <$fh>) && $line !~ m/^\s*$/};
 
-    ## Advance to non-blank line
-    while (defined ($_ = <FH>) and /^\s*$/) {;}
-
-    if (! /^\s*(?:#|%)/ or eof (FH))
-    {
-      ## No comment block found.  Return empty string
-      close (FH);
-      return "";
+      ## Skip this block
+      if ($line =~ /(Copyright|Author)/)
+        { while (&$reading_block ()) {} }
+      else
+        {
+          do
+            {
+              $line =~ s/^\s*(%|#)+ ?//;
+              push (@help_txt, $line);
+            } while (&$reading_block ());
+          last;
+        }
     }
 
-    ## Extract help text stopping when comment block ends
-    do
-    {
-      ## Remove comment characters at start of line
-      s/^\s*(?:#|%){1,2} ?//;
-      push (@help_txt, $_);
-    } until (! defined ($_ = <FH>) or ! /^\s*(?:#|%)/);
-
-  } until ($help_txt[0] !~ /^(?:Copyright|Author)/);
-
-  close (FH);
-
+  close ($fh);
   return @help_txt;
 }
--- a/scripts/optimization/__all_opts__.m
+++ b/scripts/optimization/__all_opts__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 VZLU Prague
+## Copyright (C) 2009-2015 VZLU Prague
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/optimization/fminbnd.m
+++ b/scripts/optimization/fminbnd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s.
+## Copyright (C) 2008-2015 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
 ##
@@ -53,7 +53,8 @@
 ## @end deftypefn
 
 ## This is patterned after opt/fmin.f from Netlib, which in turn is taken from
-## Richard Brent: Algorithms For Minimization Without Derivatives, Prentice-Hall (1973)
+## Richard Brent: Algorithms For Minimization Without Derivatives,
+## Prentice-Hall (1973)
 
 ## PKG_ADD: ## Discard result to avoid polluting workspace with ans at startup.
 ## PKG_ADD: [~] = __all_opts__ ("fminbnd");
@@ -71,6 +72,11 @@
     print_usage ();
   endif
 
+  if (xmin > xmax)
+    error ("Octave:invalid-input-arg",
+           "fminbnd: the lower bound cannot be greater than the upper one");
+  endif
+
   if (ischar (fun))
     fun = str2func (fun, "global");
   endif
@@ -170,7 +176,7 @@
 
     ## update  a, b, v, w, and x
 
-    if (fu <= fval)
+    if (fu < fval)
       if (u < x)
         b = x;
       else
@@ -283,4 +289,8 @@
 %!assert (fminbnd (@(x) (x - 1e-3)^4, -1, 1, opt0), 1e-3, 10e-3*sqrt (eps))
 %!assert (fminbnd (@(x) abs (x-1e7), 0, 1e10, opt0), 1e7, 10e7*sqrt (eps))
 %!assert (fminbnd (@(x) x^2 + sin (2*pi*x), 0.4, 1, opt0), fzero (@(x) 2*x + 2*pi*cos (2*pi*x), [0.4, 1], opt0), sqrt (eps))
+%!assert (fminbnd (@(x) x > 0.3, 0, 1) < 0.3)
+%!assert (fminbnd (@(x) sin (x), 0, 0), 0, eps)
 
+%!error <lower bound cannot be greater> fminbnd (@(x) sin (x), 0, -pi)
+
--- a/scripts/optimization/fminsearch.m
+++ b/scripts/optimization/fminsearch.m
@@ -24,9 +24,9 @@
 ##
 ## Find a value of @var{x} which minimizes the function @var{fun}.
 ## The search begins at the point @var{x0} and iterates using the
-## Nelder & Mead Simplex algorithm (a derivative-free method).  This algorithm
-## is better-suited to functions which have discontinuities or for which
-## a gradient-based search such as @code{fminunc} fails.
+## @nospell{Nelder & Mead} Simplex algorithm (a derivative-free method).  This
+## algorithm is better-suited to functions which have discontinuities or for
+## which a gradient-based search such as @code{fminunc} fails.
 ##
 ## Options for the search are provided in the parameter @var{options} using
 ## the function @code{optimset}.  Currently, @code{fminsearch} accepts the
--- a/scripts/optimization/fminunc.m
+++ b/scripts/optimization/fminunc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s.
+## Copyright (C) 2008-2015 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
 ##
@@ -63,11 +63,11 @@
 ## Last relative change in function value was less than @code{TolFun}.
 ##
 ## @item 0
-## Iteration limit exceeded---either maximum numer of algorithm iterations
+## Iteration limit exceeded---either maximum number of algorithm iterations
 ## @code{MaxIter} or maximum number of function evaluations @code{MaxFunEvals}.
 ##
 ## @item -1
-## Alogrithm terminated by @code{OutputFcn}.
+## Algorithm terminated by @code{OutputFcn}.
 ##
 ## @item -3
 ## The trust region radius became excessively small.
@@ -251,7 +251,7 @@
 
       if (fval1 < fval)
         ## Scaled actual reduction.
-        actred =  (fval - fval1) / (abs (fval1) + abs (fval));
+        actred = (fval - fval1) / (abs (fval1) + abs (fval));
       else
         actred = -1;
       endif
@@ -371,6 +371,7 @@
 %!  n = length (x);
 %!  f = sumsq (1 - x(1:n-1)) + 100 * sumsq (x(2:n) - x(1:n-1).^2);
 %!endfunction
+%!
 %!test
 %! [x, fval, info, out] = fminunc (@__rosenb, [5, -5]);
 %! tol = 2e-5;
@@ -383,7 +384,8 @@
 %! assert (info > 0);
 %! assert (x, ones (1, 4), tol);
 %! assert (fval, 0, tol);
-%% Test FunValCheck works correctly
+
+## Test FunValCheck works correctly
 %!assert (fminunc (@(x) x^2, 1, optimset ("FunValCheck", "on")), 0, eps)
 %!error <non-real value> fminunc (@(x) x + i, 1, optimset ("FunValCheck", "on"))
 %!error <NaN value> fminunc (@(x) x + NaN, 1, optimset ("FunValCheck", "on"))
--- a/scripts/optimization/fsolve.m
+++ b/scripts/optimization/fsolve.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s.
+## Copyright (C) 2008-2015 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
 ##
@@ -262,9 +262,9 @@
         ## FIXME: the original minpack used the following rescaling strategy:
         ##   dg = max (dg, jcn);
         ## but it seems not good if we start with a bad guess yielding Jacobian
-        ## columns with large norms that later decrease, because the corresponding
-        ## variable will still be overscaled. So instead, we only give the old
-        ## scaling a small momentum, but do not honor it.
+        ## columns with large norms that later decrease, because the
+        ## corresponding variable will still be overscaled. So instead, we only
+        ## give the old scaling a small momentum, but do not honor it.
 
         dg = max (0.1*dg, jcn);
       endif
@@ -382,7 +382,7 @@
       ## iterations, so we need scaling-independent tolerances wherever
       ## possible.
 
-      ## FIXME -- why tolf*n*xn? If abs (e) ~ abs(x) * eps is a vector
+      ## FIXME: Why tolf*n*xn? If abs (e) ~ abs(x) * eps is a vector
       ## of perturbations of x, then norm (fjac*e) <= eps*n*xn, i.e. by
       ## tolf ~ eps we demand as much accuracy as we can expect.
       if (fn <= tolf*n*xn)
--- a/scripts/optimization/fzero.m
+++ b/scripts/optimization/fzero.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s.
+## Copyright (C) 2008-2015 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
 ##
@@ -100,7 +100,7 @@
 
   ## Get default options if requested.
   if (nargin == 1 && ischar (fun) && strcmp (fun, 'defaults'))
-    x = optimset ("MaxIter", Inf, "MaxFunEvals", Inf, "TolX", 1e-8,
+    x = optimset ("MaxIter", Inf, "MaxFunEvals", Inf, "TolX", eps,
                   "OutputFcn", [], "FunValCheck", "off");
     return;
   endif
@@ -117,7 +117,7 @@
   ## displev = optimget (options, "Display", "notify");
   funvalchk = strcmpi (optimget (options, "FunValCheck", "off"), "on");
   outfcn = optimget (options, "OutputFcn");
-  tolx = optimget (options, "TolX", 1e-8);
+  tolx = optimget (options, "TolX", eps);
   maxiter = optimget (options, "MaxIter", Inf);
   maxfev = optimget (options, "MaxFunEvals", Inf);
 
@@ -302,7 +302,7 @@
     endif
 
     ## If there's an output function, use it now.
-    if (outfcn)
+    if (! isempty (outfcn))
       optv.funccount = nfev;
       optv.fval = fval;
       optv.iteration = niter;
@@ -333,7 +333,8 @@
 
   ## Check solution for a singularity by examining slope
   if (info == 1)
-    if ((b - a) != 0 && abs ((fb - fa)/(b - a) / slope0) > max (1e6, 0.5/(eps+tolx)))
+    if ((b - a) != 0
+        && abs ((fb - fa)/(b - a) / slope0) > max (1e6, 0.5/(eps+tolx)))
       info = -5;
     endif
   endif
--- a/scripts/optimization/glpk.m
+++ b/scripts/optimization/glpk.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2005-2013 Nicolo' Giorgetti
-## Copyright (C) 2013 Sébastien Villemot <sebastien@debian.org>
+## Copyright (C) 2005-2015 Nicolo' Giorgetti
+## Copyright (C) 2013-2015 Sébastien Villemot <sebastien@debian.org>
 ##
 ## This file is part of Octave.
 ##
@@ -123,7 +123,7 @@
 ##
 ## @item @qcode{"D"}
 ## An inequality constraint with both upper and lower bounds
-## (@code{A(i,:)*x >= -b(i)} @emph{and} (@code{A(i,:)*x <= b(i)}).
+## (@code{A(i,:)*x >= -b(i)}) @emph{and} (@code{A(i,:)*x <= b(i)}).
 ## @end table
 ##
 ## @item vartype
@@ -238,7 +238,7 @@
 ## Most fractional variable.
 ##
 ## @item 4 (@w{@code{GLP_BR_DTH}})
-## Heuristic by Driebeck and Tomlin.
+## Heuristic by @nospell{Driebeck and Tomlin}.
 ##
 ## @item 5 (@w{@code{GLP_BR_PCH}})
 ## Hybrid @nospell{pseudocost} heuristic.
--- a/scripts/optimization/lsqnonneg.m
+++ b/scripts/optimization/lsqnonneg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ## Copyright (C) 2008 Jaroslav Hajek
 ## Copyright (C) 2009 VZLU Prague
 ##
@@ -66,7 +66,7 @@
 ##
 ## Not implemented.
 ## @end itemize
-## @seealso{optimset, pqpnonneg}
+## @seealso{optimset, pqpnonneg, lscov}
 ## @end deftypefn
 
 ## PKG_ADD: ## Discard result to avoid polluting workspace with ans at startup.
@@ -82,7 +82,8 @@
     return;
   endif
 
-  if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
+  if (nargin < 2 || nargin > 4
+      || ! (ismatrix (c) && ismatrix (d) && isstruct (options)))
     print_usage ();
   endif
 
--- a/scripts/optimization/optimget.m
+++ b/scripts/optimization/optimget.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek
+## Copyright (C) 2008-2015 Jaroslav Hajek
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -20,10 +20,12 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} optimget (@var{options}, @var{parname})
 ## @deftypefnx {Function File} {} optimget (@var{options}, @var{parname}, @var{default})
-## Return a specific option from a structure created by
-## @code{optimset}.  If @var{parname} is not a field of the @var{options}
-## structure, return @var{default} if supplied, otherwise return an
-## empty matrix.
+## Return the specific option @var{parname} from the optimization options
+## structure @var{options} created by @code{optimset}.
+##
+## If @var{parname} is not defined then return @var{default} if supplied,
+## otherwise return an empty matrix.
+## @seealso{optimset}
 ## @end deftypefn
 
 function retval = optimget (options, parname, default)
@@ -32,21 +34,22 @@
     print_usage ();
   endif
 
+  ## Expand partial-length names into full names
   opts = __all_opts__ ();
   idx = strncmpi (opts, parname, length (parname));
-
   nmatch = sum (idx);
 
   if (nmatch == 1)
     parname = opts{idx};
   elseif (nmatch == 0)
-    warning ("unrecognized option: %s", parname);
+    warning ("optimget: unrecognized option: %s", parname);
   else
-    fmt = sprintf ("ambiguous option: %%s (%s%%s)",
+    fmt = sprintf ("optimget: ambiguous option: %%s (%s%%s)",
                    repmat ("%s, ", 1, nmatch-1));
     warning (fmt, parname, opts{idx});
   endif
-  if (isfield (options, parname))
+
+  if (isfield (options, parname) && ! isempty (options.(parname)))
     retval = options.(parname);
   elseif (nargin > 2)
     retval = default;
@@ -57,13 +60,20 @@
 endfunction
 
 
-%!error optimget ()
-
 %!shared opts
 %! opts = optimset ("tolx", 0.1, "maxit", 100);
-%!assert (optimget (opts, "TolX"), 0.1);
-%!assert (optimget (opts, "maxit"), 100);
-%!assert (optimget (opts, "MaxITer"), 100);
-%!warning (optimget (opts, "Max"));
-%!warning (optimget (opts, "foobar"));
+%!assert (optimget (opts, "TolX"), 0.1)
+%!assert (optimget (opts, "maxit"), 100)
+%!assert (optimget (opts, "MaxITer"), 100)
+%!assert (optimget (opts, "TolFun"), [])
+%!assert (optimget (opts, "TolFun", 1e-3), 1e-3)
 
+## Test input validation
+%!error optimget ()
+%!error optimget (1)
+%!error optimget (1,2,3,4,5)
+%!error optimget (1, "name")
+%!error optimget (struct (), 2)
+%!warning <unrecognized option: foobar> (optimget (opts, "foobar"));
+%!warning <ambiguous option: Max> (optimget (opts, "Max"));
+
--- a/scripts/optimization/optimset.m
+++ b/scripts/optimization/optimset.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -19,10 +19,24 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} optimset ()
-## @deftypefnx {Function File} {} optimset (@var{par}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} optimset (@var{old}, @var{par}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} optimset (@var{old}, @var{new})
-## Create options struct for optimization functions.
+## @deftypefnx {Function File} {@var{options} =} optimset ()
+## @deftypefnx {Function File} {@var{options} =} optimset (@var{par}, @var{val}, @dots{})
+## @deftypefnx {Function File} {@var{options} =} optimset (@var{old}, @var{par}, @var{val}, @dots{})
+## @deftypefnx {Function File} {@var{options} =} optimset (@var{old}, @var{new})
+## Create options structure for optimization functions.
+##
+## When called without any input or output arguments, @code{optimset} prints
+## a list of all valid optimization parameters.
+##
+## When called with one output and no inputs, return an options structure with
+## all valid option parameters initialized to @code{[]}.
+##
+## When called with a list of parameter/value pairs, return an options
+## structure with only the named parameters initialized.
+##
+## When the first input is an existing options structure @var{old}, the values
+## are updated from either the @var{par}/@var{val} list or from the options
+## structure @var{new}.
 ##
 ## Valid parameters are:
 ##
@@ -96,13 +110,13 @@
 ##
 ## @item Updating
 ## @end table
+## @seealso{optimget}
 ## @end deftypefn
 
 function retval = optimset (varargin)
 
   nargs = nargin ();
 
-  ## Add more as needed.
   opts = __all_opts__ ();
 
   if (nargs == 0)
@@ -124,8 +138,8 @@
       error ("optimset: no defaults for function '%s'", fcn);
     end_try_catch
   elseif (nargs == 2 && isstruct (varargin{1}) && isstruct (varargin{2}))
-    ## Set slots in old from nonempties in new.  Should we be checking
-    ## to ensure that the field names are expected?
+    ## Set slots in old from non-empties in new.
+    ## Should we be checking to ensure that the field names are expected?
     old = varargin{1};
     new = varargin{2};
     fnames = fieldnames (old);
@@ -140,9 +154,9 @@
         if (nmatch == 1)
           key = opts{find (i)};
         elseif (nmatch == 0)
-          warning ("unrecognized option: %s", key);
+          warning ("optimset: unrecognized option: %s", key);
         else
-          fmt = sprintf ("ambiguous option: %%s (%s%%s)",
+          fmt = sprintf ("optimset: ambiguous option: %%s (%s%%s)",
                          repmat ("%s, ", 1, nmatch-1));
           warning (fmt, key, opts{i});
         endif
@@ -155,8 +169,8 @@
     pairs = reshape (varargin(2:end), 2, []);
     retval = optimset (varargin{1}, cell2struct (pairs(2, :), pairs(1, :), 2));
   elseif (rem (nargs, 2) == 0)
-    ## Create struct.  Default values are replaced by those specified by
-    ## name/value pairs.
+    ## Create struct.
+    ## Default values are replaced by those specified by name/value pairs.
     pairs = reshape (varargin, 2, []);
     retval = optimset (struct (), cell2struct (pairs(2, :), pairs(1, :), 2));
   else
@@ -166,10 +180,13 @@
 endfunction
 
 
-%!assert (optimget (optimset ("tolx", 1e-2), "tOLx"), 1e-2)
+%!assert (isfield (optimset (), "TolFun"))
 %!assert (isfield (optimset ("tolFun", 1e-3), "TolFun"))
-%!warning (optimset ("Max", 10));
-%!warning (optimset ("foobar", 13));
+%!assert (optimget (optimset ("tolx", 1e-2), "tOLx"), 1e-2)
 
-%!error (optimset ("%NOT_A_REAL_FUNCTION_NAME%"))
+## Test input validation
+%!error optimset ("1_Parameter")
+%!error <no defaults for function> optimset ("%NOT_A_REAL_FUNCTION_NAME%")
+%!warning <unrecognized option: foobar> optimset ("foobar", 13);
+%!warning <ambiguous option: Max> optimset ("Max", 10);
 
--- a/scripts/optimization/pqpnonneg.m
+++ b/scripts/optimization/pqpnonneg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ## Copyright (C) 2008 Jaroslav Hajek
 ## Copyright (C) 2009 VZLU Prague
 ##
@@ -75,7 +75,8 @@
     return;
   endif
 
-  if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
+  if (nargin < 2 || nargin > 4
+      || ! (ismatrix (c) && ismatrix (d) && isstruct (options)))
     print_usage ();
   endif
 
@@ -134,7 +135,7 @@
         x += alpha*(xx - x);
         ## LH11: move from P to Z all X == 0.
         ## This corresponds to those indices where minimum of sf is attained.
-        idx = idx (sf == alpha);
+        idx = idx(sf == alpha);
         p(idx) = [];
         if (usechol)
           ## update the Cholesky factorization.
--- a/scripts/optimization/private/__fdjac__.m
+++ b/scripts/optimization/private/__fdjac__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek
+## Copyright (C) 2008-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/optimization/qp.m
+++ b/scripts/optimization/qp.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Julien Bect
-## Copyright (C) 2000-2013 Gabriele Pannocchia.
+## Copyright (C) 2013-2015 Julien Bect
+## Copyright (C) 2000-2015 Gabriele Pannocchia.
 ##
 ## This file is part of Octave.
 ##
@@ -273,7 +273,8 @@
         if (! isempty (A_lb) && ! isempty (A_ub))
           rtol = sqrt (eps);
           for i = 1:dimA_in
-            if (abs (A_lb(i) - A_ub(i)) < rtol*(1 + max (abs (A_lb(i) + A_ub(i)))))
+            if (abs (A_lb(i) - A_ub(i))
+                < rtol*(1 + max (abs (A_lb(i) + A_ub(i)))))
               ## These are actually an equality constraint
               tmprow = A_in(i,:);
               A = [A;tmprow];
@@ -306,8 +307,8 @@
     n_in = numel (bin);
 
     ## Check if the initial guess is feasible.
-    if (isa (x0, "single") || isa (H, "single") || isa (q, "single") || isa (A, "single")
-        || isa (b, "single"))
+    if (isa (x0, "single") || isa (H, "single") || isa (q, "single")
+        || isa (A, "single") || isa (b, "single"))
       rtol = sqrt (eps ("single"));
     else
       rtol = sqrt (eps);
@@ -408,7 +409,7 @@
 endfunction
 
 
-%% Test infeasible initial guess (bug #40536)
+## Test infeasible initial guess (bug #40536)
 %!testif HAVE_GLPK
 %!
 %! H = 1;  q = 0;                # objective: x -> 0.5 x^2
--- a/scripts/optimization/sqp.m
+++ b/scripts/optimization/sqp.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
+## Copyright (C) 2013-2015 Arun Giridhar
 ##
 ## This file is part of Octave.
 ##
@@ -129,7 +130,16 @@
 ## @table @asis
 ## @item 101
 ## The algorithm terminated normally.
-## Either all constraints meet the requested tolerance, or the stepsize,
+## All constraints meet the specified tolerance.
+##
+## @item 102
+## The BFGS update failed.
+##
+## @item 103
+## The maximum number of iterations was reached.
+##
+## @item 104
+## The stepsize has become too small, i.e.,
 ## @tex
 ## $\Delta x,$
 ## @end tex
@@ -137,12 +147,6 @@
 ## delta @var{x},
 ## @end ifnottex
 ## is less than @code{@var{tol} * norm (x)}.
-##
-## @item 102
-## The BFGS update failed.
-##
-## @item 103
-## The maximum number of iterations was reached.
 ## @end table
 ##
 ## An example of calling @code{sqp}:
@@ -192,7 +196,7 @@
     print_usage ();
   endif
 
-  if (!isvector (x0))
+  if (! isvector (x0))
     error ("sqp: X0 must be a vector");
   endif
   if (rows (x0) == 1)
@@ -204,7 +208,7 @@
     switch (numel (objf))
       case 1
         obj_fun = objf{1};
-        obj_grd = @ (x) fd_obj_grd (x, obj_fun);
+        obj_grd = @(x) fd_obj_grd (x, obj_fun);
       case 2
         obj_fun = objf{1};
         obj_grd = objf{2};
@@ -218,7 +222,7 @@
     endswitch
   else
     obj_fun = objf;   # No cell array, only obj_fun set
-    obj_grd = @ (x) fd_obj_grd (x, obj_fun);
+    obj_grd = @(x) fd_obj_grd (x, obj_fun);
   endif
 
   ce_fun = @empty_cf;
@@ -228,7 +232,7 @@
       switch (numel (cef))
         case 1
           ce_fun = cef{1};
-          ce_grd = @ (x) fd_ce_jac (x, ce_fun);
+          ce_grd = @(x) fd_ce_jac (x, ce_fun);
         case 2
           ce_fun = cef{1};
           ce_grd = cef{2};
@@ -237,7 +241,7 @@
       endswitch
     elseif (! isempty (cef))
       ce_fun = cef;   # No cell array, only constraint equality function set
-      ce_grd = @ (x) fd_ce_jac (x, ce_fun);
+      ce_grd = @(x) fd_ce_jac (x, ce_fun);
     endif
   endif
 
@@ -258,7 +262,7 @@
 
     if (nargin < 5 || (nargin > 5 && isempty (lb) && isempty (ub)))
       ## constraint inequality function only without any bounds
-      ci_grd = @ (x) fd_ci_jac (x, globals.cifcn);
+      ci_grd = @(x) fd_ci_jac (x, globals.cifcn);
       if (iscell (cif))
         switch (length (cif))
           case 1
@@ -310,8 +314,8 @@
         error ("sqp: upper bound smaller than lower bound");
       endif
       bounds_grad = [lb_grad; ub_grad];
-      ci_fun = @ (x) cf_ub_lb (x, lb_idx, ub_idx, globals);
-      ci_grd = @ (x) cigrad_ub_lb (x, bounds_grad, globals);
+      ci_fun = @(x) cf_ub_lb (x, lb_idx, ub_idx, globals);
+      ci_grd = @(x) cigrad_ub_lb (x, bounds_grad, globals);
     endif
 
   endif   # if (nargin > 3)
@@ -394,6 +398,8 @@
     t3 = all (lambda_i >= 0);
     t4 = norm (lambda .* con);
 
+    ## Normal convergence.  All constraints are satisfied
+    ## and objective has converged.
     if (t2 && t3 && max ([t0; t1; t4]) < tol)
       info = 101;
       break;
@@ -408,8 +414,8 @@
 
     info = INFO.info;
 
-    ## FIXME -- check QP solution and attempt to recover if it has
-    ## failed.  For now, just warn about possible problems.
+    ## FIXME: check QP solution and attempt to recover if it has failed.
+    ##        For now, just warn about possible problems.
 
     id = "Octave:SQP-QP-subproblem";
     switch (info)
@@ -453,8 +459,9 @@
 
     delx = x_new - x;
 
+    ## Check if step size has become too small (indicates lack of progress).
     if (norm (delx) < tol * norm (x))
-      info = 101;
+      info = 104;
       break;
     endif
 
@@ -483,6 +490,8 @@
 
       d2 = delxt*r;
 
+      ## Check if the next BFGS update will work properly.
+      ## If d1 or d2 vanish, the BFGS update will fail.
       if (d1 == 0 || d2 == 0)
         info = 102;
         break;
@@ -510,6 +519,7 @@
 
   endwhile
 
+  ## Check if we've spent too many iterations without converging.
   if (iter >= iter_max)
     info = 103;
   endif
@@ -694,7 +704,7 @@
 
 function res = cigrad_ub_lb (x, bgrad, globals)
 
-  cigradfcn = @ (x) fd_ci_jac (x, globals.cifcn);
+  cigradfcn = @(x) fd_ci_jac (x, globals.cifcn);
 
   if (iscell (globals.cif) && length (globals.cif) > 1)
     cigradfcn = globals.cif{2};
@@ -708,7 +718,7 @@
 
 endfunction
 
-# Utility function used to debug sqp
+## Utility function used to debug sqp
 function report (iter, qp_iter, alpha, nfun, obj)
 
   if (nargin == 0)
@@ -720,8 +730,8 @@
 endfunction
 
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Test Code
+################################################################################
+## Test Code
 
 %!function r = __g (x)
 %!  r = [sumsq(x)-10;
@@ -750,7 +760,7 @@
 %! assert (x, x_opt, 8*sqrt (eps));
 %! assert (obj, obj_opt, sqrt (eps));
 
-%% Test input validation
+## Test input validation
 %!error sqp ()
 %!error sqp (1)
 %!error sqp (1,2,3,4,5,6,7,8,9)
--- a/scripts/path/matlabroot.m
+++ b/scripts/path/matlabroot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott
+## Copyright (C) 2008-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -32,6 +32,5 @@
 endfunction
 
 
-
 %!assert (matlabroot (), OCTAVE_HOME ())
 
--- a/scripts/path/module.mk
+++ b/scripts/path/module.mk
@@ -1,9 +1,13 @@
 FCN_FILE_DIRS += path
 
+path_PRIVATE_FCN_FILES = \
+  path/private/getsavepath.m
+
 path_FCN_FILES = \
   path/matlabroot.m \
   path/pathdef.m \
-  path/savepath.m
+  path/savepath.m \
+  $(path_PRIVATE_FCN_FILES)
 
 FCN_FILES += $(path_FCN_FILES)
 
--- a/scripts/path/pathdef.m
+++ b/scripts/path/pathdef.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Bill Denney
+## Copyright (C) 2005-2015 Bill Denney
 ## Copyright (C) 2007-2009 Ben Abbott
 ##
 ## This file is part of Octave.
@@ -20,108 +20,82 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{val} =} pathdef ()
 ## Return the default path for Octave.
-## The path information is extracted from one of three sources.
+##
+## The path information is extracted from one of four sources.
 ## The possible sources, in order of preference, are:
 ##
 ## @enumerate
+## @item @file{.octaverc}
+##
 ## @item @file{~/.octaverc}
 ##
-## @item @file{<octave-home>/@dots{}/<version>/m/startup/octaverc}
+## @item @file{<OCTAVE_HOME>/@dots{}/<version>/m/startup/octaverc}
 ##
-## @item Octave's path prior to changes by any octaverc.
+## @item Octave's path prior to changes by any octaverc file.
 ## @end enumerate
 ## @seealso{path, addpath, rmpath, genpath, savepath}
 ## @end deftypefn
 
 function val = pathdef ()
 
-  ## Locate the site octaverc file.
-  pathdir = octave_config_info ("localstartupfiledir");
-  site_octaverc = fullfile (pathdir, "octaverc");
+  if (nargin > 0)
+    print_usage ();
+  endif
+
+  ## Locate any project-specific .octaverc file.
+  proj_octaverc = fullfile (pwd, ".octaverc");
+  if (exist (proj_octaverc, "file"))
+    proj_path = __extractpath__ (proj_octaverc);
+    if (! isempty (proj_path))
+      val = proj_path;
+      return;
+    endif
+  endif
 
   ## Locate the user's ~/.octaverc file.
   user_octaverc = fullfile ("~", ".octaverc");
-
-  ## Extract the specified paths from the site and user octavercs.
-  site_path = __extractpath__ (site_octaverc);
   if (exist (user_octaverc, "file"))
     user_path = __extractpath__ (user_octaverc);
-  else
-    user_path = "";
+    if (! isempty (user_path))
+      val = user_path;
+      return;
+    endif
+  endif
+
+  ## No user octaverc file, locate the site octaverc file.
+  pathdir = octave_config_info ("localstartupfiledir");
+  site_octaverc = fullfile (pathdir, "octaverc");
+  site_path = __extractpath__ (site_octaverc);
+  if (! isempty (site_path))
+    val = site_path;
+    return;
   endif
 
-  ## A path definition in the user rcfile has precedence over the site rcfile.
-  if (! isempty (user_path))
-    val = user_path;
-  elseif (! isempty (site_path))
-    val = site_path;
+  ## No project, user, or site octaverc file.  Use Octave's default.
+  val = __pathorig__ ();
+
+endfunction
+
+## Extract the path information from the script/function @var{file}, created by
+## @file{savepath.m}.  If successful, @code{__extractpath__} returns the path
+## specified in @var{file}.
+
+## Author: Ben Abbott <bpabbott@mac.com>
+
+function path = __extractpath__ (savefile)
+
+  [filelines, startline, endline] = getsavepath (savefile);
+  if (startline > 0)
+    tmp = regexprep (filelines(startline+1:endline-1),
+                     "^.*path \\('([^\']+)'.*$", "$1");
+    path = strjoin (tmp, ":");
   else
-    val = __pathorig__ ();
+    path = "";
   endif
 
 endfunction
 
-## Extact the path information from the script/function @var{file},
-## created by @file{savepath.m}.  If @var{file} is omitted,
-## @file{~/.octaverc} is used.  If successful, @code{__extractpath__}
-## returns the path specified in @var{file}.
-
-## Author: Ben Abbott <bpabbott@mac.com>
-
-function specifiedpath = __extractpath__ (savefile)
-
-  ## The majority of this code was borrowed from savepath.m.
-  ## FIXME: is there some way to share the common parts instead of duplicating?
-  ## ANSWER: Yes.  Create a private directory and extract this section of code
-  ##         and place it there in a new function only visible by pathdef() and
-  ##         savepath().
-  beginstring = "## Begin savepath auto-created section, do not edit";
-  endstring   = "## End savepath auto-created section";
-
-  if (nargin == 0)
-    savefile = tilde_expand ("~/.octaverc");
-  endif
 
-  ## Parse the file if it exists to see if we should replace a section
-  ## or create a section.
-  startline = endline = 0;
-  filelines = {};
-  if (exist (savefile) == 2)
-    [fid, msg] = fopen (savefile, "rt");
-    if (fid < 0)
-      error ("__extractpath__: could not open savefile, %s: %s", savefile, msg);
-    endif
-    unwind_protect
-      linenum = 0;
-      while (ischar (line = fgetl (fid)))
-        filelines{++linenum} = line;
-        ## find the first and last lines if they exist in the file
-        if (strcmp (line, beginstring))
-          startline = linenum;
-        elseif (strcmp (line, endstring))
-          endline = linenum;
-        endif
-      endwhile
-    unwind_protect_cleanup
-      closeread = fclose (fid);
-      if (closeread < 0)
-        error ("__extractpath__: could not close savefile after reading, %s",
-               savefile);
-      endif
-    end_unwind_protect
-  endif
+## FIXME: Need some better BIST tests
+%!assert (ischar (pathdef ()))
 
-  ## Extract the path specifiation.
-  if (startline > endline || (startline > 0 && endline == 0))
-    error ("__extractpath__: unable to parse file, %s", savefile);
-  elseif (startline > 0)
-    ## Undo doubling of single quote characters performed by savepath.
-    specifiedpath = strrep (regexprep (cstrcat (filelines(startline:endline){:}),
-                                       " *path *\\('(.*)'\\); *", "$1"),
-                            "''", "'");
-  else
-    specifiedpath = "";
-  endif
-
-endfunction
-
new file mode 100644
--- /dev/null
+++ b/scripts/path/private/getsavepath.m
@@ -0,0 +1,53 @@
+## Copyright (C) 2014-2015 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+function [filelines, startline, endline] = getsavepath (file)
+
+  beginstring = "## Begin savepath auto-created section, do not edit";
+  endstring   = "## End savepath auto-created section";
+
+  ## Read in the file while checking for errors along the way.
+  startline = endline = 0;
+  filelines = {};
+  if (exist (file) == 2)
+    [fid, msg] = fopen (file, "rt");
+    if (fid < 0)
+      error ("getsavepath: could not open file, %s: %s", file, msg);
+    endif
+    linenum = 0;
+    while (ischar (line = fgetl (fid)))
+      filelines{++linenum} = line;
+      ## Find the first and last lines if they exist in the file.
+      if (strcmp (line, beginstring))
+        startline = linenum;
+      elseif (strcmp (line, endstring))
+        endline = linenum;
+      endif
+    endwhile
+    if (fclose (fid) < 0)
+      error ("getsavepath: could not close file after reading, %s", file);
+    endif
+  endif
+
+  ## Verify the file was correctly formatted.
+  if (startline > endline || (startline > 0 && endline == 0))
+    error ("getsavepath: unable to parse file, %s", file);
+  endif
+
+endfunction
+
--- a/scripts/path/savepath.m
+++ b/scripts/path/savepath.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Bill Denney
+## Copyright (C) 2005-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -22,8 +22,20 @@
 ## @deftypefnx {Function File} {@var{status} =} savepath (@dots{})
 ## Save the unique portion of the current function search path that is
 ## not set during Octave's initialization process to @var{file}.
-## If @var{file} is omitted, @file{~/.octaverc} is used.  If successful,
-## @code{savepath} returns 0.
+##
+## If @var{file} is omitted, Octave looks in the current directory for a
+## project-specific @file{.octaverc} file in which to save the path
+## information.  If no such file is present then the user's configuration file
+## @file{~/.octaverc} is used.
+##
+## If successful, @code{savepath} returns 0.
+##
+## The @code{savepath} function makes it simple to customize a user's
+## configuration file to restore the working paths necessary for a particular
+## instance of Octave.  Assuming no filename is specified, Octave will
+## automatically restore the saved directory paths from the appropriate
+## @file{.octaverc} file when starting up.  If a filename has been specified
+## then the paths may be restored manually by calling @code{source @var{file}}.
 ## @seealso{path, addpath, rmpath, genpath, pathdef}
 ## @end deftypefn
 
@@ -31,54 +43,27 @@
 
 function retval = savepath (file)
 
-  ret = 1;
-
   beginstring = "## Begin savepath auto-created section, do not edit";
   endstring   = "## End savepath auto-created section";
 
+  ## Use project-specific or user's .octaverc when no file specified
   if (nargin == 0)
-    file = fullfile ("~", ".octaverc");
+    file = fullfile (pwd, ".octaverc");
+    if (! exist (file, "file"))
+      file = fullfile ("~", ".octaverc");
+    endif
   endif
 
-  ## parse the file if it exists to see if we should replace an
-  ## existing section or create a new section
-  startline = endline = 0;
-  filelines = {};
-  if (exist (file) == 2)
-    [fid, msg] = fopen (file, "rt");
-    if (fid < 0)
-      error ("savepath: could not open file, %s: %s", file, msg);
-    endif
-    unwind_protect
-      linenum = 0;
-      while (ischar (line = fgetl (fid)))
-        filelines{++linenum} = line;
-        ## find the first and last lines if they exist in the file
-        if (strcmp (line, beginstring))
-          startline = linenum;
-        elseif (strcmp (line, endstring))
-          endline = linenum;
-        endif
-      endwhile
-    unwind_protect_cleanup
-      closeread = fclose (fid);
-      if (closeread < 0)
-        error ("savepath: could not close file after reading, %s", file);
-      endif
-    end_unwind_protect
-  endif
+  ## Read in the file
+  [filelines, startline, endline] = getsavepath (file);
 
-  if (startline > endline || (startline > 0 && endline == 0))
-    error ("savepath: unable to parse file, %s", file);
-  endif
-
-  ## put the current savepath lines into the file
+  ## Determine where the savepath lines are placed in the file.
   if (isempty (filelines)
       || (startline == 1 && endline == length (filelines)))
-    ## savepath is the entire file
+    ## savepath is the entire file.
     pre = post = {};
   elseif (endline == 0)
-    ## drop the savepath statements at the end of the file
+    ## Drop the savepath statements at the end of the file.
     pre = filelines;
     post = {};
   elseif (startline == 1)
@@ -88,51 +73,45 @@
     pre = filelines(1:startline-1);
     post = {};
   else
-    ## insert in the middle
+    ## Insert in the middle.
     pre = filelines(1:startline-1);
     post = filelines(endline+1:end);
   endif
 
-  ## write the results
+  ## Write the results.
   [fid, msg] = fopen (file, "wt");
   if (fid < 0)
     error ("savepath: unable to open file for writing, %s, %s", file, msg);
   endif
   unwind_protect
-    for i = 1:length (pre)
-      fprintf (fid, "%s\n", pre{i});
-    endfor
+    fprintf (fid, "%s\n", pre{:});
 
     ## Remove the portion of the path defined via the command line
     ## and/or the environment.
     workingpath = parsepath (path);
-    command_line_path = parsepath (command_line_path ());
+    cmd_line_path = parsepath (command_line_path ());
     octave_path = parsepath (getenv ("OCTAVE_PATH"));
-    pathdef = pathdef ();
-    if (isempty (pathdef))
-      ## This occurs when running octave via run-octave. In this instance
+    default_path = pathdef ();
+    if (isempty (default_path))
+      ## This occurs when running octave via run-octave.  In this instance
       ## the entire path is specified via the command line and pathdef()
       ## is empty.
       [~, n] = setdiff (workingpath, octave_path);
-      default_path = command_line_path;
+      default_path = cmd_line_path;
     else
-      [~, n] = setdiff (workingpath, union (command_line_path, octave_path));
-      default_path = parsepath (pathdef);
+      [~, n] = setdiff (workingpath, union (cmd_line_path, octave_path));
+      default_path = parsepath (default_path);
     endif
     ## This is the path we'd like to preserve when octave is run.
-    path_to_preserve = workingpath (sort (n));
+    path_to_preserve = workingpath(sort (n));
 
-    ## Determine the path to Octave's user and sytem wide pkgs.
+    ## Determine the path to Octave's user and system wide packages.
     [pkg_user, pkg_system] = pkg ("list");
-    pkg_user_path = cell (1, numel (pkg_user));
-    pkg_system_path = cell (1, numel (pkg_system));
-    for n = 1:numel (pkg_user)
-      pkg_user_path{n} = pkg_user{n}.archprefix;
-    endfor
-    for n = 1:numel (pkg_system)
-      pkg_system_path{n} = pkg_system{n}.archprefix;
-    endfor
-    pkg_path = union (pkg_user_path, pkg_system_path);
+
+    ## Conversion from cell array of structs to cellstr of archprefixes.
+    pkg_path = unique (cellfun (@(elt) elt.archprefix,
+                                [pkg_user, pkg_system],
+                                "uniformoutput", false));
 
     ## Rely on Octave's initialization to include the pkg path elements.
     if (! isempty (pkg_path))
@@ -140,22 +119,27 @@
       path_to_preserve = path_to_preserve(sort (n));
     endif
 
-    ## Split the path to be saved into two groups. Those path elements that
+    ## Split the path to be saved into two groups.  Those path elements that
     ## belong at the beginning and those at the end.
     if (! isempty (default_path))
       n1 = find (strcmp (default_path{1}, path_to_preserve));
       n2 = find (strcmp (default_path{end}, path_to_preserve));
-      n_middle = round (0.5*(n1+n2));
+      n_middle = round ((n1+n2)/2);
       [~, n] = setdiff (path_to_preserve, default_path);
       path_to_save = path_to_preserve(sort (n));
       ## Remove pwd
-      path_to_save = path_to_save(! strcmp (path_to_save, ["." pathsep]));
-      n = ones (size (path_to_save));
-      for m = 1:numel (path_to_save)
-        n(m) = find (strcmp (path_to_save{m}, path_to_preserve));
-      endfor
-      path_to_save_begin = path_to_save(n <= n_middle);
-      path_to_save_end   = path_to_save(n > n_middle);
+      path_to_save(strcmp (path_to_save, ["." pathsep])) = [];
+      if (! isempty (path_to_save))
+        n = ones (numel (path_to_save), 1);
+        for m = 1:numel (path_to_save)
+          n(m) = find (strcmp (path_to_save{m}, path_to_preserve));
+        endfor
+        path_to_save_begin = path_to_save(n <= n_middle);
+        path_to_save_end   = path_to_save(n > n_middle);
+      else
+        path_to_save_begin = {};
+        path_to_save_end   = {};
+      endif
     else
       path_to_save_begin = path_to_preserve;
       path_to_save_end   = {};
@@ -179,28 +163,59 @@
     endif
     fprintf (fid, "%s\n", endstring);
 
-    for i = 1:length (post)
-      fprintf (fid, "%s\n", post{i});
-    endfor
+    fprintf (fid, "%s\n", post{:});
   unwind_protect_cleanup
-    closeread = fclose (fid);
-    if (closeread < 0)
+    status = fclose (fid);
+    if (status < 0)
       error ("savepath: could not close savefile after writing, %s", file);
     elseif (nargin == 0)
-      warning ("savepath: current path saved to %s", file);
+      warning ("off", "backtrace", "local");
+      warning ("Octave:savepath-local",
+               "savepath: current path saved to %s", file);
     endif
   end_unwind_protect
 
-  ret = 0;
-
   if (nargout > 0)
-    retval = ret;
+    retval = 0;
   endif
 
 endfunction
 
+## Convert single string of paths to cell array of paths
 function path_elements = parsepath (p)
-  pat = sprintf ('([^%s]+[%s$])', pathsep, pathsep);
-  path_elements = regexpi (strcat (p, pathsep), pat, "match");
+  path_elements = strcat (ostrsplit (p, pathsep), pathsep);
 endfunction
 
+
+%!test
+%! fname = tempname ();
+%! status = savepath (fname);
+%! assert (status == 0);
+%! old_dir = pwd;
+%! unwind_protect
+%!   cd (P_tmpdir);
+%!   if (exist (fullfile (pwd, ".octaverc")))
+%!     unlink (".octaverc");
+%!   endif
+%!   ## Create blank .octaverc file
+%!   fid = fopen (".octaverc", "wt");
+%!   assert (fid >= 0);
+%!   fclose (fid);
+%!   ## Save path into local .octaverc file
+%!   warning ("off", "Octave:savepath-local");
+%!   status = savepath ();
+%!   assert (status == 0);
+%!   ## Compare old and new versions
+%!   fid = fopen (fname, "rb");
+%!   assert (fid >= 0);
+%!   orig_data = fread (fid);
+%!   fclose (fid);
+%!   fid = fopen (".octaverc", "rb");
+%!   assert (fid >= 0);
+%!   new_data = fread (fid);
+%!   fclose (fid);
+%!   assert (orig_data, new_data);
+%! unwind_protect_cleanup
+%!   cd (old_dir);
+%! end_unwind_protect
+
--- a/scripts/pkg/module.mk
+++ b/scripts/pkg/module.mk
@@ -5,6 +5,7 @@
   pkg/private/configure_make.m \
   pkg/private/copy_files.m \
   pkg/private/create_pkgadddel.m \
+  pkg/private/default_prefix.m \
   pkg/private/describe.m \
   pkg/private/dirempty.m \
   pkg/private/extract_pkg.m \
--- a/scripts/pkg/pkg.m
+++ b/scripts/pkg/pkg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ## Copyright (C) 2012 Carlo de Falco
 ##
@@ -21,8 +21,9 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} pkg @var{command} @var{pkg_name}
 ## @deftypefnx {Command} {} pkg @var{command} @var{option} @var{pkg_name}
-## Manage packages (groups of add-on functions) for Octave.  Different actions
-## are available depending on the value of @var{command}.
+## Manage packages (groups of add-on functions) for Octave.
+##
+## Different actions are available depending on the value of @var{command}.
 ##
 ## Available commands:
 ##
@@ -123,11 +124,25 @@
 ## Show the list of currently installed packages.  For example,
 ##
 ## @example
-## installed_packages = pkg ("list")
+## pkg list
 ## @end example
 ##
 ## @noindent
-## returns a cell array containing a structure for each installed package.
+## will produce a short report with the package name, version, and installation
+## directory for each installed package.  Supply a package name to limit
+## reporting to a particular package.  For example:
+##
+## @example
+## pkg list image
+## @end example
+##
+## If a single return argument is requested then @code{pkg} returns a cell
+## array where each element is a structure with information on a single
+## package.
+##
+## @example
+## installed_packages = pkg ("list")
+## @end example
 ##
 ## If two output arguments are requested @code{pkg} splits the list of
 ## installed packages into those which were installed by the current user,
@@ -137,7 +152,7 @@
 ## [user_packages, system_packages] = pkg ("list")
 ## @end example
 ##
-## The option @qcode{"-forge"} lists packages available at the Octave-Forge
+## The @qcode{"-forge"} option lists packages available at the Octave-Forge
 ## repository.  This requires an internet connection and the cURL library.
 ## For example:
 ##
@@ -164,7 +179,7 @@
 ## @end example
 ##
 ## @noindent
-## If any of the requested packages is not installed, pkg returns an
+## If any of the requested packages is not installed, @code{pkg} returns an
 ## error, unless a second output is requested:
 ##
 ## @example
@@ -260,9 +275,11 @@
 ## will remove the autoloading status of the image package.
 ##
 ## @end table
+## @seealso{ver, news}
 ## @end deftypefn
 
 function [local_packages, global_packages] = pkg (varargin)
+
   ## Installation prefix (FIXME: what should these be on windows?)
   persistent user_prefix = false;
   persistent prefix = false;
@@ -271,33 +288,27 @@
   persistent global_list = fullfile (OCTAVE_HOME (), "share", "octave",
                                      "octave_packages");
 
-  confirm_recursive_rmdir (false, "local");
-
-  mlock ();
-
   ## If user is superuser set global_istall to true
   ## FIXME: is it OK to set this always true on windows?
   global_install = ((ispc () && ! isunix ()) || (geteuid () == 0));
 
   if (isbool (prefix))
-    if (global_install)
-      prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages");
-      archprefix = fullfile (octave_config_info ("libdir"),
-                             "octave", "packages");
-    else
-      prefix = fullfile ("~", "octave");
-      archprefix = prefix;
-    endif
+    [prefix, archprefix] = default_prefix (global_install);
     prefix = tilde_expand (prefix);
     archprefix = tilde_expand (archprefix);
   endif
 
+  mlock ();
+
+  confirm_recursive_rmdir (false, "local");
+
   available_actions = {"list", "install", "uninstall", "load", ...
                        "unload", "prefix", "local_list", ...
                        "global_list", "rebuild", "build", ...
                        "describe", "update"};
-  ## Handle input
-  if (length (varargin) == 0 || ! iscellstr (varargin))
+
+  ## Parse input arguments
+  if (isempty (varargin) || ! iscellstr (varargin))
     print_usage ();
   endif
   files = {};
@@ -306,7 +317,7 @@
   action = "none";
   verbose = false;
   octave_forge = false;
-  for i = 1:length (varargin)
+  for i = 1:numel (varargin)
     switch (varargin{i})
       case "-nodeps"
         deps = false;
@@ -326,22 +337,18 @@
       case "-local"
         global_install = false;
         if (! user_prefix)
-          prefix = tilde_expand (fullfile ("~", "octave"));
-          archprefix = prefix;
+          [prefix, archprefix] = default_prefix (global_install);
         endif
       case "-global"
         global_install = true;
         if (! user_prefix)
-          prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages");
-          archprefix = fullfile (octave_config_info ("libdir"),
-                                 "octave", "packages");
+          [prefix, archprefix] = default_prefix (global_install);
         endif
       case available_actions
-        if (strcmp (action, "none"))
-          action = varargin{i};
-        else
+        if (! strcmp (action, "none"))
           error ("more than one action specified");
         endif
+        action = varargin{i};
       otherwise
         files{end+1} = varargin{i};
     endswitch
@@ -362,19 +369,20 @@
         endif
       else
         if (nargout == 0)
-          installed_packages (local_list, global_list);
+          installed_packages (local_list, global_list, files);
         elseif (nargout == 1)
-          local_packages = installed_packages (local_list, global_list);
+          local_packages = installed_packages (local_list, global_list, files);
         elseif (nargout == 2)
           [local_packages, global_packages] = installed_packages (local_list,
-                                                                  global_list);
+                                                                  global_list,
+                                                                  files);
         else
           error ("too many output arguments requested");
         endif
       endif
 
     case "install"
-      if (length (files) == 0)
+      if (isempty (files))
         error ("you must specify at least one filename when calling 'pkg install'");
       endif
 
@@ -382,12 +390,15 @@
       unwind_protect
 
         if (octave_forge)
-          [urls, local_files] = cellfun ("get_forge_download", files, "uniformoutput", false);
-          [files, succ] = cellfun ("urlwrite", urls, local_files, "uniformoutput", false);
+          [urls, local_files] = cellfun ("get_forge_download", files,
+                                         "uniformoutput", false);
+          [files, succ] = cellfun ("urlwrite", urls, local_files,
+                                   "uniformoutput", false);
           succ = [succ{:}];
           if (! all (succ))
             i = find (! succ, 1);
-            error ("could not download file %s from url %s", local_files{i}, urls{i});
+            error ("could not download file %s from url %s",
+                   local_files{i}, urls{i});
           endif
         endif
 
@@ -399,48 +410,47 @@
       end_unwind_protect
 
     case "uninstall"
-      if (length (files) == 0)
+      if (isempty (files))
         error ("you must specify at least one package when calling 'pkg uninstall'");
       endif
-      uninstall (files, deps, verbose, local_list,
-                 global_list, global_install);
+      uninstall (files, deps, verbose, local_list, global_list, global_install);
 
     case "load"
-      if (length (files) == 0)
-        error ("you must specify at least one package, 'all' or 'auto' when calling 'pkg load'");
+      if (isempty (files))
+        error ("you must specify at least one package, 'all', or 'auto' when calling 'pkg load'");
       endif
       load_packages (files, deps, local_list, global_list);
 
     case "unload"
-      if (length (files) == 0)
+      if (isempty (files))
         error ("you must specify at least one package or 'all' when calling 'pkg unload'");
       endif
       unload_packages (files, deps, local_list, global_list);
 
     case "prefix"
-      if (length (files) == 0 && nargout == 0)
+      if (isempty (files) && nargout == 0)
         printf ("Installation prefix:             %s\n", prefix);
         printf ("Architecture dependent prefix:   %s\n", archprefix);
-      elseif (length (files) == 0 && nargout >= 1)
+      elseif (isempty (files) && nargout >= 1)
         local_packages = prefix;
         global_packages = archprefix;
-      elseif (length (files) >= 1 && nargout <= 2 && ischar (files{1}))
+      elseif (numel (files) >= 1 && nargout <= 2 && ischar (files{1}))
         prefix = tilde_expand (files{1});
         if (! exist (prefix, "dir"))
-          [status, msg, msgid] = mkdir (prefix);
+          [status, msg] = mkdir (prefix);
           if (status == 0)
-            error("cannot create prefix %s: %s", prefix, msg);
+            error ("cannot create prefix %s: %s", prefix, msg);
           endif
           warning ("creating the directory %s\n", prefix);
         endif
         local_packages = prefix = canonicalize_file_name (prefix);
         user_prefix = true;
-        if (length (files) >= 2 && ischar (files{2}))
+        if (numel (files) >= 2 && ischar (files{2}))
           archprefix = tilde_expand (files{2});
           if (! exist (archprefix, "dir"))
-            [status, msg, msgid] = mkdir (archprefix);
+            [status, msg] = mkdir (archprefix);
             if (status == 0)
-              error("cannot create archprefix %s: %s", archprefix, msg);
+              error ("cannot create archprefix %s: %s", archprefix, msg);
             endif
             warning ("creating the directory %s\n", archprefix);
             global_packages = archprefix = canonicalize_file_name (archprefix);
@@ -451,11 +461,11 @@
       endif
 
     case "local_list"
-      if (length (files) == 0 && nargout == 0)
+      if (isempty (files) && nargout == 0)
         disp (local_list);
-      elseif (length (files) == 0 && nargout == 1)
+      elseif (isempty (files) && nargout == 1)
         local_packages = local_list;
-      elseif (length (files) == 1 && nargout == 0 && ischar (files{1}))
+      elseif (numel (files) == 1 && nargout == 0 && ischar (files{1}))
         local_list = files{1};
         if (! exist (local_list, "file"))
           try
@@ -471,11 +481,11 @@
       endif
 
     case "global_list"
-      if (length (files) == 0 && nargout == 0)
-        disp(global_list);
-      elseif (length (files) == 0 && nargout == 1)
+      if (isempty (files) && nargout == 0)
+        disp (global_list);
+      elseif (isempty (files) && nargout == 1)
         local_packages = global_list;
-      elseif (length (files) == 1 && nargout == 0 && ischar (files{1}))
+      elseif (numel (files) == 1 && nargout == 0 && ischar (files{1}))
         global_list = files{1};
         if (! exist (global_list, "file"))
           try
@@ -500,8 +510,8 @@
           local_packages = global_packages;
         endif
       else
-        local_packages = rebuild (prefix, archprefix, local_list, files, auto,
-                                  verbose);
+        local_packages = rebuild (prefix, archprefix, local_list, files,
+                                  auto, verbose);
         local_packages = save_order (local_packages);
         save (local_list, "local_packages");
         if (nargout == 0)
@@ -510,23 +520,21 @@
       endif
 
     case "build"
-      if (length (files) < 2)
+      if (numel (files) < 2)
         error ("you must specify at least the build directory and one filename\nwhen calling 'pkg build'");
       endif
       build (files, deps, auto, verbose);
 
     case "describe"
-      if (length (files) == 0)
+      if (isempty (files))
         error ("you must specify at least one package or 'all' when calling 'pkg describe'");
       endif
-      ## FIXME: the name of the output variables is inconsistent
-      ##            with their content
+      ## FIXME: name of the output variables is inconsistent with their content
       switch (nargout)
         case 0
           describe (files, verbose, local_list, global_list);
         case 1
-          pkg_desc_list = describe (files, verbose, local_list, ...
-                                    global_list);
+          pkg_desc_list = describe (files, verbose, local_list, global_list);
           local_packages = pkg_desc_list;
         case 2
           [pkg_desc_list, flag] = describe (files, verbose, local_list, ...
@@ -540,7 +548,20 @@
     case "update"
       if (nargout == 0)
         installed_pkgs_lst = installed_packages (local_list, global_list);
-        for i = 1:length (installed_pkgs_lst)
+        if (numel (files) > 0)
+           update_lst = {};
+           installed_names = {installed_pkgs_list.name}';
+           for i = 1:numel (files)
+             idx = find (strcmp (files{i}, installed_names), 1);
+             if (isempty (idx))
+               warning ("Package %s is not installed - not updating this package", files{i});
+             else
+               update_lst = { update_lst, installed_pkgs_lst{idx} };
+             endif
+           endfor
+           installed_pkgs_lst = update_lst;
+        endif
+        for i = 1:numel (installed_pkgs_lst)
           installed_pkg_name = installed_pkgs_lst{i}.name;
           installed_pkg_version = installed_pkgs_lst{i}.version;
           forge_pkg_version = get_forge_pkg (installed_pkg_name);
@@ -553,7 +574,8 @@
       endif
 
     otherwise
-      error ("you must specify a valid action for 'pkg'. See 'help pkg' for details");
+      error ("you must specify a valid action for 'pkg'.  See 'help pkg' for details");
   endswitch
+
 endfunction
 
--- a/scripts/pkg/private/build.m
+++ b/scripts/pkg/private/build.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/configure_make.m
+++ b/scripts/pkg/private/configure_make.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -29,14 +29,11 @@
     octave_bindir = octave_config_info ("bindir");
     ver = version ();
     ext = octave_config_info ("EXEEXT");
-    mkoctfile_program = fullfile (octave_bindir, sprintf ("mkoctfile-%s%s", ver, ext));
-    octave_config_program = fullfile (octave_bindir, sprintf ("octave-config-%s%s", ver, ext));
+    mkoctfile_program = fullfile (octave_bindir, ...
+                                  sprintf ("mkoctfile-%s%s", ver, ext));
+    octave_config_program = fullfile (octave_bindir, ...
+                                      sprintf ("octave-config-%s%s", ver, ext));
     octave_binary = fullfile (octave_bindir, sprintf ("octave-%s%s", ver, ext));
-    cenv = {"MKOCTFILE"; mkoctfile_program;
-            "OCTAVE_CONFIG"; octave_config_program;
-            "OCTAVE"; octave_binary;
-            "INSTALLDIR"; desc.dir};
-    scenv = sprintf ("%s=\"%s\" ", cenv{:});
 
     if (! exist (mkoctfile_program, "file"))
       __gripe_missing_component__ ("pkg", "mkoctfile");
@@ -48,6 +45,16 @@
       __gripe_missing_component__ ("pkg", "octave");
     endif
 
+    if (verbose)
+      mkoctfile_program = [mkoctfile_program " --verbose"];
+    endif
+
+    cenv = {"MKOCTFILE"; mkoctfile_program;
+            "OCTAVE_CONFIG"; octave_config_program;
+            "OCTAVE"; octave_binary;
+            "INSTALLDIR"; desc.dir};
+    scenv = sprintf ("%s='%s' ", cenv{:});
+
     ## Configure.
     if (exist (fullfile (src, "configure"), "file"))
       flags = "";
@@ -74,8 +81,15 @@
     endif
 
     ## Make.
+    if (ispc ())
+      jobs = 1;
+    else
+      jobs = nproc ("overridable");
+    endif
+
     if (exist (fullfile (src, "Makefile"), "file"))
-      [status, output] = shell ([scenv "make -C '" src "'"], verbose);
+      [status, output] = shell (sprintf ("%s make --jobs %i --directory '%s'",
+                                         scenv, jobs, src), verbose);
       if (status != 0)
         rmdir (desc.dir, "s");
         disp (output);
@@ -101,7 +115,7 @@
         filenames(end) = [];
       endif
       filenames = strtrim (ostrsplit (filenames, "\n"));
-      delete_idx =  [];
+      delete_idx = [];
       for i = 1:length (filenames)
         if (! all (isspace (filenames{i})))
           filenames{i} = fullfile (src, filenames{i});
@@ -126,8 +140,8 @@
     else
       idx = cellfun ("is_architecture_dependent", filenames);
     endif
-    archdependent = filenames (idx);
-    archindependent = filenames (!idx);
+    archdependent = filenames(idx);
+    archindependent = filenames(!idx);
 
     ## Copy the files.
     if (! all (isspace ([filenames{:}])))
--- a/scripts/pkg/private/copy_files.m
+++ b/scripts/pkg/private/copy_files.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -104,7 +104,6 @@
 
   packinfo_copy_file ("DESCRIPTION", "required", packdir, packinfo, desc, octfiledir);
   packinfo_copy_file ("COPYING", "required", packdir, packinfo, desc, octfiledir);
-
   packinfo_copy_file ("CITATION", "optional", packdir, packinfo, desc, octfiledir);
   packinfo_copy_file ("NEWS", "optional", packdir, packinfo, desc, octfiledir);
   packinfo_copy_file ("ONEWS", "optional", packdir, packinfo, desc, octfiledir);
--- a/scripts/pkg/private/create_pkgadddel.m
+++ b/scripts/pkg/private/create_pkgadddel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
new file mode 100644
--- /dev/null
+++ b/scripts/pkg/private/default_prefix.m
@@ -0,0 +1,39 @@
+## Copyright (C) 2014-2015 Carlo de Falco
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {[@var{prefix}, @var{archprefix} =} default_prefix (@var{global_install})
+## Undocumented internal function.
+## @end deftypefn
+
+function [prefix, archprefix] = default_prefix (global_install, desc)
+  if (global_install)
+    prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages");
+    if (nargin == 2)
+      archprefix = fullfile (octave_config_info ("libdir"), "octave",
+                             "packages", [desc.name "-" desc.version]);
+    else
+      archprefix = fullfile (octave_config_info ("libdir"), "octave",
+                             "packages");
+    endif
+  else
+    prefix = tilde_expand (fullfile ("~", "octave"));
+    archprefix = prefix;
+  endif
+endfunction
+
--- a/scripts/pkg/private/describe.m
+++ b/scripts/pkg/private/describe.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/dirempty.m
+++ b/scripts/pkg/private/dirempty.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/extract_pkg.m
+++ b/scripts/pkg/private/extract_pkg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/finish_installation.m
+++ b/scripts/pkg/private/finish_installation.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/fix_depends.m
+++ b/scripts/pkg/private/fix_depends.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/fix_version.m
+++ b/scripts/pkg/private/fix_version.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/generate_lookfor_cache.m
+++ b/scripts/pkg/private/generate_lookfor_cache.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/get_description.m
+++ b/scripts/pkg/private/get_description.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/get_forge_download.m
+++ b/scripts/pkg/private/get_forge_download.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/get_forge_pkg.m
+++ b/scripts/pkg/private/get_forge_pkg.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2005-2013 Søren Hauberg
-## Copyright (C) 2010-2013 VZLU Prague, a.s.
+## Copyright (C) 2005-2015 Søren Hauberg
+## Copyright (C) 2010-2015 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
 ##
@@ -37,7 +37,8 @@
   name = tolower (name);
 
   ## Try to download package's index page.
-  [html, succ] = urlread (sprintf ("http://packages.octave.org/%s/index.html", name));
+  [html, succ] = urlread (sprintf ("http://packages.octave.org/%s/index.html",
+                                   name));
   if (succ)
     ## Remove blanks for simpler matching.
     html(isspace(html)) = [];
--- a/scripts/pkg/private/get_unsatisfied_deps.m
+++ b/scripts/pkg/private/get_unsatisfied_deps.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/getarch.m
+++ b/scripts/pkg/private/getarch.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/getarchdir.m
+++ b/scripts/pkg/private/getarchdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/getarchprefix.m
+++ b/scripts/pkg/private/getarchprefix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -24,8 +24,7 @@
 
 function archprefix = getarchprefix (desc, global_install)
   if (global_install)
-    archprefix = fullfile (octave_config_info ("libdir"), "octave",
-                           "packages", [desc.name "-" desc.version]);
+    [~, archprefix] = default_prefix (global_install, desc);
   else
     archprefix = desc.dir;
   endif
--- a/scripts/pkg/private/install.m
+++ b/scripts/pkg/private/install.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -64,7 +64,7 @@
 
       if (exist (tgz, "file"))
         ## Create a temporary directory.
-        tmpdir = tmpnam ();
+        tmpdir = tempname ();
         tmpdirs{end+1} = tmpdir;
         if (verbose)
           printf ("mkdir (%s)\n", tmpdir);
@@ -322,7 +322,7 @@
         nm = descriptions{i}.name;
         for j = 1:length (installed_pkgs_lst)
           if (strcmp (nm, installed_pkgs_lst{j}.name))
-            idx (end + 1) = j;
+            idx(end + 1) = j;
             break;
           endif
         endfor
@@ -332,10 +332,11 @@
                                     global_install);
   endif
 
-  ## If there's a NEWS file, mention it
-  ## we are checking if desc exists too because it's possible to ge to this point
+  ## If there is a NEWS file, mention it.
+  ## Check if desc exists too because it's possible to get to this point
   ## without creating it such as giving an invalid filename for the package
-  if (exist ("desc", "var") && exist (fullfile (desc.dir, "packinfo", "NEWS"), "file"))
+  if (exist ("desc", "var")
+      && exist (fullfile (desc.dir, "packinfo", "NEWS"), "file"))
     printf ("For information about changes from previous versions of the %s package, run 'news %s'.\n",
             desc.name, desc.name);
   endif
--- a/scripts/pkg/private/installed_packages.m
+++ b/scripts/pkg/private/installed_packages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -22,7 +22,8 @@
 ## Undocumented internal function.
 ## @end deftypefn
 
-function [out1, out2] = installed_packages (local_list, global_list)
+function [out1, out2] = installed_packages (local_list, global_list, pkgname = {})
+
   ## Get the list of installed packages.
   try
     local_packages = load (local_list).local_packages;
@@ -38,41 +39,42 @@
 
   ## Eliminate duplicates in the installed package list.
   ## Locally installed packages take precedence.
-  dup = [];
-  for i = 1:length (installed_pkgs_lst)
-    if (any (dup == i))
-      continue;
+  installed_names = cellfun (@(x) x.name, installed_pkgs_lst,
+                             "uniformoutput", false);
+  [~, idx] = unique (installed_names, "first");
+  installed_names = installed_names(idx);
+  installed_pkgs_lst = installed_pkgs_lst(idx);
+
+  ## Check whether info on a particular package was requested
+  if (! isempty (pkgname))
+    idx = find (strcmp (pkgname{1}, installed_names));
+    if (isempty (idx))
+      installed_names = {};
+      installed_pkgs_lst = {};
+    else
+      installed_names = installed_names(idx);
+      installed_pkgs_lst = installed_pkgs_lst(idx);
     endif
-    for j = (i+1):length (installed_pkgs_lst)
-      if (any (dup == j))
-        continue;
-      endif
-      if (strcmp (installed_pkgs_lst{i}.name, installed_pkgs_lst{j}.name))
-        dup = [dup, j];
-      endif
-    endfor
-  endfor
-  if (! isempty (dup))
-    installed_pkgs_lst(dup) = [];
   endif
 
   ## Now check if the package is loaded.
+  ## FIXME: couldn't dir_in_loadpath() be used here?
   tmppath = strrep (path (), "\\", "/");
-  for i = 1:length (installed_pkgs_lst)
+  for i = 1:numel (installed_pkgs_lst)
     if (strfind (tmppath, strrep (installed_pkgs_lst{i}.dir, '\', '/')))
       installed_pkgs_lst{i}.loaded = true;
     else
       installed_pkgs_lst{i}.loaded = false;
     endif
   endfor
-  for i = 1:length (local_packages)
+  for i = 1:numel (local_packages)
     if (strfind (tmppath, strrep (local_packages{i}.dir, '\', '/')))
       local_packages{i}.loaded = true;
     else
       local_packages{i}.loaded = false;
     endif
   endfor
-  for i = 1:length (global_packages)
+  for i = 1:numel (global_packages)
     if (strfind (tmppath, strrep (global_packages{i}.dir, '\', '/')))
       global_packages{i}.loaded = true;
     else
@@ -90,10 +92,14 @@
     return;
   endif
 
-  ## We shouldn't return something, so we'll print something.
-  num_packages = length (installed_pkgs_lst);
+  ## Don't return anything, instead we'll print something.
+  num_packages = numel (installed_pkgs_lst);
   if (num_packages == 0)
-    printf ("no packages installed.\n");
+    if (isempty (pkgname))
+      printf ("no packages installed.\n");
+    else
+      printf ("package %s is not installed.\n", pkgname{1});
+    endif
     return;
   endif
 
@@ -101,20 +107,13 @@
   h1 = "Package Name";
   h2 = "Version";
   h3 = "Installation directory";
-  max_name_length = length (h1);
-  max_version_length = length (h2);
-  names = cell (num_packages, 1);
-  for i = 1:num_packages
-    max_name_length = max (max_name_length,
-                           length (installed_pkgs_lst{i}.name));
-    max_version_length = max (max_version_length,
-                              length (installed_pkgs_lst{i}.version));
-    names{i} = installed_pkgs_lst{i}.name;
-  endfor
-  max_dir_length = terminal_size ()(2) - max_name_length - ...
-                                             max_version_length - 7;
+  max_name_length = max ([length(h1), cellfun(@length, installed_names)]);
+  version_lengths = cellfun (@(x) length (x.version), installed_pkgs_lst);
+  max_version_length = max ([length(h2), version_lengths]);
+  ncols = terminal_size ()(2);
+  max_dir_length = ncols - max_name_length - max_version_length - 7;
   if (max_dir_length < 20)
-     max_dir_length = Inf;
+    max_dir_length = Inf;
   endif
 
   h1 = postpad (h1, max_name_length + 1, " ");
@@ -129,13 +128,12 @@
   printf ("%s\n", tmp);
 
   ## Print the packages.
-  format = sprintf ("%%%ds %%1s| %%%ds | %%s\n", max_name_length,
-                    max_version_length);
-  [dummy, idx] = sort (names);
+  format = sprintf ("%%%ds %%1s| %%%ds | %%s\n",
+                    max_name_length, max_version_length);
   for i = 1:num_packages
-    cur_name = installed_pkgs_lst{idx(i)}.name;
-    cur_version = installed_pkgs_lst{idx(i)}.version;
-    cur_dir = installed_pkgs_lst{idx(i)}.dir;
+    cur_name = installed_pkgs_lst{i}.name;
+    cur_version = installed_pkgs_lst{i}.version;
+    cur_dir = installed_pkgs_lst{i}.dir;
     if (length (cur_dir) > max_dir_length)
       first_char = length (cur_dir) - max_dir_length + 4;
       first_filesep = strfind (cur_dir(first_char:end), filesep ());
@@ -145,12 +143,13 @@
         cur_dir = ["..." cur_dir(first_char:end)];
       endif
     endif
-    if (installed_pkgs_lst{idx(i)}.loaded)
+    if (installed_pkgs_lst{i}.loaded)
       cur_loaded = "*";
     else
       cur_loaded = " ";
     endif
     printf (format, cur_name, cur_loaded, cur_version, cur_dir);
   endfor
+
 endfunction
 
--- a/scripts/pkg/private/is_architecture_dependent.m
+++ b/scripts/pkg/private/is_architecture_dependent.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/list_forge_packages.m
+++ b/scripts/pkg/private/list_forge_packages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/load_package_dirs.m
+++ b/scripts/pkg/private/load_package_dirs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -42,7 +42,7 @@
             for j = 1 : length (installed_pkgs_lst)
               if (strcmp (installed_pkgs_lst{j}.name, deps{k}.package))
                 if (! any (idx == j))
-                  tmplidx (end + 1) = j;
+                  tmplidx(end + 1) = j;
                   break;
                 endif
               endif
--- a/scripts/pkg/private/load_packages.m
+++ b/scripts/pkg/private/load_packages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -41,7 +41,7 @@
     idx = [];
     for i = 1:length (installed_pkgs_lst)
       if (exist (fullfile (pdirs{i}, "packinfo", ".autoload"), "file"))
-        idx (end + 1) = i;
+        idx(end + 1) = i;
       endif
     endfor
   ## Load package_name1 ...
@@ -52,7 +52,7 @@
       if (! any (idx2))
           error ("package %s is not installed", files{i});
       endif
-      idx (end + 1) = idx2;
+      idx(end + 1) = idx2;
     endfor
   endif
 
--- a/scripts/pkg/private/load_packages_and_dependencies.m
+++ b/scripts/pkg/private/load_packages_and_dependencies.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/packinfo_copy_file.m
+++ b/scripts/pkg/private/packinfo_copy_file.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -24,7 +24,7 @@
 
 function packinfo_copy_file (filename, requirement, packdir, packinfo, desc, octfiledir)
   filepath = fullfile (packdir, filename);
-  if (!exist (filepath, "file") && strcmpi (requirement, "optional"))
+  if (! exist (filepath, "file") && strcmpi (requirement, "optional"))
     ## do nothing, it's still OK
   else
     [status, output] = copyfile (filepath, packinfo);
--- a/scripts/pkg/private/parse_pkg_idx.m
+++ b/scripts/pkg/private/parse_pkg_idx.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/prepare_installation.m
+++ b/scripts/pkg/private/prepare_installation.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/print_package_description.m
+++ b/scripts/pkg/private/print_package_description.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/rebuild.m
+++ b/scripts/pkg/private/rebuild.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -93,7 +93,7 @@
       endfor
     endfor
     if (! isempty (dup))
-      descriptions (dup) = [];
+      descriptions(dup) = [];
     endif
   endif
 endfunction
--- a/scripts/pkg/private/repackage.m
+++ b/scripts/pkg/private/repackage.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/save_order.m
+++ b/scripts/pkg/private/save_order.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -28,7 +28,7 @@
     deps = desc{i}.depends;
     if (isempty (deps)
         || (length (deps) == 1 && strcmp (deps{1}.package, "octave")))
-      newdesc {end + 1} = desc{i};
+      newdesc{end + 1} = desc{i};
     else
       tmpdesc = {};
       for k = 1 : length (deps)
@@ -51,7 +51,7 @@
   for i = 1 : length (newdesc)
     for j = (i + 1) : length (newdesc)
       if (strcmp (newdesc{i}.name, newdesc{j}.name))
-        idx (end + 1) = j;
+        idx(end + 1) = j;
       endif
     endfor
   endfor
--- a/scripts/pkg/private/shell.m
+++ b/scripts/pkg/private/shell.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/uninstall.m
+++ b/scripts/pkg/private/uninstall.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -66,80 +66,85 @@
     endif
   endif
 
-  ## Compute the packages that will remain installed.
-  idx = setdiff (1:num_packages, delete_idx);
-  remaining_packages = {installed_pkgs_lst{idx}};
+  if (isempty (delete_idx))
+    warning ("no packages will be uninstalled");
+  else
+
+    ## Compute the packages that will remain installed.
+    idx = setdiff (1:num_packages, delete_idx);
+    remaining_packages = {installed_pkgs_lst{idx}};
+
+    ## Check dependencies.
+    if (handle_deps)
+      error_text = "";
+      for i = 1:length (remaining_packages)
+        desc = remaining_packages{i};
+        bad_deps = get_unsatisfied_deps (desc, remaining_packages);
+
+        ## Will the uninstallation break any dependencies?
+        if (! isempty (bad_deps))
+          for i = 1:length (bad_deps)
+            dep = bad_deps{i};
+            error_text = [error_text " " desc.name " needs " ...
+                          dep.package " " dep.operator " " dep.version "\n"];
+          endfor
+        endif
+      endfor
+
+      if (! isempty (error_text))
+        error ("the following dependencies where unsatisfied:\n  %s", error_text);
+      endif
+    endif
 
-  ## Check dependencies.
-  if (handle_deps)
-    error_text = "";
-    for i = 1:length (remaining_packages)
-      desc = remaining_packages{i};
-      bad_deps = get_unsatisfied_deps (desc, remaining_packages);
-
-      ## Will the uninstallation break any dependencies?
-      if (! isempty (bad_deps))
-        for i = 1:length (bad_deps)
-          dep = bad_deps{i};
-          error_text = [error_text " " desc.name " needs " ...
-                        dep.package " " dep.operator " " dep.version "\n"];
-        endfor
+    ## Delete the directories containing the packages.
+    for i = delete_idx
+      desc = installed_pkgs_lst{i};
+      ## If an 'on_uninstall.m' exist, call it!
+      if (exist (fullfile (desc.dir, "packinfo", "on_uninstall.m"), "file"))
+        wd = pwd ();
+        cd (fullfile (desc.dir, "packinfo"));
+        on_uninstall (desc);
+        cd (wd);
+      endif
+      ## Do the actual deletion.
+      if (desc.loaded)
+        rmpath (desc.dir);
+        if (exist (getarchdir (desc)))
+          rmpath (getarchdir (desc));
+        endif
+      endif
+      if (exist (desc.dir, "dir"))
+        [status, msg] = rmdir (desc.dir, "s");
+        if (status != 1 && exist (desc.dir, "dir"))
+          error ("couldn't delete directory %s: %s", desc.dir, msg);
+        endif
+        [status, msg] = rmdir (getarchdir (desc), "s");
+        if (status != 1 && exist (getarchdir (desc), "dir"))
+          error ("couldn't delete directory %s: %s", getarchdir (desc), msg);
+        endif
+        if (dirempty (desc.archprefix))
+          rmdir (desc.archprefix, "s");
+        endif
+      else
+        warning ("directory %s previously lost", desc.dir);
       endif
     endfor
 
-    if (! isempty (error_text))
-      error ("the following dependencies where unsatisfied:\n  %s", error_text);
-    endif
-  endif
-
-  ## Delete the directories containing the packages.
-  for i = delete_idx
-    desc = installed_pkgs_lst{i};
-    ## If an 'on_uninstall.m' exist, call it!
-    if (exist (fullfile (desc.dir, "packinfo", "on_uninstall.m"), "file"))
-      wd = pwd ();
-      cd (fullfile (desc.dir, "packinfo"));
-      on_uninstall (desc);
-      cd (wd);
-    endif
-    ## Do the actual deletion.
-    if (desc.loaded)
-      rmpath (desc.dir);
-      if (exist (getarchdir (desc)))
-        rmpath (getarchdir (desc));
-      endif
-    endif
-    if (exist (desc.dir, "dir"))
-      [status, msg] = rmdir (desc.dir, "s");
-      if (status != 1 && exist (desc.dir, "dir"))
-        error ("couldn't delete directory %s: %s", desc.dir, msg);
-      endif
-      [status, msg] = rmdir (getarchdir (desc), "s");
-      if (status != 1 && exist (getarchdir (desc), "dir"))
-        error ("couldn't delete directory %s: %s", getarchdir (desc), msg);
-      endif
-      if (dirempty (desc.archprefix))
-        rmdir (desc.archprefix, "s");
+    ## Write a new ~/.octave_packages.
+    if (global_install)
+      if (length (remaining_packages) == 0)
+        unlink (global_list);
+      else
+        global_packages = save_order (remaining_packages);
+        save (global_list, "global_packages");
       endif
     else
-      warning ("directory %s previously lost", desc.dir);
-    endif
-  endfor
-
-  ## Write a new ~/.octave_packages.
-  if (global_install)
-    if (length (remaining_packages) == 0)
-      unlink (global_list);
-    else
-      global_packages = save_order (remaining_packages);
-      save (global_list, "global_packages");
-    endif
-  else
-    if (length (remaining_packages) == 0)
-      unlink (local_list);
-    else
-      local_packages = save_order (remaining_packages);
-      save (local_list, "local_packages");
+      if (length (remaining_packages) == 0)
+        unlink (local_list);
+      else
+        local_packages = save_order (remaining_packages);
+        save (local_list, "local_packages");
+      endif
     endif
   endif
 
--- a/scripts/pkg/private/unload_packages.m
+++ b/scripts/pkg/private/unload_packages.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/verify_directory.m
+++ b/scripts/pkg/private/verify_directory.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
--- a/scripts/pkg/private/write_index.m
+++ b/scripts/pkg/private/write_index.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Søren Hauberg
+## Copyright (C) 2005-2015 Søren Hauberg
 ## Copyright (C) 2010 VZLU Prague, a.s.
 ##
 ## This file is part of Octave.
@@ -37,7 +37,7 @@
   ## Get classes in dir
   class_idx = find (strncmp (files, '@', 1));
   for k = 1:length (class_idx)
-    class_name = files {class_idx (k)};
+    class_name = files {class_idx(k)};
     class_dir = fullfile (dir, class_name);
     if (exist (class_dir, "dir"))
       [files2, err, msg] = readdir (class_dir);
--- a/scripts/plot/appearance/__clabel__.m
+++ b/scripts/plot/appearance/__clabel__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -127,3 +127,7 @@
 
 endfunction
 
+
+## No test needed for internal helper function.
+%!assert (1)
+
--- a/scripts/plot/appearance/__getlegenddata__.m
+++ b/scripts/plot/appearance/__getlegenddata__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 David Bateman
+## Copyright (C) 2010-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -17,7 +17,7 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{hplots}, @var{strings}]} = __getlegenddata__ (@var{h})
+## @deftypefn {Function File} {[@var{hplots}, @var{strings}] =} __getlegenddata__ (@var{h})
 ## Undocumented internal function.
 ## @end deftypefn
 
@@ -29,7 +29,7 @@
   if (numel (ca) == 1)
     kids = get (ca, "children");
   else
-    kids = [get(kids, "children"){:}];
+    kids = [get(ca, "children"){:}];
   endif
 
   for i = numel (kids):-1:1
@@ -59,3 +59,7 @@
 
 endfunction
 
+
+## No test needed for internal helper function.
+%!assert (1)
+
new file mode 100644
--- /dev/null
+++ b/scripts/plot/appearance/annotation.m
@@ -0,0 +1,1498 @@
+## Copyright (C) 2015 Pantxo Diribarne
+##
+##   This program is free software; you can redistribute it and/or modify
+##   it under the terms of the GNU General Public License as published by
+##   the Free Software Foundation; either version 3 of the License, or
+##   (at your option) any later version.
+##
+##   This program is distributed in the hope that it will be useful,
+##   but WITHOUT ANY WARRANTY; without even the implied warranty of
+##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##   GNU General Public License for more details.
+##
+##   You should have received a copy of the GNU General Public License
+##   along with Octave; see the file COPYING.  If not, see
+##   <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} annotation (@var{type})
+## @deftypefnx {Function File} {} annotation ("line", @var{x}, @var{y})
+## @deftypefnx {Function File} {} annotation ("arrow", @var{x}, @var{y})
+## @deftypefnx {Function File} {} annotation ("doublearrow", @var{x}, @var{y})
+## @deftypefnx {Function File} {} annotation ("textarrow", @var{x}, @var{y})
+## @deftypefnx {Function File} {} annotation ("textbox", @var{pos})
+## @deftypefnx {Function File} {} annotation ("rectangle", @var{pos})
+## @deftypefnx {Function File} {} annotation ("ellipse", @var{pos})
+## @deftypefnx {Function File} {} annotation (@var{hf}, @dots{})
+## @deftypefnx {Function File} {} annotation (@dots{}, @var{prop}, @var{val})
+## @deftypefnx {Function File} {@var{h} =} annotation (@dots{})
+## Draw annotations to emphasize parts of a figure.
+##
+## You may build a default annotation specifying only the type
+## @var{type} of the annotation.  Otherwise you can set the position of
+## the annotation using either @var{x} and @var{y} coordinates for
+## line-based annotations or a position vector @var{pos} for others.
+## In any case, coordinates are interpreted using the @qcode{"units"}
+## property of the annotation objects: the default is
+## @qcode{"normalized"}, which means the lower left hand corner of the
+## figure has coordinates @samp{[0 0]} and the upper right hand corner
+## @samp{[1 1]}.
+##
+## The figure on which the annotations should be drawn may be
+## specified by providing its graphics handle @var{hf} before any
+## other argument.  Otherwise annotations are drawn on the current
+## figure.
+##
+## Further arguments can be provided in the form of
+## @var{prop}/@var{val} pairs to customize the annotation appearance
+## and the units in which coordinates are interpreted.  The annotation
+## can also be customized afterward using its graphics handle
+## @var{h} and @code{set} function.
+##
+## All annotation objects share two properties:
+##
+## @itemize
+## @item
+##  @qcode{"units"}: the units in which coordinates are interpreted.
+##  Its value may be one of @qcode{"centimeters"} |
+##  @qcode{"characters"} | @qcode{"inches"} | @qcode{"@{normalized@}"}
+##  | @qcode{"pixels"} | @qcode{"points"}.
+##
+## @item
+##  @qcode{"position"}: a four elements vector [x0 y0 width height]
+##  specifying the coordinates (x0,y0) of the origin of the annotation
+##  object, its width and its height.  The width and height may be
+##  negative, depending on the orientation of the object.
+##
+## @end itemize
+##
+## Valid annotation types and their specific properties are described
+## below:
+##
+## @table @asis
+## @item @qcode{"line"}
+##  Constructs a line.  @var{x} and @var{y} must be two
+##  elements vectors specifying the x and y coordinates of the two
+##  ends of the line.
+##
+##  The line can be customized using @qcode{"linewidth"},
+##  @qcode{"linestyle"} and @qcode{"color"} properties the same way
+##  as with @code{line} objects.
+##
+## @item  @qcode{"arrow"}
+##   Construct an arrow.  The second point in vectors @var{x} and
+##   @var{y} specifies the arrowhead coordinates.
+##
+##  Besides line properties, the arrowhead can be customized using
+##  @qcode{"headlength"}, @qcode{"headwidth"} and @qcode{"headstyle"}
+##  properties.  Supported values for @qcode{"headstyle"} property are:
+##  [@qcode{"diamond"} | @qcode{"ellipse"} | @qcode{"plain"} |
+##  @qcode{"rectangle"} | @qcode{"vback1"} | @qcode{"@{vback2@}"} |
+##  @qcode{"vback3"}]
+##
+## @item  @qcode{"doublearrow"}
+##   Construct a double arrow.  Vectors @var{x} and @var{y} specify the
+##   arrowheads coordinates.
+##
+##  The line and the arrowhead can be customized as for arrow
+##  annotations but some property names are duplicated:
+##  @qcode{"head1length"}/@qcode{"head2length"},
+##  @qcode{"head1width"}/@qcode{"head2width"}, etc.  The index 1 marks
+##  the properties of the arrowhead at the first point in @var{x} and
+##  @var{y} coordinates.
+##
+## @item  @qcode{"textarrow"}
+##  Construct an arrow with a text label at the opposite of the
+##  arrowhead.
+##
+##  The line and the arrowhead can be customized as for arrow
+##  annotations, and the text can be customized using the same
+##  properties as @code{text} graphics objects.  Note however
+##  that some text property names are prefixed with "text" to
+##  distinguish arrow and text properties:
+##  @qcode{"textbackgroundcolor"}, @qcode{"textcolor"},
+##  @qcode{"textedgecolor"}, @qcode{"textlinewidth"},
+##  @qcode{"textmargin"}, @qcode{"textrotation"}.
+##
+## @item  @qcode{"textbox"}
+##  Construct a box with a text inside.  @var{pos} specifies the
+##  @qcode{"position"} property of the annotation.
+##
+##  You may use @qcode{"backgroundcolor"}, @qcode{"edgecolor"},
+##  @qcode{"linestyle"} , @qcode{"linewidth"} properties to customize
+##  the box background color and edges appearance.  A limited set of
+##  @code{text} objects properties is also available: besides
+##  @qcode{"font@dots{}"} properties, you may also use
+##  @qcode{"horizontalalignment"} and @qcode{"verticalalignment"} to
+##  move the text inside the box.
+##
+##  Finally the  @qcode{"fitboxtotext"} property controls the actual
+##  extent of the box.  If @qcode{"on"} (the default) the
+##  box limits are fitted to the text extent.
+##
+## @item  @qcode{"rectangle"}
+##  Construct a rectangle.  @var{pos} specifies the
+##  @qcode{"position"} property of the annotation.
+##
+##  You may use @qcode{"facecolor"}, @qcode{"color"},
+##  @qcode{"linestyle"} and @qcode{"linewidth"} properties to customize
+##  the rectangle background color and edges appearance.
+##
+## @item  @qcode{"ellipse"}
+##  Construct an ellipse.  @var{pos} specifies the
+##  @qcode{"position"} property of the annotation.
+##
+##  See @qcode{"rectangle"} annotations for customization.
+## @end table
+##
+## @seealso{xlabel, title}
+## @end deftypefn
+
+function varargout = annotation (varargin)
+
+  objtype = "";
+  hf = [];
+  lims = [];
+  x = y = [];
+  opts = {};
+
+  nargin = numel (varargin);
+  if (nargin == 0)
+    print_usage ();
+  endif
+
+
+  ## Parent figure
+  if (isfigure (varargin{1}))
+    hf = varargin{1};
+    varargin = varargin(2:end);
+    nargin --;
+  endif
+
+  ## Annotation type
+  types = {"line", "arrow", "doublearrow", "textarrow", ...
+           "textbox", "ellipse", "rectangle"};
+  if (ischar (varargin{1}))
+    objtype = varargin{1};
+    varargin(1) = [];
+    nargin --;
+  else
+    print_usage ();
+  endif
+
+  switch (objtype)
+    case types(1:4)
+
+      if (nargin == 0)
+        lims = [];
+      elseif (nargin >= 2)
+        x = varargin{1};
+        y = varargin{2};
+        varargin(1:2) = [];
+
+        if (isnumeric (x) && isnumeric (y)
+            && length (x) == 2 && length (y) == 2)
+          lims = [x(1) y(1) diff(x) diff(y)];
+        else
+          error ("annotation: expect 2 elements vectors for X and Y");
+        endif
+      else
+        print_usage ();
+      endif
+    case types(5:end)
+      if (nargin == 0)
+        lims = [];
+      else
+        lims = varargin{1};
+        varargin(1) = [];
+
+        if (! isvector (lims) || length (lims) != 4)
+          error ("annotation: expect 4 elements vector for POS")
+        endif
+      endif
+    otherwise
+      error ("annotation: unknown annotation type %s", objtype)
+  endswitch
+
+  ## options
+  opts = varargin;
+  nopts = numel (opts);
+  if (! isempty (opts))
+    if (fix (nopts/2) != nopts/2
+        || ! all (cellfun (@ischar, opts(1:2:end))))
+      warning ("annotation: couldn't parse PROP/VAL pairs, skipping");
+      opts = {};
+    endif
+  endif
+
+  ## create annotation
+  showhidden = get (0, "showhiddenhandles");
+  set (0, "showhiddenhandles", "on");
+
+  unwind_protect
+    if (isempty (hf))
+      hf = gcf ();
+    endif
+
+    ## Axes
+    hca = get (hf, "currentaxes");
+
+    hax = findall (hf, "-depth", 1, "tag", "scribeoverlay");
+    if (isempty (hax))
+      hax = buildoverlay (hf);
+    else
+      ## Make sure the annotations are on top of other axes
+      axes (hax);
+    endif
+
+    ## Build annotation
+    htmp = buildannot (hax, objtype, lims);
+
+    ## Set user defined properties
+    if (! isempty (opts))
+      set (htmp, opts{:});
+    endif
+
+  unwind_protect_cleanup
+    set (0, "showhiddenhandles", showhidden);
+    set (hf, "currentaxes", hca);
+  end_unwind_protect
+
+  if (nargout != 0)
+    varargout{1} = htmp;
+  endif
+
+endfunction
+
+function hax = buildoverlay (hf)
+
+  hax = axes ("parent", hf, "position", [0 0 1 1], ...
+              "visible", "off","tag", "scribeoverlay", ...
+              "xlim", [0 1], "ylim", [0 1], ...
+              "handlevisibility", "off");
+
+  ## hidden property to store figure size in absolute (points)
+  ## coordinates
+  addproperty ("figsize_points", hax, "axesxmtick", []);
+  update_figsize_points (hf, {}, hax);
+
+
+  listener = {@update_figsize_points, hax};
+  addlistener (hf, "position", listener);
+
+  delfcn = @() dellistener (hf, "position", listener);
+  set (hax, "deletefcn", delfcn);
+
+endfunction
+
+function update_figsize_points (hf, dummy, hax)
+
+  persistent recursive = false;
+  if (! recursive)
+    recursive = true;
+    units = get (hf, "units");
+    set (hf, "units", "points");
+    pos = get (hf, "position");
+    set (hf, "units", units);
+
+    set (hax, "figsize_points", pos(3:4));
+    recursive = false;
+  endif
+
+endfunction
+
+function h = buildannot (hax, objtype, pos)
+
+  ## Base hggroup
+  h = hggroup ("parent", hax);
+
+  ## Base context menu
+  hui = uicontextmenu (get (hax, "parent"));
+
+  ## Add common properties
+  if (strcmp (graphics_toolkit (), "gnuplot"))
+    ## FIXME: this is a workaround for bug #39394 (gnuplot toolkit)
+    defprops = {"position", "axesposition", [0.3 0.3 0.1 0.1], ...
+                "units", "textunits", "data"};
+  else
+    defprops = {"position", "axesposition", [0.3 0.3 0.1 0.1], ...
+                "units", "axesunits", "normalized"};
+  endif
+  addbaseprops (h, defprops);
+  setappdata (h, "__former_units__", "normalized");
+
+  ## Add common menus
+  prop = "units";
+  vals = set (h, prop);
+  addbasemenu (hui, h, prop, vals, "Units");
+
+  ## Common updaters
+  listener = {@update_position, h, true};
+
+  addlistener (hax, "figsize_points", listener);
+
+  delfcn = @() dellistener (hax, "figsize_points", listener);
+  set (h, "deletefcn", delfcn);
+
+  addlistener (h, "units", {@update_position, h});
+
+  ## Now work with normalized coordinates
+  if (! isempty (pos))
+    set (h, "position", pos);
+  endif
+  pos = getnormpos (h);
+
+  ## Build annotation object and its specific properties/updaters
+  switch (objtype)
+    case {"line", "arrow", "doublearrow", "textarrow"}
+      ## Add properties
+      proptable = lineprops ();
+      if (strcmp (objtype, "arrow"))
+        proptable = [proptable arrowprops()];
+      elseif (strcmp (objtype, "doublearrow"))
+        proptable = [proptable dblarrowprops()];
+      elseif (strcmp (objtype, "textarrow"))
+        proptable = [proptable arrowprops()];
+        proptable = [proptable textprops()];
+      endif
+
+      addbaseprops (h, proptable);
+
+      ## create line
+      hli = line ([pos(1); (pos(1) + pos(3))],
+                  [pos(2); (pos(2) + pos(4))],
+                  "parent", h, "color", get (h, "color"),
+                  "linestyle", get (h, "linestyle"),
+                  "linewidth", get (h, "linewidth"));
+
+      linemenu (hui, h);
+      set (hli, "uicontextmenu", hui);
+      
+      ## create patch(s) and text
+      if (strcmp (objtype, "arrow"))
+        [x, y] = arrowcoordinates (h);
+        hpa = patch (x, y, get (h, "color"), "parent", h,
+                    "edgecolor",  get (h, "color"));
+        update_arrow (h, {}, "position", hpa);
+        
+        arrowmenu (hui, h);
+        set (hpa, "uicontextmenu", hui);
+        
+      elseif (strcmp (objtype, "doublearrow"))
+        [x, y] = arrowcoordinates (h, 1);
+        hpa = patch (x, y, get (h, "color"), "parent", h,
+                    "edgecolor",  get (h, "color"));
+
+        [x, y] = arrowcoordinates (h, 2);
+        hpa(2) = patch (x, y, get (h, "color"), "parent", h,
+                    "edgecolor",  get (h, "color"));
+
+        update_arrow (h, {}, "position", hpa);
+        
+        dblarrowmenu (hui, h);
+        set (hpa, "uicontextmenu", hui);
+        
+      elseif (strcmp (objtype, "textarrow"))
+        [x, y] = arrowcoordinates (h);
+        hpa = patch (x, y, get (h, "color"), "parent", h,
+                    "edgecolor",  get (h, "color"));
+        update_arrow (h, {}, "position", hpa);
+
+        hte = text (get (h, "position")(1), ...
+                   get (h, "position")(2), ...
+                   get (h, "string"), "parent", h, ...
+                   "color", get (h, "color"));
+        propnames = textprops ("names");
+        for ii = 1:numel (propnames)
+          update_text (h, {}, propnames{ii}, hte);
+        endfor
+        update_text (h, {}, "position", hte);
+
+        arrowmenu (hui, h);
+        textmenu (hui, h);
+        set (hpa, "uicontextmenu", hui);
+        set (hte, "uicontextmenu", hui);
+        
+      endif
+
+      ## updaters
+      addlistener (h, "color", {@update_line, "color", hli});
+      addlistener (h, "linestyle", {@update_line, "linestyle", hli});
+      addlistener (h, "linewidth", {@update_line, "linewidth", hli});
+      addlistener (h, "x", {@update_line, "x", hli});
+      addlistener (h, "y", {@update_line, "y", hli});
+      addlistener (h, "position", {@update_line, "position", hli});
+
+      if (strcmp (objtype, "arrow"))
+        addlistener (h, "position", {@update_arrow, "position", hpa});
+        addlistener (h, "headwidth", {@update_arrow, "position", hpa});
+        addlistener (h, "headstyle", {@update_arrow, "position", hpa});
+        addlistener (h, "headlength", {@update_arrow, "position", hpa});
+        addlistener (h, "color", {@update_arrow, "color", hpa});
+      elseif (strcmp (objtype, "doublearrow"))
+        addlistener (h, "position", {@update_arrow, "position", hpa});
+        addlistener (h, "head1width",
+                     {@update_arrow, "position", [hpa(1) 0]});
+        addlistener (h, "head2width",
+                     {@update_arrow, "position", [0 hpa(2)]});
+        addlistener (h, "head1style",
+                     {@update_arrow, "position", [hpa(1) 0]});
+        addlistener (h, "head2style",
+                     {@update_arrow, "position", [0 hpa(2)]});
+        addlistener (h, "head1length",
+                     {@update_arrow, "position", [hpa(1) 0]});
+        addlistener (h, "head2length",
+                     {@update_arrow, "position", [0 hpa(2)]});
+        addlistener (h, "color",
+                     {@update_arrow, "color", hpa});
+      elseif (strcmp (objtype, "textarrow"))
+        addlistener (h, "position", {@update_arrow, "position", hpa});
+        addlistener (h, "headwidth", {@update_arrow, "position", hpa});
+        addlistener (h, "headstyle", {@update_arrow, "position", hpa});
+        addlistener (h, "headlength", {@update_arrow, "position", hpa});
+        addlistener (h, "color", {@update_arrow, "color", hpa});
+        propnames = textprops ("names");
+        for ii = 1:numel (propnames)
+          addlistener (h, propnames{ii},
+                       {@update_text, propnames{ii}, hte});
+          if (any (strcmp (propnames{ii},
+                           {"fontangle", "fontname", ...
+                            "fontsize", "fontweight", ...
+                            "horizontalalignment", "string", ...
+                            "textmargin", "textrotation", ...
+                            "verticalalignment"})))
+            addlistener (h, propnames{ii}, ...
+                         {@update_text, "position", hte});
+          endif
+        endfor
+        addlistener (h, "position", {@update_text, "position", hte});
+        addlistener (h, "color", {@update_text, "color", hte});
+      endif
+
+    case {"rectangle", "ellipse"}
+
+      ## Add properties
+      addbaseprops (h, rectprops ());
+
+      ## Create rectangle/ellipse
+      if (strcmp (objtype, "rectangle"))
+        [x, y] = pos2rect (pos);
+      else
+        [x, y] = pos2ell (pos);
+      endif
+
+      hr = patch (x, y, "parent", h);
+
+      propnames = rectprops ("names");
+      for ii = 1:numel (propnames)
+        update_rect (h, {}, propnames{ii}, hr, objtype);
+      endfor
+
+      rectmenu (hui, h);
+      set (hr, "uicontextmenu", hui);
+
+      ## Updaters
+      addlistener (h, "position", {@update_rect, "position", hr, objtype});
+      for ii = 1:numel (propnames)
+        addlistener (h, propnames{ii},
+                     {@update_rect, propnames{ii}, hr, objtype});
+      endfor
+
+    case "textbox"
+
+      ## Add properties
+      addbaseprops (h, textboxprops());
+
+      ## Create textbox
+      hpa = patch ("parent", h);
+      hte = text (pos(1), pos(2), get (h, "string"), "parent", h, ...
+                 "color", get (h, "color"));
+      update_textbox (h, {}, "position", [hte hpa]);
+
+      propnames = textboxprops ("names");
+      for ii = 1:numel (propnames)
+        update_textbox (h, {}, propnames{ii}, [hte hpa]);
+      endfor
+      
+      textboxmenu (hui, h);
+      set (hpa, "uicontextmenu", hui);
+      set (hte, "uicontextmenu", hui);
+
+      ## Updaters
+      addlistener (h, "position", {@update_textbox, "position", [hte hpa]});
+      for ii = 1:numel (propnames)
+        addlistener (h, propnames{ii},
+                     {@update_textbox, propnames{ii}, [hte hpa]});
+      endfor
+      addlistener (h, "horizontalalignment",
+                   {@update_textbox, "position", [hte hpa]});
+      addlistener (h, "verticalalignment",
+                   {@update_textbox, "position", [hte hpa]});
+
+  endswitch
+
+endfunction
+
+function props = lineprops (varargin)
+  ## FIXME: Use "axesx(y)lim" instead of "linex(y)data" 
+  props = {"color", "color", [0 0 0], ...
+           "linestyle",  "linelinestyle", "-", ...
+           "linewidth", "linelinewidth", 0.5, ...
+           "x", "linexdata", [0.3 0.4], ...
+           "y", "lineydata", [0.3 0.4]};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function col = basecolors ()
+  col = {"blue", "black", "cyan", "green", "magenta", "red", ...
+         "white", "yellow", "none"};
+endfunction
+
+function linemenu (hui, hpar)
+  hm = uimenu ("parent", hui, "label", "Line");
+  
+  ## Color
+  vals = basecolors ();
+  addbasemenu (hm, hpar, "Color", vals);
+  
+
+  ## Linestyle
+  vals = set (hpar, "linestyle");
+  addbasemenu (hm, hpar, "Linestyle", vals);
+
+  ## Linewidth
+  vals = [0.5 1 1.5 2];
+  addbasemenu (hm, hpar, "Linewidth", vals);
+endfunction
+
+function props = arrowprops (varargin)
+  props = {"headlength", "data", 10, ...
+           "headstyle",  "radio", "diamond|ellipse|none|plain|rectangle|vback1|{vback2}|vback3", ...
+           "headwidth",  "data", 10};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function arrowmenu (hui, hpar)
+  hm = uimenu ("parent", hui, "label", "Arrowhead");
+  
+  ## Headlength/width
+  vals = 6:2:16;
+  addbasemenu (hm, hpar, "headlength", vals, "Length");
+  addbasemenu (hm, hpar, "headwidth", vals, "Width");
+
+  ## Headstyle
+  vals = set (hpar, "headstyle");
+  addbasemenu (hm, hpar, "Headstyle", vals);
+endfunction
+
+function props = dblarrowprops (varargin)
+  props = {"head1length", "data", 10, ...
+           "head1style",  "radio", "diamond|ellipse|none|plain|rectangle|vback1|{vback2}|vback3", ...
+           "head1width",  "data", 10, ...
+           "head2length", "data", 10, ...
+           "head2style",  "radio", "diamond|ellipse|none|plain|rectangle|vback1|{vback2}|vback3", ...
+           "head2width", "data", 10};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function dblarrowmenu (hui, hpar)
+  hm1 = uimenu ("parent", hui, "label", "Arrowhead #1");
+  hm2 = uimenu ("parent", hui, "label", "Arrowhead #2");
+  
+  ## Headlength/width
+  vals = 6:2:16;
+  addbasemenu (hm1, hpar, "head1length", vals, "Length");
+  addbasemenu (hm1, hpar, "head1width", vals, "Width");
+  addbasemenu (hm2, hpar, "head2length", vals, "Length");
+  addbasemenu (hm2, hpar, "head2width", vals, "Width");
+
+  ## Headstyle
+  vals = set (hpar, "head1style");
+  addbasemenu (hm1, hpar, "head1style", vals, "Headstyle");
+  addbasemenu (hm2, hpar, "head2style", vals, "Headstyle");
+endfunction
+
+function props = textprops (varargin)
+  props = {"fontangle", "textfontangle", "normal", ...
+           "fontname",  "textfontname", "Helvetica", ...
+           "fontsize", "textfontsize", 10, ...
+           "fontunits", "textfontunits", "points", ...
+           "fontweight",  "textfontweight", "normal", ...
+           "horizontalalignment", "texthorizontalalignment", "left", ...
+           "interpreter", "textinterpreter", "tex", ...
+           "string", "textstring", "", ...
+           "textbackgroundcolor", "textbackgroundcolor", "none", ...
+           "textcolor", "textcolor", "k", ...
+           "textedgecolor", "textedgecolor", "none", ...
+           "textlinewidth", "textlinewidth",0.5, ...
+           "textmargin", "textmargin", 5, ...
+           "textrotation", "textrotation", 0, ...
+           "verticalalignment", "textverticalalignment", "middle"};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function stringdlg (hpar, prop)
+  def = get (hpar, prop);
+  if (iscell (def))
+    prompt = arrayfun (@(n) sprintf ("Line #%d:", n), 1:numel (def),
+                       "uniformoutput", false);
+  else
+    prompt = "";
+    def = {def};
+  endif
+  
+  cstr = inputdlg (prompt, prop, 1, def);
+  
+  if (! isempty (cstr))
+    set (hpar, prop, cstr)
+  endif
+endfunction
+
+function textmenu (hui, hpar)
+  hm = uimenu ("parent", hui, "label", "Text");
+
+  ## String;
+  prop = "String";
+  fcn = @() stringdlg (hpar, prop);
+  uimenu (hm, "label", prop, "callback", fcn);
+  
+  ## Font properties
+  prop = "textcolor";
+  vals = basecolors ();
+  addbasemenu (hm, hpar, prop, vals, "Color");
+  prop = "fontsize";
+  vals = 8:2:20;
+  addbasemenu (hm, hpar, prop, vals, "Size");
+  prop = "fontangle";
+  vals = set (hpar, prop);
+  addbasemenu (hm, hpar, prop, vals, "Angle");
+  prop = "fontweight";
+  vals = set (hpar, prop);
+  addbasemenu (hm, hpar, prop, vals, "Weight");
+  prop = "textrotation";
+  vals = 0:90:270;
+  addbasemenu (hm, hpar, prop, vals, "Rotation");
+  
+  prop = "horizontalalignment";
+  vals = set (hpar, prop);
+  addbasemenu (hm, hpar, prop, vals, "Horizontal Alignment", ...
+               "separator", "on");
+  prop = "verticalalignment";
+  vals = set (hpar, prop);
+  addbasemenu (hm, hpar, prop, vals, "Vertical Alignment");
+
+  ## FIXME: Add text background properties when they are supported
+  
+  prop = "interpreter";
+  vals = set (hpar, prop);
+  addbasemenu (hm, hpar, prop, vals, "Interpreter", ...
+               "separator", "on");
+
+endfunction
+
+function props = textboxprops (varargin)
+  props = {"backgroundcolor", "patchfacecolor", "none", ...
+           "color", "textcolor", [0 0 0], ...
+           "edgecolor", "patchedgecolor", [0 0 0], ...
+           "facealpha", "patchfacealpha", 1, ...
+           "fontangle", "textfontangle", "normal", ...
+           "fontname",  "textfontname", "Helvetica", ...
+           "fontsize", "textfontsize", 10, ...
+           "fontunits", "textfontunits", "points", ...
+           "fontweight",  "textfontweight", "normal", ...
+           "horizontalalignment", "texthorizontalalignment", "left", ...
+           "interpreter", "textinterpreter", "tex", ...
+           "linestyle",  "linelinestyle", "-", ...
+           "linewidth", "linelinewidth", 0.5, ...
+           "string", "textstring", "", ...
+           "fitboxtotext", "radio","{on}|off", ...
+           "margin", "data", 5, ...
+           "verticalalignment", "textverticalalignment",  "middle"};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function textboxmenu (hui, hpar)
+  ## Text properties
+  hm1 = uimenu ("parent", hui, "label", "Text");
+  
+  prop = "String";
+  fcn = @() stringdlg (hpar, prop);
+  uimenu (hm1, "label", prop, "callback", fcn);
+  
+  prop = "Color";
+  vals = basecolors ();
+  addbasemenu (hm1, hpar, prop, vals);
+  prop = "fontsize";
+  vals = 8:2:20;
+  addbasemenu (hm1, hpar, prop, vals, "Size");
+  prop = "fontangle";
+  vals = set (hpar, prop);
+  addbasemenu (hm1, hpar, prop, vals, "Angle");
+  prop = "fontweight";
+  vals = set (hpar, prop);
+  addbasemenu (hm1, hpar, prop, vals, "Weight");
+  
+  prop = "horizontalalignment";
+  vals = set (hpar, prop);
+  addbasemenu (hm1, hpar, prop, vals, "Horizontal Alignment", ...
+               "separator", "on");
+  prop = "verticalalignment";
+  vals = set (hpar, prop);
+  addbasemenu (hm1, hpar, prop, vals, "Vertical Alignment");
+  prop = "Margin";
+  vals = 2:2:10;
+  addbasemenu (hm1, hpar, prop, vals);
+  
+  prop = "interpreter";
+  vals = set (hpar, prop);
+  addbasemenu (hm1, hpar, prop, vals, "Interpreter", ...
+               "separator", "on");
+
+  ## Background properties
+  hm2 = uimenu ("parent", hui, "label", "Background");
+  
+  prop = "fitboxtotext";
+  vals = set (hpar, prop);
+  addbasemenu (hm2, hpar, prop, vals, "Fit box to text");
+  prop = "backgroundcolor";
+  vals = basecolors ();
+  addbasemenu (hm2, hpar, prop, vals, "Face Color");
+  prop = "edgecolor";
+  vals = basecolors ();
+  addbasemenu (hm2, hpar, prop, vals, "Edge Color");
+  prop = "linestyle";
+  vals = set (hpar, prop);
+  addbasemenu (hm2, hpar, prop, vals, "Line Style");
+  prop = "linewidth";
+  vals = 0.5:.5:2;
+  addbasemenu (hm2, hpar, prop, vals, "Line Width");
+endfunction
+
+function props = rectprops (varargin)
+  props = {"edgecolor", "patchedgecolor", "k", ...
+           "facealpha", "patchfacealpha", 1, ...
+           "facecolor", "patchfacecolor", "none", ...
+           "linestyle", "patchlinestyle", "-", ...
+           "linewidth", "patchlinewidth", 0.5};
+  if (strcmp (varargin, "names"))
+    props = props(1:3:end);
+  endif
+endfunction
+
+function rectmenu (hui, hpar)
+  prop = "facecolor";
+  vals = basecolors ();
+  addbasemenu (hui, hpar, prop, vals, "Face Color");
+  prop = "edgecolor";
+  vals = basecolors ();
+  addbasemenu (hui, hpar, prop, vals, "Edge Color");
+  prop = "linestyle";
+  vals = set (hpar, prop);
+  addbasemenu (hui, hpar, prop, vals, "Line Style");
+  prop = "linewidth";
+  vals = 0.5:.5:2;
+  addbasemenu (hui, hpar, prop, vals, "Line Width");
+endfunction
+
+function addbaseprops (h, proptable)
+  cellfun (@(pname, ptype, parg) addproperty (pname, h, ptype, parg),
+           proptable(1:3:end), proptable(2:3:end), proptable(3:3:end));
+endfunction
+
+function addbasemenu (hm, hpar, pname, vals, mainlabel = "" )
+  if (isempty (mainlabel))
+    mainlabel = pname;
+  endif
+  
+  h = uimenu ("parent", hm, "label", mainlabel);
+
+  is_numeric = ! iscell (vals);
+  nv = numel (vals);
+  htmp = zeros (1, nv);
+  for ii = 1:nv
+    if (! is_numeric)
+      val = label = vals{ii};
+    else
+      val = vals(ii);
+      label = num2str (val);
+    endif
+    
+    fcn = @() set (hpar, pname, val);
+    htmp(ii) = uimenu (h, "label", label, "callback", fcn);
+  endfor
+  handle_check (hpar, {}, htmp, pname, is_numeric);
+  addlistener (hpar, pname, {@handle_check, htmp, pname, is_numeric})
+endfunction
+
+function handle_check (h, dummy, hmenus, prop, is_numeric)
+  vals = get (hmenus, "label");
+  current = get (h, prop);
+  if (is_numeric)
+    current = num2str (current);
+  endif
+  
+  idx = strcmp (vals, current);
+  set (hmenus(idx), "checked", "on");
+  set (hmenus(! idx), "checked", "off");
+endfunction
+
+function update_position (h1, dummy, h, force = false)
+  if (! force)
+    pos = convertposition (h, getappdata (h, "__former_units__"),
+                           get (h, "units"));
+    setappdata (h, "__former_units__", get (h, "units"));
+    set (h, "position", pos);
+  else
+    ## FIXME: Inefficient trick to force all objects to be redrawn
+    set (h, "position", [0 0 .5 .5],
+         "position", get (h, "position"));
+  endif
+endfunction
+
+
+function update_line (h, dummy, prop, hli)
+  persistent recursive = false;
+  if (! recursive)
+    switch (prop)
+      case "color"
+        set (hli, "color", get (h, "color"));
+      case "linestyle"
+        set (hli, "linestyle", get (h, "linestyle"));
+      case "linewidth"
+        set (hli, "linewidth", get (h, "linewidth"));
+      case "x"
+        ## Update position
+        x = get (h, "x");
+        pos = get (h, "position");
+        pos(1) = x(1);
+        pos(3) = diff (x);
+        recursive = true;
+        set (h, "position", pos);
+        recursive = false;
+
+        ## Draw in normalized coordinates
+        pos = getnormpos (h);
+        x = [pos(1) (pos(1) + pos(3))];
+        set (hli, "xdata", x);
+
+      case "y"
+       ## Update position
+        y = get (h, "y");
+        pos = get (h, "position");
+        pos(2) = y(1);
+        pos(4) = diff (y);
+        recursive = true;
+        set (h, "position", pos);
+        recursive = false;
+
+        ## Draw in normalized coordinates
+        pos = getnormpos (h);
+        y = [pos(2) (pos(2) + pos(4))];
+        set (hli, "ydata", y);
+      case "position"
+        ## Update x and y
+        pos = get (h, "position");
+        x = [pos(1) (pos(1) + pos(3))];
+        y = [pos(2) (pos(2) + pos(4))];
+
+        recursive = true;
+        set (h, "x", x);
+        set (h, "y", y);
+        recursive = false;
+
+        ## Draw in normalized coordinates
+        pos = getnormpos (h);
+        x = [pos(1) (pos(1) + pos(3))];
+        y = [pos(2) (pos(2) + pos(4))];
+        set (hli, "xdata", x);
+        set (hli, "ydata", y);
+
+    endswitch
+  endif
+endfunction
+
+function [x, y] = arrowcoordinates (h, nar = [])
+  pos = getnormpos (h);
+  ppos = norm2pts (h, pos(3:4).');
+  ang = angle (complex (ppos(1), ppos(2)));
+
+  if (isempty (nar))
+    ln = get (h, "headlength");   # in points
+    wd = get (h, "headwidth");
+    headstyle = get (h, "headstyle");
+    pos = pos(1:2) .+ pos(3:4);
+  elseif (nar == 1)
+    ln = get (h, "head1length"); # in points
+    wd = get (h, "head1width");
+    headstyle = get (h, "head1style");
+    pos = pos(1:2);
+    ang += pi;
+  elseif (nar == 2)
+    ln = get (h, "head2length"); # in points
+    wd = get (h, "head2width");
+    headstyle = get (h, "head2style");
+    pos = pos(1:2) .+ pos(3:4);
+  else
+    error ("annotation: %d, no such arrow number")
+  endif
+
+  switch (headstyle)
+    case "diamond"
+      x = [0 -ln/2 -ln -ln/2 0];
+      y = [0 -wd/2 0 wd/2 0];
+    case "ellipse"
+      pts = linspace (0, 2*pi, 12);
+      x = ln/2 * (cos (pts) - 1);
+      y = wd/2 * sin (pts);
+    case "rectangle"
+      x = [0 0 -ln -ln 0];
+      y = [wd/2 -wd/2 -wd/2 wd/2 wd/2];
+    case "vback1"
+      x = [0 -ln -0.85*ln -ln 0];
+      y = [0 wd/2 0 -wd/2 0];
+    case "vback2"
+      x = [0 -ln -0.65*ln -ln 0];
+      y = [0 wd/2 0 -wd/2 0];
+    case "vback3"
+      x = [0 -ln -0.2*ln -ln 0];
+      y = [0 wd/2 0 -wd/2 0];
+    case "plain"
+      x = [0 -ln -ln -ln 0];
+      y = [0 wd/2 0 -wd/2 0];
+    case "none"
+      x = [0 0 0];
+      y = [0 0 0];
+    otherwise
+      error ("annotation: \"%s\" headstyle not implemented", headstyle)
+  endswitch
+
+  R = [cos(ang) -sin(ang);
+       sin(ang) cos(ang)];
+  XY = R * [x; y];
+  XY = pts2norm (h, XY);
+  XY = pos(1:2).' .+ XY;
+
+  x = XY(1,:).';
+  y = XY(2,:).';
+endfunction
+
+function update_arrow (h, dummy, prop, hpa = [])
+  persistent recursive = false;
+
+  nar = [];
+  for ii = 1:numel (hpa)
+    if (numel (hpa) == 2)
+      nar = ii;
+    endif
+    if (hpa(ii))
+      switch (prop)
+        case "position"
+          [x, y] = arrowcoordinates (h, nar);
+          set (hpa(ii), "xdata", x, "ydata", y);
+        case "color"
+          set (hpa(ii), "facecolor", get (h, "color"));
+          set (hpa(ii), "edgecolor", get (h, "color"));
+      endswitch
+    endif
+  endfor
+endfunction
+
+function update_text (h, dummy, prop, hte)
+  persistent recursive = false;
+
+  if (! recursive)
+    switch (prop)
+      case "position"
+        if (isempty (get (h, "string")))
+          return
+        endif
+
+        pos = getnormpos (h);
+
+        set (hte, "position", [textcoordinates(hte, pos) 0]);
+
+      otherwise
+        if (strncmp (prop, "text", 4))
+          set (hte, prop(5:end), get (h, prop));
+        else
+          set (hte, prop, get (h, prop));
+        endif
+    endswitch
+  endif
+endfunction
+
+function update_textbox (h, dummy, prop, htb)
+  persistent recursive = false;
+
+  hte = htb(1);
+  hpa = htb(2);
+
+  if (! recursive)
+    switch (prop)
+      case {"edgecolor", "facealpha",
+            "linestyle", "linewidth"}
+        set (hpa, prop, get (h, prop));
+      case {"backgroundcolor"}
+        set (hpa, "facecolor", get (h, prop));
+      otherwise
+        if (! any (strcmp (prop, {"fitboxtotext", "position"})))
+          set (hte, prop, get (h, prop));
+        endif
+
+        pos = getnormpos (h);
+
+        if (strcmp (get (h, "fitboxtotext"), "on"))
+          pos(3:4) = get (hte, "extent")(3:4) .* sign (pos(3:4));
+        endif
+
+        [x, y] = pos2rect (pos);
+        set (hpa, "xdata", x', "ydata", y');
+
+        switch (get (h, "horizontalalignment"))
+          case "left"
+            x = x(1);
+          case "center"
+            x = mean (x(1:2));
+          case "right"
+            x = x(2);
+        endswitch
+
+        switch (get (h, "verticalalignment"))
+          case {"top", "cap"}
+            y = y(3);
+          case "middle"
+            y = mean (y(2:3));
+          case {"bottom", "baseline"}
+            y = y(2);
+        endswitch
+        set (hte, "position", [x y 0]);
+    endswitch
+  endif
+
+endfunction
+
+function XY = textcoordinates (hte, pos)
+  ## Get the "tight" extent of the text object in points units
+  textpos = get(hte, "position");
+  rot = get (hte, "rotation");
+  units = get (hte, "units");
+
+  set (hte, "rotation", 0, "units", "points", "position", [0 0 0]);
+  ext = get (hte, "extent");
+  set (hte, "rotation", rot, "units", units, "position", textpos);
+
+  ## Find which one of the 8 following points we should align the
+  ## arrow with
+  ##  8-----7-----6
+  ##  1  text box 5
+  ##  2-----3-----4
+
+  ## FIXME: Matlab's horizontal/verticalalignment properties are
+  ## interpreted differently: horizontalalignment is passed to the
+  ## underlying text object whereas the verticalalignement controls
+  ## the vertical alignment of the arrow.
+
+  ang = angle (complex (pos(3), pos(4)));
+  rot = rot / 180 * pi;
+
+  [~, pt] = min (abs ((-pi:pi/4:pi) - ang));
+  pt -= floor (rot / (pi/4));
+  if (pt <= 0)
+    pt = rem (pt, 8) + 8;
+  elseif (pt > 8)
+    pt = rem (pt, 8);
+  endif
+
+  ## Compute the text actual "position" property
+  dx = ext(3)/2;
+  dy = ext(4)/2;
+  XY = [-dx -dx 0 dx dx dx 0 -dx;
+        0 -dy -dy -dy 0 dy dy dy];
+
+  switch (get (hte, "horizontalalignment"))
+    case "left"
+      XY(1,:) += dx;
+    case "right"
+      XY(1,:) -= dx;
+  endswitch
+
+  switch (get (hte, "verticalalignment"))
+    case {"baseline", "bottom"}
+      XY(2,:) += dy;
+    case {"cap", "top"}
+      XY(2,:) -= dy;
+  endswitch
+
+  R = [cos(rot) -sin(rot);
+       sin(rot) cos(rot)];
+  XY = R * XY;
+  XY = pts2norm (get (hte, "parent"), XY);
+  XY = pos(1:2) .- XY(:,pt).';
+
+endfunction
+
+function nXY = pts2norm (h, pXY)
+  sz = get (get (h,"parent"), "figsize_points");
+
+  nXY(1,:) = pXY(1,:) ./ sz(1);
+  nXY(2,:) = pXY(2,:) ./ sz(2);
+endfunction
+
+function pXY = norm2pts (h, nXY)
+  sz = get (get (h,"parent"), "figsize_points");
+
+  pXY(1,:) = nXY(1,:) .* sz(1);
+  pXY(2,:) = nXY(2,:) .* sz(2);
+endfunction
+
+function pos = convertposition (h, from, to)
+  ## FIXME: handle "characters" units
+  pos = get (h, "position");
+
+  ## First convert to normalized coordinates
+  sz = get (get (h,"parent"), "figsize_points");
+  switch (from)
+    case "centimeters"
+      pos /= 2.54;
+      pos *= 72;
+      pos(1:2:end) /= sz(1);
+      pos(2:2:end) /= sz(2);
+    case "inches"
+      pos *= 72;
+      pos(1:2:end) /= sz(1);
+      pos(2:2:end) /= sz(2);
+    case "pixels"
+      pos /= get (0, "screenpixelsperinch");
+      pos *= 72;
+      pos(1:2:end) /= sz(1);
+      pos(2:2:end) /= sz(2);
+  endswitch
+
+  ## Then convert to requested coordinates
+  switch (to)
+    case "centimeters"
+      sz /= 72;
+      sz *= 2.54;
+      pos(1:2:end) *= sz(1);
+      pos(2:2:end) *= sz(2);
+    case "inches"
+      sz /= 72;
+      pos(1:2:end) *= sz(1);
+      pos(2:2:end) *= sz(2);
+    case "pixels"
+      sz /= 72;
+      sz *= get (0, "screenpixelsperinch");
+      pos(1:2:end) *= sz(1);
+      pos(2:2:end) *= sz(2);
+  endswitch
+
+endfunction
+
+function pos = getnormpos (h)
+  units = get (h, "units");
+  pos = convertposition (h, units, "normalized");
+endfunction
+
+function [x, y] = pos2rect (pos)
+  x = [pos(1) pos(1)+pos(3) pos(1)+pos(3) pos(1)];
+  y = [pos(2) pos(2) pos(2)+pos(4) pos(2)+pos(4)];
+endfunction
+
+function [x, y] = pos2ell (pos)
+  a = pos(3)/2;
+  b = pos(4)/2;
+
+  ## Arbitrarily use 100 points
+  ## when it is spread over
+  ang = linspace (0, 2*pi, 100);
+
+  x = a * cos (ang);
+  y = b * sin (ang);
+
+  x += pos(1) + a;
+  y += pos(2) + b;
+endfunction
+
+function update_rect (h, dummy, prop, hre, typ)
+  persistent recursive = false;
+
+  if (! recursive)
+    switch (prop)
+      case "position"
+        pos = getnormpos (h);
+        if (strcmp (typ, "rectangle"))
+          [x, y] = pos2rect (pos);
+        else
+          [x, y] = pos2ell (pos);
+        endif
+
+        set (hre, "xdata", x, "ydata", y);
+      otherwise
+        set (hre, prop, get (h, prop));
+    endswitch
+  endif
+endfunction
+
+
+## FIXME: the additionnal regular axes is necessary for fltk to draw the
+##        annotation axes.
+%!demo
+%! clf; axes ('visible', 'off');
+%! annotation ('textbox', [.25 .9 .5 .09], 'string', ...
+%!             {'Right Click on annotation objects', ...
+%!              'to customize their appearance'}, ...
+%!             'horizontalalignment', 'center', 'fitboxtotext', 'off');
+%! annotation ('ellipse', [.2 .2 .6 .6], 'linewidth', 4)
+%! ang = pi/2:-pi/2:-pi;
+%! lab = {'N', 'W', 'S', 'E'};
+%! x0 = 0.5;
+%! y0 = 0.5;
+%! r = 0.3;
+%! for ii = 1:4
+%!   x = r * cos (ang(ii)) + x0;
+%!   y = r * sin (ang(ii)) + y0;
+%!   annotation ('textarrow', [x x0], [y y0], ...
+%!               'string', lab{ii},  'fontsize', 20);
+%! end
+%!
+%! h = annotation ('doublearrow', [x0 x0], [y0-r y0+r], ...
+%!                 'head1style', 'diamond', 'head1length', 60, ...
+%!                 'head2style', 'diamond', 'head2length', 60);
+
+%!demo
+%! clf; axes ('visible', 'off');
+%! plot (1:10);
+%! xlabel ('X-LABEL')
+%! ylabel ('LARGE Y-LABEL', 'fontsize', 20)
+%! title ('FIGURE LAYOUT', 'fontsize', 24)
+%!
+%! ti = get (gca, 'tightinset');
+%! pos = get (gca, 'position');
+%! pos(1:2) = pos(1:2) - ti(1:2);
+%! pos(3) = pos(3) + ti (1) + ti (3);
+%! pos(4) = pos(4) + ti (2) + ti (4);
+%!
+%! ht = annotation ('textbox', pos, 'string', ' Position + tighinset', ...
+%!                  'fitboxtotext', 'off', 'linestyle', '--', ...
+%!                  'edgecolor', 'g', 'linewidth', 3, 'color', 'g', ...
+%!                  'verticalalignment', 'bottom', 'fontsize', 15);
+%!
+%! ho = annotation ('textbox', get (gca, 'outerposition'), ...
+%!                  'string', ' Outerposition','fitboxtotext', 'off', ...
+%!                  'linestyle', '--', 'edgecolor', 'r', ...
+%!                  'linewidth', 3, 'color', 'r', ...
+%!                  'verticalalignment', 'bottom', 'fontsize', 15);
+%!
+%! hi = annotation ('textbox', get (gca, 'position'), ...
+%!                  'string', ' Position','fitboxtotext', 'off', ...
+%!                  'linestyle', '--', 'edgecolor', 'b', ...
+%!                  'linewidth', 3, 'color', 'b', ...
+%!                  'verticalalignment', 'bottom', 'fontsize', 15);
+
+%!demo
+%! clf; axes ('visible', 'off');
+%! h = annotation ('arrow');
+%!
+%! %% Get allowed headstyles
+%! styles = set (h, 'headstyle');
+%! delete (h)
+%!
+%! %% Textbox for the title
+%! annotation ('textbox', [0.1 0 0.8 1], 'string', ...
+%!             '"headstyle" property:', ...
+%!             'backgroundcolor', [0.7 0.7 0.7], 'fontsize', 20, ...
+%!             'fitboxtotext', 'off', 'verticalalignment', 'top', ...
+%!             'horizontalalignment', 'center');
+%!
+%! %% Textarrows
+%! ns = numel (styles);
+%! nrows = ceil (ns/2);
+%! dy = 1/nrows;
+%! y = 1 - dy/2;
+%!
+%! jj = 1;
+%! for ii = 1:nrows
+%!   annotation ('textarrow', [0.3 0.5], [y y], ...
+%!               'string', ['"' styles{jj} '"'], 'fontsize', 15, ...
+%!               'headstyle', styles{jj}, 'textcolor', 'b');
+%!   jj = jj + 1;
+%!   if (jj <= ns)
+%!     annotation ('textarrow', [0.7 0.5], [y y], ...
+%!                 'string', ['"' styles{jj} '"'], 'fontsize', 15, ...
+%!                 'headstyle', styles{jj}, 'textcolor', 'b');
+%!   jj = jj + 1;
+%!   end
+%!   y = y - dy;
+%! end
+%! annotation ('line', [0.5 0.5], [dy/2 1-dy/2], 'linestyle', '-.')
+
+%!demo
+%! clf; axes ('visible', 'off');
+%!
+%! %% Textbox for the title
+%! annotation ('textbox', [0.1 0 0.8 1], 'string', ...
+%!             'Text arrows: text rotation', ...
+%!             'backgroundcolor', [0.7 0.7 0.7], 'fontsize', 20, ...
+%!             'fitboxtotext', 'off', 'verticalalignment', 'top', ...
+%!             'horizontalalignment', 'center');
+%!
+%! %% Textarrows
+%! for ii = 1:10
+%!   rot = floor (rand (1) * 360 / 90) * 90;
+%!   annotation ('textarrow', 0.5 + [(0.6 * (rand(1) - .5)) 0], ...
+%!               0.5 + [(0.6 * (rand(1) - .5)) 0], ...
+%!               'string', 'A text', ...
+%!               'headstyle', 'none', 'textrotation', rot);
+%! end
+
+%!demo
+%! clf; axes ('visible', 'off');
+%!
+%! %% Textbox for the title
+%! annotation ('textbox', [0.1 0 0.8 1], 'string', ...
+%!             'Text arrows: text alignment', ...
+%!             'backgroundcolor', [0.7 0.7 0.7], 'fontsize', 20, ...
+%!             'fitboxtotext', 'off', 'verticalalignment', 'top', ...
+%!             'horizontalalignment', 'center');
+%!
+%! %% Textarrows
+%! halig = {'right', 'center', 'left'};
+%! ii = 1;
+%! for x = .3:.2:.7
+%!   annotation ('textarrow', [x .5], [.5 .9], ...
+%!               'string', {'Multiple lines', 'text'}, ...
+%!               'headstyle', 'none', 'horizontalalignment', halig{ii});
+%!   ii = ii + 1;
+%! end
+
+%!demo
+%! clf; axes ('visible', 'off');
+%!
+%! x = 0:0.01:2*pi;
+%! y = sin (x);
+%! plot (x, y)
+%!
+%! %% Extrema
+%! x0 = [pi/2 3*pi/2];
+%! y0 = [1 -1];
+%!
+%! %% Convert axes coordinates into normalized coordinates
+%! xl = xlim ();
+%! yl = [-1.2 1.5];
+%! ylim (yl);
+%! x0 = (x0 - xl(1)) / diff(xl);
+%! y0 = (y0 - yl(1)) / diff(yl);
+%!
+%! pos = get (gca (), 'position');
+%! x0 = x0*pos(3) + pos(1);
+%! y0 = y0*pos(4) + pos(2);
+%!
+%!
+%! %% Textarrows
+%! for ii = 1:2
+%!   annotation ('doublearrow', [(x0(ii) - .05) (x0(ii) + .05)], ...
+%!               [y0(ii) y0(ii)], 'head1style', 'vback3', ...
+%!               'head2style', 'vback3', ...
+%!               'head1width', 4, 'head2width', 4)
+%!   h = annotation ('textarrow', [0.5 x0(ii)], [.85 y0(ii)], ...
+%!                   'linestyle', '--', 'headstyle', 'none');
+%! end
+%! set (h, 'string', 'Extrema', 'fontsize', 15)
+
+## test line properties
+%!test
+%! hf = figure ("visible", "off");
+%! hax = axes ();
+%! unwind_protect
+%!   h = annotation ("line", [0.2 0.7], [0.2 0.7], "linewidth", 2,
+%!                   "linestyle", "--", "color", "r");
+%!   hli = get (h, "children");
+%!   assert (get (hli, "linewidth"), 2);
+%!   assert (get (hli, "linestyle"), "--");
+%!   assert (get (hli, "color"), [1 0 0]);
+%!   assert (gca (), hax);
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
+
+## test textarrow properties
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h = annotation ("textarrow", [0.2 0.7], [0.2 0.7],
+%!                   "string", "Hello!", "fontsize", 20,
+%!                   "textrotation", 90, "textcolor", "r");
+%!   hte = findobj (h, "-depth", 1, "type", "text");
+%!   assert (get (hte, "string"), "Hello!");
+%!   assert (get (hte, "fontsize"), 20);
+%!   assert (get (hte, "rotation"), 90);
+%!   assert (get (hte, "color"), [1 0 0]);
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
+
+## test textbox properties
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h = annotation ("textbox", [0.2 0.2 0.7 0.3], "string", "Hello!",
+%!                   "horizontalalignment", "left",
+%!                   "verticalalignment", "bottom",
+%!                   "backgroundcolor", "r");
+%!   hte = findobj (h, "-depth", 1, "type", "text");
+%!   hpa = findobj (h, "-depth", 1, "type", "patch");
+%!   assert (get (hte, "string"), "Hello!");
+%!   assert (get (hte, "verticalalignment"), "bottom");
+%!   assert (get (hte, "horizontalalignment"), "left");
+%!   assert (get (hpa, "facecolor"), [1 0 0]);
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
+
+## test units conversion
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h = annotation ("arrow", [0.1 0.2],  [0.5 0.2]);
+%!   set (h, "units", "inches");
+%!   pos = get (h, "position");
+%!   x = get (h, "x");
+%!   y = get (h, "y");
+%!   set (h, "units", "centimeters");
+%!   assert (get (h, "position"), pos * 2.54, 20*eps);
+%!   assert (get (h, "x"), x * 2.54, 20*eps);
+%!   assert (get (h, "y"), y * 2.54, 20*eps);
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
+
+## test annotated figure
+%!test
+%! hf1 = figure ("visible", "off");
+%! hf2 = figure ("visible", "off");
+%! unwind_protect
+%!   h = annotation (hf1, "doublearrow");
+%!   assert (ancestor (h, "figure"), hf1);
+%!   assert (gcf (), hf2);
+%! unwind_protect_cleanup
+%!   close (hf1)
+%!   close (hf2)
+%! end_unwind_protect
+
+## Test input validation
+%!error <unknown annotation type foo> annotation ("foo")
+%!error annotation ([], "foo")
+%!error annotation ({})
+%!error annotation ("line", [.5 .6])
+%!error <expect 2 elements vectors for X and Y> annotation ("line", 1:3, 1:3)
+%!error <expect 4 elements vector for POS> annotation ("textbox", 1:3)
--- a/scripts/plot/appearance/axis.m
+++ b/scripts/plot/appearance/axis.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -30,7 +30,9 @@
 ## The argument @var{limits} should be a 2-, 4-, or 6-element vector.  The
 ## first and second elements specify the lower and upper limits for the
 ## x-axis.  The third and fourth specify the limits for the y-axis, and the
-## fifth and sixth specify the limits for the z-axis.
+## fifth and sixth specify the limits for the z-axis.  The special values
+## -Inf and Inf may be used to indicate that the limit should automatically be
+## computed based on the data in the axis.
 ##
 ## Without any arguments, @code{axis} turns autoscaling on.
 ##
@@ -191,8 +193,8 @@
       set (ca, "dataaspectratiomode", "auto",
                "plotboxaspectratio", [1, 1, 1]);
     elseif (strcmp (ax, "equal"))
-      if (strcmp (get (get (ca, "parent"), "__graphics_toolkit__"), "gnuplot"))
-        ## FIXME - gnuplot applies the aspect ratio activepostionproperty.
+      if (strcmp (get (ancestor (ca, "figure"), "__graphics_toolkit__"), "gnuplot"))
+        ## FIXME: gnuplot applies the aspect ratio activepostionproperty.
         set (ca, "activepositionproperty", "position");
         ## The following line is a trick used to trigger the recalculation of
         ## aspect related magnitudes even if the aspect ratio is the same
@@ -297,15 +299,15 @@
     endfor
 
     if (len > 1)
-      set (ca, "xlim", [ax(1), ax(2)]);
+      xlim (ca, ax(1:2));
     endif
 
     if (len > 3)
-      set (ca, "ylim", [ax(3), ax(4)]);
+      ylim (ca, ax(3:4));
     endif
 
     if (len > 5)
-      set (ca, "zlim", [ax(5), ax(6)]);
+      zlim (ca, ax(5:6));
     endif
 
   else
--- a/scripts/plot/appearance/box.m
+++ b/scripts/plot/appearance/box.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/caxis.m
+++ b/scripts/plot/appearance/caxis.m
@@ -1,4 +1,4 @@
-## Copyright (C)  2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/clabel.m
+++ b/scripts/plot/appearance/clabel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -127,7 +127,7 @@
       set (htmp, varargin{:});
     endif
   else
-    htmp =  __clabel__ (c, v, hparent, label_spacing, [], varargin{:});
+    htmp = __clabel__ (c, v, hparent, label_spacing, [], varargin{:});
   endif
 
   if (nargout > 0)
--- a/scripts/plot/appearance/daspect.m
+++ b/scripts/plot/appearance/daspect.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/datetick.m
+++ b/scripts/plot/appearance/datetick.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -45,8 +45,8 @@
 
   unwind_protect
     ## FIXME: This will bring the axes to the top of the stack.
-    ##        This may not always be desirable if there are multiple axes
-    ##        objects.
+    ##        This may not be desirable if there are multiple axes objects,
+    ##        such as can occur with plotyy.
     axes (hax);
     __datetick__ (varargin{:});
   unwind_protect_cleanup
@@ -64,22 +64,22 @@
 %! pop = [76.094, 92.407, 106.461, 123.077 131.954, 151.868, 179.979, ...
 %!        203.984, 227.225, 249.623, 282.224];
 %! plot (datenum (yr, 1, 1), pop);
-%! title ("US population (millions)");
-%! xlabel ("Year");
-%! datetick ("x", "YYYY");
+%! title ('US population (millions)');
+%! xlabel ('Year');
+%! datetick ('x', 'YYYY');
 
 %!demo
 %! clf;
 %! yr = 1988:2:2002;
 %! yr = datenum (yr,1,1);
 %! pr = [12.1 13.3 12.6 13.1 13.3 14.1 14.4 15.2];
-%! plot (yr, pr, "-o");
-%! xlabel ("year");
-%! ylabel ("average price");
+%! plot (yr, pr, '-o');
+%! xlabel ('year');
+%! ylabel ('average price');
 %! ax = gca;
-%! set (ax, "xtick", datenum (1990:5:2005,1,1));
-%! datetick (2, "keepticks");
-%! set (ax, "ytick", 12:16);
+%! set (ax, 'xtick', datenum (1990:5:2005,1,1));
+%! datetick (2, 'x', 'keepticks');
+%! set (ax, 'ytick', 12:16);
 
 ## Remove from test statistics.  No real tests possible.
 %!assert (1)
@@ -271,7 +271,7 @@
     b = 0;
   else
     l = log10 (abs (x));
-    r = fmod (l, 1);
+    r = rem (l, 1);
     a = 10 .^ r;
     b = fix (l - r);
     if (a < 1)
--- a/scripts/plot/appearance/diffuse.m
+++ b/scripts/plot/appearance/diffuse.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Kai Habel
+## Copyright (C) 2009-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -18,11 +18,11 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} diffuse (@var{sx}, @var{sy}, @var{sz}, @var{lv})
-## Calculate diffuse reflection strength of a surface defined by the normal
+## Calculate the diffuse reflection strength of a surface defined by the normal
 ## vector elements @var{sx}, @var{sy}, @var{sz}.
 ##
-## The light source location vector @var{lv} can be given as 2-element vector
-## [azimuth, elevation] in degrees or as 3-element vector [lx, ly, lz].
+## The light source location vector @var{lv} can be given as a 2-element vector
+## [azimuth, elevation] in degrees or as a 3-element vector [x, y, z].
 ## @seealso{specular, surfl}
 ## @end deftypefn
 
@@ -34,13 +34,13 @@
     print_usage ();
   endif
 
-  ## check for normal vector
-  if (!size_equal (sx, sy, sz))
-    error ("diffuse: SX, SY, and SZ must have same size");
+  ## Check normal vectors
+  if (! size_equal (sx, sy, sz))
+    error ("diffuse: SX, SY, and SZ must be the same size");
   endif
 
-  ## check for light vector (lv) argument
-  if (length (lv) < 2 || length (lv) > 3)
+  ## Check light vector (lv) argument
+  if (! isvector (lv) || length (lv) < 2 || length (lv) > 3)
     error ("diffuse: light vector LV must be a 2- or 3-element vector");
   elseif (length (lv) == 2)
     [lv(1), lv(2), lv(3)] = sph2cart (lv(1) * pi/180, lv(2) * pi/180, 1.0);
@@ -48,7 +48,7 @@
 
   ## Normalize view and light vector.
   if (sum (abs (lv)) > 0)
-    lv  /= norm (lv);
+    lv /= norm (lv);
   endif
 
   ns = sqrt (sx.^2 + sy.^2 + sz.^2);
--- a/scripts/plot/appearance/grid.m
+++ b/scripts/plot/appearance/grid.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -58,13 +58,10 @@
     print_usage ();
   endif
 
-  grid_on = (   strcmp (get (hax, "xgrid"), "on")
-             && strcmp (get (hax, "ygrid"), "on")
-             && strcmp (get (hax, "zgrid"), "on"));
+  grid_on = any (strcmp (get (hax, {"xgrid", "ygrid", "zgrid"}), "on"));
 
-  minor_on = (   strcmp (get (hax, "xminorgrid"), "on")
-              && strcmp (get (hax, "yminorgrid"), "on")
-              && strcmp (get (hax, "zminorgrid"), "on"));
+  minor_on = any (strcmp (get (hax, {"xminorgrid", "yminorgrid", "zminorgrid"}),
+                         "on"));
 
   minor_auto = true;
   if (nargs == 0)
@@ -102,9 +99,15 @@
   endif
 
   if (grid_on)
-    set (hax, "xgrid", "on", "ygrid", "on", "zgrid", "on");
+    set (hax, "xgrid", "on", "ygrid", "on", "zgrid", "on",
+              "gridlinestyle", ":");
     if (minor_on)
-      set (hax, "xminorgrid", "on", "yminorgrid", "on", "zminorgrid", "on");
+      set (hax, "xminorgrid", "on", "yminorgrid", "on", "zminorgrid", "on",
+                "gridlinestyle", "-", "minorgridlinestyle", ":");
+      xg = ifelse (strcmp (get (hax, "xscale"), "log"), "off", "on");
+      yg = ifelse (strcmp (get (hax, "yscale"), "log"), "off", "on");
+      zg = ifelse (strcmp (get (hax, "zscale"), "log"), "off", "on");
+      set (hax, "xgrid", xg, "ygrid", yg, "zgrid", zg);
     elseif (minor_auto)
       xmg = ifelse (strcmp (get (hax, "xscale"), "log"), "on", "off");
       ymg = ifelse (strcmp (get (hax, "yscale"), "log"), "on", "off");
@@ -133,8 +136,26 @@
 %!  title ('grid on');
 %! subplot (2,2,3);
 %!  plot (1:100);
+%!  grid off;
+%!  title ('no grid');
+%! subplot (2,2,4);
+%!  plot (1:100);
 %!  grid minor;
 %!  title ('grid minor');
+
+%!demo
+%! subplot (2,2,1);
+%!  semilogy (1:100);
+%!  grid off;
+%!  title ('no grid');
+%! subplot (2,2,2);
+%!  semilogy (1:100);
+%!  grid on;
+%!  title ('grid on');
+%! subplot (2,2,3);
+%!  semilogy (1:100);
+%!  grid off;
+%!  title ('no grid');
 %! subplot (2,2,4);
 %!  semilogy (1:100);
 %!  grid minor;
--- a/scripts/plot/appearance/gtext.m
+++ b/scripts/plot/appearance/gtext.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/hidden.m
+++ b/scripts/plot/appearance/hidden.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Michael Goffioul
+## Copyright (C) 2007-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/legend.m
+++ b/scripts/plot/appearance/legend.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 David Bateman
+## Copyright (C) 2010-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -125,7 +125,7 @@
     if (isempty (ca))
       ca = gca ();
     endif
-    fig = get (ca, "parent");
+    fig = ancestor (ca, "figure");
   else
     fig = get (0, "currentfigure");
     if (isempty (fig))
@@ -166,11 +166,27 @@
   nargs = numel (varargin);
   nkids = numel (kids);
 
+  ## Find any existing legend object on figure
+  hlegend = [];
+  fkids = get (fig, "children");
+  for i = 1 : numel (fkids)
+    if (   strcmp (get (fkids(i), "type"), "axes")
+        && strcmp (get (fkids(i), "tag"), "legend"))
+      udata = get (fkids(i), "userdata");
+      if (any (ismember (udata.handle, ca)))
+        hlegend = fkids(i);
+        break;
+      endif
+    endif
+  endfor
+
   orientation = "default";
   location = "default";
   show = "create";
   textpos = "default";
   box = "default";
+  delete_leg = false;
+  find_leg_hdl = (nargs == 0);
 
   ## Process old way of specifying location with a number rather than a string.
   if (nargs > 0)
@@ -229,20 +245,6 @@
       error ("legend: unrecognized legend location");
   endswitch
 
-  ## Find any existing legend object on figure
-  hlegend = [];
-  fkids = get (fig, "children");
-  for i = 1 : numel (fkids)
-    if (   strcmp (get (fkids(i), "type"), "axes")
-        && strcmp (get (fkids(i), "tag"), "legend"))
-      udata = get (fkids(i), "userdata");
-      if (any (udata.handle == ca))
-        hlegend = fkids(i);
-        break;
-      endif
-    endif
-  endfor
-
   if (nargs == 1)
     arg = varargin{1};
     if (ischar (arg))
@@ -250,8 +252,7 @@
         str = tolower (strtrim (arg));
         switch (str)
           case "off"
-            delete (hlegend);
-            return;
+            delete_leg = true;
           case "hide"
             show = "off";
             nargs--;
@@ -305,24 +306,26 @@
   endif
 
   have_labels = (nargs > 0);
+  hobjects = [];
+  hplots = [];
+  text_strings = {};
 
-  if (strcmp (show, "off"))
+  if (delete_leg)
+    delete (hlegend);
+    hlegend = [];
+  elseif (find_leg_hdl)
+    ## Don't change anything about legend.
+    ## hleg output will be assigned hlegend value at end of function.
+  elseif (strcmp (show, "off"))
     if (! isempty (hlegend))
       set (findobj (hlegend), "visible", "off");
       hlegend = [];
     endif
-    hobjects = [];
-    hplots  = [];
-    text_strings = {};
   elseif (strcmp (show, "on"))
     if (! isempty (hlegend))
       set (findobj (hlegend), "visible", "on");
-      ## NOTE - Matlab sets both "visible", and "box" to "on"
+      ## NOTE: Matlab sets both "visible" and "box" to "on"
       set (hlegend, "visible", get (hlegend, "box"));
-    else
-      hobjects = [];
-      hplots  = [];
-      text_strings = {};
     endif
   elseif (strcmp (box, "on"))
     if (! isempty (hlegend))
@@ -332,32 +335,31 @@
     if (! isempty (hlegend))
       set (hlegend, "box", "off", "visible", "off");
     endif
-  elseif (! have_labels && ! (strcmp (location, "default") &&
-                              strcmp (orientation, "default")))
+  elseif (! have_labels && ! isempty (hlegend)
+          && ! (strcmp (location, "default")
+                && strcmp (orientation, "default")))
     ## Changing location or orientation of existing legend
-    if (! isempty (hlegend))
-      if (strcmp (location, "default"))
-        set (hlegend, "orientation", orientation);
-      elseif (strcmp (orientation, "default"))
-        if (outside)
-          set (hlegend, "location", [location "outside"]);
-        else
-          set (hlegend, "location", location);
-        endif
+    if (strcmp (location, "default"))
+      set (hlegend, "orientation", orientation);
+    elseif (strcmp (orientation, "default"))
+      if (outside)
+        set (hlegend, "location", [location "outside"]);
       else
-        if (outside)
-          set (hlegend, "location", [location "outside"],
-                        "orientation", orientation);
-        else
-          set (hlegend, "location", location,
-                        "orientation", orientation);
-        endif
+        set (hlegend, "location", location);
+      endif
+    else
+      if (outside)
+        set (hlegend, "location", [location "outside"],
+                      "orientation", orientation);
+      else
+        set (hlegend, "location", location,
+                      "orientation", orientation);
       endif
     endif
   else
     ## Create new legend
     hobjects = [];
-    hplots  = [];
+    hplots = [];
     text_strings = {};
 
     if (have_labels)
@@ -498,7 +500,7 @@
         delete (fkids(fkids == hlegend));
         hlegend = [];
         hobjects = [];
-        hplots  = [];
+        hplots = [];
         text_strings = {};
       endif
     else
@@ -565,6 +567,12 @@
       linelength = 15;
 
       ## Create the axis first
+      oldfig = get (0, "currentfigure");
+      if (oldfig != fig)
+        set (0, "currentfigure", fig);
+      else
+        oldfig = [];
+      endif
       curaxes = get (fig, "currentaxes");
       unwind_protect
         ud = ancestor (hplots, "axes");
@@ -829,10 +837,11 @@
             case "line"
               color = get (hplots(k), "color");
               style = get (hplots(k), "linestyle");
+              lwidth = min (get (hplots(k), "linewidth"), 5);
               if (! strcmp (style, "none"))
                 l1 = line ("xdata", ([xoffset, xoffset + linelength] + xk * xstep) / lpos(3),
                            "ydata", [1, 1] .* (lpos(4) - yoffset - yk * ystep) / lpos(4),
-                           "color", color, "linestyle", style,
+                           "color", color, "linestyle", style, "linewidth", lwidth,
                            "marker", "none",
                            "userdata", hplots(k));
                 hobjects(end+1) = l1;
@@ -841,11 +850,11 @@
               if (! strcmp (marker, "none"))
                 l1 = line ("xdata", (xoffset + 0.5 * linelength  + xk * xstep) / lpos(3),
                            "ydata", (lpos(4) - yoffset - yk * ystep) / lpos(4),
-                           "color", color, "linestyle", "none",
+                           "color", color, "linestyle", "none", "linewidth", lwidth,
                            "marker", marker,
                            "markeredgecolor",get (hplots(k), "markeredgecolor"),
                            "markerfacecolor",get (hplots(k), "markerfacecolor"),
-                           "markersize", get (hplots(k), "markersize"),
+                           "markersize", min (get (hplots(k), "markersize"),10),
                            "userdata", hplots(k));
                 hobjects(end+1) = l1;
               endif
@@ -855,6 +864,8 @@
                              {@updateline, hlegend, linelength, false});
                 addlistener (hplots(k), "linestyle",
                              {@updateline, hlegend, linelength, false});
+                addlistener (hplots(k), "linewidth",
+                             {@updateline, hlegend, linelength, false});
                 addlistener (hplots(k), "marker",
                              {@updateline, hlegend, linelength, false});
                 addlistener (hplots(k), "markeredgecolor",
@@ -876,13 +887,24 @@
                                       xoffset + xk * xstep) / lpos(3),
                             "ydata", (lpos(4) - yoffset -
                                       [yk-0.3, yk-0.3, yk+0.3, yk+0.3] .* ystep) / lpos(4),
-                           "facecolor", facecolor, "edgecolor", edgecolor,
-                           "cdata", cdata, "userdata", hplots(k));
-                hobjects(end+1) = p1;
-                ## Copy clim from axes so that colors work out.
-                set (hlegend, "clim", get (ca(1), "clim"));
+                            "facecolor", facecolor, "edgecolor", edgecolor,
+                            "cdata", cdata, "userdata", hplots(k));
+              else
+                ## non-standard patch only making use of marker styles
+                ## such as scatter plot.
+                p1 = patch ("xdata", (xoffset + 0.5 * linelength  + xk * xstep) / lpos(3),
+                            "ydata", (lpos(4) - yoffset - yk * ystep) / lpos(4),
+                            "marker", get (hplots(k), "marker"),
+                            "markeredgecolor",get (hplots(k),"markeredgecolor"),
+                            "markerfacecolor",get (hplots(k),"markerfacecolor"),
+                            "markersize", min (get (hplots(k),"markersize"),10),
+                            "cdata", cdata, "userdata", hplots(k));
               endif
-              ## FIXME: Probably need listeners, as for line objects
+              hobjects(end+1) = p1;
+              ## Copy clim from axes so that colors work out.
+              set (hlegend, "clim", get (ca(1), "clim"));
+
+              ## FIXME: Need listeners, as for line objects.
               ##        Changing clim, for example, won't update colors
 
             case "surface"
@@ -894,11 +916,11 @@
                                       xoffset + xk * xstep) / lpos(3),
                             "ydata", (lpos(4) - yoffset -
                                       [yk-0.3, yk-0.3, yk+0.3, yk+0.3] .* ystep) / lpos(4),
-                           "facecolor", facecolor, "edgecolor", edgecolor,
-                           "cdata", cdata, "userdata", hplots(k));
+                            "facecolor", facecolor, "edgecolor", edgecolor,
+                            "cdata", cdata, "userdata", hplots(k));
                 hobjects(end+1) = p1;
               endif
-              ## FIXME: Probably need listeners, as for line objects
+              ## FIXME: Need listeners, as for line objects.
 
           endswitch
 
@@ -1032,6 +1054,9 @@
         endif
       unwind_protect_cleanup
         set (fig, "currentaxes", curaxes);
+        if (! isempty (oldfig))
+          set (0, "currentfigure", oldfig);
+        endif
       end_unwind_protect
     endif
   endif
@@ -1065,8 +1090,9 @@
           set (hax, "position", position);
           set (hax, "outerposition", outerposition);
       endswitch
-      set (hax, "units", units);
-      h = legend (hax, hplots, get (h, "string"));
+      set (hax, {"units"}, units);
+
+      h = legend (hax(1), hplots, get (h, "string"));
     unwind_protect_cleanup
       recursive = false;
     end_unwind_protect
@@ -1149,6 +1175,7 @@
     if (ishandle (hplots(i)) && strcmp (get (hplots(i), "type"), "line"))
       dellistener (hplots(i), "color");
       dellistener (hplots(i), "linestyle");
+      dellistener (hplots(i), "linewidth");
       dellistener (hplots(i), "marker");
       dellistener (hplots(i), "markeredgecolor");
       dellistener (hplots(i), "markerfacecolor");
@@ -1163,7 +1190,7 @@
   if (update_name)
     ## When string changes, have to rebuild legend completely
     [hplots, text_strings] = __getlegenddata__ (hlegend);
-    legend (hplots, text_strings);
+    legend (get (hplots(1), "parent"), hplots, text_strings);
   else
     kids = get (hlegend, "children");
     ll = lm = [];
@@ -1198,14 +1225,18 @@
 
     if (! strcmp (linestyle, "none"))
       line ("xdata", xpos1, "ydata", ypos1, "color", get (h, "color"),
-            "linestyle", get (h, "linestyle"), "marker", "none",
+            "linestyle", get (h, "linestyle"),
+            "linewidth", min (get (h, "linewidth"), 5),
+            "marker", "none",
             "userdata", h, "parent", hlegend);
     endif
     if (! strcmp (marker, "none"))
       line ("xdata", xpos2, "ydata", ypos2, "color", get (h, "color"),
             "marker", marker, "markeredgecolor", get (h, "markeredgecolor"),
             "markerfacecolor", get (h, "markerfacecolor"),
-            "markersize", get (h, "markersize"), "linestyle", "none",
+            "markersize", min (get (h, "markersize"), 10),
+            "linestyle", "none",
+            "linewidth", min (get (h, "linewidth"), 5),
             "userdata", h, "parent", hlegend);
     endif
   endif
@@ -1217,22 +1248,22 @@
 %! plot (rand (2));
 %! title ('legend called with cellstr and string inputs for labels');
 %! h = legend ({'foo'}, 'bar');
-%! legend location northeastoutside
+%! legend (h, 'location', 'northeastoutside');
 %! set (h, 'fontsize', 20);
 
 %!demo
 %! clf;
 %! plot (rand (3));
-%! title ('legend() without inputs creates default labels');
-%! h = legend ();
+%! title ('legend("show") without inputs creates default labels');
+%! h = legend ('show');
 
 %!demo
 %! clf;
 %! x = 0:1;
 %! plot (x,x,';I am Blue;', x,2*x, x,3*x,';I am Red;');
-%! legend location northeastoutside
+%! h = legend ('location', 'northeastoutside');
 %! ## Placing legend inside should return axes to original size
-%! legend location northeast
+%! legend (h, 'location', 'northeast');
 %! title ('Blue and Red keys, with Green missing');
 
 %!demo
@@ -1368,9 +1399,9 @@
 %! rand_2x3_data2 = [0.44804, 0.84368, 0.23012; 0.72311, 0.58335, 0.90531];
 %! bar (rand_2x3_data2);
 %! ylim ([0 1.2]);
-%! title ('legend() works for bar graphs (hggroups)');
+%! title ('"left" option places text label west of colors');
 %! legend ('1st Bar', '2nd Bar', '3rd Bar');
-%! legend right;
+%! legend left;
 
 %!demo
 %! clf;
@@ -1596,7 +1627,7 @@
 %!   position = get (h, "position");
 %!   plot (rand (3));
 %!   legend ();
-%!   filename = sprintf ("%s.eps", tmpnam ());
+%!   filename = sprintf ("%s.eps", tempname ());
 %!   print (filename);
 %!   unlink (filename);
 %!   assert (get (h, "position"), position);
@@ -1605,3 +1636,20 @@
 %!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
+%!test
+%! ## bug #42035
+%! h = figure ("visible", "off");
+%! unwind_protect
+%!   hax1 = subplot (1,2,1);
+%!   plot (1:10);
+%!   hax2 = subplot (1,2,2);
+%!   plot (1:10);
+%!   hleg1 = legend (hax1, "foo");
+%!   assert (get (hleg1, "userdata").handle, hax1)
+%!   assert (gca (), hax2);
+%!   hleg2 = legend ("bar");
+%!   assert (get (hleg2, "userdata").handle, gca ())
+%! unwind_protect_cleanup
+%!   close (h);
+%! end_unwind_protect
+
--- a/scripts/plot/appearance/module.mk
+++ b/scripts/plot/appearance/module.mk
@@ -7,6 +7,7 @@
 plot_appearance_FCN_FILES = \
   plot/appearance/__clabel__.m \
   plot/appearance/__getlegenddata__.m \
+  plot/appearance/annotation.m \
   plot/appearance/axis.m \
   plot/appearance/box.m \
   plot/appearance/caxis.m \
--- a/scripts/plot/appearance/orient.m
+++ b/scripts/plot/appearance/orient.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -156,7 +156,7 @@
 %! assert (get (hfig, "papersize"), papersize);
 %! assert (get (hfig, "paperposition"), paperposition);
 
-%% Test input validation
+## Test input validation
 %!error orient (1.73, 2.5)
 %!error <unknown ORIENTATION> orient ("nobody")
 
--- a/scripts/plot/appearance/pbaspect.m
+++ b/scripts/plot/appearance/pbaspect.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/private/__axis_label__.m
+++ b/scripts/plot/appearance/private/__axis_label__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/private/__axis_limits__.m
+++ b/scripts/plot/appearance/private/__axis_limits__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -42,12 +42,17 @@
         set (hax, fcnmode, arg);
       endif
     else
-      if (!isnumeric (arg) && any (size (arg(:)) != [2, 1]))
+      if (! isnumeric (arg) && any (size (arg(:)) != [2, 1]))
         error ("%s: LIMITS must be a 2-element vector", fcn);
       else
         if (arg(1) >= arg(2))
           error ("%s: axis limits must be increasing", fcn);
         else
+          autoscale = isinf (arg);
+          if (any (autoscale))
+            set (hax, fcnmode, "auto");
+            arg(autoscale) = get (hax, fcn)(autoscale);
+          endif
           set (hax, fcn, arg(:));
         endif
       endif
--- a/scripts/plot/appearance/shading.m
+++ b/scripts/plot/appearance/shading.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Kai Habel
+## Copyright (C) 2006-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/specular.m
+++ b/scripts/plot/appearance/specular.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Kai Habel
+## Copyright (C) 2009-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -19,15 +19,17 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv})
 ## @deftypefnx {Function File} {} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv}, @var{se})
-## Calculate specular reflection strength of a surface defined by the normal
-## vector elements @var{sx}, @var{sy}, @var{sz} using Phong's approximation.
+## Calculate the specular reflection strength of a surface defined by the
+## normal vector elements @var{sx}, @var{sy}, @var{sz} using Phong's
+## approximation.
 ##
-## The light source location and viewer location vectors can be specified using
-## parameter @var{lv} and @var{vv} respectively.  The location vectors can
+## The light source location and viewer location vectors are specified using
+## parameters @var{lv} and @var{vv} respectively.  The location vectors can
 ## given as 2-element vectors [azimuth, elevation] in degrees or as 3-element
 ## vectors [x, y, z].
 ##
-## An optional sixth argument describes the specular exponent (spread) @var{se}.
+## An optional sixth argument specifies the specular exponent (spread) @var{se}.
+## If not given, @var{se} defaults to 10.
 ## @seealso{diffuse, surfl}
 ## @end deftypefn
 
@@ -39,54 +41,52 @@
     print_usage ();
   endif
 
-  ## Checks for specular exponent (se).
-  if (nargin < 6)
-    se = 10;
-  else
-    if (!isnumeric (se) || numel (se) != 1 || se <= 0)
-      error ("specular: exponent must be positive scalar");
-    endif
+  ## Check normal vectors
+  if (! size_equal (sx, sy, sz))
+    error ("specular: SX, SY, and SZ must be the same size");
   endif
 
-  ## Checks for normal vector.
-  if (!size_equal (sx, sy, sz))
-    error ("specular: SX, SY, and SZ must have same size");
-  endif
-
-  ## Check for light vector (lv) argument.
-  if (length (lv) < 2 || length (lv) > 3)
+  ## Check light vector (lv) argument
+  if (! isvector (lv) || length (lv) < 2 || length (lv) > 3)
     error ("specular: light vector LV must be a 2- or 3-element vector");
   elseif (length (lv) == 2)
     [lv(1), lv(2), lv(3)] = sph2cart (lv(1) * pi/180, lv(2) * pi/180, 1.0);
   endif
 
-  ## Check for view vector (vv) argument.
-  if (length (vv) < 2 || length (lv) > 3)
+  ## Check view vector (vv) argument
+  if (! isvector (vv) || length (vv) < 2 || length (lv) > 3)
     error ("specular: view vector VV must be a 2- or 3-element vector");
   elseif (length (vv) == 2)
     [vv(1), vv(2), vv(3)] = sph2cart (vv(1) * pi / 180, vv(2) * pi / 180, 1.0);
   endif
 
-  ## Normalize view and light vector.
+  ## Check specular exponent (se) argument
+  if (nargin < 6)
+    se = 10;
+  elseif (! (isnumeric (se) && numel (se) == 1 && se > 0))
+    error ("specular: exponent SE must be a positive scalar");
+  endif
+
+  ## Normalize view and light vectors
   if (sum (abs (lv)) > 0)
-    lv  /= norm (lv);
+    lv /= norm (lv);
   endif
   if (sum (abs (vv)) > 0)
-    vv  /= norm (vv);
+    vv /= norm (vv);
   endif
 
-  ## Calculate normal vector lengths and dot-products.
+  ## Calculate normal vector lengths and dot-products
   ns = sqrt (sx.^2 + sy.^2 + sz.^2);
   l_dot_n = (sx * lv(1) + sy * lv(2) + sz * lv(3)) ./ ns;
   v_dot_n = (sx * vv(1) + sy * vv(2) + sz * vv(3)) ./ ns;
 
-  ## Calculate specular reflection using Phong's approximation.
+  ## Calculate specular reflection using Phong's approximation
   retval = 2 * l_dot_n .* v_dot_n - dot (lv, vv);
 
-  ## Set zero if light is on the other side.
+  ## Set reflectance to zero if light is on the other side
   retval(l_dot_n < 0) = 0;
 
-  ## Allow postive values only.
+  ## Allow postive values only
   retval(retval < 0) = 0;
   retval = retval .^ se;
 
--- a/scripts/plot/appearance/text.m
+++ b/scripts/plot/appearance/text.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -129,6 +129,8 @@
 
   if (isempty (hax))
     hax = gca ();
+  else
+    hax = hax(1);
   endif
 
   ## Position argument may alse be in PROP/VAL pair
--- a/scripts/plot/appearance/title.m
+++ b/scripts/plot/appearance/title.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/view.m
+++ b/scripts/plot/appearance/view.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/whitebg.m
+++ b/scripts/plot/appearance/whitebg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 David Bateman
+## Copyright (C) 2010-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -75,15 +75,15 @@
     if (isroot)
       fac = get (0, "factory");
       fields = fieldnames (fac);
-      fieldindex = intersect (find (!cellfun ("isempty", regexp (fields, 'color'))), union (find (!cellfun ("isempty", regexp (fields, 'factoryaxes.*'))), find (!cellfun ("isempty", regexp (fields, 'factoryfigure.*')))));
+      fieldindex = intersect (find (! cellfun ("isempty", regexp (fields, 'color'))), union (find (! cellfun ("isempty", regexp (fields, 'factoryaxes.*'))), find (!cellfun ("isempty", regexp (fields, 'factoryfigure.*')))));
 
       ## Check whether the factory value has been replaced
       for nf = 1 : numel (fieldindex);
-        defaultfield = strrep (fields {fieldindex (nf)}, "factory", "default");
+        defaultfield = strrep (fields{fieldindex(nf)}, "factory", "default");
         try
-          defaultvalue = 1 - get (0, defaultfield {n});
+          defaultvalue = 1 - get (0, defaultfield{n});
         catch
-          field = fields {fieldindex (nf)};
+          field = fields{fieldindex(nf)};
           defaultvalue = 1 - subsref (fac, struct ("type", ".", "subs", field));
         end_try_catch
         set (0, defaultfield, defaultvalue);
@@ -108,7 +108,7 @@
       fieldindex = find (!cellfun ("isempty", regexp (fields, 'color')));
       if (numel (fieldindex))
         for nf = 1 : numel (fieldindex);
-          field = fields {fieldindex (nf)};
+          field = fields{fieldindex(nf)};
           c = subsref (p, struct ("type", ".", "subs", field));
           if (! ischar (c) && columns (c) == 3)
             set (h (nh), field, 1 - c);
@@ -122,10 +122,11 @@
         def = get (h (nh), "default");
         fields = fieldnames (def);
         if (! isempty (fields))
-          fieldindex = find (!cellfun ("isempty", regexp (fields, 'color')));
+          fieldindex = find (! cellfun ("isempty", regexp (fields, 'color')));
           for nf = 1 : numel (fieldindex)
-            defaultfield = fields {fieldindex (nf)};
-            defaultvalue = 1 - subsref (def, struct ("type", ".", "subs", defaultfield));
+            defaultfield = fields{fieldindex(nf)};
+            defaultvalue = ...
+              1 - subsref (def, struct ("type", ".", "subs", defaultfield));
             set (h (nh), defaultfield, defaultvalue);
           endfor
         endif
--- a/scripts/plot/appearance/xlabel.m
+++ b/scripts/plot/appearance/xlabel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/xlim.m
+++ b/scripts/plot/appearance/xlim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/ylabel.m
+++ b/scripts/plot/appearance/ylabel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/ylim.m
+++ b/scripts/plot/appearance/ylim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/zlabel.m
+++ b/scripts/plot/appearance/zlabel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/appearance/zlim.m
+++ b/scripts/plot/appearance/zlim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/area.m
+++ b/scripts/plot/draw/area.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Michael Goffioul
+## Copyright (C) 2007-2015 Michael Goffioul
 ## Copyright (C) 2007-2009 David Bateman
 ##
 ## This file is part of Octave.
@@ -49,7 +49,7 @@
 ## @example
 ## @group
 ## t = linspace (0, 2*pi, 100)';
-## y = [sin(t).^2, cos(t).^2)];
+## y = [sin(t).^2, cos(t).^2];
 ## area (t, y);
 ## legend ("sin^2", "cos^2", "location", "NorthEastOutside");
 ## @end group
@@ -271,7 +271,7 @@
 %! set (h, 'ydata', sort (get (h, 'ydata')))
 %! title ('area() plot of sorted data');
 
-%% Test input validation
+## Test input validation
 %!error area ()
 %!error area (1,2,3,4)
 %!error <X and Y must be real vectors or matrices> area ({1})
--- a/scripts/plot/draw/bar.m
+++ b/scripts/plot/draw/bar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/barh.m
+++ b/scripts/plot/draw/barh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/colorbar.m
+++ b/scripts/plot/draw/colorbar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -143,13 +143,13 @@
       ## FIXME: No listener on location property so have to re-create
       ##        colorbar whenever an option changes.
       ##        re-instate this code if listener is developed.
-      # if (! isempty (loc))
-      #   set (hcb, "location", loc);
-      # endif
-      # if (! isempty (args))
-      #   set (hcb, args{:});
-      # endif
-      ax = get (get (hcb, "parent"), "currrentaxes");
+      ## if (! isempty (loc))
+      ##   set (hcb, "location", loc);
+      ## endif
+      ## if (! isempty (args))
+      ##   set (hcb, args{:});
+      ## endif
+      ax = get (ancestor (hcb, "figure"), "currrentaxes");
     endif
   endif
 
@@ -163,7 +163,8 @@
   showhiddenhandles = get (0, "showhiddenhandles");
   unwind_protect
     set (0, "showhiddenhandles", "on");
-    cax = findobj (get (ax, "parent"), "tag", "colorbar", "type", "axes", "axes", ax);
+    cax = findobj (ancestor (ax, "figure"),
+                   "tag", "colorbar", "type", "axes", "axes", ax);
     if (! isempty (cax))
       delete (cax);
     endif
@@ -179,16 +180,16 @@
     obj = get (ax);
     obj.__cbar_hax__ = ax;
     position = obj.position;
-    ## FIXME: Should this be ancestor to accommodate hggroups?
-    hpar = get (ax, "parent");
+    
+    hpar = ancestor (ax, "figure");
     clen = rows (get (hpar, "colormap"));
     cext = get (ax, "clim");
     cdiff = (cext(2) - cext(1)) / clen / 2;
     cmin = cext(1) + cdiff;
     cmax = cext(2) - cdiff;
 
-    [pos, cpos, vertical, mirror] =  ...
-        __position_colorbox__ (loc, obj, ancestor (ax, "figure"));
+    [pos, cpos, vertical, mirror] = ...
+       __position_colorbox__ (loc, obj, ancestor (ax, "figure"));
     set (ax, "position", pos);
 
     cax = __go_axes__ (hpar, "tag", "colorbar",
@@ -207,11 +208,11 @@
       if (mirror)
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
                   "ylim", cext, "ylimmode", "manual",
-                  "yaxislocation", "right", args{:});
+                  "yaxislocation", "right", "layer", "top", args{:});
       else
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
                   "ylim", cext, "ylimmode", "manual",
-                  "yaxislocation", "left", args{:});
+                  "yaxislocation", "left", "layer", "top", args{:});
       endif
     else
       hi = image (cax, "xdata", [cmin, cmax], "ydata", [0,1],
@@ -219,11 +220,11 @@
       if (mirror)
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
                   "xlim", cext, "xlimmode", "manual",
-                  "xaxislocation", "top", args{:});
+                  "xaxislocation", "top", "layer", "top", args{:});
       else
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
                   "xlim", cext, "xlimmode", "manual",
-                  "xaxislocation", "bottom", args{:});
+                  "xaxislocation", "bottom", "layer", "top", args{:});
       endif
     endif
 
@@ -260,7 +261,7 @@
     if (strcmp (get (hc, "beingdeleted"), "off"))
       delete (hc);
     endif
-    if (!isempty (ancestor (h, "axes"))
+    if (! isempty (ancestor (h, "axes"))
         && strcmp (get (ancestor (h, "axes"), "beingdeleted"), "off"))
       ax = ancestor (h, "axes");
       units = get (ax, "units");
@@ -276,7 +277,7 @@
 function resetaxis (cax, d, ax, orig_props)
   if (isaxes (ax))
     ## FIXME: Probably don't want to delete everyone's listeners on colormap.
-    dellistener (get (ax, "parent"), "colormap");
+    dellistener (ancestor (ax, "figure"), "colormap");
     dellistener (ax, "clim");
     dellistener (ax, "dataaspectratio");
     dellistener (ax, "dataaspectratiomode");
@@ -296,7 +297,7 @@
 function update_colorbar_clim (hax, d, hi, vert)
   if (isaxes (hax)
       && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")))
-    clen = rows (get (get (hax, "parent"), "colormap"));
+    clen = rows (get (ancestor (hax, "figure"), "colormap"));
     cext = get (hax, "clim");
     cdiff = (cext(2) - cext(1)) / clen / 2;
     cmin = cext(1) + cdiff;
@@ -310,24 +311,6 @@
       set (hi, "xdata", [cmin, cmax]);
       set (hiax, "xlim", cext);
     endif
-
-    ## FIXME: Setting xlim or ylim from within a listener callback
-    ##        causes the axis to change size rather than change limits.
-    ##        Workaround it by jiggling the position property which forces
-    ##        a redraw of the axis object.
-    ##
-    ## Debug Example:
-    ## Uncomment the line below.
-    ##   keyboard;
-    ## Now run the the following code.
-    ##   clf; colorbar (); contour (peaks ())
-    ## Once the keyboard command has been hit in the debugger try
-    ##   set (hiax, "ylim", [0 0.5])
-    pos = get (hiax, "position");
-    pos(1) += eps;
-    set (hiax, "position", pos);
-    pos(1) -= eps;
-    set (hiax, "position", pos);
   endif
 endfunction
 
@@ -358,8 +341,8 @@
     obj.__cbar_hax__ = h;
     obj.position = orig_props.position;
     obj.outerposition = orig_props.outerposition;
-    [pos, cpos, vertical, mirror] =  ...
-        __position_colorbox__ (loc, obj, ancestor (h, "figure"));
+    [pos, cpos, vertical, mirror] = ...
+       __position_colorbox__ (loc, obj, ancestor (h, "figure"));
 
     if (vertical)
       if (mirror)
--- a/scripts/plot/draw/comet.m
+++ b/scripts/plot/draw/comet.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott
+## Copyright (C) 2008-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/comet3.m
+++ b/scripts/plot/draw/comet3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott and John W. Eaton
+## Copyright (C) 2010-2015 Ben Abbott and John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/compass.m
+++ b/scripts/plot/draw/compass.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -128,7 +128,7 @@
 %! a = toeplitz ([1;randn_9x1_data], [1,randn_1x9_data]);
 %! compass (eig (a));
 
-%% Test input validation
+## Test input validation
 %!error compass ()
 %!error compass (1,2,3,4)
 %!error compass (1, "-r", 2)
--- a/scripts/plot/draw/contour.m
+++ b/scripts/plot/draw/contour.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 Shai Ayal
+## Copyright (C) 1993-2015 Shai Ayal
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/contour3.m
+++ b/scripts/plot/draw/contour3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David BAteman
+## Copyright (C) 2007-2015 David BAteman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/contourc.m
+++ b/scripts/plot/draw/contourc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2003-2013 Shai Ayal
+## Copyright (C) 2003-2015 Shai Ayal
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/contourf.m
+++ b/scripts/plot/draw/contourf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel
+## Copyright (C) 2007-2015 Kai Habel
 ## Copyright (C) 2003 Shai Ayal
 ##
 ## This file is part of Octave.
--- a/scripts/plot/draw/cylinder.m
+++ b/scripts/plot/draw/cylinder.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Michael Goffioul and Kai Habel
+## Copyright (C) 2007-2015 Michael Goffioul and Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ellipsoid.m
+++ b/scripts/plot/draw/ellipsoid.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Sylvain Pelissier
+## Copyright (C) 2007-2015 Sylvain Pelissier
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/errorbar.m
+++ b/scripts/plot/draw/errorbar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Teemu Ikonen
+## Copyright (C) 2000-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
@@ -213,7 +213,7 @@
 %! y1 = sin (x);
 %! y2 = cos (x);
 %! errorbar (x, y1, err, '~', x, y2, err, '>');
-%! legend ("Y errbar", "X errbar");
+%! legend ('Y errbar', 'X errbar');
 %! title ('errorbar() with 2 datasets');
 
 
@@ -224,7 +224,7 @@
 %! y1 = sin (x);
 %! y2 = cos (x);
 %! errorbar (x, y1, err, err, '#r', x, y2, err, err, '#~');
-%! legend ("X errbox", "Y errbox");
+%! legend ('X errbox', 'Y errbox');
 %! title ('errorbar() with error boxes');
 
 %!demo
@@ -235,7 +235,7 @@
 %! y2 = cos (x);
 %! errorbar (x, y1, err, err, err, err, '~>', ...
 %!           x, y2, err, err, err, err, '#~>-*');
-%! legend ("X-Y errbars", "X-Y errboxes");
+%! legend ('X-Y errbars', 'X-Y errboxes');
 %! title ('errorbar() with X-Y errorbars and error boxes');
 
 ## Invisible figure used for tests
--- a/scripts/plot/draw/ezcontour.m
+++ b/scripts/plot/draw/ezcontour.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezcontourf.m
+++ b/scripts/plot/draw/ezcontourf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezmesh.m
+++ b/scripts/plot/draw/ezmesh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezmeshc.m
+++ b/scripts/plot/draw/ezmeshc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezplot.m
+++ b/scripts/plot/draw/ezplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezplot3.m
+++ b/scripts/plot/draw/ezplot3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezpolar.m
+++ b/scripts/plot/draw/ezpolar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezsurf.m
+++ b/scripts/plot/draw/ezsurf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/ezsurfc.m
+++ b/scripts/plot/draw/ezsurfc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/feather.m
+++ b/scripts/plot/draw/feather.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -127,7 +127,7 @@
 %! axis tight;
 %! title ('feather plot');
 
-%% Test input validation
+## Test input validation
 %!error feather ()
 %!error feather (1,2,3,4)
 %!error feather (1, "-r", 2)
--- a/scripts/plot/draw/fill.m
+++ b/scripts/plot/draw/fill.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -92,17 +92,28 @@
       set (hax, "nextplot", "add");
 
       for i = 1 : length (iargs)
+        x = varargin{iargs(i)};
+        y = varargin{iargs(i) + 1};
         cdata = varargin{iargs(i) + 2};
 
-        ## Matlab uses flat/interp shading based on orientation of cdata.
-        if (isnumeric (cdata) && isrow (cdata))
-          popt = ["facecolor", "flat", opts];
-        else
-          popt = opts;
+        if (! size_equal (x,y))
+          if (iscolumn (y) && rows (y) == rows (x))
+            y = repmat (y, [1, columns(x)]);
+          elseif (iscolumn (x) && rows (x) == rows (y))
+            x = repmat (x, [1, columns(y)]);
+          else
+            error ("fill: X annd Y must have same number of rows");
+          endif
+        endif
+        ## For Matlab compatibility, replicate cdata to match size of data
+        if (iscolumn (cdata) && ! ischar (cdata))
+          sz = size (x);
+          if (all (sz > 1))
+            cdata = repmat (cdata, [1, sz(2)]);
+          endif
         endif
 
-        [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata,
-                                       popt{:});
+        [htmp, fail] = __patch__ (hax, x, y, cdata, opts{:});
         if (fail)
           print_usage ();
         endif
@@ -145,7 +156,7 @@
     endif
   elseif (isnumeric (arg))
     ## Assume any numeric argument is correctly formatted cdata.
-    ## Let patch worry about the multple different input formats
+    ## Let patch worry about the multple different input formats.
     retval = true;
   endif
 endfunction
@@ -160,4 +171,30 @@
 %! x2 = sin (t2) + 0.8;
 %! y2 = cos (t2);
 %! h = fill (x1,y1,'r', x2,y2,'g');
+%! title ({'fill() function'; 'cdata specified with string'});
 
+%!demo
+%! clf;
+%! t1 = (1/16:1/8:1) * 2*pi;
+%! t2 = ((1/16:1/8:1) + 1/32) * 2*pi;
+%! x1 = sin (t1) - 0.8;
+%! y1 = cos (t1);
+%! x2 = sin (t2) + 0.8;
+%! y2 = cos (t2);
+%! h = fill (x1,y1,1, x2,y2,2);
+%! title ({'fill() function'; 'cdata = row vector produces FaceColor = "flat"'});
+
+%!demo
+%! clf;
+%! x = [0 0
+%!      1 0.5
+%!      1 0.5
+%!      0 0];
+%! y = [0 0
+%!      0 0
+%!      1 0.5
+%!      1 0.5];
+%! c = [1 2 3 4]';
+%! fill (x, y, c);
+%! title ({'fill() function'; 'cdata = column vector produces FaceColor = "interp"'});
+
--- a/scripts/plot/draw/fplot.m
+++ b/scripts/plot/draw/fplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Paul Kienzle
+## Copyright (C) 2005-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -208,7 +208,7 @@
 %! assert (rows (x) == rows (y));
 %! assert (y, [cos(x), sin(x)], -2e-3);
 
-%% Test input validation
+## Test input validation
 %!error fplot (1)
 %!error fplot (1,2,3,4,5,6)
 %!error <FN must be a function handle> fplot (1, [0 1])
--- a/scripts/plot/draw/hist.m
+++ b/scripts/plot/draw/hist.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/isocolors.m
+++ b/scripts/plot/draw/isocolors.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Martin Helm
+## Copyright (C) 2009-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -54,7 +54,7 @@
 ##             "PlotBoxAspectRatio", [1 1 1]);
 ##   set (p, "FaceColor", "interp");
 ##   ## set (p, "FaceLighting", "flat");
-##   ## light ("Position", [1 1 5]); ## Available with JHandles
+##   ## light ("Position", [1 1 5]);  # Available with JHandles
 ## endfunction
 ##
 ## N = 15;    # Increase number of vertices in each direction
@@ -133,7 +133,7 @@
     otherwise
       print_usage ();
   endswitch
-  if (ismatrix (vp) && columns (vp) == 3)
+  if (isnumeric (vp) && columns (vp) == 3)
     pa = [];
     v = vp;
   elseif ( ishandle (vp) )
@@ -152,7 +152,7 @@
   endif
   switch (nargout)
     case 0
-      if (!isempty (pa))
+      if (! isempty (pa))
         set (pa, "FaceVertexCData", new_col);
       endif
     case 1
--- a/scripts/plot/draw/isonormals.m
+++ b/scripts/plot/draw/isonormals.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Martin Helm
+## Copyright (C) 2009-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -68,7 +68,7 @@
 ## [f, v, cdat] = isosurface (x, y, z, c, iso, y);
 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ...
 ##            "FaceColor", "interp", "EdgeColor", "none");
-## isofinish (p); ## Call user function isofinish
+## isofinish (p);  # Call user function isofinish
 ##
 ## subplot (2,2,2); view (-38, 20);
 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ...
@@ -122,7 +122,7 @@
     otherwise
       print_usage ();
   endswitch
-  if (ismatrix (vp) && columns (vp) == 3)
+  if (isnumeric (vp) && columns (vp) == 3)
     pa = [];
     v = vp;
   elseif (ishandle (vp))
@@ -138,7 +138,7 @@
   endif
   switch (nargout)
     case 0
-      if (!isempty (pa))
+      if (! isempty (pa))
         set (pa, "VertexNormals", normals);
       endif
     case 1
--- a/scripts/plot/draw/isosurface.m
+++ b/scripts/plot/draw/isosurface.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Martin Helm
+## Copyright (C) 2009-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -134,7 +134,7 @@
     z = varargin{3};
     val = varargin{4};
     iso = varargin{5};
-    if (nargin >= 6 && ismatrix (varargin{6}))
+    if (nargin >= 6 && isnumeric (varargin{6}))
       colors = varargin{6};
       calc_colors = true;
     endif
@@ -152,7 +152,8 @@
     if (nargout == 2)
       warning ("isosurface: colors will be calculated, but no output argument to receive it.");
     endif
-    [fvc.faces, fvc.vertices, fvc.facevertexcdata] = __marching_cube__ (x, y, z, val, iso, colors);
+    [fvc.faces, fvc.vertices, fvc.facevertexcdata] = ...
+      __marching_cube__ (x, y, z, val, iso, colors);
   else
     [fvc.faces, fvc.vertices] = __marching_cube__ (x, y, z, val, iso);
   endif
--- a/scripts/plot/draw/line.m
+++ b/scripts/plot/draw/line.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -49,6 +49,8 @@
 
   if (isempty (hax))
     hax = gca ();
+  else
+    hax = hax(1);
   endif
 
   htmp = __line__ (hax, varargin{:});
@@ -62,6 +64,16 @@
 
 %!demo
 %! clf
+%! line ([0 1], [0.8 0.8], 'linestyle', '-', 'color', 'b');
+%! line ([0 1], [0.6 0.6], 'linestyle', '--', 'color', 'g');
+%! line ([0 1], [0.4 0.4], 'linestyle', ':', 'color', 'r');
+%! line ([0 1], [0.2 0.2], 'linestyle', '-.', 'color', 'k');
+%! ylim ([0 1]);
+%! title ('line() with various linestyles');
+%! legend ('"-"', '"--"', '":"', '"-."', 'location', 'eastoutside');
+
+%!demo
+%! clf
 %! x = 0:0.3:10;
 %! y1 = cos (x);
 %! y2 = sin (x);
--- a/scripts/plot/draw/loglog.m
+++ b/scripts/plot/draw/loglog.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/loglogerr.m
+++ b/scripts/plot/draw/loglogerr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Teemu Ikonen
+## Copyright (C) 2000-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/mesh.m
+++ b/scripts/plot/draw/mesh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -70,10 +70,15 @@
   unwind_protect
     hax = newplot (hax);
 
-    htmp = surface (varargin{:});
+    mesh_props = {"facecolor", "w", "edgecolor", "flat"};
+    chararg = find (cellfun ("isclass", varargin, "char"), 1);
+    if (isempty (chararg))
+      htmp = surface (varargin{:}, mesh_props{:});
+    else
+      htmp = surface (varargin{1:chararg-1}, mesh_props{:},
+                      varargin{chararg:end});
+    endif
 
-    set (htmp, "facecolor", "w");
-    set (htmp, "edgecolor", "flat");
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on");
@@ -121,7 +126,21 @@
 %! ylabel 'Y-axis';
 %! zlabel 'log scale';
 %! title ({'mesh() with color proportional to Z^2', 'Z-axis is log scale'});
-%! if (strcmp (get (gcf, '__graphics_toolkit__'), 'gnuplot'))
-%!   title ({'Gnuplot: mesh color is wrong', 'This is a Gnuplot bug'});
-%! endif
+%! try
+%!   if (strcmp (get (gcf, '__graphics_toolkit__'), 'gnuplot'))
+%!     title ({'Gnuplot: mesh color is wrong', 'This is a Gnuplot bug'});
+%!   endif
+%! catch
+%! end
 
+%!demo
+%! clf;
+%! x = logspace (0,1,11);
+%! z = x'*x;
+%! mesh (x, x, z, 'facecolor', 'none', 'edgecolor', 'c');
+%! xlabel 'X-axis';
+%! ylabel 'Y-axis';
+%! zlabel 'Z-axis';
+%! title ({'mesh() default properties overridden', ...
+%!         'transparent mesh with cyan color'});
+
--- a/scripts/plot/draw/meshc.m
+++ b/scripts/plot/draw/meshc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -68,13 +68,18 @@
   unwind_protect
     hax = newplot (hax);
 
-    htmp = surface (varargin{:});
+    ## FIXME: gnuplot does not support a filled surface and a
+    ##        non-filled contour.  3D filled patches are also not supported.
+    ##        Thus, the facecolor will be transparent for the gnuplot backend.
+    mesh_props = {"facecolor", "w", "edgecolor", "flat"};
+    chararg = find (cellfun ("isclass", varargin, "char"), 1);
+    if (isempty (chararg))
+      htmp = surface (varargin{:}, mesh_props{:});
+    else
+      htmp = surface (varargin{1:chararg-1}, mesh_props{:},
+                      varargin{chararg:end});
+    endif
 
-    ## FIXME - gnuplot does not support a filled surface and a
-    ## non-filled contour.  3D filled patches are also not supported.
-    ## Thus, the facecolor will be transparent for the gnuplot backend.
-    set (htmp, "facecolor", "w");
-    set (htmp, "edgecolor", "flat");
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on",
--- a/scripts/plot/draw/meshz.m
+++ b/scripts/plot/draw/meshz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -30,7 +30,7 @@
 ## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
 ## height above the plane of each vertex.  If only a single @var{z} matrix is
 ## given, then it is plotted over the meshgrid
-## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## @code{@var{x} = 0:columns (@var{z}) - 1, @var{y} = 0:rows (@var{z}) - 1}.
 ## Thus, columns of @var{z} correspond to different @var{x} values and rows
 ## of @var{z} correspond to different @var{y} values.
 ##
@@ -64,52 +64,65 @@
   ## Find where property/value pairs start
   charidx = find (cellfun ("isclass", varargin, "char"), 1);
 
-  have_c = false;
   if (isempty (charidx))
-    if (nargin == 2 || nargin == 4)
-      have_c = true;
-      charidx = nargin;   # bundle C matrix back into varargin
-    else
-      charidx = nargin + 1;
-    endif
+    charidx = nargin + 1;
   endif
 
-  if (charidx == 2)
+  if (nargin == 1)
+    z = varargin{1};
+    [m, n] = size (z);
+    x = 0:(n-1);
+    y = (0:(m-1)).';
+    c = z;
+  elseif (nargin == 2)
     z = varargin{1};
     [m, n] = size (z);
-    x = 1:n;
-    y = (1:m).';
+    x = 0:(n-1);
+    y = (0:(m-1)).';
+    c = varargin{2};
+  elseif (charidx == 4)
+    x = varargin{1};
+    y = varargin{2};
+    z = varargin{3};
+    c = z;
   else
     x = varargin{1};
     y = varargin{2};
     z = varargin{3};
+    c = varargin{4};
   endif
 
+  ## Create a border of one rectangle (2 points) as the curtain around
+  ## the data and draw it with the mean (max + min / 2) color of the data.
+
   if (isvector (x) && isvector (y))
-    x = [x(1), x(:).', x(end)];
-    y = [y(1); y(:); y(end)];
+    x = [x(1), x(1), x(:).', x(end), x(end)];
+    y = [y(1); y(1); y(:); y(end); y(end)];
   else
-    x = [x(1,1), x(1,:), x(1,end);
-         x(:,1), x, x(:,end);
-         x(end,1), x(end,:), x(end,end)];
-    y = [y(1,1), y(1,:), y(1,end);
-         y(:,1), y, y(:,end);
-         y(end,1), y(end,:), y(end,end)];
+    x = [x(1,1), x(1,1), x(1,:), x(1,end), x(1,end);
+         x(1,1), x(1,1), x(1,:), x(1,end), x(1,end);
+         x(:,1), x(:,1), x, x(:,end), x(:,end);
+         x(end,1), x(end,1), x(end,:), x(end,end), x(end,end);
+         x(end,1), x(end,1), x(end,:), x(end,end), x(end,end) ];
+    y = [y(1,1), y(1,1), y(1,:), y(1,end), y(1,end);
+         y(1,1), y(1,1), y(1,:), y(1,end), y(1,end);
+         y(:,1), y(:,1), y, y(:,end), y(:,end);
+         y(end,1), y(end,1), y(end,:), y(end,end), y(end,end);
+         y(end,1), y(end,1), y(end,:), y(end,end), y(end,end) ];
   endif
 
   zref = min (z(isfinite (z)));
-  z = [zref .* ones(1, columns(z) + 2);
-       zref .* ones(rows(z), 1), z, zref .* ones(rows(z), 1);
-       zref .* ones(1, columns(z) + 2)];
+  z = [zref .* ones(1, columns(z) + 4);
+       zref .* ones(1, 2), z(1,:), zref .* ones(1, 2);
+       zref .* ones(rows(z), 1), z(:,1),z, z(:,end), zref .* ones(rows(z), 1);
+       zref .* ones(1, 2), z(end,:), zref .* ones(1, 2);
+       zref .* ones(1, columns(z) + 4)];
 
-  if (have_c)
-    c = varargin{charidx};
-    cref = min (c(isfinite (c)));
-    c = [cref .* ones(1, columns(c) + 2);
-         cref .* ones(rows(c), 1), c, cref .* ones(rows(c), 1);
-         cref .* ones(1, columns(c) + 2)];
-    varargin(charidx) = c;
-  endif
+  cdat = c(isfinite (c(:)));
+  cref = (min (cdat) + max (cdat)) / 2;
+  c = [cref .* ones(2, columns(c) + 4);
+       cref .* ones(rows(c), 2), c, cref .* ones(rows(c), 2);
+       cref .* ones(2, columns(c) + 4)];
 
   oldfig = [];
   if (! isempty (hax))
@@ -117,7 +130,7 @@
   endif
   unwind_protect
     hax = newplot (hax);
-    htmp = mesh (x, y, z, varargin{charidx:end});
+    htmp = mesh (x, y, z, c, varargin{charidx:end});
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/draw/pareto.m
+++ b/scripts/plot/draw/pareto.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ## Copyright (C) 2003 Alberto Terruzzi
 ##
 ## This file is part of Octave.
@@ -104,7 +104,9 @@
   axis (ax(1), [1 - 0.6, idx95 + 0.6, 0, maxcdf]);
   axis (ax(2), [1 - 0.6, idx95 + 0.6, 0, 100]);
   set (ax(2), "ytick", [0, 20, 40, 60, 80, 100],
-              "yticklabel", {"0%", "20%", "40%", "60%", "80%", "100%"});
+              "yticklabel", {"0%", "20%", "40%", "60%", "80%", "100%"},
+              "ycolor", get (ax(1), "ycolor"));
+  set (hline, "color", get (ax(1), "colororder")(1,:));
   set (ax(1:2), "xtick", 1:idx95, "xticklabel", x(1:idx95));
 
   if (nargout > 0)
--- a/scripts/plot/draw/patch.m
+++ b/scripts/plot/draw/patch.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -80,6 +80,8 @@
 
   if (isempty (hax))
     hax = gca ();
+  else
+    hax = hax(1);
   endif
 
   [htmp, failed] = __patch__ (hax, varargin{:});
@@ -88,6 +90,15 @@
     print_usage ();
   endif
 
+  ## FIXME: This is a hack to get 'layer' command to work for 2D patches
+  ##        Alternative is much more complicated surgery in graphics.cc.
+  ##        of get_children_limits() for 'z' axis and 'patch' object type.
+  if (! ishold ())
+    if (isempty (get (htmp, "zdata")))
+      set (hax, "zlim", [-1 1]);
+    endif
+  endif
+
   if (nargout > 0)
     h = htmp;
   endif
@@ -141,7 +152,8 @@
 %! y2 = cos (t2);
 %! vert = [x1, y1; x2, y2];
 %! fac = [1:8,NaN(1,8);9:24];
-%! patch ('Faces',fac, 'Vertices',vert, 'FaceVertexCData',[0, 1, 0; 0, 0, 1]);
+%! patch ('Faces',fac, 'Vertices',vert, ...
+%!        'FaceVertexCData',[0, 1, 0; 0, 0, 1], 'FaceColor', 'flat');
 
 %!demo
 %! %% Property change on multiple patches
@@ -223,7 +235,7 @@
 %! colormap (jet (64));
 %! x = [ 0 0; 1 1; 1 0 ];
 %! y = [ 0 0; 0 1; 1 1 ];
-%! p = patch (x, y, 'facecolor', 'b');
+%! p = patch (x, y, 'b');
 %! set (p, 'cdatamapping', 'direct', 'facecolor', 'flat', 'cdata', [1 32]);
 %! title ('Direct mapping of colors: Light-Green UL and Blue LR triangles');
 
--- a/scripts/plot/draw/pcolor.m
+++ b/scripts/plot/draw/pcolor.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel
+## Copyright (C) 2007-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -111,10 +111,18 @@
         endif
       endif
       if (all (xrng == fix (xrng)))
-        xlim ([min(xrng), max(xrng)]);
+        xmin = min (xrng);
+        xmax = max (xrng);
+        if (xmin < xmax)
+          xlim ([xmin, xmax]);
+        endif
       endif
       if (all (yrng == fix (yrng)))
-        ylim ([min(yrng), max(yrng)]);
+        ymin = min (yrng);
+        ymax = max (yrng);
+        if (ymin < ymax)
+          ylim ([ymin, ymax]);
+        endif
       endif
     endif
 
--- a/scripts/plot/draw/peaks.m
+++ b/scripts/plot/draw/peaks.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Paul Kienzle
+## Copyright (C) 2007-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -27,7 +27,7 @@
 ## The function has the form
 ##
 ## @tex
-## $$f(x,y) = 3 (1 - x) ^ 2 e ^ {\left(-x^2 - (y+1)^2\right)} - 10 \left({x \over 5} - x^3 - y^5)\right) - {1 \over 3} e^{\left(-(x+1)^2 - y^2\right)}$$
+## $$f(x,y) = 3 (1 - x) ^ 2 e ^ {\left(-x^2 - (y+1)^2\right)} - 10 \left({x \over 5} - x^3 - y^5\right) - {1 \over 3} e^{\left(-(x+1)^2 - y^2\right)}$$
 ## @end tex
 ## @ifnottex
 ## @verbatim
@@ -83,6 +83,9 @@
 
   if (nargout == 0)
     surf (x, y, Z);
+    Z_max = max (Z(:));
+    Z_min = min (Z(:));
+    axis ([-3, 3, -3, 3, Z_min, Z_max]);
   elseif (nargout == 1)
     X_out = Z;
   else
--- a/scripts/plot/draw/pie.m
+++ b/scripts/plot/draw/pie.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -30,7 +30,7 @@
 ## @code{pct = @var{x}(i) / sum (@var{x})}.
 ##
 ## The optional input @var{explode} is a vector of the same length as @var{x}
-## that, if non-zero, "explodes" the slice from the pie chart.
+## that, if nonzero, "explodes" the slice from the pie chart.
 ##
 ## The optional input @var{labels} is a cell array of strings of the same
 ## length as @var{x} specifying the label for each slice.
--- a/scripts/plot/draw/pie3.m
+++ b/scripts/plot/draw/pie3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ## Copyright (C) 2010 Kai Habel
 ##
 ## This file is part of Octave.
@@ -31,7 +31,7 @@
 ## @code{pct = @var{x}(i) / sum (@var{x})}.
 ##
 ## The optional input @var{explode} is a vector of the same length as @var{x}
-## that, if non-zero, "explodes" the slice from the pie chart.
+## that, if nonzero, "explodes" the slice from the pie chart.
 ##
 ## The optional input @var{labels} is a cell array of strings of the same
 ## length as @var{x} specifying the label for each slice.
--- a/scripts/plot/draw/plot.m
+++ b/scripts/plot/draw/plot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/plot3.m
+++ b/scripts/plot/draw/plot3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -377,12 +377,14 @@
 %!demo
 %! clf;
 %! z = [0:0.05:5];
-%! plot3 (cos (2*pi*z), sin (2*pi*z), z, ';helix;');
+%! plot3 (cos (2*pi*z), sin (2*pi*z), z)
+%! legend ('helix');
 %! title ('plot3() of a helix');
 
 %!demo
 %! clf;
 %! z = [0:0.05:5];
-%! plot3 (z, exp (2i*pi*z), ';complex sinusoid;');
+%! plot3 (z, exp (2i*pi*z));
+%! legend ('complex sinusoid');
 %! title ('plot3() with complex input');
 
--- a/scripts/plot/draw/plotmatrix.m
+++ b/scripts/plot/draw/plotmatrix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/plotyy.m
+++ b/scripts/plot/draw/plotyy.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -22,7 +22,7 @@
 ## @deftypefnx {Function File} {} plotyy (@dots{}, @var{fun1}, @var{fun2})
 ## @deftypefnx {Function File} {} plotyy (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{ax}, @var{h1}, @var{h2}] =} plotyy (@dots{})
-## Plot two sets of data with independent y-axes.
+## Plot two sets of data with independent y-axes and a common x-axis.
 ##
 ## The arguments @var{x1} and @var{y1} define the arguments for the first plot
 ## and @var{x1} and @var{y2} for the second.
@@ -40,7 +40,7 @@
 ## the principal axis in which to plot the @var{x1} and @var{y1} data.
 ##
 ## The return value @var{ax} is a vector with the axis handles of the two
-## y axes.  @var{h1} and @var{h2} are handles to the objects generated by the
+## y-axes.  @var{h1} and @var{h2} are handles to the objects generated by the
 ## plot commands.
 ##
 ## @example
@@ -57,113 +57,66 @@
 ## @seealso{plot}
 ## @end deftypefn
 
-function [Ax, H1, H2] = plotyy (varargin)
+function [ax, h1, h2] = plotyy (varargin)
 
-  ## Don't use __plt_get_axis_arg__ here as ax is a two vector for plotyy
-  if (nargin > 1 && length (varargin{1}) == 2 && ishandle (varargin{1}(1))
-      && ishandle (varargin{1}(2))
-      && all (floor (varargin{1}) != varargin{1}))
-    obj1 = get (varargin{1}(1));
-    obj2 = get (varargin{1}(2));
-    if (strcmp (obj1.type, "axes") || strcmp (obj2.type, "axes"))
-      ax = [obj1, obj2];
-      varargin(1) = [];
-      if (isempty (varargin))
-        varargin = {};
-      endif
-    else
-      error ("plotyy: expecting first argument to be axes handle");
-    endif
-    oldh = gca ();
-  else
-    f = get (0, "currentfigure");
-    if (isempty (f))
-      f = figure ();
-    endif
-    ca = get (f, "currentaxes");
-    if (isempty (ca))
-      ax = [];
-    elseif (ishandle (ca) && isprop (ca, "__plotyy_axes__"))
-      ax = get (ca, "__plotyy_axes__");
-    else
-      ax = ca;
-    endif
-    if (length (ax) > 2)
-      for i = 3 : length (ax)
-        delete (ax (i));
-      endfor
-      ax = ax(1:2);
-    elseif (length (ax) == 1)
-      ax(2) = axes ();
-      set (ax(2), "nextplot", get (ax(1), "nextplot"));
-    elseif (isempty (ax))
-      ax(1) = axes ();
-      ax(2) = axes ();
-      ca = ax(2);
-    endif
-    if (nargin < 2)
-      varargin = {};
-    endif
-    oldh = ca;
-  endif
+  [hax, varargin] = __plt_get_axis_arg__ ("plotyy", varargin{:});
 
-  if (nargin < 4)
+  nargin = numel (varargin);
+  if (nargin < 4 || nargin > 6)
     print_usage ();
   endif
 
+  oldfig = [];
+  if (! isempty (hax))
+    oldfig = get (0, "currentfigure");
+  endif
   unwind_protect
-    [ax, h1, h2] = __plotyy__ (ax, varargin{:});
+    hax = newplot (hax);
+
+    ## FIXME: Second conditional test shouldn't be required.
+    ##        'cla reset' needs to delete user properties like __plotyy_axes__.
+    if (isprop (hax, "__plotyy_axes__")
+        && isaxes (get (hax, "__plotyy_axes__")) == [true true])
+      hax = get (hax, "__plotyy_axes__");
+    else
+      hax(2) = axes ("nextplot", get (hax(1), "nextplot"));
+    endif
+
+    [axtmp, h1tmp, h2tmp] = __plotyy__ (hax, varargin{:});
+
+    set (gcf, "currentaxes", hax(1));
+
   unwind_protect_cleanup
-    ## Only change back to the old axis if we didn't delete it
-    if (isaxes (oldh))
-      axes (oldh);
+    if (! isempty (oldfig))
+      set (0, "currentfigure", oldfig);
     endif
   end_unwind_protect
 
   if (nargout > 0)
-    Ax = ax;
-    H1 = h1;
-    H2 = h2;
+    ax = axtmp;
+    h1 = h1tmp;
+    h2 = h2tmp;
   endif
 
 endfunction
 
-function [ax, h1, h2] = __plotyy__ (ax, x1, y1, x2, y2, varargin)
-  if (nargin > 5)
-    fun1 = varargin{1};
-  else
-    fun1 = @plot;
-  endif
-  if (nargin > 6)
-    fun2 = varargin{2};
-  else
+function [ax, h1, h2] = __plotyy__ (ax, x1, y1, x2, y2, fun1 = @plot, fun2)
+
+  if (nargin < 7)
     fun2 = fun1;
   endif
 
   xlim = [min([x1(:); x2(:)]), max([x1(:); x2(:)])];
 
-  if (isaxes (ax(1)))
-    axes (ax(1));
-  else
-    ax(1) = axes ();
-  endif
-  newplot ();
+  axes (ax(1));
+
   h1 = feval (fun1, x1, y1);
 
-  set (ax(1), "ycolor", getcolor (h1(1)));
-  set (ax(1), "xlim", xlim);
-  set (ax(1), "color", "none");
-
-  cf = gcf ();
-  set (cf, "nextplot", "add");
+  set (ax(1), "color", "none", "ycolor", getcolor (h1(1)), "xlim", xlim);
 
-  if (isaxes (ax(2)))
-    axes (ax(2));
-  else
-    ax(2) = axes ();
-    set (ax(2), "nextplot", get (ax(1), "nextplot"));
-  endif
-  newplot ();
+  set (gcf (), "nextplot", "add");
+
+  axes (ax(2));
 
   colors = get (ax(1), "colororder");
   set (ax(2), "colororder", [colors(2:end,:); colors(1,:)]);
@@ -174,35 +127,38 @@
     set (ax, "activepositionproperty", "position");
   endif
 
-  ## Kluge, until __plt_get_axis_arg__ and newplot are reworked.
-  set (ax(2), "nextplot", "replacechildren");
+  ## Don't replace axis which has colororder property already modified
+  if (strcmp (get (ax(1), "nextplot"), "replace"))
+    set (ax(2), "nextplot", "replacechildren");
+  endif
   h2 = feval (fun2, ax(2), x2, y2);
-  set (ax(2), "yaxislocation", "right");
-  set (ax(2), "ycolor", getcolor (h2(1)));
+
+  set (ax(2), "yaxislocation", "right", "color", "none",
+              "ycolor", getcolor (h2(1)), "box", "off", "xlim", xlim);
 
   if (strcmp (get(ax(1), "activepositionproperty"), "position"))
     set (ax(2), "position", get (ax(1), "position"));
   else
-    set (ax(2), "outerposition", get (ax(1), "outerposition"));
-    set (ax(2), "looseinset", get (ax(1), "looseinset"));
+    set (ax(2), {"outerposition", "looseinset"},
+                get (ax(1), {"outerposition", "looseinset"}));
   endif
 
-  set (ax(2), "xlim", xlim);
-  set (ax(2), "color", "none");
-  set (ax(2), "box", "off");
+  ## Restore nextplot value by copying value from axis #1
+  set (ax(2), "nextplot", get (ax(1), "nextplot"));
 
   ## Add invisible text objects that when destroyed,
   ## also remove the other axis
   t1 = text (0, 0, "", "parent", ax(1), "tag", "plotyy",
-             "handlevisibility", "off", "visible", "off",
+             "visible", "off", "handlevisibility", "off",
              "xliminclude", "off", "yliminclude", "off");
   t2 = text (0, 0, "", "parent", ax(2), "tag", "plotyy",
-             "handlevisibility", "off", "visible", "off",
+             "visible", "off", "handlevisibility", "off",
              "xliminclude", "off", "yliminclude", "off");
 
   set (t1, "deletefcn", {@deleteplotyy, ax(2), t2});
   set (t2, "deletefcn", {@deleteplotyy, ax(1), t1});
 
+  ## Add cross-listeners so a change in one axes' attributes updates the other.
   addlistener (ax(1), "position", {@update_position, ax(2)});
   addlistener (ax(2), "position", {@update_position, ax(1)});
   addlistener (ax(1), "outerposition", {@update_position, ax(2)});
@@ -220,14 +176,16 @@
 
   ## Store the axes handles for the sister axes.
   if (ishandle (ax(1)) && ! isprop (ax(1), "__plotyy_axes__"))
-    addproperty ("__plotyy_axes__", ax(1), "data", ax);
+    addproperty ("__plotyy_axes__", ax(1), "data");
+    set (ax(1), "__plotyy_axes__", ax);
   elseif (ishandle (ax(1)))
     set (ax(1), "__plotyy_axes__", ax);
   else
     error ("plotyy.m: This shouldn't happen. File a bug report.");
   endif
   if (ishandle (ax(2)) && ! isprop (ax(2), "__plotyy_axes__"))
-    addproperty ("__plotyy_axes__", ax(2), "data", ax);
+    addproperty ("__plotyy_axes__", ax(2), "data");
+    set (ax(2), "__plotyy_axes__", ax);
   elseif (ishandle (ax(2)))
     set (ax(2), "__plotyy_axes__", ax);
   else
@@ -235,6 +193,80 @@
   endif
 endfunction
 
+function deleteplotyy (h, ~, ax2, t2)
+  if (isaxes (ax2)
+      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off"))
+      && strcmp (get (ax2, "beingdeleted"), "off"))
+    set (t2, "deletefcn", []);
+    delete (ax2);
+  endif
+endfunction
+
+function update_nextplot (h, ~, ax2)
+  persistent recursion = false;
+  if (! recursion)
+    unwind_protect
+      recursion = true;
+      set (ax2, "nextplot", get (h, "nextplot"));
+    unwind_protect_cleanup
+      recursion = false;
+    end_unwind_protect
+  endif
+endfunction
+
+function update_position (h, ~, ax2)
+  persistent recursion = false;
+
+  ## Don't allow recursion
+  if (! recursion)
+    unwind_protect
+      recursion = true;
+      view = get (h, "view");
+      oldview = get (ax2, "view");
+      plotboxaspectratio = get (h, "plotboxaspectratio");
+      oldplotboxaspectratio = get (ax2, "plotboxaspectratio");
+      plotboxaspectratiomode = get (h, "plotboxaspectratiomode");
+      oldplotboxaspectratiomode = get (ax2, "plotboxaspectratiomode");
+
+      if (strcmp (get (h, "activepositionproperty"), "position"))
+        position = get (h, "position");
+        oldposition = get (ax2, "position");
+        if (! (isequal (position, oldposition) && isequal (view, oldview)))
+          set (ax2, "position", position, "view", view);
+        endif
+      else
+        outerposition = get (h, "outerposition");
+        oldouterposition = get (ax2, "outerposition");
+        if (! (isequal (outerposition, oldouterposition)
+               && isequal (view, oldview)))
+          set (ax2, "outerposition", outerposition, "view", view);
+        endif
+      endif
+
+      if (! (isequal (plotboxaspectratio, oldplotboxaspectratio)
+             && isequal (plotboxaspectratiomode, oldplotboxaspectratiomode)))
+        set (ax2, "plotboxaspectratio", plotboxaspectratio,
+                  "plotboxaspectratiomode", plotboxaspectratiomode);
+      endif
+    unwind_protect_cleanup
+      recursion = false;
+    end_unwind_protect
+  endif
+endfunction
+
+function color = getcolor (ax)
+  obj = get (ax);
+  if (isfield (obj, "color"))
+    color = obj.color;
+  elseif (isfield (obj, "facecolor") && ! ischar (obj.facecolor))
+    color = obj.facecolor;
+  elseif (isfield (obj, "edgecolor") && ! ischar (obj.edgecolor))
+    color = obj.edgecolor;
+  else
+    color = [0, 0, 0];
+  endif
+endfunction
+
 
 %!demo
 %! clf;
@@ -245,12 +277,11 @@
 %! xlabel ('X');
 %! ylabel (ax(1), 'Axis 1');
 %! ylabel (ax(2), 'Axis 2');
-%! axes (ax(1));
 %! text (0.5, 0.5, 'Left Axis', ...
-%!       'color', [0 0 1], 'horizontalalignment', 'center');
-%! axes (ax(2));
+%!       'color', [0 0 1], 'horizontalalignment', 'center', 'parent', ax(1));
 %! text (4.5, 80, 'Right Axis', ...
-%!       'color', [0 0.5 0], 'horizontalalignment', 'center');
+%!       'color', [0 0.5 0], 'horizontalalignment', 'center', 'parent', ax(2));
+%! title ({'plotyy() example'; 'Left axis uses @plot, Right axis uses @semilogy'});
 
 %!demo
 %! clf;
@@ -267,14 +298,6 @@
 %! axis square;
 
 %!demo
-%! clf;
-%! x = linspace (-1, 1, 201);
-%! hax = plotyy (x, sin (pi*x), x, cos (pi*x));
-%! ylabel (hax(1), 'Blue on the Left');
-%! ylabel (hax(2), 'Green on the Right');
-%! xlabel ('xlabel');
-
-%!demo
 %! clf
 %! hold on
 %! t = (0:0.1:9);
@@ -284,81 +307,7 @@
 %! [~, h3, h4] = plotyy (t+1, x, t+1, y);
 %! set ([h3, h4], 'linestyle', '--');
 %! xlabel (hax(1), 'xlabel');
-%! title (hax(2), 'title');
+%! title (hax(2), 'Two plotyy graphs on same figure using "hold on"');
 %! ylabel (hax(1), 'Left axis is Blue');
 %! ylabel (hax(2), 'Right axis is Green');
 
-function deleteplotyy (h, d, ax2, t2)
-  if (isaxes (ax2)
-      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off"))
-      && strcmp (get (ax2, "beingdeleted"), "off"))
-    set (t2, "deletefcn", []);
-    delete (ax2);
-  endif
-endfunction
-
-function update_nextplot (h, d, ax2)
-  persistent recursion = false;
-  prop = "nextplot";
-  if (! recursion)
-    unwind_protect
-      recursion = true;
-      set (ax2, prop, get (h, prop));
-    unwind_protect_cleanup
-      recursion = false;
-    end_unwind_protect
-  endif
-endfunction
-
-function update_position (h, d, ax2)
-  persistent recursion = false;
-
-  ## Don't allow recursion
-  if (! recursion)
-    unwind_protect
-      recursion = true;
-      view = get (h, "view");
-      oldview = get (ax2, "view");
-      plotboxaspectratio = get (h, "plotboxaspectratio");
-      oldplotboxaspectratio = get (ax2, "plotboxaspectratio");
-      plotboxaspectratiomode = get (h, "plotboxaspectratiomode");
-      oldplotboxaspectratiomode = get (ax2, "plotboxaspectratiomode");
-
-      if (strcmp (get(h, "activepositionproperty"), "position"))
-        position = get (h, "position");
-        oldposition = get (ax2, "position");
-        if (! (isequal (position, oldposition) && isequal (view, oldview)))
-          set (ax2, "position", position, "view", view);
-        endif
-      else
-        outerposition = get (h, "outerposition");
-        oldouterposition = get (ax2, "outerposition");
-        if (! (isequal (outerposition, oldouterposition) && isequal (view, oldview)))
-          set (ax2, "outerposition", outerposition, "view", view);
-        endif
-      endif
-
-      if (! (isequal (plotboxaspectratio, oldplotboxaspectratio)
-             && isequal (plotboxaspectratiomode, oldplotboxaspectratiomode)))
-        set (ax2, "plotboxaspectratio", plotboxaspectratio);
-        set (ax2, "plotboxaspectratiomode", plotboxaspectratiomode);
-      endif
-    unwind_protect_cleanup
-      recursion = false;
-    end_unwind_protect
-  endif
-endfunction
-
-function color = getcolor (ax)
-  obj = get (ax);
-  if (isfield (obj, "color"))
-    color = obj.color;
-  elseif (isfield (obj, "facecolor") && ! ischar (obj.facecolor))
-    color = obj.facecolor;
-  elseif (isfield (obj, "edgecolor") && !  ischar (obj.edgecolor))
-    color = obj.edgecolor;
-  else
-    color = [0, 0, 0];
-  endif
-endfunction
-
--- a/scripts/plot/draw/polar.m
+++ b/scripts/plot/draw/polar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -36,6 +36,14 @@
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
+## Implementation Note: The polar axis is drawn using line and text objects
+## encapsulated in an hggroup.  The hggroup properties are linked to the
+## original axes object such that altering an appearance property, for example
+## @code{fontname}, will update the polar axis.  Two new properties are
+## added to the original axes--@code{rtick}, @code{ttick}--which replace
+## @code{xtick}, @code{ytick}.  The first is a list of tick locations in the
+## radial (rho) direction; The second is a list of tick locations in the
+## angular (theta) direction specified in degrees, i.e., in the range 0--359.
 ## @seealso{rose, compass, plot}
 ## @end deftypefn
 
@@ -87,9 +95,51 @@
       print_usage ();
     endif
 
-    set (hax, "xlim", [-maxr, maxr], "ylim", [-maxr, maxr],
-              "xaxislocation", "zero", "yaxislocation", "zero",
-              "plotboxaspectratio", [1, 1, 1]);
+    if (! ishold (hax))
+      hg = hggroup (hax, "tag", "polar_grid", "handlevisibility", "off");
+
+      set (hax, "visible", "off", "plotboxaspectratio", [1, 1, 1],
+                "zlim", [-1 1]);
+
+      if (! isprop (hax, "rtick"))
+        addproperty ("rtick", hax, "data");
+      endif
+
+      set (hax, "rtick", __calc_rtick__ (hax, maxr));
+
+      ## add t(heta)tick
+      if (! isprop (hax, "ttick"))
+        addproperty ("ttick", hax, "data");
+      endif
+
+      ## theta(angular) ticks in degrees
+      set (hax, "ttick", 0:30:330);
+
+      __update_polar_grid__ (hax, [], hg);
+
+      set (hg, "deletefcn", {@resetaxis, hax});
+
+      addlistener (hax, "rtick", {@__update_polar_grid__, hg});
+      addlistener (hax, "ttick", {@__update_polar_grid__, hg});
+      addlistener (hax, "color", {@__update_patch__, hg});
+      addlistener (hax, "fontangle", {@__update_text__, hg, "fontangle"});
+      addlistener (hax, "fontname", {@__update_text__, hg, "fontname"});
+      addlistener (hax, "fontsize", {@__update_text__, hg, "fontsize"});
+      addlistener (hax, "fontunits", {@__update_text__, hg, "fontunits"});
+      addlistener (hax, "fontweight", {@__update_text__, hg, "fontweight"});
+      addlistener (hax, "interpreter", {@__update_text__, hg, "interpreter"});
+      addlistener (hax, "layer", {@__update_layer__, hg});
+      addlistener (hax, "gridlinestyle",{@__update_lines__,hg,"gridlinestyle"});
+      addlistener (hax, "linewidth", {@__update_lines__, hg, "linewidth"});
+    else
+      hg = findall (hax, "tag", "polar_grid");
+      if (! isempty (hg))
+        oldrtick = max (get (hax, "rtick"));
+        if (maxr > oldrtick)
+          set (hax, "rtick", __calc_rtick__ (hax, maxr));
+        endif
+      endif
+    endif
 
   unwind_protect_cleanup
     if (! isempty (oldfig))
@@ -103,6 +153,19 @@
 
 endfunction
 
+function rtick = __calc_rtick__ (hax, maxr)
+  ## FIXME: workaround: calculate r(ho)tick from xtick
+  savexlim = get (hax, "xlim");
+  saveylim = get (hax, "ylim");
+  set (hax, "xlim", [-maxr maxr], "ylim", [-maxr maxr]);
+  xtick = get (hax, "xtick");
+  rtick = xtick(find (xtick > 0, 1):find (xtick >= maxr, 1));
+  if (isempty (rtick))
+    rtick = [0.5 1];
+  endif
+  set (hax, "xlim", savexlim, "ylim", saveylim);
+endfunction
+
 function retval = __plr1__ (h, theta, fmt)
 
   theta = theta(:);
@@ -193,6 +256,133 @@
 
 endfunction
 
+## Callback functions for listeners
+
+function __update_text__ (hax, ~, hg, prop)
+
+  kids = get (hg, "children");
+  idx = strcmp (get (kids, "type"), "text");
+  set (kids(idx).', prop, get (hax, prop));
+
+endfunction
+
+function __update_lines__ (hax,  ~, hg, prop)
+
+  kids = get (hg, "children");
+  idx = strcmp (get (kids, "type"), "line");
+  lprop = prop;
+  if (strcmp (prop, "gridlinestyle"))
+    lprop = "linestyle";
+  endif
+  set (kids(idx).', lprop, get (hax, prop));
+
+endfunction
+
+function __update_patch__ (hax, ~, hg)
+
+  kids = get (hg, "children");
+  idx = strcmp (get (kids, "type"), "patch");
+  set (kids(idx).', "facecolor", get (hax, "color"));
+
+endfunction
+
+function __update_layer__ (hax,  ~, hg)
+
+  set (hg, "handlevisibility", "on");
+  kids = get (hax, "children");
+  if (strcmp (get (hax, "layer"), "bottom"))
+    set (hax, "children", [kids(kids != hg); hg]);
+  else
+    set (hax, "children", [hg; kids(kids != hg)]);
+  endif
+  set (hg, "handlevisibility", "off");
+
+endfunction
+
+function __update_polar_grid__ (hax, ~, hg)
+
+  ## Delete existing polar grid
+  delete (get (hg, "children"));
+
+  rtick = unique (get (hax, "rtick")(:)');
+  rtick = rtick(rtick > 0);
+  if (isempty (rtick))
+    rtick = [0.5 1];
+  endif
+
+  ttick = unique (get (hax, "ttick")(:)');
+  ttick = ttick(ttick >= 0);
+  if (isempty (ttick))
+    ttick = 0:30:330;
+  endif
+
+  lprops = {"linestyle", get(hax, "gridlinestyle"), ...
+            "linewidth", get(hax, "linewidth")};
+  ## "fontunits" should be first because it affects "fontsize" property.
+  tprops(1:2:12) = {"fontunits", "fontangle", "fontname", "fontsize", ...
+                    "fontweight", "interpreter"};
+  tprops(2:2:12) = get (hax, tprops(1:2:12));
+
+  ## The number of points used for a circle
+  circle_points = 50;
+  t = linspace (0, 2*pi, circle_points)';
+  x = kron (cos (t), rtick);
+  y = kron (sin (t), rtick);
+
+  ## Draw colored disk under axes at Z-depth = -1
+  patch (x(:,end), y(:,end), -ones (circle_points, 1),
+         get (hax, "color"), "parent", hg);
+
+  ## Plot dotted circles
+  line (x(:,1:end-1), y(:,1:end-1), lprops{:}, "parent", hg);
+
+  ## Outer circle is drawn solid
+  line (x(:,end), y(:,end), lprops{:}, "linestyle", "-", "parent", hg);
+
+  ## Add radial labels
+  [x, y] = pol2cart (0.42 * pi, rtick);
+  text (x, y, num2cell (rtick), "verticalalignment", "bottom", tprops{:},
+        "parent", hg);
+
+  ## add radial lines
+  s = rtick(end) * sin (ttick * pi / 180);
+  c = rtick(end) * cos (ttick * pi / 180);
+  x = [zeros(1, numel (ttick)); c];
+  y = [zeros(1, numel (ttick)); s];
+  line (x, y, "linestyle", ":", lprops{:}, "parent", hg);
+
+  ## add angular labels
+  tticklabel = num2cell (ttick);
+  ## FIXME: This tm factor does not work as fontsize increases
+  tm = 1.08;
+  text (tm * c, tm * s, tticklabel, "horizontalalignment", "center",
+        tprops{:}, "parent", hg);
+
+  lim = 1.1 * rtick(end);
+  set (hax, "xlim", [-lim, lim], "ylim", [-lim, lim]);
+
+  ## Put polar grid behind or ahead of plot
+  __update_layer__ (hax, [], hg);
+
+endfunction
+
+function resetaxis (~, ~, hax)
+  if (isaxes (hax))
+    dellistener (hax, "rtick");
+    dellistener (hax, "ttick");
+    dellistener (hax, "color");
+    dellistener (hax, "fontangle");
+    dellistener (hax, "fontname");
+    dellistener (hax, "fontsize");
+    dellistener (hax, "fontunits");
+    dellistener (hax, "fontweight");
+    dellistener (hax, "interpreter");
+    dellistener (hax, "layer");
+    dellistener (hax, "gridlinestyle");
+    dellistener (hax, "linewidth");
+  endif
+endfunction
+
 
 %!demo
 %! clf;
@@ -210,8 +400,25 @@
 
 %!demo
 %! clf;
+%! theta = linspace (0,2*pi,1000);
+%! rho = sin (2*theta).*cos (2*theta);
+%! polar (theta, rho, '--r');
+%! set (gca, 'rtick', 0.1:0.1:0.6, 'ttick', 0:20:340);
+%! title ('polar() plot with finer grid');
+
+%!demo
+%! clf;
+%! theta = linspace (0,2*pi,1000);
+%! rho = sin (2*theta).*cos (2*theta);
+%! polar (theta, rho, '--b');
+%! set (gca, 'fontsize', 12, 'linewidth', 2, 'color', [0.8 0.8 0.8]);
+%! title ('polar() plot with modified axis appearance');
+
+%!demo
+%! clf;
 %! theta = linspace (0,8*pi,1000);
 %! rho = sin (5/4*theta);
 %! polar (theta, rho);
+%! set (gca, 'rtick', 0.2:0.2:1);
 %! title ('polar() plot');
 
--- a/scripts/plot/draw/private/__add_datasource__.m
+++ b/scripts/plot/draw/private/__add_datasource__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/private/__bar__.m
+++ b/scripts/plot/draw/private/__bar__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/private/__contour__.m
+++ b/scripts/plot/draw/private/__contour__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -89,7 +89,7 @@
   if (isscalar (vn))
     ## FIXME: The levels should be determined similarly to {x,y,z}ticks
     ##        so that they aren't set at extremely odd values.
-    lvl = linspace (min (z1(!isinf (z1))), max (z1(!isinf (z1))), vn + 2);
+    lvl = linspace (min (z1(! isinf (z1))), max (z1(! isinf (z1))), vn + 2);
     ## Strip off max outlier, min must stay for contourf hole algorithm.
     lvl = lvl(1:end-1);
   else
@@ -446,7 +446,7 @@
       z = get (h, "zdata");
       ## FIXME: The levels should be determined similarly to {x,y,z}ticks
       ##        so that they aren't set at extremely odd values.
-      lvl = linspace (min (z(!isinf (z))), max (z(!isinf (z))), 10 + 2);
+      lvl = linspace (min (z(! isinf (z))), max (z(! isinf (z))), 10 + 2);
       ## Strip off max outlier, min must stay for contourf hole algorithm.
       lvl = lvl(1:end-1);
     endif
--- a/scripts/plot/draw/private/__errcomm__.m
+++ b/scripts/plot/draw/private/__errcomm__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Teemu Ikonen
+## Copyright (C) 2001-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
@@ -37,7 +37,7 @@
   k = 1;
   while (k <= nargs)
     arg = varargin{k++};
-    if (! ismatrix (arg))
+    if (! isnumeric (arg))
       error ("%s: data argument %d must be numeric", caller, k-1);
     endif
     if (isvector (arg))
@@ -52,7 +52,7 @@
         retval(end+1,1) = __errplot__(arg, hax, data{1:ndata});
         break;
       endif
-      if (! ismatrix (arg))
+      if (! isnumeric (arg))
         error ("%s: data argument %d must be numeric", caller, k-1);
       endif
       if (isvector (arg))
--- a/scripts/plot/draw/private/__errplot__.m
+++ b/scripts/plot/draw/private/__errplot__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Teemu Ikonen
+## Copyright (C) 2000-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
@@ -207,7 +207,7 @@
           && strcmp (get (fkids(i), "tag"), "legend"))
         udata = get (fkids(i), "userdata");
         if (! isempty (intersect (udata.handle, gca ())))
-          hlegend = fkids (i);
+          hlegend = fkids(i);
           break;
         endif
       endif
--- a/scripts/plot/draw/private/__ezplot__.m
+++ b/scripts/plot/draw/private/__ezplot__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -448,8 +448,12 @@
       axis (hax, domain);
     elseif (isplot || ispolar)
       h = feval (pltfunc, hax, X, Z);
-      if (isplot && ! parametric)
-        axis (hax, domain);
+      if (isplot)
+        if (! parametric)
+          axis (hax, domain);
+        else
+          axis ("equal");
+        endif
       endif
     elseif (isplot3)
       if (animate)
--- a/scripts/plot/draw/private/__interp_cube__.m
+++ b/scripts/plot/draw/private/__interp_cube__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Martin Helm
+## Copyright (C) 2009-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -24,8 +24,8 @@
 ## @end deftypefn
 
 function [Vxyz, idx, frac] = __interp_cube__ (x, y, z, val, v, req = "values" )
-  if (ismatrix (x) && ndims (x) == 3 && ismatrix (y) && ndims (y) == 3
-       && ismatrix (z) && ndims (z) == 3 && size_equal (x, y, z, val))
+  if (isnumeric (x) && ndims (x) == 3 && isnumeric (y) && ndims (y) == 3
+       && isnumeric (z) && ndims (z) == 3 && size_equal (x, y, z, val))
     x = squeeze (x(1,:,1))(:);
     y = squeeze (y(:,1,1))(:);
     z = squeeze (z(1,1,:))(:);
@@ -42,7 +42,7 @@
   if (columns (v) != 3)
     error ( "V has to be Nx3 matrix");
   endif
-  ##if (!ischar (req))
+  ##if (! ischar (req))
   ## error ('__interp_cube__: Invalid request parameter use "values", "normals" or "normals8"');
   ##endif
   if (isempty (v))
--- a/scripts/plot/draw/private/__line__.m
+++ b/scripts/plot/draw/private/__line__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -47,7 +47,8 @@
     [~, m] = max (m);
     b = ones (size (varargin{m(1)}));
     try
-      varargin(n) = cellfun (@(x) bsxfun (@times, b, x), varargin(n), "uniformoutput", false);
+      varargin(n) = cellfun (@(x) bsxfun (@times, b, x), varargin(n),
+                             "uniformoutput", false);
     catch
       error ("line: number of X, Y, and Z points must be equal");
     end_try_catch
--- a/scripts/plot/draw/private/__marching_cube__.m
+++ b/scripts/plot/draw/private/__marching_cube__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Martin Helm
+## Copyright (C) 2009-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -98,12 +98,13 @@
     print_usage ();
   endif
 
-  if (!ismatrix (xx) || !ismatrix (yy) || !ismatrix (zz) || !ismatrix (c) || ...
-    ndims (xx) != 3 || ndims (yy) != 3 || ndims (zz) != 3 || ndims (c) != 3)
+  if (! isnumeric (xx) || ! isnumeric (yy) || ! isnumeric (zz)
+      || ! isnumeric (c) || ndims (xx) != 3 || ndims (yy) != 3
+      || ndims (zz) != 3 || ndims (c) != 3)
     error ("__marching_cube__: XX, YY, ZZ, C must be matrices of dim 3");
   endif
 
-  if (!size_equal (xx, yy, zz, c))
+  if (! size_equal (xx, yy, zz, c))
     error ("__marching_cube__: XX, YY, ZZ, C must be of equal size");
   endif
 
@@ -111,12 +112,12 @@
     error ("__marching_cube__: grid size must be at least 2x2x2");
   endif
 
-  if (!isscalar (iso))
+  if (! isscalar (iso))
     error ("__marching_cube__: ISO must be scalar value");
   endif
 
   if (nargin == 6)
-    if ( !ismatrix (colors) || ndims (colors) != 3 || size (colors) != size (c) )
+    if ( ! isnumeric (colors) || ndims (colors) != 3 || size (colors) != size (c) )
       error ( "COLORS must be a matrix of dim 3 and of same size as C" );
     endif
     calc_cols = true;
@@ -146,7 +147,7 @@
   endfor
 
   cedge = edge_table(cc+1); # assign the info about intersected edges
-  id =  find (cedge); # select only voxels which are intersected
+  id = find (cedge); # select only voxels which are intersected
   if (isempty (id))
     T = p = col = [];
     return;
@@ -184,7 +185,7 @@
   for jj=1:3:15
     id_ = find (tri(:, jj)>0);
     p = [id_, lindex*ones(rows (id_), 1),tri(id_, jj:jj+2)];
-    if (!isempty (p))
+    if (! isempty (p))
       p1 = sub2ind (size (pp), p(:,1), p(:,2), p(:,3));
       p2 = sub2ind (size (pp), p(:,1), p(:,2), p(:,4));
       p3 = sub2ind (size (pp), p(:,1), p(:,2), p(:,5));
--- a/scripts/plot/draw/private/__patch__.m
+++ b/scripts/plot/draw/private/__patch__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton, Shai Ayal, Kai Habel
+## Copyright (C) 2007-2015 John W. Eaton, Shai Ayal, Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -35,8 +35,7 @@
   is_numeric_arg = cellfun (@isnumeric, varargin);
 
   if (isempty (varargin))
-    args = {"xdata", [0; 1; 0], "ydata", [1; 1; 0], "facecolor", [0, 0, 0]};
-    args = setvertexdata (args);
+    args = varargin;
   elseif (isstruct (varargin{1}))
     if (isfield (varargin{1}, "vertices") && isfield (varargin{1}, "faces"))
       args{1} = "faces";
@@ -50,7 +49,6 @@
         args{6} = [];
       endif
       args = [args, varargin(2:end)];
-      args = setdata (args);
     else
       failed = true;
     endif
@@ -58,7 +56,6 @@
     if (nargin < 3 || ! is_numeric_arg(2))
       failed = true;
     else
-
       if (nargin > 4 && all (is_numeric_arg(1:4)))
         x = varargin{1};
         y = varargin{2};
@@ -70,7 +67,7 @@
         y = varargin{2};
         iarg = 4;
         if (rem (nargin - iarg, 2) == 1)
-          c = varargin {iarg};
+          c = varargin{iarg};
           z = varargin{3};
           iarg = 5;
         else
@@ -83,7 +80,7 @@
         z = [];
         iarg = 3;
         if (rem (nargin - iarg, 2) == 1)
-          c = varargin {iarg};
+          c = varargin{iarg};
           iarg++;
         else
           c = [];
@@ -127,7 +124,7 @@
             args{9} = "cdata";
             args{10} = c;
           else
-            error ("patch: color value not valid");
+            error ("patch: color data C must be numeric");
           endif
         elseif (isvector (c) && numel (c) == 3)
           args{7} = "facecolor";
@@ -150,7 +147,7 @@
             args{9} = "cdata";
             args{10} = c;
           else
-            error ("patch: color value not valid");
+            error ("patch: Invalid TrueColor data C");
           endif
         else
           ## Color Vectors
@@ -159,212 +156,35 @@
             args{8} = "interp";
             args{9} = "cdata";
             args{10} = [];
-          elseif (isequal (size (c), size (x)) && isequal (size (c), size (y)))
+          elseif (size_equal (c, x) && size_equal (c, y))
             args{7} = "facecolor";
             args{8} = "interp";
             args{9} = "cdata";
             args{10} = c;
           else
-            error ("patch: size of x, y, and c must be equal");
+            error ("patch: size of X, Y, and C must be equal");
           endif
         endif
       elseif (ischar (c) && rem (nargin - iarg, 2) == 0)
-        ## Assume that any additional argument over an even number is
-        ## color string.
+        ## Assume any additional argument over an even number is a color string.
         args{7} = "facecolor";
-        args{8} =  tolower (c);
+        args{8} = tolower (c);
         args{9} = "cdata";
         args{10} = [];
       else
         args{7} = "facecolor";
-        args{8} = [0, 1, 0];
+        args{8} = [0, 0, 0];
         args{9} = "cdata";
         args{10} = [];
       endif
 
       args = [args, varargin(iarg:end)];
-      args = setvertexdata (args);
     endif
   else
     args = varargin;
-    if (any (strcmpi (args, "faces") | strcmpi (args, "vertices")))
-      args = setdata (args);
-    else
-      args = setvertexdata (args);
-    endif
-  endif
-
-  if (!failed)
-    h = __go_patch__ (p, args {:});
-
-    ## Setup listener functions
-    addlistener (h, "xdata", @update_data);
-    addlistener (h, "ydata", @update_data);
-    addlistener (h, "zdata", @update_data);
-    addlistener (h, "cdata", @update_data);
-
-    addlistener (h, "faces", @update_fvc);
-    addlistener (h, "vertices", @update_fvc);
-    addlistener (h, "facevertexcdata", @update_fvc);
-  endif
-endfunction
-
-function args = delfields (args, flds)
-  idx = cellfun ("isclass", args, "char");
-  idx(idx) = ismember (args(idx), flds);
-  if (rows (idx) == 1)
-    idx |= [false, idx(1:end-1)];
-  else
-    idx |= [false; idx(1:end-1)];
-  endif
-  args(idx) = [];
-endfunction
-
-function args = setdata (args)
-  args = delfields (args, {"xdata", "ydata", "zdata", "cdata"});
-  ## Remove the readonly fields as well
-  args = delfields (args, {"type", "uicontextmenu"});
-  nargs = length (args);
-  idx = find (strcmpi (args, "faces"), 1, "last") + 1;
-  if (idx > nargs)
-    faces = [];
-  else
-    faces = args {idx};
-  endif
-  idx = find (strcmpi (args, "vertices"), 1, "last") + 1;
-  if (idx > nargs)
-    vert = [];
-  else
-    vert = args {idx};
-  endif
-  idx = find (strcmpi (args, "facevertexcdata"), 1, "last") + 1;
-  if (isempty (idx) || idx > nargs)
-    fvc = [];
-  else
-    fvc = args {idx};
-  endif
-  idx = find (strcmpi (args, "facecolor"), 1, "last") + 1;
-  if (isempty (idx) || idx > nargs)
-    if (!isempty (fvc))
-      fc = "flat";
-    else
-      fc = [0, 1, 0];
-    endif
-    args = {"facecolor", fc, args{:}};
-  endif
-
-  nc = rows (faces);
-  idx = faces .';
-  t1 = isnan (idx);
-  for i = find (any (t1))
-    first_idx_in_column = find (t1(:,i), 1);
-    idx(first_idx_in_column:end,i) = idx(first_idx_in_column-1,i);
-  endfor
-  x = reshape (vert(:,1)(idx), size (idx));
-  y = reshape (vert(:,2)(idx), size (idx));
-  if (columns (vert) > 2)
-    z = reshape (vert(:,3)(idx), size (idx));
-  else
-    z = [];
   endif
 
-  if (rows (fvc) == nc || rows (fvc) == 1)
-    c = reshape (fvc, [1, size(fvc)]);
-  else
-    if (columns (fvc) == 3)
-      c = cat (3, reshape (fvc(idx, 1), size (idx)),
-               reshape (fvc(idx, 2), size (idx)),
-               reshape (fvc(idx, 3), size (idx)));
-    elseif (isempty (fvc))
-      c = [];
-    else ## if (columnns (fvc) == 1)
-      c = permute (fvc(faces), [2, 1]);
-    endif
-  endif
-  args = {"xdata", x, "ydata", y, "zdata", z, "cdata", c, args{:}};
-endfunction
-
-function args = setvertexdata (args)
-  args = delfields (args, {"vertices", "faces", "facevertexcdata"});
-  ## Remove the readonly fields as well
-  args = delfields (args, {"type", "uicontextmenu"});
-  nargs = length (args);
-  idx = find (strcmpi (args, "xdata"), 1, "last") + 1;
-  if (idx > nargs)
-    x = [];
-  else
-    x = args {idx};
-  endif
-  idx = find (strcmpi (args, "ydata"), 1, "last") + 1;
-  if (idx > nargs)
-    y = [];
-  else
-    y = args {idx};
-  endif
-  idx = find (strcmpi (args, "zdata"), 1, "last") + 1;
-  if (isempty (idx) || idx > nargs)
-    z = [];
-  else
-    z = args {idx};
-  endif
-  idx = find (strcmpi (args, "cdata"), 1, "last") + 1;
-  if (isempty (idx) || idx > nargs)
-    c = [];
-  else
-    c = args {idx};
-  endif
-  idx = find (strcmpi (args, "facecolor"), 1, "last") + 1;
-  if (isempty (idx) || idx > nargs)
-    if (!isempty (c))
-      fc = "flat";
-    else
-      fc = [0, 1, 0];
-    endif
-    args = {"facecolor", fc, args{:}};
-  endif
-
-  [nr, nc] = size (x);
-  if (nr == 1 && nc > 1)
-    nr = nc;
-    nc = 1;
-  endif
-  if (!isempty (z))
-    vert = [x(:), y(:), z(:)];
-  else
-    vert = [x(:), y(:)];
-  endif
-  faces = reshape (1:numel (x), nr, nc);
-  faces = faces';
-
-  if (ndims (c) == 3)
-    fvc = reshape (c, rows (c) * columns (c), size (c, 3));
-  else
-    fvc = c(:);
-  endif
-
-  args = {"faces", faces, "vertices", vert, "facevertexcdata", fvc, args{:}};
-endfunction
-
-function update_data (h, d)
-  update_handle (h, false);
-endfunction
-
-function update_fvc (h, d)
-  update_handle (h, true);
-endfunction
-
-function update_handle (h, isfv)
-  persistent recursive = false;
-
-  if (! recursive)
-    recursive = true;
-    f = get (h);
-    if (isfv)
-      set (h, setdata ([fieldnames(f), struct2cell(f)].'(:)){:});
-    else
-      set (h, setvertexdata ([fieldnames(f), struct2cell(f)].'(:)){:});
-    endif
-    recursive = false;
+  if (! failed)
+    h = __go_patch__ (p, args{:});
   endif
 endfunction
-
--- a/scripts/plot/draw/private/__pie__.m
+++ b/scripts/plot/draw/private/__pie__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ## Copyright (C) 2010 Kai Habel
 ##
 ## This file is part of Octave.
--- a/scripts/plot/draw/private/__plt__.m
+++ b/scripts/plot/draw/private/__plt__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -111,12 +111,14 @@
           endif
           if (y_set)
             tmp = __plt2__ (h, x, y, options, properties);
-            [hlgnd, tlgnd, setlgnd] = __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
+            [hlgnd, tlgnd, setlgnd] = ...
+              __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
             properties = {};
             retval = [retval; tmp];
           else
             tmp = __plt1__ (h, x, options, properties);
-            [hlgnd, tlgnd, setlgnd] = __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
+            [hlgnd, tlgnd, setlgnd] = ...
+               __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
             properties = {};
             retval = [retval; tmp];
           endif
@@ -129,7 +131,8 @@
         if (y_set)
           options = __pltopt__ (caller, {""});
           tmp = __plt2__ (h, x, y, options, properties);
-          [hlgnd, tlgnd, setlgnd] = __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
+          [hlgnd, tlgnd, setlgnd] = ...
+            __plt_key__ (tmp, options, hlgnd, tlgnd, setlgnd);
           retval = [retval; tmp];
           x = next_arg;
           y_set = false;
--- a/scripts/plot/draw/private/__quiver__.m
+++ b/scripts/plot/draw/private/__quiver__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -112,8 +112,16 @@
   ## Normalize 0.20 to 1/3 for plotting
   arrowsize /= 0.20 * 3;
 
-  if (autoscale && numel (u) > 1)
-    ## Scale the arrows to fit in the grid
+  ## Scale the arrows to fit in the grid
+  uu = u;
+  vv = v;
+  if (is3d)
+    ww = w;
+    len = max (sqrt (u(:).^2 + v(:).^2 + w(:).^2));
+  else
+    len = max (sqrt (u(:).^2 + v(:).^2));
+  endif
+  if (len > 0 && autoscale && numel (u) > 1)
     if (isvector (x))
       nx = ny = sqrt (length (x));
     else
@@ -123,29 +131,19 @@
     dy = (max (y(:)) - min (y(:))) / ny;
     if (is3d)
       dz = (max (z(:)) - min (z(:))) / max (nx, ny);
-      len = max (sqrt (u(:).^2 + v(:).^2 + w(:).^2));
     else
       dz = 0;
-      len = max (sqrt (u(:).^2 + v(:).^2));
     endif
-    if (len > 0)
-      sd = sqrt (dx.^2 + dy.^2 + dz.^2) / len;
-      if (sd != 0)
-        s = autoscale * sd;
-      else  # special case of identical points with multiple vectors
-        s = autoscale;
-      endif
-      uu = s * u;
-      vv = s * v;
-      if (is3d)
-        ww = s * w;
-      endif
+    sd = sqrt (dx.^2 + dy.^2 + dz.^2) / len;
+    if (sd != 0)
+      s = autoscale * sd;
+    else  # special case of identical points with multiple vectors
+      s = autoscale;
     endif
-  else
-    uu = u;
-    vv = v;
+    uu = s * u;
+    vv = s * v;
     if (is3d)
-      ww = w;
+      ww = s * w;
     endif
   endif
 
--- a/scripts/plot/draw/private/__scatter__.m
+++ b/scripts/plot/draw/private/__scatter__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -84,6 +84,21 @@
     c = [];
   endif
 
+  ## Validate inputs
+  if (nd == 2 && ! size_equal (x, y))
+    error ([fcn ": X and Y must have the same size"]);
+  elseif (nd == 3 && ! size_equal (x, y, z))
+    error ([fcn ": X, Y, and Z must have the same size"]);
+  endif
+
+  if (! isscalar (s) && ! size_equal (x, s))
+    error ([fcn ": size of S must match X, Y, and Z"]);
+  endif
+
+  if (rows (c) > 1 && rows (c) != rows (x))
+    error ([fcn ": number of colors in C must match number of points in X"]);
+  endif
+
   newargs = {};
   filled = false;
   have_marker = false;
--- a/scripts/plot/draw/private/__stem__.m
+++ b/scripts/plot/draw/private/__stem__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Michel D. Schmid
+## Copyright (C) 2006-2015 Michel D. Schmid
 ##
 ## This file is part of Octave.
 ##
@@ -48,6 +48,8 @@
 
     h = [];
     nx = rows (x);
+    h_baseline = [];
+
     for i = 1 : columns (x)
       if (have_z)
         xt = x(:)';
@@ -90,19 +92,19 @@
         __line__ (hax, xt, yt, zt, "color", lc, "linestyle", ls, "parent", hg);
         __line__ (hax, x, y, z, "color", mc, "linestyle", "none",
                        "marker", ms, "markerfacecolor", fc, "parent", hg);
-        h_baseline = [];
       else
         __line__ (hax, xt, yt, "color", lc, "linestyle", ls, "parent", hg);
         __line__ (hax, x(:,i), y(:, i), "color", mc, "linestyle", "none",
                        "marker", ms, "markerfacecolor", fc, "parent", hg);
+
         x_axis_range = get (hax, "xlim");
-        h_baseline = line (hax, x_axis_range, [0, 0], "color", [0, 0, 0]);
-        set (h_baseline, "handlevisibility", "off", "xliminclude", "off");
-        addlistener (hax, "xlim", @update_xlim);
-        addproperty ("basevalue", h_baseline, "data", 0);
-        addlistener (h_baseline, "basevalue", {@update_baseline, 0});
-        addlistener (h_baseline, "ydata", {@update_baseline, 1});
-        addlistener (h_baseline, "visible", {@update_baseline, 2});
+        if (isempty (h_baseline))
+          h_baseline = line (hax, x_axis_range, [0, 0], "color", [0, 0, 0]);
+          set (h_baseline, "handlevisibility", "off", "xliminclude", "off");
+          addproperty ("basevalue", h_baseline, "data", 0);
+        else
+          set (h_baseline, "xdata", x_axis_range);
+        endif
       endif
 
       ## Setup the hggroup and listeners.
@@ -110,11 +112,6 @@
       addproperty ("baseline", hg, "data", h_baseline);
       addproperty ("basevalue", hg, "data", 0);
 
-      if (! have_z)
-        addlistener (hg, "showbaseline", @show_baseline);
-        addlistener (hg, "basevalue", @move_baseline);
-      endif
-
       addproperty ("color", hg, "linecolor", lc);
       addproperty ("linestyle", hg, "linelinestyle", ls);
       addproperty ("linewidth", hg, "linelinewidth", 0.5);
@@ -131,7 +128,13 @@
       addlistener (hg, "markerfacecolor", @update_props);
       addlistener (hg, "markersize", @update_props);
 
+      if (islogical (x))
+        x = double (x);
+      endif
       addproperty ("xdata", hg, "data", x(:, i));
+      if (islogical (y))
+        y = double (y);
+      endif
       addproperty ("ydata", hg, "data", y(:, i));
       if (have_z)
         addproperty ("zdata", hg, "data", z(:, i));
@@ -146,14 +149,28 @@
       ## Matlab property, although Octave does not implement it.
       addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
 
-      if (! isempty (args))
-        set (hg, args{:});
-      endif
-      if (i == 1 && ! isempty (h_baseline))
-        set (h_baseline, "parent", get (hg, "parent"));
-      endif
     endfor
 
+    ## baseline listeners
+    if (! isempty (h_baseline))
+      addlistener (hax, "xlim", @update_xlim);
+      for hg = h'
+        addlistener (hg, "showbaseline", @show_baseline);
+        addlistener (hg, "visible", {@show_baseline, h});
+        addlistener (hg, "basevalue", @move_baseline);
+      endfor
+
+      addlistener (h_baseline, "basevalue", {@update_baseline, 0});
+      addlistener (h_baseline, "ydata", {@update_baseline, 1});
+      addlistener (h_baseline, "visible", {@update_baseline, 2});
+      set (h_baseline, "parent", get (hg(1), "parent"));
+    endif
+
+    ## property/value pairs
+    if (! isempty (args))
+        set (h, args{:});
+    endif
+
     if (! strcmp (hold_state, "add") && have_z)
       set (hax, "view", [-37.5 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on");
@@ -222,7 +239,9 @@
         y = repmat ([1:nr]', 1, nc);
       endif
     endif
-    if (! (ismatrix (x) && ismatrix (y) && ismatrix (z)))
+    if (! (isnumeric (x) || islogical (x))
+        || ! (isnumeric (y) || islogical (y))
+        || ! (isnumeric (z) || islogical (z)))
       error ("stem3: X, Y, and Z must be numeric");
     endif
   else
@@ -233,7 +252,8 @@
         x = 1:rows (y);
       endif
     endif
-    if (! (ismatrix (x) && ismatrix (y)))
+    if (! (isnumeric (x) || islogical (x))
+        || ! (isnumeric (y) || islogical (y)))
       error ("stem: X and Y must be numeric");
     endif
   endif
@@ -365,8 +385,16 @@
   endfor
 endfunction
 
-function show_baseline (h, ~)
-  set (get (h, "baseline"), "visible", get (h, "showbaseline"));
+function show_baseline (h, ~, hg = [])
+  if (isempty (hg))
+    set (get (h, "baseline"), "visible", get (h, "showbaseline"));
+  else
+    if (all (strcmp (get (hg, "visible"), "off")))
+      set (get (h, "baseline"), "visible", "off");
+    else
+      set (get (h, "baseline"), "visible", "on");
+    endif
+  endif
 endfunction
 
 function move_baseline (h, ~)
@@ -374,6 +402,7 @@
   bl = get (h, "baseline");
 
   set (bl, "ydata", [b0, b0]);
+  set (bl, "basevalue", b0);
 
   kids = get (h, "children");
   yt = get (h, "ydata")(:)';
@@ -398,7 +427,7 @@
   y = get (h, "ydata");
   z = get (h, "zdata");
 
-  if (!isempty (z) && size_equal (x, y, z))
+  if (! isempty (z) && size_equal (x, y, z))
     sz = min ([size(x); size(y); size(z)]);
     x = x(1:sz(1),1:sz(2));
     y = y(1:sz(1),1:sz(2));
--- a/scripts/plot/draw/quiver.m
+++ b/scripts/plot/draw/quiver.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/quiver3.m
+++ b/scripts/plot/draw/quiver3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/rectangle.m
+++ b/scripts/plot/draw/rectangle.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 David Bateman
+## Copyright (C) 2012-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -103,7 +103,7 @@
       elseif (strcmpi (arg, "curvature"))
         curv2 = varargin{iarg+1};
         varargin(iarg:iarg+1) = [];
-        if (!isnumeric (curv2) || (numel (curv2) != 1 && numel (curv2) != 2))
+        if (! isnumeric (curv2) || (numel (curv2) != 1 && numel (curv2) != 2))
           error ("rectangle: curvature must be a 2-element vector or a scalar");
         endif
         if (any (curv2 < 0) || any (curv2 > 1))
--- a/scripts/plot/draw/ribbon.m
+++ b/scripts/plot/draw/ribbon.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel
+## Copyright (C) 2007-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/rose.m
+++ b/scripts/plot/draw/rose.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -116,6 +116,11 @@
 
 %!demo
 %! clf;
+%! rose (2*randn (1e5, 1), 8);
+%! title ('rose() angular histogram plot with 8 bins');
+
+%!demo
+%! clf;
 %! rose ([2*randn(1e5, 1), pi + 2*randn(1e5, 1)]);
-%! title ('rose() angular histogram plot');
+%! title ('rose() angular histogram plot with 2 data series');
 
--- a/scripts/plot/draw/scatter.m
+++ b/scripts/plot/draw/scatter.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/scatter3.m
+++ b/scripts/plot/draw/scatter3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/semilogx.m
+++ b/scripts/plot/draw/semilogx.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/semilogxerr.m
+++ b/scripts/plot/draw/semilogxerr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Teemu Ikonen
+## Copyright (C) 2000-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/semilogy.m
+++ b/scripts/plot/draw/semilogy.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/semilogyerr.m
+++ b/scripts/plot/draw/semilogyerr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Teemu Ikonen
+## Copyright (C) 2000-2015 Teemu Ikonen
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/shrinkfaces.m
+++ b/scripts/plot/draw/shrinkfaces.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Martin Helm
+## Copyright (C) 2012-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -23,24 +23,29 @@
 ## @deftypefnx {Function File} {@var{nfv} =} shrinkfaces (@var{f}, @var{v}, @var{sf})
 ## @deftypefnx {Function File} {[@var{nf}, @var{nv}] =} shrinkfaces (@dots{})
 ##
-## Reduce the faces area for a given patch, structure or explicit faces
-## and points matrices by a scale factor @var{sf}.  The structure
-## @var{fv} must contain the fields @qcode{"faces"} and @qcode{"vertices"}.
-## If the factor @var{sf} is omitted then a default of 0.3 is used.
+## Reduce the size of faces in a patch by the shrink factor @var{sf}.
+##
+## The patch object can be specified by a graphics handle (@var{p}), a patch
+## structure (@var{fv}) with the fields @qcode{"faces"} and @qcode{"vertices"},
+## or as two separate matrices (@var{f}, @var{v}) of faces and vertices.
 ##
-## Given a patch handle as the first input argument and no output
-## parameters, perform the shrinking of the patch faces in place and
-## redraw the patch.
+## The shrink factor @var{sf} is a positive number specifying the percentage
+## of the original area the new face will occupy.  If no factor is given the
+## default is 0.3 (a reduction to 30% of the original size).  A factor greater
+## than 1.0 will result in the expansion of faces.
+##
+## Given a patch handle as the first input argument and no output parameters,
+## perform the shrinking of the patch faces in place and redraw the patch.
 ##
 ## If called with one output argument, return a structure with fields
 ## @qcode{"faces"}, @qcode{"vertices"}, and @qcode{"facevertexcdata"}
-## containing the data after shrinking which can then directly be used as an
-## input argument for the @code{patch} function.
+## containing the data after shrinking.  This structure can be used directly
+## as an input argument to the @code{patch} function.
 ##
-## Performing the shrinking on faces which are not convex can lead to
-## undesired results.
+## @strong{Caution:}: Performing the shrink operation on faces which are not
+## convex can lead to undesirable results.
 ##
-## For example,
+## Example: a triangulated 3/4 circle and the corresponding shrunken version.
 ##
 ## @example
 ## @group
@@ -56,9 +61,6 @@
 ## @end group
 ## @end example
 ##
-## @noindent
-## draws a triangulated 3/4 circle and the corresponding shrunken
-## version.
 ## @seealso{patch}
 ## @end deftypefn
 
@@ -71,10 +73,11 @@
   endif
 
   sf = 0.3;
+  colors = [];
   p = varargin{1};
-  colors = [];
 
-  if (ishandle (p) && nargin < 3)
+  if (isscalar (p) && ishandle (p) && nargin < 3
+      && strcmp (get (p, "type"), "patch"))
     faces = get (p, "Faces");
     vertices = get (p, "Vertices");
     colors = get (p, "FaceVertexCData");
@@ -104,8 +107,8 @@
     error ("shrinkfaces: scale factor must be a positive scalar");
   endif
 
-  n = columns (vertices);
-  if (n < 2 || n > 3)
+  nc = columns (vertices);
+  if (nc < 2 || nc > 3)
     error ("shrinkfaces: only 2-D and 3-D patches are supported");
   endif
 
@@ -120,14 +123,12 @@
   elseif (rows (colors) == rows (vertices))
     c = colors(faces'(:), :);
   else
-    ## Discard inconsistent color data.
-    c = [];
+    c = [];  # Discard inconsistent color data.
   endif
   sv = rows (v);
-  ## we have to deal with a probably very large number of vertices, so
-  ## use sparse we use as midpoint (1/m, ..., 1/m) in generalized
-  ## barycentric coordinates.
-  midpoints = full (kron ( speye (sv / m), ones (m, m) / m) * sparse (v));
+  ## We have to deal with a possibly very large number of vertices, so use
+  ## sparse as midpoint (1/m, ..., 1/m) in generalized barycentric coordinates.
+  midpoints = full (kron (speye (sv / m), ones (m, m) / m) * sparse (v));
   v = sqrt (sf) * (v - midpoints) + midpoints;
   f = reshape (1:sv, m, sv / m)';
 
@@ -216,3 +217,13 @@
 %!assert (size (nfv.vertices), [3 3])
 %!assert (norm (nfv2.vertices - vertices), 0, 2*eps)
 
+## Test input validation
+%!error shrinkfaces ()
+%!error shrinkfaces (1,2,3,4)
+%!error [a,b,c] = shrinkfaces (1)
+%!error <scale factor must be a positive scalar> shrinkfaces (nfv, ones (2))
+%!error <scale factor must be a positive scalar> shrinkfaces (nfv, 0)
+%!error <only 2-D and 3-D patches are supported> shrinkfaces (faces, ones (3,1))
+%!error <only 2-D and 3-D patches are supported> shrinkfaces (faces, ones (3,4))
+%!error <faces must consist of at least 3 vertices> shrinkfaces (faces(1:2), vertices)
+
--- a/scripts/plot/draw/slice.m
+++ b/scripts/plot/draw/slice.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel, David Bateman
+## Copyright (C) 2007-2015 Kai Habel, David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -160,7 +160,9 @@
 
       if (length (sy) > 0)
         for i = length (sy):-1:1
-          [xi, yi, zi] = meshgrid (squeeze (x(1,:,1)), sy(i), squeeze (z(1,1,:)));
+          [xi, yi, zi] = meshgrid (squeeze (x(1,:,1)),
+                                   sy(i),
+                                   squeeze (z(1,1,:)));
           vy = squeeze (interp3 (x, y, z, v, xi, yi, zi, method));
           htmp(sidx++) = surface (squeeze (xi),
                                   squeeze (sy(i) * ones (size (zi))),
--- a/scripts/plot/draw/sombrero.m
+++ b/scripts/plot/draw/sombrero.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/sphere.m
+++ b/scripts/plot/draw/sphere.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Michael Goffioul
+## Copyright (C) 2007-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/stairs.m
+++ b/scripts/plot/draw/stairs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -99,7 +99,7 @@
   if (nargin == 2 || ischar (varargin{2}))
     y = varargin{1};
     varargin(1) = [];
-    if (! ismatrix (y) || ndims (y) > 2)
+    if (! isnumeric (y) || ndims (y) > 2)
       error ("stairs: Y must be a numeric 2-D vector or matrix");
     endif
     if (isvector (y))
@@ -110,7 +110,7 @@
     x = varargin{1};
     y = varargin{2};
     varargin(1:2) = [];
-    if (! ismatrix (x) || ! ismatrix (y) || ndims (x) > 2 || ndims (y) > 2)
+    if (! isnumeric (x) || ! isnumeric (y) || ndims (x) > 2 || ndims (y) > 2)
       error ("stairs: X and Y must be numeric 2-D vectors or matrices");
     endif
   endif
@@ -122,7 +122,7 @@
 
   if (isvector (y))
     y = y(:);
-  elseif (ismatrix (y) && vec_x)
+  elseif (isnumeric (y) && vec_x)
     x = repmat (x, [1, columns(y)]);
   endif
 
--- a/scripts/plot/draw/stem.m
+++ b/scripts/plot/draw/stem.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Michel D. Schmid
+## Copyright (C) 2006-2015 Michel D. Schmid
 ##
 ## This file is part of Octave.
 ##
@@ -187,7 +187,7 @@
 %! y = [sin(x), cos(x)];
 %! h = stem (x, y);
 %! set (h(2), 'color', 'g');
-%! set (h(1), 'basevalue', -1);
+%! set (h(1), 'basevalue', -0.75);
 %! title ('stem plots modified through hggroup handle');
 
 %!demo
@@ -213,3 +213,18 @@
 %!error <inconsistent sizes for X and Y> stem (ones (2,2), ones (3,3))
 %!error <No value specified for property "FOO"> stem (1, "FOO")
 
+%!test
+%! ## stemseries share the same baseline and basevalue
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h = stem ([1 2; 1.5 2.5], [1 1;2 2]);
+%!   assert (get (h(1), "baseline"), get (h(2), "baseline"))
+%!   bv = 0.3;
+%!   set (h(1), "basevalue", bv)
+%!   assert (get (get (h(1), "baseline"), "basevalue"), bv)
+%!   assert (get (h(1), "basevalue"), bv)
+%!   assert (get (h(2), "basevalue"), bv)
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
--- a/scripts/plot/draw/stem3.m
+++ b/scripts/plot/draw/stem3.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/stemleaf.m
+++ b/scripts/plot/draw/stemleaf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Michael D. Godfrey
+## Copyright (C) 2013-2015 Michael D. Godfrey
 ##
 ## This file is part of Octave.
 ##
@@ -185,7 +185,7 @@
   hl = xs(hlidx);               # lower hinge
   hu = xs(huidx);               # upper hinge
   h_spread = hu - hl;           # h_spread: difference between hinges
-  step = 1.5*h_spread;          # step: 1.5 * h_spread
+  step = fix (1.5*h_spread);    # step: 1.5 * h_spread
   i_fence_l = hl - step;        # inner fences: outside hinges + step
   o_fence_l = hl - 2*step;      # outer fences: outside hinges + 2*step
   i_fence_h = hu + step;
@@ -454,7 +454,7 @@
 %! "         ______|   46|_______"      ,
 %! "        f|  -35           88|"      ,
 %! "         |    0            0|  out" ,
-%! "        F|  -82          135|"      ,
+%! "        F|  -81          134|"      ,
 %! "         |    0            0|  far" ,
 %! " "                                  ,
 %! "   0 | 20"                          ,
@@ -483,7 +483,7 @@
 %! "         ______|   46|_______"      ,
 %! "        f|  -88           35|"      ,
 %! "         |    0            0|  out" ,
-%! "        F| -135           82|"      ,
+%! "        F| -134           81|"      ,
 %! "         |    0            0|  far" ,
 %! " "                                  ,
 %! "  -5 | 2"                           ,
@@ -511,7 +511,7 @@
 %! "         ______|   10|_______"      ,
 %! "        f|  -17           10|"      ,
 %! "         |    0            0|  out" ,
-%! "        F|  -28           21|"      ,
+%! "        F|  -27           20|"      ,
 %! "         |    0            0|  far" ,
 %! " "                                  ,
 %! "  -0 | 9700"                        ,
@@ -535,7 +535,7 @@
 %! "         ______|   13|_______"        ,
 %! "        f|  -22           13|"        ,
 %! "         |    0            0|  out"   ,
-%! "        F|  -36           27|"        ,
+%! "        F|  -35           26|"        ,
 %! "         |    0            0|  far"   ,
 %! " "                                    ,
 %! "  -0 | 970"                           ,
--- a/scripts/plot/draw/surf.m
+++ b/scripts/plot/draw/surf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Kai Habel
+## Copyright (C) 2007-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/surface.m
+++ b/scripts/plot/draw/surface.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -73,109 +73,110 @@
 
   h = 0;
   bad_usage = false;
-  firststring = nargin;
-  for i = 1 : (nargin - 1)
-    if (ischar (varargin{i}))
-      firststring = i;
-      break;
-    endif
-  endfor
+  firststring = find (cellfun ("isclass", varargin, "char"), 1);
+  if (isempty (firststring))
+    firststring = nargin;
+  endif
 
-  if (firststring > 5)
-    bad_usage = true;
-    return;
-  elseif (firststring == 5)
-    x = varargin{1};
-    y = varargin{2};
-    z = varargin{3};
-    c = varargin{4};
+  switch (firststring)
+    case 5
+      x = varargin{1};
+      y = varargin{2};
+      z = varargin{3};
+      c = varargin{4};
 
-    if (iscomplex (x) || iscomplex (y) || iscomplex (z) || iscomplex (c))
-      error ("mesh: X, Y, Z, C arguments must be real");
-    endif
+      if (iscomplex (x) || iscomplex (y) || iscomplex (z) || iscomplex (c))
+        error ("mesh: X, Y, Z, C arguments must be real");
+      endif
+
+      [z_nr, z_nc] = size (z);
+      [c_nr, c_nc, c_np] = size (c);
+      if (! (z_nr == c_nr && z_nc == c_nc && (c_np == 1 || c_np == 3)))
+        error ("surface: Z and C must have the same size");
+      endif
 
-    [z_nr, z_nc] = size (z);
-    [c_nr, c_nc, c_np] = size (c);
-    if (! (z_nr == c_nr && z_nc == c_nc && (c_np == 1 || c_np == 3)))
-      error ("surface: Z and C must have the same size");
-    endif
-
-    if (isvector (x) && isvector (y) && ismatrix (z))
-      if (rows (z) == length (y) && columns (z) == length (x))
-        x = x(:)';
-        y = y(:);
+      if (isvector (x) && isvector (y) && ismatrix (z))
+        if (rows (z) == length (y) && columns (z) == length (x))
+          x = x(:)';
+          y = y(:);
+        else
+          error ("surface: rows (Z) must be the same as length (Y) and columns (Z) must be the same as length (X)");
+        endif
+      elseif (ismatrix (x) && ismatrix (y) && ismatrix (z))
+        if (! size_equal (x, y, z))
+          error ("surface: X, Y, and Z must have the same dimensions");
+        endif
       else
-        error ("surface: rows (Z) must be the same as length (Y) and columns (Z) must be the same as length (X)");
+        error ("surface: X and Y must be vectors and Z must be a matrix");
       endif
-    elseif (ismatrix (x) && ismatrix (y) && ismatrix (z))
-      if (! size_equal (x, y, z))
-        error ("surface: X, Y, and Z must have the same dimensions");
+
+    case 4
+      x = varargin{1};
+      y = varargin{2};
+      z = varargin{3};
+      c = z;
+
+      if (iscomplex (x) || iscomplex (y) || iscomplex (z))
+        error ("mesh: X, Y, Z arguments must be real");
       endif
-    else
-      error ("surface: X and Y must be vectors and Z must be a matrix");
-    endif
-  elseif (firststring == 4)
-    x = varargin{1};
-    y = varargin{2};
-    z = varargin{3};
-    c = z;
-
-    if (iscomplex (x) || iscomplex (y) || iscomplex (z))
-      error ("mesh: X, Y, Z arguments must be real");
-    endif
 
-    if (isvector (x) && isvector (y) && ismatrix (z))
-      if (rows (z) == length (y) && columns (z) == length (x))
-        x = x(:)';
-        y = y(:);
+      if (isvector (x) && isvector (y) && ismatrix (z))
+        if (rows (z) == length (y) && columns (z) == length (x))
+          x = x(:)';
+          y = y(:);
+        else
+          error ("surface: rows (Z) must be the same as length (Y) and columns (Z) must be the same as length (X)");
+        endif
+      elseif (ismatrix (x) && ismatrix (y) && ismatrix (z))
+        if (! size_equal (x, y, z))
+          error ("surface: X, Y, and Z must have the same dimensions");
+        endif
       else
-        error ("surface: rows (Z) must be the same as length (Y) and columns (Z) must be the same as length (X)");
-      endif
-    elseif (ismatrix (x) && ismatrix (y) && ismatrix (z))
-      if (! size_equal (x, y, z))
-        error ("surface: X, Y, and Z must have the same dimensions");
+        error ("surface: X and Y must be vectors and Z must be a matrix");
       endif
-    else
-      error ("surface: X and Y must be vectors and Z must be a matrix");
-    endif
-  elseif (firststring == 3)
-    z = varargin{1};
-    c = varargin{2};
 
-    if (iscomplex (z) || iscomplex (c))
-      error ("mesh: X, C arguments must be real");
-    endif
+    case 3
+      z = varargin{1};
+      c = varargin{2};
+
+      if (iscomplex (z) || iscomplex (c))
+        error ("mesh: X, C arguments must be real");
+      endif
 
-    if (ismatrix (z) && !isvector (z) && !isscalar (z))
-      [nr, nc] = size (z);
-      x = 1:nc;
-      y = (1:nr)';
-    else
-      error ("surface: Z argument must be a matrix");
-    endif
-  elseif (firststring == 2)
-    z = varargin{1};
-    c = z;
+      if (ismatrix (z) && ! isvector (z) && ! isscalar (z))
+        [nr, nc] = size (z);
+        x = 1:nc;
+        y = (1:nr)';
+      else
+        error ("surface: Z argument must be a matrix");
+      endif
 
-    if (iscomplex (z))
-      error ("mesh: Z argument must be real");
-    endif
+    case 2
+      z = varargin{1};
+      c = z;
+
+      if (iscomplex (z))
+        error ("mesh: Z argument must be real");
+      endif
 
-    if (ismatrix (z) && !isvector (z) && !isscalar (z))
-      [nr, nc] = size (z);
-      x = 1:nc;
-      y = (1:nr)';
-    else
-      error ("surface: Z argument must be a matrix");
-    endif
-  elseif (firststring == 1)
-    x = 1:3;
-    y = x';
-    c = z = eye (3);
-  else
-    bad_usage = true;
-    return;
-  endif
+      if (ismatrix (z) && ! isvector (z) && ! isscalar (z))
+        [nr, nc] = size (z);
+        x = 1:nc;
+        y = (1:nr)';
+      else
+        error ("surface: Z argument must be a matrix");
+      endif
+
+    case 1
+      x = 1:3;
+      y = x';
+      c = z = eye (3);
+
+    otherwise
+      bad_usage = true;
+      return;
+
+  endswitch
 
   if (firststring < nargin)
     other_args = varargin(firststring:end);
--- a/scripts/plot/draw/surfc.m
+++ b/scripts/plot/draw/surfc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -71,9 +71,15 @@
   unwind_protect
     hax = newplot (hax);
 
-    htmp = surface (varargin{:});
+    surfc_props = {"facecolor", "flat"};
+    chararg = find (cellfun ("isclass", varargin, "char"), 1);
+    if (isempty (chararg))
+      htmp = surface (varargin{:}, surfc_props{:});
+    else
+      htmp = surface (varargin{1:chararg-1}, surfc_props{:},
+                      varargin{chararg:end});
+    endif
 
-    set (htmp, "facecolor", "flat");
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on",
--- a/scripts/plot/draw/surfl.m
+++ b/scripts/plot/draw/surfl.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Kai Habel
+## Copyright (C) 2009-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -164,7 +164,7 @@
     endif
 
     vn = get (htmp, "vertexnormals");
-    dar = get (hax, "plotboxaspectratio");
+    dar = get (hax, "dataaspectratio");
     vn(:,:,1) *= dar(1);
     vn(:,:,2) *= dar(2);
     vn(:,:,3) *= dar(3);
@@ -206,8 +206,7 @@
 %! clf;
 %! [X,Y,Z] = sombrero ();
 %! colormap (copper (64));
-%! [az, el] = view ();
-%! surfl (X,Y,Z, [az+225,el], [0.2 0.6 0.4 25]);
+%! surfl (X,Y,Z, [62.50,30], [0.2 0.6 0.4 25]);
 %! shading interp;
 %! title ('surfl() with lighting vector and material properties');
 
--- a/scripts/plot/draw/surfnorm.m
+++ b/scripts/plot/draw/surfnorm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -19,49 +19,56 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} surfnorm (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} surfnorm (@var{z})
+## @deftypefnx {Function File} {} surfnorm (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} surfnorm (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{nx}, @var{ny}, @var{nz}] =} surfnorm (@dots{})
-## @deftypefnx {Function File} {} surfnorm (@var{h}, @dots{})
-## Find the vectors normal to a meshgridded surface.  The meshed gridded
-## surface is defined by @var{x}, @var{y}, and @var{z}.  If @var{x} and
-## @var{y} are not defined, then it is assumed that they are given by
+## Find the vectors normal to a meshgridded surface.
 ##
-## @example
-## @group
-## [@var{x}, @var{y}] = meshgrid (1:rows (@var{z}),
-##                    1:columns (@var{z}));
-## @end group
-## @end example
+## If @var{x} and @var{y} are vectors, then a typical vertex is
+## (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus, columns of @var{z} correspond
+## to different @var{x} values and rows of @var{z} correspond to different
+## @var{y} values.  If only a single input @var{z} is given then @var{x} is
+## taken to be @code{1:rows (@var{z})} and @var{y} is
+## @code{1:columns (@var{z})}.
 ##
 ## If no return arguments are requested, a surface plot with the normal
-## vectors to the surface is plotted.  Otherwise the components of the normal
-## vectors at the mesh gridded points are returned in @var{nx}, @var{ny},
-## and @var{nz}.
+## vectors to the surface is plotted.
+##
+## Any property/value input pairs are assigned to the surface object.
 ##
-## The normal vectors are calculated by taking the cross product of the
-## diagonals of each of the quadrilaterals in the meshgrid to find the
-## normal vectors of the centers of these quadrilaterals.  The four nearest
-## normal vectors to the meshgrid points are then averaged to obtain the
-## normal to the surface at the meshgridded points.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## If output arguments are requested then the components of the normal
+## vectors are returned in @var{nx}, @var{ny}, and @var{nz} and no plot is
+## made.
 ##
 ## An example of the use of @code{surfnorm} is
 ##
 ## @example
 ## surfnorm (peaks (25));
 ## @end example
-## @seealso{surf, quiver3}
+##
+## Algorithm: The normal vectors are calculated by taking the cross product
+## of the diagonals of each of the quadrilaterals in the meshgrid to find the
+## normal vectors of the centers of these quadrilaterals.  The four nearest
+## normal vectors to the meshgrid points are then averaged to obtain the
+## normal to the surface at the meshgridded points.
+##
+## @seealso{isonormals, quiver3, surf, meshgrid}
 ## @end deftypefn
 
 function [Nx, Ny, Nz] = surfnorm (varargin)
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("surfnorm", varargin{:});
 
-  if (nargin != 1 && nargin != 3)
+  if (nargin == 0 || nargin == 2)
     print_usage ();
   endif
 
   if (nargin == 1)
     z = varargin{1};
-    [x, y] = meshgrid (1:rows (z), 1:columns (z));
+    [x, y] = meshgrid (1:columns (z), 1:rows (z));
     ioff = 2;
   else
     x = varargin{1};
@@ -70,22 +77,24 @@
     ioff = 4;
   endif
 
-  if (!ismatrix (z) || isvector (z) || isscalar (z))
-    error ("surfnorm: Z argument must be a matrix");
+  if (iscomplex (z) || iscomplex (x) || iscomplex (y))
+    error ("surfnorm: X, Y, and Z must be 2-D real matrices");
   endif
   if (! size_equal (x, y, z))
     error ("surfnorm: X, Y, and Z must have the same dimensions");
   endif
 
-  ## Make life easier, and avoid having to do the extrapolation later, do
-  ## a simpler linear extrapolation here. This is approximative, and works
-  ## badly for closed surfaces like spheres.
-  xx = [2 .* x(:,1) - x(:,2), x, 2 .* x(:,end) - x(:,end-1)];
-  xx = [2 .* xx(1,:) - xx(2,:); xx; 2 .* xx(end,:) - xx(end-1,:)];
-  yy = [2 .* y(:,1) - y(:,2), y, 2 .* y(:,end) - y(:,end-1)];
-  yy = [2 .* yy(1,:) - yy(2,:); yy; 2 .* yy(end,:) - yy(end-1,:)];
-  zz = [2 .* z(:,1) - z(:,2), z, 2 .* z(:,end) - z(:,end-1)];
-  zz = [2 .* zz(1,:) - zz(2,:); zz; 2 .* zz(end,:) - zz(end-1,:)];
+  ## Do a linear extrapolation for mesh points on the boundary so that the mesh
+  ## is increased by 1 on each side.  This allows each original meshgrid point
+  ## to be surrounded by four quadrilaterals and the same calculation can be
+  ## used for interior and boundary points.  The extrapolation works badly for
+  ## closed surfaces like spheres.
+  xx = [2 * x(:,1) - x(:,2), x, 2 * x(:,end) - x(:,end-1)];
+  xx = [2 * xx(1,:) - xx(2,:); xx; 2 * xx(end,:) - xx(end-1,:)];
+  yy = [2 * y(:,1) - y(:,2), y, 2 * y(:,end) - y(:,end-1)];
+  yy = [2 * yy(1,:) - yy(2,:); yy; 2 * yy(end,:) - yy(end-1,:)];
+  zz = [2 * z(:,1) - z(:,2), z, 2 * z(:,end) - z(:,end-1)];
+  zz = [2 * zz(1,:) - zz(2,:); zz; 2 * zz(end,:) - zz(end-1,:)];
 
   u.x = xx(1:end-1,1:end-1) - xx(2:end,2:end);
   u.y = yy(1:end-1,1:end-1) - yy(2:end,2:end);
@@ -101,17 +110,19 @@
 
   ## Create normal vectors as mesh vectices from normals at mesh centers
   nx = (w.x(1:end-1,1:end-1) + w.x(1:end-1,2:end) +
-        w.x(2:end,1:end-1) + w.x(2:end,2:end)) ./ 4;
+        w.x(2:end,1:end-1) + w.x(2:end,2:end)) / 4;
   ny = (w.y(1:end-1,1:end-1) + w.y(1:end-1,2:end) +
-        w.y(2:end,1:end-1) + w.y(2:end,2:end)) ./ 4;
+        w.y(2:end,1:end-1) + w.y(2:end,2:end)) / 4;
   nz = (w.z(1:end-1,1:end-1) + w.z(1:end-1,2:end) +
-        w.z(2:end,1:end-1) + w.z(2:end,2:end)) ./ 4;
+        w.z(2:end,1:end-1) + w.z(2:end,2:end)) / 4;
 
+  ## FIXME: According to Matlab documentation the vertex normals
+  ##        returned are not normalized.
   ## Normalize the normal vectors
   len = sqrt (nx.^2 + ny.^2 + nz.^2);
-  nx = nx ./ len;
-  ny = ny ./ len;
-  nz = nz ./ len;
+  nx ./= len;
+  ny ./= len;
+  nz ./= len;
 
   if (nargout == 0)
     oldfig = [];
@@ -125,10 +136,26 @@
       old_hold_state = get (hax, "nextplot");
       unwind_protect
         set (hax, "nextplot", "add");
-        plot3 ([x(:)'; x(:).' + nx(:).' ; NaN(size(x(:).'))](:),
-               [y(:)'; y(:).' + ny(:).' ; NaN(size(y(:).'))](:),
-               [z(:)'; z(:).' + nz(:).' ; NaN(size(z(:).'))](:),
-               varargin{ioff:end});
+
+        ## FIXME: Scale unit normals by data aspect ratio in order for
+        ##        normals to appear correct.
+        ##daratio = daspect (hax);
+        ##daspect ("manual");
+        ##len = norm (daratio);
+        ## This assumes an even meshgrid which isn't a great assumption
+        ##dx = x(1,2) - x(1,1);
+        ##dy = y(2,1) - y(1,1);
+        ##nx *= daratio(1);
+        ##ny *= daratio(2);
+        ##nz *= daratio(3);
+        ##len = sqrt (nx.^2 + ny.^2 + nz.^2);
+        ##nx ./= len;
+        ##ny ./= len;
+        ##nz ./= len;
+        plot3 ([x(:).'; x(:).' + nx(:).' ; NaN(size(x(:).'))](:),
+               [y(:).'; y(:).' + ny(:).' ; NaN(size(y(:).'))](:),
+               [z(:).'; z(:).' + nz(:).' ; NaN(size(z(:).'))](:),
+               "r");
       unwind_protect_cleanup
         set (hax, "nextplot", old_hold_state);
       end_unwind_protect
@@ -150,17 +177,25 @@
 %!demo
 %! clf;
 %! colormap ('default');
-%! [x, y, z] = peaks (10);
-%! surfnorm (x, y, z);
+%! surfnorm (peaks (32));
+%! shading interp;
+%! title ({'surfnorm() shows surface and normals at each vertex', ...
+%!         'peaks() function with 32 faces'});
 
 %!demo
 %! clf;
 %! colormap ('default');
-%! surfnorm (peaks (10));
+%! [x, y, z] = sombrero (10);
+%! surfnorm (x, y, z);
 
-%!demo
-%! clf;
-%! colormap ('default');
-%! surfnorm (peaks (32));
-%! shading interp;
+## Test input validation
+%!error surfnorm ()
+%!error surfnorm (1,2)
+%!error <X, Y, and Z must be 2-D real matrices> surfnorm (i)
+%!error <X, Y, and Z must be 2-D real matrices> surfnorm (i, 1, 1)
+%!error <X, Y, and Z must be 2-D real matrices> surfnorm (1, i, 1)
+%!error <X, Y, and Z must be 2-D real matrices> surfnorm (1, 1, i)
+%!error <X, Y, and Z must have the same dimensions> surfnorm ([1 2], 1, 1)
+%!error <X, Y, and Z must have the same dimensions> surfnorm (1, [1 2], 1)
+%!error <X, Y, and Z must have the same dimensions> surfnorm (1, 1, [1 2])
 
--- a/scripts/plot/draw/tetramesh.m
+++ b/scripts/plot/draw/tetramesh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Martin Helm
+## Copyright (C) 2012-2015 Martin Helm
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 ## @qcode{"visible"} property @qcode{"on"} or @qcode{"off"}.
 ##
 ## Type @code{demo tetramesh} to see examples on using @code{tetramesh}.
-## @seealso{trimesh, delaunay3, delaunayn, patch}
+## @seealso{trimesh, delaunay, delaunayn, patch}
 ## @end deftypefn
 
 ## Author: Martin Helm <martin@mhelm.de>
@@ -130,7 +130,7 @@
 %! x = [x(:); 0];
 %! y = [y(:); 0];
 %! z = [z(:); 0];
-%! tetra = delaunay3 (x, y, z);
+%! tetra = delaunay (x, y, z);
 %! X = [x(:) y(:) z(:)];
 %! colormap (jet (64));
 %! h = tetramesh (tetra, X);
@@ -147,7 +147,7 @@
 %! x = [x(:); 0];
 %! y = [y(:); 0];
 %! z = [z(:); 0];
-%! tetra = delaunay3 (x, y, z);
+%! tetra = delaunay (x, y, z);
 %! X = [x(:) y(:) z(:)];
 %! colormap (gray (256));
 %! tetramesh (tetra, X, 21:20:241, 'EdgeColor', 'w');
--- a/scripts/plot/draw/trimesh.m
+++ b/scripts/plot/draw/trimesh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -109,7 +109,7 @@
 %! tri = delaunay (x(:), y(:));
 %! trimesh (tri, x(:), y(:), z(:));
 
-%% Test input validation
+## Test input validation
 %!error trimesh ()
 %!error trimesh (1)
 %!error trimesh (1,2)
--- a/scripts/plot/draw/triplot.m
+++ b/scripts/plot/draw/triplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/draw/trisurf.m
+++ b/scripts/plot/draw/trisurf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -162,7 +162,7 @@
 %! tri = delaunay (x, y);
 %! trisurf (tri, x, y, z, 'facecolor', 'interp', 'edgecolor', 'k');
 
-%% Test input validation
+## Test input validation
 %!error trisurf ()
 %!error trisurf (1)
 %!error trisurf (1,2)
--- a/scripts/plot/draw/waterfall.m
+++ b/scripts/plot/draw/waterfall.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Mike Miller
+## Copyright (C) 2013-2015 Mike Miller
 ##
 ## This file is part of Octave.
 ##
deleted file mode 100644
--- a/scripts/plot/module.mk
+++ /dev/null
@@ -1,221 +0,0 @@
-FCN_FILE_DIRS += plot
-
-plot_GEN_FCN_FILES = \
-  plot/gnuplot_binary.m
-
-GEN_FCN_FILES += $(plot_GEN_FCN_FILES)
-
-plot_PRIVATE_FCN_FILES = \
-  plot/private/__actual_axis_position__.m \
-  plot/private/__add_datasource__.m \
-  plot/private/__add_default_menu__.m \
-  plot/private/__axes_limits__.m \
-  plot/private/__axis_label__.m \
-  plot/private/__bar__.m \
-  plot/private/__clabel__.m \
-  plot/private/__contour__.m \
-  plot/private/__default_plot_options__.m \
-  plot/private/__errcomm__.m \
-  plot/private/__errplot__.m \
-  plot/private/__ezplot__.m \
-  plot/private/__file_filter__.m \
-  plot/private/__fltk_file_filter__.m \
-  plot/private/__fltk_ginput__.m \
-  plot/private/__fltk_print__.m \
-  plot/private/__getlegenddata__.m \
-  plot/private/__ghostscript__.m \
-  plot/private/__gnuplot_get_var__.m \
-  plot/private/__gnuplot_ginput__.m \
-  plot/private/__gnuplot_has_feature__.m \
-  plot/private/__gnuplot_has_terminal__.m\
-  plot/private/__gnuplot_open_stream__.m \
-  plot/private/__gnuplot_print__.m \
-  plot/private/__gnuplot_version__.m \
-  plot/private/__go_draw_axes__.m \
-  plot/private/__go_draw_figure__.m \
-  plot/private/__interp_cube__.m \
-  plot/private/__is_function__.m \
-  plot/private/__line__.m \
-  plot/private/__marching_cube__.m \
-  plot/private/__next_line_color__.m \
-  plot/private/__next_line_style__.m \
-  plot/private/__patch__.m \
-  plot/private/__pie__.m \
-  plot/private/__plt__.m \
-  plot/private/__pltopt__.m \
-  plot/private/__print_parse_opts__.m \
-  plot/private/__quiver__.m \
-  plot/private/__scatter__.m \
-  plot/private/__stem__.m \
-  plot/private/__tight_eps_bbox__.m \
-  plot/private/__uigetdir_fltk__.m \
-  plot/private/__uigetfile_fltk__.m \
-  plot/private/__uiputfile_fltk__.m \
-  plot/private/__uiobject_split_args__.m
-
-plot_FCN_FILES = \
-  plot/__gnuplot_drawnow__.m \
-  plot/__plt_get_axis_arg__.m \
-  plot/allchild.m \
-  plot/ancestor.m \
-  plot/area.m \
-  plot/axes.m \
-  plot/axis.m \
-  plot/bar.m \
-  plot/barh.m \
-  plot/box.m \
-  plot/caxis.m \
-  plot/cla.m \
-  plot/clabel.m \
-  plot/clf.m \
-  plot/close.m \
-  plot/closereq.m \
-  plot/colorbar.m \
-  plot/colstyle.m \
-  plot/comet.m \
-  plot/comet3.m \
-  plot/compass.m \
-  plot/contour.m \
-  plot/contour3.m \
-  plot/contourc.m \
-  plot/contourf.m \
-  plot/copyobj.m \
-  plot/cylinder.m \
-  plot/daspect.m \
-  plot/diffuse.m \
-  plot/ellipsoid.m \
-  plot/errorbar.m \
-  plot/ezcontour.m \
-  plot/ezcontourf.m \
-  plot/ezmesh.m \
-  plot/ezmeshc.m \
-  plot/ezplot.m \
-  plot/ezplot3.m \
-  plot/ezpolar.m \
-  plot/ezsurf.m \
-  plot/ezsurfc.m \
-  plot/feather.m \
-  plot/figure.m \
-  plot/fill.m \
-  plot/findall.m \
-  plot/findfigs.m \
-  plot/findobj.m \
-  plot/fplot.m \
-  plot/gca.m \
-  plot/gcbf.m \
-  plot/gcbo.m \
-  plot/gcf.m \
-  plot/gco.m \
-  plot/ginput.m \
-  plot/graphics_toolkit.m \
-  plot/grid.m \
-  plot/gtext.m \
-  plot/guidata.m \
-  plot/guihandles.m \
-  plot/hdl2struct.m \
-  plot/hggroup.m \
-  plot/hidden.m \
-  plot/hist.m \
-  plot/hold.m \
-  plot/isaxes.m \
-  plot/isfigure.m \
-  plot/ishghandle.m \
-  plot/ishold.m \
-  plot/isocolors.m \
-  plot/isonormals.m \
-  plot/isosurface.m \
-  plot/isprop.m \
-  plot/legend.m \
-  plot/line.m \
-  plot/linkprop.m \
-  plot/loglog.m \
-  plot/loglogerr.m \
-  plot/mesh.m \
-  plot/meshc.m \
-  plot/meshgrid.m \
-  plot/meshz.m \
-  plot/ndgrid.m \
-  plot/newplot.m \
-  plot/orient.m \
-  plot/pareto.m \
-  plot/patch.m \
-  plot/pbaspect.m \
-  plot/pcolor.m \
-  plot/peaks.m \
-  plot/pie.m \
-  plot/pie3.m \
-  plot/plot.m \
-  plot/plot3.m \
-  plot/plotmatrix.m \
-  plot/plotyy.m \
-  plot/polar.m \
-  plot/print.m \
-  plot/printd.m \
-  plot/quiver.m \
-  plot/quiver3.m \
-  plot/rectangle.m \
-  plot/refresh.m \
-  plot/refreshdata.m \
-  plot/ribbon.m \
-  plot/rose.m \
-  plot/saveas.m \
-  plot/scatter.m \
-  plot/scatter3.m \
-  plot/semilogx.m \
-  plot/semilogxerr.m \
-  plot/semilogy.m \
-  plot/semilogyerr.m \
-  plot/shading.m \
-  plot/shg.m \
-  plot/shrinkfaces.m \
-  plot/slice.m \
-  plot/sombrero.m \
-  plot/specular.m \
-  plot/sphere.m \
-  plot/stairs.m \
-  plot/stem.m \
-  plot/stem3.m \
-  plot/stemleaf.m \
-  plot/struct2hdl.m \
-  plot/subplot.m \
-  plot/surf.m \
-  plot/surface.m \
-  plot/surfc.m \
-  plot/surfl.m \
-  plot/surfnorm.m \
-  plot/tetramesh.m \
-  plot/text.m \
-  plot/title.m \
-  plot/trimesh.m \
-  plot/triplot.m \
-  plot/trisurf.m \
-  plot/uicontextmenu.m \
-  plot/uicontrol.m \
-  plot/uigetdir.m \
-  plot/uigetfile.m \
-  plot/uimenu.m \
-  plot/uipanel.m \
-  plot/uipushtool.m \
-  plot/uiputfile.m \
-  plot/uiresume.m \
-  plot/uitoggletool.m \
-  plot/uitoolbar.m \
-  plot/uiwait.m \
-  plot/view.m \
-  plot/waitbar.m \
-  plot/waitforbuttonpress.m \
-  plot/waterfall.m \
-  plot/whitebg.m \
-  plot/xlabel.m \
-  plot/xlim.m \
-  plot/ylabel.m \
-  plot/ylim.m \
-  plot/zlabel.m \
-  plot/zlim.m \
-  $(plot_PRIVATE_FCN_FILES)
-
-FCN_FILES += $(plot_FCN_FILES)
-
-PKG_ADD_FILES += plot/PKG_ADD
-
-DIRSTAMP_FILES += plot/$(octave_dirstamp)
--- a/scripts/plot/util/__actual_axis_position__.m
+++ b/scripts/plot/util/__actual_axis_position__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Ben Abbott
+## Copyright (C) 2009-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -66,7 +66,7 @@
                              axis_obj.plotboxaspectratio(3)/sqrt(2)];
     endif
     orig_aspect_ratio_2d = pos_in_pixels(3:4);
-    rel_aspect_ratio_2d =  aspect_ratio_2d ./ orig_aspect_ratio_2d;
+    rel_aspect_ratio_2d = aspect_ratio_2d ./ orig_aspect_ratio_2d;
     rel_aspect_ratio_2d = rel_aspect_ratio_2d ./ max (rel_aspect_ratio_2d);
     if (rel_aspect_ratio_2d(1) < rel_aspect_ratio_2d(2));
       dx = (1.0 - rel_aspect_ratio_2d(1)) * pos_in_pixels(3);
@@ -84,3 +84,6 @@
   endif
 endfunction
 
+
+## No test coverage for internal function.  It is tested through calling fcn.
+%!assert (1)
--- a/scripts/plot/util/__default_plot_options__.m
+++ b/scripts/plot/util/__default_plot_options__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -33,3 +33,13 @@
 
 endfunction
 
+
+%!test
+%! options = __default_plot_options__ ();
+%! assert (isfield (options, "key"));
+%! assert (options.key, "");
+%! assert (options.color, []);
+%! assert (options.linestyle, []);
+%! assert (options.marker, []);
+%! assert (options.errorstyle, []);
+
--- a/scripts/plot/util/__gnuplot_drawnow__.m
+++ b/scripts/plot/util/__gnuplot_drawnow__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -77,7 +77,7 @@
     term = gnuplot_default_term (plot_stream);
     if (strcmp (term, "dumb"))
       ## popen2 eats stdout of gnuplot, use temporary file instead
-      dumb_tmp_file = tmpnam ();
+      dumb_tmp_file = tempname ();
       enhanced = gnuplot_set_term (plot_stream(1), new_stream, h,
                                    term, dumb_tmp_file);
     else
@@ -209,9 +209,11 @@
               size_str = sprintf ("size %gin,%gin", gnuplot_size);
             case "dumb"
               new_stream = 1;
-              if (!isempty (getenv ("COLUMNS")) && !isempty (getenv ("LINES")))
+              if (! isempty (getenv ("COLUMNS"))
+                  && ! isempty (getenv ("LINES")))
                 ## Let dumb use full text screen size (minus prompt lines).
-                n = sprintf ("%i", -2 - length (find (sprintf ("%s", PS1) == "\n")));
+                n = sprintf ("%i",
+                             -2 - length (find (sprintf ("%s", PS1) == "\n")));
                 ## n = the number of times \n appears in PS1
                 size_str = ["size " getenv("COLUMNS") "," getenv("LINES") n];
               else
@@ -297,8 +299,8 @@
       ## If "set termoption dashed" isn't available add "dashed" option
       ## to the "set terminal ..." command, if it is supported.
       if (any (strcmp (term, {"aqua", "cgm", "eepic", "emf", "epslatex", ...
-                              "fig", "pcl5", "mp", "next", "openstep", "pdf", ...
-                              "pdfcairo", "pngcairo", "postscript", ...
+                              "fig", "pcl5", "mp", "next", "openstep", ...
+                              "pdf", "pdfcairo", "pngcairo", "postscript", ...
                               "pslatex", "pstext", "svg", "tgif", "x11"})))
         term_str = [term_str " dashed"];
       endif
--- a/scripts/plot/util/__next_line_color__.m
+++ b/scripts/plot/util/__next_line_color__.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Carl Osterwisch
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2013-2015 Carl Osterwisch
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -52,3 +52,22 @@
 
 endfunction
 
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ();
+%!   set (hax, "colororder", [1 0 0; 0 1 0; 0 0 1]);
+%!   hold on;
+%!   h = plot (1:5,1:5,'o', 1:4,1:4, "x", 1:3,1:3, "d");
+%!   assert (get (h, "color"), {[1 0 0]; [0 1 0]; [0 0 1]});
+%!   cla (hax);
+%!   hold all;
+%!   h1 = plot (1:5,1:5,'o');
+%!   h2 = plot (1:4,1:4, "x");
+%!   h3 = plot (1:3,1:3, "d");
+%!   assert (get ([h1;h2;h3], "color"), {[1 0 0]; [0 1 0]; [0 0 1]});
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
--- a/scripts/plot/util/__next_line_style__.m
+++ b/scripts/plot/util/__next_line_style__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 David Bateman
+## Copyright (C) 2010-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -56,3 +56,23 @@
 
 endfunction
 
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ();
+%!   set (hax, "colororder", [0 0 1]);
+%!   set (hax, "linestyleorder", {"-", ":", "--"});
+%!   hold on;
+%!   h = plot (1:5,1:5, 1:4,1:4, 1:3,1:3);
+%!   assert (get (h, "linestyle"), {"-"; ":"; "--"});
+%!   cla (hax);
+%!   hold all;
+%!   h1 = plot (1:5,1:5);
+%!   h2 = plot (1:4,1:4);
+%!   h3 = plot (1:3,1:3);
+%!   assert (get ([h1;h2;h3], "linestyle"), {"-"; ":"; "--"});
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
--- a/scripts/plot/util/__plt_get_axis_arg__.m
+++ b/scripts/plot/util/__plt_get_axis_arg__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/__pltopt__.m
+++ b/scripts/plot/util/__pltopt__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -233,3 +233,39 @@
 
 endfunction
 
+
+## Only cursory testing.  Real testing done by appearance of plots.
+%test
+%! opts = __pltopt__ ("abc", "");
+%! assert (opts.color, []);
+%! assert (opts.linestyle, []);
+%! assert (opts.marker, []);
+%! assert (opts.key, "");
+%!test
+%! opts = __pltopt__ ("abc", "r:x");
+%! assert (opts.color, [1 0 0]);
+%! assert (opts.linestyle, ":");
+%! assert (opts.marker, "x");
+%!test
+%! opts = __pltopt__ ("abc", "2square");
+%! assert (opts.color, [0 1 0]);
+%! assert (opts.linestyle, "none");
+%! assert (opts.marker, "s");
+%!test
+%! opts = __pltopt__ ("abc", ";Title;");
+%! assert (opts.key, "Title");
+%! assert (opts.color, []);
+%! assert (opts.linestyle, []);
+%! assert (opts.marker, []);
+%!test
+%! opts = __pltopt__ ("__errplot__", "~>r");
+%! assert (opts.errorstyle, "~>");
+%! assert (opts.color, [1 0 0 ]);
+%! assert (opts.linestyle, []);
+%! assert (opts.marker, []);
+
+## Test input validation
+%!error <argument must be a character string or cell array> __pltopt__ ("abc", 1)
+%!error <unfinished key label> __pltopt__ ("abc", "rx;my_title", true)
+%!error <unrecognized format character: 'u'> __pltopt__ ("abc", "u", true)
+
--- a/scripts/plot/util/allchild.m
+++ b/scripts/plot/util/allchild.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/ancestor.m
+++ b/scripts/plot/util/ancestor.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Michael Goffioul
+## Copyright (C) 2007-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/axes.m
+++ b/scripts/plot/util/axes.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
 ## of children.  This causes @var{hax} to be displayed on top of any other
 ## axes objects (Z-order stacking).
 ##
-## @seealso {gca, set, get}
+## @seealso{gca, set, get}
 ## @end deftypefn
 
 ## Author: jwe
@@ -42,7 +42,7 @@
 function h = axes (varargin)
 
   if (nargin == 0 || nargin > 1)
-    ## Create an axes object.
+    ## Parent figure
     idx = find (strcmpi (varargin(1:2:end), "parent"), 1, "first");
     if (! isempty (idx) && length (varargin) >= 2*idx)
       cf = varargin{2*idx};
@@ -50,25 +50,40 @@
     else
       cf = gcf ();
     endif
+
+    ## If there is an annotation axes currently on top of the figure
+    ## children stack, we will put it back on top
+    do_restack = false;
+    ch = allchild (cf);
+    hax = ch(isaxes (ch));
+    idx = find (strcmp (get (hax, "tag"), "scribeoverlay"));
+    if (idx == 1)
+      hover = hax(idx);
+      do_restack = true;
+    endif
+
+    ## Create an axes object.
     htmp = __go_axes__ (cf, varargin{:});
     if (__is_handle_visible__ (htmp))
       set (ancestor (cf, "figure"), "currentaxes", htmp);
     endif
+
+    ## Restack if necessary
+    if (do_restack)
+      restack_axes (hover, cf);
+    endif
   else
     ## ARG is axes handle.
     htmp = varargin{1};
     if (isscalar (htmp) && isaxes (htmp))
+      cf = ancestor (htmp, "figure");
       if (__is_handle_visible__ (htmp))
-        parent = ancestor (htmp, "figure");
-        set (0, "currentfigure", parent);
-        set (parent, "currentaxes", htmp);
+        set (0, "currentfigure", cf);
+        set (cf, "currentaxes", htmp);
+      endif
 
-        ## restack
-        ch = get (parent, "children")(:);
-        idx = (ch == htmp);
-        ch = [ch(idx); ch(!idx)];
-        set (parent, "children", ch);
-      endif
+      ## restack
+      restack_axes (htmp, cf);
     else
       error ("axes: H must be a scalar axes handle");
     endif
@@ -80,3 +95,15 @@
 
 endfunction
 
+function restack_axes (h, cf)
+  show = get (0, "showhiddenhandles");
+  set (0, "showhiddenhandles", "on");
+  unwind_protect
+    ch = get (cf, "children");
+    hax = ch(isaxes (ch));
+    ch(isaxes (ch)) = [h; hax(hax != h)];
+    set (cf, "children", ch);
+  unwind_protect_cleanup
+    set (0, "showhiddenhandles", show);
+  end_unwind_protect
+endfunction
--- a/scripts/plot/util/cla.m
+++ b/scripts/plot/util/cla.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott
+## Copyright (C) 2008-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/clf.m
+++ b/scripts/plot/util/clf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -76,6 +76,10 @@
   else
     ## Select only the chilren with visible handles.
     delete (get (hfig, "children"));
+
+    ## Also delete the annotation axes
+    hover = findall (hfig, "-depth", 1, "tag", "scribeoverlay");
+    delete (hover);
   endif
 
   if (nargout > 0)
@@ -106,6 +110,7 @@
 %! end_unwind_protect
 
 %!xtest
+%! set (0, "defaultfigurevisible", "off")
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   plot (1:10);
@@ -119,6 +124,7 @@
 %!   assert (isempty (get (gcf, "children")));
 %!   assert (get (hf, "papertype"), "usletter");
 %! unwind_protect_cleanup
+%!   set (0, "defaultfigurevisible", "remove")
 %!   close (hf);
 %! end_unwind_protect
 
--- a/scripts/plot/util/close.m
+++ b/scripts/plot/util/close.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2002-2013 John W. Eaton
+## Copyright (C) 2002-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,8 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} close
 ## @deftypefnx {Command} {} close (@var{h})
+## @deftypefnx {Command} {} close @var{h}
 ## @deftypefnx {Command} {} close all
 ## @deftypefnx {Command} {} close all hidden
+## @deftypefnx {Command} {} close all force
 ## Close figure window(s).
 ##
 ## When called with no arguments, close the current figure.  This is equivalent
@@ -33,6 +35,10 @@
 ## If the argument @qcode{"all hidden"} is given then all figures, including
 ## hidden ones, are closed.
 ##
+## If the argument @qcode{"all force"} is given then all figures are closed
+## even when @qcode{"closerequestfcn"} has been altered to prevent closing
+## the window.
+##
 ## Implementation Note: @code{close} operates by calling the function specified
 ## by the @qcode{"closerequestfcn"} property for each figure.  By default, the
 ## function @code{closereq} is used.  It is possible that the function invoked
@@ -63,19 +69,25 @@
     if (ischar (arg1) && strcmpi (arg1, "all"))
       figs = (get (0, "children"))';
       figs = figs(isfigure (figs));
-    elseif (isfigure (arg1))
-      figs = arg1;
-    elseif (isempty (arg1))
-      figs = [];
+    elseif (any (isfigure (arg1)))
+      figs = arg1(isfigure (arg1));
     else
       error ('close: first argument must be "all" or a figure handle');
     endif
-  elseif (   ischar (arg1) && strcmpi (arg1, "all")
-          && ischar (arg2) && strcmpi (arg2, "hidden"))
-    figs = (allchild (0))';
-    figs = figs(isfigure (figs));
+  elseif (ischar (arg2)
+          && (strcmpi (arg2, "hidden") || strcmpi (arg2, "force")))
+    if (ischar (arg1) && strcmpi (arg1, "all"))
+      figs = (allchild (0))';
+      figs = figs(isfigure (figs));
+    else
+      error ('close: first argument must be "all" with "hidden" or "force"');
+    endif
+    if (strcmpi (arg2, "force"))
+      delete (figs);
+      return;
+    endif
   else
-    error ('close: expecting argument to be "all hidden"');
+    error ('close: second argument must be "hidden" or "force"');
   endif
 
   for h = figs
@@ -101,9 +113,13 @@
 %!   endif
 %! end_unwind_protect
 
+## Test input validation
 %!error close (1,2,3)
 %!error <first argument must be "all" or a figure> close ({"all"})
 %!error <first argument must be "all" or a figure> close ("all_and_more")
 %!error <first argument must be "all" or a figure> close (-1)
-%!error <expecting argument to be "all hidden"> close "all" hid"
+%!error <first argument must be "all" with "hidden"> close foo hidden
+%!error <first argument must be "all" with "hidden"> close foo force
+%!error <second argument must be "hidden"> close all hid
+%!error <second argument must be "hidden"> close all for
 
--- a/scripts/plot/util/closereq.m
+++ b/scripts/plot/util/closereq.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/colstyle.m
+++ b/scripts/plot/util/colstyle.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 David Bateman
+## Copyright (C) 2012-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -36,10 +36,7 @@
   try
     opt = __pltopt__ ("colstyle", style);
     l = opt.linestyle;
-    c = opt.color;
-    m = opt.marker;
-    msg = [];
-    switch (c)
+    switch (opt.color)
       case [0 0 0]
         c = "k";
       case [1 0 0]
@@ -56,7 +53,11 @@
         c = "c";
       case [0 1 1]
         c = "w";
+      otherwise
+        c = opt.color;
     endswitch
+    m = opt.marker;
+    msg = [];
   catch
     l = c = m = [];
     msg = lasterr ();
@@ -83,8 +84,8 @@
 %! [l, c, m, msg] = colstyle ("~");
 %! assert (msg, "colstyle: unrecognized format character: '~'");
 
-%% Test input validation
+## Test input validation
 %!error colstyle ()
 %!error colstyle (1, 2)
-%!error colstyle (1.5)
+%!error <STYLE must be a string> colstyle (1.5)
 
--- a/scripts/plot/util/copyobj.m
+++ b/scripts/plot/util/copyobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 pdiribarne
+## Copyright (C) 2012-2015 pdiribarne
 ##
 ## This file is part of Octave.
 ##
@@ -46,7 +46,7 @@
 
   ## current figure and axes
   cf = gcf ();
-  ca = gca ();
+  ca = get (cf, "currentaxes");
 
   ## compatibility of input handles
   kididx = find (strcmp (alltypes, get (horig).type));
@@ -65,53 +65,67 @@
 
   ## reset current figure (and eventually axes) to original
   set (0, "currentfigure", cf);
-  if (get (hnew, "parent") == cf)
+  if (ancestor (hnew, "figure") == cf && ! isempty (ca))
     set (cf, "currentaxes", ca)
   endif
 
 endfunction
 
 
+## Absurd number of drawnow() function calls in demos is due to problem
+## with FLTK backend which is not respecting the set ('position') call.
+
 %!demo
-%! hdl = figure (1234);
-%! clf;
+%! hobj = figure ('name', 'Original', 'numbertitle', 'off');
 %! hold on;
 %! x = 1:10;
 %! y = x.^2;
 %! dy = 2 * (.2 * x);
 %! y2 = (x - 3).^2;
-%! hg = errorbar (x, y, dy,'#~');
+%! hg = errorbar (x, y, dy);
 %! set (hg, 'marker', '^', 'markerfacecolor', rand (1,3));
 %! plot (x, y2, 'ok-');
 %! legend ('errorbar', 'line');
-%! hnew = copyobj (hdl);
+%! drawnow ();
+%! pos = get (hobj, 'position');
+%! scrn = get (0, 'screensize');
+%! set (hobj, 'position', [scrn(3)/2-pos(3)-10, scrn(4)/2-pos(4)/2, pos(3:4)]);
+%! drawnow ();
+%! hnew = copyobj (hobj);
+%! drawnow ();
+%! set (hnew, 'name', 'Copyobj');
+%! drawnow ();
+%! set (hnew, 'position', [scrn(3)/2, scrn(4)/2-pos(4)/2, pos(3:4)]);
+%! drawnow ();
 
-%!#demo
-%! ## FIXME: This demo fails for an obscure reason.
-%! ## It appears that there is something wrong with Octave code for patches.
-%! ## This demo must remain commented out until patch() has been reworked.
-%! unwind_protect
-%!   hdl = figure (1234);
-%!   clf;
-%!   subplot (2,2,1);
-%!   hold on;
-%!   contourf (rand (10, 10));
-%!   colorbar ();
-%!   subplot (2,2,2);
-%!   quiver (rand (10, 10), rand (10, 10));
-%!   subplot (2,2,3);
-%!   colormap (jet (64));
-%!   hold on;
-%!   sombrero ();
-%!   colorbar ('peer', gca, 'NorthOutside');
-%!   subplot (2,2,4);
-%!   imagesc (rand (30, 30));
-%!   text (15, 15, 'Rotated text', ...
-%!         'HorizontAlalignment', 'Center', 'Rotation', 30);
-%!   hnew = copyobj (hdl);
-%! unwind_protect_cleanup
-%!   close all;
-%! end_unwind_protect
+%!demo
+%! hobj = figure ('name', 'Original', 'numbertitle', 'off');
+%! subplot (2,2,1);
+%! hold on;
+%! contourf (rand (10, 10));
+%! colorbar ();
+%! subplot (2,2,2);
+%! quiver (rand (10, 10), rand (10, 10));
+%! subplot (2,2,3);
+%! colormap (jet (64));
+%! hold on;
+%! sombrero ();
+%! colorbar ('peer', gca, 'NorthOutside');
+%! subplot (2,2,4);
+%! imagesc (rand (30, 30));
+%! text (15, 15, 'Rotated text', ...
+%!       'HorizontAlalignment', 'Center', 'Rotation', 30);
+%! drawnow ();
+%! pos = get (hobj, 'position');
+%! scrn = get (0, 'screensize');
+%! set (hobj, 'position', [scrn(3)/2-pos(3)-10, scrn(4)/2-pos(4)/2, pos(3:4)]);
+%! drawnow ();
+%! hnew = copyobj (hobj);
+%! drawnow ();
+%! set (hnew, 'name', 'Copyobj');
+%! drawnow ();
+%! set (hnew, 'position', [scrn(3)/2, scrn(4)/2-pos(4)/2, pos(3:4)]);
+%! drawnow ();
 
 %!testif HAVE_MAGICK
 %! toolkit = graphics_toolkit ();
@@ -134,8 +148,8 @@
 %!   s1 = hdl2struct (h1);
 %!   h2 = struct2hdl (s1);
 %!   s2 = hdl2struct (h2);
-%!   png1 = strcat (tmpnam (), ".png");
-%!   png2 = strcat (tmpnam (), ".png");
+%!   png1 = [tempname() ".png"];
+%!   png2 = [tempname() ".png"];
 %!   unwind_protect
 %!     print (h1, png1);
 %!     [img1, map1, alpha1] = imread (png1);
@@ -154,3 +168,17 @@
 %!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
+%!test
+%! unwind_protect
+%!   tag = "foo";
+%!   hf = figure ("visible", "off");
+%!   hax = axes ("tag", tag);
+%!   hpa = patch ();
+%!   set (hpa, "facecolor", [.5 .5 .5], "tag", tag)
+%!   hax2 = copyobj (hax, hf);
+%!   assert (get (hax2, "tag"), tag)
+%!   hpa2 = get (hax2, "children");
+%!   assert (get (hpa2, "facecolor"), [.5 .5 .5])
+%! unwind_protect_cleanup
+%!   close (hf)
+%! end_unwind_protect
--- a/scripts/plot/util/figure.m
+++ b/scripts/plot/util/figure.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -83,17 +83,9 @@
   endif
 
   if (init_new_figure)
-    if (ismac () && strcmp (graphics_toolkit (), "fltk"))
-      ## FIXME: Hack for fltk-aqua to work around bug #31931
-      f = __go_figure__ (f);
-      drawnow ();
-      if (! isempty (varargin))
-        set (f, varargin{:});
-      endif
-    else
-      f = __go_figure__ (f, varargin{:});
-    endif
+    f = __go_figure__ (f, varargin{:});
     __add_default_menu__ (f);
+    __add_default_mouse_modes__ (f);
   elseif (nargs > 0)
     set (f, varargin{:});
   endif
@@ -112,6 +104,23 @@
 
 endfunction
 
+function __add_default_mouse_modes__ (fig)
+
+  set (fig, "__pan_mode__", struct ("Enable", "off",
+                                    "Motion", "both",
+                                    "FigureHandle", fig));
+
+  set (fig, "__rotate_mode__", struct ("Enable", "off",
+                                       "RotateStyle", "box",
+                                       "FigureHandle", fig));
+
+  set (fig, "__zoom_mode__", struct ("Enable", "off",
+                                     "Motion", "both",
+                                     "Direction", "in",
+                                     "FigureHandle", fig));
+
+endfunction
+
 
 %!test
 %! hf = figure ("visible", "off");
--- a/scripts/plot/util/findall.m
+++ b/scripts/plot/util/findall.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -56,7 +56,7 @@
 %! unwind_protect
 %!   h = findall (hf);
 %!   all_handles(1) = {"figure"};
-%!   all_handles(2:12,1) = {"uimenu"};
+%!   all_handles(2:18,1) = {"uimenu"};
 %!   assert (get (h, "type"), all_handles);
 %! unwind_protect_cleanup
 %!   close (hf);
--- a/scripts/plot/util/findfigs.m
+++ b/scripts/plot/util/findfigs.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2008 Bill Denney
-## Copyright (C) 2012-2013 Carnë Draug
+## Copyright (C) 2012-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/findobj.m
+++ b/scripts/plot/util/findobj.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Ben Abbott
+## Copyright (C) 2007-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -100,9 +100,6 @@
         if (strcmpi (varargin{n1}, "flat"))
           depth = 0;
           n1 = n1 + 1;
-        elseif (strcmpi (varargin{n1}, "-depth"))
-          depth = varargin{n1+1};
-          n1 = n1 + 2;
         endif
       else
         error ("findobj: properties and options must be strings");
@@ -119,6 +116,7 @@
   regularexpression = [];
   property          = [];
   logicaloperator   = {};
+  extranegation     = [];
   pname             = {};
   pvalue            = {};
   np = 1;
@@ -128,9 +126,23 @@
   while (na <= numel (args))
     regularexpression(np) = 0;
     property(np) = 0;
+    if (numel (extranegation) < np)
+      extranegation(np) = false;
+    endif
     logicaloperator{np} = "and";
     if (ischar (args{na}))
-      if (strcmpi (args{na}, "-regexp"))
+      if (strcmpi (args{na}, "-property"))
+        if (na + 1 <= numel (args))
+          na = na + 1;
+          property(np) = 1;
+          pname{np} = args{na};
+          na = na + 1;
+          pvalue{np} = [];
+          np = np + 1;
+        else
+          error ("findobj: inconsistent number of arguments");
+        endif
+      elseif (strcmpi (args{na}, "-regexp"))
         if (na + 2 <= numel (args))
           regularexpression(np) = 1;
           na = na + 1;
@@ -142,14 +154,11 @@
         else
           error ("findobj: inconsistent number of arguments");
         endif
-      elseif (strcmpi (args{na}, "-property"))
+      elseif (strcmpi (args{na}, "-depth"))
         if (na + 1 <= numel (args))
           na = na + 1;
-          property(np) = 1;
-          pname{np} = args{na};
+          depth = args{na};
           na = na + 1;
-          pvalue{np} = [];
-          np = np + 1;
         else
           error ("findobj: inconsistent number of arguments");
         endif
@@ -177,10 +186,8 @@
           error ("findobj: inconsistent number of arguments");
         endif
       else
-        ## This is sloppy ... but works like Matlab.
         if (strcmpi (args{na}, "-not"))
-          h = [];
-          return;
+          extranegation(np) = true;
         endif
         na = na + 1;
       endif
@@ -220,11 +227,11 @@
             match(nh,np) = true;
           else
             if (regularexpression(np))
-              foo = regexp (p.(pname{np}), pvalue{np}, "once");
-              if (isempty (foo))
+              found = regexp (p.(pname{np}), pvalue{np}, "once");
+              if (isempty (found))
                 match(nh,np) = false;
               else
-                match(nh,np) = foo;
+                match(nh,np) = true;
               endif
             elseif (numel (p.(pname{np})) == numel (pvalue{np}))
               if (ischar (pvalue{np}) && ischar (p.(pname{np})))
@@ -241,6 +248,9 @@
         else
           match(nh,np) = false;
         endif
+        if (extranegation(np))
+          match(nh,np) = ! match(nh,np);
+        endif
       endfor
     endfor
 
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/frame2im.m
@@ -0,0 +1,106 @@
+## Copyright (C) 2014-2015 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {[@var{x}, @var{map}] =} frame2im (@var{f})
+## Convert movie frame to indexed image.
+##
+## A movie frame is simply a struct with the fields @qcode{"cdata"} and
+## @qcode{"colormap"}.
+##
+## Support for N-dimensional images or movies is given when @var{f} is a
+## struct array.  In such cases, @var{x} will be a @nospell{MxNx1xK or MxNx3xK}
+## for indexed and RGB movies respectively, with each frame concatenated on
+## the 4th dimension.
+##
+## @seealso{im2frame}
+## @end deftypefn
+
+## Author: Carnë Draug <carandraug@octave.org>
+
+function [x, map] = frame2im (frame)
+
+  if (nargin != 1)
+    print_usage ();
+  elseif (! all (isfield (frame, {"cdata", "colormap"})))
+    error ("frame2im: F must be a struct with the fields colormap and cdata");
+  endif
+
+  n = numel (frame);
+  if (n == 0)
+    error ("frame2im: FRAME is empty");
+  else
+    x   = [frame.cdata];
+    map = frame(1).colormap;
+  endif
+
+  ## support for N dimensional images if we receive a struct array
+  if (n > 1)
+    x = reshape (x, rows (x), columns (x) / n, n, size (frame(1).cdata, 3));
+    x = permute (x, [1 2 4 3]);
+  endif
+
+endfunction
+
+
+%!function f = make_rgb_f ()
+%! f = randi ([0 255], 10, 20, 3);
+%!endfunction
+
+%!function f = make_ind_f ()
+%! f = randi ([1 100], 10, 20, 3);
+%!endfunction
+
+%!test
+%! x = make_ind_f ();
+%! cmap = jet (100);
+%! frame = struct ("cdata", x, "colormap", cmap);
+%! [rx, rcmap] = frame2im (frame);
+%! assert (rx, x);
+%! assert (rcmap, cmap);
+
+%!test
+%! rgb = make_rgb_f ();
+%! frame = struct ("cdata", rgb, "colormap", []);
+%! [rrgb, rcmap] = frame2im (frame);
+%! assert (rrgb, rgb);
+%! assert (rcmap, []);
+
+%!test
+%! f1 = make_rgb_f ();
+%! f2 = make_rgb_f ();
+%! f3 = make_rgb_f ();
+%! f4 = make_rgb_f ();
+%! rgb = {f1, f2, f3, f4};
+%! movie = struct ("cdata", rgb, "colormap", []);
+%! [rx, rcmap] = frame2im (movie);
+%! assert (rx, cat (4, f1, f2, f3, f4));
+%! assert (rcmap, []);
+
+%!test
+%! f1 = make_ind_f ();
+%! f2 = make_ind_f ();
+%! f3 = make_ind_f ();
+%! f4 = make_ind_f ();
+%! ind = {f1, f2, f3, f4};
+%! cmap = jet (100);
+%! movie = struct ("cdata", ind, "colormap", cmap);
+%! [rx, rcmap] = frame2im (movie);
+%! assert (rx, cat (4, f1, f2, f3, f4));
+%! assert (rcmap, cmap);
+
--- a/scripts/plot/util/gca.m
+++ b/scripts/plot/util/gca.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/gcbf.m
+++ b/scripts/plot/util/gcbf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Michael Goffioul
+## Copyright (C) 2008-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/gcbo.m
+++ b/scripts/plot/util/gcbo.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Michael Goffioul
+## Copyright (C) 2008-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/gcf.m
+++ b/scripts/plot/util/gcf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/gco.m
+++ b/scripts/plot/util/gco.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Michael Goffioul
+## Copyright (C) 2012-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/ginput.m
+++ b/scripts/plot/util/ginput.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -30,31 +30,118 @@
 ## was clicked in the units of the current axes.  The return value @var{button}
 ## is 1, 2, or 3 for the left, middle, or right button.  If a key is pressed
 ## the ASCII value is returned in @var{button}.
+##
+## Implementation Note: @code{ginput} is intenteded for 2-D plots.  For 3-D
+## plots see the @var{currentpoint} property of the current axes which can be
+## transformed with knowledge of the current @code{view} into data units.
 ## @seealso{gtext, waitforbuttonpress}
 ## @end deftypefn
 
-function varargout = ginput (n)
+function varargout = ginput (n = -1)
 
   if (nargin > 1)
     print_usage ();
   endif
 
-  f = gcf ();
-  a = gca ();  # Create an axis, if necessary
+  ## Create an axis, if necessary.
+  fig = gcf ();
+  ax = gca ();
   drawnow ();
-  toolkit = get (f, "__graphics_toolkit__");
+
+  if (isempty (ax))
+    error ("ginput: must have at least one axes");
+  endif
 
-  varargout = cell (1, nargout);
-  if (nargin == 0)
-    [varargout{:}] = feval (["__" toolkit "_ginput__"], f);
-  else
-    [varargout{:}] = feval (["__" toolkit "_ginput__"], f, n);
+  toolkit = get (fig, "__graphics_toolkit__");
+  toolkit_fcn = sprintf ("__%s_ginput__", toolkit);
+
+  if (exist (toolkit_fcn))
+    varargout = cell (1, nargout);
+    if (nargin == 0)
+      [varargout{:}] = feval (toolkit_fcn, fig);
+    else
+      [varargout{:}] = feval (toolkit_fcn, fig, n);
+    endif
+    return
   endif
 
+  x = y = button = [];
+  ginput_accumulator (0, 0, 0, 0);  # initialize accumulator
+
+  orig_windowbuttondownfcn = get (fig, "windowbuttondownfcn");
+  orig_ginput_keypressfcn = get (fig, "keypressfcn");
+
+  unwind_protect
+
+    set (fig, "windowbuttondownfcn", @ginput_windowbuttondownfcn);
+    set (fig, "keypressfcn", @ginput_keypressfcn);
+
+    do
+      if (strcmp (toolkit, "fltk"))
+        __fltk_check__ ();
+      endif
+
+      ## Release CPU.
+      sleep (0.01);
+
+      [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0);
+    until ((n > -1 && n0 >= n) || n0 < 0)
+
+    if (n0 > n)
+      ## More clicks than requested due to double-click or too fast clicking
+      x = x(1:n);
+      y = y(1:n);
+      button = button(1:n);
+    endif
+
+  unwind_protect_cleanup
+    set (fig, "windowbuttondownfcn", orig_windowbuttondownfcn);
+    set (fig, "keypressfcn", orig_ginput_keypressfcn);
+  end_unwind_protect
+
+  varargout = {x, y, button};
+
+endfunction
+
+function [x, y, n, button] = ginput_accumulator (mode, xn, yn, btn)
+  persistent x y n button;
+
+  if (mode == 0)
+    ## Initialize.
+    x = y = button = [];
+    n = 0;
+  elseif (mode == 1)
+    ## Append mouse button or key press.
+    x = [x; xn];
+    y = [y; yn];
+    button = [button; btn];
+    n += 1;
+  elseif (mode == 2)
+    ## The end due to Enter.
+    n = -1;
+ endif
+
+endfunction
+
+function ginput_windowbuttondownfcn (src, button)
+  point = get (gca (), "currentpoint");
+  ginput_accumulator (1, point(1,1), point(1,2), button);
+endfunction
+
+function ginput_keypressfcn (src, evt)
+  point = get (gca (), "currentpoint");
+  if (strcmp (evt.Key, "return"))
+    ## Enter key stops ginput.
+    ginput_accumulator (2, NaN, NaN, NaN);
+  else
+    character = evt.Character;
+    if (! isempty (character))
+      ginput_accumulator (1, point(1,1), point(1,2), uint8 (character(1)));
+    endif
+  endif
 endfunction
 
 
 ## Remove from test statistics.  No real tests possible.
 %!test
 %! assert (1);
-
--- a/scripts/plot/util/gnuplot_binary.in
+++ b/scripts/plot/util/gnuplot_binary.in
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 John W. Eaton
+## Copyright (C) 2008-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/graphics_toolkit.m
+++ b/scripts/plot/util/graphics_toolkit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Michael Goffioul
+## Copyright (C) 2008-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
@@ -44,6 +44,17 @@
 
   if (nargout > 0 || nargin == 0)
     retval = get (0, "defaultfigure__graphics_toolkit__");
+    ## Handle case where graphics_toolkit has been called before any plotting
+    if (isempty (retval))
+      toolkits = available_graphics_toolkits ();
+      if (any (strcmp ("qt", toolkits)))
+        retval = "qt";
+      elseif (any (strcmp ("fltk", toolkits)))
+        retval = "fltk";
+      elseif (! isempty (toolkits))
+        retval = toolkits{1};
+      endif
+    endif
   endif
 
   if (nargin == 0)
--- a/scripts/plot/util/hdl2struct.m
+++ b/scripts/plot/util/hdl2struct.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 pdiribarne
+## Copyright (C) 2012-2015 pdiribarne
 ##
 ## This file is part of Octave.
 ##
@@ -23,7 +23,7 @@
 ##
 ## The fields of the structure @var{s} are @qcode{"type"}, @qcode{"handle"},
 ## @qcode{"properties"}, @qcode{"children"}, and @qcode{"special"}.
-## @seealso{struct2hdl, findobj}
+## @seealso{struct2hdl, hgsave, findobj}
 ## @end deftypefn
 
 ## Author: pdiribarne <pdiribarne@new-host.home>
@@ -31,7 +31,7 @@
 
 function s = hdl2struct (h)
 
-  if (nargin != 1 || !ishandle (h))
+  if (nargin != 1 || ! ishandle (h))
     print_usage ();
   endif
 
@@ -43,8 +43,8 @@
   ## main object
   main = get (h);
   s.handle = h;
-  s.type =  main.type;
-  s.properties  = getprops (h);
+  s.type = main.type;
+  s.properties = getprops (h);
   s.children = [];
   s.special = [];
 
--- a/scripts/plot/util/hggroup.m
+++ b/scripts/plot/util/hggroup.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Michael Goffioul
+## Copyright (C) 2008-2015 Michael Goffioul
 ##
 ## This file is part of Octave.
 ##
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/hgload.m
@@ -0,0 +1,69 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{h} =} hgload (@var{filename})
+## Load the graphics object in @var{filename} into the graphics handle @var{h}.
+##
+## If @var{filename} has no extension, Octave will try to find the file with
+## and without the standard extension of @file{.ofig}.
+## @seealso{hgsave, struct2hdl}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function h = hgload (filename)
+
+  ## Check input arguments
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  ## Check file existence
+  [~, ~, ext] = fileparts (filename);
+  if (isempty (ext))
+    if (! isempty (file_in_loadpath ([filename ".ofig"])))
+      filename = [filename ".ofig"];
+    elseif (isempty (file_in_loadpath (filename)))
+      error ("hgload: unable to locate file %s", filename);
+    endif
+  else
+    if (isempty (file_in_loadpath (filename)))
+      error ("hgload: unable to locate file %s", filename);
+    endif
+  endif
+
+  ## Load the handle
+  try
+    stmp = load (filename, "s_oct40");
+  catch
+    error ("hgload: could not load hgsave-formatted object in file %s", filename);
+  end_try_catch
+
+  h = struct2hdl (stmp.s_oct40);
+
+endfunction
+
+
+## Functional test for hgload/hgsave pair is in hgsave.m
+
+## Test input validation
+%!error hgload ()
+%!error hgload (1, 2)
+%!error <unable to locate file> hgload ("%%_A_REALLY_UNLIKELY_FILENAME_%%")
+
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/hgsave.m
@@ -0,0 +1,128 @@
+## Copyright (C) 2014-2015 Massimiliano Fasi
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} hgsave (@var{filename})
+## @deftypefnx {Function File} {} hgsave (@var{h}, @var{filename})
+## @deftypefnx {Function File} {} hgsave (@var{h}, @var{filename}, @var{fmt})
+## Save the graphics handle @var{h} to the file @var{filename} in the format
+## @var{fmt}.
+##
+## If unspecified, @var{h} is the current figure as returned by @code{gcf}.
+## When @var{filename} does not have an extension the default filename
+## extension @file{.ofig} will be appended.  If present, @var{fmt} should
+## should be one of the following:
+##
+## @itemize @bullet
+## @item @option{-binary}, @option{-float-binary}
+##
+## @item @option{-hdf5}, @option{-float-hdf5}
+##
+## @item @option{-V7}, @option{-v7}, @code{-7}, @option{-mat7-binary}
+##
+## @item @option{-V6}, @option{-v6}, @code{-6}, @option{-mat6-binary}
+##
+## @item @option{-text}
+##
+## @item @option{-zip}, @option{-z}
+## @end itemize
+##
+## When producing graphics for final publication use @code{print} or
+## @code{saveas}.  When it is important to be able to continue to edit a
+## figure as an Octave object, use @code{hgsave}/@code{hgload}.
+## @seealso{hgload, hdl2struct, saveas, print}
+## @end deftypefn
+
+## Author: Massimiliano Fasi
+
+function hgsave (h, filename, fmt = "-binary")
+
+  if (nargin < 1 || nargin > 3)
+    print_usage ();
+  endif
+
+  ## Check input arguments
+  if (nargin == 1 && ischar (h))
+    filename = h;
+    h = get (0, "currentfigure");
+    if (isempty (h))
+      error ("hgsave: No current figure to save");
+    endif
+  elseif (! (ishandle (h) && ischar (filename)))
+    print_usage ();
+  endif
+
+  ## Check file extension
+  [~, ~, ext] = fileparts (filename);
+  if (isempty (ext))
+    filename = [filename ".ofig"];
+  endif
+
+  s_oct40 = hdl2struct (h);
+  save (fmt, filename, "s_oct40");
+
+endfunction
+
+
+%!testif HAVE_MAGICK
+%! toolkit = graphics_toolkit ();
+%! graphics_toolkit ("gnuplot");
+%! unwind_protect
+%!   h1 = figure ("visible", "off");
+%!   x = 0:0.1:2*pi;
+%!   y1 = sin (x);
+%!   y2 = exp (x - 1);
+%!   ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
+%!   xlabel ("X");
+%!   ylabel (ax(1), "Axis 1");
+%!   ylabel (ax(2), "Axis 2");
+%!   axes (ax(1));
+%!   text (0.5, 0.5, "Left Axis", ...
+%!         "color", [0 0 1], "horizontalalignment", "center");
+%!   axes (ax(2));
+%!   text (4.5, 80, "Right Axis", ...
+%!         "color", [0 0.5 0], "horizontalalignment", "center");
+%!   ftmp = [tempname() ".ofig"];
+%!   png1 = [tempname() ".png"];
+%!   png2 = [tempname() ".png"];
+%!   unwind_protect
+%!     hgsave (h1, ftmp);
+%!     print (h1, png1);
+%!     [img1, map1, alpha1] = imread (png1);
+%!     h2 = hgload (ftmp);
+%!     print (h2, png2);
+%!     [img2, map2, alpha2] = imread (png2);
+%!   unwind_protect_cleanup
+%!     unlink (ftmp);
+%!     unlink (png1);
+%!     unlink (png2);
+%!   end_unwind_protect
+%!   assert (img1, img2);
+%!   assert (map1, map2);
+%!   assert (alpha1, alpha2);
+%! unwind_protect_cleanup
+%!   close (h1);
+%!   close (h2);
+%!   graphics_toolkit (toolkit);
+%! end_unwind_protect
+
+## Test input validation
+%!error hgsave ()
+%!error hgsave (1, 2, 3, 4)
+%!error hgsave ("abc", "def")
+
--- a/scripts/plot/util/hold.m
+++ b/scripts/plot/util/hold.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -56,9 +56,8 @@
   if (nargin > 0 && isscalar (varargin{1}) && isaxes (varargin{1}))
     hax = varargin{1};
     varargin(1) = [];
-    nargs = numel (varargin);
-    ## FIXME: Should this be ancestor (hax, "parent")?
-    hfig = get (hax, "parent");
+    nargs = numel (varargin);    
+    hfig = ancestor (hax, "figure");
   elseif (nargin > 0 && numel (varargin{1}) > 1 && ishandle (varargin{1}))
     print_usage ();
   else
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/im2frame.m
@@ -0,0 +1,102 @@
+## Copyright (C) 2014-2015 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} im2frame (@var{rgb})
+## @deftypefnx {Function File} {} im2frame (@var{x}, @var{map})
+## Convert image to movie frame.
+##
+## A movie frame is simply a struct with the fields @qcode{"cdata"} and
+## @qcode{"colormap"}.
+##
+## Support for N-dimensional images is given when each image projection,
+## matrix sizes of @nospell{MxN and MxNx3} for RGB images, is concatenated on
+## the fourth dimension.  In such cases, the returned value is a struct array.
+##
+## @seealso{frame2im}
+## @end deftypefn
+
+## Author: Carnë Draug <carandraug@octave.org>
+
+function [frame] = im2frame (x, map = [])
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  elseif (ndims (x) > 4)
+    error ("im2frame: X and RGB must be a single image");
+  endif
+
+  ## Matlab documentation is incorrect.  Singleton 3rd dimension will error
+  ## without cmap (no use of default cmap), and cmap is added to the frame
+  ## even when image is RGB.
+
+  nchannels = size (x, 3);
+  if (nchannels == 3)
+    ## RGB image, do nothing
+  elseif (nchannels == 1)
+    if (nargin < 2)
+      error ("im2frame: MAP required for indexed images");
+    endif
+    [x, map] = ind2x ("im2frame", x, map);
+  else
+    error ("im2frame: first argument must be indexed or RGB image");
+  endif
+
+  ## support N dimensional images and return a struct array
+  if (ndims (x) == 4)
+    x = reshape (num2cell (x, [1 2 3]), 1, size (x, 4));
+  endif
+
+  frame = struct ("cdata", x, "colormap", map);
+endfunction
+
+
+%!function f = make_rgb_f ()
+%! f = randi ([0 255], 10, 20, 3);
+%!endfunction
+
+%!function f = make_ind_f ()
+%! f = randi ([1 100], 10, 20, 3);
+%!endfunction
+
+%!test
+%! rgb = make_rgb_f ();
+%! assert (im2frame (rgb), struct ("cdata", rgb, "colormap", []));
+
+%!test
+%! ind = make_ind_f ();
+%! cmap = bone (100);
+%! assert (im2frame (ind, cmap), struct ("cdata", ind, "colormap", cmap));
+
+%!test
+%! rgb1 = make_rgb_f ();
+%! rgb2 = make_rgb_f ();
+%! rgb3 = make_rgb_f ();
+%! rgb4 = make_rgb_f ();
+%! assert (im2frame (cat (4, rgb1, rgb2, rgb3, rgb4)),
+%!         struct ("cdata", {rgb1, rgb2, rgb3, rgb4}, "colormap", []));
+
+%!test
+%! ind1 = make_ind_f ();
+%! ind2 = make_ind_f ();
+%! ind3 = make_ind_f ();
+%! ind4 = make_ind_f ();
+%! cmap = bone (100);
+%! assert (im2frame (cat (4, ind1, ind2, ind3, ind4), cmap),
+%!         struct ("cdata", {ind1, ind2, ind3, ind4}, "colormap", cmap));
+
--- a/scripts/plot/util/isaxes.m
+++ b/scripts/plot/util/isaxes.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Rik Wehbring
+## Copyright (C) 2013-2015 Rik Wehbring
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/isfigure.m
+++ b/scripts/plot/util/isfigure.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/ishghandle.m
+++ b/scripts/plot/util/ishghandle.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/ishold.m
+++ b/scripts/plot/util/ishold.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
         ax = get (fig, "currentaxes");
       elseif (strcmp (get (h, "type"), "axes"))
         ax = h;
-        fig = get (ax, "parent");
+        fig = ancestor (ax, "figure");
       else
         error ("ishold: H must be an axes or figure graphics handle");
       endif
--- a/scripts/plot/util/isprop.m
+++ b/scripts/plot/util/isprop.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -17,11 +17,14 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{res} =} isprop (@var{h}, "@var{prop}")
-## Return true if @var{prop} is a property of the object with handle @var{h}.
+## @deftypefn {Function File} {@var{res} =} isprop (@var{obj}, "@var{prop}")
+## Return true if @var{prop} is a property of the object @var{obj}.
 ##
-## @var{h} may also be an array of handles in which case @var{res} will be a
+## @var{obj} may also be an array of objects in which case @var{res} will be a
 ## logical array indicating whether each handle has the property @var{prop}.
+##
+## For plotting, @var{obj} is a handle to a graphics object.  Otherwise,
+## @var{obj} should be an instance of a class.
 ## @seealso{get, set, ismethod, isobject}
 ## @end deftypefn
 
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/linkaxes.m
@@ -0,0 +1,167 @@
+## Copyright (C) 2014-2015 Willem Atsma
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} linkaxes (@var{hax})
+## @deftypefnx {Function File} {} linkaxes (@var{hax}, @var{optstr})
+## Link the axis limits of 2-D plots such that a change in one is
+## propagated to the others.
+##
+## The axes handles to be linked are passed as the first argument @var{hax}.
+##
+## The optional second argument is a string which defines which axis limits
+## will be linked.  The possible values for @var{optstr} are:
+##
+## @table @asis
+## @item @qcode{"x"}
+## Link x-axes
+##
+## @item @qcode{"y"}
+## Link y-axes
+##
+## @item @qcode{"xy"} (default)
+## Link both axes
+##
+## @item @qcode{"off"}
+## Turn off linking
+## @end table
+##
+## If unspecified the default is to link both X and Y axes.
+##
+## When linking, the limits from the first axes in @var{hax} are applied to the
+## other axes in the list.  Subsequent changes to any one of the axes will be
+## propagated to the others.
+##
+## @seealso{linkprop, addproperty}
+## @end deftypefn
+
+## Author: Willem Atsma willem.atsma at tanglebridge.com
+## Created: 2014-03-18
+
+function linkaxes (hax, optstr = "xy")
+
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
+  if (numel (hax) < 2)
+    error ("linkaxes: HAX must contain at least 2 handles");
+  elseif (! all (isaxes (hax(:))))
+    error ("linkaxes: HAX must be a vector of axes handles");
+  endif
+
+  ## Check if axes are linked already and clear if found.
+  ## Otherwise, add the necessary linkaxes_data property.
+  for i = 1:length (hax)
+    if (isprop (hax(i), "linkaxes_data"))
+      hld = get (hax(i), "linkaxes_data");
+      try
+        rmappdata (hld, "linkprop_data");
+      end_try_catch
+    else
+      addproperty ("linkaxes_data", hax(i), "any");
+    endif
+  endfor
+
+  switch (optstr)
+    case "x"
+      hlink = linkprop (hax, "xlim");
+    case "y"
+      hlink = linkprop (hax, "ylim");
+    case "xy"
+      hlink = linkprop (hax, {"xlim" "ylim"});
+    case "off"
+      ## do nothing - link already deleted
+      hlink = [];
+    otherwise
+      error ("linkaxes: unrecognized OPTSTR '%s'", optstr);
+  endswitch
+
+  if (! isempty (hlink))
+    setappdata (hax(1), "linkprop_data", hlink);
+    set (hax, "linkaxes_data", hax(1));
+  else
+    set (hax, "linkaxes_data", []);
+  endif
+
+endfunction
+
+
+%!demo
+%! clf;
+%! hax1 = subplot (3,1,1);
+%! bar (rand (4, 1), 'facecolor', 'r');
+%! hax2 = subplot (3,1,2);
+%! bar (5*rand (4, 1), 'facecolor', 'g');
+%! hax3 = subplot (3,1,3);
+%! bar (10*rand (4, 1), 'facecolor', 'b');
+%! input ('Type <RETURN> to link axes');
+%! linkaxes ([hax1, hax2, hax3]);
+%! input ('Type <RETURN> to change ylim');
+%! ylim (hax3, [0 10]);
+
+%!test
+%! hf1 = figure ("visible", "off");
+%! hax1 = axes ();
+%! plot (1:10);
+%! hf2 = figure ("visible", "off");
+%! hax2 = axes ();
+%! plot (10:-1:1, "-*g");
+%! hf3 = figure ("visible", "off");
+%! hax3 = axes ();
+%! plot (1:10:100, "-xb");
+%!  unwind_protect
+%!   linkaxes ([hax1, hax2, hax3]);
+%!   ## Test initial values taken from first object in list
+%!   assert (xlim (hax3), [0 10]);
+%!   assert (ylim (hax3), [0 10]);
+%!   ## Test linking
+%!   xlim (hax2, [2 8]);
+%!   assert (xlim (hax1), [2 8]);
+%!   assert (xlim (hax3), [2 8]);
+%!   ylim (hax3, "auto");
+%!   assert (ylim (hax1), [0 100]);
+%!   assert (ylim (hax2), [0 100]);
+%!   ## Test re-linking removes old link
+%!   linkaxes ([hax1, hax2]);
+%!   ylim (hax3, [0 50]);
+%!   assert (ylim (hax1), [0 100]);
+%!   assert (ylim (hax2), [0 100]);
+%!   xlim (hax1, [0 4]);
+%!   assert (xlim (hax2), [0 4]);
+%!   ## Test linking of remaining objects after deletion of one object
+%!   linkaxes ([hax1, hax2, hax3]);
+%!   xlim (hax2, [0 1]);
+%!   assert (xlim (hax1), [0 1]);
+%!   assert (xlim (hax3), [0 1]);
+%!   delete (hax2);
+%!   xlim (hax3, [0 2]);
+%!   assert (xlim (hax1), [0 2]);
+%!   ## Test deletion of link
+%!   linkaxes ([hax1, hax3], "off");
+%!   xlim (hax3, [0 3]);
+%!   assert (xlim (hax1), [0 2]);
+%!  unwind_protect_cleanup
+%!   close ([hf1 hf2 hf3]);
+%!  end_unwind_protect
+
+## Test input validation
+%!error linkaxes ()
+%!error linkaxes (1,2,3)
+%!error <HAX must be a vector of axes handles> linkaxes ([pi, e])
+
--- a/scripts/plot/util/linkprop.m
+++ b/scripts/plot/util/linkprop.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -17,14 +17,24 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{hlink} =} linkprop (@var{h}, @var{prop})
-## @deftypefnx {Function File} {@var{hlink} =} linkprop (@var{h}, @{@var{prop1}, @var{prop2}, @dots{}@})
-## Link graphics object properties, such that a change in one is
-## propagated to the others.
+## @deftypefn  {Function File} {@var{hlink} =} linkprop (@var{h}, "@var{prop}")
+## @deftypefnx {Function File} {@var{hlink} =} linkprop (@var{h}, @{"@var{prop1}", "@var{prop2}", @dots{}@})
+## Link graphic object properties, such that a change in one is propagated to
+## the others.
+##
+## The input @var{h} is a vector of graphic handles to link.
 ##
-## @var{prop} can be a string for a single property, or a cell array of strings
-## for multiple properties.  @var{h} is an array of graphics handles which
-## will have their properties linked.
+## @var{prop} may be a string when linking a single property, or a cell array
+## of strings for multiple properties.  During the linking process all
+## properties in @var{prop} will initially be set to the values that exist on
+## the first object in the list @var{h}.
+##
+## The function returns @var{hlink} which is a special object describing the
+## link.  As long as the reference @var{hlink} exists the link between graphic
+## objects will be active.  This means that @var{hlink} must be preserved in
+## a workspace variable, a global variable, or otherwise stored using a
+## function such as @code{setappdata}, @code{guidata}.  To unlink properties,
+## execute @code{clear @var{hlink}}.
 ##
 ## An example of the use of @code{linkprop} is
 ##
@@ -41,62 +51,122 @@
 ## @end group
 ## @end example
 ##
+## @seealso{linkaxes}
 ## @end deftypefn
 
 function hlink = linkprop (h, prop)
+
+  if (nargin != 2)
+    print_usage ();
+  endif
+
+  if (numel (h) < 2)
+    error ("linkprop: H must contain at least 2 handles");
+  elseif (! all (ishandle (h(:))))
+    error ("linkprop: invalid graphic handle in input H");
+  endif
+
   if (ischar (prop))
     prop = {prop};
-  elseif (!iscellstr (prop))
-    error ("linkprop: properties must be a string or cell string array");
+  elseif (! iscellstr (prop))
+    error ("linkprop: PROP must be a string or cell string array");
   endif
 
+  h = h(:)';  # set() prefers column vectors
+  ## Match all objects to the first one in the list before linking
+  for j = 1 : numel (prop)
+    set (h(2:end), prop{j}, get (h(1), prop{j}));
+  endfor
+
+  ## Add listeners to all objects
   for i = 1 : numel (h)
     for j = 1 : numel (prop)
-      addlistener (h(i), prop{j}, {@update_prop, h, prop{j}});
+      addlistener (h(i), prop{j},
+                   {@update_prop, [h(1:i-1),h(i+1:end)], prop{j}});
     endfor
   endfor
 
-  ## This should be an object that when destroyed removes the links
-  ## The below is not quite right. As when you call "clear hlink" the
-  ## hggroup continues to exist.
-  hlink = hggroup ();
-  set (hlink, "deletefcn", {@delete_prop, h, prop});
+  hlink = onCleanup (@() delete_linkprop (h, prop));
+
 endfunction
 
-function update_prop (h, d, hlist, prop)
+function update_prop (h, ~, hlist, prop)
   persistent recursion = false;
 
   ## Don't allow recursion
   if (! recursion)
     unwind_protect
       recursion = true;
-      val = get (h, prop);
-      for hh = hlist(:)'
-        if (hh != h)
-          oldval = get (hh, prop);
-          if (! isequal (val, oldval))
-            set (hh, prop, val);
-          endif
-        endif
-      endfor
+      set (hlist(ishandle (hlist)), prop, get (h, prop));
     unwind_protect_cleanup
       recursion = false;
     end_unwind_protect
   endif
 endfunction
 
-function delete_prop (h, d, hlist, prop)
-  ## FIXME. Actually need to delete the linked properties.
-  ## However, only warn if the graphics objects aren't being deleted.
-  warn = false;
-  for h = hlist(:)'
-    if (ishandle (h) && !strcmpi (get (h, "beingdeleted"), "on"))
-      warn = true;
-      break;
+function delete_linkprop (hlist, prop)
+
+  for i = 1 : numel (hlist)
+    if (ishandle (hlist(i)))
+      for j = 1 : numel (prop)
+        dellistener (hlist(i), prop{j}),
+      endfor
     endif
   endfor
-  if (warn)
-    warning ("linkprop: can not remove linked properties");
-  endif
+
 endfunction
 
+
+%!demo
+%! clf;
+%! x = 0:0.1:10;
+%! subplot (1,2,1);
+%! h1 = plot (x, sin (x), 'r');
+%! subplot (1,2,2);
+%! h2 = plot (x, cos (x), 'b');
+%! input ('Type <RETURN> to link plots');
+%! hlink = linkprop ([h1, h2], {'color', 'linestyle'});
+%! input ('Type <RETURN> to change color');
+%! set (h1, 'color', 'green');
+%! input ('Type <RETURN> to change linestyle');
+%! set (h2, 'linestyle', '--');
+
+%!test
+%! hf1 = figure ("visible", "off");
+%! hl1 = plot (1:10, "or");
+%! hf2 = figure ("visible", "off");
+%! hl2 = plot (1:10, "-*g");
+%! hf3 = figure ("visible", "off");
+%! hl3 = plot (1:10, "-xb");
+%! unwind_protect
+%!   hlink = linkprop ([hl1, hl2, hl3], {"color", "linestyle"});
+%!   ## Test initial values taken from first object in list
+%!   assert (get (hl2, "color"), [1 0 0]);
+%!   assert (get (hl3, "linestyle"), "none");
+%!   ## Test linking
+%!   set (hl2, "color", "b");
+%!   assert (get (hl1, "color"), [0 0 1]);
+%!   assert (get (hl3, "color"), [0 0 1]);
+%!   set (hl3, "linestyle", "--");
+%!   assert (get (hl1, "linestyle"), "--");
+%!   assert (get (hl2, "linestyle"), "--");
+%!   ## Test linking of remaining objects after deletion of one object
+%!   delete (hl2);
+%!   set (hl1, "linestyle", ":");
+%!   assert (get (hl3, "linestyle"), ":");
+%!   ## Test deletion of link
+%!   clear hlink;
+%!   set (hl1, "color", "g");
+%!   assert (get (hl3, "color"), [0 0 1]);
+%! unwind_protect_cleanup
+%!   close ([hf1 hf2 hf3]);
+%! end_unwind_protect
+
+## Test input validation
+%!error linkprop ()
+%!error linkprop (1)
+%!error linkprop (1,2,3)
+%!error <H must contain at least 2 handles> linkprop (1, "color")
+%!error <invalid graphic handle in input H> linkprop ([pi, e], "color")
+%!error <PROP must be a string or cell string array> linkprop ([0, 0], 1)
+
--- a/scripts/plot/util/meshgrid.m
+++ b/scripts/plot/util/meshgrid.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -126,7 +126,7 @@
 %! assert (XX1, XX2);
 %! assert (YY1, YY2);
 
-%% Test input validation
+## Test input validation
 %!error meshgrid ()
 %!error meshgrid (1,2,3,4)
 %!error <X and Y must be vectors> meshgrid (ones (2,2), 1:3)
--- a/scripts/plot/util/module.mk
+++ b/scripts/plot/util/module.mk
@@ -7,8 +7,6 @@
 
 plot_util_PRIVATE_FCN_FILES = \
   plot/util/private/__add_default_menu__.m \
-  plot/util/private/__fltk_ginput__.m \
-  plot/util/private/__fltk_print__.m \
   plot/util/private/__ghostscript__.m \
   plot/util/private/__gnuplot_get_var__.m \
   plot/util/private/__gnuplot_ginput__.m \
@@ -19,6 +17,7 @@
   plot/util/private/__gnuplot_version__.m \
   plot/util/private/__go_draw_axes__.m \
   plot/util/private/__go_draw_figure__.m \
+  plot/util/private/__opengl_print__.m \
   plot/util/private/__print_parse_opts__.m \
   plot/util/private/__tight_eps_bbox__.m
 
@@ -38,6 +37,7 @@
   plot/util/findall.m \
   plot/util/findfigs.m \
   plot/util/findobj.m \
+  plot/util/frame2im.m \
   plot/util/gca.m \
   plot/util/gcbf.m \
   plot/util/gcbo.m \
@@ -48,28 +48,36 @@
   plot/util/graphics_toolkit.m \
   plot/util/hdl2struct.m \
   plot/util/hggroup.m \
+  plot/util/hgload.m \
+  plot/util/hgsave.m \
   plot/util/hold.m \
+  plot/util/im2frame.m \
   plot/util/isaxes.m \
   plot/util/isfigure.m \
   plot/util/ishghandle.m \
   plot/util/ishold.m \
   plot/util/isprop.m \
+  plot/util/linkaxes.m \
   plot/util/linkprop.m \
   plot/util/meshgrid.m \
   plot/util/ndgrid.m \
   plot/util/newplot.m \
   plot/util/__next_line_color__.m \
   plot/util/__next_line_style__.m \
+  plot/util/pan.m \
   plot/util/__plt_get_axis_arg__.m \
   plot/util/__pltopt__.m \
   plot/util/printd.m \
   plot/util/print.m \
   plot/util/refreshdata.m \
   plot/util/refresh.m \
+  plot/util/rotate.m \
+  plot/util/rotate3d.m \
   plot/util/saveas.m \
   plot/util/shg.m \
   plot/util/struct2hdl.m \
   plot/util/subplot.m \
+  plot/util/zoom.m \
   $(plot_util_PRIVATE_FCN_FILES)
 
 FCN_FILES += $(plot_util_FCN_FILES)
--- a/scripts/plot/util/ndgrid.m
+++ b/scripts/plot/util/ndgrid.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Alexander Barth
+## Copyright (C) 2006-2015 Alexander Barth
 ##
 ## This file is part of Octave.
 ##
@@ -121,7 +121,7 @@
 %!assert (ndgrid ([]), zeros(0,1))
 %!assert (ndgrid ([], []), zeros(0,0))
 
-%% Test input validation
+## Test input validation
 %!error ndgrid ()
 %!error <wrong number of input arguments> [a,b,c] = ndgrid (1:3,1:3)
 %!error <arguments must be vectors> ndgrid (ones (2,2))
--- a/scripts/plot/util/newplot.m
+++ b/scripts/plot/util/newplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -32,28 +32,29 @@
 ## @headitem Figure NextPlot @tab Action
 ## @item @qcode{"new"} @tab Create a new figure and make it the current figure.
 ##
-## @item @qcode{"add"} (default) @tab Add new graphic objects to the current figure.
+## @item @qcode{"add"} (default) @tab Add new graphic objects to the current
+## figure.
 ##
-## @item @qcode{"replacechildren"} @tab Delete child objects whose HandleVisibility is
-## set to @qcode{"on"}.  Set NextPlot property to @qcode{"add"}.  This
-## typically clears a figure, but leaves in place hidden objects such as
-## menubars.  This is equivalent to @code{clf}.
+## @item @qcode{"replacechildren"} @tab Delete child objects whose
+## HandleVisibility is set to @qcode{"on"}.  Set NextPlot property to
+## @qcode{"add"}.  This typically clears a figure, but leaves in place hidden
+## objects such as menubars.  This is equivalent to @code{clf}.
 ##
 ## @item @qcode{"replace"} @tab Delete all child objects of the figure and
 ## reset all figure properties to their defaults.  However, the following
 ## four properties are not reset: Position, Units, PaperPosition, PaperUnits.
-##  This is equivalent to @code{clf reset}.
+## This is equivalent to @code{clf reset}.
 ## @end multitable
 ##
 ## @multitable @columnfractions .25 .75
 ## @headitem Axis NextPlot @tab Action
-## @item @qcode{"add"} @tab Add new graphic objects to the current axes.  This is
-## equivalent to @code{hold on}.
+## @item @qcode{"add"} @tab Add new graphic objects to the current axes.  This
+## is equivalent to @code{hold on}.
 ##
-## @item @qcode{"replacechildren"} @tab Delete child objects whose HandleVisibility is
-## set to @qcode{"on"}, but leave axis properties unmodified.  This typically
-## clears a plot, but preserves special settings such as log scaling for
-## axes.  This is equivalent to @code{cla}.
+## @item @qcode{"replacechildren"} @tab Delete child objects whose
+## HandleVisibility is set to @qcode{"on"}, but leave axis properties
+## unmodified.  This typically clears a plot, but preserves special settings
+## such as log scaling for axes.  This is equivalent to @code{cla}.
 ##
 ## @item @qcode{"replace"} (default) @tab Delete all child objects of the
 ## axis and reset all axis properties to their defaults.  However, the
@@ -189,8 +190,15 @@
         kids(kids == hkid) = [];
         delete (kids);
       else
-        __go_axes_init__ (ca, "replace");
-        __request_drawnow__ ();
+        if (isprop (ca, "__plotyy_axes__"))
+          ## Hack for bug #44246.  There is no way to reset or remove a
+          ## property created with addproperty short of deleting the object.
+          delete (ca);
+          ca = axes ();
+        else
+          __go_axes_init__ (ca, "replace");
+          __request_drawnow__ ();
+        endif
       endif
       ## FIXME: The code above should perform the following:
       ###########################
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/pan.m
@@ -0,0 +1,120 @@
+## Copyright (C) 2014-2015 Andreas Weber
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Command} {} pan
+## @deftypefnx {Command} {} pan on
+## @deftypefnx {Command} {} pan off
+## @deftypefnx {Command} {} pan xon
+## @deftypefnx {Command} {} pan yon
+## @deftypefnx {Function File} {} pan (@var{hfig}, @var{option})
+## Control the interactive panning mode of a figure in the GUI.
+##
+## Given the option @qcode{"on"} or @qcode{"off"}, set the interactive
+## pan mode on or off.
+##
+## With no arguments, toggle the current pan mode on or off.
+##
+## Given the option @qcode{"xon"} or @qcode{"yon"}, enable pan mode
+## for the x or y axis only.
+##
+## If the first argument @var{hfig} is a figure, then operate on
+## the given figure rather than the current figure as returned by
+## @code{gcf}.
+##
+## @seealso{rotate3d, zoom}
+## @end deftypefn
+
+function pan (varargin)
+
+  hfig = NaN;
+
+  nargs = nargin;
+
+  if (nargs > 2)
+    print_usage ();
+  endif
+
+  if (nargin == 1 && nargout > 0 && isfigure (varargin{1}))
+    error ("pan_object_handle = pan (hfig): not implemented");
+  endif
+
+  if (nargs == 2)
+    hfig = varargin{1};
+    if (isfigure (hfig))
+      varargin(1) = [];
+      nargs--;
+    else
+      error ("pan: expecting figure handle as first argument");
+    endif
+  endif
+
+  if (isnan (hfig))
+    hfig = gcf ();
+  endif
+
+  if (nargs == 0)
+    pm = get (hfig, "__pan_mode__");
+    if (strcmp (pm.Enable, "on"))
+      pm.Enable = "off";
+    else
+      pm.Enable = "on";
+    endif
+    set (hfig, "__pan_mode__", pm);
+    update_mouse_mode (hfig, pm.Enable);
+  elseif (nargs == 1)
+    arg = varargin{1};
+    if (ischar (arg))
+      switch (arg)
+        case {"on", "off", "xon", "yon"}
+          pm = get (hfig, "__pan_mode__");
+          switch (arg)
+            case {"on", "off"}
+              pm.Enable = arg;
+              pm.Motion = "both";
+            case "xon"
+              pm.Enable = "on";
+              pm.Motion = "horizontal";
+            case "yon"
+              pm.Enable = "on";
+              pm.Motion = "vertical";
+          endswitch
+          set (hfig, "__pan_mode__", pm);
+          update_mouse_mode (hfig, arg);
+        otherwise
+          error ("pan: unrecognized option '%s'", arg);
+      endswitch
+    else
+      error ("pan: wrong type argument '%s'", class (arg));
+    endif
+  endif
+
+endfunction
+
+function update_mouse_mode (hfig, arg)
+  if (strcmp (arg, "off"))
+    set (hfig, "__mouse_mode__", "none");
+  else
+    ## FIXME: Is there a better way other than calling these
+    ## functions to set the other mouse mode Enable fields to
+    ## "off"?
+    rotate3d ("off");
+    zoom ("off");
+    set (hfig, "__mouse_mode__", "pan");
+  endif
+endfunction
--- a/scripts/plot/util/print.m
+++ b/scripts/plot/util/print.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -226,7 +226,7 @@
 ##   @item -interchange
 ##     Provide an interchange preview.
 ##
-##   @item -metalfile
+##   @item -metafile
 ##     Provide a metafile preview.
 ##
 ##   @item -pict
@@ -284,7 +284,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{saveas, orient, figure}
+## @seealso{saveas, hgsave, orient, figure}
 ## @end deftypefn
 
 function print (varargin)
@@ -301,12 +301,16 @@
     error ("print: no figure to print");
   endif
 
+  if (isempty (findall (opts.figure, "-depth", "1", "type", "axes")))
+    error ("print: no axes object in figure to print");
+  endif
+
   orig_figure = get (0, "currentfigure");
   set (0, "currentfigure", opts.figure);
 
   if (opts.append_to_file)
     [~, ~, ext] = fileparts (opts.ghostscript.output);
-    opts.ghostscript.prepend = strcat (tmpnam (), ext);
+    opts.ghostscript.prepend = [tempname() ext];
     copyfile (opts.ghostscript.output, opts.ghostscript.prepend);
   endif
 
@@ -428,7 +432,7 @@
       case "gnuplot"
         opts = __gnuplot_print__ (opts);
       otherwise
-        opts = __fltk_print__ (opts);
+        opts = __opengl_print__ (opts);
     endswitch
 
   unwind_protect_cleanup
@@ -473,6 +477,17 @@
   ## Unix Shell;
   ##   cat > <filein> ; epstool -bbox -preview-tiff <filein> <fileout> ; rm <filein>
 
+  ## HACK: Keep track of whether ghostscript supports epswrite or eps2write.
+  persistent epsdevice;
+  if (isempty (epsdevice))
+    [status, devlist] = system (sprintf ("%s -h", opts.ghostscript.binary));
+    if (isempty (strfind (devlist, "eps2write")))
+      epsdevice = "epswrite";
+    else
+      epsdevice = "eps2write";
+    endif
+  endif
+
   dos_shell = (ispc () && ! isunix ());
 
   cleanup = "";
@@ -484,7 +499,7 @@
 
   if (nargin < 2 || strcmp (filein, "-") || isempty (filein))
     pipein = true;
-    filein = strcat (tmpnam (), ".eps");
+    filein = [tempname() ".eps"];
     if (dos_shell)
       cleanup = sprintf ("& del %s ", strrep (filein, '/', '\'));
     else
@@ -496,11 +511,11 @@
   endif
   if (strcmp (fileout, "-"))
     pipeout = true;
-    fileout = strcat (tmpnam (), ".eps");
+    fileout = [tempname() ".eps"];
     if (dos_shell)
-      cleanup = horzcat (cleanup, sprintf ("& del %s ", strrep (fileout, '/', '\')));
+      cleanup = [cleanup, sprintf("& del %s ", strrep (fileout, '/', '\'))];
     else
-      cleanup = horzcat (cleanup, sprintf ("; rm %s ", fileout));
+      cleanup = [cleanup, sprintf("; rm %s ", fileout)];
     endif
   else
     pipeout = false;
@@ -531,7 +546,7 @@
                    opts.preview);
         endswitch
         if (! isempty (opts.ghostscript.resolution))
-          cmd = sprintf ("%s --dpi %d", cmd, opts.ghostscript.resolution);
+          cmd = sprintf ("%s --dpi %d", cmd, fix (opts.ghostscript.resolution));
         endif
       else
         cmd = "";
@@ -544,7 +559,7 @@
         if (dos_shell)
           filein(filein=="'") = "\"";
           gs_cmd = __ghostscript__ ("binary", opts.ghostscript.binary,
-                                    "device", "epswrite",
+                                    "device", epsdevice,
                                     "source", "-",
                                     "output", filein);
           cmd = sprintf ("%s %s & %s", gs_cmd, filein, cmd);
@@ -576,7 +591,7 @@
     if (pipein && pipeout)
       if (dos_shell)
         cmd = __ghostscript__ ("binary", opts.ghostscript.binary,
-                               "device", "epswrite",
+                               "device", epsdevice,
                                "source", "-",
                                "output", "-");
       else
@@ -587,7 +602,7 @@
         ## ghostscript expects double, not single, quotes
         fileout(fileout=="'") = "\"";
         cmd = __ghostscript__ ("binary", opts.ghostscript.binary,
-                               "device", "epswrite",
+                               "device", epsdevice,
                                "source", "-",
                                "output", fileout);
       else
@@ -614,12 +629,12 @@
 
 function cmd = fig2dev (opts, devopt)
   if (nargin < 2)
-    devopt =  opts.devopt;
+    devopt = opts.devopt;
   endif
   dos_shell = (ispc () && ! isunix ());
   if (! isempty (opts.fig2dev_binary))
     if (dos_shell)
-      ## FIXME - is this the right thing to do for DOS?
+      ## FIXME: Is this the right thing to do for DOS?
       cmd = sprintf ("%s -L %s 2> NUL", opts.fig2dev_binary, devopt);
     else
       cmd = sprintf ("%s -L %s 2> /dev/null", opts.fig2dev_binary, devopt);
@@ -650,7 +665,7 @@
       graphicsfile = strcat (opts.name, "-inc.eps");
   endswitch
   papersize = sprintf ("\\usepackage[papersize={%.2fbp,%.2fbp},text={%.2fbp,%.2fbp}]{geometry}",
-                       opts.canvas_size, opts.canvas_size);
+                       fix (opts.canvas_size), fix (opts.canvas_size));
   prepend = {"\\documentclass{minimal}";
              packages;
              papersize;
@@ -690,7 +705,7 @@
 
 function cmd = lpr (opts)
   if (nargin < 2)
-    devopt =  opts.devopt;
+    devopt = opts.devopt;
   endif
   if (! isempty (opts.lpr_binary))
     cmd = opts.lpr_binary;
@@ -710,14 +725,14 @@
 
 function cmd = pstoedit (opts, devopt)
   if (nargin < 2)
-    devopt =  opts.devopt;
+    devopt = opts.devopt;
   endif
   dos_shell = (ispc () && ! isunix ());
   if (! isempty (opts.pstoedit_binary))
     if (dos_shell)
       cmd = sprintf ("%s -f %s 2> NUL", opts.pstoedit_binary, devopt);
     else
-      ## FIXME - is this the right thing to do for DOS?
+      ## FIXME: Is this the right thing to do for DOS?
       cmd = sprintf ("%s -f %s 2> /dev/null", opts.pstoedit_binary, devopt);
     endif
   elseif (isempty (opts.pstoedit_binary))
--- a/scripts/plot/util/printd.m
+++ b/scripts/plot/util/printd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 Michael D. Godfrey
+## Copyright (C) 2013-2015 Michael D. Godfrey
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     error ("The output filename: %s requires a suffix.\nOptions are: pdf ps eps txt jpg jpeg", filename);
   endif
   opt = substr (filename, sufix+1);
-  [pf, tempf, mag] = mkstemp ("oct-XXXXXX", 1);  # Safe version of tmpnam()
+  [pf, tempf, mag] = mkstemp ("oct-XXXXXX", 1);
   fprintf (pf, "%s", disp (obj));
   frewind (pf);
 
@@ -53,8 +53,7 @@
   opt = lower (opt);
   switch (opt)
     case "pdf"
-      enscr = sprintf (
-                       "enscript --no-header -o %s.ps %s ; ps2pdf %s.ps %s.pdf; mv %s.pdf %s;exit",...
+      enscr = sprintf ("enscript --no-header -o %s.ps %s ; ps2pdf %s.ps %s.pdf; mv %s.pdf %s;exit", ...
                        tempf, tempf, tempf, tempf, tempf, filename);
       system (enscr);
       delete ([tempf ".ps"]);
@@ -62,8 +61,7 @@
       enscr = sprintf ("enscript --no-header -o %s %s ; exit", filename, tempf);
       system (enscr);
     case "eps"
-      enscr = sprintf (
-                       "enscript --no-header -o %s.ps %s ; ps2eps --ignoreBB %s.ps; mv %s.eps %s; exit",...
+      enscr = sprintf ("enscript --no-header -o %s.ps %s ; ps2eps --ignoreBB %s.ps; mv %s.eps %s; exit", ...
                        tempf, tempf, tempf, tempf, filename);
       system (enscr);
       delete ([tempf ".ps"]);
@@ -81,18 +79,18 @@
   endswitch
   fclose (pf);
   delete (tempf);
-  pr_out =  sprintf ("%s file %s written\n", opt, filename);
+  pr_out = sprintf ("%s file %s written\n", opt, filename);
 endfunction
 
 
 %!demo
-%! r2 = char (
-%! 'stem step: 10, data: unsorted.',
-%! 'Hinges:    lo: 12, hi: 42'     ,
-%! '   1 | 22118'                  ,
-%! '   2 | 28'                     ,
-%! '   3 | 98'                     ,
-%! '   4 | 244'                    ,
+%! r2 = char ( ...
+%! 'stem step: 10, data: unsorted.', ...
+%! 'Hinges:    lo: 12, hi: 42'     , ...
+%! '   1 | 22118'                  , ...
+%! '   2 | 28'                     , ...
+%! '   3 | 98'                     , ...
+%! '   4 | 244'                    , ...
 %! '   5 | 2'                      );
 %! printd (r2, 'test_p.txt');
 %! system ('cat test_p.txt');
--- a/scripts/plot/util/private/__add_default_menu__.m
+++ b/scripts/plot/util/private/__add_default_menu__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -33,48 +33,43 @@
 
   obj = findall (fig, "-depth", 1, "tag", "__default_menu__", "label", "&File");
   if (isempty (obj))
-    ## FIXME: uimenu() will cause menubar to be displayed, even though property
-    ##        menubar remains set at "none".  So, forcibly turn menubar status
-    ##        on and then off to force figure to hide menubar.
-    menubar_state = get (fig, "menubar");
-    set (fig, "menubar", "figure");
-
     __f = uimenu (fig, "label", "&File", "handlevisibility", "off",
                        "tag", "__default_menu__");
+      uimenu (__f, "label", "&Save", "callback", @save_cb);
       uimenu (__f, "label", "Save &As", "callback", @save_cb);
-      uimenu (__f, "label", "&Save", "callback", @save_cb);
       uimenu (__f, "label", "&Close", "callback", "close (gcf)");
 
     __e = uimenu (fig, "label", "&Edit", "handlevisibility", "off",
                        "tag", "__default_menu__");
-      uimenu (__e, "label", "&Grid", "callback", @grid_cb);
-      uimenu (__e, "label", "Auto&scale", "callback", @autoscale_cb);
-      gm = uimenu (__e, "label", "GUI &Mode");
-        uimenu (gm, "label", "Pan+Zoom", "callback", @guimode_cb);
-        uimenu (gm, "label", "Rotate+Zoom", "callback", @guimode_cb);
-        uimenu (gm, "label", "None+Zoom", "callback", @guimode_cb);
+      uimenu (__e, "label", "Toggle &grid on all axes", "tag", "toggle", "callback", @grid_cb);
+      uimenu (__e, "label", "Show grid on all axes", "tag", "on", "callback", @grid_cb);
+      uimenu (__e, "label", "Hide grid on all axes", "tag", "off", "callback", @grid_cb);
+      uimenu (__e, "label", "Auto&scale all axes", "callback", @autoscale_cb);
+      gm = uimenu (__e, "label", "GUI &Mode (on all axes)");
+        uimenu (gm, "label", "Pan x and y", "tag", "pan_on", "callback", @guimode_cb);
+        uimenu (gm, "label", "Pan x only", "tag", "pan_xon", "callback", @guimode_cb);
+        uimenu (gm, "label", "Pan y only", "tag", "pan_yon", "callback", @guimode_cb);
+        uimenu (gm, "label", "Disable pan and rotate", "tag", "no_pan_rotate", "callback", @guimode_cb);
+        uimenu (gm, "label", "Rotate on", "tag", "rotate3d", "callback", @guimode_cb);
+        uimenu (gm, "label", "Enable mousezoom", "tag", "zoom_on", "callback", @guimode_cb);
+        uimenu (gm, "label", "Disable mousezoom", "tag", "zoom_off", "callback", @guimode_cb);
 
-    ## FIXME: This drawnow () must occur after at least one menu item has
-    ##        been defined to avoid sizing issues in new figures.
-    ##        This may lead to flicker.  The real fix must be in the C++ code.
-    drawnow ();
-
-    set (fig, "menubar", menubar_state);
   endif
 
 endfunction
 
 function save_cb (h, e)
-  lbl = get (gcbo, "label");
+  [hcbo, hfig] = gcbo ();
+  lbl = get (hcbo, "label");
   if (strcmp (lbl, "&Save"))
-    fname = get (gcbo, "userdata");
+    fname = get (hfig, "filename");
     if (isempty (fname))
-      __save_as__ (gcbo);
+      __save_as__ (hcbo);
     else
-      saveas (gcbo, fname);
+      saveas (hcbo, fname);
     endif
   elseif (strcmp (lbl, "Save &As"))
-    __save_as__ (gcbo);
+    __save_as__ (hcbo);
   endif
 endfunction
 
@@ -82,34 +77,59 @@
   [filename, filedir] = uiputfile ({"*.pdf;*.ps;*.gif;*.png;*.jpg",
                                     "Supported Graphic Formats"},
                                    "Save Figure",
-                                   pwd);
+                                   [pwd, filesep, "untitled.pdf"]);
   if (filename != 0)
     fname = [filedir filesep() filename];
-    obj = findall (gcbf, "label", "&Save");
-    if (! isempty (obj))
-      set (obj(1), "userdata", fname);
-    endif
+    set (gcbf, "filename", fname)
     saveas (caller, fname);
   endif
 endfunction
 
+
+function [hax, fig] = __get_axes__ (h)
+  ## Get parent figure
+  fig = ancestor (h, "figure");
+
+  ## Find all axes which aren't legends
+  hax = findobj (fig, "type", "axes", "-not", "tag", "legend");
+endfunction
+
 function grid_cb (h, e)
-  grid;
+  hax = __get_axes__ (h);
+  id = get (h, "tag");
+  switch (id)
+    case "toggle"
+      arrayfun (@grid, hax);
+    otherwise
+      arrayfun (@(h) grid(h, id), hax);
+  endswitch
+  drawnow ();
 endfunction
 
 function autoscale_cb (h, e)
-  axis ("auto");
+  hax = __get_axes__ (h);
+  arrayfun (@(h) axis (h, "auto"), hax)
+  drawnow ();
 endfunction
 
 function guimode_cb (h, e)
-  lbl = get (h, "label");
-  switch (lbl)
-    case "Pan+Zoom"
-      gui_mode ("2D");
-    case "Rotate+Zoom"
-      gui_mode ("3D");
-    case "None"
-      gui_mode ("None");
+  [hax, fig] = __get_axes__ (h);
+  id = get (h, "tag");
+  switch (id)
+    case "pan_on"
+      pan (fig, "on")
+    case "pan_xon"
+      pan (fig, "xon")
+    case "pan_yon"
+      pan (fig, "yon")
+    case "rotate3d"
+      rotate3d (fig, "on")
+    case "no_pan_rotate"
+      pan (fig, "off")
+      rotate3d (fig, "off")
+    case "zoom_on"
+      arrayfun (@(h) set (h, "mousewheelzoom", 0.05), hax);
+    case "zoom_off"
+      arrayfun (@(h) set (h, "mousewheelzoom", 0.0), hax);
   endswitch
 endfunction
-
deleted file mode 100644
--- a/scripts/plot/util/private/__fltk_ginput__.m
+++ /dev/null
@@ -1,102 +0,0 @@
-## Copyright (C) 2010-2013 Shai Ayal
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{x}, @var{y}, @var{buttons}] =} __fltk_ginput__ (@var{f}, @var{n})
-## Undocumented internal function.
-## @end deftypefn
-
-## This is ginput.m implementation for fltk.
-
-function [x, y, button] = __fltk_ginput__ (f, n = -1)
-
-  if (isempty (get (f, "currentaxes")))
-    error ("ginput: must have at least one axes");
-  endif
-
-  x = y = button = [];
-  ginput_accumulator (0, 0, 0, 0);  # initialize accumulator
-
-  unwind_protect
-
-    orig_windowbuttondownfcn = get (f, "windowbuttondownfcn");
-    set (f, "windowbuttondownfcn", @ginput_windowbuttondownfcn);
-
-    orig_ginput_keypressfcn = get (f, "keypressfcn");
-    set (f, "keypressfcn", @ginput_keypressfcn);
-
-    do
-      __fltk_redraw__ ();
-
-      ## Release CPU.
-      sleep (0.01);
-
-      [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0);
-    until ((n > -1 && n0 >= n) || n0 < 0)
-
-    if (n0 > n)
-      ## More clicks than requested due to double-click or too fast clicking
-      x = x(1:n);
-      y = y(1:n);
-      button = button(1:n);
-    endif
-
-  unwind_protect_cleanup
-    set (f, "windowbuttondownfcn", orig_windowbuttondownfcn);
-    set (f, "keypressfcn", orig_ginput_keypressfcn);
-  end_unwind_protect
-
-endfunction
-
-function [x, y, n, button] = ginput_accumulator (mode, xn, yn, btn)
-  persistent x y n button;
-
-  if (mode == 0)
-    ## Initialize.
-    x = y = button = [];
-    n = 0;
-  elseif (mode == 1)
-    ## Append mouse button or key press.
-    x = [x; xn];
-    y = [y; yn];
-    button = [button; btn];
-    n += 1;
-  elseif (mode == 2)
-    ## The end due to Enter.
-    n = -1;
- endif
-
-endfunction
-
-function ginput_windowbuttondownfcn (src, data)
-  point = get (get (src,"currentaxes"), "currentpoint");
-  button = data;
-  ginput_accumulator (1, point(1,1), point(2,1), button);
-endfunction
-
-function ginput_keypressfcn (src, evt)
-  point = get (get (src, "currentaxes"), "currentpoint");
-  key = evt.Key;
-  if (key == 10)
-    ## Enter key stops ginput.
-    ginput_accumulator (2, NaN, NaN, NaN);
-  else
-    ginput_accumulator (1, point(1,1), point(2,1), key);
-  endif
-endfunction
-
--- a/scripts/plot/util/private/__ghostscript__.m
+++ b/scripts/plot/util/private/__ghostscript__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -26,12 +26,14 @@
 
 function [gs_cmd, cleanup_cmd] = __ghostscript__ (varargin);
 
+  dos_shell = (ispc () && ! isunix ());
+
   opts.binary = "";
   opts.source = "-";
   opts.output = "-";
   opts.device = "";
   opts.epscrop = false;
-  opts.antialiasing  = false;
+  opts.antialiasing = false;
   opts.antialiasing_textalphabits = 4;,
   opts.antialiasing_graphicsalphabits = 4;
   opts.resolution = 150;
@@ -64,18 +66,18 @@
     format_for_printer = true;
   endif
 
-  gs_opts = sprintf ("-dQUIET -dNOPAUSE -dBATCH -dSAFER -sDEVICE=%s", opts.device);
+  gs_opts = ["-dQUIET -dNOPAUSE -dBATCH -dSAFER -sDEVICE=" opts.device];
 
   if (! isempty (opts.level) && ismember (opts.level, [1, 2, 3]))
-    gs_opts = sprintf ("%s -dLanguageLevel=%d", gs_opts, round (opts.level));
+    gs_opts = sprintf ("%s -dLanguageLevel=%d", gs_opts, opts.level);
   endif
 
   if (opts.antialiasing && isempty (strfind (opts.device, "write")))
     ## Apply anti-aliasing to all bitmap formats/devices
     gs_opts = sprintf ("%s -dTextAlphaBits=%d -dGraphicsAlphaBits=%d",
-                       gs_opts, opts.antialiasing_textalphabits,
-                       opts.antialiasing_graphicsalphabits);
-    gs_opts = sprintf ("%s -r%dx%d", gs_opts, [1, 1] * opts.resolution);
+                       gs_opts, fix (opts.antialiasing_textalphabits),
+                       fix (opts.antialiasing_graphicsalphabits));
+    gs_opts = sprintf ("%s -r%dx%d", gs_opts, fix ([1, 1] * opts.resolution));
   elseif (any (strcmp (opts.device, {"pswrite", "ps2write", "pdfwrite"})))
     gs_opts = sprintf ("%s -dEmbedAllFonts=true", gs_opts);
     if (strcmp (opts.device, "pdfwrite"))
@@ -93,7 +95,7 @@
       gs_opts = sprintf ("%s -sPAPERSIZE=%s", gs_opts, opts.papersize);
     elseif (isnumeric (opts.papersize) && numel (opts.papersize) == 2)
       gs_opts = sprintf ("%s -dDEVICEWIDTHPOINTS=%d -dDEVICEHEIGHTPOINTS=%d",
-                         gs_opts, opts.papersize);
+                         gs_opts, fix (opts.papersize));
       if (opts.papersize(1) > opts.papersize(2))
         ## Lanscape mode: This option will result in automatic rotation of the
         ##                document page if the requested page size matches one
@@ -106,14 +108,18 @@
     gs_opts = sprintf ("%s -dFIXEDMEDIA", gs_opts);
     ## "pageoffset" is relative to the coordinates, not the BBox LLHC.
     str = sprintf ("%s [%d %d] %s", "<< /Margins [0 0] /.HWMargins [0 0 0 0] /PageOffset",
-                   opts.pageoffset, ">> setpagedevice");
+                   fix (opts.pageoffset), ">> setpagedevice");
     offset_ps = {"%!PS-Adobe-3.0", str, "%%EOF"};
     if (isfield (opts, "offsetfile"))
       offsetfile = opts.offsetfile;
       cleanup_cmd = "";
     else
-      offsetfile = strcat (tmpnam (), ".ps");
-      cleanup_cmd = sprintf ("rm %s", offsetfile);
+      offsetfile = [tempname() ".ps"];
+      if (dos_shell)
+        cleanup_cmd = ["del " strrep(offsetfile, '/', '\')];
+      else
+        cleanup_cmd = ["rm " offsetfile];
+      endif
     endif
     unwind_protect
       fid = fopen (offsetfile, "w");
@@ -143,14 +149,23 @@
   endif
   if (! isempty (opts.prepend)
       && any (strcmpi (opts.device, {"pswrite", "ps2write", "pdfwrite"})))
-    ## FIXME - Fonts get may be mangled when appending ps/ps2.
-    ##         See "How to concatenate several PS files" at the link,
-    ##         http://en.wikibooks.org/wiki/PostScript_FAQ
+    ## FIXME: Fonts get may be mangled when appending ps/ps2.
+    ##        See "How to concatenate several PS files" at the link,
+    ##        http://en.wikibooks.org/wiki/PostScript_FAQ
     cmd = sprintf ("%s %s", cmd, opts.prepend);
     if (isempty (cleanup_cmd))
-      cleanup_cmd = sprintf ("rm %s", opts.prepend);
+      if (dos_shell)
+        cleanup_cmd = ["del " strrep(opts.prepend, '/', '\')];
+      else
+        cleanup_cmd = ["rm " opts.prepend];
+      endif
     else
-      cleanup_cmd = sprintf ("%s ; rm %s", cleanup_cmd, opts.prepend);
+      if (dos_shell)
+        cleanup_cmd = sprintf ("%s & del %s", cleanup_cmd,
+                               strrep (opts.prepend, '/', '\'));
+      else
+        cleanup_cmd = sprintf ("%s ; rm %s", cleanup_cmd, opts.prepend);
+      endif
     endif
   endif
   if (! isempty (offsetfile) && format_for_printer)
--- a/scripts/plot/util/private/__gnuplot_get_var__.m
+++ b/scripts/plot/util/private/__gnuplot_get_var__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Ben Abbott
+## Copyright (C) 2009-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -50,7 +50,7 @@
   endif
 
   if (use_mkfifo)
-    gpin_name = tmpnam ();
+    gpin_name = tempname ();
 
     ## Mode: 0600 == 6*8*8
     [err, msg] = mkfifo (gpin_name, 6*8*8);
--- a/scripts/plot/util/private/__gnuplot_ginput__.m
+++ b/scripts/plot/util/private/__gnuplot_ginput__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Petr Mikulik
+## Copyright (C) 2004-2015 Petr Mikulik
 ##
 ## This file is part of Octave.
 ##
@@ -61,7 +61,7 @@
   endif
 
   if (use_mkfifo)
-    gpin_name = tmpnam ();
+    gpin_name = tempname ();
 
     ##Mode: 6*8*8 ==  0600
     [err, msg] = mkfifo (gpin_name, 6*8*8);
@@ -117,7 +117,8 @@
           endif
           fclear (istream);
         endwhile
-        [x(k), y(k), button(k), count] = sscanf (str{end}(8:end), "%f %f %d", "C");
+        [x(k), y(k), button(k), count] = ...
+          sscanf (str{end}(8:end), "%f %f %d", "C");
       endif
 
       if ([x(k), y(k), button(k)] == [0, 0, -1])
--- a/scripts/plot/util/private/__gnuplot_has_feature__.m
+++ b/scripts/plot/util/private/__gnuplot_has_feature__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Ben Abbott
+## Copyright (C) 2009-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/private/__gnuplot_has_terminal__.m
+++ b/scripts/plot/util/private/__gnuplot_has_terminal__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/private/__gnuplot_open_stream__.m
+++ b/scripts/plot/util/private/__gnuplot_open_stream__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Ben Abbott
+## Copyright (C) 2009-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/private/__gnuplot_print__.m
+++ b/scripts/plot/util/private/__gnuplot_print__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Daniel Heiserer
+## Copyright (C) 1999-2015 Daniel Heiserer
 ## Copyright (C) 2001 Laurent Mazet
 ##
 ## This file is part of Octave.
@@ -54,7 +54,7 @@
         gp_opts = [gp_opts " level1"];
       endif
       if (opts.tight_flag || ! isempty (opts.preview))
-        tmp_file = strcat (tmpnam (), ".eps");
+        tmp_file = [tempname() ".eps"];
         eps_drawnow (opts, tmp_file, gp_opts);
         if (dos_shell)
           cleanup = [" & del " strrep(tmp_file, '/', '\')];
@@ -119,7 +119,7 @@
     case opts.ghostscript.device
       gp_opts = font_spec (opts, "devopt", "eps");
       opts.ghostscript.output = opts.name;
-      opts.ghostscript.source = strcat (tmpnam (), ".eps");
+      opts.ghostscript.source = [tempname() ".eps"];
       eps_drawnow (opts, opts.ghostscript.source, gp_opts);
       [cmd_gs, cmd_cleanup] = __ghostscript__ (opts.ghostscript);
       if (opts.send_to_printer || isempty (opts.name))
@@ -220,6 +220,8 @@
         f = sprintf ("%d", 2 * opts.fontsize);
       endif
     case "svg"
+      ## FIXME: Why does svg format use round on the fontsize while
+      ##        other terminals don't?
       if (! isempty (opts.font) && ! isempty (opts.fontsize))
         fontsize = round (opts.fontsize * 0.75);
         f = sprintf ('fname "%s" fsize %d', opts.font, fontsize);
--- a/scripts/plot/util/private/__gnuplot_version__.m
+++ b/scripts/plot/util/private/__gnuplot_version__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Daniel Sebald
+## Copyright (C) 2006-2015 Daniel Sebald
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/private/__go_draw_axes__.m
+++ b/scripts/plot/util/private/__go_draw_axes__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -63,7 +63,7 @@
       && strcmp (axis_obj.xlimmode, "manual")
       && strcmp (axis_obj.ylimmode, "manual")
       && (nd == 2 || all (mod (axis_obj.view, 90) == 0)))
-    ## FIXME - adjust plotboxaspectratio to respect other
+    ## FIXME: adjust plotboxaspectratio to respect other
     fpos = get (axis_obj.parent, "position");
     apos = axis_obj.position;
   endif
@@ -75,7 +75,7 @@
     if (nd == 2 || all (mod (axis_obj.view, 90) == 0))
       dr = dr(1) / dr(2);
     else
-      ## FIXME - need to properly implement 3D
+      ## FIXME: need to properly implement 3D
       dr = mean (dr(1:2)) / dr(3);
     endif
   else
@@ -106,7 +106,7 @@
       fprintf (plot_stream, "set rmargin 0;\n");
 
       if (nd == 3 && all (axis_obj.view == [0, 90]))
-        ## FIXME -- Kludge to allow colorbar to be added to a pcolor() plot
+        ## FIXME: Kludge to allow colorbar to be added to a pcolor() plot
         pos(3:4) = pos(3:4) * 1.4;
         pos(1:2) = pos(1:2) - pos(3:4) * 0.125;
       endif
@@ -139,8 +139,8 @@
   endif
 
   ## Reset all labels, axis-labels, tick-labels, and title
-  ## FIXME - We should have an function to initialize the axis.
-  ##         Presently, this is dispersed in this function.
+  ## FIXME: We should have an function to initialize the axis.
+  ##        Presently, this is dispersed in this function.
   fputs (plot_stream, "unset label;\n");
   fputs (plot_stream, "unset xtics;\n");
   fputs (plot_stream, "unset ytics;\n");
@@ -153,10 +153,11 @@
     if (isempty (t.string))
       fputs (plot_stream, "unset title;\n");
     else
+      colorspec = get_text_colorspec (t.color, mono);
       [tt, f, s] = __maybe_munge_text__ (enhanced, t, "string");
       fontspec = create_fontspec (f, s, gnuplot_term);
-      fprintf (plot_stream, "set title \"%s\" %s %s;\n",
-               undo_string_escapes (tt), fontspec,
+      fprintf (plot_stream, "set title \"%s\" %s %s %s;\n",
+               undo_string_escapes (tt), fontspec, colorspec,
                __do_enhanced_option__ (enhanced, t));
     endif
   endif
@@ -164,7 +165,7 @@
   if (! isempty (axis_obj.xlabel))
     t = get (axis_obj.xlabel);
     angle = t.rotation;
-    colorspec = get_text_colorspec (axis_obj.xcolor, mono);
+    colorspec = get_text_colorspec (t.color, mono);
     if (isempty (t.string))
       fprintf (plot_stream, "unset xlabel;\n");
       fprintf (plot_stream, "unset x2label;\n");
@@ -192,7 +193,7 @@
   if (! isempty (axis_obj.ylabel))
     t = get (axis_obj.ylabel);
     angle = t.rotation;
-    colorspec = get_text_colorspec (axis_obj.ycolor, mono);
+    colorspec = get_text_colorspec (t.color, mono);
     if (isempty (t.string))
       fprintf (plot_stream, "unset ylabel;\n");
       fprintf (plot_stream, "unset y2label;\n");
@@ -220,7 +221,7 @@
   if (! isempty (axis_obj.zlabel))
     t = get (axis_obj.zlabel);
     angle = t.rotation;
-    colorspec = get_text_colorspec (axis_obj.zcolor, mono);
+    colorspec = get_text_colorspec (t.color, mono);
     if (isempty (t.string))
       fputs (plot_stream, "unset zlabel;\n");
     else
@@ -323,9 +324,9 @@
     fputs (plot_stream, "set border front;\n");
   else
     fputs (plot_stream, "set grid layerdefault;\n");
-    ## FIXME -- the gnuplot help says that "layerdefault" should work
-    ## for set border too, but it fails for me with gnuplot 4.2.5.  So
-    ## use "back" instead.
+    ## FIXME: The gnuplot help says that "layerdefault" should work
+    ##        for set border too, but it fails for me with gnuplot 4.2.5.
+    ##        So, use "back" instead.
     fputs (plot_stream, "set border back;\n");
   endif
 
@@ -512,6 +513,9 @@
           img_ydata = img_ydata(1) + [0, rows(img_data)-1];
         endif
 
+        x_origin = min (img_xdata);
+        y_origin = min (img_ydata);
+
         [y_dim, x_dim] = size (img_data(:,:,1));
         if (x_dim > 1)
           dx = abs (img_xdata(2)-img_xdata(1))/(x_dim-1);
@@ -519,6 +523,11 @@
           x_dim = 2;
           img_data = [img_data, img_data];
           dx = abs (img_xdata(2)-img_xdata(1));
+          if (dx < 1)
+            ## Correct gnuplot string for 1-D images
+            dx       = 0.5;
+            x_origin = 0.75;
+          endif
         endif
         if (y_dim > 1)
           dy = abs (img_ydata(2)-img_ydata(1))/(y_dim-1);
@@ -526,11 +535,13 @@
           y_dim = 2;
           img_data = [img_data; img_data];
           dy = abs (img_ydata(2)-img_ydata(1));
+          if (dy < 1)
+            ## Correct gnuplot string for 1-D images
+            dy       = 0.5;
+            y_origin = 0.75;
+          endif
         endif
 
-        x_origin = min (img_xdata);
-        y_origin = min (img_ydata);
-
         if (ndims (img_data) == 3)
           data{data_idx} = permute (img_data, [3, 1, 2])(:);
           format = "1:2:3";
@@ -561,7 +572,9 @@
         if (isempty (obj.displayname))
           titlespec{data_idx} = "title \"\"";
         else
-          tmp = undo_string_escapes (__maybe_munge_text__ (enhanced, obj, "displayname"));
+          tmp = undo_string_escapes (
+                  __maybe_munge_text__ (enhanced, obj, "displayname")
+                );
           titlespec{data_idx} = ['title "' tmp '"'];
         endif
         usingclause{data_idx} = sprintf ("record=%d", numel (obj.xdata));
@@ -575,14 +588,17 @@
             zdat = zeros (size (xdat));
           endif
           data{data_idx} = [xdat, ydat, zdat]';
-          usingclause{data_idx} = sprintf ("record=%d using ($1):($2):($3)", numel (xdat));
+          usingclause{data_idx} = sprintf ("record=%d using ($1):($2):($3)",
+                                           numel (xdat));
+          hidden_removal = false;
           ## fputs (plot_stream, "set parametric;\n");
         else
           xdat = obj.xdata(:);
           ydat = obj.ydata(:);
           data{data_idx} = [xdat, ydat]';
-          usingclause{data_idx} = sprintf ("record=%d using ($1):($2) axes %s%s",
-                                          rows (xdat), xaxisloc_using, yaxisloc_using);
+          usingclause{data_idx} = ...
+            sprintf ("record=%d using ($1):($2) axes %s%s",
+                     rows (xdat), xaxisloc_using, yaxisloc_using);
         endif
 
         style = do_linestyle_command (obj, obj.color, data_idx, mono,
@@ -601,7 +617,7 @@
           usingclause{data_idx} = usingclause{data_idx - 1};
           data{data_idx} = data{data_idx - 1};
           withclause{data_idx} = sprintf ("with %s linestyle %d",
-                                        style{2}, data_idx);
+                                          style{2}, data_idx);
         endif
         if (length (style) > 2)
           data_idx++;
@@ -613,7 +629,7 @@
           usingclause{data_idx} = usingclause{data_idx - 1};
           data{data_idx} = data{data_idx - 1};
           withclause{data_idx} = sprintf ("with %s linestyle %d",
-                                        style{3}, data_idx);
+                                          style{3}, data_idx);
         endif
 
      case "patch"
@@ -680,7 +696,9 @@
              if (i > 1 || isempty (obj.displayname))
                titlespec{local_idx} = "title \"\"";
              else
-               tmp = undo_string_escapes (__maybe_munge_text__ (enhanced, obj, "displayname"));
+               tmp = undo_string_escapes (
+                       __maybe_munge_text__ (enhanced, obj, "displayname")
+                     );
                titlespec{local_idx} = ['title "' tmp '"'];
              endif
              if (isfield (obj, "facecolor"))
@@ -691,12 +709,12 @@
                      && (columns (obj.cdata) == nc
                          && (rows (obj.cdata) == 1
                              || rows (obj.cdata) == 3)))
-                   ccol = cdat (:, i);
+                   ccol = cdat(:, i);
                  elseif (ndims (obj.cdata) == 2
                      && (rows (obj.cdata) == nc
                          && (columns (obj.cdata) == 1
                              || columns (obj.cdata) == 3)))
-                   ccol = cdat (i, :);
+                   ccol = cdat(i, :);
                  elseif (ndims (obj.cdata) == 3)
                    ccol = permute (cdat (:, i, :), [1, 3, 2]);
                  else
@@ -756,6 +774,8 @@
                if (isnan (ccdat))
                  ccdat = (rows (cmap) + rows (addedcmap) + 1) * ones(3, 1);
                  addedcmap = [addedcmap; reshape(color, 1, 3)];
+               elseif (numel (ccdat) <= 1)
+                 ccdat = zcol;
                endif
                data{data_3d_idx} = [data{data_3d_idx}, ...
                                     [[xcol; xcol(end)], [ycol; ycol(end)], ...
@@ -766,7 +786,7 @@
                elseif (__gnuplot_has_feature__ ("transparent_patches")
                        && isscalar (obj.facealpha))
                  colorspec = sprintf ("lc rgb \"#%02x%02x%02x\" fillstyle transparent solid %f",
-                                    round (255*color), obj.facealpha);
+                                      round (255*color), obj.facealpha);
                else
                  colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"",
                                       round (255*color));
@@ -800,12 +820,11 @@
            endif
 
            if (isfield (obj, "edgecolor"))
-             ## FIXME
-             ## This is the wrong thing to do as edgecolor, markeredgecolor
-             ## and markerfacecolor can have different values and we should
-             ## treat them seperately. However, the below allow the scatter
-             ## functions to work as expected, where only one of these values
-             ## is set
+             ## FIXME: This is the wrong thing to do as edgecolor,
+             ## markeredgecolor and markerfacecolor can have different values
+             ## and we should treat them seperately. However, the code below
+             ## allows the scatter functions to work as expected, where only
+             ## one of these values is set.
              if (strcmp (obj.edgecolor, "none"))
                if (strcmp (obj.markeredgecolor, "none"))
                  ec = obj.markerfacecolor;
@@ -823,12 +842,12 @@
                    && (columns (obj.cdata) == nc
                        && (rows (obj.cdata) == 1
                            || rows (obj.cdata) == 3)))
-                 ccol = cdat (:, i);
+                 ccol = cdat(:, i);
                elseif (ndims (obj.cdata) == 2
                        && (rows (obj.cdata) == nc
                            && (columns (obj.cdata) == 1
                                || columns (obj.cdata) == 3)))
-                 ccol = cdat (i, :);
+                 ccol = cdat(i, :);
                elseif (ndims (obj.cdata) == 3)
                  ccol = permute (cdat (:, i, :), [1, 3, 2]);
                else
@@ -887,7 +906,7 @@
            if (isfield (obj, "linewidth"))
              lw = sprintf ("linewidth %f", obj.linewidth);
            else
-             lw  = "";
+             lw = "";
            endif
 
            [pt, pt2, obj] = gnuplot_pointtype (obj);
@@ -919,7 +938,7 @@
 
            facesame = true;
            if (! isequal (pt, pt2) && isfield (obj, "markerfacecolor")
-               && !strcmp (obj.markerfacecolor, "none"))
+               && ! strcmp (obj.markerfacecolor, "none"))
              if (strcmp (obj.markerfacecolor, "auto")
                  || ! isnumeric (obj.markerfacecolor)
                  || (isnumeric (obj.markerfacecolor)
@@ -969,8 +988,8 @@
            endif
 
            if (isfield (obj, "markeredgecolor")
-               && !strcmp (obj.markeredgecolor, "none"))
-             if (facesame && !isempty (pt)
+               && ! strcmp (obj.markeredgecolor, "none"))
+             if (facesame && ! isempty (pt)
                  && (strcmp (obj.markeredgecolor, "auto")
                      || ! isnumeric (obj.markeredgecolor)
                      || (isnumeric (obj.markeredgecolor)
@@ -994,7 +1013,7 @@
                                           colorspec);
                endif
              else
-               if (!isempty (style))
+               if (! isempty (style))
                  if (length (tmpwith) < sidx || isempty (tmpwith{sidx}))
                    tmpwith{sidx} = sprintf ("with %s %s %s %s",
                                             style, lw, lt,
@@ -1003,7 +1022,7 @@
                  sidx ++;
                endif
 
-               if (!isempty (pt))
+               if (! isempty (pt))
                  if (! mono)
                    if (strcmp (obj.markeredgecolor, "auto"))
                      colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"",
@@ -1116,7 +1135,9 @@
           if (isempty (obj.displayname))
             titlespec{data_idx} = "title \"\"";
           else
-            tmp = undo_string_escapes (__maybe_munge_text__ (enhanced, obj, "displayname"));
+            tmp = undo_string_escapes (
+                    __maybe_munge_text__ (enhanced, obj, "displayname")
+                  );
             titlespec{data_idx} = ['title "' tmp '"'];
           endif
           withclause{data_idx} = sprintf ("with pm3d linestyle %d",
@@ -1187,7 +1208,7 @@
           fputs (plot_stream, "set style increment default;\n");
           if (flat_interp_edge && facecolor_none_or_white)
             withpm3d = false;
-            withclause{data_idx} = sprintf ("with %s palette", style {1});
+            withclause{data_idx} = sprintf ("with %s palette", style{1});
             fputs (plot_stream, "unset pm3d\n");
             if (all (obj.facecolor == 1))
               hidden_removal = true;
@@ -1212,9 +1233,10 @@
           endif
 
           if (flat_interp_face && strcmp (obj.edgecolor, "flat"))
-            fprintf (plot_stream, "set pm3d explicit at s %s %s corners2color c3;\n",
+            fprintf (plot_stream,
+                     "set pm3d explicit at s %s %s corners2color c3;\n",
                      interp_str, dord);
-          elseif (!facecolor_none_or_white)
+          elseif (! facecolor_none_or_white)
             if (strcmp (obj.edgecolor, "none"))
               if (__gnuplot_has_feature__ ("transparent_surface")
                   && isscalar (obj.facealpha))
@@ -1222,10 +1244,12 @@
                          "set style fill transparent solid %f;\n",
                          obj.facealpha);
               endif
-              fprintf (plot_stream, "set pm3d explicit at s %s corners2color c3;\n",
+              fprintf (plot_stream,
+                       "set pm3d explicit at s %s corners2color c3;\n",
                        interp_str, dord);
             else
-              fprintf (plot_stream, "set pm3d explicit at s hidden3d %d %s %s corners2color c3;\n",
+              fprintf (plot_stream,
+                       "set pm3d explicit at s hidden3d %d %s %s corners2color c3;\n",
                        data_idx, interp_str, dord);
 
               if (__gnuplot_has_feature__ ("transparent_surface")
@@ -1324,6 +1348,7 @@
 
         if (ischar (obj.string))
           num_lines = rows (obj.string);
+          num_lines += numel (strfind (obj.string, "\n"));
         else
           num_lines = numel (obj.string);
         endif
@@ -1380,7 +1405,7 @@
 
   ## This is need to prevent warnings for rotations in 3D plots, while
   ## allowing colorbars with contours.
-  if (nd == 2 || (data_idx > 1 && !view_map))
+  if (nd == 2 || (data_idx > 1 && ! view_map))
     fputs (plot_stream, "set pm3d implicit;\n");
   else
     fputs (plot_stream, "set pm3d explicit;\n");
@@ -1444,8 +1469,8 @@
             data{i}(end,:) = clim(2) * (data{i}(end, :) - 0.5) / cmap_sz;
            endif
         endfor
-        fprintf (plot_stream, "set cbrange [%.15e:%.15e];\n", clim(1), clim(2) *
-                 (cmap_sz + rows (addedcmap)) / cmap_sz);
+        fprintf (plot_stream, "set cbrange [%.15e:%.15e];\n",
+                 clim(1), clim(2) * (cmap_sz + rows (addedcmap)) / cmap_sz);
       else
         fprintf (plot_stream, "set cbrange [%.15e:%.15e];\n", clim);
       endif
@@ -1469,12 +1494,10 @@
         fprintf (plot_stream, "unset ytics; set y2tics %s nomirror\n",
                  axis_obj.tickdir);
         if (strcmpi (axis_obj.xaxislocation, "top"))
-          fprintf (plot_stream, "unset xtics; set x2tics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_x2tick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 12;\n");
         elseif (strcmpi (axis_obj.xaxislocation, "bottom"))
-          fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_xtick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 9;\n");
         else # xaxislocation == zero
           fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
@@ -1487,16 +1510,13 @@
         fprintf (plot_stream, "unset y2tics; set ytics %s nomirror\n",
                  axis_obj.tickdir);
         if (strcmpi (axis_obj.xaxislocation, "top"))
-          fprintf (plot_stream, "unset xtics; set x2tics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_x2tick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 6;\n");
         elseif (strcmpi (axis_obj.xaxislocation, "bottom"))
-          fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_xtick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 3;\n");
         else # xaxislocation == zero
-          fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_xtick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 2;\n");
           fprintf (plot_stream, "set xzeroaxis lt -1 lw %f;\n",
                    axis_obj.linewidth);
@@ -1505,18 +1525,15 @@
         fprintf (plot_stream, "unset y2tics; set ytics %s nomirror\n",
                  axis_obj.tickdir);
         if (strcmpi (axis_obj.xaxislocation, "top"))
-          fprintf (plot_stream, "unset xtics; set x2tics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_x2tick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 4;\n");
         elseif (strcmpi (axis_obj.xaxislocation, "bottom"))
-          fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
-                   axis_obj.tickdir);
+          maybe_do_xtick_mirror (plot_stream, axis_obj)
           fputs (plot_stream, "set border 1;\n");
         else # xaxislocation == zero
+          maybe_do_xtick_mirror (plot_stream, axis_obj)
           fprintf (plot_stream, "unset y2tics; set ytics %s nomirror\n",
                    axis_obj.tickdir);
-          fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
-                   axis_obj.tickdir);
           fputs (plot_stream, "unset border;\n");
           fprintf (plot_stream, "set xzeroaxis lt -1 lw %f;\n",
                    axis_obj.linewidth);
@@ -1587,9 +1604,10 @@
     endswitch
     if (__gnuplot_has_feature__ ("key_has_font_properties"))
       [fontname, fontsize] = get_fontname_and_size (hlgnd);
-      fontspec = create_fontspec (fontname, fontsize, gnuplot_term);
+      fontspacespec = [ create_spacingspec(fontname, fontsize, gnuplot_term),...
+                        create_fontspec(fontname, fontsize, gnuplot_term) ];
     else
-      fontspec = "";
+      fontspacespec = "";
     endif
     textcolors = get (findobj (hlgnd.children, "type", "text"), "color");
     if (iscell (textcolors))
@@ -1605,7 +1623,7 @@
       colorspec = get_text_colorspec (textcolors, mono);
     endif
     fprintf (plot_stream, "set key %s %s;\nset key %s %s %s %s %s %s;\n",
-             inout, pos, box, reverse, horzvert, fontspec, colorspec,
+             inout, pos, box, reverse, horzvert, fontspacespec, colorspec,
              __do_enhanced_option__ (enhanced, hlgnd));
   else
     fputs (plot_stream, "unset key;\n");
@@ -1614,7 +1632,7 @@
 
   cmap = [cmap; addedcmap];
   cmap_sz = cmap_sz + rows (addedcmap);
-  if (length (cmap) > 0)
+  if (mono == false && length (cmap) > 0)
     fprintf (plot_stream,
              "set palette positive color model RGB maxcolors %i;\n",
              cmap_sz);
@@ -1659,8 +1677,8 @@
       fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd,
                usingclause{1}, titlespec{1}, withclause{1});
     else
-      fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd,
-               usingclause{1}, titlespec{1}, withclause{1});
+      fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n",
+               plot_cmd, usingclause{1}, titlespec{1}, withclause{1});
     endif
     for i = 2:data_idx
       if (have_3d_patch (i))
@@ -1700,8 +1718,8 @@
           fputs (plot_stream, "unset obj 2; \\\n");
           fg_is_set = false;
         endif
-        fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd,
-                 usingclause{i}, titlespec{i}, withclause{i});
+        fprintf (plot_stream,"%s \"-\" binary format='%%float64' %s %s %s \\\n",
+                 plot_cmd, usingclause{i}, titlespec{i}, withclause{i});
       else
         fprintf (plot_stream, ", \"-\" binary format='%%float64' %s %s %s \\\n",
                  usingclause{i}, titlespec{i}, withclause{i});
@@ -1718,7 +1736,7 @@
             fputs (plot_stream, "\n\n");
           endif
           fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n", data{i}(:,j).');
-          fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n\n", data{i}(:,j+1).');
+          fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n\n",data{i}(:,j+1).');
           fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n", data{i}(:,j+2).');
           fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n", data{i}(:,j+3).');
         endfor
@@ -1758,6 +1776,21 @@
   endif
 endfunction
 
+function spacing_spec = create_spacingspec (f, s, gp_term)
+  ## The gnuplot default font size is 10, and default spacing is 1.25.
+  ## gnuplot has a concept of a figure global font, and sizes everything
+  ## appropriate to that, including the legend spacing.
+  ##
+  ## This means that if an alternative size is used, gnuplot will use an
+  ## inappropriate spacing in the legend by default.
+  ##
+  ## FIXME: Are fractional spacing specifications allowed?  Or should this
+  ##        number be rounded?
+  spc = s / 10 * 1.25;
+  spacing_spec = sprintf ("spacing %d", spc);
+
+endfunction
+
 function fontspec = create_fontspec (f, s, gp_term)
   if (strcmp (f, "*") || strcmp (gp_term, "tikz"))
     fontspec = sprintf ("font \",%d\"", s);
@@ -1825,21 +1858,21 @@
   sidx = 1;
   if (isempty (errbars))
     if (isempty (lt))
-      style {sidx} = "";
+      style{sidx} = "";
     else
-      style {sidx} = "lines";
+      style{sidx} = "lines";
     endif
 
     facesame = true;
     if (! isequal (pt, pt2) && isfield (obj, "markerfacecolor")
-        && !strcmp (obj.markerfacecolor, "none"))
+        && ! strcmp (obj.markerfacecolor, "none"))
       if (strcmp (obj.markerfacecolor, "auto")
           || ! isnumeric (obj.markerfacecolor)
           || (isnumeric (obj.markerfacecolor)
               && isequal (color, obj.markerfacecolor)))
         if (! isempty (pt2))
           fprintf (plot_stream, " pointtype %s", pt2);
-          style {sidx} = strcat (style{sidx}, "points");
+          style{sidx} = strcat (style{sidx}, "points");
         endif
         if (isfield (obj, "markersize"))
           fprintf (plot_stream, " pointsize %f", obj.markersize / 3);
@@ -1850,7 +1883,7 @@
           fputs (plot_stream, " default");
         endif
         fputs (plot_stream, ";\n");
-        if (! isempty (style {sidx}))
+        if (! isempty (style{sidx}))
           sidx ++;
           idx ++;
         else
@@ -1863,7 +1896,7 @@
                    round (255*obj.markerfacecolor));
         endif
         if (! isempty (pt2))
-          style {sidx} = "points";
+          style{sidx} = "points";
           fprintf (plot_stream, " pointtype %s", pt2);
         endif
         if (isfield (obj, "markersize"))
@@ -1872,16 +1905,16 @@
       endif
     endif
     if (isfield (obj, "markeredgecolor")
-        && !strcmp (obj.markeredgecolor, "none"))
-      if (facesame && !isempty (pt)
+        && ! strcmp (obj.markeredgecolor, "none"))
+      if (facesame && ! isempty (pt)
           && (strcmp (obj.markeredgecolor, "auto")
               || ! isnumeric (obj.markeredgecolor)
               || (isnumeric (obj.markeredgecolor)
                   && isequal (color, obj.markeredgecolor))))
-        if (sidx == 1 && ((length (style {sidx}) == 5
-            && strncmp (style{sidx}, "lines", 5)) || isempty (style {sidx})))
+        if (sidx == 1 && ((length (style{sidx}) == 5
+            && strncmp (style{sidx}, "lines", 5)) || isempty (style{sidx})))
           if (! isempty (pt))
-            style {sidx} = strcat (style{sidx}, "points");
+            style{sidx} = strcat (style{sidx}, "points");
             fprintf (plot_stream, " pointtype %s", pt);
           endif
           if (isfield (obj, "markersize"))
@@ -1893,7 +1926,7 @@
           fputs (plot_stream, " default");
         endif
         fputs (plot_stream, ";\n");
-        if (!isempty (style {sidx}))
+        if (! isempty (style{sidx}))
           sidx ++;
           idx ++;
         else
@@ -1911,7 +1944,7 @@
           endif
         endif
         if (! isempty (pt))
-          style {sidx} = "points";
+          style{sidx} = "points";
           fprintf (plot_stream, " pointtype %s", pt);
         endif
         if (isfield (obj, "markersize"))
@@ -1924,7 +1957,7 @@
     fputs (plot_stream, " pointtype 0");
   endif
 
-  if (! found_style && isempty (style {1}))
+  if (! found_style && isempty (style{1}))
     fputs (plot_stream, " default");
   endif
 
@@ -1969,19 +2002,19 @@
         pt = "10";
         pt2 = "11";
       case ">"
-        ## FIXME: should be triangle pointing right, use triangle pointing up
+        ## FIXME: Should be triangle pointing right, use triangle pointing up
         pt = "8";
         pt2 = "9";
       case "<"
-        ## FIXME: should be triangle pointing left, use triangle pointing down
+        ## FIXME: Should be triangle pointing left, use triangle pointing down
         pt = "10";
         pt2 = "11";
       case {"pentagram", "p"}
-        ## FIXME: should be pentagram, using pentagon
+        ## FIXME: Should be pentagram, using pentagon
         pt = "14";
         pt2 = "15";
       case {"hexagram", "h"}
-        ## FIXME: should be 6 pt start, using "*" instead
+        ## FIXME: Should be 6 pt start, using "*" instead
         pt = pt2 = "3";
       case "none"
         pt = pt2 = "";
@@ -1997,7 +2030,7 @@
 
   ## DATA is already transposed.
 
-  ## FIXME -- this may need to be converted to C++ for speed.
+  ## FIXME: this may need to be converted to C++ for speed.
 
   ## Convert NA elements to normal NaN values because fprintf writes
   ## "NA" and that confuses gnuplot.
@@ -2115,6 +2148,13 @@
                     plot_stream, mirror, mono, axispos, tickdir, ticklength,
                     fontname, fontspec, interpreter, scale, sgn, gnuplot_term)
   persistent warned_latex = false;
+
+  ## Avoid emitting anything if the tics are empty, because this undoes the
+  ## effect of the previous unset xtics and thereby adds back in the tics.
+  if (isempty (tics))
+    return;
+  endif
+
   if (mirror)
     mirror = "mirror";
   else
@@ -2145,54 +2185,38 @@
     num_mtics = 5;
   endif
   colorspec = get_text_colorspec (color, mono);
-  if (strcmpi (ticmode, "manual") || strcmpi (labelmode, "manual"))
+  fprintf (plot_stream, "set format %s \"%s\";\n", ax, fmt);
+  if (strcmpi (ticmode, "manual"))
     if (isempty (tics))
       fprintf (plot_stream, "unset %stics;\nunset m%stics;\n", ax, ax);
       return
     endif
-    if (strcmpi (ticmode, "manual"))
-      fprintf (plot_stream, "set format %s \"%s\";\n", ax, fmt);
-      fprintf (plot_stream, "set %stics %s %s %s %s (", ax, tickdir,
-               ticklength, axispos, mirror);
-      fprintf (plot_stream, " %.15g,", tics(1:end-1));
-      fprintf (plot_stream, " %.15g) %s;\n", tics(end), fontspec);
-    endif
-    if (strcmpi (labelmode, "manual"))
-      if (ischar (labels))
-        labels = cellstr (labels);
-      endif
-      if (isnumeric (labels))
-        labels = num2str (real (labels(:)));
-      endif
-      if (ischar (labels))
-        labels = permute (cellstr (labels), [2, 1]);
-      endif
-      if (iscellstr (labels))
-        k = 1;
-        ntics = numel (tics);
-        nlabels = numel (labels);
-        fprintf (plot_stream, "set %stics add %s %s %s %s (", ax,
-                 tickdir, ticklength, axispos, mirror);
-        labels = strrep (labels, "%", "%%");
-        for i = 1:ntics
-          fprintf (plot_stream, " \"%s\" %.15g", labels{k++}, tics(i));
-          if (i < ntics)
-            fputs (plot_stream, ", ");
-          endif
-          if (k > nlabels)
-            k = 1;
-          endif
-        endfor
-        fprintf (plot_stream, ") %s %s;\n", colorspec, fontspec);
-      else
-        error ("__go_draw_axes__: unsupported type of ticklabel");
-      endif
-    endif
+    fprintf (plot_stream, "set %stics %s %s %s %s (", ax, tickdir,
+             ticklength, axispos, mirror);
+    fprintf (plot_stream, " %.15e,", tics(1:end-1));
+    fprintf (plot_stream, " %.15e) %s;\n", tics(end), fontspec);
   else
-    fprintf (plot_stream, "set format %s \"%s\";\n", ax, fmt);
     fprintf (plot_stream, "set %stics %s %s %s %s %s %s;\n", ax,
              tickdir, ticklength, axispos, mirror, colorspec, fontspec);
   endif
+  if (strcmpi (labelmode, "manual"))
+    k = 1;
+    ntics = numel (tics);
+    nlabels = numel (labels);
+    fprintf (plot_stream, "set %stics add %s %s %s %s (", ax,
+             tickdir, ticklength, axispos, mirror);
+    labels = strrep (labels, "%", "%%");
+    for i = 1:ntics
+      fprintf (plot_stream, " \"%s\" %.15g", labels{k++}, tics(i));
+      if (i < ntics)
+        fputs (plot_stream, ", ");
+      endif
+      if (k > nlabels)
+        k = 1;
+      endif
+    endfor
+    fprintf (plot_stream, ") %s %s;\n", colorspec, fontspec);
+  endif
   if (strcmp (mtics, "on"))
     fprintf (plot_stream, "set m%stics %d;\n", ax, num_mtics);
   else
@@ -2201,20 +2225,12 @@
 endfunction
 
 function ticklabel = ticklabel_to_cell (ticklabel)
-  if (isnumeric (ticklabel))
-    ## Use upto 5 significant digits
-    ticklabel = num2str (ticklabel(:), 5);
-  endif
   if (ischar (ticklabel))
-    if (rows (ticklabel) == 1 && any (ticklabel == "|"))
-      ticklabel = ostrsplit (ticklabel, "|");
-    else
-      ticklabel = cellstr (ticklabel);
-    endif
-  elseif (isempty (ticklabel))
-    ticklabel = {""};
+    ticklabel = cellstr (ticklabel);
+  elseif (iscellstr (ticklabel))
+    ticklabel = ticklabel;
   else
-    ticklabel = ticklabel;
+    error ("__go_draw_axes__: unsupported type of ticklabel");
   endif
 endfunction
 
@@ -2274,7 +2290,7 @@
     bld = false;
   endif
 
-  ## The text object maybe multiline, and may be of any class
+  ## The text object may be multiline, and may be of any class
   str = getfield (obj, fld);
   if (ischar (str) && rows (str) > 1)
     str = cellstr (str);
@@ -2291,6 +2307,10 @@
   endif
 
   if (enhanced)
+    str = regexprep (str, '(?<!\\)@', '\@');
+  endif
+
+  if (enhanced)
     if (strcmpi (obj.interpreter, "tex"))
       if (iscellstr (str))
         for n = 1:numel (str)
@@ -2315,14 +2335,14 @@
   [s, e, m] = regexp (str, "\\\\([a-zA-Z]+|0)", "start", "end", "matches");
 
   for i = length (s) : -1 : 1
-    ## special case for "\0"  and replace with "{/Symbol \306}'
+    ## special case for "\0"  and replace with empty set "{/Symbol \306}'
     if (strncmp (m{i}, '\0', 2))
       str = [str(1:s(i) - 1) '{/Symbol \306}' str(s(i) + 2:end)];
     else
       f = m{i}(2:end);
       if (isfield (sym, f))
         g = getfield (sym, f);
-        ## FIXME The symbol font doesn't seem to support bold or italic
+        ## FIXME: The symbol font doesn't seem to support bold or italic
         ##if (bld)
         ##  if (it)
         ##    g = regexprep (g, '/Symbol', '/Symbol-bolditalic');
@@ -2352,7 +2372,7 @@
           str = [str(1:s(i) - 1) '/' fnt '-bold ' str(s(i) + 3:end)];
         endif
       elseif (strcmpi (f, "color"))
-        ## FIXME Ignore \color but remove trailing {} block as well
+        ## FIXME: Ignore \color but remove trailing {} block as well
         d = strfind (str(e(i) + 1:end),'}');
         if (isempty (d))
           warning ('syntax error in \color argument');
@@ -2383,7 +2403,7 @@
         for j = 1 : length (flds)
           if (strncmp (flds{j}, f, length (flds{j})))
             g = getfield (sym, flds{j});
-            ## FIXME The symbol font doesn't seem to support bold or italic
+            ## FIXME: The symbol font doesn't seem to support bold or italic
             ##if (bld)
             ##  if (it)
             ##    g = regexprep (g, '/Symbol', '/Symbol-bolditalic');
@@ -2401,13 +2421,13 @@
     endif
   endfor
 
-  ## Prepend @ to things  things like _0^x or _{-100}^{100} for
-  ## alignment But need to put the shorter of the two arguments first.
-  ## Carful of nested {} and unprinted characters when defining
-  ## shortest.. Don't have to worry about things like ^\theta as they
+  ## Prepend @ to things like _0^x or _{-100}^{100} for alignment.
+  ## But need to put the shorter of the two arguments first.
+  ## Careful of nested {} and unprinted characters when defining
+  ## shortest..  Don't have to worry about things like ^\theta as they
   ## are already converted to ^{/Symbol q}.
 
-  ## FIXME -- This is a mess... Is it worth it just for a "@" character?
+  ## FIXME: This is a mess... Is it worth it just for a "@" character?
 
   [s, m] = regexp (str,'[_\^]','start','matches');
   i = 1;
@@ -2486,7 +2506,7 @@
 function l = length_string (s)
   l = length (s) - length (strfind (s,'{')) - length (strfind (s,'}'));
   m = regexp (s, '/([\w-]+|[\w-]+=\d+)', 'matches');
-  if (!isempty (m))
+  if (! isempty (m))
     l = l - sum (cellfun ("length", m));
   endif
 endfunction
@@ -2519,12 +2539,12 @@
   sym.gamma = '{/Symbol g}';
   sym.eta = '{/Symbol h}';
   sym.iota = '{/Symbol i}';
-  sym.varphi = '{/Symbol j}';
+  sym.varphi = '{/Symbol j}';              # Not in OpenGL
   sym.kappa = '{/Symbol k}';
   sym.lambda = '{/Symbol l}';
   sym.mu = '{/Symbol m}';
   sym.nu = '{/Symbol n}';
-  sym.o =  '{/Symbol o}';
+  sym.o = '{/Symbol o}';
   sym.pi = '{/Symbol p}';
   sym.theta = '{/Symbol q}';
   sym.rho = '{/Symbol r}';
@@ -2550,7 +2570,9 @@
   sym.uparrow = '{/Symbol \255}';
   sym.rightarrow = '{/Symbol \256}';
   sym.downarrow = '{/Symbol \257}';
-  sym.circ = '{/Symbol \260}';
+  sym.circ = '{/Symbol \260}';         # degree symbol, not circ as in FLTK
+  sym.deg = '{/Symbol \260}';
+  sym.ast = '{/Symbol *}';
   sym.pm = '{/Symbol \261}';
   sym.geq = '{/Symbol \263}';
   sym.times = '{/Symbol \264}';
@@ -2569,6 +2591,7 @@
   sym.wp = '{/Symbol \303}';
   sym.otimes = '{/Symbol \304}';
   sym.oplus = '{/Symbol \305}';
+  ## empty set, not circled slash division operator as in FLTK.
   sym.oslash = '{/Symbol \306}';
   sym.cap = '{/Symbol \307}';
   sym.cup = '{/Symbol \310}';
@@ -2577,29 +2600,29 @@
   sym.subset = '{/Symbol \314}';
   sym.subseteq = '{/Symbol \315}';
   sym.in = '{/Symbol \316}';
-  sym.notin = '{/Symbol \317}';
+  sym.notin = '{/Symbol \317}';            # Not in OpenGL
   sym.angle = '{/Symbol \320}';
-  sym.bigtriangledown = '{/Symbol \321}';
+  sym.bigtriangledown = '{/Symbol \321}';  # Not in OpenGL
   sym.langle = '{/Symbol \341}';
   sym.rangle = '{/Symbol \361}';
   sym.nabla = '{/Symbol \321}';
-  sym.prod = '{/Symbol \325}';
+  sym.prod = '{/Symbol \325}';             # Not in OpenGL
   sym.surd = '{/Symbol \326}';
   sym.cdot = '{/Symbol \327}';
   sym.neg = '{/Symbol \330}';
   sym.wedge = '{/Symbol \331}';
   sym.vee = '{/Symbol \332}';
-  sym.Leftrightarrow = '{/Symbol \333}';
+  sym.Leftrightarrow = '{/Symbol \333}';   # Not in OpenGL
   sym.Leftarrow = '{/Symbol \334}';
-  sym.Uparrow = '{/Symbol \335}';
+  sym.Uparrow = '{/Symbol \335}';          # Not in OpenGL
   sym.Rightarrow = '{/Symbol \336}';
-  sym.Downarrow = '{/Symbol \337}';
-  sym.diamond = '{/Symbol \340}';
+  sym.Downarrow = '{/Symbol \337}';        # Not in OpenGL
+  sym.diamond = '{/Symbol \340}';          # Not in OpenGL
   sym.copyright = '{/Symbol \343}';
   sym.lfloor = '{/Symbol \353}';
-  sym.lceil  = '{/Symbol \351}';
+  sym.lceil = '{/Symbol \351}';
   sym.rfloor = '{/Symbol \373}';
-  sym.rceil  = '{/Symbol \371}';
+  sym.rceil = '{/Symbol \371}';
   sym.int = '{/Symbol \362}';
 endfunction
 
@@ -2614,3 +2637,16 @@
   endif
 endfunction
 
+function maybe_do_xtick_mirror (plot_stream, axis_obj)
+  if (! isempty(axis_obj.xtick))
+    fprintf (plot_stream, "unset x2tics; set xtics %s nomirror\n",
+                          axis_obj.tickdir);
+  endif
+endfunction
+
+function maybe_do_x2tick_mirror (plot_stream, axis_obj)
+  if (! isempty(axis_obj.xtick))
+    fprintf (plot_stream, "unset xtics; set x2tics %s nomirror\n",
+                          axis_obj.tickdir);
+  endif
+endfunction
--- a/scripts/plot/util/private/__go_draw_figure__.m
+++ b/scripts/plot/util/private/__go_draw_figure__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
       fputs (plot_stream, "set size 1, 1\n");
       bg = get (h, "color");
       if (isnumeric (bg))
-        fprintf (plot_stream, "set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb \"#%02x%02x%02x\"\n", 255 * bg);
+        fprintf (plot_stream, "set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb \"#%02x%02x%02x\" fs solid noborder\n", round (255 * bg));
         bg_is_set = true;
       else
         bg_is_set = false;
@@ -104,7 +104,7 @@
                     endfor
 
                     if (! isempty (ll))
-                      if (!isempty (lm))
+                      if (! isempty (lm))
                         toberm = [toberm, line("xdata",[0,0],"ydata",[0,0], "color", get(lm,"color"), "linestyle", get(ll,"linestyle"), "marker", get(lm,"marker"), "markeredgecolor", get(lm,"markeredgecolor"), "markerfacecolor", get(lm,"markerfacecolor"), "markersize", get (lm, "markersize"), "displayname", displayname, "parent", kids(i))];
                       else
                         toberm = [toberm, line("xdata",[0,0],"ydata",[0,0], "color", get(ll,"color"), "linestyle", get(ll,"linestyle"), "marker", "none", "displayname", displayname, "parent", kids(i))];
@@ -114,7 +114,7 @@
                     endif
                   endfor
                   if (bg_is_set)
-                    fprintf (plot_stream, "set border linecolor rgb \"#%02x%02x%02x\"\n", 255 * (1 - bg));
+                    fprintf (plot_stream, "set border linecolor rgb \"#%02x%02x%02x\"\n", round (255 * (1 - bg)));
                   endif
                   __go_draw_axes__ (kids(i), plot_stream, enhanced, mono,
                                     bg_is_set, false, hlgnd);
@@ -140,7 +140,7 @@
                 set (kids(i), "units", "normalized");
                 fg = get (kids(i), "color");
                 if (isnumeric (fg) && strcmp (get (kids(i), "visible"), "on"))
-                  fprintf (plot_stream, "set obj 2 rectangle from graph 0,0 to graph 1,1 behind fc rgb \"#%02x%02x%02x\"\n", 255 * fg);
+                  fprintf (plot_stream, "set obj 2 rectangle from graph 0,0 to graph 1,1 behind fc rgb \"#%02x%02x%02x\" fs solid noborder\n", round (255 * fg));
                   fg_is_set = true;
                   fg_was_set = true;
                 elseif (fg_was_set)
@@ -151,7 +151,7 @@
                   fg_is_set = false;
                 endif
                 if (bg_is_set)
-                  fprintf (plot_stream, "set border linecolor rgb \"#%02x%02x%02x\"\n", 255 * (1 - bg));
+                  fprintf (plot_stream, "set border linecolor rgb \"#%02x%02x%02x\"\n", round (255 * (1 - bg)));
                 endif
                 ## Find if this axes has an associated legend axes and pass it
                 ## to __go_draw_axes__
rename from scripts/plot/util/private/__fltk_print__.m
rename to scripts/plot/util/private/__opengl_print__.m
--- a/scripts/plot/util/private/__fltk_print__.m
+++ b/scripts/plot/util/private/__opengl_print__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Shai Ayal
+## Copyright (C) 2010-2015 Shai Ayal
 ##
 ## This file is part of Octave.
 ##
@@ -17,17 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} __fltk_print__ (@var{@dots{}})
+## @deftypefn {Function File} {} __opengl_print__ (@var{@dots{}})
 ## Undocumented internal function.
 ## @end deftypefn
 
-function opts = __fltk_print__ (opts)
+function opts = __opengl_print__ (opts)
 
   dos_shell = (ispc () && ! isunix ());
 
   set (0, "currentfigure", opts.figure);
   drawnow ("expose");
-  __fltk_redraw__ ();
 
   if (! isempty (opts.fig2dev_binary))
     ## fig2dev is prefered for conversion to emf
@@ -161,9 +160,16 @@
 
   for n = 1:numel (pipeline)
     if (opts.debug)
-      fprintf ("fltk-pipeline: '%s'\n", pipeline{n});
+      fprintf ("opengl-pipeline: '%s'\n", pipeline{n});
     endif
-    drawnow (gl2ps_device{n}, strcat ('|',pipeline{n}));
+
+    if (strcmp (get (opts.figure, "visible"), "on"))
+      ## Use toolkits "print_figure" method
+      drawnow (gl2ps_device{n}, ['|' pipeline{n}]);
+    else
+      ## Use OpenGL offscreen rendering with OSMesa
+      __osmesa_print__ (opts.figure, ['|' pipeline{n}], gl2ps_device{n});
+    endif
   endfor
 
   if (! isempty (strfind (opts.devopt, "standalone")))
--- a/scripts/plot/util/private/__print_parse_opts__.m
+++ b/scripts/plot/util/private/__print_parse_opts__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Shai Ayal
+## Copyright (C) 2010-2015 Shai Ayal
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
   arg_st.ghostscript.debug = false;
   arg_st.ghostscript.device = "";
   arg_st.ghostscript.epscrop = true;
-  arg_st.ghostscript.level = [];
+  arg_st.ghostscript.level = 2;
   arg_st.ghostscript.output = "";
   arg_st.ghostscript.papersize = "";
   arg_st.ghostscript.pageoffset = [];
@@ -156,6 +156,10 @@
         arg_st.ghostscript.resolution = str2double (arg(3:end));
       elseif (length (arg) > 2 && arg(1:2) == "-f")
         arg_st.figure = str2num (arg(3:end));
+      elseif (any (strcmp (arg, {"-painters", "-opengl"})))
+        warning ("print: '%s' accepted for Matlab compatibility, but is ignored", arg);
+      elseif (strcmp (arg, "-noui"))
+        warning ("print: option '-noui' not yet implemented");
       elseif (length (arg) >= 1 && arg(1) == "-")
         error ("print: unknown option '%s'", arg);
       elseif (length (arg) > 0)
@@ -225,7 +229,7 @@
               "pcx24b", "pcx256", "pcx16", "pgm", "pgmraw", ...
               "ppm", "ppmraw", "pdflatex", "texdraw", ...
               "pdfcairo", "pngcairo", "pstricks", ...
-              "epswrite", "pswrite", "ps2write", "pdfwrite"};
+              "epswrite", "eps2write", "pswrite", "ps2write", "pdfwrite"};
 
   suffixes = {"ai", "cdr", "fig", "png", "jpg", ...
               "gif", "pbm", "pbm", "dxf", "mf", ...
@@ -237,7 +241,7 @@
               "pcx", "pcx", "pcx", "pgm", "pgm", ...
               "ppm", "ppm", "tex", "tex", ...
               "pdf", "png", "tex", ...
-              "eps", "ps", "ps", "pdf"};
+              "eps", "eps", "ps", "ps", "pdf"};
 
   if (isfigure (arg_st.figure))
     __graphics_toolkit__ = get (arg_st.figure, "__graphics_toolkit__");
@@ -253,7 +257,7 @@
 
   match = strcmpi (dev_list, arg_st.devopt);
   if (any (match))
-    default_suffix = suffixes {match};
+    default_suffix = suffixes{match};
   else
     default_suffix = arg_st.devopt;
   endif
@@ -298,13 +302,6 @@
     arg_st.devopt = aliases.(arg_st.devopt);
   endif
 
-  ## FIXME - eps2 & epsc2 needs to be handled
-  if (strcmp (arg_st.devopt, "pswrite"))
-    arg_st.ghostscript.level = 1;
-  elseif (strcmp (arg_st.devopt, "ps2write"))
-    arg_st.ghostscript.level = 2;
-  endif
-
   if ((any (strcmp (arg_st.devopt, gs_device_list))
        && ! arg_st.formatted_for_printing)
       || any (strcmp (arg_st.devopt, {"pswrite", "ps2write", "pdfwrite"})))
@@ -334,10 +331,9 @@
     else
       error ("print: a file name may not specified when spooling to a printer")
     endif
-    if (! any (strcmp (arg_st.devopt, gs_device_list))
-      || ! any (strcmp (arg_st.devopt, {"pswrite", "ps2write"})))
-      ## Only postscript and supported ghostscript devices
-      error ("print: invalid format for spooling to a printer")
+    if (! any (strcmp (arg_st.devopt, gs_device_list)))
+      ## Only supported ghostscript devices
+      error ("print: format must be a valid Ghostscript format for spooling to a printer")
     endif
   elseif (isempty (arg_st.name))
     error ("print: an output file name must be specified")
@@ -353,7 +349,8 @@
       paperposition = [0.25, 2.50, 8.00, 6.00] * 72;
     endif
     arg_st.canvas_size = paperposition(3:4);
-    if (strcmp (__graphics_toolkit__, "gnuplot") && ! arg_st.ghostscript.epscrop)
+    if (strcmp (__graphics_toolkit__, "gnuplot")
+        && ! arg_st.ghostscript.epscrop)
       arg_st.ghostscript.pageoffset = paperposition(1:2) - 50;
     else
       arg_st.ghostscript.pageoffset = paperposition(1:2);
@@ -490,10 +487,11 @@
     endif
     if (isunix ())
       ## Unix - Includes Mac OSX and Cygwin.
-      gs_binaries = horzcat (gs_binaries, {"gs", "gs.exe"});
+      gs_binaries = [gs_binaries, {"gs", "gs.exe"}];
     else
       ## pc - Includes Win32 and mingw.
-      gs_binaries = horzcat (gs_binaries, {"gs.exe", "gswin32c.exe", "gswin64c.exe", "mgs.exe"});
+      gs_binaries = [gs_binaries, ...
+                     {"gs.exe", "gswin32c.exe", "gswin64c.exe", "mgs.exe"}];
     endif
     n = 0;
     while (n < numel (gs_binaries) && isempty (ghostscript_binary))
@@ -581,15 +579,16 @@
     paperposition = convert2points (paperposition, paperunits);
   endif
 
-  ## FIXME - This will be obsoleted by listeners for paper properties.
-  ##         Papersize is tall when portrait,and wide when landscape.
+  ## FIXME: This will be obsoleted by listeners for paper properties.
+  ##        Papersize is tall when portrait,and wide when landscape.
   if ((papersize(1) > papersize(2) && strcmpi (paperorientation, "portrait"))
       || (papersize(1) < papersize(2) && strcmpi (paperorientation, "landscape")))
     papersize = papersize([2,1]);
     paperposition = paperposition([2,1,4,3]);
   endif
 
-  if ((! strcmp (papertype, "<custom>")) && (strcmp (paperorientation, "portrait")))
+  if (! strcmp (papertype, "<custom>")
+      && (strcmp (paperorientation, "portrait")))
     ## For portrait use the ghostscript name
     papersize = papertype;
     papersize(papersize=="-") = "";
@@ -622,15 +621,15 @@
 endfunction
 
 function device_list = gs_device_list ();
-  ## Graphics formats/languages, not priners.
+  ## Graphics formats/languages, not printers.
   device_list = {"bmp16"; "bmp16m"; "bmp256"; "bmp32b"; "bmpgray"; ...
-                 "epswrite"; "jpeg"; "jpegcymk"; "jpeggray"; "pbm"; ...
-                 "pbmraw"; "pcx16"; "pcx24b"; "pcx256"; "pcx2up"; ...
+                 "epswrite"; "eps2write"; "jpeg"; "jpegcymk"; "jpeggray";
+                 "pbm"; "pbmraw"; "pcx16"; "pcx24b"; "pcx256"; "pcx2up"; ...
                  "pcxcmyk"; "pcxgray"; "pcxmono"; "pdfwrite"; "pgm"; ...
                  "pgmraw"; "pgnm"; "pgnmraw"; "png16"; "png16m"; ...
                  "png256"; "png48"; "pngalpha"; "pnggray"; "pngmono"; ...
-                 "pnm"; "pnmraw"; "ppm"; "ppmraw"; "ps2write"; ...
-                 "pswrite"; "tiff12nc"; "tiff24nc"; "tiff32nc"; ...
+                 "pnm"; "pnmraw"; "ppm"; "ppmraw"; "pswrite"; ...
+                 "ps2write"; "tiff12nc"; "tiff24nc"; "tiff32nc"; ...
                  "tiffcrle"; "tiffg3"; "tiffg32d"; "tiffg4"; ...
                  "tiffgray"; "tifflzw"; "tiffpack"; "tiffsep"};
 endfunction
@@ -641,14 +640,14 @@
   ##
   ## eps, epsc, eps2, epsc2 are not included here because those are
   ## are generated by the graphics toolkit.
-  aliases.bmp = "bmp32b";
-  aliases.pdf = "pdfwrite";
-  aliases.png = "png16m";
-  aliases.ps = "pswrite";
-  aliases.ps2 = "ps2write";
-  aliases.psc = "pswrite";
-  aliases.psc2 = "ps2write";
-  aliases.tiff = "tiff24nc";
+  aliases.bmp   = "bmp32b";
+  aliases.pdf   = "pdfwrite";
+  aliases.png   = "png16m";
+  aliases.ps    = "ps2write";
+  aliases.ps2   = "ps2write";
+  aliases.psc   = "ps2write";
+  aliases.psc2  = "ps2write";
+  aliases.tiff  = "tiff24nc";
   aliases.tiffn = "tiff24nc";
 endfunction
 
--- a/scripts/plot/util/private/__tight_eps_bbox__.m
+++ b/scripts/plot/util/private/__tight_eps_bbox__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/refresh.m
+++ b/scripts/plot/util/refresh.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/refreshdata.m
+++ b/scripts/plot/util/refreshdata.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -90,7 +90,7 @@
     ## properties that are not, in fact, datasources.
     ## m = regexp (flds, '^.+datasource$');
     m = strfind (flds, "datasource");
-    m = flds(!cellfun (@isempty, m));
+    m = flds(! cellfun (@isempty, m));
     for j = 1 : numel (m)
       if (isempty (obj.(m{j})))
         continue;  # datasource field doesn't point to anything
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/rotate.m
@@ -0,0 +1,188 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} rotate (@var{h}, @var{dir}, @var{alpha})
+## @deftypefnx {Function File} {} rotate (@dots{}, @var{origin})
+## Rotate the plot object @var{h} through @var{alpha} degrees around
+## the line with direction @var{dir} and origin @var{origin}.
+##
+## The default value of @var{origin} is the center of the axes
+## object that is the parent of @var{h}.
+##
+## If @var{h} is a vector of handles, they must all have the same
+## parent axes object.
+##
+## Graphics objects that may be rotated are lines, surfaces, patches,
+## and images.
+## @end deftypefn
+
+function rotate (h, direction, alpha, origin)
+
+  ## Note in doc string about compatibility issues with calculation of
+  ## default origin due to possible differences in the auto-scaling
+  ## algorithm between Octave and Matlab.
+
+  if (nargin < 3 || nargin > 4)
+    print_usage ();
+  endif
+
+  is_h = ishandle (h);
+  if (is_h)
+    ax_list = get (h, "parent");
+    if (iscell (ax_list))
+      ax_list = cell2mat (ax_list);
+    endif
+    if (ax_list == ax_list(1))
+      ax = ax_list(1);
+    else
+       error ("rotate: all handles must be children of the same axes object");
+    endif
+  else
+    error ("rotate: H must be an array of one or more graphics handles");
+  endif
+
+  if (! (isnumeric (direction) && numel (direction) == 3))
+    error ("rotate: invalid direction");
+  endif
+
+  if (! (isnumeric (alpha) && isscalar (alpha)))
+    error ("rotate: invalid rotation angle");
+  endif
+
+  t = get (h, "type");
+
+  is_image = strcmp (t, "image");
+  is_line = strcmp (t, "line");
+  is_patch = strcmp (t, "patch");
+  is_surface = strcmp (t, "surface");
+
+  if (! all (is_image | is_line | is_patch | is_surface))
+    error ("rotate: expecting image, line, patch, or surface objects");
+  endif
+
+  if (nargin == 4)
+    if (! (isnumeric (origin) && numel (origin) == 3))
+       error ("rotate: invalid origin");
+    endif
+  else
+    ## Should Z limit be considered when computing origin?
+
+    use_zlim = any (is_patch | is_surface);
+
+    if (! use_zlim && any (is_line))
+      idx = find (is_line)';
+      for i = idx
+        if (! isempty (get (h(i), "zdata")))
+          use_zlim = true;
+          break;
+        endif
+      endfor
+    endif
+
+    xlim = get (ax, "xlim");
+    ylim = get (ax, "ylim");
+
+    a = (xlim(1) + xlim(2)) / 2;
+    b = (ylim(1) + ylim(2)) / 2;
+
+    if (use_zlim)
+      zlim = get (ax, "zlim");
+      c = (zlim(1) + zlim(2)) / 2;
+    else
+      c = 0;
+    endif
+
+    origin = [a, b, c];
+  endif
+
+  direction = direction / norm (direction);
+
+  u = direction(1);
+  v = direction(2);
+  w = direction(3);
+
+  a = origin(1);
+  b = origin(2);
+  c = origin(3);
+
+  sa = sind (alpha);
+  ca = cosd (alpha);
+
+  for i = 1:numel (h)
+    x = get (h(i), "xdata");
+    y = get (h(i), "ydata");
+
+    if (is_image(i))
+      z = zeros (size (x));
+    else
+      z = get (h(i), "zdata");
+      if (isempty (z))
+        z = zeros (size (x));
+      elseif (isvector (x) && isvector (y) && ! isvector (z))
+        [x, y] = meshgrid (x, y);
+      endif
+    endif
+
+    if (a == 0 && b == 0 && c == 0)
+      tmp = (u*x + v*y + w*z) * (1 - ca);
+
+      xr = u*tmp + x*ca + (-w*y + v*z)*sa;
+      yr = v*tmp + y*ca + (w*x - u*z)*sa;
+      zr = w*tmp + z*ca + (-v*x + u*y)*sa;
+    else
+      one_m_ca = 1 - ca;
+      tmp = u*x + v*y + w*z;
+
+      xr = ((a*(v**2 + w**2) - u*(b*v + c*w - tmp))*one_m_ca
+            + x*ca + (-c*v + b*w - w*y + v*z)*sa);
+      yr = ((b*(u**2 + w**2) - v*(a*u + c*w - tmp))*one_m_ca
+            + y*ca + (c*u - a*w + w*x - u*z)*sa);
+      zr = ((c*(u**2 + v**2) - w*(a*u + b*v - tmp))*one_m_ca
+            + z*ca + (-b*u + a*v - v*x + u*y)*sa);
+    endif
+
+    set (h(i), "xdata", xr, "ydata", yr);
+
+    if (! is_image(i))
+      set (h(i), "zdata", zr);
+    endif
+  endfor
+
+endfunction
+
+## Test input validation
+%!shared h1, h2, o1, o2, o3
+%! h1 = figure ("visible", "off");
+%! o1 = line ();
+%! h2 = figure ("visible", "off");
+%! o2 = line ();
+%! o3 = text (0, 0, "foobar");
+%!error rotate ()
+%!error rotate (o1)
+%!error rotate (o1, [0,0,0]);
+%!error <all handles must be children of the same axes object> rotate ([o1, o2], [0,0,0], 90);
+%!error <invalid direction> rotate (o1, "foo", 90);
+%!error <invalid rotation angle> rotate (o1, [0,0,0], "foo");
+%!error <invalid origin> rotate (o1, [0,0,0], 90, "foo");
+%!error rotate (o1, [0,0,0], 90, [0,0,0], 1);
+%!error <H must be an array of one or more graphics handles> rotate (NaN, [0,0,0], 90);
+%!error <expecting image, line, patch, or surface objects> rotate (o3, [0,0,0], 90);
+%!test
+%! close (h1);
+%! close (h2);
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/rotate3d.m
@@ -0,0 +1,109 @@
+## Copyright (C) 2014-2015 Andreas Weber
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Command} {} rotate3d
+## @deftypefnx {Command} {} rotate3d on
+## @deftypefnx {Command} {} rotate3d off
+## @deftypefnx {Function File} {} rotate3d (@var{hfig}, @var{option})
+## Control the interactive 3-D rotation mode of a figure in the GUI.
+##
+## Given the option @qcode{"on"} or @qcode{"off"}, set the interactive
+## rotate mode on or off.
+##
+## With no arguments, toggle the current rotate mode on or off.
+##
+## If the first argument @var{hfig} is a figure, then operate on
+## the given figure rather than the current figure as returned by
+## @code{gcf}.
+##
+## @seealso{pan, zoom}
+## @end deftypefn
+
+function rotate3d (varargin)
+
+  hfig = NaN;
+
+  nargs = nargin;
+
+  if (nargs > 2)
+    print_usage ();
+  endif
+
+  if (nargin == 1 && nargout > 0 && isfigure (varargin{1}))
+    error ("rotate_object_handle = rotate3d (hfig): not implemented");
+  endif
+
+  if (nargs == 2)
+    hfig = varargin{1};
+    if (isfigure (hfig))
+      varargin(1) = [];
+      nargs--;
+    else
+      error ("rotate3d: expecting figure handle as first argument");
+    endif
+  endif
+
+  if (isnan (hfig))
+    hfig = gcf ();
+  endif
+
+  if (nargs == 0)
+    rm = get (hfig, "__rotate_mode__");
+    if (strcmp (rm.Enable, "on"))
+      rm.Enable = "off";
+    else
+      rm.Enable = "on";
+    endif
+    set (hfig, "__rotate_mode__", rm);
+    update_mouse_mode (hfig, rm.Enable);
+  elseif (nargs == 1)
+    arg = varargin{1};
+    if (ischar (arg))
+      switch (arg)
+        case {"on", "off"}
+          rm = get (hfig, "__rotate_mode__");
+          switch (arg)
+            case {"on", "off"}
+              rm.Enable = arg;
+              rm.Motion = "both";
+          endswitch
+          set (hfig, "__rotate_mode__", rm);
+          update_mouse_mode (hfig, arg);
+        otherwise
+          error ("rotate3d: unrecognized option '%s'", arg);
+      endswitch
+    else
+      error ("rotate3d: wrong type argument '%s'", class (arg));
+    endif
+  endif
+
+endfunction
+
+function update_mouse_mode (hfig, arg)
+  if (strcmp (arg, "off"))
+    set (hfig, "__mouse_mode__", "none");
+  else
+    ## FIXME: Is there a better way other than calling these
+    ## functions to set the other mouse mode Enable fields to
+    ## "off"?
+    pan ("off");
+    zoom ("off");
+    set (hfig, "__mouse_mode__", "rotate");
+  endif
+endfunction
--- a/scripts/plot/util/saveas.m
+++ b/scripts/plot/util/saveas.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Kai Habel
+## Copyright (C) 2010-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -56,14 +56,14 @@
 ## @end group
 ## @end example
 ##
-## @seealso{print, orient}
+## @seealso{print, hgsave, orient}
 ## @end deftypefn
 
 ## Author: Kai Habel
 
-function  saveas (h, filename, fmt = "pdf")
+function saveas (h, filename, fmt = "pdf")
 
-  if ((nargin != 2) && (nargin != 3))
+  if (nargin != 2 && nargin != 3)
     print_usage ();
   endif
 
@@ -77,19 +77,19 @@
     error ("saveas: first argument H must be a graphics handle");
   endif
 
-  if (!ischar (filename))
+  if (! ischar (filename))
     error ("saveas: FILENAME must be a string");
   endif
 
   if (nargin == 2)
     [~, ~, ext] = fileparts (filename);
-    if (!isempty (ext))
+    if (! isempty (ext))
       fmt = ext(2:end);
     endif
   endif
 
   if (nargin == 3)
-    if (!ischar (filename))
+    if (! ischar (filename))
       error ("saveas: EXT must be a string");
     endif
 
--- a/scripts/plot/util/shg.m
+++ b/scripts/plot/util/shg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/plot/util/struct2hdl.m
+++ b/scripts/plot/util/struct2hdl.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 pdiribarne
+## Copyright (C) 2012-2015 pdiribarne
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
 ## A third boolean argument @var{hilev} can be passed to specify whether
 ## the function should preserve listeners/callbacks, e.g., for legends or
 ## hggroups.  The default is false.
-## @seealso{hdl2struct, findobj}
+## @seealso{hdl2struct, hgload, findobj}
 ## @end deftypefn
 
 ## Author: pdiribarne <pdiribarne@new-host.home>
@@ -177,7 +177,7 @@
 
 function [h, sout] = createaxes (s, p, par)
   ## regular axes
-  if (strcmp (s.properties.tag, ""))
+  if (! any (strcmpi (s.properties.tag, {"colorbar", "legend"})))
     propval = {"position", s.properties.position};
     hid = {"autopos_tag", "looseinset"};
     for ii = 1:numel (hid)
@@ -297,7 +297,11 @@
   h = patch (prp);
   set (h, "parent", par);
   s.properties = rmfield (s.properties,
-                            {"faces", "vertices", "facevertexcdata"});
+                          {"faces", "vertices", "facevertexcdata"});
+  ## Also remove derived properties.  Otherwise there is a possibility for
+  ## a segfault when 'set (h, properties)' is used to restore properties
+  ## which do not match in size the ones created with from the call to patch().
+  s.properties = rmfield (s.properties, {"xdata", "ydata", "zdata", "cdata"});
   addmissingprops (h, s.properties);
   sout = s;
 endfunction
@@ -447,7 +451,7 @@
 
   elseif (isfield (fields, "bargroup"))
     ## bar plot
-    ## FIXME - here we don't have access to brothers so we first create all
+    ## FIXME: Here we don't have access to brothers so we first create all
     ## the barseries of the bargroup (but the last), then retrieve information,
     ## and rebuild the whole bargroup.
     ## The duplicate are deleted after calling "setprops"
@@ -459,7 +463,7 @@
 
     tst = sum (temp) == length (bargroup);
 
-    if (isscalar (bargroup) || !tst)
+    if (isscalar (bargroup) || ! tst)
       xdata = s.properties.xdata;
       ydata = s.properties.ydata;
 
@@ -480,7 +484,7 @@
       tmp = struct ("handle", NaN, "type", "", "children", [], "special", []);
       for ii = 1:(nbar - 1)
         idx = find (p(1:2:end) == bargroup(ii)) * 2;
-        hdl = p (idx);
+        hdl = p(idx);
         xdata = [xdata get(hdl).xdata];
         ydata = [ydata get(hdl).ydata];
         tmp.children(ii) = hdl2struct (hdl);
@@ -547,8 +551,7 @@
 endfunction
 
 function setprops (s, h, p, hilev)
-  more off;
-  if (strcmpi (s.properties.tag, ""))
+  if (! any (strcmpi (s.properties.tag, {"colorbar", "legend"})))
     specs = s.children(s.special);
     if (isempty (specs))
       hdls = [];
@@ -613,8 +616,7 @@
       endif
     endif
 
-  elseif (strcmpi (s.properties.tag, "legend")
-          || strcmpi (s.properties.tag, "colorbar"))
+  else
     set (h, s.properties);
   endif
 
--- a/scripts/plot/util/subplot.m
+++ b/scripts/plot/util/subplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -198,147 +198,90 @@
       align_axes = true;
     endif
 
-    ## Oh, the things we do for Matlab compatibility.  Using the "position"
-    ## argument changes things so much that it became clearer to replicate
-    ## large chunks of code rather than have lots of if/else statements.
     if (! have_position)
+      ## Subplots that cover more that one base subplot are not updated
+      align_axes = (align_axes || (! isscalar (index)));
       ## Normal case where subplot indices have been given
-      pos = subplot_position (rows, cols, index, "position");
-      outerpos = subplot_position (rows, cols, index, "outerposition");
-      box = [pos(1:2), pos(1:2)+pos(3:4)];
-      outerbox = [outerpos(1:2), outerpos(1:2)+outerpos(3:4)];
-      looseinset = [box(1:2)-outerbox(1:2), outerbox(3:4)-box(3:4)];
+      [pos, opos, li] = subplot_position (cf, rows, cols, index);
+    else
+      ## Position is specified by the user.
+      li = zeros (1,4);
+      align_axes = true;
+    endif
+
+    set (cf, "nextplot", "add");
 
-      if (align_axes)
-        activepositionproperty = "position";
-      else
-        activepositionproperty = "outerposition";
+    found = false;
+    kids = get (cf, "children");
+    for child = kids(:)'
+      ## Check whether this child is still valid; this might not be the
+      ## case anymore due to the deletion of previous children (due to
+      ## "deletefcn" callback or for legends/colorbars that are deleted
+      ## with their corresponding axes).
+      if (! ishandle (child))
+        continue;
       endif
-
-      set (cf, "nextplot", "add");
-
-      found = false;
-      kids = get (cf, "children");
-      for child = kids(:)'
-        ## Check whether this child is still valid; this might not be the
-        ## case anymore due to the deletion of previous children (due to
-        ## "deletefcn" callback or for legends/colorbars that are deleted
-        ## with their corresponding axes).
-        if (! ishandle (child))
+      if (strcmp (get (child, "type"), "axes"))
+        ## Skip legend and colorbar objects.
+        if (any (strcmp (get (child, "tag"), {"legend", "colorbar"})))
           continue;
         endif
-        if (strcmp (get (child, "type"), "axes"))
-          ## Skip legend and colorbar objects.
-          if (any (strcmp (get (child, "tag"), {"legend", "colorbar"})))
-            continue;
-          endif
-          objpos = get (child, "outerposition");
-          if (all (abs (objpos - outerpos) < eps) && ! replace_axes)
-            ## If the new axes are in exactly the same position
-            ## as an existing axes object, use the existing axes.
-            found = true;
-            hsubplot = child;
-          else
-            ## If the new axes overlap an old axes object, delete the old axes.
-            if (align_axes)
-              objpos = get (child, "position");
-            endif
-            x0 = pos(1);
-            x1 = x0 + pos(3);
-            y0 = pos(2);
-            y1 = y0 + pos(4);
-            objx0 = objpos(1);
-            objx1 = objx0 + objpos(3);
-            objy0 = objpos(2);
-            objy1 = objy0 + objpos(4);
-            if (! (x0 >= objx1 || x1 <= objx0 || y0 >= objy1 || y1 <= objy0))
-              delete (child);
-            endif
+
+        if (isappdata (child, "__subplotposition__"))
+          objpos = getappdata (child, "__subplotposition__");
+        else
+          objpos = get (child, "position");
+        endif
+        if (all (abs (objpos - pos) < eps) && ! replace_axes)
+          ## If the new axes are in exactly the same position
+          ## as an existing axes object, or if they share the same
+          ## appdata "__subplotposition__", use the existing axes.
+          found = true;
+          hsubplot = child;
+        else
+          ## If the new axes overlap an old axes object, delete the old axes.
+          objpos = get (child, "position");
+
+          x0 = pos(1);
+          x1 = x0 + pos(3);
+          y0 = pos(2);
+          y1 = y0 + pos(4);
+          objx0 = objpos(1);
+          objx1 = objx0 + objpos(3);
+          objy0 = objpos(2);
+          objy1 = objy0 + objpos(4);
+          if (! (x0 >= objx1 || x1 <= objx0 || y0 >= objy1 || y1 <= objy0))
+            delete (child);
           endif
         endif
-      endfor
+      endif
+    endfor
 
-      if (found)
-        ## Switch to existing subplot
-        set (cf, "currentaxes", hsubplot);
-      else
-        hsubplot = axes ("box", "off",
-                         "position", pos,
-                         "looseinset", looseinset,
-                         "activepositionproperty", activepositionproperty,
-                         varargin{:});
-        addproperty ("subplot_align", hsubplot, "boolean", true);
-        addlistener (hsubplot, "position", @subplot_align);
-        if (! align_axes)
-          set (hsubplot, "subplot_align", false)
-          subplot_align (hsubplot)
-        endif
+    if (found)
+      ## Switch to existing subplot and set requested properties
+      set (cf, "currentaxes", hsubplot);
+      if (! isempty (varargin))
+        set (hsubplot, varargin{:});
       endif
     else
-      ## "position" attribute given
-      if (align_axes)
-        activepositionproperty = "position";
-      else
-        activepositionproperty = "outerposition";
+      hsubplot = axes ("box", "off",
+                       "activepositionproperty", "position",
+                       "position", pos, "looseinset", li,
+                       varargin{:});
+
+      if (! align_axes)
+        ## base position (no ticks, no annotation, no cumbersome neighbor)
+        setappdata (hsubplot, "__subplotposition__", pos);
+        ## max outerposition
+        setappdata (hsubplot, "__subplotouterposition__", opos);
+        addlistener (hsubplot, "outerposition", @subplot_align);
+        addlistener (hsubplot, "xaxislocation", @subplot_align);
+        addlistener (hsubplot, "yaxislocation", @subplot_align);
+        addlistener (hsubplot, "position", {@subplot_align, true});
+        subplot_align (hsubplot);
       endif
 
-      set (cf, "nextplot", "add");
-
-      found = false;
-      kids = get (cf, "children");
-      for child = kids(:)'
-        ## Check whether this child is still valid; this might not be the
-        ## case anymore due to the deletion of previous children (due to
-        ## "deletefcn" callback or for legends/colorbars that are deleted
-        ## with their corresponding axes).
-        if (! ishandle (child))
-          continue;
-        endif
-        if (strcmp (get (child, "type"), "axes"))
-          ## Skip legend and colorbar objects.
-          if (any (strcmp (get (child, "tag"), {"legend", "colorbar"})))
-            continue;
-          endif
-          objpos = get (child, "position");
-          if (all (abs (objpos - pos) < eps) && ! replace_axes)
-            ## If the new axes are in exactly the same position
-            ## as an existing axes object, use the existing axes.
-            found = true;
-            hsubplot = child;
-          else
-            ## If the new axes overlap an old axes object, delete the old axes.
-            x0 = pos(1);
-            x1 = x0 + pos(3);
-            y0 = pos(2);
-            y1 = y0 + pos(4);
-            objx0 = objpos(1);
-            objx1 = objx0 + objpos(3);
-            objy0 = objpos(2);
-            objy1 = objy0 + objpos(4);
-            if (! (x0 >= objx1 || x1 <= objx0 || y0 >= objy1 || y1 <= objy0))
-              delete (child);
-            endif
-          endif
-        endif
-      endfor
-
-      if (found)
-        ## Switch to existing subplot
-        set (cf, "currentaxes", hsubplot);
-      else
-        hsubplot = axes ("box", "off",
-                         "position", pos,
-                         "activepositionproperty", activepositionproperty,
-                         varargin{:});
-        addproperty ("subplot_align", hsubplot, "boolean", true);
-        addlistener (hsubplot, "position", @subplot_align);
-        if (! align_axes)
-          set (hsubplot, "subplot_align", false)
-          subplot_align (hsubplot)
-        endif
-      endif
-    endif  # ! have_position
-
+    endif
   unwind_protect_cleanup
     set (0, "defaultaxesunits", axesunits);
     set (cf, "units", figureunits);
@@ -350,96 +293,155 @@
 
 endfunction
 
-function pos = subplot_position (rows, cols, index, position_property)
+function [pos, opos, li] = subplot_position (hf, nrows, ncols, idx)
 
-  if (rows == 1 && cols == 1)
+  if (nrows == 1 && ncols == 1)
     ## Trivial result for subplot (1,1,1)
-    if (strcmpi (position_property, "position"))
-      pos = get (0, "defaultaxesposition");
-    else
-      pos = get (0, "defaultaxesouterposition");
-    endif
+    pos = get (0, "defaultaxesposition");
+    opos = get (0, "defaultaxesouterposition");
+    li = get (0, "defaultaxeslooseinset");
     return;
   endif
 
-  if (strcmp (position_property, "outerposition"))
-    margins.left   = 0.05;
-    margins.bottom = 0.05;
-    margins.right  = 0.05;
-    margins.top    = 0.05;
-    margins.column = 0.04 / cols;
-    margins.row    = 0.04 / rows;
-    width = 1 - margins.left - margins.right - (cols-1)*margins.column;
-    width = width / cols;
-    height = 1 - margins.top - margins.bottom - (rows-1)*margins.row;
-    height = height / rows;
-  else
-    defaultaxesposition = get (0, "defaultaxesposition");
+  ## Row/Column inside the axes array
+  row = ceil (idx / ncols);
+  col = idx .- (row - 1) * ncols;
+  row = [min(row) max(row)];
+  col = [min(col) max(col)];
+
+  ## Minimal margins around subplots defined in points
+  fig_units = get (hf, "units");
+  set (hf, "units", "points");
+  pts_size = get (gcf, "position")(3:4);
+  xbasemargin = 6 / pts_size(1);
+  ybasemargin = 6 / pts_size(2);
 
-    ## The outer margins surrounding all subplot "positions" are independent
-    ## of the number of rows and/or columns
-    margins.left   = defaultaxesposition(1);
-    margins.bottom = defaultaxesposition(2);
-    margins.right  = 1.0 - margins.left - defaultaxesposition(3);
-    margins.top    = 1.0 - margins.bottom - defaultaxesposition(4);
+  ## Column/row separation
+  margin.column = .2 / ncols + 2 * xbasemargin;
+  margin.row = .2 / nrows + 2 * ybasemargin;
+
+  set (hf, "units", fig_units);
+  margin.left = xbasemargin;
+  margin.right = xbasemargin;
+  margin.bottom = ybasemargin;
+  margin.top = ybasemargin;
 
-    ## Fit from Matlab experiments
-    pc = 1 ./ [0.1860, (margins.left + margins.right - 1)];
-    margins.column = 1 ./ polyval (pc , cols);
-    pr = 1 ./ [0.2282, (margins.top + margins.bottom - 1)];
-    margins.row    = 1 ./ polyval (pr , rows);
-
-    ## Calculate the width/height of the subplot axes "position".
-    ## This is also consistent with Matlab
-    width = 1 - margins.left - margins.right - (cols-1)*margins.column;
-    width = width / cols;
-    height = 1 - margins.top - margins.bottom - (rows-1)*margins.row;
-    height = height / rows;
+  ## Boundary axes have default margins
+  borders = get (0, "defaultaxesposition");
+  if (col(1) == 1)
+    margin.left = borders(1);
+  else
+    margin.left = margin.column - margin.right;
+  endif
+  if (col(2) == ncols)
+    margin.right = 1 - borders(1) - borders(3);
   endif
 
-  ## Index offsets from the lower left subplot
-  yi = fix ((index(:)-1)/cols);
-  xi = index(:) - yi*cols - 1;
-  yi = (rows - 1) - yi;
 
-  ## Lower left corner of the subplot, i.e., position(1:2)
-  x0 = xi .* (width + margins.column) + margins.left;
-  y0 = yi .* (height + margins.row) + margins.bottom;
+  if (row(2) == nrows)
+    margin.bottom = borders(2);
+  else
+    margin.bottom = margin.row - margin.top;
+  endif
+  if (row(1) == 1)
+    margin.top = 1 - borders(2) - borders(4);
+  endif
+
 
-  if (numel (x0) > 1)
-    ## subplot (row, col, m:n)
-    x1 = max (x0(:)) + width;
-    y1 = max (y0(:)) + height;
-    x0 = min (x0(:));
-    y0 = min (y0(:));
-    pos = [x0, y0, x1-x0, y1-y0];
-  else
-    ## subplot (row, col, num)
-    pos = [x0, y0, width, height];
-  endif
+  ## Compute base width and height
+  width = (borders(3) - (ncols - 1) * margin.column) / ncols;
+  height = (borders(4) - (nrows - 1) * margin.row) /nrows;
+
+  ## Position, outerposition and looseinset
+  x0 = borders(1) + (col(1) - 1) * (width + margin.column);
+  y0 = borders(2) + (nrows - row(2)) * (height + margin.row);
+  width += diff (col) * (width + margin.column);
+  height += diff (row) * (height + margin.row);
+
+  pos = [x0 y0 width height];
+  opos = [(x0 - margin.left), (y0 - margin.bottom), ...
+          (width + margin.left + margin.right), ...
+          (height + margin.bottom + margin.top)];
+  li = [margin.left, margin.bottom, margin.right, margin.top];
 
 endfunction
 
-function subplot_align (h, varargin)
+function subplot_align (h, d, rmupdate = false)
   persistent updating = false;
+  if (! updating)
+    if (rmupdate)
+      ## The "position" property has been changed from outside this
+      ## routine. Don't update anymore.
+      if (isappdata (h, "__subplotposition__"))
+        rmappdata (h, "__subplotposition__");
+        rmappdata (h, "__subplotouterposition__");
+      endif
+      return
+    endif
 
-  if (! updating)
     unwind_protect
       updating = true;
-      hfig = ancestor (h, "figure");
-      hsubplots = findall (hfig, "type", "axes", "subplot_align", "off");
-      if (! isempty (hsubplots))
-        tightinset = get (hsubplots, "tightinset");
-        if (iscell (tightinset))
-          tightinset = max (cell2mat (tightinset));
-        endif
-        looseinset = get (hsubplots, "looseinset");
-        if (iscell (looseinset))
-          looseinset = max (cell2mat (looseinset));
-        endif
-        looseinset = max (tightinset, looseinset);
-        set (hsubplots, "looseinset", looseinset);
+      hf = ancestor (h, "figure");
+      children = get (hf, "children");
+
+      ## Base position of the subplot
+      pos = getappdata (children, "__subplotposition__");
+
+      if (iscell (pos))
+        do_align = ! cellfun (@isempty, pos);
+        pos = cell2mat (pos(do_align));
+      else
+        return
+      endif
+      hsubplots = children(do_align);
+
+
+      ## There may be mixed subplot series (e.g. 2-by-6 and 1-by-6) in
+      ## the same figure. Only subplots that have the same width and
+      ## height as this one are updated.
+      if (any (h == hsubplots))
+        width = pos(h == hsubplots, 3);
+        height = pos(h == hsubplots, 4);
+        do_align = (pos(:,3) == width) & (pos(:,4) == height);
+        hsubplots(! do_align) = [];
+        pos(! do_align,:) = [];
+      else
+        return
       endif
+
+      ## Reset outerpositions to their default value
+      opos = getappdata (hsubplots, "__subplotouterposition__");
+      if (iscell (opos))
+        opos = cell2mat (opos);
+      endif
+      for ii = 1:numel (hsubplots);
+        set (hsubplots(ii), "outerposition", opos(ii,:), ...
+             "activepositionproperty", "position");
+      endfor
+
+      ## Compare current positions to default and compute the new ones
+      curpos = get (hsubplots, "position");
+      if (iscell (curpos))
+        curpos = cell2mat (curpos);
+      endif
+      dx0 = max (curpos(:,1) - pos(:,1));
+      dx0(dx0<0) = 0;
+      dx1 = max ((pos(:,1) + pos(:,3)) - (curpos(:,1) + curpos(:,3)));
+      dx1(dx1<0) = 0;
+      dy0 = max (curpos(:,2) - pos(:,2));
+      dy0(dy0<0) = 0;
+      dy1 = max ((pos(:,2) + pos(:,4)) - (curpos(:,2) + curpos(:,4)));
+      dy1(dy1<0) = 0;
+
+      pos(:,1) += dx0;
+      pos(:,2) += dy0;
+      pos(:,3) -= dx0 + dx1;
+      pos(:,4) -= dy0 + dy1;
+
+      for ii = 1:numel (hsubplots)
+        set (hsubplots(ii), "position", pos(ii,:));
+      endfor
+
     unwind_protect_cleanup
       updating = false;
     end_unwind_protect
@@ -543,3 +545,49 @@
 %!       'horizontalalignment', 'center', ...
 %!       'units', 'normalized');
 
+## Test recognition/deletion of previous axes
+## Default mode
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   for ii = 1:9
+%!     hax(ii) = subplot (3,3,ii);
+%!   endfor
+%!   subplot (3,3,1);
+%!   assert (gca (), hax(1));
+%!   subplot (2,1,1);
+%!   assert (ishandle (hax),[false(1,6), true(1,3)]);
+%! unwind_protect_cleanup
+%!   delete (hf);
+%! end_unwind_protect
+
+## Position mode
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h1 = subplot ("position", [0.1 0.1 0.3 0.3]);
+%!   h2 = subplot ("position", [0.5 0.5 0.3 0.3]);
+%!   subplot ("position", [0.1 0.1 0.3 0.3]);
+%!   assert (gca (), h1);
+%!   subplot ("position", [0.5 0.5 0.3 0.3]);
+%!   assert (gca (), h2);
+%!   subplot ("position", [0.5 0.5 0.3 0.2]);
+%!   assert (! ishandle (h2));
+%! unwind_protect_cleanup
+%!   delete (hf);
+%! end_unwind_protect
+
+## Align mode
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h1 = subplot (3,5,1, "align");
+%!   h2 = subplot (3,5,2, "align");
+%!   subplot (3,5,1, "align");
+%!   assert (gca (), h1);
+%!   subplot (3,2,1, "align");
+%!   assert (! ishandle (h1));
+%!   assert (! ishandle (h2));
+%! unwind_protect_cleanup
+%!   delete (hf);
+%! end_unwind_protect
new file mode 100644
--- /dev/null
+++ b/scripts/plot/util/zoom.m
@@ -0,0 +1,200 @@
+## Copyright (C) 2014-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Command} {} zoom
+## @deftypefnx {Command} {} zoom (@var{factor})
+## @deftypefnx {Command} {} zoom on
+## @deftypefnx {Command} {} zoom off
+## @deftypefnx {Command} {} zoom xon
+## @deftypefnx {Command} {} zoom yon
+## @deftypefnx {Command} {} zoom out
+## @deftypefnx {Command} {} zoom reset
+## @deftypefnx {Command} {} zoom (@var{hfig}, @var{option})
+## Zoom the current axes object or control the interactive zoom mode of
+## a figure in the GUI.
+##
+## Given a numeric argument greater than zero, zoom by the given factor.
+## If the zoom factor is greater than one, zoom in on the plot.  If the
+## factor is less than one, zoom out.  If the zoom factor is a two- or
+## three-element vector, then the elements specify the zoom factors for
+## the x, y, and z axes respectively.
+##
+## Given the option @qcode{"on"} or @qcode{"off"}, set the interactive
+## zoom mode on or off.
+##
+## With no arguments, toggle the current zoom mode on or off.
+##
+## Given the option @qcode{"xon"} or @qcode{"yon"}, enable zoom mode
+## for the x or y axis only.
+##
+## Given the option @qcode{"out"}, zoom to the initial zoom setting.
+##
+## Given the option @qcode{"reset"}, store the current zoom setting so
+## that @code{zoom out} will return to this zoom level.
+##
+## If the first argument @var{hfig} is a figure, then operate on
+## the given figure rather than the current figure as returned by
+## @code{gcf}.
+##
+## @seealso{pan, rotate3d}
+## @end deftypefn
+
+## Eventually we need to also support these features:
+## @deftypefnx {Command} {zoom_object_handle =} zoom (@var{hfig})
+
+function zoom (varargin)
+
+  nargs = nargin;
+  if (nargs > 2)
+    print_usage ();
+  endif
+
+  if (nargs == 1 && nargout > 0 && isfigure (varargin{1}))
+    error ("zoom_object_handle = zoom (hfig): not implemented");
+  endif
+
+  hfig = NaN;
+  if (nargs == 2)
+    hfig = varargin{1};
+    if (isfigure (hfig))
+      varargin(1) = [];
+      nargs--;
+    else
+      error ("zoom: expecting figure handle as first argument");
+    endif
+  endif
+
+  if (isnan (hfig))
+    hfig = gcf ();
+  endif
+
+  if (nargs == 0)
+    zm = get (hfig, "__zoom_mode__");
+    if (strcmp (zm.Enable, "on"))
+      zm.Enable = "off";
+    else
+      zm.Enable = "on";
+    endif
+    set (hfig, "__zoom_mode__", zm);
+    update_mouse_mode (hfig, zm.Enable);
+  elseif (nargs == 1)
+    arg = varargin{1};
+    if (isnumeric (arg))
+      factor = arg;
+      switch (numel (factor))
+        case 2
+          xfactor = factor(1);
+          yfactor = factor(2);
+        case 1
+          xfactor = yfactor = factor;
+        otherwise
+          error ("zoom: invalid factor");
+      endswitch
+      if (xfactor < 0 || yfactor < 0)
+        error ("zoom: factor must be greater than 1");
+      elseif (xfactor == 1 && yfactor == 1)
+        return;
+      endif
+      cax = get (hfig, "currentaxes");
+      if (! isempty (cax))
+        if (xfactor != 1)
+          if (yfactor != 1)
+            mode = "both";
+          else
+            mode = "horizontal";
+          endif
+        else
+          if (yfactor != 1)
+            mode = "vertical";
+          endif
+        endif
+        __zoom__ (cax, mode, factor);
+      endif
+    elseif (ischar (arg))
+      switch (arg)
+        case {"on", "off", "xon", "yon"}
+          zm = get (hfig, "__zoom_mode__");
+          switch (arg)
+            case {"on", "off"}
+              zm.Enable = arg;
+              zm.Motion = "both";
+            case "xon"
+              zm.Enable = "on";
+              zm.Motion = "horizontal";
+            case "yon"
+              zm.Enable = "on";
+              zm.Motion = "vertical";
+          endswitch
+          set (hfig, "__zoom_mode__", zm);
+          update_mouse_mode (hfig, arg);
+        case "out"
+          cax = get (hfig, "currentaxes");
+          if (! isempty (cax))
+            __zoom__ (cax, "out");
+          endif
+        case "reset"
+          cax = get (hfig, "currentaxes");
+          if (! isempty (cax))
+            __zoom__ (cax, "reset");
+          endif
+        otherwise
+          error ("zoom: unrecognized option '%s'", arg);
+      endswitch
+    else
+      error ("zoom: wrong type argument '%s'", class (arg));
+    endif
+  endif
+
+endfunction
+
+function update_mouse_mode (hfig, arg)
+  if (strcmp (arg, "off"))
+    set (hfig, "__mouse_mode__", "none");
+  else
+    ## FIXME: Is there a better way other than calling these
+    ## functions to set the other mouse mode Enable fields to
+    ## "off"?
+    pan ("off");
+    rotate3d ("off");
+    set (hfig, "__mouse_mode__", "zoom");
+  endif
+endfunction
+
+
+%!demo
+%! clf;
+%! sombrero ();
+%! pause (1);
+%! %% zoom in by a factor of 2
+%! zoom (2);
+%! pause (1);
+%! %% return to original zoom level
+%! zoom out;
+%! pause (1);
+%! %% zoom in by a factor of 2
+%! zoom (2);
+%! pause (1);
+%! %% set this zoom level as the "initial zoom level"
+%! %% and zoom in some more
+%! zoom reset;
+%! zoom (2);
+%! pause (1);
+%! %% return to zoom level set by last call to "zoom reset"
+%! zoom out;
+
--- a/scripts/polynomial/compan.m
+++ b/scripts/polynomial/compan.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/conv.m
+++ b/scripts/polynomial/conv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -137,7 +137,7 @@
 %!assert (conv (b,a,"valid"), zeros (1,0))
 
 
-%% Test input validation
+## Test input validation
 %!error conv (1)
 %!error conv (1,2,3,4)
 %!error <A and B must be vectors> conv ([1, 2; 3, 4], 3)
--- a/scripts/polynomial/deconv.m
+++ b/scripts/polynomial/deconv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,7 @@
 
   if (ly > la)
     x = zeros (size (y) - size (a) + 1);
-    x (1) = 1;
+    x(1) = 1;
     b = filter (y, a, x);
   elseif (ly == la)
     b = filter (y, a, 1);
--- a/scripts/polynomial/mkpp.m
+++ b/scripts/polynomial/mkpp.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -55,7 +55,7 @@
     error ("mkpp: at least one interval is needed");
   endif
 
-  if (!isvector (x))
+  if (! isvector (x))
     error ("mkpp: x must be a vector");
   endif
 
--- a/scripts/polynomial/mpoles.m
+++ b/scripts/polynomial/mpoles.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 Ben Abbott
+## Copyright (C) 2007-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/pchip.m
+++ b/scripts/polynomial/pchip.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Kai Habel
+## Copyright (C) 2001-2015 Kai Habel
 ##
 ## This file is part of Octave.
 ##
@@ -77,7 +77,7 @@
 
   ## Check the size and shape of y
   if (isvector (y))
-    y = y(:).'; ##row vector
+    y = y(:).';  # force row vector
     szy = size (y);
     if (! size_equal (x, y))
       error ("pchip: length of X and Y must match");
--- a/scripts/polynomial/poly.m
+++ b/scripts/polynomial/poly.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyaffine.m
+++ b/scripts/polynomial/polyaffine.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Tony Richardson, Jaroslav Hajek
+## Copyright (C) 2009-2015 Tony Richardson, Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyder.m
+++ b/scripts/polynomial/polyder.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyeig.m
+++ b/scripts/polynomial/polyeig.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Fotios Kasolis
+## Copyright (C) 2012-2015 Fotios Kasolis
 ##
 ## This file is part of Octave.
 ##
@@ -26,68 +26,77 @@
 ## @code{@var{C}(s) = @var{C0} + @var{C1} s + @dots{} + @var{Cl} s^l}
 ## polyeig solves the eigenvalue problem
 ## @code{(@var{C0} + @var{C1} + @dots{} + @var{Cl})v = 0}.
+##
 ## Note that the eigenvalues @var{z} are the zeros of the matrix polynomial.
-## @var{z} is an @var{lxn} vector and @var{v} is an (@var{n} x @var{n})l matrix
-## with columns that correspond to the eigenvectors.
+## @var{z} is a row vector with @var{n*l} elements.  @var{v} is a matrix
+## (@var{n} x @var{n}*@var{l}) with columns that correspond to the
+## eigenvectors.
 ##
 ## @seealso{eig, eigs, compan}
 ## @end deftypefn
 
 ## Author: Fotios Kasolis
 
-function [ z, varargout ] = polyeig (varargin)
+function [z, v] = polyeig (varargin)
 
-  if ( nargout > 2 )
+  if (nargin < 1 || nargout > 2)
     print_usage ();
   endif
 
   nin = numel (varargin);
-
-  n = zeros (1, nin);
+  n = rows (varargin{1});
 
-  for cnt = 1 : nin
-    if (! issquare (varargin{cnt}))
-       error ("polyeig: coefficients must be square matrices");
+  for i = 1 : nin
+    if (! issquare (varargin{i}))
+      error ("polyeig: coefficients must be square matrices");
     endif
-    n(cnt) = size (varargin{cnt}, 1);
+    if (rows (varargin{i}) != n)
+      error ("polyeig: coefficients must have the same dimensions");
+    endif
   endfor
 
-  if (numel (unique (n)) > 1)
-       error ("polyeig: coefficients must have the same dimensions");
-  endif
-  n = unique (n);
-
   ## matrix polynomial degree
   l = nin - 1;
 
   ## form needed matrices
   C = [ zeros(n * (l - 1), n), eye(n * (l - 1));
-       -cell2mat(varargin(1 : end - 1)) ];
+       -cell2mat(varargin(1:end-1)) ];
 
   D = [ eye(n * (l - 1)), zeros(n * (l - 1), n);
        zeros(n, n * (l - 1)), varargin{end} ];
 
   ## solve generalized eigenvalue problem
-  if ( isequal (nargout, 1) )
-    z = eig (C, D);
-  else
-    [ z, v ] = eig (C, D);
-    varargout{1} = v;
-    ## return n-element eigenvectors normalized so
-    ## that the infinity-norm = 1
+  if (nargout == 2)
+    [z, v] = eig (C, D);
+    v = diag (v);
+    ## return n-element eigenvectors normalized so that the infinity-norm = 1
     z = z(1:n,:);
     ## max() takes the abs if complex:
     t = max (z);
     z /= diag (t);
+  else
+    z = eig (C, D);
   endif
 
 endfunction
 
 
+%!shared C0, C1
+%! C0 = [8, 0; 0, 4]; C1 = [1, 0; 0, 1];
+
 %!test
-%! C0 = [8, 0; 0, 4]; C1 = [1, 0; 0, 1];
+%! z = polyeig (C0, C1);
+%! assert (z, [-8; -4]);
+
+%!test
 %! [v,z] = polyeig (C0, C1);
-%! assert (isequal (z(1), -8), true);
+%! assert (z, [-8; -4]);
+%! z = diag (z);
 %! d = C0*v + C1*v*z;
-%! assert (isequal (norm(d), 0.0), true);
+%! assert (norm (d), 0.0);
 
+## Test input validation
+%!error polyeig ()
+%!error [a,b,c] = polyeig (1)
+%!error <coefficients must be square matrices> polyeig (ones (3,2))
+%!error <coefficients must have the same dimensions> polyeig (ones (3,3), ones (2,2))
--- a/scripts/polynomial/polyfit.m
+++ b/scripts/polynomial/polyfit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -171,6 +171,7 @@
 ## variable is not normalized properly.
 ## Also check the usage of 2nd & 3rd output arguments.
 %!test
+%! warning ("off", "Octave:nearly-singular-matrix", "local");
 %! x = [ -1196.4, -1195.2, -1194, -1192.8, -1191.6, -1190.4, -1189.2, -1188, ...
 %!       -1186.8, -1185.6, -1184.4, -1183.2, -1182];
 %! y = [ 315571.7086, 315575.9618, 315579.4195, 315582.6206, 315585.4966, ...
@@ -188,6 +189,7 @@
 %! assert (p, p0, 1000*eps);
 
 %!test
+%! warning ("off", "Octave:nearly-singular-matrix", "local");
 %! x = 1000 + (-5:5);
 %! xn = (x - mean (x)) / std (x);
 %! pn = ones (1,5);
--- a/scripts/polynomial/polygcd.m
+++ b/scripts/polynomial/polygcd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -91,10 +91,12 @@
 %!assert (deconv (poly (1:8), polygcd (poly (1:8), poly (3:12))), poly (1:2), sqrt (eps))
 
 %!test
-%! for ii=1:10
-%!   p  = (unique (randn (10, 1)) * 10).';
+%! for ii=1:100
+%!   ## Exhibits numerical problems for multipliers of ~4 and greater.
+%!   p  = (unique (randn (10, 1)) * 3).';
 %!   p1 = p(3:end);
 %!   p2 = p(1:end-2);
-%!   assert (polygcd (poly (-p1), poly (-p2)), poly (- intersect (p1, p2)), sqrt (eps));
+%!   assert (polygcd (poly (-p1), poly (-p2)),
+%!           poly (- intersect (p1, p2)), sqrt (eps));
 %! endfor
 
--- a/scripts/polynomial/polyint.m
+++ b/scripts/polynomial/polyint.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyout.m
+++ b/scripts/polynomial/polyout.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Auburn University.  All rights reserved.
+## Copyright (C) 1995-2015 Auburn University.  All rights reserved.
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyreduce.m
+++ b/scripts/polynomial/polyreduce.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyval.m
+++ b/scripts/polynomial/polyval.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/polyvalm.m
+++ b/scripts/polynomial/polyvalm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
--- a/scripts/polynomial/ppder.m
+++ b/scripts/polynomial/ppder.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s., Czech Republic
+## Copyright (C) 2008-2015 VZLU Prague, a.s., Czech Republic
 ##
 ## This file is part of Octave.
 ##
@@ -24,12 +24,10 @@
 ## @seealso{mkpp, ppval, ppint}
 ## @end deftypefn
 
-function ppd = ppder (pp, m)
+function ppd = ppder (pp, m = 1)
 
-  if ((nargin < 1) || (nargin > 2))
+  if (nargin < 1 || nargin > 2)
     print_usage ();
-  elseif (nargin == 1)
-    m = 1;
   endif
 
   if (! (isstruct (pp) && strcmp (pp.form, "pp")))
--- a/scripts/polynomial/ppint.m
+++ b/scripts/polynomial/ppint.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s., Czech Republic
+## Copyright (C) 2008-2015 VZLU Prague, a.s., Czech Republic
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/ppjumps.m
+++ b/scripts/polynomial/ppjumps.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 VZLU Prague, a.s., Czech Republic
+## Copyright (C) 2008-2015 VZLU Prague, a.s., Czech Republic
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/ppval.m
+++ b/scripts/polynomial/ppval.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -131,7 +131,7 @@
 %! ret(:,:,2) = ppval (pp, breaks');
 %! assert (ppval (pp, [breaks',breaks']), ret)
 
-%% Test input validation
+## Test input validation
 %!error ppval ()
 %!error ppval (1)
 %!error ppval (1,2,3)
--- a/scripts/polynomial/private/__splinefit__.m
+++ b/scripts/polynomial/private/__splinefit__.m
@@ -111,7 +111,7 @@
 %   2011-07-01  Robust fitting parameter added.
 
 % Check number of arguments
-error(nargchk(3,7,nargin));
+narginchk(3,7);
 
 % Check arguments
 [x,y,dim,breaks,n,periodic,beta,constr] = arguments(varargin{:});
--- a/scripts/polynomial/residue.m
+++ b/scripts/polynomial/residue.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2007 Ben Abbott
 ##
 ## This file is part of Octave.
@@ -193,7 +193,7 @@
   ## Sort poles so that multiplicity loop will work.
 
   [e, indx] = mpoles (p, toler, 1);
-  p = p (indx);
+  p = p(indx);
 
   ## For each group of pole multiplicity, set the value of each
   ## pole to the average of the group. This reduces the error in
@@ -289,8 +289,8 @@
     indx = 1:numel (p);
   else
     [e, indx] = mpoles (p, toler, 0);
-    p = p (indx);
-    r = r (indx);
+    p = p(indx);
+    r = r(indx);
   endif
 
   indx = 1:numel (p);
--- a/scripts/polynomial/roots.m
+++ b/scripts/polynomial/roots.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/spline.m
+++ b/scripts/polynomial/spline.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ## Copyright (C) 2006 David Bateman
 ##
 ## This file is part of Octave.
--- a/scripts/polynomial/splinefit.m
+++ b/scripts/polynomial/splinefit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Ben Abbott, Jonas Lundgren
+## Copyright (C) 2012-2015 Ben Abbott, Jonas Lundgren
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/polynomial/unmkpp.m
+++ b/scripts/polynomial/unmkpp.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -74,7 +74,7 @@
 %! assert (k, 12);
 %! assert (d, 1);
 
-%% Test input validation
+## Test input validation
 %!error unmkpp ()
 %!error unmkpp (1,2)
 %!error <piecewise polynomial structure> unmkpp (1)
--- a/scripts/prefs/addpref.m
+++ b/scripts/prefs/addpref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -70,7 +70,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/getpref.m
+++ b/scripts/prefs/getpref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -91,7 +91,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/ispref.m
+++ b/scripts/prefs/ispref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -56,7 +56,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/prefdir.m
+++ b/scripts/prefs/prefdir.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 John Donoghue
+## Copyright (C) 2013-2015 John Donoghue
 ##
 ## This file is part of Octave.
 ##
@@ -42,7 +42,7 @@
 
 function folder = prefdir ()
 
-  folder = getenv ("HOME");
+  folder = get_home_directory ();
 
 endfunction
 
--- a/scripts/prefs/preferences.m
+++ b/scripts/prefs/preferences.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 John Donoghue
+## Copyright (C) 2013-2015 John Donoghue
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/prefs/private/loadprefs.m
+++ b/scripts/prefs/private/loadprefs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -39,7 +39,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/private/prefsfile.m
+++ b/scripts/prefs/private/prefsfile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -30,7 +30,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/private/saveprefs.m
+++ b/scripts/prefs/private/saveprefs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/prefs/rmpref.m
+++ b/scripts/prefs/rmpref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/prefs/setpref.m
+++ b/scripts/prefs/setpref.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -63,7 +63,7 @@
 endfunction
 
 
-%% Testing these functions will require some care to avoid wiping out
-%% existing (or creating unwanted) preferences for the user running the
-%% tests.
+## Testing these functions will require some care to avoid wiping out
+## existing (or creating unwanted) preferences for the user running the
+## tests.
 
--- a/scripts/set/intersect.m
+++ b/scripts/set/intersect.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2008-2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -18,19 +18,25 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} intersect (@var{a}, @var{b})
-## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} intersect (@var{a}, @var{b})
+## @deftypefn  {Function File} {@var{c} =} intersect (@var{a}, @var{b})
+## @deftypefnx {Function File} {@var{c} =} intersect (@var{a}, @var{b}, "rows")
+## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} intersect (@dots{})
+##
+## Return the unique elements common to both @var{a} and @var{b} sorted in
+## ascending order.
 ##
-## Return the elements in both @var{a} and @var{b}, sorted in ascending
-## order.  If @var{a} and @var{b} are both column vectors return a column
-## vector, otherwise return a row vector.
-## @var{a}, @var{b} may be cell arrays of string(s).
+## If @var{a} and @var{b} are both row vectors then return a row vector;
+## Otherwise, return a column vector.  The inputs may also be cell arrays of
+## strings.
 ##
-## Return index vectors @var{ia} and @var{ib} such that @code{a(ia)==c} and
-## @code{b(ib)==c}.
+## If the optional input @qcode{"rows"} is given then return the common rows of
+## @var{a} and @var{b}.  The inputs must be 2-D matrices to use this option.
+##
+## If requested, return index vectors @var{ia} and @var{ib} such that
+## @code{@var{c} = @var{a}(@var{ia})} and @code{@var{c} = @var{b}(@var{ib})}.
 ##
 ## @end deftypefn
-## @seealso{unique, union, setxor, setdiff, ismember}
+## @seealso{unique, union, setdiff, setxor, ismember}
 
 function [c, ia, ib] = intersect (a, b, varargin)
 
@@ -38,12 +44,15 @@
     print_usage ();
   endif
 
-  [a, b] = validargs ("intersect", a, b, varargin{:});
+  [a, b] = validsetargs ("intersect", a, b, varargin{:});
 
   if (isempty (a) || isempty (b))
     c = ia = ib = [];
   else
-    ## form a and b into sets
+    by_rows = nargin == 3;
+    isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b);
+
+    ## Form A and B into sets
     if (nargout > 1)
       [a, ja] = unique (a, varargin{:});
       [b, jb] = unique (b, varargin{:});
@@ -52,7 +61,7 @@
       b = unique (b, varargin{:});
     endif
 
-    if (nargin > 2)
+    if (by_rows)
       c = [a; b];
       [c, ic] = sortrows (c);
       ii = find (all (c(1:end-1,:) == c(2:end,:), 2));
@@ -60,7 +69,7 @@
       len_a = rows (a);
     else
       c = [a(:); b(:)];
-      [c, ic] = sort (c);               # [a(:);b(:)](ic) == c
+      [c, ic] = sort (c);         # [a(:);b(:)](ic) == c
       if (iscellstr (c))
         ii = find (strcmp (c(1:end-1), c(2:end)));
       else
@@ -71,11 +80,12 @@
     endif
 
     if (nargout > 1)
-      ia = ja(ic(ii));                  # a(ia) == c
-      ib = jb(ic(ii+1) - len_a);        # b(ib) == c
+      ia = ja(ic(ii));            # a(ia) == c
+      ib = jb(ic(ii+1) - len_a);  # b(ib) == c
     endif
 
-    if (nargin == 2 && (rows (b) == 1 || rows (a) == 1))
+    ## Adjust output orientation for Matlab compatibility
+    if (! by_rows && isrowvec)
       c = c.';
     endif
   endif
@@ -83,7 +93,24 @@
 endfunction
 
 
-%!# Test the routine for index vectors ia and ib
+## Test orientation of output
+%!shared a,b
+%! a = 1:4;
+%! b = 2:5;
+
+%!assert (size (intersect (a, b)), [1 3])
+%!assert (size (intersect (a', b)), [3 1])
+%!assert (size (intersect (a, b')), [3 1])
+%!assert (size (intersect (a', b')), [3 1])
+
+## Test multi-dimensional arrays
+%!test
+%! a = rand (3,3,3);
+%! b = a;
+%! b(1,1,1) = 2;
+%! assert (intersect (a, b), sort (a(2:end)'));
+
+## Test the routine for index vectors ia and ib
 %!test
 %! a = [3 2 4 5 7 6 5 1 0 13 13];
 %! b = [3 5 12 1 1 7];
--- a/scripts/set/ismember.m
+++ b/scripts/set/ismember.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -18,13 +18,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{tf} =} ismember (@var{A}, @var{s})
-## @deftypefnx {Function File} {[@var{tf}, @var{S_idx}] =} ismember (@var{A}, @var{s})
-## @deftypefnx {Function File} {[@var{tf}, @var{S_idx}] =} ismember (@var{A}, @var{s}, "rows")
-## Return a logical matrix @var{tf} with the same shape as @var{A} which is
-## true (1) if @code{A(i,j)} is in @var{s} and false (0) if it is not.  If a
-## second output argument is requested, the index into @var{s} of each of the
-## matching elements is also returned.
+## @deftypefn  {Function File} {@var{tf} =} ismember (@var{a}, @var{s})
+## @deftypefnx {Function File} {@var{tf} =} ismember (@var{a}, @var{s}, "rows")
+## @deftypefnx {Function File} {[@var{tf}, @var{s_idx}] =} ismember (@dots{})
+##
+## Return a logical matrix @var{tf} with the same shape as @var{a} which is
+## true (1) if the element in @var{a} is found in @var{s} and false (0) if it
+## is not.
+##
+## If a second output argument is requested then the index into @var{s} of each
+## matching element is also returned.
 ##
 ## @example
 ## @group
@@ -36,7 +39,7 @@
 ## @end group
 ## @end example
 ##
-## The inputs, @var{A} and @var{s}, may also be cell arrays.
+## The inputs @var{a} and @var{s} may also be cell arrays.
 ##
 ## @example
 ## @group
@@ -48,9 +51,9 @@
 ## @end group
 ## @end example
 ##
-## With the optional third argument @qcode{"rows"}, and matrices
-## @var{A} and @var{s} with the same number of columns, compare rows in
-## @var{A} with the rows in @var{s}.
+## If the optional third argument @qcode{"rows"} is given then compare rows
+## in @var{a} with rows in @var{s}.  The inputs must be 2-D matrices with the
+## same number of columns to use this option.
 ##
 ## @example
 ## @group
@@ -62,7 +65,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{unique, union, intersect, setxor, setdiff}
+## @seealso{lookup, unique, union, intersect, setdiff, setxor}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
@@ -71,63 +74,67 @@
 ## Adapted-by: jwe
 ## Reimplemented using lookup & unique: Jaroslav Hajek <highegg@gmail.com>
 
-function [tf, a_idx] = ismember (A, s, varargin)
+function [tf, s_idx] = ismember (a, s, varargin)
 
   if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
   ## lookup() does not handle logical values
-  if (islogical (A))
-    A = uint8 (A);
+  if (islogical (a))
+    a = uint8 (a);
   endif
   if (islogical (s))
     s = uint8 (s);
   endif
 
-  [A, s] = validargs ("ismember", A, s, varargin{:});
+  [a, s] = validsetargs ("ismember", a, s, varargin{:});
+
+  by_rows = nargin == 3;
 
-  if (nargin == 2)
+  if (! by_rows)
     s = s(:);
-    ## We do it this way, because we expect the array to be often sorted.
+    ## Check sort status, because we expect the array will often be sorted.
     if (issorted (s))
       is = [];
     else
       [s, is] = sort (s);
     endif
 
-    ## sort out NaNs in table
+    ## Remove NaNs from table because lookup can't handle them
     if (isreal (s) && ! isempty (s) && isnan (s(end)))
-        s = s(1:end - sum (isnan (s)));
+      s = s(1:end - sum (isnan (s)));
     endif
 
     if (nargout > 1)
-      a_idx = lookup (s, A, "m");
-      tf = logical (a_idx);
+      s_idx = lookup (s, a, "m");
+      tf = logical (s_idx);
       if (! isempty (is))
-        a_idx(tf) = is (a_idx(tf));
+        s_idx(tf) = is(s_idx(tf));
       endif
     else
-      tf = lookup (s, A, "b");
+      tf = lookup (s, a, "b");
     endif
 
-  else
-
-    if (isempty (A) || isempty (s))
-      tf = false (rows (A), 1);
-      a_idx = zeros (rows (A), 1);
+  else  # "rows" argument
+    if (isempty (a) || isempty (s))
+      tf = false (rows (a), 1);
+      s_idx = zeros (rows (a), 1);
     else
+      if (rows (s) == 1)
+        tf = all (bsxfun (@eq, a, s), 2);
+        s_idx = double (tf);
+      else
+        ## FIXME: lookup does not support "rows", so we just use unique.
+        [~, ii, jj] = unique ([a; s], "rows", "last");
+        na = rows (a);
+        jj = ii(jj(1:na));
+        tf = jj > na;
 
-      ## FIXME: lookup does not support "rows", so we just use unique.
-      [xx, ii, jj] = unique ([A; s], "rows", "last");
-      na = rows (A);
-      jj = ii(jj(1:na));
-      tf = jj > na;
-
-      if (nargout > 1)
-        a_idx = max (0, jj - na);
+        if (nargout > 1)
+          s_idx = max (0, jj - na);
+        endif
       endif
-
     endif
   endif
 
@@ -155,62 +162,67 @@
 %!assert (ismember ("1", "0123456789."), true)
 
 %!test
-%! [result, a_idx] = ismember ([1, 2], []);
+%! [result, s_idx] = ismember ([1, 2], []);
 %! assert (result, [false false])
-%! assert (a_idx, [0, 0]);
+%! assert (s_idx, [0, 0]);
 
 %!test
-%! [result, a_idx] = ismember ([], [1, 2]);
+%! [result, s_idx] = ismember ([], [1, 2]);
 %! assert (result, logical ([]))
-%! assert (a_idx, []);
+%! assert (s_idx, []);
 
 %!test
-%! [result, a_idx] = ismember ({"a", "b"}, "");
+%! [result, s_idx] = ismember ({"a", "b"}, "");
 %! assert (result, [false false])
-%! assert (a_idx, [0, 0]);
+%! assert (s_idx, [0, 0]);
 
 %!test
-%! [result, a_idx] = ismember ({"a", "b"}, {});
+%! [result, s_idx] = ismember ({"a", "b"}, {});
 %! assert (result, [false false])
-%! assert (a_idx, [0, 0]);
+%! assert (s_idx, [0, 0]);
 
 %!test
-%! [result, a_idx] = ismember ("", {"a", "b"});
+%! [result, s_idx] = ismember ("", {"a", "b"});
 %! assert (result, false)
-%! assert (a_idx, 0);
+%! assert (s_idx, 0);
 
 %!test
-%! [result, a_idx] = ismember ({}, {"a", "b"});
+%! [result, s_idx] = ismember ({}, {"a", "b"});
 %! assert (result, logical ([]))
-%! assert (a_idx, []);
+%! assert (s_idx, []);
 
 %!test
-%! [result, a_idx] = ismember ([1 2 3 4 5], [3]);
+%! [result, s_idx] = ismember ([1 2 3 4 5], [3]);
 %! assert (result, logical ([0 0 1 0 0]))
-%! assert (a_idx , [0 0 1 0 0]);
+%! assert (s_idx , [0 0 1 0 0]);
 
 %!test
-%! [result, a_idx] = ismember ([1 6], [1 2 3 4 5 1 6 1]);
+%! [result, s_idx] = ismember ([1 6], [1 2 3 4 5 1 6 1]);
 %! assert (result, [true true]);
-%! assert (a_idx(2), 7);
+%! assert (s_idx(2), 7);
 
 %!test
-%! [result, a_idx] = ismember ([3,10,1], [0,1,2,3,4,5,6,7,8,9]);
+%! [result, s_idx] = ismember ([3,10,1], [0,1,2,3,4,5,6,7,8,9]);
 %! assert (result, [true false true]);
-%! assert (a_idx, [4, 0, 2]);
+%! assert (s_idx, [4, 0, 2]);
 
 %!test
-%! [result, a_idx] = ismember ("1.1", "0123456789.1");
+%! [result, s_idx] = ismember ("1.1", "0123456789.1");
 %! assert (result, [true true true]);
-%! assert (a_idx, [12, 11, 12]);
+%! assert (s_idx, [12, 11, 12]);
+
+%!test
+%! [result, s_idx] = ismember ([1:3; 5:7; 4:6], [0:2; 1:3; 2:4; 3:5; 4:6], "rows");
+%! assert (result, [true; false; true]);
+%! assert (s_idx, [2; 0; 5]);
 
 %!test
-%! [result, a_idx] = ismember ([1:3; 5:7; 4:6], [0:2; 1:3; 2:4; 3:5; 4:6], "rows");
+%! [result, s_idx] = ismember ([1.1,1.2,1.3; 2.1,2.2,2.3; 10,11,12], [1.1,1.2,1.3; 10,11,12; 2.12,2.22,2.32], "rows");
 %! assert (result, [true; false; true]);
-%! assert (a_idx, [2; 0; 5]);
+%! assert (s_idx, [1; 0; 2]);
 
 %!test
-%! [result, a_idx] = ismember ([1.1,1.2,1.3; 2.1,2.2,2.3; 10,11,12], [1.1,1.2,1.3; 10,11,12; 2.12,2.22,2.32], "rows");
-%! assert (result, [true; false; true]);
-%! assert (a_idx, [1; 0; 2]);
+%! [result, s_idx] = ismember ([1:3; 5:7; 4:6; 0:2; 1:3; 2:4], [1:3], "rows");
+%! assert (result, logical ([1 0 0 0 1 0]'));
+%! assert (s_idx, [1 0 0 0 1 0]');
 
--- a/scripts/set/module.mk
+++ b/scripts/set/module.mk
@@ -8,7 +8,7 @@
   set/setxor.m \
   set/union.m \
   set/unique.m \
-  set/private/validargs.m
+  set/private/validsetargs.m
 
 FCN_FILES += $(set_FCN_FILES)
 
--- a/scripts/set/powerset.m
+++ b/scripts/set/powerset.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Jaroslav Hajek
+## Copyright (C) 2010-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -25,33 +25,35 @@
 ## output will always be a cell array of either vectors or strings.
 ##
 ## With the optional second argument @qcode{"rows"}, each row of the set @var{a}
-## is considered one element of the set.  As a result, @var{a} must then be a
-## numerical 2-D matrix.
+## is considered one element of the set.  The input must be a 2-D numeric
+## matrix to use this argument.
 ##
-## @seealso{unique, union, setxor, setdiff, ismember}
+## @seealso{unique, union, intersect, setdiff, setxor, ismember}
 ## @end deftypefn
 
 function p = powerset (a, byrows_arg)
 
+  if (nargin < 1 || nargin > 2)
+    print_usage ();
+  endif
+
   byrows = false;
-
   if (nargin == 2)
     if (! strcmpi (byrows_arg, "rows"))
       error ('powerset: expecting second argument to be "rows"');
     elseif (iscell (a))
-      warning ('powerset: "rows" not valid for cell arrays');
+      error ('powerset: "rows" not valid for cell arrays');
     else
       byrows = true;
     endif
-  elseif (nargin != 1)
-    print_usage ();
   endif
+
   if (iscell (a) && ! iscellstr (a))
-    error ("powerset: cell arrays can only used for character strings");
+    error ("powerset: cell arrays can only be used for character strings");
   endif
 
   if (byrows)
-    a = unique (a, byrows_arg);
+    a = unique (a, "rows");
     n = rows (a);
   else
     a = unique (a);
@@ -86,12 +88,23 @@
 endfunction
 
 
-%!shared c, p
-%! c = sort (cellstr ({ [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]}));
+%!test
+%! c = sort (cellstr ({[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]}));
 %! p = sort (cellstr (powerset ([1, 2, 3])));
-%!assert (p, c);
+%! assert (p, c);
+
+%!test
 %! c = sort (cellstr ({ [], [1:3], [2:4], [3:5], [1:3; 2:4], [1:3; 3:5], [2:4; 3:5], [1:3; 2:4; 3:5]}));
 %! p = sort (cellstr (powerset ([1:3;2:4;3:5], "rows")));
-%!assert (p,c);
+%! assert (p,c);
+
 %!assert (powerset([]), {});  # always return a cell array
 
+## Test input validation
+%!error powerset ()
+%!error powerset (1,2,3)
+%!error <expecting second argument to be "rows"> powerset (1, "cols")
+%!error <"rows" not valid for cell arrays> powerset ({1}, "rows")
+%!error <cell arrays can only be used for character> powerset ({1})
+%!error <not implemented for more than 32 elements> powerset (1:33)
+
rename from scripts/set/private/validargs.m
rename to scripts/set/private/validsetargs.m
--- a/scripts/set/private/validargs.m
+++ b/scripts/set/private/validsetargs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2009-2010 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -18,7 +18,10 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## Validate arguments for binary set operation.
-function [x, y] = validargs (caller, x, y, byrows_arg)
+
+function [x, y] = validsetargs (caller, x, y, byrows_arg)
+
+  isallowedarraytype = @(x) isnumeric (x) || ischar (x) || islogical (x);
 
   if (nargin == 3)
     icx = iscellstr (x);
@@ -31,28 +34,28 @@
       elseif (! (icx && icy))
         error ("%s: cell array of strings cannot be combined with a nonstring value", caller);
       endif
-    elseif (! (ismatrix (x) && ismatrix (y)))
-      error ("%s: input arguments must be arrays or cell arrays of strings", caller);
+    elseif (! (isallowedarraytype (x) && isallowedarraytype (y)))
+      error ("%s: A and B must be arrays or cell arrays of strings", caller);
     endif
   elseif (nargin == 4)
-    if (strcmpi (byrows_arg, "rows"))
-      if (iscell (x) || iscell (y))
-        error ('%s: cells not supported with "rows"', caller);
-      elseif (! (ismatrix (x) && ismatrix (y)))
-        error ("%s: input arguments must be arrays or cell arrays of strings", caller);
-      else
-        if (ndims (x) > 2 || ndims (y) > 2)
-          error ('%s: need 2-dimensional matrices for "rows"', caller);
-        elseif (columns (x) != columns (y) && ! (isempty (x) || isempty (y)))
-          error ("%s: number of columns must match", caller);
-        endif
-      endif
-    else
+    if (! strcmpi (byrows_arg, "rows"))
       error ("%s: invalid option: %s", caller, byrows_arg);
     endif
-  else
-    print_usage (caller);
+
+    if (iscell (x) || iscell (y))
+      error ('%s: cells not supported with "rows"', caller);
+    elseif (! (isallowedarraytype (x) && isallowedarraytype (y)))
+      error ("%s: A and B must be arrays or cell arrays of strings", caller);
+    else
+      if (ndims (x) > 2 || ndims (y) > 2)
+        error ('%s: A and B must be 2-dimensional matrices for "rows"', caller);
+      elseif (columns (x) != columns (y) && ! (isempty (x) || isempty (y)))
+        error ("%s: number of columns in A and B must match", caller);
+      endif
+    endif
   endif
 
 endfunction
 
+
+## %!tests for function are in union.m
--- a/scripts/set/setdiff.m
+++ b/scripts/set/setdiff.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2008-2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -18,72 +18,81 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} setdiff (@var{a}, @var{b})
-## @deftypefnx {Function File} {} setdiff (@var{a}, @var{b}, "rows")
-## @deftypefnx {Function File} {[@var{c}, @var{i}] =} setdiff (@var{a}, @var{b})
-## Return the elements in @var{a} that are not in @var{b}, sorted in
-## ascending order.  If @var{a} and @var{b} are both column vectors
-## return a column vector, otherwise return a row vector.
-## @var{a}, @var{b} may be cell arrays of string(s).
+## @deftypefn  {Function File} {@var{c} =} setdiff (@var{a}, @var{b})
+## @deftypefnx {Function File} {@var{c} =} setdiff (@var{a}, @var{b}, "rows")
+## @deftypefnx {Function File} {[@var{c}, @var{ia}] =} setdiff (@dots{})
+## Return the unique elements in @var{a} that are not in @var{b} sorted in
+## ascending order.
 ##
-## Given the optional third argument @qcode{"rows"}, return the rows in
-## @var{a} that are not in @var{b}, sorted in ascending order by rows.
+## If @var{a} is a row vector return a column vector;
+## Otherwise, return a column vector.  The inputs may also be cell arrays of
+## strings.
 ##
-## If requested, return @var{i} such that @code{c = a(i)}.
+## If the optional input @qcode{"rows"} is given then return the rows in
+## @var{a} that are not in @var{b}.  The inputs must be 2-D matrices to use
+## this option.
+##
+## If requested, return the index vector @var{ia} such that
+## @code{@var{c} = @var{a}(@var{ia})}.
 ## @seealso{unique, union, intersect, setxor, ismember}
 ## @end deftypefn
 
 ## Author: Paul Kienzle
 ## Adapted-by: jwe
 
-function [c, i] = setdiff (a, b, varargin)
+function [c, ia] = setdiff (a, b, varargin)
 
   if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
-  [a, b] = validargs ("setdiff", a, b, varargin{:});
+  [a, b] = validsetargs ("setdiff", a, b, varargin{:});
 
-  if (nargin > 2)
+  by_rows = nargin == 3;
+  isrowvec = isvector (a) && isrow (a);
+
+  if (by_rows)
     if (nargout > 1)
-      [c, i] = unique (a, "rows");
+      [c, ia] = unique (a, "rows");
     else
       c = unique (a, "rows");
     endif
     if (! isempty (c) && ! isempty (b))
-      ## Form a and b into combined set.
+      ## Form A and B into combined set.
       b = unique (b, "rows");
-      [dummy, idx] = sortrows ([c; b]);
-      ## Eliminate those elements of a that are the same as in b.
-      dups = find (all (dummy(1:end-1,:) == dummy(2:end,:), 2));
+      [tmp, idx] = sortrows ([c; b]);
+      ## Eliminate those elements of A that are the same as in B.
+      dups = find (all (tmp(1:end-1,:) == tmp(2:end,:), 2));
       c(idx(dups),:) = [];
       if (nargout > 1)
-        i(idx(dups),:) = [];
+        ia(idx(dups),:) = [];
       endif
     endif
   else
     if (nargout > 1)
-      [c, i] = unique (a);
+      [c, ia] = unique (a);
     else
       c = unique (a);
     endif
     if (! isempty (c) && ! isempty (b))
       ## Form a and b into combined set.
       b = unique (b);
-      [dummy, idx] = sort ([c(:); b(:)]);
+      [tmp, idx] = sort ([c(:); b(:)]);
       ## Eliminate those elements of a that are the same as in b.
-      if (iscellstr (dummy))
-        dups = find (strcmp (dummy(1:end-1), dummy(2:end)));
+      if (iscellstr (tmp))
+        dups = find (strcmp (tmp(1:end-1), tmp(2:end)));
       else
-        dups = find (dummy(1:end-1) == dummy(2:end));
+        dups = find (tmp(1:end-1) == tmp(2:end));
       endif
       c(idx(dups)) = [];
       if (nargout > 1)
-        i(idx(dups)) = [];
+        ia(idx(dups)) = [];
       endif
-      ## Reshape if necessary.
-      if (rows (c) != 1 && rows (b) == 1)
-        c = c.';
+      ## Reshape if necessary for Matlab compatibility.
+      if (isrowvec)
+        c = c(:).';
+      else
+        c = c(:);
       endif
     endif
   endif
@@ -100,8 +109,22 @@
 %!assert (setdiff ({"one","two";"three","four"}, {"one","two";"three","six"}), {"four"})
 
 %!test
-%! a = [3, 1, 4, 1, 5];  b = [1, 2, 3, 4];
-%! [y, i] = setdiff (a, b.');
-%! assert (y, [5]);
-%! assert (y, a(i));
+%! a = [3, 1, 4, 1, 5];
+%! b = [1, 2, 3, 4];
+%! [c, ia] = setdiff (a, b');
+%! assert (c, [5]);
+%! assert (c, a(ia));
 
+## Test output orientation compatibility (bug #42577)
+%!assert (setdiff ([1:5], 2), [1,3,4,5])
+%!assert (setdiff ([1:5]', 2), [1;3;4;5])
+%!assert (setdiff ([1:5], [2:3]), [1,4,5])
+%!assert (setdiff ([1:5], [2:3]'), [1,4,5])
+%!assert (setdiff ([1:5]', [2:3]), [1;4;5])
+%!assert (setdiff ([1:5]', [2:3]'), [1;4;5])
+
+%!test
+%! a = rand (3,3,3);
+%! b = a(1);
+%! assert (setdiff (a, b), sort (a(2:end)'));
+
--- a/scripts/set/setxor.m
+++ b/scripts/set/setxor.m
@@ -1,4 +1,5 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek
+## Copyright (C) 2014-2015 Julien Bect
+## Copyright (C) 2008-2015 Jaroslav Hajek
 ## Copyright (C) 2000, 2006-2007 Paul Kienzle
 ##
 ## This file is part of Octave.
@@ -18,18 +19,24 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} setxor (@var{a}, @var{b})
-## @deftypefnx {Function File} {} setxor (@var{a}, @var{b}, "rows")
-## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} setxor (@var{a}, @var{b})
+## @deftypefn  {Function File} {@var{c} =} setxor (@var{a}, @var{b})
+## @deftypefnx {Function File} {@var{c} =} setxor (@var{a}, @var{b}, "rows")
+## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} setxor (@dots{})
+##
+## Return the unique elements exclusive to sets @var{a} or @var{b} sorted in
+## ascending order.
 ##
-## Return the elements exclusive to @var{a} or @var{b}, sorted in ascending
-## order.  If @var{a} and @var{b} are both column vectors return a column
-## vector, otherwise return a row vector.
-## @var{a}, @var{b} may be cell arrays of string(s).
+## If @var{a} and @var{b} are both row vectors then return a row vector;
+## Otherwise, return a column vector.  The inputs may also be cell arrays of
+## strings.
 ##
-## With three output arguments, return index vectors @var{ia} and @var{ib}
-## such that @code{a(ia)} and @code{b(ib)} are disjoint sets whose union
-## is @var{c}.
+## If the optional input @qcode{"rows"} is given then return the rows exclusive
+## to sets @var{a} and @var{b}.  The inputs must be 2-D matrices to use this
+## option.
+##
+## If requested, return index vectors @var{ia} and @var{ib} such that
+## @code{@var{a}(@var{ia})} and @code{@var{b}(@var{ib})} are disjoint sets
+## whose union is @var{c}.
 ##
 ## @seealso{unique, union, intersect, setdiff, ismember}
 ## @end deftypefn
@@ -40,7 +47,10 @@
     print_usage ();
   endif
 
-  [a, b] = validargs ("setxor", a, b, varargin{:});
+  [a, b] = validsetargs ("setxor", a, b, varargin{:});
+
+  by_rows = nargin == 3;
+  isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b);
 
   ## Form A and B into sets.
   if (nargout > 1)
@@ -57,8 +67,8 @@
     c = a;
   else
     ## Reject duplicates.
-    if (nargin > 2)
-      na = rows (a); nb = rows (b);
+    if (by_rows)
+      na = rows (a);  nb = rows (b);
       [c, i] = sortrows ([a; b]);
       n = rows (c);
       idx = find (all (c(1:n-1, :) == c(2:n, :), 2));
@@ -67,7 +77,7 @@
         i([idx, idx+1],:) = [];
       endif
     else
-      na = numel (a); nb = numel (b);
+      na = numel (a);  nb = numel (b);
       [c, i] = sort ([a(:); b(:)]);
       n = length (c);
       if (iscell (c))
@@ -79,31 +89,81 @@
         c([idx, idx+1]) = [];
         i([idx, idx+1]) = [];
       endif
-      if (rows (a) == 1 || rows (b) == 1)
+
+      ## Adjust output orientation for Matlab compatibility
+      if (isrowvec)
         c = c.';
       endif
     endif
-  endif
-  if (nargout > 1)
-    ia = ia(i(i <= na));
-    ib = ib(i(i > na) - na);
+
+    if (nargout > 1)
+      ia = ia(i(i <= na));
+      ib = ib(i(i > na) - na);
+    endif
   endif
 
 endfunction
 
 
-%!assert (setxor ([1,2,3],[2,3,4]),[1,4])
+%!assert (setxor ([1,2,3], [2,3,4]), [1,4])
 %!assert (setxor ({'a'}, {'a', 'b'}), {'b'})
 
 %!test
-%! a = [3, 1, 4, 1, 5];  b = [1, 2, 3, 4];
+%! a = [3, 1, 4, 1, 5];
+%! b = [1, 2, 3, 4];
 %! [c, ia, ib] = setxor (a, b.');
-%! assert (c, [2, 5]);
-%! assert (c, sort ([a(ia), b(ib)]));
+%! assert (c, [2; 5]);
+%! assert (c, sort ([a(ia)'; b(ib)']));
 
 %!test
-%! a = [1 2; 4 5; 1 3];  b = [1 1; 1 2; 4 5; 2 10];
+%! a = [1 2; 4 5; 1 3];
+%! b = [1 1; 1 2; 4 5; 2 10];
 %! [c, ia, ib] = setxor (a, b, "rows");
 %! assert (c, [1 1; 1 3; 2 10]);
 %! assert (c, sortrows ([a(ia,:); b(ib,:)]));
 
+%!assert (setxor (1, []), 1)
+%!assert (setxor ([], 1), 1)
+
+%!test
+%! [c, ia, ib] = setxor (1, []);
+%! assert (c, 1);
+%! assert (ia, 1);
+%! assert (isempty (ib));
+
+%!test
+%! [c, ia, ib] = setxor ([], 1);
+%! assert (c, 1);
+%! assert (isempty (ia));
+%! assert (ib, 1);
+
+%!test
+%! a = [2 1; 4 3];  b = [];
+%! [c, ia, ib] = setxor (a, b);
+%! assert (c, [1; 2; 3; 4]);
+%! assert (ia, [3; 1; 4; 2]);
+%! assert (isempty (ib));
+
+%!test
+%! a = [];  b = [2 1; 4 3];
+%! [c, ia, ib] = setxor (a, b);
+%! assert (c, [1; 2; 3; 4]);
+%! assert (isempty (ia));
+%! assert (ib, [3; 1; 4; 2]);
+## Test orientation of output
+%!shared x,y
+%! x = 1:3;
+%! y = 2:5;
+
+%!assert (size (setxor (x, y)), [1 3])
+%!assert (size (setxor (x', y)), [3 1])
+%!assert (size (setxor (x, y')), [3 1])
+%!assert (size (setxor (x', y')), [3 1])
+
+## Test multi-dimensional arrays
+%!test
+%! a = rand (3,3,3);
+%! b = a;
+%! b(1,1,1) = 2;
+%! assert (intersect (a, b), sort (a(2:end)'));
+
--- a/scripts/set/union.m
+++ b/scripts/set/union.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2008-2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -18,38 +18,26 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} union (@var{a}, @var{b})
-## @deftypefnx {Function File} {} union (@var{a}, @var{b}, "rows")
-## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} union (@var{a}, @var{b})
+## @deftypefn  {Function File} {@var{c} =} union (@var{a}, @var{b})
+## @deftypefnx {Function File} {@var{c} =} union (@var{a}, @var{b}, "rows")
+## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} union (@dots{})
 ##
-## Return the set of elements that are in either of the sets @var{a} and
-## @var{b}.  @var{a}, @var{b} may be cell arrays of strings.
-## For example:
+## Return the unique elements that are in either @var{a} or @var{b} sorted in
+## ascending order.
 ##
-## @example
-## @group
-## union ([1, 2, 4], [2, 3, 5])
-##     @result{} [1, 2, 3, 4, 5]
-## @end group
-## @end example
+## If @var{a} and @var{b} are both row vectors then return a row vector;
+## Otherwise, return a column vector.  The inputs may also be cell arrays of
+## strings.
 ##
-## If the optional third input argument is the string @qcode{"rows"} then
-## each row of the matrices @var{a} and @var{b} will be considered as a
-## single set element.  For example:
-##
-## @example
-## @group
-## union ([1, 2; 2, 3], [1, 2; 3, 4], "rows")
-##    @result{}  1   2
-##        2   3
-##        3   4
-## @end group
-## @end example
+## If the optional input @qcode{"rows"} is given then return rows that are in
+## either @var{a} or @var{b}.  The inputs must be 2-D matrices to use this
+## option.
 ##
 ## The optional outputs @var{ia} and @var{ib} are index vectors such that
-## @code{a(ia)} and @code{b(ib)} are disjoint sets whose union is @var{c}.
+## @code{@var{a}(@var{ia})} and @code{@var{b}(@var{ib})} are disjoint sets
+## whose union is @var{c}.
 ##
-## @seealso{intersect, setdiff, unique}
+## @seealso{unique, intersect, setdiff, setxor, ismember}
 ## @end deftypefn
 
 ## Author: jwe
@@ -60,40 +48,58 @@
     print_usage ();
   endif
 
-  [a, b] = validargs ("union", a, b, varargin{:});
+  [a, b] = validsetargs ("union", a, b, varargin{:});
+
+  by_rows = nargin == 3;
+  isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b);
 
-  if (nargin == 2)
+  if (by_rows)
+    y = [a; b];
+  else
     y = [a(:); b(:)];
-    na = numel (a); nb = numel (b);
-    if (rows (a) == 1 || rows (b) == 1)
+    ## Adjust output orientation for Matlab compatibility
+    if (isrowvec)
       y = y.';
     endif
-  else
-    y = [a; b];
-    na = rows (a); nb = rows (b);
   endif
 
-  if (nargout == 1)
+  if (nargout <= 1)
     y = unique (y, varargin{:});
   else
-    [y, i] = unique (y, varargin{:});
-    ia = i(i <= na);
-    ib = i(i > na) - na;
+    [y, idx] = unique (y, varargin{:});
+    na = numel (a);
+    ia = idx(idx <= na);
+    ib = idx(idx > na) - na;
   endif
 
 endfunction
 
 
-%!assert (union ([1, 2, 4], [2, 3, 5]), [1, 2, 3, 4, 5]);
-%!assert (union ([1; 2; 4], [2, 3, 5]), [1, 2, 3, 4, 5]);
-%!assert (union ([1, 2, 3], [5; 7; 9]), [1, 2, 3, 5, 7, 9]);
+%!assert (union ([1, 2, 4], [2, 3, 5]), [1, 2, 3, 4, 5])
+%!assert (union ([1; 2; 4], [2, 3, 5]), [1; 2; 3; 4; 5])
+%!assert (union ([1; 2; 4], [2; 3; 5]), [1; 2; 3; 4; 5])
+%!assert (union ([1, 2, 3], [5; 7; 9]), [1; 2; 3; 5; 7; 9])
+
+## Test multi-dimensional arrays
+%!test
+%! a = rand (3,3,3);
+%! b = a;
+%! b(1,1,1) = 2;
+%! assert (union (a, b), sort ([a(1:end)'; 2]));
 
 %!test
-%! a = [3, 1, 4, 1, 5];  b = [1, 2, 3, 4];
+%! a = [3, 1, 4, 1, 5];
+%! b = [1, 2, 3, 4];
 %! [y, ia, ib] = union (a, b.');
-%! assert (y, [1, 2, 3, 4, 5]);
-%! assert (y, sort ([a(ia), b(ib)]));
+%! assert (y, [1; 2; 3; 4; 5]);
+%! assert (y, sort ([a(ia)'; b(ib)']));
 
-%!error union (1)
-%!error union (1, 2, 3)
+## Test common input validation for set routines contained in validsetargs
+%!error <cell array of strings cannot be combined> union ({"a"}, 1)
+%!error <A and B must be arrays or cell arrays> union (@sin, 1)
+%!error <invalid option: columns> union (1, 2, "columns")
+%!error <cells not supported with "rows"> union ({"a"}, {"b"}, "rows")
+%!error <A and B must be arrays or cell arrays> union (@sin, 1, "rows")
+%!error <A and B must be 2-dimensional matrices> union (rand(2,2,2), 1, "rows")
+%!error <number of columns in A and B must match> union ([1 2], 1, "rows")
 
--- a/scripts/set/unique.m
+++ b/scripts/set/unique.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2008-2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -20,20 +20,20 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} unique (@var{x})
 ## @deftypefnx {Function File} {} unique (@var{x}, "rows")
-## @deftypefnx {Function File} {} unique (@dots{}, "first")
-## @deftypefnx {Function File} {} unique (@dots{}, "last")
 ## @deftypefnx {Function File} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{})
-## Return the unique elements of @var{x}, sorted in ascending order.
-## If the input @var{x} is a vector then the output is also a vector with the
-## same orientation (row or column) as the input.  For a matrix input the
-## output is always a column vector.  @var{x} may also be a cell array of
-## strings.
+## @deftypefnx {Function File} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{}, "first")
+## @deftypefnx {Function File} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{}, "last")
+## Return the unique elements of @var{x} sorted in ascending order.
 ##
-## If the optional argument @qcode{"rows"} is supplied, return the unique
-## rows of @var{x}, sorted in ascending order.
+## If the input @var{x} is a column vector then return a column vector;
+## Otherwise, return a row vector.  @var{x} may also be a cell array of strings.
+##
+## If the optional argument @qcode{"rows"} is given then return the unique
+## rows of @var{x} sorted in ascending order.  The input must be a 2-D matrix
+## to use this option.
 ##
 ## If requested, return index vectors @var{i} and @var{j} such that
-## @code{x(i)==y} and @code{y(j)==x}.
+## @code{@var{y} = @var{x}(@var{i})} and @code{@var{x} = @var{y}(@var{j})}.
 ##
 ## Additionally, if @var{i} is a requested output then one of @qcode{"first"} or
 ## @qcode{"last"} may be given as an input.  If @qcode{"last"} is specified,
@@ -46,37 +46,35 @@
 
   if (nargin < 1)
     print_usage ();
+  elseif (! (isnumeric (x) || islogical (x) || ischar (x) || iscellstr (x)))
+    error ("unique: X must be an array or cell array of strings");
   endif
 
   if (nargin > 1)
     ## parse options
-    if (iscellstr (varargin))
-      optfirst = strcmp ("first", varargin);
-      optlast  = strcmp ("last", varargin);
-      optrows  = strcmp ("rows", varargin);
-      if (! all (optfirst | optlast | optrows))
-        error ("unique: invalid option");
-      endif
-      optfirst = any (optfirst);
-      optlast  = any (optlast);
-      optrows  = any (optrows);
-      if (optfirst && optlast)
-        error ('unique: cannot specify both "last" and "first"');
-      endif
-    else
+    if (! iscellstr (varargin))
       error ("unique: options must be strings");
     endif
 
-    if (optrows && iscell (x))
+    optrows  = any (strcmp ("rows", varargin));
+    optfirst = any (strcmp ("first", varargin));
+    optlast  = any (strcmp ("last", varargin));
+    if (optfirst && optlast)
+      error ('unique: cannot specify both "first" and "last"');
+    elseif (optfirst + optlast + optrows != nargin-1)
+      error ("unique: invalid option");
+    endif
+
+    if (optrows && iscellstr (x))
       warning ('unique: "rows" is ignored for cell arrays');
       optrows = false;
     endif
   else
+    optrows = false;
     optfirst = false;
-    optrows = false;
   endif
 
-  ## FIXME -- the operations
+  ## FIXME: The operations
   ##
   ##   match = (y(1:n-1) == y(2:n));
   ##   y(idx) = [];
@@ -87,7 +85,7 @@
 
   if (issparse (x) && ! optrows && nargout <= 1)
     if (nnz (x) < numel (x))
-      y = unique ([0; (full (nonzeros (x)))], varargin{:});
+      y = unique ([0; nonzeros(x)], varargin{:});
     else
       ## Corner case where sparse matrix is actually full
       y = unique (full (x), varargin{:});
@@ -107,7 +105,7 @@
   ## Special cases 0 and 1
   if (n == 0)
     if (! optrows && isempty (x) && any (size (x)))
-      if (iscell (y))
+      if (iscellstr (y))
         y = cell (0, 1);
       else
         y = zeros (0, 1, class (y));
@@ -127,8 +125,7 @@
       y = sortrows (y);
     endif
     match = all (y(1:n-1,:) == y(2:n,:), 2);
-    idx = find (match);
-    y(idx,:) = [];
+    y(match,:) = [];
   else
     if (! isvector (y))
       y = y(:);
@@ -138,13 +135,12 @@
     else
       y = sort (y);
     endif
-    if (iscell (y))
+    if (iscellstr (y))
       match = strcmp (y(1:n-1), y(2:n));
     else
       match = (y(1:n-1) == y(2:n));
     endif
-    idx = find (match);
-    y(idx) = [];
+    y(match) = [];
   endif
 
   if (isargout (3))
@@ -157,25 +153,25 @@
   endif
 
   if (isargout (2))
+    idx = find (match);
     if (optfirst)
-      i(idx+1) = [];
-    else
-      i(idx) = [];
+      idx += 1;   # in-place is faster than other forms of increment
     endif
+    i(idx) = [];
   endif
 
 endfunction
 
 
-%!assert (unique ([1 1 2; 1 2 1; 1 1 2]),[1;2])
-%!assert (unique ([1 1 2; 1 0 1; 1 1 2],"rows"),[1 0 1; 1 1 2])
-%!assert (unique ([]),[])
-%!assert (unique ([1]),[1])
-%!assert (unique ([1 2]),[1 2])
-%!assert (unique ([1;2]),[1;2])
-%!assert (unique ([1,NaN,Inf,NaN,Inf]),[1,Inf,NaN,NaN])
-%!assert (unique ({"Foo","Bar","Foo"}),{"Bar","Foo"})
-%!assert (unique ({"Foo","Bar","FooBar"}'),{"Bar","Foo","FooBar"}')
+%!assert (unique ([1 1 2; 1 2 1; 1 1 2]), [1;2])
+%!assert (unique ([1 1 2; 1 0 1; 1 1 2],"rows"), [1 0 1; 1 1 2])
+%!assert (unique ([]), [])
+%!assert (unique ([1]), [1])
+%!assert (unique ([1 2]), [1 2])
+%!assert (unique ([1;2]), [1;2])
+%!assert (unique ([1,NaN,Inf,NaN,Inf]), [1,Inf,NaN,NaN])
+%!assert (unique ({"Foo","Bar","Foo"}), {"Bar","Foo"})
+%!assert (unique ({"Foo","Bar","FooBar"}'), {"Bar","Foo","FooBar"}')
 %!assert (unique (zeros (1,0)), zeros (0,1))
 %!assert (unique (zeros (1,0), "rows"), zeros (1,0))
 %!assert (unique (cell (1,0)), cell (0,1))
@@ -192,6 +188,7 @@
 %!assert (unique (uint8 ([1,2,2,3,2,4]), "rows"), uint8 ([1,2,2,3,2,4]))
 %!assert (unique (uint8 ([1,2,2,3,2,4])), uint8 ([1,2,3,4]))
 %!assert (unique (uint8 ([1,2,2,3,2,4]'), "rows"), uint8 ([1,2,3,4]'))
+
 %!test
 %! [a,i,j] = unique ([1,1,2,3,3,3,4]);
 %! assert (a, [1,2,3,4]);
@@ -217,8 +214,15 @@
 %! assert (A(i,:), a);
 %! assert (a(j,:), A);
 
-%!error unique({"a", "b", "c"}, "UnknownOption")
-%!error unique({"a", "b", "c"}, "UnknownOption1", "UnknownOption2")
-%!error unique({"a", "b", "c"}, "rows", "UnknownOption2")
-%!error unique({"a", "b", "c"}, "UnknownOption1", "last")
+## Test input validation
+%!error unique ()
+%!error <X must be an array or cell array of strings> unique ({1})
+%!error <options must be strings> unique (1, 2)
+%!error <cannot specify both "first" and "last"> unique (1, "first", "last")
+%!error <invalid option> unique (1, "middle")
+%!error <invalid option> unique ({"a", "b", "c"}, "UnknownOption")
+%!error <invalid option> unique ({"a", "b", "c"}, "UnknownOption1", "UnknownOption2")
+%!error <invalid option> unique ({"a", "b", "c"}, "rows", "UnknownOption2")
+%!error <invalid option> unique ({"a", "b", "c"}, "UnknownOption1", "last")
+%!warning <"rows" is ignored for cell arrays> unique ({"1"}, "rows");
 
--- a/scripts/signal/arch_fit.m
+++ b/scripts/signal/arch_fit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -19,7 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{a}, @var{b}] =} arch_fit (@var{y}, @var{x}, @var{p}, @var{iter}, @var{gamma}, @var{a0}, @var{b0})
 ## Fit an ARCH regression model to the time series @var{y} using the
-## scoring algorithm in Engle's original ARCH paper.  The model is
+## scoring algorithm in @nospell{Engle's} original ARCH paper.  The model is
 ##
 ## @example
 ## @group
@@ -52,7 +52,7 @@
 
 function [a, b] = arch_fit (y, x, p, iter, gamma, a0, b0)
 
-  if ((nargin < 3) || (nargin == 6) || (nargin > 7))
+  if (nargin < 3 || nargin == 6 || nargin > 7)
     print_usage ();
   endif
 
@@ -60,8 +60,8 @@
     error ("arch_fit: Y must be a vector");
   endif
 
-  T   = length (y);
-  y   = reshape (y, T, 1);
+  T = length (y);
+  y = reshape (y, T, 1);
   [rx, cx] = size (x);
   if ((rx == 1) && (cx == 1))
     x = autoreg_matrix (y, x);
@@ -72,12 +72,12 @@
   [T, k] = size (x);
 
   if (nargin == 7)
-    a   = a0;
-    b   = b0;
-    e   = y - x * b;
+    a = a0;
+    b = b0;
+    e = y - x * b;
   else
     [b, v_b, e] = ols (y, x);
-    a   = [v_b, (zeros (1, p))]';
+    a = [v_b, (zeros (1, p))]';
     if (nargin < 5)
       gamma = 0.1;
       if (nargin < 4)
@@ -87,20 +87,20 @@
   endif
 
   esq = e.^2;
-  Z   = autoreg_matrix (esq, p);
+  Z = autoreg_matrix (esq, p);
 
   for i = 1 : iter;
-    h    = Z * a;
-    tmp  = esq ./ h.^2 - 1 ./ h;
-    s    = 1 ./ h(1:T-p);
+    h   = Z * a;
+    tmp = esq ./ h.^2 - 1 ./ h;
+    s   = 1 ./ h(1:T-p);
     for j = 1 : p;
       s = s - a(j+1) * tmp(j+1:T-p+j);
     endfor
-    r    = 1 ./ h(1:T-p);
+    r = 1 ./ h(1:T-p);
     for j = 1:p;
       r = r + 2 * h(j+1:T-p+j).^2 .* esq(1:T-p);
     endfor
-    r   = sqrt (r);
+    r = sqrt (r);
     X_tilde = x(1:T-p, :) .* (r * ones (1,k));
     e_tilde = e(1:T-p) .*s ./ r;
     delta_b = inv (X_tilde' * X_tilde) * X_tilde' * e_tilde;
@@ -112,7 +112,7 @@
     f   = esq ./ h - ones (T,1);
     Z_tilde = Z ./ (h * ones (1, p+1));
     delta_a = inv (Z_tilde' * Z_tilde) * Z_tilde' * f;
-    a   = a + gamma * delta_a;
+    a = a + gamma * delta_a;
   endfor
 
 endfunction
--- a/scripts/signal/arch_rnd.m
+++ b/scripts/signal/arch_rnd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -71,11 +71,11 @@
     b  = [b, 0];
     lb = lb + 1;
   endif
-  m  = max ([la, lb]);
+  m = max ([la, lb]);
 
-  e  = zeros (t, 1);
-  h  = zeros (t, 1);
-  y  = zeros (t, 1);
+  e = zeros (t, 1);
+  h = zeros (t, 1);
+  y = zeros (t, 1);
 
   h(1) = a(1);
   e(1) = sqrt (h(1)) * randn;
--- a/scripts/signal/arch_test.m
+++ b/scripts/signal/arch_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -74,8 +74,8 @@
   if (! (isvector (y)))
     error ("arch_test: Y must be a vector");
   endif
-  T   = length (y);
-  y   = reshape (y, T, 1);
+  T = length (y);
+  y = reshape (y, T, 1);
   [rx, cx] = size (x);
   if ((rx == 1) && (cx == 1))
     x = autoreg_matrix (y, x);
--- a/scripts/signal/arma_rnd.m
+++ b/scripts/signal/arma_rnd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -46,7 +46,7 @@
   if (nargin == 4)
     n = 100;
   elseif (nargin == 5)
-    if (!isscalar (n))
+    if (! isscalar (n))
       error ("arma_rnd: N must be a scalar");
     endif
   else
@@ -57,7 +57,7 @@
     error ("arma_rnd: A and B must not be matrices");
   endif
 
-  if (!isscalar (t))
+  if (! isscalar (t))
     error ("arma_rnd: T must be a scalar");
   endif
 
--- a/scripts/signal/autoreg_matrix.m
+++ b/scripts/signal/autoreg_matrix.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/bartlett.m
+++ b/scripts/signal/bartlett.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
@@ -21,8 +21,9 @@
 ## Return the filter coefficients of a Bartlett (triangular) window of
 ## length @var{m}.
 ##
-## For a definition of the Bartlett window, see e.g., A. V. Oppenheim &
-## R. W. Schafer, @cite{Discrete-Time Signal Processing}.
+## For a definition of the Bartlett window, see e.g.,
+## @nospell{A.V. Oppenheim & R. W. Schafer},
+## @cite{Discrete-Time Signal Processing}.
 ## @end deftypefn
 
 ## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
@@ -35,7 +36,7 @@
   endif
 
   if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
-    error ("bartlett: M has to be an integer > 0");
+    error ("bartlett: M must be a positive integer");
   endif
 
   if (m == 1)
@@ -51,8 +52,8 @@
 
 %!assert (bartlett (1), 1)
 %!assert (bartlett (2), zeros (2,1))
-%!assert (bartlett (16), fliplr (bartlett (16)))
-%!assert (bartlett (15), fliplr (bartlett (15)))
+%!assert (bartlett (15), flip (bartlett (15)), 5*eps)
+%!assert (bartlett (16), flip (bartlett (16)), 5*eps)
 %!test
 %! N = 9;
 %! A = bartlett (N);
--- a/scripts/signal/blackman.m
+++ b/scripts/signal/blackman.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
@@ -17,31 +17,51 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} blackman (@var{m})
+## @deftypefn  {Function File} {} blackman (@var{m})
+## @deftypefnx {Function File} {} blackman (@var{m}, "periodic")
+## @deftypefnx {Function File} {} blackman (@var{m}, "symmetric")
 ## Return the filter coefficients of a Blackman window of length @var{m}.
 ##
-## For a definition of the Blackman window, see e.g., A. V. Oppenheim &
-## R. W. Schafer, @cite{Discrete-Time Signal Processing}.
+## If the optional argument @qcode{"periodic"} is given, the periodic form
+## of the window is returned.  This is equivalent to the window of length
+## @var{m}+1 with the last coefficient removed.  The optional argument
+## @qcode{"symmetric"} is equivalent to not specifying a second argument.
+##
+## For a definition of the Blackman window, see e.g.,
+## @nospell{A.V. Oppenheim & R. W. Schafer},
+## @cite{Discrete-Time Signal Processing}.
 ## @end deftypefn
 
 ## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
 ## Description: Coefficients of the Blackman window
 
-function c = blackman (m)
+function c = blackman (m, opt)
 
-  if (nargin != 1)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
   if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
-    error ("blackman: M has to be an integer > 0");
+    error ("blackman: M must be a positive integer");
+  endif
+
+  N = m - 1;
+  if (nargin == 2)
+    switch (opt)
+      case "periodic"
+        N = m;
+      case "symmetric"
+        ## Default option, same as no option specified.
+      otherwise
+        error ('blackman: window type must be either "periodic" or "symmetric"');
+    endswitch
   endif
 
   if (m == 1)
     c = 1;
   else
     m = m - 1;
-    k = (0 : m)' / m;
+    k = (0 : m)' / N;
     c = 0.42 - 0.5 * cos (2 * pi * k) + 0.08 * cos (4 * pi * k);
   endif
 
@@ -50,16 +70,24 @@
 
 %!assert (blackman (1), 1)
 %!assert (blackman (2), zeros (2,1), 1e-6)
-%!assert (blackman (16), fliplr (blackman (16)))
-%!assert (blackman (15), fliplr (blackman (15)))
+%!assert (blackman (15), flip (blackman (15)), 5*eps)
+%!assert (blackman (16), flip (blackman (16)), 5*eps)
 %!test
 %! N = 9;
 %! A = blackman (N);
-%! assert (A (ceil (N/2)), 1, 1e-6);
-%! assert ([A(1), A(length (A))], zeros (1, 2), 1e-6);
+%! assert (A(ceil (N/2)), 1, 1e-6);
+%! assert ([A(1), A(length (A))], zeros (1,2), 1e-6);
+
+%!assert (blackman (15), blackman (15, "symmetric"));
+%!assert (blackman (16)(1:15), blackman (15, "periodic"));
+%!test
+%! N = 16;
+%! A = blackman (N, "periodic");
+%! assert (A(N/2 + 1), 1, 1e-6);
 
 %!error blackman ()
 %!error blackman (0.5)
 %!error blackman (-1)
 %!error blackman (ones (1,4))
+%!error blackman (1, "invalid");
 
--- a/scripts/signal/detrend.m
+++ b/scripts/signal/detrend.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,7 +46,7 @@
       p = 0;
     elseif (ischar (p) && strcmpi (p, "linear"))
       p = 1;
-    elseif (!isscalar (p) || p < 0 || p != fix (p))
+    elseif (! isscalar (p) || p < 0 || p != fix (p))
       error ("detrend: second input argument must be 'constant', 'linear' or a positive integer");
     endif
   else
--- a/scripts/signal/diffpara.m
+++ b/scripts/signal/diffpara.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
 ## described above is returned in @var{dd}.  The value of @var{d} is
 ## simply the mean of @var{dd}.
 ##
-## Reference: P.J. Brockwell & R.A. Davis. @cite{Time Series:
+## Reference: @nospell{P.J. Brockwell & R.A. Davis}. @cite{Time Series:
 ## Theory and Methods}. Springer 1987.
 ## @end deftypefn
 
@@ -41,23 +41,23 @@
 
 function [d, dd] = diffpara (x, a, b)
 
-  if ((nargin < 1) || (nargin > 3))
+  if (nargin < 1 || nargin > 3)
     print_usage ();
+  endif
+
+  if (isvector (x))
+    n = length (x);
+    k = 1;
+    x = reshape (x, n, 1);
   else
-    if (isvector (x))
-      n = length (x);
-      k = 1;
-      x = reshape (x, n, 1);
-    else
-      [n, k] = size (x);
-    endif
-    if (nargin == 1)
-      a = 0.5 * sqrt (n);
-      b = 1.5 * sqrt (n);
-    elseif (nargin == 2)
-      b = a;
-      a = 1;
-    endif
+    [n, k] = size (x);
+  endif
+  if (nargin == 1)
+    a = 0.5 * sqrt (n);
+    b = 1.5 * sqrt (n);
+  elseif (nargin == 2)
+    b = a;
+    a = 1;
   endif
 
   if (! (isscalar (a) && isscalar (b)))
--- a/scripts/signal/durbinlevinson.m
+++ b/scripts/signal/durbinlevinson.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} durbinlevinson (@var{c}, @var{oldphi}, @var{oldv})
-## Perform one step of the Durbin-Levinson algorithm.
+## Perform one step of the @nospell{Durbin-Levinson} algorithm.
 ##
 ## The vector @var{c} specifies the autocovariances @code{[gamma_0, @dots{},
 ## gamma_t]} from lag 0 to @var{t}, @var{oldphi} specifies the
@@ -34,7 +34,7 @@
 
 function [newphi, newv] = durbinlevinson (c, oldphi, oldv)
 
-  if (! ((nargin == 1) || (nargin == 3)))
+  if (nargin != 1 && nargin != 3)
     print_usage ();
   endif
 
--- a/scripts/signal/fftconv.m
+++ b/scripts/signal/fftconv.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -65,7 +65,7 @@
 endfunction
 
 
-%% FIXME: Borrow tests from conv.m.  May need a tolerance on the assert comparison
+## FIXME: Borrow tests from conv.m.  May need tolerance on the assert stmt.
 %!test
 %! x = ones (3,1);
 %! y = ones (1,3);
@@ -98,7 +98,7 @@
 %! assert (size (conv (a,b)), [1, numel(a)+numel(b)-1]);
 %! assert (size (conv (b,a)), [1, numel(a)+numel(b)-1]);
 
-%% Test input validation
+## Test input validation
 %!error fftconv (1)
 %!error fftconv (1,2,3,4)
 %!error fftconv ([1, 2; 3, 4], 3)
--- a/scripts/signal/fftfilt.m
+++ b/scripts/signal/fftfilt.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -185,7 +185,7 @@
 %! y  = fftfilt (b, x);
 %! assert (y0, y, 55*eps);
 
-%% Test input validation
+## Test input validation
 %!error fftfilt (1)
 %!error fftfilt (1, 2, 3, 4)
 %!error fftfilt (ones (2), 1)
--- a/scripts/signal/fftshift.m
+++ b/scripts/signal/fftshift.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1997-2013 Vincent Cautaerts
+## Copyright (C) 1997-2015 Vincent Cautaerts
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/filter2.m
+++ b/scripts/signal/filter2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/fractdiff.m
+++ b/scripts/signal/fractdiff.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/freqz.m
+++ b/scripts/signal/freqz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -22,7 +22,7 @@
 ## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a})
 ## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n})
 ## @deftypefnx {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w})
-## @deftypefnx {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs})
+## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@dots{}, @var{Fs})
 ## @deftypefnx {Function File} {} freqz (@dots{})
 ##
 ## Return the complex frequency response @var{h} of the rational IIR filter
@@ -97,12 +97,18 @@
 
   if (isempty (b))
     b = 1;
+  elseif (! isvector (b))
+    error ("freqz: B must be a vector");
   endif
   if (isempty (a))
     a = 1;
+  elseif (! isvector (a))
+    error ("freqz: A must be a vector");
   endif
   if (isempty (n))
     n = 512;
+  elseif (isscalar (n) && n < 1)
+    error ("freqz: N must be a positive integer");
   endif
   if (isempty (region))
     if (isreal (b) && isreal (a))
@@ -121,6 +127,8 @@
   else
     freq_norm = false;
   endif
+  plot_output = (nargout == 0);
+  whole_region = strcmp (region, "whole");
 
   a = a(:);
   b = b(:);
@@ -147,14 +155,21 @@
       n = n * 2 .^ ceil (log2 (2*k/n));
     endif
 
-    if (strcmp (region, "whole"))
+    if (whole_region)
       N = n;
+      if (plot_output)
+        f = Fs * (0:n).' / N;    # do 1 more for the plot
+      else
+        f = Fs * (0:n-1).' / N;
+      endif
     else
       N = 2*n;
+      if (plot_output)
+        n++;
+      endif
+      f = Fs * (0:n-1).' / N;
     endif
 
-    f = Fs * (0:n-1).' / N;
-
     pad_sz = N*ceil (k/N);
     b = postpad (b, pad_sz);
     a = postpad (a, pad_sz);
@@ -171,13 +186,16 @@
 
   h = hb ./ ha;
 
-  if (nargout != 0)
+  if (plot_output)
+    ## Plot and don't return values.
+    if (whole_region)
+      h(end+1) = h(1); # Solution is periodic.  Copy first value to end.
+    endif
+    freqz_plot (f, h, freq_norm);
+  else
     ## Return values and don't plot.
     h_r = h;
     f_r = f;
-  else
-    ## Plot and don't return values.
-    freqz_plot (f, h, freq_norm);
   endif
 
 endfunction
@@ -210,3 +228,6 @@
 %! [h3,f3] = freqz (b,a,32,"whole",320);
 %! assert (f3,[0:31]'*10,10*eps);
 
+## Test input validation
+## FIXME: Need to put tests here and simplify input validation in the main code.
+
--- a/scripts/signal/freqz_plot.m
+++ b/scripts/signal/freqz_plot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2002-2013 John W. Eaton
+## Copyright (C) 2002-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/hamming.m
+++ b/scripts/signal/hamming.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
@@ -17,31 +17,51 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} hamming (@var{m})
+## @deftypefn  {Function File} {} hamming (@var{m})
+## @deftypefnx {Function File} {} hamming (@var{m}, "periodic")
+## @deftypefnx {Function File} {} hamming (@var{m}, "symmetric")
 ## Return the filter coefficients of a Hamming window of length @var{m}.
 ##
-## For a definition of the Hamming window, see e.g., A. V. Oppenheim &
-## R. W. Schafer, @cite{Discrete-Time Signal Processing}.
+## If the optional argument @qcode{"periodic"} is given, the periodic form
+## of the window is returned.  This is equivalent to the window of length
+## @var{m}+1 with the last coefficient removed.  The optional argument
+## @qcode{"symmetric"} is equivalent to not specifying a second argument.
+##
+## For a definition of the Hamming window, see e.g.,
+## @nospell{A.V. Oppenheim & R. W. Schafer},
+## @cite{Discrete-Time Signal Processing}.
 ## @end deftypefn
 
 ## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
 ## Description: Coefficients of the Hamming window
 
-function c = hamming (m)
+function c = hamming (m, opt)
 
-  if (nargin != 1)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
   if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
-    error ("hamming: M has to be an integer > 0");
+    error ("hamming: M must be a positive integer");
+  endif
+
+  N = m - 1;
+  if (nargin == 2)
+    switch (opt)
+      case "periodic"
+        N = m;
+      case "symmetric"
+        ## Default option, same as no option specified.
+      otherwise
+        error ('hamming: window type must be either "periodic" or "symmetric"');
+    endswitch
   endif
 
   if (m == 1)
     c = 1;
   else
     m = m - 1;
-    c = 0.54 - 0.46 * cos (2 * pi * (0:m)' / m);
+    c = 0.54 - 0.46 * cos (2 * pi * (0 : m)' / N);
   endif
 
 endfunction
@@ -49,15 +69,23 @@
 
 %!assert (hamming (1), 1)
 %!assert (hamming (2), (0.54 - 0.46)*ones (2,1))
-%!assert (hamming (16), fliplr (hamming (16)))
-%!assert (hamming (15), fliplr (hamming (15)))
+%!assert (hamming (15), flip (hamming (15)), 5*eps)
+%!assert (hamming (16), flip (hamming (16)), 5*eps)
 %!test
 %! N = 15;
 %! A = hamming (N);
-%! assert (A (ceil (N/2)), 1);
+%! assert (A(ceil (N/2)), 1);
+
+%!assert (hamming (15), hamming (15, "symmetric"));
+%!assert (hamming (16)(1:15), hamming (15, "periodic"));
+%!test
+%! N = 16;
+%! A = hamming (N, "periodic");
+%! assert (A(N/2 + 1), 1);
 
 %!error hamming ()
 %!error hamming (0.5)
 %!error hamming (-1)
 %!error hamming (ones (1,4))
+%!error hamming (1, "invalid");
 
--- a/scripts/signal/hanning.m
+++ b/scripts/signal/hanning.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
@@ -17,31 +17,51 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} hanning (@var{m})
+## @deftypefn  {Function File} {} hanning (@var{m})
+## @deftypefnx {Function File} {} hanning (@var{m}, "periodic")
+## @deftypefnx {Function File} {} hanning (@var{m}, "symmetric")
 ## Return the filter coefficients of a Hanning window of length @var{m}.
 ##
-## For a definition of this window type, see e.g., A. V. Oppenheim &
-## R. W. Schafer, @cite{Discrete-Time Signal Processing}.
+## If the optional argument @qcode{"periodic"} is given, the periodic form
+## of the window is returned.  This is equivalent to the window of length
+## @var{m}+1 with the last coefficient removed.  The optional argument
+## @qcode{"symmetric"} is equivalent to not specifying a second argument.
+##
+## For a definition of the Hanning window, see e.g.,
+## @nospell{A.V. Oppenheim & R. W. Schafer},
+## @cite{Discrete-Time Signal Processing}.
 ## @end deftypefn
 
 ## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
 ## Description: Coefficients of the Hanning window
 
-function c = hanning (m)
+function c = hanning (m, opt)
 
-  if (nargin != 1)
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
   if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
-    error ("hanning: M has to be an integer > 0");
+    error ("hanning: M must be a positive integer");
+  endif
+
+  N = m - 1;
+  if (nargin == 2)
+    switch (opt)
+      case "periodic"
+        N = m;
+      case "symmetric"
+        ## Default option, same as no option specified.
+      otherwise
+        error ('hanning: window type must be either "periodic" or "symmetric"');
+    endswitch
   endif
 
   if (m == 1)
     c = 1;
   else
     m = m - 1;
-    c = 0.5 - 0.5 * cos (2 * pi * (0 : m)' / m);
+    c = 0.5 - 0.5 * cos (2 * pi * (0 : m)' / N);
   endif
 
 endfunction
@@ -49,15 +69,23 @@
 
 %!assert (hanning (1), 1);
 %!assert (hanning (2), zeros (2,1));
-%!assert (hanning (16), fliplr (hanning (16)));
-%!assert (hanning (15), fliplr (hanning (15)));
+%!assert (hanning (15), flip (hanning (15)), 5*eps);
+%!assert (hanning (16), flip (hanning (16)), 5*eps);
 %!test
 %! N = 15;
 %! A = hanning (N);
 %! assert (A(ceil (N/2)), 1);
 
+%!assert (hanning (15), hanning (15, "symmetric"));
+%!assert (hanning (16)(1:15), hanning (15, "periodic"));
+%!test
+%! N = 16;
+%! A = hanning (N, "periodic");
+%! assert (A(N/2 + 1), 1);
+
 %!error hanning ()
 %!error hanning (0.5)
 %!error hanning (-1)
 %!error hanning (ones (1,4))
+%!error hanning (1, "invalid");
 
--- a/scripts/signal/hurst.m
+++ b/scripts/signal/hurst.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/ifftshift.m
+++ b/scripts/signal/ifftshift.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1997-2013 Vincent Cautaerts
+## Copyright (C) 1997-2015 Vincent Cautaerts
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/periodogram.m
+++ b/scripts/signal/periodogram.m
@@ -1,5 +1,6 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ## Copyright (C) 2010 Alois Schloegl
+## Copyright (C) 2014-2015 Drew Abbot
 ##
 ## This file is part of Octave.
 ##
@@ -18,43 +19,60 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[Pxx, @var{w}] =} periodogram (@var{x})
-## For a data matrix @var{x} from a sample of size @var{n}, return the
-## periodogram.  The angular frequency is returned in @var{w}.
+## @deftypefn  {Function File} {[@var{Pxx}, @var{w}] =} periodogram (@var{x})
+## @deftypefnx {Function File} {[@var{Pxx}, @var{w}] =} periodogram (@var{x}, @var{win})
+## @deftypefnx {Function File} {[@var{Pxx}, @var{w}] =} periodogram (@var{x}, @var{win}, @var{nfft})
+## @deftypefnx {Function File} {[@var{Pxx}, @var{f}] =} periodogram (@var{x}, @var{win}, @var{nfft}, @var{Fs})
+## @deftypefnx {Function File} {[@var{Pxx}, @var{f}] =} periodogram (@dots{}, "@var{range}")
+## @deftypefnx {Function File} {} periodogram (@dots{})
 ##
-## [Pxx,w] = periodogram (@var{x}).
+## Return the periodogram (Power Spectral Density) of @var{x}.
 ##
-## [Pxx,w] = periodogram (@var{x},win).
+## The possible inputs are:
 ##
-## [Pxx,w] = periodogram (@var{x},win,nfft).
-##
-## [Pxx,f] = periodogram (@var{x},win,nfft,Fs).
+## @table @var
+## @item x
 ##
-## [Pxx,f] = periodogram (@var{x},win,nfft,Fs,"range").
+## data vector.  If @var{x} is real-valued a one-sided spectrum is estimated.
+## If @var{x} is complex-valued, or @qcode{"@var{range}"} specifies
+## @qcode{"@nospell{twosided}"}, the full spectrum is estimated.
 ##
-## @itemize
-## @item x: data; if real-valued a one-sided spectrum is estimated,
-## if complex-valued or range indicates @qcode{"@nospell{twosided}"}, the full
-## spectrum is estimated.
+## @item win
+## window weight data.  If window is empty or unspecified a default rectangular
+## window is used.  Otherwise, the window is applied to the signal
+## (@code{@var{x} .* @var{win}}) before computing the periodogram.  The window
+## data must be a vector of the same length as @var{x}.
 ##
-## @item win: weight data with window, x.*win is used for further computation,
-## if window is empty, a rectangular window is used.
+## @item nfft
+## number of frequency bins.  The default is 256 or the next higher power of
+## 2 greater than the length of @var{x}
+## (@code{max (256, 2.^nextpow2 (length (x)))}).  If @var{nfft} is greater
+## than the length of the input then @var{x} will be zero-padded to the length
+## of @var{nfft}.
 ##
-## @item nfft: number of frequency bins, default max (256, 2.^ceil (log2 (length (x)))).
-##
-## @item Fs: sampling rate, default 1.
+## @item Fs
+## sampling rate.  The default is 1.
 ##
-## @item range: @qcode{"@nospell{onesided}"} computes spectrum from [0..nfft/2+1].
-## @qcode{"@nospell{twosided}"} computes spectrum from [0..nfft-1].  These
-## strings can appear at any position in the list input arguments after
-## window.
+## @item range
+## range of spectrum.  @qcode{"@nospell{onesided}"} computes spectrum from
+## [0..nfft/2+1].  @qcode{"@nospell{twosided}"} computes spectrum from
+## [0..nfft-1].
+## @end table
 ##
-## @item @nospell{Pxx}: one-, or two-sided power spectrum.
+## The optional second output @var{w} are the normalized angular frequencies.
+## For a one-sided calculation @var{w} is in the range [0, pi] if @var{nfft}
+## is even and [0, pi) if @var{nfft} is odd.  Similarly, for a two-sided
+## calculation @var{w} is in the range [0, 2*pi] or [0, 2*pi) depending on
+## @var{nfft}.
 ##
-## @item w: angular frequency [0..2*pi) (two-sided) or [0..pi] one-sided.
+## If a sampling frequency is specified, @var{Fs}, then the output frequencies
+## @var{f} will be in the range [0, @var{Fs}/2] or [0, @var{Fs}/2) for
+## one-sided calculations.  For two-sided calculations the range will be
+## [0, @var{Fs}).
 ##
-## @item f: frequency [0..Fs) (two-sided) or [0..Fs/2] one-sided.
-## @end itemize
+## When called with no outputs the periodogram is immediately plotted in the
+## current figure window.
+## @seealso{fft}
 ## @end deftypefn
 
 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at>
@@ -63,117 +81,113 @@
 function [pxx, f] = periodogram (x, varargin)
 
   ## check input arguments
-
   if (nargin < 1 || nargin > 5)
     print_usage ();
   endif
 
-  nfft = []; fs = []; range = []; window = [];
-  j = 1;
+  nfft = fs = range = window = [];
+  j = 2;
   for k = 1:length (varargin)
     if (ischar (varargin{k}))
       range = varargin{k};
     else
       switch (j)
-        case 1
+        case 2
           window = varargin{k};
-        case 2
+        case 3
           nfft   = varargin{k};
-        case 3
+        case 4
           fs     = varargin{k};
-        case 4
-          range  = varargin{k};
       endswitch
       j++;
     endif
   endfor
 
-  [r, c] = size (x);
-  if (r == 1)
-    r = c;
+  if (! isvector (x))
+    error ("periodogram: X must be a real or complex vector");
+  endif
+  x = x(:);  # Use column vectors from now on
+
+  n = rows (x);
+
+  if (! isempty (window))
+    if (! isvector (window) || length (window) != n)
+      error ("periodogram: WIN must be a vector of the same length as X");
+    endif
+    window = window(:);
+    x .*= window;
   endif
 
-  if (ischar (window))
-    range = window;
-    window = [];
-  endif;
-  if (ischar (nfft))
-    range = nfft;
-    nfft = [];
-  endif;
-  if (ischar (fs))
-    range = fs;
-    fs = [];
-  endif;
-
-  if (!  isempty (window))
-    if (all (size (x) == size (window)))
-      x .*= window;
-    elseif (rows (x) == rows (window) && columns (window) == 1)
-      x .*= window (:,ones (1,c));
-    endif;
+  if (isempty (nfft))
+    nfft = max (256, 2.^nextpow2 (n));
+  elseif (! isscalar (nfft))
+    error ("periodogram: NFFT must be a scalar");
   endif
 
-  if (numel (nfft)>1)
-    error ("nfft must be scalar");
-  endif
-  if (isempty (nfft))
-    nfft = max (256, 2.^ceil (log2 (r)));
+  use_w_freq = isempty (fs);
+  if (! use_w_freq && ! isscalar (fs))
+    error ("periodogram: FS must be a scalar");
   endif
 
-  if (strcmp (range, "onesided"))
+  if (strcmpi (range, "onesided"))
     range = 1;
-  elseif (strcmp (range, "twosided"))
+  elseif (strcmpi (range, "twosided"))
     range = 2;
+  elseif (strcmpi (range, "centered"))
+    error ('periodogram: "centered" range type is not implemented');
   else
     range = 2-isreal (x);
   endif
 
   ## compute periodogram
 
-  if (r>nfft)
+  if (n > nfft)
     Pxx = 0;
     rr = rem (length (x), nfft);
     if (rr)
-      x = [x(:); (zeros (nfft-rr, 1))];
+      x = [x(:); zeros(nfft-rr, 1)];
     endif
     x = sum (reshape (x, nfft, []), 2);
   endif
 
-  if (isempty (window))
-    n = r;
-  else
+  if (! isempty (window))
     n = sumsq (window);
-  end;
-  Pxx = (abs (fft (x, nfft))) .^ 2 / n ;
+  endif;
+  Pxx = (abs (fft (x, nfft))) .^ 2 / n;
 
-  if (nargin<4)
+  if (use_w_freq)
     Pxx /= 2*pi;
-  elseif (! isempty (fs))
+  else
     Pxx /= fs;
   endif
 
   ## generate output arguments
 
   if (range == 1)  # onesided
-    Pxx = Pxx(1:nfft/2+1) + [0; Pxx(end:-1:(nfft/2+2)); 0];
+    if (! rem (nfft,2))  # nfft is even
+      psd_len = nfft/2+1;
+      Pxx = Pxx(1:psd_len) + [0; Pxx(nfft:-1:psd_len+1); 0];
+    else                 # nfft is odd
+      psd_len = (nfft+1)/2;
+      Pxx = Pxx(1:psd_len) + [0; Pxx(nfft:-1:psd_len+1)];
+    endif
   endif
 
   if (nargout != 1)
     if (range == 1)
-      f = (0:nfft/2)'/nfft;
+      f = (0:nfft/2)' / nfft;
     elseif (range == 2)
-      f = (0:nfft-1)'/nfft;
+      f = (0:nfft-1)' / nfft;
     endif
-    if (nargin<4)
-      f *= 2*pi; # generate w=2*pi*f
-    elseif (! isempty (fs))
+    if (use_w_freq)
+      f *= 2*pi;  # generate w=2*pi*f
+    else
       f *= fs;
     endif
   endif
 
   if (nargout == 0)
-    if (nargin<4)
+    if (use_w_freq)
       plot (f/(2*pi), 10*log10 (Pxx));
       xlabel ("normalized frequency [x pi rad]");
       ylabel ("Power density [dB/rad/sample]");
@@ -190,3 +204,17 @@
 
 endfunction
 
+
+## FIXME: Need some functional tests
+
+
+## Test input validation
+%!error periodogram ()
+%!error periodogram (1,2,3,4,5,6)
+%!error <X must be a real or complex vector> periodogram (ones (2,2))
+%!error <WIN must be a vector.*same length> periodogram (1:5, ones (2,2))
+%!error <WIN must be a vector.*same length> periodogram (1:5, 1:6)
+%!error <NFFT must be a scalar> periodogram (1:5, 1:5, 1:5)
+%!error <FS must be a scalar> periodogram (1:5, [], [], 1:5)
+%!error <"centered" range type is not implemented> periodogram (1:5, "centered")
+
--- a/scripts/signal/private/rectangle_lw.m
+++ b/scripts/signal/private/rectangle_lw.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/private/rectangle_sw.m
+++ b/scripts/signal/private/rectangle_sw.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/private/triangle_lw.m
+++ b/scripts/signal/private/triangle_lw.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/private/triangle_sw.m
+++ b/scripts/signal/private/triangle_sw.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/sinc.m
+++ b/scripts/signal/sinc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/sinetone.m
+++ b/scripts/signal/sinetone.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -28,18 +28,9 @@
 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at>
 ## Description: Compute a sine tone
 
-function retval = sinetone (freq, rate, sec, ampl)
+function retval = sinetone (freq, rate = 8000, sec = 1, ampl = 64)
 
-  if (nargin == 1)
-    rate = 8000;
-    sec = 1;
-    ampl = 64;
-  elseif (nargin == 2)
-    sec = 1;
-    ampl = 64;
-  elseif (nargin == 3)
-    ampl = 64;
-  elseif ((nargin < 1) || (nargin > 4))
+  if (nargin < 1 || nargin > 4)
     print_usage ();
   endif
 
--- a/scripts/signal/sinewave.m
+++ b/scripts/signal/sinewave.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/spectral_adf.m
+++ b/scripts/signal/spectral_adf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -69,7 +69,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error spectral_adf ();
 %!error spectral_adf (1, 2, 3, 4);
 %!error spectral_adf (1, 2);
--- a/scripts/signal/spectral_xdf.m
+++ b/scripts/signal/spectral_xdf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -70,7 +70,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error spectral_xdf ();
 %!error spectral_xdf (1, 2, 3, 4);
 %!error spectral_xdf (1, 2);
--- a/scripts/signal/spencer.m
+++ b/scripts/signal/spencer.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/stft.m
+++ b/scripts/signal/stft.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/synthesis.m
+++ b/scripts/signal/synthesis.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Andreas Weingessel
+## Copyright (C) 1995-2015 Andreas Weingessel
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/signal/unwrap.m
+++ b/scripts/signal/unwrap.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Bill Lash
+## Copyright (C) 2000-2015 Bill Lash
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isnumeric (x))
+  if (! isnumeric (x))
     error ("unwrap: X must be a numeric matrix or vector");
   endif
 
@@ -78,7 +78,7 @@
   ## Find only the peaks, and multiply them by the appropriate amount
   ## of ranges so that there are kronecker deltas at each wrap point
   ## multiplied by the appropriate amount of range values.
-  p =  ceil (abs (d)./rng) .* rng .* (((d > tol) > 0) - ((d < -tol) > 0));
+  p = ceil (abs (d)./rng) .* rng .* (((d > tol) > 0) - ((d < -tol) > 0));
 
   ## Now need to "integrate" this so that the deltas become steps.
   r = cumsum (p, dim);
--- a/scripts/signal/yulewalker.m
+++ b/scripts/signal/yulewalker.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/sparse/bicg.m
+++ b/scripts/sparse/bicg.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2006 Sylvain Pelissier
-## Copyright (C) 2012-2013 Carlo de Falco
+## Copyright (C) 2012-2015 Carlo de Falco
 ##
 ## This file is part of Octave.
 ##
@@ -63,10 +63,11 @@
 ##
 ## @item @var{iter} is the number of iterations performed.
 ##
-## @item @var{resvec} is a vector containing the relative residual at each iteration.
+## @item @var{resvec} is a vector containing the relative residual at each
+## iteration.
 ## @end itemize
 ##
-## @seealso{bicgstab, cgs, gmres, pcg}
+## @seealso{bicgstab, cgs, gmres, pcg, qmr}
 ##
 ## @end deftypefn
 
@@ -81,7 +82,7 @@
       fun = str2func (A);
       Ax  = @(x) feval (fun, x, "notransp");
       Atx = @(x) feval (fun, x, "transp");
-    elseif (ismatrix (A))
+    elseif (isnumeric (A) && ismatrix (A))
       Ax  = @(x) A  * x;
       Atx = @(x) A' * x;
     elseif (isa (A, "function_handle"))
@@ -98,6 +99,8 @@
 
     if (nargin < 4 || isempty (maxit))
       maxit = min (rows (b), 20);
+    else
+      maxit = fix (maxit);
     endif
 
     if (nargin < 5 || isempty (M1))
@@ -107,7 +110,7 @@
       fun = str2func (M1);
       M1m1x  = @(x) feval (fun, x, "notransp");
       M1tm1x = @(x) feval (fun, x, "transp");
-    elseif (ismatrix (M1))
+    elseif (isnumeric (M1) && ismatrix (M1))
       M1m1x  = @(x) M1  \ x;
       M1tm1x = @(x) M1' \ x;
     elseif (isa (M1, "function_handle"))
@@ -125,7 +128,7 @@
       fun = str2func (M2);
       M2m1x  = @(x) feval (fun, x, "notransp");
       M2tm1x = @(x) feval (fun, x, "transp");
-    elseif (ismatrix (M2))
+    elseif (isnumeric (M2) && ismatrix (M2))
       M2m1x  = @(x) M2  \ x;
       M2tm1x = @(x) M2' \ x;
     elseif (isa (M2, "function_handle"))
--- a/scripts/sparse/bicgstab.m
+++ b/scripts/sparse/bicgstab.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Radek Salac
+## Copyright (C) 2008-2015 Radek Salac
 ## Copyright (C) 2012 Carlo de Falco
 ##
 ## This file is part of Octave.
@@ -63,10 +63,11 @@
 ##
 ## @item @var{iter} is the number of iterations performed.
 ##
-## @item @var{resvec} is a vector containing the relative residual at each iteration.
+## @item @var{resvec} is a vector containing the relative residual at each
+## iteration.
 ## @end itemize
 ##
-## @seealso{bicg, cgs, gmres, pcg}
+## @seealso{bicg, cgs, gmres, pcg, qmr}
 ##
 ## @end deftypefn
 
@@ -77,7 +78,7 @@
 
     if (ischar (A))
       A = str2func (A);
-    elseif (ismatrix (A))
+    elseif (isnumeric(A) && ismatrix (A))
       Ax  = @(x) A  * x;
     elseif (isa (A, "function_handle"))
       Ax  = @(x) feval (A, x);
@@ -98,7 +99,7 @@
       M1m1x = @(x) x;
     elseif (ischar (M1))
       M1m1x = str2func (M1);
-    elseif (ismatrix (M1))
+    elseif (isnumeric(M1) && ismatrix (M1))
       M1m1x = @(x) M1  \ x;
     elseif (isa (M1, "function_handle"))
       M1m1x = @(x) feval (M1, x);
@@ -111,7 +112,7 @@
       M2m1x = @(x) x;
     elseif (ischar (M2))
       M2m1x = str2func (M2);
-    elseif (ismatrix (M2))
+    elseif (isnumeric(M2) && ismatrix (M2))
       M2m1x = @(x) M2  \ x;
     elseif (isa (M2, "function_handle"))
       M2m1x = @(x) feval (M2, x);
--- a/scripts/sparse/cgs.m
+++ b/scripts/sparse/cgs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Radek Salac
+## Copyright (C) 2008-2015 Radek Salac
 ## Copyright (C) 2012 Carlo de Falco
 ##
 ## This file is part of Octave.
@@ -67,7 +67,7 @@
 ## each iteration.
 ## @end itemize
 ##
-## @seealso{pcg, bicgstab, bicg, gmres}
+## @seealso{pcg, bicgstab, bicg, gmres, qmr}
 ## @end deftypefn
 
 function [x, flag, relres, iter, resvec] = cgs (A, b, tol, maxit, M1, M2, x0)
@@ -76,7 +76,7 @@
 
     if (ischar (A))
       A = str2func (A);
-    elseif (ismatrix (A))
+    elseif (isnumeric (A) && ismatrix (A))
       Ax = @(x) A * x;
     elseif (isa (A, "function_handle"))
       Ax = @(x) feval (A, x);
@@ -97,7 +97,7 @@
       M1m1x = @(x) x;
     elseif (ischar (M1))
       M1m1x = str2func (M1);
-    elseif (ismatrix (M1))
+    elseif (isnumeric (M1) && ismatrix (M1))
       M1m1x = @(x) M1 \ x;
     elseif (isa (M1, "function_handle"))
       M1m1x = @(x) feval (M1, x);
@@ -109,7 +109,7 @@
       M2m1x = @(x) x;
     elseif (ischar (M2))
       M2m1x = str2func (M2);
-    elseif (ismatrix (M2))
+    elseif (isnumeric (M2) && ismatrix (M2))
       M2m1x = @(x) M2 \ x;
     elseif (isa (M2, "function_handle"))
       M2m1x = @(x) feval (M2, x);
@@ -159,7 +159,7 @@
         ## We reach tolerance tol within maxit iterations.
         flag = 0;
         break
-      elseif (resvec (end) == resvec (end - 1))
+      elseif (resvec(end) == resvec(end - 1))
         ## The method stagnates.
         flag = 3;
         break
--- a/scripts/sparse/colperm.m
+++ b/scripts/sparse/colperm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ##
 ## This file is part of Octave.
 ##
@@ -20,9 +20,9 @@
 ## @deftypefn {Function File} {@var{p} =} colperm (@var{s})
 ## Return the column permutations such that the columns of
 ## @code{@var{s} (:, @var{p})} are ordered in terms of increase number
-## of non-zero elements.  If @var{s} is symmetric, then @var{p} is chosen
+## of nonzero elements.  If @var{s} is symmetric, then @var{p} is chosen
 ## such that @code{@var{s} (@var{p}, @var{p})} orders the rows and
-## columns with increasing number of non zeros elements.
+## columns with increasing number of nonzeros elements.
 ## @end deftypefn
 
 function p = colperm (s)
--- a/scripts/sparse/eigs.m
+++ b/scripts/sparse/eigs.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 David Bateman
+## Copyright (C) 2005-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -183,9 +183,9 @@
 ## of the convergence.  If @var{flag} is 0 then all eigenvalues have converged.
 ## Any other value indicates a failure to converge.
 ##
-## This function is based on the @sc{arpack} package, written by R. Lehoucq,
-## K. Maschhoff, D. Sorensen, and C. Yang.  For more information see
-## @url{http://www.caam.rice.edu/software/ARPACK/}.
+## This function is based on the @sc{arpack} package, written by
+## @nospell{R. Lehoucq, K. Maschhoff, D. Sorensen, and C. Yang}.  For more
+## information see @url{http://www.caam.rice.edu/software/ARPACK/}.
 ##
 ## @seealso{eig, svds}
 ## @end deftypefn
@@ -490,7 +490,7 @@
 %!shared n, k, A, d0
 %! n = 20;
 %! k = 4;
-%! A =  sparse ([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]);
+%! A = sparse ([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]);
 %! d0 = eig (A);
 %! [~, idx] = sort (abs (d0));
 %! d0 = d0(idx);
@@ -859,7 +859,7 @@
 %!shared n, k, A, d0
 %! n = 20;
 %! k = 4;
-%! A =  full (sparse ([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]));
+%! A = full (sparse ([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]));
 %! d0 = eig (A);
 %! [~, idx] = sort (abs (d0));
 %! d0 = d0(idx);
--- a/scripts/sparse/etreeplot.m
+++ b/scripts/sparse/etreeplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Ivana Varekova
+## Copyright (C) 2005-2015 Ivana Varekova
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/sparse/gmres.m
+++ b/scripts/sparse/gmres.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Carlo de Falco
+## Copyright (C) 2009-2015 Carlo de Falco
 ##
 ## This file is part of Octave.
 ##
@@ -69,7 +69,7 @@
 ## iteration.
 ## @end itemize
 ##
-## @seealso{bicg, bicgstab, cgs, pcg}
+## @seealso{bicg, bicgstab, cgs, pcg, pcr, qmr}
 ## @end deftypefn
 
 function [x, flag, relres, it, resvec] = gmres (A, b, restart, rtol, maxit, M1, M2, x0)
@@ -80,7 +80,7 @@
 
   if (ischar (A))
     Ax = str2func (A);
-  elseif (ismatrix (A))
+  elseif (isnumeric (A) && ismatrix (A))
     Ax = @(x) A*x;
   elseif (isa (A, "function_handle"))
     Ax = A;
@@ -104,7 +104,7 @@
     M1m1x = @(x) x;
   elseif (ischar (M1))
     M1m1x = str2func (M1);
-  elseif (ismatrix (M1))
+  elseif (isnumeric (M1) && ismatrix (M1))
     M1m1x = @(x) M1 \ x;
   elseif (isa (M1, "function_handle"))
     M1m1x = M1;
@@ -116,7 +116,7 @@
     M2m1x = @(x) x;
   elseif (ischar (M2))
     M2m1x = str2func (M2);
-  elseif (ismatrix (M2))
+  elseif (isnumeric (M2) && ismatrix (M2))
     M2m1x = @(x) M2 \ x;
   elseif (isa (M2, "function_handle"))
     M2m1x = M2;
@@ -165,7 +165,7 @@
     [V(:,restart_it+1), H(1:restart_it+1, restart_it)] = ...
         mgorth (tmp, V(:,1:restart_it));
 
-    Y = (H(1:restart_it+1, 1:restart_it) \ B (1:restart_it+1));
+    Y = (H(1:restart_it+1, 1:restart_it) \ B(1:restart_it+1));
 
     little_res = B(1:restart_it+1) - ...
         H(1:restart_it+1, 1:restart_it) * Y(1:restart_it);
--- a/scripts/sparse/gplot.m
+++ b/scripts/sparse/gplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Ivana Varekova
+## Copyright (C) 2005-2015 Ivana Varekova
 ##
 ## This file is part of Octave.
 ##
@@ -79,6 +79,6 @@
 %! set (get (gca, ("children")), "markersize", 12);
 %! title ("gplot() of Binary Tree Adjacency matrix");
 
-%% Mark graphical function as tested by demo block
+## Mark graphical function as tested by demo block
 %!assert (1)
 
new file mode 100644
--- /dev/null
+++ b/scripts/sparse/ichol.m
@@ -0,0 +1,469 @@
+## Copyright (C) 2014-2015 Eduardo Ramos Fernández <eduradical951@gmail.com>
+## Copyright (C) 2013-2015 Kai T. Ohlhus <k.ohlhus@gmail.com>
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{L} =} ichol (@var{A})
+## @deftypefnx {Function File} {@var{L} =} ichol (@var{A}, @var{opts})
+##
+## Compute the incomplete Cholesky factorization of the sparse square matrix
+## @var{A}.
+##
+## By default, @code{ichol} uses only the lower triangle of @var{A} and
+## produces a lower triangular factor @var{L} such that @tcode{L*L'}
+## approximates @var{A}.
+##
+## The factor given by this routine may be useful as a preconditioner for a
+## system of linear equations being solved by iterative methods such as
+## PCG (Preconditioned Conjugate Gradient).
+##
+## The factorization may be modified by passing options in a structure
+## @var{opts}.  The option name is a field of the structure and the setting
+## is the value of field.  Names and specifiers are case sensitive.
+##
+## @table @asis
+## @item type
+## Type of factorization.
+##
+## @table @asis
+## @item @qcode{"nofill"} (default)
+## Incomplete Cholesky factorization with no fill-in (@nospell{IC(0)}).
+##
+## @item @qcode{"ict"}
+## Incomplete Cholesky factorization with threshold dropping (@nospell{ICT}).
+## @end table
+##
+## @item diagcomp
+## A non-negative scalar @var{alpha} for incomplete Cholesky factorization of
+## @code{@var{A} + @var{alpha} * diag (diag (@var{A}))} instead of @var{A}.
+## This can be useful when @var{A} is not positive definite.  The default value
+## is 0.
+##
+## @item droptol
+## A non-negative scalar specifying the drop tolerance for factorization if
+## performing @nospell{ICT}@.  The default value is 0 which produces the
+## complete Cholesky factorization.
+##
+## Non-diagonal entries of @var{L} are set to 0 unless
+##
+## @code{abs (@var{L}(i,j)) >= droptol * norm (@var{A}(j:end, j), 1)}.
+##
+## @item michol
+## Modified incomplete Cholesky factorization:
+##
+## @table @asis
+## @item @qcode{"off"} (default)
+## Row and column sums are not necessarily preserved.
+##
+## @item @qcode{"on"}
+## The diagonal of @var{L} is modified so that row (and column) sums are
+## preserved even when elements have been dropped during the factorization.
+## The relationship preserved is: @code{@var{A} * e = @var{L} * @var{L}' * e},
+## where e is a vector of ones.
+## @end table
+##
+## @item shape
+##
+## @table @asis
+## @item @qcode{"lower"} (default)
+## Use only the lower triangle of @var{A} and return a lower triangular
+## factor @var{L} such that @tcode{L*L'} approximates @var{A}.
+##
+## @item @qcode{"upper"}
+## Use only the upper triangle of @var{A} and return an upper triangular
+## factor @var{U} such that @code{U'*U} approximates @var{A}.
+## @end table
+## @end table
+##
+## EXAMPLES
+##
+## The following problem demonstrates how to factorize a sample symmetric
+## positive definite matrix with the full Cholesky decomposition and with the
+## incomplete one.
+##
+## @example
+## @group
+## A = [ 0.37, -0.05,  -0.05,  -0.07;
+##      -0.05,  0.116,  0.0,   -0.05;
+##      -0.05,  0.0,    0.116, -0.05;
+##      -0.07, -0.05,  -0.05,   0.202];
+## A = sparse (A);
+## nnz (tril (A))
+## ans =  9
+## L = chol (A, "lower");
+## nnz (L)
+## ans =  10
+## norm (A - L * L', "fro") / norm (A, "fro")
+## ans =  1.1993e-16
+## opts.type = "nofill";
+## L = ichol (A, opts);
+## nnz (L)
+## ans =  9
+## norm (A - L * L', "fro") / norm (A, "fro")
+## ans =  0.019736
+## @end group
+## @end example
+##
+## Another example for decomposition is a finite difference matrix used to
+## solve a boundary value problem on the unit square.
+##
+## @example
+## @group
+## nx = 400; ny = 200;
+## hx = 1 / (nx + 1); hy = 1 / (ny + 1);
+## Dxx = spdiags ([ones(nx, 1), -2*ones(nx, 1), ones(nx, 1)],
+##                [-1 0 1 ], nx, nx) / (hx ^ 2);
+## Dyy = spdiags ([ones(ny, 1), -2*ones(ny, 1), ones(ny, 1)],
+##                [-1 0 1 ], ny, ny) / (hy ^ 2);
+## A = -kron (Dxx, speye (ny)) - kron (speye (nx), Dyy);
+## nnz (tril (A))
+## ans =  239400
+## opts.type = "nofill";
+## L = ichol (A, opts);
+## nnz (tril (A))
+## ans =  239400
+## norm (A - L * L', "fro") / norm (A, "fro")
+## ans =  0.062327
+## @end group
+## @end example
+##
+## References for implemented algorithms:
+##
+## [1] @nospell{Y. Saad}. "Preconditioning Techniques." @cite{Iterative
+## Methods for Sparse Linear Systems}, @nospell{PWS} Publishing Company, 1996.
+##
+## [2] @nospell{M. Jones, P. Plassmann}: @cite{An Improved Incomplete
+## Cholesky Factorization}, 1992.
+## @seealso{chol, ilu, pcg}
+## @end deftypefn
+
+function L = ichol (A, opts = struct ())
+
+  if (nargin < 1 || nargin > 2 || nargout > 1)
+    print_usage ();
+  endif
+
+  if (! (issparse (A) && issquare (A)))
+    error ("ichol: A must be a sparse square matrix");
+  endif
+
+  if (! isstruct (opts))
+    error ("ichol: OPTS must be a structure.");
+  endif
+
+  ## If A is empty then return empty L for Matlab compatibility
+  if (isempty (A))
+    L = A;
+    return;
+  endif
+
+  ## Parse input options
+  if (! isfield (opts, "type"))
+    opts.type = "nofill";  # set default
+  else
+    type = tolower (getfield (opts, "type"));
+    if (! strcmp (type, "nofill") && ! strcmp (type, "ict"))
+      error ('ichol: TYPE must be "nofill" or "ict"');
+    endif
+    opts.type = type;
+  endif
+
+  if (! isfield (opts, "droptol"))
+    opts.droptol = 0;      # set default
+  else
+    if (! (isreal (opts.droptol) && isscalar (opts.droptol)
+           && opts.droptol >= 0))
+      error ("ichol: DROPTOL must be a non-negative real scalar");
+    endif
+  endif
+
+  michol = "";
+  if (! isfield (opts, "michol"))
+    opts.michol = "off";   # set default
+  else
+    michol = tolower (getfield (opts, "michol"));
+    if (! strcmp (michol, "off") && ! strcmp (michol, "on"))
+      error ('ichol: MICHOL must be "on" or "off"');
+    endif
+    opts.michol = michol;
+  endif
+
+  if (! isfield (opts, "diagcomp"))
+    opts.diagcomp = 0;     # set default
+  else
+    if (! (isreal (opts.diagcomp) && isscalar (opts.diagcomp)
+           && opts.diagcomp >= 0))
+      error ("ichol: DIAGCOMP must be a non-negative real scalar");
+    endif
+  endif
+
+  if (! isfield (opts, "shape"))
+    opts.shape = "lower";  # set default
+  else
+    shape = tolower (getfield (opts, "shape"));
+    if (! strcmp (shape, "lower") && ! strcmp (shape, "upper"))
+      error ('ichol: SHAPE must be "lower" or "upper"');
+    endif
+    opts.shape = shape;
+  endif
+
+  ## Prepare input for specialized ICHOL
+  A_in = [];
+  if (opts.diagcomp > 0)
+    A += opts.diagcomp * diag (diag (A));
+  endif
+  if (strcmp (opts.shape, "upper"))
+    A_in = triu (A);
+    A_in = A_in';
+  else
+    A_in = tril (A);
+  endif
+
+  ## Delegate to specialized ICHOL
+  switch (opts.type)
+    case "nofill"
+      L  = __ichol0__ (A_in, opts.michol);
+    case "ict"
+      L = __icholt__ (A_in, opts.droptol, opts.michol);
+  endswitch
+
+  if (strcmp (opts.shape, "upper"))
+    L = L';
+  endif
+
+endfunction
+
+
+%!shared A1, A2, A3, A4, A5, A6, A7
+%! A1 = [ 0.37, -0.05,  -0.05,  -0.07;
+%!       -0.05,  0.116,  0.0,   -0.05;
+%!       -0.05,  0.0,    0.116, -0.05;
+%!       -0.07, -0.05,  -0.05,   0.202];
+%! A1 = sparse (A1);
+%! A2 = gallery ("poisson", 30);
+%! A3 = gallery ("tridiag", 50);
+%! nx = 400; ny = 200;
+%! hx = 1 / (nx + 1); hy = 1 / (ny + 1);
+%! Dxx = spdiags ([ones(nx, 1), -2*ones(nx, 1), ones(nx, 1)],
+%!                [-1 0 1 ], nx, nx) / (hx ^ 2);
+%! Dyy = spdiags ([ones(ny, 1), -2*ones(ny, 1), ones(ny, 1)],
+%!                [-1 0 1 ], ny, ny) / (hy ^ 2);
+%! A4 = -kron (Dxx, speye (ny)) - kron (speye (nx), Dyy);
+%! A5 = [ 0.37, -0.05,         -0.05,  -0.07;
+%!       -0.05,  0.116,         0.0,   -0.05 + 0.05i;
+%!       -0.05,  0.0,           0.116, -0.05;
+%!       -0.07, -0.05 - 0.05i, -0.05,   0.202];
+%! A5 = sparse (A5);
+%! A6 = [ 0.37,     -0.05 - i, -0.05,  -0.07;
+%!       -0.05 + i,  0.116,     0.0,   -0.05;
+%!       -0.05,      0.0,       0.116, -0.05;
+%!       -0.07,     -0.05,     -0.05,   0.202];
+%! A6 = sparse (A6);
+%! A7 = A5;
+%! A7(1) = 2i;
+
+## ICHOL0 tests
+
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! assert (nnz (tril (A1)), nnz (ichol (A1, opts)));
+%! assert (nnz (tril (A2)), nnz (ichol (A2, opts)));
+%! assert (nnz (tril (A3)), nnz (ichol (A3, opts)));
+%! assert (nnz (tril (A4)), nnz (ichol (A4, opts)));
+%! assert (nnz (tril (A5)), nnz (ichol (A5, opts)));
+%!
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.0197, 1e-4);
+%! opts.shape = "upper";
+%! U = ichol (A1, opts);
+%! assert (norm (A1 - U' * U, "fro") / norm (A1, "fro"), 0.0197, 1e-4);
+%! opts.shape = "lower";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.0197, 1e-4);
+%!
+%!test
+%! opts.michol = "on";
+%! opts.shape = "lower";
+%! opts.type = "nofill";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.0279, 1e-4);
+%! opts.shape = "upper";
+%! U = ichol (A1, opts);
+%! assert (norm (A1 - U' * U, "fro") / norm (A1, "fro"), 0.0279, 1e-4);
+%! opts.shape = "lower";
+%! opts.diagcomp = 3e-3;
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.0272, 1e-4);
+%!
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! L = ichol (A2, opts);
+%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.0893, 1e-4)
+%! opts.michol = "on";
+%! L = ichol (A2, opts);
+%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4)
+%!
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! L = ichol (A3, opts);
+%! assert (norm (A3 - L*L', "fro") / norm (A3, "fro"), eps, eps);
+%! opts.michol = "on";
+%! L = ichol (A3, opts);
+%! assert (norm (A3 - L*L', "fro") / norm (A3, "fro"), eps, eps);
+%!
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! L = ichol (A4, opts);
+%! assert (norm (A4 - L*L', "fro") / norm (A4, "fro"), 0.0623, 1e-4);
+%! opts.michol = "on";
+%! L = ichol (A4, opts);
+%! assert (norm (A4 - L*L', "fro") / norm (A4, "fro"), 0.1664, 1e-4);
+%!
+%!test
+%! opts.type = "nofill";
+%! opts.michol = "off";
+%! L = ichol (A5, opts);
+%! assert (norm (A5 - L*L', "fro") / norm (A5, "fro"), 0.0195, 1e-4);
+%! opts.michol = "on";
+%! L = ichol (A5, opts);
+%! assert (norm (A5 - L*L', "fro") / norm (A5, "fro"), 0.0276, 1e-4);
+
+## Negative pivot
+%!error <negative pivot> ichol (A6)
+%!error ichol (A6)
+## Complex entry in the diagonal
+%!error <non-real pivot> ichol (A7)
+
+## ICHOLT tests
+
+#%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "off";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.2065, 1e-4);
+%! opts.shape = "upper";
+%! U = ichol (A1, opts);
+%! assert (norm (A1 - U' * U, "fro") / norm (A1, "fro"), 0.2065, 1e-4);
+%! opts.shape = "lower";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.2065, 1e-4);
+%!
+#%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "on";
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.3266, 1e-4);
+%! opts.shape = "upper";
+%! U = ichol (A1, opts);
+%! assert (norm (A1 - U' * U, "fro") / norm (A1, "fro"), 0.3266, 1e-4);
+%! opts.shape = "lower";
+%! opts.diagcomp = 3e-3;
+%! L = ichol (A1, opts);
+%! assert (norm (A1 - L * L', "fro") / norm (A1, "fro"), 0.3266, 1e-4);
+%!
+%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "off";
+%! L = ichol (A2, opts);
+%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"),  0.0893, 1e-4)
+%! opts.michol = "on";
+%! L = ichol (A2, opts);
+%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4)
+%!
+%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "off";
+%! L = ichol (A3, opts);
+%! assert (norm (A3 - L*L', "fro") / norm (A3, "fro"), eps, eps);
+%! opts.michol = "on";
+%! L = ichol (A3, opts);
+%! assert (norm (A3 - L*L', "fro") / norm (A3, "fro"), eps, eps);
+%!
+%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "off";
+%! L = ichol (A4, opts);
+%! assert (norm (A4 - L*L', "fro") / norm (A4, "fro"), 0.1224, 1e-4);
+%! opts.michol = "on";
+%! L = ichol (A4, opts);
+%! assert (norm (A4 - L*L', "fro") / norm (A4, "fro"), 0.2118, 1e-4);
+%!
+%!test
+%! opts.type = "ict";
+%! opts.droptol = 1e-1;
+%! opts.michol = "off";
+%! L = ichol (A5, opts);
+%! assert (norm (A5 - L*L', "fro") / norm (A5, "fro"), 0.2044, 1e-4);
+%! opts.michol = "on";
+%! L = ichol (A5, opts);
+%! assert (norm (A5 - L*L', "fro") / norm (A5, "fro"), 0.3231, 1e-4);
+
+## Test input validation
+%!error <A must be a sparse square matrix> ichol ([])
+%!error <A must be a sparse square matrix> ichol (0)
+%!error <pivot equal to 0> ichol (sparse (0))
+%!error <pivot equal to 0> ichol (sparse (-0))
+%!error <negative pivot> ichol (sparse (-1))
+%!test
+%! opts.type = "foo";
+%! fail ("ichol (A1, opts)", 'TYPE must be "nofill"');
+%! opts.type = 1;
+%! fail ("ichol (A1, opts)", 'TYPE must be "nofill"');
+%! opts.type = [];
+%! fail ("ichol (A1, opts)", 'TYPE must be "nofill"');
+%!test
+%! opts.droptol = -1;
+%! fail ("ichol (A1, opts)", "DROPTOL must be a non-negative real scalar");
+%! opts.droptol = 0.5i;
+%! fail ("ichol (A1, opts)", "DROPTOL must be a non-negative real scalar");
+%! opts.droptol = [];
+%! fail ("ichol (A1, opts)", "DROPTOL must be a non-negative real scalar");
+%!test
+%! opts.michol = "foo";
+%! fail ("ichol (A1, opts)", 'MICHOL must be "on"');
+%! opts.michol = 1;
+%! fail ("ichol (A1, opts)", 'MICHOL must be "on"');
+%! opts.michol = [];
+%! fail ("ichol (A1, opts)", 'MICHOL must be "on"');
+%!test
+%! opts.diagcomp = -1;
+%! fail ("ichol (A1, opts)", "DIAGCOMP must be a non-negative real scalar");
+%! opts.diagcomp = 0.5i;
+%! fail ("ichol (A1, opts)", "DIAGCOMP must be a non-negative real scalar");
+%! opts.diagcomp = [];
+%! fail ("ichol (A1, opts)", "DIAGCOMP must be a non-negative real scalar");
+%!test
+%! opts.shape = "foo";
+%! fail ("ichol (A1, opts)", 'SHAPE must be "lower"');
+%! opts.shape = 1;
+%! fail ("ichol (A1, opts)", 'SHAPE must be "lower"');
+%! opts.shape = [];
+%! fail ("ichol (A1, opts)", 'SHAPE must be "lower"');
+
new file mode 100644
--- /dev/null
+++ b/scripts/sparse/ilu.m
@@ -0,0 +1,536 @@
+## Copyright (C) 2014-2015 Eduardo Ramos Fernández <eduradical951@gmail.com>
+## Copyright (C) 2013-2015 Kai T. Ohlhus <k.ohlhus@gmail.com>
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} ilu (@var{A})
+## @deftypefnx {Function File} {} ilu (@var{A}, @var{opts})
+## @deftypefnx {Function File} {[@var{L}, @var{U}] =} ilu (@dots{})
+## @deftypefnx {Function File} {[@var{L}, @var{U}, @var{P}] =} ilu (@dots{})
+##
+## Compute the incomplete LU factorization of the sparse square matrix @var{A}.
+##
+## @code{ilu} returns a unit lower triangular matrix @var{L}, an upper
+## triangular matrix @var{U}, and optionally a permutation matrix @var{P}, such
+## that @code{@var{L}*@var{U}} approximates @code{@var{P}*@var{A}}.
+##
+## The factors given by this routine may be useful as preconditioners for a
+## system of linear equations being solved by iterative methods such as BICG
+## (BiConjugate Gradients) or GMRES (Generalized Minimum Residual Method).
+##
+## The factorization may be modified by passing options in a structure
+## @var{opts}.  The option name is a field of the structure and the setting
+## is the value of field.  Names and specifiers are case sensitive.
+##
+## @table @code
+## @item type
+## Type of factorization.
+##
+## @table @asis
+## @item @qcode{"nofill"}
+## ILU factorization with no fill-in (ILU(0)).
+##
+## Additional supported options: @code{milu}.
+##
+## @item @qcode{"crout"}
+## Crout version of ILU factorization (@nospell{ILUC}).
+##
+## Additional supported options: @code{milu}, @code{droptol}.
+##
+## @item @qcode{"ilutp"} (default)
+## ILU factorization with threshold and pivoting.
+##
+## Additional supported options: @code{milu}, @code{droptol}, @code{udiag},
+## @code{thresh}.
+## @end table
+##
+## @item droptol
+## A non-negative scalar specifying the drop tolerance for factorization.  The
+## default value is 0 which produces the complete LU factorization.
+##
+## Non-diagonal entries of @var{U} are set to 0 unless
+##
+## @code{abs (@var{U}(i,j)) >= droptol * norm (@var{A}(:,j))}.
+##
+## Non-diagonal entries of @var{L} are set to 0 unless
+##
+## @code{abs (@var{L}(i,j)) >= droptol * norm (@var{A}(:,j))/@var{U}(j,j)}.
+##
+## @item milu
+## Modified incomplete LU factorization:
+##
+## @table @asis
+## @item @qcode{"row"}
+## Row-sum modified incomplete LU factorization.
+## The factorization preserves row sums:
+## @code{@var{A} * e = @var{L} * @var{U} * e}, where e is a vector of ones.
+##
+## @item @qcode{"col"}
+## Column-sum modified incomplete LU factorization.
+## The factorization preserves column sums:
+## @code{e' * @var{A} = e' * @var{L} * @var{U}}.
+##
+## @item @qcode{"off"} (default)
+## Row and column sums are not necessarily preserved.
+## @end table
+##
+## @item udiag
+## If true, any zeros on the diagonal of the upper triangular factor are
+## replaced by the local drop tolerance
+## @code{droptol * norm (@var{A}(:,j))/@var{U}(j,j)}.  The default is false.
+##
+## @item thresh
+## Pivot threshold for factorization.  It can range between 0 (diagonal
+## pivoting) and 1 (default), where the maximum magnitude entry in the column
+## is chosen to be the pivot.
+## @end table
+##
+## If @code{ilu} is called with just one output, the returned matrix is
+## @code{@var{L} + @var{U} - speye (size (@var{A}))}, where @var{L} is unit
+## lower triangular and @var{U} is upper triangular.
+##
+## With two outputs, @code{ilu} returns a unit lower triangular matrix @var{L}
+## and an upper triangular matrix @var{U}.  For @var{opts}.type ==
+## @qcode{"ilutp"}, one of the factors is permuted based on the value of
+## @var{opts}.milu.  When @var{opts}.milu == @qcode{"row"}, @var{U} is a
+## column permuted upper triangular factor.  Otherwise, @var{L} is a
+## row-permuted unit lower triangular factor.
+##
+## If there are three named outputs and @var{opts}.milu != @qcode{"row"},
+## @var{P} is returned such that @var{L} and @var{U} are incomplete factors
+## of @code{@var{P}*@var{A}}.  When @var{opts}.milu == @qcode{"row"}, @var{P}
+## is returned such that @var{L} and @var{U} are incomplete factors of
+## @code{@var{A}*@var{P}}.
+##
+## EXAMPLES
+##
+## @example
+## @group
+## A = gallery ("neumann", 1600) + speye (1600);
+## opts.type = "nofill";
+## nnz (A)
+## ans = 7840
+##
+## nnz (lu (A))
+## ans = 126478
+##
+## nnz (ilu (A, opts))
+## ans = 7840
+## @end group
+## @end example
+##
+## This shows that @var{A} has 7,840 nonzeros, the complete LU factorization has
+## 126,478 nonzeros, and the incomplete LU factorization, with 0 level of
+## fill-in, has 7,840 nonzeros, the same amount as @var{A}.  Taken from:
+## http://www.mathworks.com/help/matlab/ref/ilu.html
+##
+## @example
+## @group
+## A = gallery ("wathen", 10, 10);
+## b = sum (A, 2);
+## tol = 1e-8;
+## maxit = 50;
+## opts.type = "crout";
+## opts.droptol = 1e-4;
+## [L, U] = ilu (A, opts);
+## x = bicg (A, b, tol, maxit, L, U);
+## norm (A * x - b, inf)
+## @end group
+## @end example
+##
+## This example uses ILU as preconditioner for a random FEM-Matrix, which has a
+## large condition number.  Without @var{L} and @var{U} BICG would not converge.
+##
+## @seealso{lu, ichol, bicg, gmres}
+## @end deftypefn
+
+function [L, U, P] = ilu (A, opts = struct ())
+
+  if (nargin < 1 || nargin > 2 || (nargout > 3))
+    print_usage ();
+  endif
+
+  if (! (issparse (A) && issquare (A)))
+    error ("ichol: A must be a sparse square matrix");
+  endif
+
+  if (! isstruct (opts))
+    error ("ichol: OPTS must be a structure.");
+  endif
+
+  ## If A is empty then return empty L, U and P for Matlab compatibility
+  if (isempty (A))
+    L = U = P = A;
+    return;
+  endif
+
+  ## Parse input options
+  if (! isfield (opts, "type"))
+    opts.type = "nofill";  # set default
+  else
+    type = tolower (getfield (opts, "type"));
+    if (! any (strcmp (type, {"nofill", "crout", "ilutp"})))
+      error ("ilu: invalid TYPE specified");
+    endif
+    opts.type = type;
+  endif
+
+  if (! isfield (opts, "droptol"))
+    opts.droptol = 0;      # set default
+  else
+    if (! (isreal (opts.droptol) && isscalar (opts.droptol)
+           && opts.droptol >= 0))
+      error ("ilu: DROPTOL must be a non-negative real scalar");
+    endif
+  endif
+
+  if (! isfield (opts, "milu"))
+    opts.milu = "off";     # set default
+  else
+    milu = tolower (getfield (opts, "milu"));
+    if (! any (strcmp (milu, {"off", "col", "row"})))
+      error ('ilu: MILU must be one of "off", "col", or "row"');
+    endif
+    opts.milu = milu;
+  endif
+
+  if (! isfield (opts, "udiag"))
+    opts.udiag = 0;        # set default
+  else
+    if (! isscalar (opts.udiag) || (opts.udiag != 0 && opts.udiag != 1))
+      error ("ilu: UDIAG must be 0 or 1");
+    endif
+  endif
+
+  if (! isfield (opts, "thresh"))
+    opts.thresh = 1;       # set default
+  else
+    if (! (isreal (opts.thresh) && isscalar (opts.thresh))
+        || opts.thresh < 0 || opts.thresh > 1)
+      error ("ilu: THRESH must be a scalar in the range [0, 1]");
+    endif
+  endif
+
+  n = length (A);
+
+  ## Delegate to specialized ILU
+  switch (opts.type)
+    case "nofill"
+        [L, U] = __ilu0__ (A, opts.milu);
+        if (nargout == 3)
+          P = speye (length (A));
+        endif
+    case "crout"
+        [L, U] = __iluc__ (A, opts.droptol, opts.milu);
+        if (nargout == 3)
+          P = speye (length (A));
+        endif
+    case "ilutp"
+        if (nargout == 2)
+          [L, U]  = __ilutp__ (A, opts.droptol, opts.thresh,
+                                  opts.milu, opts.udiag);
+        elseif (nargout == 3)
+          [L, U, P]  = __ilutp__ (A, opts.droptol, opts.thresh,
+                                     opts.milu, opts.udiag);
+        endif
+  endswitch
+
+  if (nargout == 1)
+    L = L + U - speye (n);
+  endif
+
+endfunction
+
+
+%!shared n, dtol, A
+%! n = 1600;
+%! dtol = 0.1;
+%! A = gallery ("neumann", n) + speye (n);
+%!test
+%! opts.type = "nofill";
+%! assert (nnz (ilu (A, opts)), 7840);
+## This test has been verified in both Matlab and Octave.
+%!test
+%! opts.type = "crout";
+%! opts.milu = "row";
+%! opts.droptol = dtol;
+%! [L, U] = ilu (A, opts);
+%! e = ones (size (A, 2),1);
+%! assert (norm (A*e - L*U*e), 1e-14, 1e-14);
+%!test
+%! opts.type = "crout";
+%! opts.droptol = dtol;
+%! [L, U] = ilu (A, opts);
+%! assert (norm (A - L * U, "fro") / norm (A, "fro"), 0.05, 1e-2);
+
+## Check if the elements in U satisfy the non-dropping condition.
+%!test
+%! opts.type = "crout";
+%! opts.droptol = dtol;
+%! [L, U] = ilu (A, opts);
+%! for j = 1:n
+%!   cmp_value = dtol * norm (A(:, j));
+%!   non_zeros = nonzeros (U(:, j));
+%!   assert (abs (non_zeros) >= cmp_value);
+%! endfor
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = dtol;
+%! [L, U] = ilu (A, opts);
+%! for j = 1:n
+%!   cmp_value = dtol * norm (A(:, j));
+%!   non_zeros = nonzeros (U(:, j));
+%!   assert (abs (non_zeros) >= cmp_value);
+%! endfor
+
+## Check that the complete LU factorisation with crout and ilutp algorithms
+## produce the same result.
+%!test
+%! opts.type = "crout";
+%! opts.droptol = 0;
+%! [L1, U1] = ilu (A, opts);
+%! opts.type = "ilutp";
+%! opts.thresh = 0;
+%! [L2, U2] = ilu (A, opts);
+%! assert (norm (L1 - L2, "fro") / norm (L1, "fro"), 0, eps);
+%! assert (norm (U1 - U2, "fro") / norm (U1, "fro"), 0, eps);
+
+## Tests for real matrices of different sizes for ilu0, iluc and ilutp.
+## The difference A - L*U should be not greater than eps because with droptol
+## equaling 0, the LU complete factorization is performed.
+%!shared n_tiny, n_small, n_medium, n_large, A_tiny, A_small, A_medium, A_large
+%! n_tiny = 5;
+%! n_small = 40;
+%! n_medium = 600;
+%! n_large = 10000;
+%! A_tiny = spconvert ([1 4 2 3 3 4 2 5; 1 1 2 3 4 4 5 5; 1 2 3 4 5 6 7 8]');
+%! A_small = sprand (n_small, n_small, 1/n_small) + speye (n_small);
+%! A_medium = sprand (n_medium, n_medium, 1/n_medium) + speye (n_medium);
+%! A_large = sprand (n_large, n_large, 1/n_large/10) + speye (n_large);
+%!
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_tiny);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), 0, n_tiny * eps);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_small);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), 0, 1);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_medium);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), 0, 1);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_large);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), 0, 1);
+%!
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_tiny, opts);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_small, opts);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_medium, opts);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_large, opts);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), eps, eps);
+%!
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_tiny, opts);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_small, opts);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_medium, opts);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_large, opts);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), eps, eps);
+
+## Tests for complex matrices of different sizes for ilu0, iluc and ilutp.
+%!shared n_tiny, n_small, n_medium, n_large, A_tiny, A_small, A_medium, A_large
+%! n_tiny = 5;
+%! n_small = 40;
+%! n_medium = 600;
+%! n_large = 10000;
+%! A_tiny = spconvert ([1 4 2 3 3 4 2 5; 1 1 2 3 4 4 5 5; 1 2 3 4 5 6 7 8]');
+%! A_tiny(1,1) += 1i;
+%! A_small = sprand (n_small, n_small, 1/n_small) + ...
+%!   i * sprand (n_small, n_small, 1/n_small) + speye (n_small);
+%! A_medium = sprand (n_medium, n_medium, 1/n_medium) + ...
+%!   i * sprand (n_medium, n_medium, 1/n_medium) + speye (n_medium);
+%! A_large = sprand (n_large, n_large, 1/n_large/10) + ...
+%!   i * sprand (n_large, n_large, 1/n_large/10) + speye (n_large);
+%!
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_tiny);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), 0, n_tiny * eps);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_small);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), 0, 1);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_medium);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), 0, 1);
+%!test
+%! opts.type = "nofill";
+%! [L, U] = ilu (A_large);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), 0, 1);
+%!
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_tiny, opts);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_small, opts);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_medium, opts);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), eps, eps);
+%!test
+%! opts.type = "crout";
+%! [L, U] = ilu (A_large, opts);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), eps, eps);
+%!
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_tiny, opts);
+%! assert (norm (A_tiny - L*U, "fro") / norm (A_tiny, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_small, opts);
+%! assert (norm (A_small - L*U, "fro") / norm (A_small, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_medium, opts);
+%! assert (norm (A_medium - L*U, "fro") / norm (A_medium, "fro"), eps, eps);
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! [L, U] = ilu (A_large, opts);
+%! assert (norm (A_large - L*U, "fro") / norm (A_large, "fro"), eps, eps);
+
+## Specific tests for ilutp
+
+%!shared a1, a2
+%! a1 = sparse ([0 0 4 3 1; 5 1 2.3 2 4.5; 0 0 0 2 1;0 0 8 0 2.2; 0 0 9 9 1 ]);
+%! a2 = sparse ([3 1 0 0 4; 3 1 0 0 -2;0 0 8 0 0; 0 4 0 4 -4.5; 0 -1 0 0 1]);
+%!test
+%! opts.udiag = 1;
+%! opts.type = "ilutp";
+%! opts.droptol = 0.2;
+%! [L, U, P] = ilu (a1, opts);
+%! assert (norm (U, "fro"), 17.4577, 1e-4);
+%! assert (norm (L, "fro"), 2.4192, 1e-4);
+%! opts.udiag = 0;
+%! #fail ("ilu (a1, opts)");
+%!
+%!test
+%! opts.type = "ilutp";
+%! opts.droptol = 0;
+%! opts.thresh = 0;
+%! opts.milu = "row";
+%! #fail ("ilu (a2, opts)");
+
+## Tests for input validation
+%!shared A_tiny
+%! A_tiny = spconvert ([1 4 2 3 3 4 2 5; 1 1 2 3 4 4 5 5; 1 2 3 4 5 6 7 8]');
+
+%!test
+%! [L, U] = ilu (sparse ([]));
+%! assert (isempty (L));
+%! assert (isempty (U));
+%! opts.type = "crout";
+%! [L, U] = ilu (sparse ([]), opts);
+%! assert (isempty (L));
+%! assert (isempty (U));
+%! opts.type = "ilutp";
+%! [L, U] = ilu (sparse ([]), opts);
+%! assert (isempty (L));
+%! assert (isempty (U));
+%!error <A must be a sparse square matrix> ilu (0)
+%!error <A must be a sparse square matrix> ilu ([])
+%!error <zero on the diagonal> ilu (sparse (0))
+
+%!test
+%! opts.type = "foo";
+%! fail ("ilu (A_tiny, opts)", "invalid TYPE specified");
+%! opts.type = 1;
+%! fail ("ilu (A_tiny, opts)", "invalid TYPE specified");
+%! opts.type = [];
+%! fail ("ilu (A_tiny, opts)", "invalid TYPE specified");
+%!test
+%! opts.droptol = -1;
+%! fail ("ilu (A_tiny, opts)", "DROPTOL must be a non-negative real scalar");
+%! opts.droptol = 0.5i;
+%! fail ("ilu (A_tiny, opts)", "DROPTOL must be a non-negative real scalar");
+%! opts.droptol = [];
+%! fail ("ilu (A_tiny, opts)", "DROPTOL must be a non-negative real scalar");
+%!test
+%! opts.milu = "foo";
+%! fail ("ilu (A_tiny, opts)", 'MILU must be one of "off"');
+%! opts.milu = 1;
+%! fail ("ilu (A_tiny, opts)", 'MILU must be one of "off"');
+%! opts.milu = [];
+%! fail ("ilu (A_tiny, opts)", 'MILU must be one of "off"');
+%!test
+%! opts.udiag = -1;
+%! fail ("ilu (A_tiny, opts)", "UDIAG must be 0 or 1");
+%! opts.udiag = 0.5i;
+%! fail ("ilu (A_tiny, opts)", "UDIAG must be 0 or 1");
+%! opts.udiag = [];
+%! fail ("ilu (A_tiny, opts)", "UDIAG must be 0 or 1");
+%!test
+%! opts.thresh = -1;
+%! fail ("ilu (A_tiny, opts)", "THRESH must be a scalar");
+%! opts.thresh = 0.5i;
+%! fail ("ilu (A_tiny, opts)", "THRESH must be a scalar");
+%! opts.thresh = [];
+%! fail ("ilu (A_tiny, opts)", "THRESH must be a scalar");
+
--- a/scripts/sparse/module.mk
+++ b/scripts/sparse/module.mk
@@ -12,9 +12,12 @@
   sparse/etreeplot.m \
   sparse/gmres.m \
   sparse/gplot.m \
+  sparse/ichol.m \
+  sparse/ilu.m \
   sparse/nonzeros.m \
   sparse/pcg.m \
   sparse/pcr.m \
+  sparse/qmr.m \
   sparse/spaugment.m \
   sparse/spconvert.m \
   sparse/spdiags.m \
--- a/scripts/sparse/nonzeros.m
+++ b/scripts/sparse/nonzeros.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} nonzeros (@var{s})
-## Return a vector of the non-zero values of the sparse matrix @var{s}.
+## Return a vector of the nonzero values of the sparse matrix @var{s}.
 ## @seealso{find, nnz}
 ## @end deftypefn
 
--- a/scripts/sparse/pcg.m
+++ b/scripts/sparse/pcg.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Piotr Krzyzanowski
+## Copyright (C) 2004-2015 Piotr Krzyzanowski
 ##
 ## This file is part of Octave.
 ##
@@ -124,7 +124,7 @@
 ## n = 10;
 ## A = diag (sparse (1:n));
 ## b = rand (n, 1);
-## [l, u, p, q] = luinc (A, 1.e-3);
+## [l, u, p] = ilu (A, struct ("droptol", 1.e-3));
 ## @end group
 ## @end example
 ##
@@ -203,7 +203,7 @@
 ## SIAM, 1995. (the base PCG algorithm)
 ##
 ## @item
-## Y. Saad, @cite{Iterative Methods for Sparse Linear Systems},
+## @nospell{Y. Saad}, @cite{Iterative Methods for Sparse Linear Systems},
 ## @nospell{PWS} 1996. (condition number estimate from PCG)
 ## Revised version of this book is available online at
 ## @url{http://www-users.cs.umn.edu/~saad/books.html}
@@ -526,8 +526,8 @@
 %!
 %! N = 100;
 %! A = zeros (N, N);
-%! for i = 1 : N - 1 # form 1-D Laplacian matrix
-%!         A (i:i+1, i:i+1) = [2 -1; -1 2];
+%! for i = 1 : N - 1  # form 1-D Laplacian matrix
+%!   A(i:i+1, i:i+1) = [2 -1; -1 2];
 %! endfor
 %! b = ones (N, 1);
 %! X = A \ b;  # X is the true solution
--- a/scripts/sparse/pcr.m
+++ b/scripts/sparse/pcr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Piotr Krzyzanowski
+## Copyright (C) 2004-2015 Piotr Krzyzanowski
 ##
 ## This file is part of Octave.
 ##
@@ -162,8 +162,8 @@
 ##
 ## References:
 ##
-##      [1] W. Hackbusch, @cite{Iterative Solution of Large Sparse Systems of
-##      Equations}, section 9.5.4; Springer, 1994
+## [1] @nospell{W. Hackbusch}, @cite{Iterative Solution of Large Sparse
+## Systems of Equations}, section 9.5.4; Springer, 1994
 ##
 ## @seealso{sparse, pcg}
 ## @end deftypefn
--- a/scripts/sparse/private/__sprand_impl__.m
+++ b/scripts/sparse/private/__sprand_impl__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ## Copyright (C) 2012 Jordi Gutiérrez Hermoso
 ##
 ## This file is part of Octave.
@@ -22,7 +22,8 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} __sprand_impl__ (@var{s}, @var{randfun})
-## @deftypefnx {Function File} {} __sprand_impl__ (@var{m}, @var{n}, @var{d}, @var{funname}, @var{randfun})
+## @deftypefnx {Function File} {} __sprand_impl__ (@var{m}, @var{n}, @var{d}, @var{fcnname}, @var{randfun})
+## @deftypefnx {Function File} {} __sprand_impl__ (@var{m}, @var{n}, @var{d}, @var{rc}, @var{fcnname}, @var{randfun})
 ## Undocumented internal function.
 ## @end deftypefn
 
@@ -31,52 +32,114 @@
 function S = __sprand_impl__ (varargin)
 
   if (nargin == 2)
-    m = varargin{1};
-    randfun = varargin{2};
+    [m, randfun] = deal (varargin{1:2});
     [i, j] = find (m);
     [nr, nc] = size (m);
     S = sparse (i, j, randfun (size (i)), nr, nc);
-    return;
-  endif
+  else
+    if (nargin == 5)
+      [m, n, d, fcnname, randfun] = deal (varargin{:});
+    else
+      [m, n, d, rc, fcnname, randfun] = deal (varargin{:});
+    endif
 
-  [m, n, d, funname, randfun] = deal (varargin{:});
+    if (! (isscalar (m) && m == fix (m) && m > 0))
+      error ("%s: M must be an integer greater than 0", fcnname);
+    endif
+    if (! (isscalar (n) && n == fix (n) && n > 0))
+      error ("%s: N must be an integer greater than 0", fcnname);
+    endif
+    if (d < 0 || d > 1)
+      error ("%s: density D must be between 0 and 1", fcnname);
+    endif
+
+    if (nargin == 5)
+      mn = m*n;
+      k = round (d*mn);
+      if (mn > sizemax ())
+        ## randperm will overflow, so use alternative methods
 
-  if (!(isscalar (m) && m == fix (m) && m > 0))
-    error ("%s: M must be an integer greater than 0", funname);
-  endif
+        idx = unique (fix (rand (1.01*k, 1) * mn)) + 1;
+
+        ## idx contains random numbers in [1,mn]
+        ## Generate 1% more random values than necessary in order to reduce the
+        ## probability that there are less than k distinct values; maybe a
+        ## better strategy could be used but I don't think it's worth the price.
 
-  if (!(isscalar (n) && n == fix (n) && n > 0))
-    error ("%s: N must be an integer greater than 0", funname);
-  endif
+        ## actual number of entries in S
+        k = min (length (idx), k);
+        j = floor ((idx(1:k) - 1) / m);
+        i = idx(1:k) - j * m;
+        j++;
+      else
+        idx = randperm (mn, k);
+        [i, j] = ind2sub ([m, n], idx);
+      endif
 
-  if (d < 0 || d > 1)
-    error ("%s: density D must be between 0 and 1", funname);
-  endif
+      S = sparse (i, j, randfun (k, 1), m, n);
+
+    elseif (nargin == 6)
+      ## Create a matrix with specified reciprocal condition number.
+
+      if (! isscalar (rc) && ! isvector (rc))
+        error ("%s: RC must be a scalar or vector", fcnname);
+      endif
 
-  mn = m*n;
-  k = round (d*mn);
-  if (mn > sizemax ())
-    ## randperm will overflow, so use alternative methods
+      ## We want to reverse singular valued decomposition A=U*S*V'.
+      ## First, first S is constructed and then U = U1*U2*..Un and
+      ## V' = V1*V2*..Vn are seen as Jacobi rotation matrices with angles and
+      ## planes of rotation randomized.  Repeatedly apply rotations until the
+      ## required density for A is achieved.
 
-    idx = unique (fix (rand (min (k*1.01, k+10), 1) * mn)) + 1;
+      if (isscalar (rc))
+        if (rc < 0 || rc > 1)
+          error ("%s: reciprocal condition number RC must be between 0 and 1", fcnname);
+        endif
+        ## Reciprocal condition number is ratio of smallest SV to largest SV
+        ## Generate singular values randomly and sort them to build S
+        ## Random singular values in range [rc, 1].
+        v = rand (1, min (m,n)) * (1 - rc) + rc;
+        v(1) = 1;
+        v(end) = rc;
+        v = sort (v, "descend");
+        S = sparse (diag (v, m, n));
+      else
+        ## Only the min (m, n) greater singular values from rc vector are used.
+        if (length (rc) > min (m,n))
+          rc = rc(1:min(m, n));
+        endif
+        S = sparse (diag (sort (rc, "descend"), m, n));
+      endif
 
-    ## idx contains random numbers in [1,mn]
-    ## generate 1% or 10 more random values than necessary in order to
-    ## reduce the probability that there are less than k distinct
-    ## values; maybe a better strategy could be used but I don't think
-    ## it's worth the price
-
-    ## actual number of entries in S
-    k = min (length (idx), k);
-    j = floor ((idx(1:k) - 1) / m);
-    i = idx(1:k) - j * m;
-    j++;
-  else
-    idx = randperm (mn, k);
-    [i, j] = ind2sub ([m, n], idx);
+      Uinit = speye (m);
+      Vinit = speye (n);
+      k = round (d*m*n);
+      while (nnz (S) < k)
+        if (m > 1)
+          ## Construct U randomized rotation matrix
+          rot_angleu = 2 * pi * rand ();
+          cu = cos (rot_angleu); su = sin (rot_angleu);
+          rndtmp = randperm (m, 2);
+          i = rndtmp(1); j = rndtmp(2);
+          U = Uinit;
+          U(i, i) = cu; U(i, j) = -su;
+          U(j, i) = su; U(j, j) = cu;
+          S = U * S;
+        endif
+        if (n > 1)
+          ## Construct V' randomized rotation matrix
+          rot_anglev = 2 * pi * rand ();
+          cv = cos (rot_anglev); sv = sin (rot_anglev);
+          rndtmp = randperm (n, 2);
+          i = rndtmp(1); j = rndtmp(2);
+          V = Vinit;
+          V(i, i) = cv;  V(i, j) = sv;
+          V(j, i) = -sv; V(j, j) = cv;
+          S = S * V;
+        endif
+      endwhile
+    endif
   endif
 
-  S = sparse (i, j, randfun (k, 1), m, n);
-
 endfunction
 
new file mode 100644
--- /dev/null
+++ b/scripts/sparse/qmr.m
@@ -0,0 +1,326 @@
+## Copyright (C) 2014-2015 Nathan Podlich
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; If not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{x} =} qmr (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0})
+## @deftypefnx {Function File} {@var{x} =} qmr (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{P})
+## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} qmr (@var{A}, @var{b}, @dots{})
+## Solve @code{A x = b} using the Quasi-Minimal Residual iterative
+## method (without look-ahead).
+##
+## @itemize @minus
+## @item @var{rtol} is the relative tolerance, if not given
+## or set to [] the default value 1e-6 is used.
+##
+## @item @var{maxit} the maximum number of outer iterations,
+## if not given or set to [] the default value
+## @code{min (20, numel (b))} is used.
+##
+## @item @var{x0} the initial guess, if not given or set to []
+## the default value @code{zeros (size (b))} is used.
+## @end itemize
+##
+## @var{A} can be passed as a matrix or as a function handle or
+## inline function @code{f} such that @code{f(x, "notransp") = A*x}
+## and @code{f(x, "transp") = A'*x}.
+##
+## The preconditioner @var{P} is given as @code{P = M1 * M2}.
+## Both @var{M1} and @var{M2} can be passed as a matrix or as
+## a function handle or inline function @code{g} such that
+## @code{g(x, "notransp") = M1 \ x} or @code{g(x, "notransp") = M2 \ x} and
+## @code{g(x, "transp") = M1' \ x} or @code{g(x, "transp") = M2' \ x}.
+##
+## If called with more than one output parameter
+##
+## @itemize @minus
+## @item @var{flag} indicates the exit status:
+##
+## @itemize @minus
+## @item 0: iteration converged to the within the chosen tolerance
+##
+## @item 1: the maximum number of iterations was reached before convergence
+##
+## @item 3: the algorithm reached stagnation
+## @end itemize
+##
+## (the value 2 is unused but skipped for compatibility).
+##
+## @item @var{relres} is the final value of the relative residual.
+##
+## @item @var{iter} is the number of iterations performed.
+##
+## @item @var{resvec} is a vector containing the residual norms at each
+##       iteration.
+## @end itemize
+##
+## References:
+##
+## @enumerate
+## @item
+## @nospell{R. Freund and N. Nachtigal}, @cite{QMR: a quasi-minimal residual
+## method for non-Hermitian linear systems}, @nospell{Numerische Mathematik},
+## 1991, 60, pp. 315-339.
+##
+## @item
+## @nospell{ R. Barrett, M. Berry, T. Chan, J. Demmel, J. Donato, J. Dongarra},
+## @nospell{ V. Eijkhour, R. Pozo, C. Romine, and H. van der Vorst},
+## @cite{Templates for the solution of linear systems: Building blocks
+## for iterative methods}, SIAM, 2nd ed., 1994.
+## @end enumerate
+##
+## @seealso{bicg, bicgstab, cgs, gmres, pcg}
+## @end deftypefn
+
+## Author: Nathan Podlich <nathan.podlich@gmail.com>
+
+function [x, flag, relres, iter, resvec] = qmr (A, b, tol, maxit, M1, M2, x0)
+
+  if (nargin >= 2 && isvector (full (b)))
+
+    if (ischar (A))
+      fun = str2func (A);
+      Ax  = @(x) feval (fun, x, "notransp");
+      Atx = @(x) feval (fun, x, "transp");
+    elseif (isa (A, "function_handle"))
+      Ax  = @(x) feval (A, x, "notransp");
+      Atx = @(x) feval (A, x, "transp");
+    elseif (isnumeric (A) && ismatrix (A))
+      Ax  = @(x) A  * x;
+      Atx = @(x) A' * x;
+    else
+      error (["qmr: first argument is expected to " ...
+                "be a function or a square matrix"]);
+    endif
+
+    if (nargin < 3 || isempty (tol))
+      tol = 1e-6;
+    endif
+
+    if (nargin < 4 || isempty (maxit))
+      maxit = min (rows (b), 20);
+    else
+      maxit = fix (maxit);
+    endif
+
+    if (nargin < 5 || isempty (M1))
+      M1m1x = @(x, ignore) x;
+      M1tm1x = M1m1x;
+    elseif (ischar (M1))
+      fun = str2func (M1);
+      M1m1x  = @(x) feval (fun, x, "notransp");
+      M1tm1x = @(x) feval (fun, x, "transp");
+    elseif (isa (M1, "function_handle"))
+      M1m1x  = @(x) feval (M1, x, "notransp");
+      M1tm1x = @(x) feval (M1, x, "transp");
+    elseif (isnumeric (M1) && ismatrix (M1))
+      M1m1x  = @(x) M1  \ x;
+      M1tm1x = @(x) M1' \ x;
+    else
+      error (["qmr: preconditioner is expected to " ...
+                "be a function or matrix"]);
+    endif
+
+    if (nargin < 6 || isempty (M2))
+      M2m1x = @(x, ignore) x;
+      M2tm1x = M2m1x;
+    elseif (ischar (M2))
+      fun = str2func (M2);
+      M2m1x  = @(x) feval (fun, x, "notransp");
+      M2tm1x = @(x) feval (fun, x, "transp");
+    elseif (isa (M2, "function_handle"))
+      M2m1x  = @(x) feval (M2, x, "notransp");
+      M2tm1x = @(x) feval (M2, x, "transp");
+    elseif (isnumeric (M2) && ismatrix (M2))
+      M2m1x  = @(x) M2  \ x;
+      M2tm1x = @(x) M2' \ x;
+    else
+      error (["qmr: preconditioner is expected to " ...
+                "be a function or matrix"]);
+    endif
+
+
+    if (nargin < 7 || isempty (x0))
+      x = zeros (size (b));
+    else
+      x = x0;
+    endif
+
+    r = b - Ax (x);
+
+    bnorm = norm (b);
+    res0 = norm (r);
+    if (nargout > 4)
+      resvec(1) = res0;
+    endif
+    vt = r;
+
+    y = M1m1x (vt);
+
+    rho0 = norm (y);
+    wt = r;
+
+    z = M2tm1x (wt);
+
+    xi1 = norm (z);
+    gamma0 = 1;
+    eta0 = -1;
+    flag = 1;
+    for iter=1:1:maxit
+      ## If rho0 == 0 or xi1 == 0, method fails.
+      v = vt / rho0;
+      y = y / rho0;
+      w = wt / xi1;
+      z = z / xi1;
+
+      delta1 = z' * y;   # If delta1 == 0, method fails.
+
+      yt = M2m1x (y);
+      zt = M1tm1x (z);
+
+      if (iter == 1)
+        p = yt;
+        q = zt;
+      else
+        p = yt - (xi1*delta1/eps0) * p;
+        q = zt - (rho0*delta1/eps0) * q;
+      endif
+      pt = Ax (p);
+
+      eps0 = q' * pt;          # If eps0 == 0, method fails.
+      beta1 = eps0 / delta1;   # If beta1 == 0, method fails.
+      vt = pt - beta1 * v;
+
+      y = M1m1x (vt);
+      rho1 = norm(y);
+      wt = Atx (q) - beta1 * w;
+      z = M2tm1x (wt);
+
+      xi1 = norm(z);
+      theta1 = rho1 / (gamma0 * abs(beta1));
+      gamma1 = 1 / sqrt(1 + theta1^2);   # If gamma1 == 0, method fails.
+      eta1 = -eta0 * rho0 * gamma1^2 / (beta1 * gamma0^2);
+
+      if (iter == 1)
+        d = eta1 * p;
+        s = eta1 * pt;
+      else
+        d = eta1 * p + (theta0*gamma1)^2 * d;
+        s = eta1 * pt + (theta0 * gamma1)^2 * s;
+      endif
+      x += d;
+      r -= s;
+
+      res1 = norm (r) / bnorm;
+      if (nargout > 4)
+        resvec(iter + 1, 1) = norm (r);
+      end
+
+      if (res1 < tol)
+        ## Convergence achieved.
+        flag = 0;
+        break;
+      elseif (res0 <= res1)
+        ## Stagnation encountered.
+        flag = 3;
+        break;
+      endif
+      theta0 = theta1;
+      eta0 = eta1;
+      gamma0 = gamma1;
+      rho0 = rho1;
+    endfor
+
+    relres = res1;
+    if (flag == 1)
+      if (nargout < 2)
+        printf ("qmr stopped at iteration %i ", iter);
+        printf ("without converging to the desired tolerance %e\n", tol);
+        printf ("because the maximum number of iterations was reached. ");
+        printf ("The iterate returned (number %i) has ", maxit);
+        printf ("relative residual %e\n", res1);
+      endif
+    elseif (flag == 3)
+      if (nargout < 2)
+        printf ("qmr stopped at iteration %i ", iter);
+        printf (" without converging to the desired tolerance %e\n", tol);
+        printf ("because the method stagnated.\n");
+        printf ("The iterate returned (number %i) ", iter);
+        printf ("has relative residual %e\n", res1);
+      endif
+    elseif (nargout < 2)
+      printf ("qmr converged at iteration %i ", iter);
+      printf ("to a solution with relative residual %e\n", res1);
+    endif
+  else
+    print usage();
+  endif
+endfunction
+
+
+%!demo
+%! % Solve system of A*x=b
+%! A = [5 -1 3;-1 2 -2;3 -2 3];
+%! b = [7;-1;4];
+%! [x, flag, relres, iter, resvec] = qmr (A, b)
+
+%!test
+%! n = 100;
+%! A = spdiags ([-2*ones(n,1) 4*ones(n,1) -ones(n,1)], -1:1, n, n);
+%! b = sum (A, 2);
+%! tol = 1e-8;
+%! maxit = 15;
+%! M1 = spdiags ([ones(n,1)/(-2) ones(n,1)],-1:0, n, n);
+%! M2 = spdiags ([4*ones(n,1) -ones(n,1)], 0:1, n, n);
+%! [x, flag, relres, iter, resvec] = qmr (A, b, tol, maxit, M1, M2);
+%! assert (x, ones (size (b)), 1e-7);
+
+%!function y = afun (x, t, a)
+%!  switch (t)
+%!    case "notransp"
+%!      y = a * x;
+%!    case "transp"
+%!      y = a' * x;
+%!  endswitch
+%!endfunction
+%!
+%!test
+%! n = 100;
+%! A = spdiags ([-2*ones(n,1) 4*ones(n,1) -ones(n,1)], -1:1, n, n);
+%! b = sum (A, 2);
+%! tol = 1e-8;
+%! maxit = 15;
+%! M1 = spdiags ([ones(n,1)/(-2) ones(n,1)],-1:0, n, n);
+%! M2 = spdiags ([4*ones(n,1) -ones(n,1)], 0:1, n, n);
+%!
+%! [x, flag, relres, iter, resvec] = qmr (@(x, t) afun (x, t, A),
+%!                                         b, tol, maxit, M1, M2);
+%! assert (x, ones (size (b)), 1e-7);
+
+%!test
+%! n = 100;
+%! tol = 1e-8;
+%! a = sprand (n, n, .1);
+%! A = a' * a + 100 * eye (n);
+%! b = sum (A, 2);
+%! [x, flag, relres, iter, resvec] = qmr (A, b, tol, [], diag (diag (A)));
+%! assert (x, ones (size (b)), 1e-7);
+
+%!test
+%! A = [1 + 1i, 1 + 1i; 2 - 1i, 2 + 1i];
+%! b = A * [1; 1];
+%! [x, flag, relres, iter, resvec] = qmr (A, b);
+%! assert (x, [1; 1], 1e-6);
--- a/scripts/sparse/spaugment.m
+++ b/scripts/sparse/spaugment.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -85,7 +85,7 @@
         c = max (abs (A(:))) / 1000;
       endif
     endif
-  elseif (!isscalar (c))
+  elseif (! isscalar (c))
     error ("spaugment: C must be a scalar");
   endif
 
--- a/scripts/sparse/spconvert.m
+++ b/scripts/sparse/spconvert.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ##
 ## This file is part of Octave.
 ##
@@ -60,7 +60,7 @@
 %! assert (isequal (i, fi) && isequal (j, fj) && isequal (complex (v, j), fv));
 %! assert (size (spconvert ([1, 1, 3; 5, 15, 0])), [5, 15]);
 
-%% Test input validation
+## Test input validation
 %!error spconvert ()
 %!error spconvert (1, 2)
 %!error spconvert ({[1 2 3]})
--- a/scripts/sparse/spdiags.m
+++ b/scripts/sparse/spdiags.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -17,24 +17,25 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{b}, @var{c}] =} spdiags (@var{A})
-## @deftypefnx {Function File} {@var{b} =} spdiags (@var{A}, @var{c})
-## @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{A})
-## @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n})
+## @deftypefn  {Function File} {@var{B} =} spdiags (@var{A})
+## @deftypefnx {Function File} {[@var{B}, @var{d}] =} spdiags (@var{A})
+## @deftypefnx {Function File} {@var{B} =} spdiags (@var{A}, @var{d})
+## @deftypefnx {Function File} {@var{A} =} spdiags (@var{v}, @var{d}, @var{A})
+## @deftypefnx {Function File} {@var{A} =} spdiags (@var{v}, @var{d}, @var{m}, @var{n})
 ## A generalization of the function @code{diag}.  Called with a single
-## input argument, the non-zero diagonals @var{c} of @var{A} are extracted.
+## input argument, the nonzero diagonals @var{d} of @var{A} are extracted.
 ## With two arguments the diagonals to extract are given by the vector
-## @var{c}.
+## @var{d}.
 ##
 ## The other two forms of @code{spdiags} modify the input matrix by
 ## replacing the diagonals.  They use the columns of @var{v} to replace
-## the columns represented by the vector @var{c}.  If the sparse matrix
+## the diagonals represented by the vector @var{d}.  If the sparse matrix
 ## @var{A} is defined then the diagonals of this matrix are replaced.
 ## Otherwise a matrix of @var{m} by @var{n} is created with the
-## diagonals given by @var{v}.
+## diagonals given by the columns of @var{v}.
 ##
-## Negative values of @var{c} represent diagonals below the main
-## diagonal, and positive values of @var{c} diagonals above the main
+## Negative values of @var{d} represent diagonals below the main
+## diagonal, and positive values of @var{d} diagonals above the main
 ## diagonal.
 ##
 ## For example:
@@ -50,45 +51,125 @@
 ## @end group
 ## @end example
 ##
+## @seealso{diag}
 ## @end deftypefn
 
-function [A, c] = spdiags (v, c, m, n)
+function [B, d] = spdiags (v, d, m, n)
+
+  if (nargin < 1 || nargin > 4)
+    print_usage ();
+  endif
 
   if (nargin == 1 || nargin == 2)
-    ## extract nonzero diagonals of v into A,c
+    ## extract nonzero diagonals of A into B,d
     [nr, nc] = size (v);
-    [i, j, v] = find (v);
+    [i, j] = find (v);
 
     if (nargin == 1)
-      ## c contains the active diagonals
-      c = unique (j-i);
+      ## d contains the active diagonals
+      d = unique (j-i);
     endif
-    ## FIXME: we can do this without a loop if we are clever
-    offset = max (min (c, nc-nr), 0);
-    A = zeros (min (nr, nc), length (c));
-    for k = 1:length (c)
-      idx = find (j-i == c(k));
-      A(j(idx)-offset(k),k) = v(idx);
+
+    ## FIXME: Maybe this could be done faster using [i,j,v] = find (v)
+    ##        and then massaging the indices i, j.  However, some
+    ##        benchmarking has shown that diag() written in C++ makes
+    ##        the following code faster even with the for loop.
+    Brows = min (nr, nc);
+    B = zeros (Brows, length (d));
+    for k = 1:length (d)
+      dn = d(k);
+      if (dn <= -nr || dn > nc)
+        continue;
+      endif
+      dv = diag (v, dn);
+      len = rows (dv);
+      ## Put sub/super-diagonals in the right place based on matrix size (MxN)
+      if (nr >= nc)
+        if (dn > 0)
+          offset = Brows - len + 1;
+          B(offset:Brows, k) = dv;
+        else
+          B(1:len, k) = dv;
+        endif
+      else
+        if (dn < 0)
+          offset = Brows - len + 1;
+          B(offset:Brows, k) = dv;
+        else
+          B(1:len, k) = dv;
+        endif
+      endif
     endfor
+
   elseif (nargin == 3)
-    ## Replace specific diagonals c of m with v,c
+    ## Replace specific diagonals d of m with v,d
     [nr, nc] = size (m);
-    B = spdiags (m, c);
-    A = m - spdiags (B, c, nr, nc) + spdiags (v, c, nr, nc);
+    A = spdiags (m, d);
+    B = m - spdiags (A, d, nr, nc) + spdiags (v, d, nr, nc);
+
   else
-    ## Create new matrix of size mxn using v,c
+    ## Create new matrix of size mxn using v,d
     [j, i, v] = find (v);
-    offset = max (min (c(:), n-m), 0);
+    if (m >= n)
+      offset = max (min (d(:), n-m), 0);
+    else
+      offset = d(:);
+    endif
     j = j(:) + offset(i(:));
-    i = j - c(:)(i(:));
+    i = j - d(:)(i(:));
     idx = i > 0 & i <= m & j > 0 & j <= n;
-    A = sparse (i(idx), j(idx), v(idx), m, n);
+    B = sparse (i(idx), j(idx), v(idx), m, n);
+
   endif
 
 endfunction
 
 
+%!test
+%! [B,d] = spdiags (magic (3));
+%! assert (d, [-2 -1 0 1 2]');
+%! assert (B, [4 3 8 0 0
+%!             0 9 5 1 0
+%!             0 0 2 7 6]);
+%! B = spdiags (magic (3), [-2 1]);
+%! assert (B, [4 0; 0 1; 0 7]);
+
+## Test zero filling for supra- and super-diagonals
+%!test
+%! ## Case 1: M = N
+%! A = sparse (zeros (3,3));
+%! A(1,3) = 13;
+%! A(3,1) = 31;
+%! [B, d] = spdiags (A);
+%! assert (d, [-2 2]');
+%! assert (B, [31 0; 0 0; 0 13]);
+%! assert (spdiags (B, d, 3,3), A)
+
+%!test
+%! ## Case 1: M > N
+%! A = sparse (zeros (4,3));
+%! A(1,3) = 13;
+%! A(3,1) = 31;
+%! [B, d] = spdiags (A);
+%! assert (d, [-2 2]');
+%! assert (B, [31 0; 0 0; 0 13]);
+%! assert (spdiags (B, d, 4,3), A)
+
+%!test
+%! ## Case 1: M < N
+%! A = sparse (zeros (3,4));
+%! A(1,3) = 13;
+%! A(3,1) = 31;
+%! [B, d] = spdiags (A);
+%! assert (d, [-2 2]');
+%! assert (B, [0 13; 0 0; 31 0]);
+%! assert (spdiags (B, d, 3,4), A)
+
 %!assert (spdiags (zeros (1,0),1,1,1), sparse (0))
 %!assert (spdiags (zeros (0,1),1,1,1), sparse (0))
-%!assert (spdiags ([0.5 -1 0.5], 0:2, 1, 1), sparse(0.5))
+%!assert (spdiags ([0.5 -1 0.5], 0:2, 1, 1), sparse (0.5))
 
+## Test input validation
+%!error spdiags ()
+%!error spdiags (1,2,3,4,5)
+
--- a/scripts/sparse/speye.m
+++ b/scripts/sparse/speye.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/sparse/spfun.m
+++ b/scripts/sparse/spfun.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{y} =} spfun (@var{f}, @var{S})
-## Compute @code{f(@var{S})} for the non-zero values of @var{S}.
+## Compute @code{f(@var{S})} for the nonzero values of @var{S}.
 ## This results in a sparse matrix with the same structure as
 ## @var{S}.  The function @var{f} can be passed as a string, a
 ## function handle, or an inline function.
--- a/scripts/sparse/spones.m
+++ b/scripts/sparse/spones.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{r} =} spones (@var{S})
-## Replace the non-zero entries of @var{S} with ones.  This creates a
+## Replace the nonzero entries of @var{S} with ones.  This creates a
 ## sparse matrix with the same structure as @var{S}.
 ## @seealso{sparse, sprand, sprandn, sprandsym, spfun, spy}
 ## @end deftypefn
--- a/scripts/sparse/sprand.m
+++ b/scripts/sparse/sprand.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -21,15 +21,23 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} sprand (@var{m}, @var{n}, @var{d})
+## @deftypefnx {Function File} {} sprand (@var{m}, @var{n}, @var{d}, @var{rc})
 ## @deftypefnx {Function File} {} sprand (@var{s})
-## Generate a random sparse matrix.  The size of the matrix will be
-## @var{m}x@var{n}, with a density of values given by @var{d}.  @var{d} must
-## be between 0 and 1 inclusive.  Values will be uniformly distributed between
-## 0 and 1.
+## Generate a sparse matrix with uniformly distributed random values.
+##
+## The size of the matrix is @var{m}x@var{n} with a density of values @var{d}.
+## @var{d} must be between 0 and 1.  Values will be uniformly distributed on
+## the interval (0, 1).
 ##
-## If called with a single matrix argument, a random sparse matrix is
-## generated wherever the matrix @var{S} is non-zero.
-## @seealso{sprandn, sprandsym, spones, sparse}
+## If called with a single matrix argument, a sparse matrix is generated with
+## random values wherever the matrix @var{s} is nonzero.
+##
+## If called with a scalar fourth argument @var{rc}, a random sparse matrix
+## with reciprocal condition number @var{rc} is generated.  If @var{rc} is
+## a vector, then it specifies the first singular values of the generated
+## matrix (@code{length (@var{rc}) <= min (@var{m}, @var{n})}).
+##
+## @seealso{sprandn, sprandsym, rand}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
@@ -42,12 +50,14 @@
 ## David Bateman
 ##      2004-10-20      Texinfo help and copyright message
 
-function S = sprand (m, n, d)
+function s = sprand (m, n, d, rc)
 
   if (nargin == 1 )
-    S = __sprand_impl__ (m, @rand);
+    s = __sprand_impl__ (m, @rand);
   elseif ( nargin == 3)
-    S = __sprand_impl__ (m, n, d, "sprand", @rand);
+    s = __sprand_impl__ (m, n, d, "sprand", @rand);
+  elseif (nargin == 4)
+    s = __sprand_impl__ (m, n, d, rc, "sprand", @rand);
   else
     print_usage ();
   endif
@@ -55,12 +65,26 @@
 endfunction
 
 
+## Test 3-input calling form
 %!test
 %! s = sprand (4, 10, 0.1);
 %! assert (size (s), [4, 10]);
 %! assert (nnz (s) / numel (s), 0.1);
 
-%% Test 1-input calling form
+## Test 4-input calling form
+%!test
+%! d = rand ();
+%! s1 = sprand (100, 100, d, 0.4);
+%! rc = [5, 4, 3, 2, 1, 0.1];
+%! s2 = sprand (100, 100, d, rc);
+%! s3 = sprand (6, 4, d, rc);
+%! assert (svd (s2)'(1:length (rc)), rc, sqrt (eps));
+%! assert (1/cond (s1), 0.4, sqrt (eps));
+%! assert (nnz (s1) / (100*100), d, 0.02);
+%! assert (nnz (s2) / (100*100), d, 0.02);
+%! assert (svd (s3)', [5 4 3 2], sqrt (eps));
+
+## Test 1-input calling form
 %!test
 %! s = sprand (sparse ([1 2 3], [3 2 3], [2 2 2]));
 %! [i, j, v] = find (s);
@@ -68,20 +92,23 @@
 %! assert (sort (j), [2 3 3]');
 %! assert (all (v > 0 & v < 1));
 
-%% Test input validation
+## Test very large, very low density matrix doesn't fail
+%!test
+%! s = sprand (1e6, 1e6, 1e-7);
+
+## Test input validation
 %!error sprand ()
 %!error sprand (1, 2)
 %!error sprand (1, 2, 3, 4)
-%!error sprand (ones (3), 3, 0.5)
-%!error sprand (3.5, 3, 0.5)
-%!error sprand (0, 3, 0.5)
-%!error sprand (3, ones (3), 0.5)
-%!error sprand (3, 3.5, 0.5)
-%!error sprand (3, 0, 0.5)
-%!error sprand (3, 3, -1)
-%!error sprand (3, 3, 2)
+%!error <M must be an integer greater than 0> sprand (ones (3), 3, 0.5)
+%!error <M must be an integer greater than 0> sprand (3.5, 3, 0.5)
+%!error <M must be an integer greater than 0> sprand (0, 3, 0.5)
+%!error <N must be an integer greater than 0> sprand (3, ones (3), 0.5)
+%!error <N must be an integer greater than 0> sprand (3, 3.5, 0.5)
+%!error <N must be an integer greater than 0> sprand (3, 0, 0.5)
+%!error <D must be between 0 and 1> sprand (3, 3, -1)
+%!error <D must be between 0 and 1> sprand (3, 3, 2)
+%!error <RC must be a scalar or vector> sprand (2, 2, 0.2, ones (3,3))
+%!error <RC must be between 0 and 1> sprand (2, 2, 0.2, -1)
+%!error <RC must be between 0 and 1> sprand (2, 2, 0.2, 2)
 
-%% Test very large, very low density matrix doesn't fail
-%!test
-%! s = sprand(1e6,1e6,1e-7);
-
--- a/scripts/sparse/sprandn.m
+++ b/scripts/sparse/sprandn.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -21,25 +21,35 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} sprandn (@var{m}, @var{n}, @var{d})
+## @deftypefnx {Function File} {} sprandn (@var{m}, @var{n}, @var{d}, @var{rc})
 ## @deftypefnx {Function File} {} sprandn (@var{s})
-## Generate a random sparse matrix.  The size of the matrix will be
-## @var{m}x@var{n}, with a density of values given by @var{d}.  @var{d} must be
-## between 0 and 1 inclusive.  Values will be normally distributed with a mean
-## of zero and a variance of 1.
+## Generate a sparse matrix with normally distributed random values.
+##
+## The size of the matrix is @var{m}x@var{n} with a density of values @var{d}.
+## @var{d} must be between 0 and 1.  Values will be normally distributed with a
+## mean of 0 and a variance of 1.
 ##
-## If called with a single matrix argument, a random sparse matrix is
-## generated wherever the matrix @var{S} is non-zero.
-## @seealso{sprand, sprandsym, spones, sparse}
+## If called with a single matrix argument, a sparse matrix is generated with
+## random values wherever the matrix @var{s} is nonzero.
+##
+## If called with a scalar fourth argument @var{rc}, a random sparse matrix
+## with reciprocal condition number @var{rc} is generated.  If @var{rc} is
+## a vector, then it specifies the first singular values of the generated
+## matrix (@code{length (@var{rc}) <= min (@var{m}, @var{n})}).
+##
+## @seealso{sprand, sprandsym, randn}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
 
-function S = sprandn (m, n, d)
+function s = sprandn (m, n, d, rc)
 
   if (nargin == 1 )
-    S = __sprand_impl__ (m, @randn);
+    s = __sprand_impl__ (m, @randn);
   elseif ( nargin == 3)
-    S = __sprand_impl__ (m, n, d, "sprandn", @randn);
+    s = __sprand_impl__ (m, n, d, "sprandn", @randn);
+  elseif (nargin == 4)
+    s = __sprand_impl__ (m, n, d, rc, "sprandn", @randn);
   else
     print_usage ();
   endif
@@ -47,32 +57,49 @@
 endfunction
 
 
+## Test 3-input calling form
 %!test
 %! s = sprandn (4, 10, 0.1);
 %! assert (size (s), [4, 10]);
 %! assert (nnz (s) / numel (s), 0.1);
 
-%% Test 1-input calling form
+## Test 4-input calling form
+%!test
+%! d = rand ();
+%! s1 = sprandn (100, 100, d, 0.4);
+%! rc = [5, 4, 3, 2, 1, 0.1];
+%! s2 = sprandn (100, 100, d, rc);
+%! s3 = sprandn (6, 4, d, rc);
+%! assert (svd (s2)'(1:length (rc)), rc, sqrt (eps));
+%! assert (1/cond (s1), 0.4, sqrt (eps));
+%! assert (nnz (s1) / (100*100), d, 0.02);
+%! assert (nnz (s2) / (100*100), d, 0.02);
+%! assert (svd (s3)', [5 4 3 2], sqrt (eps));
+
+## Test 1-input calling form
 %!test
 %! s = sprandn (sparse ([1 2 3], [3 2 3], [2 2 2]));
 %! [i, j] = find (s);
 %! assert (sort (i), [1 2 3]');
 %! assert (sort (j), [2 3 3]');
 
-%% Test input validation
+## Test very large, very low density matrix doesn't fail
+%!test
+%! s = sprandn (1e6,1e6,1e-7);
+
+## Test input validation
 %!error sprandn ()
 %!error sprandn (1, 2)
 %!error sprandn (1, 2, 3, 4)
-%!error sprandn (ones (3), 3, 0.5)
-%!error sprandn (3.5, 3, 0.5)
-%!error sprandn (0, 3, 0.5)
-%!error sprandn (3, ones (3), 0.5)
-%!error sprandn (3, 3.5, 0.5)
-%!error sprandn (3, 0, 0.5)
-%!error sprandn (3, 3, -1)
-%!error sprandn (3, 3, 2)
+%!error <M must be an integer greater than 0> sprandn (ones (3), 3, 0.5)
+%!error <M must be an integer greater than 0> sprandn (3.5, 3, 0.5)
+%!error <M must be an integer greater than 0> sprandn (0, 3, 0.5)
+%!error <N must be an integer greater than 0> sprandn (3, ones (3), 0.5)
+%!error <N must be an integer greater than 0> sprandn (3, 3.5, 0.5)
+%!error <N must be an integer greater than 0> sprandn (3, 0, 0.5)
+%!error <D must be between 0 and 1> sprandn (3, 3, -1)
+%!error <D must be between 0 and 1> sprandn (3, 3, 2)
+%!error <RC must be a scalar or vector> sprandn (2, 2, 0.2, ones (3,3))
+%!error <RC must be between 0 and 1> sprandn (2, 2, 0.2, -1)
+%!error <RC must be between 0 and 1> sprandn (2, 2, 0.2, 2)
 
-%% Test very large, very low density matrix doesn't fail
-%!test
-%! s = sprandn(1e6,1e6,1e-7);
-
--- a/scripts/sparse/sprandsym.m
+++ b/scripts/sparse/sprandsym.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 David Bateman and Andy Adler
+## Copyright (C) 2004-2015 David Bateman and Andy Adler
 ## Copyright (C) 2012 Jordi Gutiérrez Hermoso
 ##
 ## This file is part of Octave.
@@ -27,7 +27,7 @@
 ## be normally distributed with a mean of zero and a variance of 1.
 ##
 ## If called with a single matrix argument, a random sparse matrix is generated
-## wherever the matrix @var{S} is non-zero in its lower triangular part.
+## wherever the matrix @var{S} is nonzero in its lower triangular part.
 ## @seealso{sprand, sprandn, spones, sparse}
 ## @end deftypefn
 
@@ -159,14 +159,14 @@
 %! assert (size (s), [10, 10]);
 %! assert (nnz (s) / numel (s), 0.1, .01);
 
-%% Test 1-input calling form
+## Test 1-input calling form
 %!test
 %! s = sprandsym (sparse ([1 2 3], [3 2 3], [2 2 2]));
 %! [i, j] = find (s);
 %! assert (sort (i), [2 3]');
 %! assert (sort (j), [2 3]');
 
-%% Test input validation
+## Test input validation
 %!error sprandsym ()
 %!error sprandsym (1, 2, 3)
 %!error sprandsym (ones (3), 0.5)
--- a/scripts/sparse/spstats.m
+++ b/scripts/sparse/spstats.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -19,10 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {[@var{count}, @var{mean}, @var{var}] =} spstats (@var{S})
 ## @deftypefnx {Function File} {[@var{count}, @var{mean}, @var{var}] =} spstats (@var{S}, @var{j})
-## Return the stats for the non-zero elements of the sparse matrix @var{S}.
-## @var{count} is the number of non-zeros in each column, @var{mean}
-## is the mean of the non-zeros in each column, and @var{var} is the
-## variance of the non-zeros in each column.
+## Return the stats for the nonzero elements of the sparse matrix @var{S}.
+## @var{count} is the number of nonzeros in each column, @var{mean}
+## is the mean of the nonzeros in each column, and @var{var} is the
+## variance of the nonzeros in each column.
 ##
 ## Called with two input arguments, if @var{S} is the data and @var{j}
 ## is the bin number for the data, compute the stats for each bin.  In
@@ -50,7 +50,7 @@
     mean = sum (S) ./ count;
   endif
   if (nargout > 2)
-    ## FIXME Variance with count = 0 or 1?
+    ## FIXME: Variance with count = 0 or 1?
     diff = S - sparse (i, j, mean (j), n, m);
     var = sum (diff .* diff) ./ (count - 1);
   endif
--- a/scripts/sparse/spy.m
+++ b/scripts/sparse/spy.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1998-2013 Andy Adler
+## Copyright (C) 1998-2015 Andy Adler
 ##
 ## This file is part of Octave.
 ##
@@ -72,6 +72,6 @@
 %! clf;
 %! spy (sprand (10,10, 0.2));
 
-%% Mark graphical function as tested by demo block
+## Mark graphical function as tested by demo block
 %!assert (1)
 
--- a/scripts/sparse/svds.m
+++ b/scripts/sparse/svds.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 David Bateman
+## Copyright (C) 2006-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -107,16 +107,16 @@
     opts.disp = 0;
     opts.maxit = 300;
   else
-    if (!isstruct (opts))
+    if (! isstruct (opts))
       error ("svds: OPTS must be a structure");
     endif
-    if (!isfield (opts, "tol"))
+    if (! isfield (opts, "tol"))
       opts.tol = 0;  # use ARPACK default
     else
       opts.tol = opts.tol / root2;
     endif
     if (isfield (opts, "v0"))
-      if (!isvector (opts.v0) || (length (opts.v0) != sum (size (A))))
+      if (! isvector (opts.v0) || (length (opts.v0) != sum (size (A))))
         error ("svds: OPTS.v0 must be a vector with rows(A)+columns(A) entries");
       endif
     endif
@@ -160,7 +160,7 @@
     ## Call to eigs is always a symmetric matrix by construction
     b_opts.issym = true;
     b_sigma = sigma;
-    if (!ischar (b_sigma))
+    if (! ischar (b_sigma))
       b_sigma = b_sigma / max_a;
     endif
 
@@ -169,7 +169,7 @@
       ## The eigenvalues returns by eigs for sigma=0 are symmetric about 0.
       ## As we are only interested in the positive eigenvalues, we have to
       ## double k and then throw out the k negative eigenvalues.
-      ## Separately, if sigma is non-zero, but smaller than the smallest
+      ## Separately, if sigma is nonzero, but smaller than the smallest
       ## singular value, ARPACK may not return k eigenvalues. However, as
       ## computation scales with k we'd like to avoid doubling k for all
       ## scalar values of sigma.
@@ -219,7 +219,7 @@
 
     if (length (s) < k)
       warning ("returning fewer singular values than requested");
-      if (!ischar (sigma))
+      if (! ischar (sigma))
         warning ("try increasing the value of sigma");
       endif
     endif
--- a/scripts/sparse/treelayout.m
+++ b/scripts/sparse/treelayout.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ivana Varekova & Radek Salac
+## Copyright (C) 2008-2015 Ivana Varekova & Radek Salac
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
   if (nargin < 1 || nargin > 2 || nargout > 4)
     print_usage ();
   elseif (! isvector (tree) || rows (tree) != 1 || ! isnumeric (tree)
-          ||  any (tree > length (tree)) || any (tree < 0))
+          || any (tree > length (tree)) || any (tree < 0))
     error ("treelayout: the first input argument must be a vector of predecessors");
   else
     ## Make it a row vector.
--- a/scripts/sparse/treeplot.m
+++ b/scripts/sparse/treeplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Ivana Varekova
+## Copyright (C) 2005-2015 Ivana Varekova
 ##
 ## This file is part of Octave.
 ##
@@ -156,9 +156,9 @@
   ## of most left and most right descendants).
   x_coordinate = (x_coordinate_l + x_coordinate_r) / 2;
 
-  ## FIXME -- we should probably stuff all the arguments into a cell
-  ## array and make a single call to plot here so we can avoid
-  ## setting the hold state...
+  ## FIXME: We should probably stuff all the arguments into a cell
+  ##        array and make a single call to plot here so we can avoid
+  ##        setting the hold state...
 
   hold_is_on = ishold ();
   unwind_protect
--- a/scripts/specfun/bessel.m
+++ b/scripts/specfun/bessel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -31,24 +31,21 @@
 ##
 ## @item bessely
 ## Bessel functions of the second kind.  If the argument @var{opt} is supplied,
-## the result is multiplied by @code{exp (-abs (imag (x)))}.
+## the result is multiplied by @w{@code{exp (-abs (imag (x)))}}.
 ##
 ## @item besseli
 ## Modified Bessel functions of the first kind.  If the argument @var{opt} is
-## supplied,
-## the result is multiplied by @code{exp (-abs (real (x)))}.
+## supplied, the result is multiplied by @w{@code{exp (-abs (real (x)))}}.
 ##
 ## @item besselk
 ## Modified Bessel functions of the second kind.  If the argument @var{opt} is
-## supplied,
-## the result is multiplied by @code{exp (x)}.
+## supplied, the result is multiplied by @w{@code{exp (x)}}.
 ##
 ## @item besselh
-## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}
-## = 2) kind.  If the argument @var{opt} is supplied, the result is multiplied
-## by
-## @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for
-## @var{k} = 2.
+## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} = 2)
+## kind.  If the argument @var{opt} is supplied, the result is multiplied by
+## @w{@code{exp (-I*@var{x})}} for @var{k} = 1 or @w{@code{exp (I*@var{x})}}
+## for @var{k} = 2.
 ## @end table
 ##
 ## If @var{alpha} is a scalar, the result is the same size as @var{x}.
@@ -58,11 +55,10 @@
 ## @code{length (@var{alpha})} columns.  Otherwise, @var{alpha} and
 ## @var{x} must conform and the result will be the same size.
 ##
-## The value of @var{alpha} must be real.  The value of @var{x} may be
-## complex.
+## The value of @var{alpha} must be real.  The value of @var{x} may be complex.
 ##
-## If requested, @var{ierr} contains the following status information
-## and is the same size as the result.
+## If requested, @var{ierr} contains the following status information and is
+## the same size as the result.
 ##
 ## @enumerate 0
 ## @item
@@ -75,8 +71,8 @@
 ## Overflow, return @code{Inf}.
 ##
 ## @item
-## Loss of significance by argument reduction results in less than
-## half of machine accuracy.
+## Loss of significance by argument reduction results in less than half of
+## machine accuracy.
 ##
 ## @item
 ## Complete loss of significance by argument reduction, return @code{NaN}.
@@ -88,7 +84,7 @@
 ## @end deftypefn
 
 function bessel ()
-  error ("bessel: you must use besselj, bessely, besseli, or besselk");
+  error ("bessel: you must use besselj, bessely, besseli, besselk, or besselh\n");
 endfunction
 
 
--- a/scripts/specfun/beta.m
+++ b/scripts/specfun/beta.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Mapping Function} {} beta (@var{a}, @var{b})
-## For real inputs, return the Beta function,
+## Compute the Beta function for real inputs @var{a} and @var{b}.
+##
+## The Beta function definition is
 ## @tex
 ## $$
 ##  B (a, b) = {\Gamma (a) \Gamma (b) \over \Gamma (a + b)}.
@@ -31,7 +33,12 @@
 ## @end example
 ##
 ## @end ifnottex
-## @seealso{betaln, betainc}
+##
+## The Beta function can grow quite large and it is often more useful to work
+## with the logarithm of the output rather than the function directly.
+## @xref{XREFbetaln,,betaln}, for computing the logarithm of the Beta function
+## in an efficient manner.
+## @seealso{betaln, betainc, betaincinv}
 ## @end deftypefn
 
 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
@@ -44,12 +51,10 @@
     print_usage ();
   endif
 
-  if (any (size (a) != size (b)) && numel (a) != 1 && numel (b) != 1)
-    error ("beta: inputs A and B have inconsistent sizes");
-  endif
-
   if (! isreal (a) || ! isreal (b))
-    error ("beta: inputs A and B must be real");
+    error ("beta: A and B must be real");
+  elseif (! size_equal (a, b) && numel (a) != 1 && numel (b) != 1)
+    error ("beta: A and B must have consistent sizes");
   endif
 
   retval = real (exp (gammaln (a) + gammaln (b) - gammaln (a+b)));
@@ -60,8 +65,8 @@
 %!test
 %! a = [1, 1.5, 2, 3];
 %! b = [4, 3, 2, 1];
-%! v1 = beta (a,b);
-%! v2 = beta (b,a);
+%! v1 = beta (a, b);
+%! v2 = beta (b, a);
 %! v3 = gamma (a).*gamma (b) ./ gamma (a+b);
 %! assert (v1, v2, sqrt (eps));
 %! assert (v2, v3, sqrt (eps));
@@ -82,4 +87,10 @@
 
 %!error beta ()
 %!error beta (1)
+%!error beta (1,2,3)
+%!error <A and B must be real> beta (1i, 2)
+%!error <A and B must be real> beta (2, 1i)
+%!error <A and B must have consistent sizes> beta ([1 2], [1 2 3])
+%!error <A and B must have consistent sizes> beta ([1 2 3], [1 2])
+%!error <A and B must have consistent sizes> beta ([1 2 3], [1 2 3]')
 
--- a/scripts/specfun/betaln.m
+++ b/scripts/specfun/betaln.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1998-2013 Nicol N. Schraudolph
+## Copyright (C) 1998-2015 Nicol N. Schraudolph
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Mapping Function} {} betaln (@var{a}, @var{b})
-## Return the natural logarithm of the Beta function,
+## Compute the natural logarithm of the Beta function for real inputs @var{a}
+## and @var{b}.
+##
+## @code{betaln} is defined as
 ## @tex
 ## $$
 ##  {\rm betaln} (a, b) = \ln (B (a,b)) \equiv \ln ({\Gamma (a) \Gamma (b) \over \Gamma (a + b)}).
@@ -31,8 +34,11 @@
 ## @end example
 ##
 ## @end ifnottex
-## calculated in a way to reduce the occurrence of underflow.
-## @seealso{beta, betainc, gammaln}
+## and is calculated in a way to reduce the occurrence of underflow.
+##
+## The Beta function can grow quite large and it is often more useful to work
+## with the logarithm of the output rather than the function directly.
+## @seealso{beta, betainc, betaincinv, gammaln}
 ## @end deftypefn
 
 ## Author:   Nicol N. Schraudolph <nic@idsia.ch>
@@ -45,6 +51,12 @@
     print_usage ();
   endif
 
+  if (! isreal (a) || ! isreal (b))
+    error ("betaln: A and B must be real");
+  elseif (! size_equal (a, b) && numel (a) != 1 && numel (b) != 1)
+    error ("betaln: A and B must have consistent sizes");
+  endif
+
   retval = gammaln (a) + gammaln (b) - gammaln (a + b);
 
 endfunction
@@ -52,7 +64,13 @@
 
 %!assert (betaln (3,4), log (beta (3,4)), eps)
 
-%% Test input validation
-%!error (betaln (1))
-%!error (betaln (1,2,3))
+## Test input validation
+%!error betaln ()
+%!error betaln (1)
+%!error betaln (1,2,3)
+%!error <A and B must be real> betaln (1i, 2)
+%!error <A and B must be real> betaln (2, 1i)
+%!error <A and B must have consistent sizes> betaln ([1 2], [1 2 3])
+%!error <A and B must have consistent sizes> betaln ([1 2 3], [1 2])
+%!error <A and B must have consistent sizes> betaln ([1 2 3], [1 2 3]')
 
--- a/scripts/specfun/ellipke.m
+++ b/scripts/specfun/ellipke.m
@@ -27,13 +27,58 @@
 ##
 ## @var{m} must be a scalar or real array with -Inf @leq{} @var{m} @leq{} 1.
 ##
-## The optional input @var{tol} is currently ignored (@sc{matlab} uses this
-## to allow a faster, less accurate approximation).
+## The optional input @var{tol} controls the stopping tolerance of the
+## algorithm and defaults to @code{eps (class (@var{m}))}.  The tolerance can
+## be increased to compute a faster, less accurate approximation.
 ##
-## Called with only one output, elliptic integrals of the first kind are
+## When called with one output only elliptic integrals of the first kind are
 ## returned.
 ##
-## Reference: Milton Abramowitz and Irene A. Stegun,
+## Mathematical Note:
+##
+## Elliptic integrals of the first kind are defined as
+##
+## @tex
+## $$
+## {\rm K} (m) = \int_0^1 {dt \over \sqrt{(1 - t^2) (1 - m^2 t^2)}}
+## $$
+## @end tex
+## @ifnottex
+##
+## @example
+## @group
+##          1
+##         /               dt
+## K (m) = | ------------------------------
+##         / sqrt ((1 - t^2)*(1 - m^2*t^2))
+##        0
+## @end group
+## @end example
+##
+## @end ifnottex
+##
+## Elliptic integrals of the second kind are defined as
+##
+## @tex
+## $$
+## {\rm E} (m) = \int_0^1 {\sqrt{1 - m^2 t^2} \over \sqrt{1 - t^2}} dt
+## $$
+## @end tex
+## @ifnottex
+##
+## @example
+## @group
+##          1
+##         /  sqrt (1 - m^2*t^2)
+## E (m) = |  ------------------ dt
+##         /  sqrt (1 - t^2)
+##        0
+## @end group
+## @end example
+##
+## @end ifnottex
+##
+## Reference: Milton @nospell{Abramowitz} and Irene A. @nospell{Stegun},
 ## @cite{Handbook of Mathematical Functions}, Chapter 17, Dover, 1965.
 ## @seealso{ellipj}
 ## @end deftypefn
@@ -42,12 +87,13 @@
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
 ## Author: Jaakko Ruohio
 
-function [k, e] = ellipke (m)
+function [k, e] = ellipke (m, tol = [])
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
+  sz = size (m);
   m = m(:);
   if (! isreal (m))
     error ("ellipke: M must be real");
@@ -55,7 +101,13 @@
     error ("ellipke: M must be <= 1");
   endif
 
-  k = e = zeros (size (m));
+  if (isempty (tol))
+    tol = eps (class (m));
+  elseif (! (isreal (tol) && isscalar (tol) && tol > 0))
+    error ("ellipke: TOL must be a real scalar > 0")
+  endif
+
+  k = e = zeros (sz);
 
   ## Handle extreme values
   idx_1 = (m == 1);
@@ -84,11 +136,11 @@
     do
       t = (a + b)/2;
       c = (a - b)/2;
-      b = sqrt (a.*b);
+      b = sqrt (a .* b);
       a = t;
       f *= 2;
       sum += f*c.^2;
-    until (all (c./a < eps) || (++n > Nmax))
+    until (all (c./a < tol) || (++n > Nmax))
     if (n >= Nmax)
       error ("ellipke: algorithm did not converge in %d iterations", Nmax);
     endif
@@ -104,23 +156,17 @@
 ## Test complete elliptic functions of first and second kind
 ## against "exact" solution from Mathematica 3.0
 %!test
-%! m = [0.0; 0.01; 0.1; 0.5; 0.9; 0.99; 1.0];
+%! m = [0.0, 0.01; 0.1, 0.5; 0.9, 0.99; 1.0, 0.0];
 %! [k,e] = ellipke (m);
 %!
-%! k_exp = [1.5707963267948966192;
-%!          1.5747455615173559527;
-%!          1.6124413487202193982;
-%!          1.8540746773013719184;
-%!          2.5780921133481731882;
-%!          3.6956373629898746778;
-%!          Inf ];
-%! e_exp = [1.5707963267948966192;
-%!          1.5668619420216682912;
-%!          1.5307576368977632025;
-%!          1.3506438810476755025;
-%!          1.1047747327040733261;
-%!          1.0159935450252239356;
-%!          1.0 ];
+%! k_exp = [1.5707963267948966192, 1.5747455615173559527
+%!          1.6124413487202193982, 1.8540746773013719184
+%!          2.5780921133481731882, 3.6956373629898746778
+%!          Inf                  , 1.5707963267948966192 ];
+%! e_exp = [1.5707963267948966192, 1.5668619420216682912
+%!          1.5307576368977632025, 1.3506438810476755025
+%!          1.1047747327040733261, 1.0159935450252239356
+%!          1.0                  , 1.5707963267948966192 ];
 %! assert (k, k_exp, 8*eps);
 %! assert (e, e_exp, 8*eps);
 
@@ -175,4 +221,9 @@
 ## Test input validation
 %!error ellipke ()
 %!error ellipke (1,2,3)
+%!error <M must be real> ellipke (1i)
+%!error <M must be .= 1> ellipke (2)
+%!error <TOL must be a real scalar . 0> ellipke (1, i)
+%!error <TOL must be a real scalar . 0> ellipke (1, [1 1])
+%!error <TOL must be a real scalar . 0> ellipke (1, -1)
 
--- a/scripts/specfun/factor.m
+++ b/scripts/specfun/factor.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -17,20 +17,20 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{p} =} factor (@var{q})
-## @deftypefnx {Function File} {[@var{p}, @var{n}] =} factor (@var{q})
-##
-## Return the prime factorization of @var{q}.  That is,
-## @code{prod (@var{p}) == @var{q}} and every element of @var{p} is a prime
-## number.  If @code{@var{q} == 1}, return 1.
+## @deftypefn  {Function File} {@var{pf} =} factor (@var{q})
+## @deftypefnx {Function File} {[@var{pf}, @var{n}] =} factor (@var{q})
+## Return the prime factorization of @var{q}.
 ##
-## With two output arguments, return the unique primes @var{p} and
-## their multiplicities.  That is, @code{prod (@var{p} .^ @var{n}) ==
-## @var{q}}.
+## The prime factorization is defined as @code{prod (@var{pf}) == @var{q}}
+## where every element of @var{pf} is a prime number.  If @code{@var{q} == 1},
+## return 1.
 ##
-## Implementation Note: The input @var{q} must not be greater than
+## With two output arguments, return the unique prime factors @var{pf} and
+## their multiplicities.  That is, @code{prod (@var{pf} .^ @var{n}) == @var{q}}.
+##
+## Implementation Note: The input @var{q} must be less than
 ## @code{bitmax} (9.0072e+15) in order to factor correctly.
-## @seealso{gcd, lcm, isprime}
+## @seealso{gcd, lcm, isprime, primes}
 ## @end deftypefn
 
 ## Author: Paul Kienzle
@@ -40,29 +40,29 @@
 ## * return multiplicity as suggested by Dirk Laurie
 ## * add error handling
 
-function [x, n] = factor (q)
+function [pf, n] = factor (q)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  if (! isscalar (q) || q != fix (q))
-    error ("factor: Q must be a scalar integer");
+  if (! isreal (q) || ! isscalar (q) || q != fix (q))
+    error ("factor: Q must be a real integer");
   endif
 
   ## Special case of no primes less than sqrt(q).
   if (q < 4)
-    x = q;
+    pf = q;
     n = 1;
     return;
   endif
 
   q = double (q);  # For the time being, calcs rely on double precision var.
   qorig = q;
-  x = [];
+  pf = [];
   ## There is at most one prime greater than sqrt(q), and if it exists,
   ## it has multiplicity 1, so no need to consider any factors greater
-  ## than sqrt(q) directly. [If there were two factors p1, p2 > sqrt(q),
+  ## than sqrt(q) directly.  [If there were two factors p1, p2 > sqrt(q),
   ## then q >= p1*p2 > sqrt(q)*sqrt(q) == q. Contradiction.]
   p = primes (sqrt (q));
   while (q > 1)
@@ -72,24 +72,24 @@
       ## Can't be reduced further, so q must itself be a prime.
       p = q;
     endif
-    x = [x, p];
+    pf = [pf, p];
     ## Reduce q.
     q /= prod (p);
   endwhile
-  x = sort (x);
+  pf = sort (pf);
 
   ## Verify algorithm was succesful
-  q = prod (x);
+  q = prod (pf);
   if (q != qorig)
-    error ("factor: Input Q too large to factor");
+    error ("factor: Q too large to factor");
   elseif (q > bitmax)
-    warning ("factor: Input Q too large.  Answer is unreliable");
+    warning ("factor: Q too large.  Answer is unreliable");
   endif
 
   ## Determine muliplicity.
   if (nargout > 1)
-    idx = find ([0, x] != [x, 0]);
-    x = x(idx(1:length (idx)-1));
+    idx = find ([0, pf] != [pf, 0]);
+    pf = pf(idx(1:length (idx)-1));
     n = diff (idx);
   endif
 
@@ -99,16 +99,18 @@
 %!assert (factor (1), 1)
 %!test
 %! for i = 2:20
-%!   p = factor (i);
-%!   assert (prod (p), i);
-%!   assert (all (isprime (p)));
-%!   [p,n] = factor (i);
-%!   assert (prod (p.^n), i);
-%!   assert (all ([0,p] != [p,0]));
+%!   pf = factor (i);
+%!   assert (prod (pf), i);
+%!   assert (all (isprime (pf)));
+%!   [pf, n] = factor (i);
+%!   assert (prod (pf.^n), i);
+%!   assert (all ([0,pf] != [pf,0]));
 %! endfor
 
-%% Test input validation
+## Test input validation
 %!error factor ()
-%!error <Q must be a scalar integer> factor ([1,2])
-%!error <Q must be a scalar integer> factor (1.5)
+%!error factor (1,2)
+%!error <Q must be a real integer> factor (6i)
+%!error <Q must be a real integer> factor ([1,2])
+%!error <Q must be a real integer> factor (1.5)
 
--- a/scripts/specfun/factorial.m
+++ b/scripts/specfun/factorial.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -18,28 +18,48 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} factorial (@var{n})
-## Return the factorial of @var{n} where @var{n} is a positive integer.  If
-## @var{n} is a scalar, this is equivalent to @code{prod (1:@var{n})}.  For
+## Return the factorial of @var{n} where @var{n} is a real non-negative integer.
+##
+## If @var{n} is a scalar, this is equivalent to @code{prod (1:@var{n})}.  For
 ## vector or matrix arguments, return the factorial of each element in the
-## array.  For non-integers see the generalized factorial function
-## @code{gamma}.
-## @seealso{prod, gamma}
+## array.
+##
+## For non-integers see the generalized factorial function @code{gamma}.
+## Note that the factorial function grows large quite quickly, and even
+## with double precision values overflow will occur if @var{n} > 171.  For
+## such cases consider @code{gammaln}.
+## @seealso{prod, gamma, gammaln}
 ## @end deftypefn
 
 function x = factorial (n)
+
   if (nargin != 1)
     print_usage ();
-  elseif (any (n(:) < 0 | n(:) != fix (n(:))))
-    error ("factorial: N must all be non-negative integers");
+  elseif (! isreal (n) || any (n(:) < 0 | n(:) != fix (n(:))))
+    error ("factorial: all N must be real non-negative integers");
   endif
+
   x = round (gamma (n+1));
+
+  ## FIXME: Matlab returns an output of the same type as the input.
+  ## This doesn't seem particularly worth copying--for example uint8 would
+  ## saturate for n > 5.  If desired, however, the following code could be
+  ## uncommented.
+  # if (! isfloat (x))
+  #   x = cast (x, class (n));
+  # endif
+
 endfunction
 
 
 %!assert (factorial (5), prod (1:5))
 %!assert (factorial ([1,2;3,4]), [1,2;6,24])
 %!assert (factorial (70), exp (sum (log (1:70))), -128*eps)
+%!assert (factorial (0), 1)
 
-%!fail ("factorial (5.5)", "must all be non-negative integers")
-%!fail ("factorial (-3)", "must all be non-negative integers")
+%!error factorial ()
+%!error factorial (1,2)
+%!error <must be real non-negative integers> factorial (2i)
+%!error <must be real non-negative integers> factorial (-3)
+%!error <must be real non-negative integers> factorial (5.5)
 
--- a/scripts/specfun/isprime.m
+++ b/scripts/specfun/isprime.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -22,8 +22,21 @@
 ## Return a logical array which is true where the elements of @var{x} are
 ## prime numbers and false where they are not.
 ##
-## If the maximum value in @var{x} is very large, then you should be using
-## special purpose factorization code.
+## A prime number is conventionally defined as a positive integer greater than
+## 1 (e.g., 2, 3, @dots{}) which is divisible only by itself and 1.  Octave
+## extends this definition to include both negative integers and complex
+## values.  A negative integer is prime if its positive counterpart is prime.
+## This is equivalent to @code{isprime (abs (x))}.
+##
+## If @code{class (@var{x})} is complex, then primality is tested in the domain
+## of Gaussian integers (@url{http://en.wikipedia.org/wiki/Gaussian_integer}).
+## Some non-complex integers are prime in the ordinary sense, but not in the
+## domain of Gaussian integers.  For example, @math{5 = (1+2i)*(1-2i)} shows
+## that 5 is not prime because it has a factor other than itself and 1.
+## Exercise caution when testing complex and real values together in the same
+## matrix.
+##
+## Examples:
 ##
 ## @example
 ## @group
@@ -31,59 +44,129 @@
 ##     @result{} [0, 1, 1, 0, 1, 0]
 ## @end group
 ## @end example
+##
+## @example
+## @group
+## isprime ([i, 2, 3, 5])
+##     @result{} [0, 0, 1, 0]
+## @end group
+## @end example
+##
+## Programming Note: @code{isprime} is appropriate if the maximum value in
+## @var{x} is not too large (< 1e15).  For larger values special purpose
+## factorization code should be used.
+##
+## Compatibility Note: @var{matlab} does not extend the definition of prime
+## numbers and will produce an error if given negative or complex inputs.
 ## @seealso{primes, factor, gcd, lcm}
 ## @end deftypefn
 
 function t = isprime (x)
 
-  if (nargin == 1)
-    if (any ((x != floor (x) | x < 0)(:)))
-      error ("isprime: needs positive integers");
-    endif
-    maxn = max (x(:));
-    ## generate prime table of suitable length.
-    maxp = min (maxn, max (sqrt (maxn), 1e7)); # FIXME: threshold not optimized.
-    pr = primes (maxp);
-    ## quick search for table matches.
-    t = lookup (pr, x, "b");
-    ## take the rest.
-    m = x(x > maxp);
-    if (! isempty (m))
-      ## there are still possible primes. filter them out by division.
-      if (maxn <= intmax ("uint32"))
-        m = uint32 (m);
-      elseif (maxn <= intmax ("uint64"))
-        m = uint64 (m);
-      else
-        warning ("isprime: too large integers being tested");
-      endif
-      pr = cast (pr(pr <= sqrt (maxn)), class (m));
-      for p = pr
-        m = m(rem (m, p) != 0);
-        if (length (m) < length (pr) / 10)
-          break;
-        endif
-      endfor
-      pr = pr(pr > p);
-      mm = arrayfun (@(x) all (rem (x, pr)), m);
-      m = m(mm);
-      if (! isempty (m))
-        m = cast (sort (m), class (x));
-        t |= lookup (m, x, "b");
-      endif
+  if (nargin != 1)
+    print_usage ();
+  elseif (any (fix (x) != x))
+    error ("isprime: X contains non-integer entries");
+  endif
+
+  if (isempty (x))
+    t = x;
+    return;
+  endif
+
+  if (iscomplex (x))
+    t = isgaussianprime (x);
+    return;
+  endif
+
+  ## Code strategy is to build a table with the list of possible primes
+  ## and then quickly compare entries in x with the table of primes using
+  ## lookup().  The table size is limited to save memory and computation
+  ## time during its creation.  All entries larger than the maximum in the
+  ## table are checked by straightforward division.
+
+  x = abs (x);              # handle negative entries
+  maxn = max (x(:));
+  ## generate prime table of suitable length.
+  ## 1e7 threshold requires ~0.15 seconds of computation, 1e8 requires 1.8.
+  maxp = min (maxn, max (sqrt (maxn), 1e7));
+  pr = primes (maxp);
+  t = lookup (pr, x, "b");  # quick search for table matches.
+
+  ## process any remaining large entries
+  m = x(x > maxp);
+  if (! isempty (m))
+    if (maxn <= intmax ("uint32"))
+      m = uint32 (m);
+    elseif (maxn <= intmax ("uint64"))
+      m = uint64 (m);
+    else
+      warning ("isprime: X contains integers too large to be tested");
     endif
 
-  else
-    print_usage ();
+    ## Start by dividing through by the small primes until the remaining
+    ## list of entries is small (and most likely prime themselves).
+    pr = cast (pr(pr <= sqrt (maxn)), class (m));
+    for p = pr
+      m = m(rem (m, p) != 0);
+      if (numel (m) < numel (pr) / 10)
+        break;
+      endif
+    endfor
+
+    ## Check the remaining list of possible primes against the
+    ## remaining prime factors which were not tested in the for loop.
+    ## This is just an optimization to use arrayfun over for loo
+    pr = pr(pr > p);
+    mm = arrayfun (@(x) all (rem (x, pr)), m);
+    m = m(mm);
+
+    ## Add any remaining entries, which are truly prime, to the results.
+    if (! isempty (m))
+      m = cast (sort (m), class (x));
+      t |= lookup (m, x, "b");
+    endif
   endif
 
 endfunction
 
+function t = isgaussianprime (z)
+  ## Assume prime unless proven otherwise
+  t = true (size (z));
+
+  x = real (z);
+  y = imag (z);
+
+  ## If purely real or purely imaginary, ordinary prime test for
+  ## that complex part if that part is 3 mod 4.
+  xidx = y==0 & mod (x, 4) == 3;
+  yidx = x==0 & mod (y, 4) == 3;
+
+  t(xidx) &= isprime (x(xidx));
+  t(yidx) &= isprime (y(yidx));
+
+  ## Otherwise, prime if x^2 + y^2 is prime
+  zidx = ! (xidx | yidx);          # Skip entries that were already evaluated
+  zabs = x(zidx).^2 + y(zidx).^2;
+  t(zidx) &= isprime (zabs);
+endfunction
+
 
 %!assert (isprime (3), true)
 %!assert (isprime (4), false)
+%!assert (isprime (5i), false)
+%!assert (isprime (7i), true)
+%!assert (isprime ([1+2i, (2+3i)*(-1+2i)]), [true, false])
+%!assert (isprime (-2), true)
+%!assert (isprime (complex (-2)), false)
+%!assert (isprime (2i), false)
+%!assert (isprime ([i, 2, 3, 5]), [false, false, true, false])
+%!assert (isprime (0), false)
 %!assert (isprime (magic (3)), logical ([0, 0, 0; 1, 1, 1; 0, 0, 1]))
 
+## Test input validation
 %!error isprime ()
 %!error isprime (1, 2)
+%!error <X contains non-integer entries> isprime (0.5i)
+%!error <X contains non-integer entries> isprime (0.5)
 
--- a/scripts/specfun/lcm.m
+++ b/scripts/specfun/lcm.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,10 +19,11 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Mapping Function} {} lcm (@var{x}, @var{y})
 ## @deftypefnx {Mapping Function} {} lcm (@var{x}, @var{y}, @dots{})
-## Compute the least common multiple of @var{x} and @var{y},
-## or of the list of all arguments.  All elements must be the same size or
-## scalar.
-## @seealso{factor, gcd}
+## Compute the least common multiple of @var{x} and @var{y}, or of the list of
+## all arguments.
+##
+## All elements must be numeric and of the same size or scalar.
+## @seealso{factor, gcd, isprime}
 ## @end deftypefn
 
 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
@@ -31,31 +32,31 @@
 
 function l = lcm (varargin)
 
-  if (nargin > 1)
-    if (common_size (varargin{:}) != 0)
-      error ("lcm: all args must be of the same size or scalar");
-    elseif (! all (cellfun ("isnumeric", varargin)))
-      error ("lcm: all arguments must be numeric");
-    endif
-
-    l = varargin{1};
-    for i = 2:nargin
-      x = varargin{i};
-      msk = l == 0 & x == 0;
-      l .*= x ./ gcd (l, x);
-      l(msk) = 0;
-    endfor
-  else
+  if (nargin < 2)
     print_usage ();
   endif
 
+  if (common_size (varargin{:}) != 0)
+    error ("lcm: all args must be the same size or scalar");
+  elseif (! all (cellfun ("isnumeric", varargin)))
+    error ("lcm: all arguments must be numeric");
+  endif
+
+  l = varargin{1};
+  for i = 2:nargin
+    x = varargin{i};
+    msk = (l == 0 & x == 0);
+    l .*= x ./ gcd (l, x);
+    l(msk) = 0;
+  endfor
+
 endfunction
 
 
 %!assert (lcm (3, 5, 7, 15), 105)
 
-%!error lcm ();
-%!test
-%! s.a = 1;
-%! fail ("lcm (s)");
+%!error lcm ()
+%!error lcm (1)
+%!error <same size or scalar> lcm ([1 2], [1 2 3])
+%!error <arguments must be numeric> lcm ([1 2], {1 2})
 
--- a/scripts/specfun/legendre.m
+++ b/scripts/specfun/legendre.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Kai Habel
+## Copyright (C) 2000-2015 Kai Habel
 ## Copyright (C) 2008 Marco Caliari
 ##
 ## This file is part of Octave.
@@ -21,15 +21,19 @@
 ## @deftypefn  {Function File} {@var{l} =} legendre (@var{n}, @var{x})
 ## @deftypefnx {Function File} {@var{l} =} legendre (@var{n}, @var{x}, @var{normalization})
 ## Compute the Legendre function of degree @var{n} and order
-## @var{m} = 0 @dots{} N@.  The optional argument, @var{normalization},
-## may be one of @qcode{"unnorm"}, @qcode{"sch"}, or @qcode{"norm"}.
-## The default is @qcode{"unnorm"}.  The value of @var{n} must be a
-## non-negative scalar integer.
+## @var{m} = 0 @dots{} @var{n}.
+##
+## The value @var{n} must be a real non-negative integer.  @var{x} is a
+## vector with real-valued elements in the range [-1, 1].
 ##
-## If the optional argument @var{normalization} is missing or is
-## @qcode{"unnorm"}, compute the Legendre function of degree @var{n} and
-## order @var{m} and return all values for @var{m} = 0 @dots{} @var{n}.
-## The return value has one dimension more than @var{x}.
+## The optional argument @var{normalization} may be one of @qcode{"unnorm"},
+## @qcode{"sch"}, or @qcode{"norm"}.  The default if no normalization is given
+## is @qcode{"unnorm"}.
+##
+## When the optional argument @var{normalization} is @qcode{"unnorm"}, compute
+## the Legendre function of degree @var{n} and order @var{m} and return all
+## values for @var{m} = 0 @dots{} @var{n}.  The return value has one dimension
+## more than @var{x}.
 ##
 ## The Legendre Function of degree @var{n} and order @var{m}:
 ##
@@ -42,7 +46,7 @@
 ##
 ## @example
 ## @group
-##  m        m       2  m/2   d^m
+##  m         m      2  m/2   d^m
 ## P(x) = (-1) * (1-x  )    * ----  P(x)
 ##  n                         dx^m   n
 ## @end group
@@ -84,12 +88,12 @@
 ## @end group
 ## @end example
 ##
-## If the optional argument @code{normalization} is @qcode{"sch"},
+## When the optional argument @code{normalization} is @qcode{"sch"},
 ## compute the Schmidt semi-normalized associated Legendre function.
 ## The Schmidt semi-normalized associated Legendre function is related
 ## to the unnormalized Legendre functions by the following:
 ##
-## For Legendre functions of degree n and order 0:
+## For Legendre functions of degree @var{n} and order 0:
 ##
 ## @tex
 ## $$
@@ -127,7 +131,7 @@
 ##
 ## @end ifnottex
 ##
-## If the optional argument @var{normalization} is @qcode{"norm"},
+## When the optional argument @var{normalization} is @qcode{"norm"},
 ## compute the fully normalized associated Legendre function.
 ## The fully normalized associated Legendre function is related
 ## to the unnormalized Legendre functions by the following:
@@ -162,11 +166,9 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || n < 0 || n != fix (n))
-    error ("legendre: N must be a non-negative scalar integer");
-  endif
-
-  if (!isreal (x) || any (x(:) < -1 | x(:) > 1))
+  if (! isreal (n) || ! isscalar (n) || n < 0 || n != fix (n))
+    error ("legendre: N must be a real non-negative integer");
+  elseif (! isreal (x) || any (x(:) < -1 | x(:) > 1))
     error ("legendre: X must be real-valued vector in the range -1 <= X <= 1");
   endif
 
@@ -176,15 +178,17 @@
     normalization = "unnorm";
   endif
 
+  unnorm = false;
   switch (normalization)
+    case "unnorm"
+      scale = 1;
+      unnorm = true;
     case "norm"
       scale = sqrt (n+0.5);
     case "sch"
       scale = sqrt (2);
-    case "unnorm"
-      scale = 1;
     otherwise
-      error ('legendre: expecting NORMALIZATION option to be "norm", "sch", or "unnorm"');
+      error ('legendre: NORMALIZATION option must be "unnorm", "norm", or "sch"');
   endswitch
 
   scale = scale * ones (size (x));
@@ -204,11 +208,11 @@
     for k = m+1:n
       lpm3a = (2*k-1) .* x .* lpm2;
       lpm3b = (k+m-2) .* lpm1;
-      lpm3 = (lpm3a - lpm3b)/(k-m+1);
+      lpm3 = (lpm3a - lpm3b) / (k-m+1);
       lpm1 = lpm2;
       lpm2 = lpm3;
       if (! warned_overflow)
-        if (any (abs (lpm3a) > realmax)
+        if (   any (abs (lpm3a) > realmax)
             || any (abs (lpm3b) > realmax)
             || any (abs (lpm3)  > realmax))
           overflow = true;
@@ -216,24 +220,23 @@
       endif
     endfor
     retval(m,:) = lpm3(:);
-    if (strcmp (normalization, "unnorm"))
-      scale = -scale * (2*m-1);
-    else
-      ## normalization == "sch" or normalization == "norm"
-      scale = scale / sqrt ((n-m+1)*(n+m))*(2*m-1);
+    if (unnorm)
+      scale *= -(2*m-1);
+    else  # normalization = "sch" or "norm"
+      scale *= (2*m-1) / sqrt ((n-m+1)*(n+m));
     endif
-    scale = scale .* sqrt (1-x.^2);
+    scale .*= sqrt (1-x.^2);
   endfor
 
   retval(n+1,:) = scale(:);
 
   if (isvector (x))
-  ## vector case is special
+    ## vector case is special
     retval = reshape (retval, n + 1, length (x));
   endif
 
   if (strcmp (normalization, "sch"))
-    retval(1,:) = retval(1,:) / sqrt (2);
+    retval(1,:) ./= sqrt (2);
   endif
 
   if (overflow && ! warned_overflow)
@@ -289,8 +292,8 @@
 %! assert (result, full (ones (1,11)));
 
 %!test
+%! ## Test matrix input
 %! result = legendre (3, [-1,0,1;1,0,-1]);
-%! ## Test matrix input
 %! expected(:,:,1) = [-1,1;0,0;0,0;0,0];
 %! expected(:,:,2) = [0,0;1.5,1.5;0,0;-15,-15];
 %! expected(:,:,3) = [1,-1;0,0;0,0;0,0];
@@ -302,15 +305,16 @@
 %! expected(:,:,2) = [1,0,-1;0,1.5,0;0,0,0;0,-15,0];
 %! assert (result, expected);
 
-%% Check correct invocation
+## Test input validation
 %!error legendre ()
 %!error legendre (1)
 %!error legendre (1,2,3,4)
-%!error legendre ([1, 2], [-1, 0, 1])
-%!error legendre (-1, [-1, 0, 1])
-%!error legendre (1.1, [-1, 0, 1])
-%!error legendre (1, [-1+i, 0, 1])
-%!error legendre (1, [-2, 0, 1])
-%!error legendre (1, [-1, 0, 2])
-%!error legendre (1, [-1, 0, 1], "badnorm")
+%!error <must be a real non-negative integer> legendre (i, [-1, 0, 1])
+%!error <must be a real non-negative integer> legendre ([1, 2], [-1, 0, 1])
+%!error <must be a real non-negative integer> legendre (-1, [-1, 0, 1])
+%!error <must be a real non-negative integer> legendre (1.1, [-1, 0, 1])
+%!error <must be real-valued vector> legendre (1, [-1+i, 0, 1])
+%!error <in the range -1 .= X .= 1> legendre (1, [-2, 0, 1])
+%!error <in the range -1 .= X .= 1> legendre (1, [-1, 0, 2])
+%!error <NORMALIZATION option must be> legendre (1, [-1, 0, 1], "badnorm")
 
--- a/scripts/specfun/nchoosek.m
+++ b/scripts/specfun/nchoosek.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Rolf Fabian and Paul Kienzle
+## Copyright (C) 2001-2015 Rolf Fabian and Paul Kienzle
 ## Copyright (C) 2008 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -21,7 +21,8 @@
 ## @deftypefn  {Function File} {@var{c} =} nchoosek (@var{n}, @var{k})
 ## @deftypefnx {Function File} {@var{c} =} nchoosek (@var{set}, @var{k})
 ##
-## Compute the binomial coefficient or all combinations of a set of items.
+## Compute the binomial coefficient of @var{n} or list all possible
+## combinations of a @var{set} of items.
 ##
 ## If @var{n} is a scalar then calculate the binomial coefficient
 ## of @var{n} and @var{k} which is defined as
@@ -75,10 +76,10 @@
 ## @end group
 ## @end example
 ##
-## @code{nchoosek} works only for non-negative, integer arguments.  Use
-## @code{bincoeff} for non-integer and negative scalar arguments, or for
-## computing many binomial coefficients at once with vector inputs
-## for @var{n} or @var{k}.
+## Programming Note: When calculating the binomial coefficient @code{nchoosek}
+## works only for non-negative, integer arguments.  Use @code{bincoeff} for
+## non-integer and negative scalar arguments, or for computing many binomial
+## coefficients at once with vector inputs for @var{n} or @var{k}.
 ##
 ## @seealso{bincoeff, perms}
 ## @end deftypefn
@@ -87,16 +88,17 @@
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
 ## Author: Jaroslav Hajek
 
-function A = nchoosek (v, k)
+function C = nchoosek (v, k)
 
   if (nargin != 2
-      || !isnumeric (k) || !isnumeric (v)
-      || !isscalar (k) || ! (isscalar (v) || isvector (v)))
+      || ! (isreal (k) && isscalar (k))
+      || ! (isnumeric (v) && isvector (v)))
     print_usage ();
   endif
-  if (k < 0 || k != fix (k)
-      || (isscalar (v) && (v < k || v < 0 || v != fix (v))))
-    error ("nchoosek: args are non-negative integers with V not less than K");
+  if (k < 0 || k != fix (k))
+    error ("nchoosek: K must be an integer >= 0");
+  elseif (isscalar (v) && (iscomplex (v) || v < k || v < 0 || v != fix (v)))
+    error ("nchoosek: N must be a non-negative integer >= K");
   endif
 
   n = length (v);
@@ -104,54 +106,60 @@
   if (n == 1)
     ## Improve precision at next step.
     k = min (k, v-k);
-    A = round (prod ((v-k+1:v)./(1:k)));
-    if (A*2*k*eps >= 0.5)
-      warning ("nchoosek", "nchoosek: possible loss of precision");
+    C = round (prod ((v-k+1:v)./(1:k)));
+    if (C*2*k*eps >= 0.5)
+      warning ("nchoosek: possible loss of precision");
     endif
   elseif (k == 0)
-    A = [];
+    C = zeros (1,0);
   elseif (k == 1)
-    A = v(:);
+    C = v(:);
   elseif (k == n)
-    A = v(:).';
+    C = v(:).';
   elseif (k > n)
-    A = zeros (0, k, class (v));
+    C = zeros (0, k, class (v));
   elseif (k == 2)
     ## Can do it without transpose.
     x = repelems (v(1:n-1), [1:n-1; n-1:-1:1]).';
     y = cat (1, cellslices (v(:), 2:n, n*ones (1, n-1)){:});
-    A = [x, y];
+    C = [x, y];
   elseif (k < n)
     v = v(:).';
-    A = v(k:n);
+    C = v(k:n);
     l = 1:n-k+1;
     for j = 2:k
-      c = columns (A);
-      cA = cellslices (A, l, c*ones (1, n-k+1), 2);
+      c = columns (C);
+      cA = cellslices (C, l, c*ones (1, n-k+1), 2);
       l = c-l+1;
       b = repelems (v(k-j+1:n-j+1), [1:n-k+1; l]);
-      A = [b; cA{:}];
+      C = [b; cA{:}];
       l = cumsum (l);
       l = [1, 1 + l(1:n-k)];
     endfor
-    clear cA b;
-    A = A.';
+    C = C.';
   endif
+
 endfunction
 
 
 %!assert (nchoosek (80,10), bincoeff (80,10))
 %!assert (nchoosek (1:5,3), [1:3;1,2,4;1,2,5;1,3,4;1,3,5;1,4,5;2:4;2,3,5;2,4,5;3:5])
+%!assert (size (nchoosek (1:5,0)), [1 0])
 
-%% Test input validation
-%!warning nchoosek (100,45);
+## Test input validation
+%!error nchoosek ()
+%!error nchoosek (1)
+%!error nchoosek (1,2,3)
+
+%!error nchoosek (100, 2i)
+%!error nchoosek (100, [2 3])
 %!error nchoosek ("100", 45)
-%!error nchoosek (100, "45")
-%!error nchoosek (100, ones (2,2))
-%!error nchoosek (repmat (100, [2 2]), 45)
-%!error nchoosek (100, -45)
-%!error nchoosek (100, 45.5)
-%!error nchoosek (100, 145)
-%!error nchoosek (-100, 45)
-%!error nchoosek (100.5, 45)
+%!error nchoosek (100*ones (2, 2), 45)
+%!error <K must be an integer .= 0> nchoosek (100, -45)
+%!error <K must be an integer .= 0> nchoosek (100, 45.5)
+%!error <N must be a non-negative integer .= K> nchoosek (100i, 2)
+%!error <N must be a non-negative integer .= K> nchoosek (100, 145)
+%!error <N must be a non-negative integer .= K> nchoosek (-100, 45)
+%!error <N must be a non-negative integer .= K> nchoosek (100.5, 45)
+%!warning <possible loss of precision> nchoosek (100, 45);
 
--- a/scripts/specfun/nthroot.m
+++ b/scripts/specfun/nthroot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ## Copyright (C) 2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -23,8 +23,13 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} nthroot (@var{x}, @var{n})
 ##
-## Compute the n-th root of @var{x}, returning real results for real
-## components of @var{x}.  For example:
+## Compute the real (non-complex) @var{n}-th root of @var{x}.
+##
+## @var{x} must have all real entries and @var{n} must be a scalar.
+## If @var{n} is an even integer and @var{x} has negative entries then
+## @code{nthroot} aborts and issues an error.
+##
+## Example:
 ##
 ## @example
 ## @group
@@ -34,10 +39,6 @@
 ## @result{} 0.50000 - 0.86603i
 ## @end group
 ## @end example
-##
-## @var{x} must have all real entries.  @var{n} must be a scalar.
-## If @var{n} is an even integer and @var{X} has negative entries, an
-## error is produced.
 ## @seealso{realsqrt, sqrt, cbrt}
 ## @end deftypefn
 
@@ -47,12 +48,12 @@
     print_usage ();
   endif
 
-  if (any (iscomplex (x(:))))
+  if (iscomplex (x))
     error ("nthroot: X must not contain complex values");
   endif
 
-  if (! isscalar (n) || n == 0)
-    error ("nthroot: N must be a nonzero scalar");
+  if (! isreal (n) || ! isscalar (n) || n == 0)
+    error ("nthroot: N must be a real nonzero scalar");
   endif
 
   if (n == 3)
@@ -63,37 +64,48 @@
     y = 1 ./ nthroot (x, -n);
   else
     ## Compute using power.
-    if (n == fix (n) && mod (n, 2) == 1)
+    integer_n = n == fix (n);
+    if (integer_n && mod (n, 2) == 1)
       y = abs (x) .^ (1/n) .* sign (x);
     elseif (any (x(:) < 0))
-      error ("nthroot: if X contains negative values, N must be an odd integer");
+      error ("nthroot: N must be an odd integer if X contains negative values");
     else
       y = x .^ (1/n);
     endif
 
-    if (finite (n) && n > 0 && n == fix (n))
-      ## Correction.
-      y = ((n-1)*y + x ./ (y.^(n-1))) / n;
-      y = merge (finite (y), y, x);
+    if (integer_n && n > 0 && isfinite (n))
+      if (isscalar (y) && y == 0)
+        ## Don't apply correction which leads to division by zero (bug #43492)
+      else
+        ## FIXME: What is this correction for?
+        y = ((n-1)*y + x ./ (y.^(n-1))) / n;
+        y = merge (isfinite (y), y, x);
+      endif
     endif
-
   endif
 
 endfunction
 
 
-%!assert (nthroot (-32,5), -2);
-%!assert (nthroot (81,4), 3);
-%!assert (nthroot (Inf,4), Inf);
-%!assert (nthroot (-Inf,7), -Inf);
-%!assert (nthroot (-Inf,-7), 0);
+%!assert (nthroot (-32, 5), -2)
+%!assert (nthroot (81, 4), 3)
+%!assert (nthroot (Inf, 4), Inf)
+%!assert (nthroot (-Inf, 7), -Inf)
+%!assert (nthroot (-Inf, -7), 0)
 
-%% Test input validation
-%!error (nthroot ())
-%!error (nthroot (1))
-%!error (nthroot (1,2,3))
-%!error (nthroot (1+j,2))
-%!error (nthroot (1,[1 2]))
-%!error (nthroot (1,0))
-%!error (nthroot (-1,2))
+## Bug #43492.  This should not generate a division by zero warning
+%!test
+%! warnmsg = lastwarn ();
+%! assert (nthroot (0, 2), 0);
+%! assert (lastwarn (), warnmsg);
 
+## Test input validation
+%!error nthroot ()
+%!error nthroot (1)
+%!error nthroot (1,2,3)
+%!error <X must not contain complex values> nthroot (1+j, 2)
+%!error <N must be a real nonzero scalar> nthroot (1, i)
+%!error <N must be a real nonzero scalar> nthroot (1, [1 2])
+%!error <N must be a real nonzero scalar> nthroot (1, 0)
+%!error <N must be an odd integer> nthroot (-1, 2)
+
--- a/scripts/specfun/perms.m
+++ b/scripts/specfun/perms.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2013 Paul Kienzle
+## Copyright (C) 2001-2015 Paul Kienzle
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -19,15 +19,17 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} perms (@var{v})
+## Generate all permutations of @var{v} with one row per permutation.
 ##
-## Generate all permutations of @var{v}, one row per permutation.  The
-## result has size @code{factorial (@var{n}) * @var{n}}, where @var{n}
+## The result has size @code{factorial (@var{n}) * @var{n}}, where @var{n}
 ## is the length of @var{v}.
 ##
-## As an example, @code{perms ([1, 2, 3])} returns the matrix
+## Example
 ##
 ## @example
 ## @group
+## perms ([1, 2, 3])
+## @result{}
 ##   1   2   3
 ##   2   1   3
 ##   1   3   2
@@ -36,12 +38,18 @@
 ##   3   2   1
 ## @end group
 ## @end example
+##
+## Programming Note: The maximum length of @var{v} should be less than or
+## equal to 10 to limit memory consumption.
+## @seealso{permute, randperm, nchoosek}
 ## @end deftypefn
 
 function A = perms (v)
+
   if (nargin != 1)
     print_usage ();
   endif
+
   vidx = uint8 ([1:length(v)]');
   n = length (vidx);
 
@@ -62,7 +70,9 @@
       endfor
     endfor
   endif
+
   A = v(p);
+
 endfunction
 
 
--- a/scripts/specfun/pow2.m
+++ b/scripts/specfun/pow2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -17,9 +17,9 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Mapping Function} {} pow2 (@var{x})
-## @deftypefnx {Mapping Function} {} pow2 (@var{f}, @var{e})
-## With one argument, computes
+## @deftypefn  {Function File} {} pow2 (@var{x})
+## @deftypefnx {Function File} {} pow2 (@var{f}, @var{e})
+## With one input argument, compute
 ## @tex
 ## $2^x$
 ## @end tex
@@ -28,14 +28,14 @@
 ## @end ifnottex
 ## for each element of @var{x}.
 ##
-## With two arguments, returns
+## With two input arguments, return
 ## @tex
 ## $f \cdot 2^e$.
 ## @end tex
 ## @ifnottex
 ## f .* (2 .^ e).
 ## @end ifnottex
-## @seealso{log2, nextpow2}
+## @seealso{log2, nextpow2, power}
 ## @end deftypefn
 
 ## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at>
@@ -67,4 +67,5 @@
 %! assert (pow2 (x,y), z, sqrt (eps));
 
 %!error pow2 ()
+%!error pow2 (1,2,3)
 
--- a/scripts/specfun/primes.m
+++ b/scripts/specfun/primes.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -18,12 +18,13 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} primes (@var{n})
-##
 ## Return all primes up to @var{n}.
 ##
-## The algorithm used is the Sieve of Eratosthenes.
+## The output data class (double, single, uint32, etc.) is the same as
+## the input class of @var{n}.  The algorithm used is the Sieve of
+## Eratosthenes.
 ##
-## Note that if you need a specific number of primes you can use the
+## Notes: If you need a specific number of primes you can use the
 ## fact that the distance from one prime to the next is, on average,
 ## proportional to the logarithm of the prime.  Integrating, one finds
 ## that there are about @math{k} primes less than
@@ -33,6 +34,9 @@
 ## @ifnottex
 ## k*log (5*k).
 ## @end ifnottex
+##
+## See also @code{list_primes} if you need a specific number @var{n} of
+## primes.
 ## @seealso{list_primes, isprime}
 ## @end deftypefn
 
@@ -40,7 +44,7 @@
 ## Author: Francesco Potortì
 ## Author: Dirk Laurie
 
-function x = primes (n)
+function p = primes (n)
 
   if (nargin != 1)
     print_usage ();
@@ -50,9 +54,9 @@
     error ("primes: N must be a scalar");
   endif
 
-  if (n > 100000)
+  if (n > 100e3)
     ## Optimization: 1/6 less memory, and much faster (asymptotically)
-    ## 100000 happens to be the cross-over point for Paul's machine;
+    ## 100K happens to be the cross-over point for Paul's machine;
     ## below this the more direct code below is faster.  At the limit
     ## of memory in Paul's machine, this saves .7 seconds out of 7 for
     ## n = 3e6.  Hardly worthwhile, but Dirk reports better numbers.
@@ -71,8 +75,8 @@
         sievem(5*i+1:6*i+1:lenm) = false;
       endif
     endfor
-    x = sort ([2, 3, 6*find(sievem)-1, 6*find(sievep)+1]);
-  elseif (n > 352)                # nothing magical about 352; must be >2
+    p = sort ([2, 3, 6*find(sievem)-1, 6*find(sievep)+1]);
+  elseif (n > 352)                # nothing magical about 352; must be > 2
     len = floor ((n-1)/2);        # length of the sieve
     sieve = true (1, len);        # assume every odd number is prime
     for i = 1:(sqrt (n)-1)/2      # check up to sqrt (n)
@@ -80,7 +84,7 @@
         sieve(3*i+1:2*i+1:len) = false; # do it
       endif
     endfor
-    x = [2, 1+2*find(sieve)];     # primes remaining after sieve
+    p = [2, 1+2*find(sieve)];     # primes remaining after sieve
   else
     a = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, ...
          53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, ...
@@ -88,7 +92,11 @@
          173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, ...
          233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, ...
          293, 307, 311, 313, 317, 331, 337, 347, 349];
-    x = a(a <= n);
+    p = a(a <= n);
+  endif
+
+  if (! isa (n, "double"))
+    cast (p, class (n));
   endif
 
 endfunction
@@ -99,4 +107,5 @@
 
 %!error primes ()
 %!error primes (1, 2)
+%!error <N must be a scalar> primes (ones (2,2))
 
--- a/scripts/specfun/reallog.m
+++ b/scripts/specfun/reallog.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -18,12 +18,15 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} reallog (@var{x})
-## Return the real-valued natural logarithm of each element of @var{x}.  Report
-## an error if any element results in a complex return value.
+## Return the real-valued natural logarithm of each element of @var{x}.
+##
+## If any element results in a complex return value @code{reallog} aborts
+## and issues an error.
 ## @seealso{log, realpow, realsqrt}
 ## @end deftypefn
 
 function y = reallog (x)
+
   if (nargin != 1)
     print_usage ();
   elseif (iscomplex (x) || any (x(:) < 0))
@@ -31,13 +34,17 @@
   else
     y = log (x);
   endif
+
 endfunction
 
 
-%!assert (log (1:5), reallog (1:5))
+%!assert (reallog (1:5), log (1:5))
 %!test
-%! x = rand (10,10);
-%! assert (log (x),reallog (x));
+%! x = rand (10, 10);
+%! assert (reallog (x), log (x));
 
+%!error reallog ()
+%!error reallog (1,2)
+%!error <produced complex result> reallog (2i)
 %!error <produced complex result> reallog (-1)
 
--- a/scripts/specfun/realpow.m
+++ b/scripts/specfun/realpow.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -18,31 +18,37 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} realpow (@var{x}, @var{y})
-## Compute the real-valued, element-by-element power operator.  This is
-## equivalent to @w{@code{@var{x} .^ @var{y}}}, except that @code{realpow}
-## reports an error if any return value is complex.
-## @seealso{reallog, realsqrt}
+## Compute the real-valued, element-by-element power operator.
+##
+## This is equivalent to @w{@code{@var{x} .^ @var{y}}}, except that
+## @code{realpow} reports an error if any return value is complex.
+## @seealso{power, reallog, realsqrt}
 ## @end deftypefn
 
 function z = realpow (x, y)
+
   if (nargin != 2)
     print_usage ();
-  else
-    z = x .^ y;
-    if (iscomplex (z))
-      error ("realpow: produced complex result");
-    endif
   endif
+
+  z = x .^ y;
+  if (iscomplex (z))
+    error ("realpow: produced complex result");
+  endif
+
 endfunction
 
 
-%!assert (power (1:10, 0.5:0.5:5), realpow (1:10, 0.5:0.5:5))
-%!assert ([1:10] .^ [0.5:0.5:5], realpow (1:10, 0.5:0.5:5))
+%!assert (realpow (1:10, 0.5:0.5:5), power (1:10, 0.5:0.5:5))
+%!assert (realpow (1:10, 0.5:0.5:5), [1:10] .^ [0.5:0.5:5])
 %!test
-%! x = rand (10,10);
-%! y = randn (10,10);
+%! x = rand (10, 10);
+%! y = randn (10, 10);
 %! assert (x.^y, realpow (x,y));
 %!assert (realpow (1i,2), -1)
 
+%!error realpow ()
+%!error realpow (1)
+%!error realpow (1,2,3)
 %!error <produced complex result> realpow (-1, 1/2)
 
--- a/scripts/specfun/realsqrt.m
+++ b/scripts/specfun/realsqrt.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -18,12 +18,15 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} realsqrt (@var{x})
-## Return the real-valued square root of each element of @var{x}.  Report an
-## error if any element results in a complex return value.
+## Return the real-valued square root of each element of @var{x}.
+##
+## If any element results in a complex return value @code{realsqrt} aborts
+## and issues an error.
 ## @seealso{sqrt, realpow, reallog}
 ## @end deftypefn
 
 function y = realsqrt (x)
+
   if (nargin != 1)
     print_usage ();
   elseif (iscomplex (x) || any (x(:) < 0))
@@ -31,13 +34,16 @@
   else
     y = sqrt (x);
   endif
+
 endfunction
 
 
-%!assert (sqrt (1:5), realsqrt (1:5))
+%!assert (realsqrt (1:5), sqrt (1:5))
 %!test
-%! x = rand (10,10);
-%! assert (sqrt (x), realsqrt (x));
+%! x = rand (10, 10);
+%! assert (realsqrt (x), sqrt (x));
 
+%!error realsqrt ()
+%!error realsqrt (1,2)
 %!error <produced complex result> realsqrt (-1)
 
--- a/scripts/special-matrix/gallery.m
+++ b/scripts/special-matrix/gallery.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 1989-1995 Nicholas .J. Higham
-## Copyright (C) 2013 Carnë Draug
+## Copyright (C) 2013-2015 Carnë Draug
 ##
 ## This file is part of Octave.
 ##
@@ -83,7 +83,7 @@
 ## @deftypefn  {Function File} {[@var{c}, @var{d}, @var{e}] =} gallery ("dorr", @var{n})
 ## @deftypefnx {Function File} {[@var{c}, @var{d}, @var{e}] =} gallery ("dorr", @var{n}, @var{theta})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("dorr", @dots{})
-## Create a diagonally dominant, ill conditioned, tridiagonal matrix.
+## Create a diagonally dominant, ill-conditioned, tridiagonal matrix.
 ##
 ## @end deftypefn
 ##
@@ -94,20 +94,20 @@
 ## @end deftypefn
 ##
 ## @deftypefn {Function File} {@var{a} =} gallery ("fiedler", @var{c})
-## Create a symmetric Fiedler matrix.
+## Create a symmetric @nospell{Fiedler} matrix.
 ##
 ## @end deftypefn
 ##
 ## @deftypefn  {Function File} {@var{a} =} gallery ("forsythe", @var{n})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("forsythe", @var{n}, @var{alpha})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("forsythe", @var{n}, @var{alpha}, @var{lambda})
-## Create a Forsythe matrix (a perturbed Jordan block).
+## Create a @nospell{Forsythe} matrix (a perturbed Jordan block).
 ##
 ## @end deftypefn
 ##
 ## @deftypefn  {Function File} {@var{f} =} gallery ("frank", @var{n})
 ## @deftypefnx {Function File} {@var{f} =} gallery ("frank", @var{n}, @var{k})
-## Create a Frank matrix (ill conditioned eigenvalues).
+## Create a Frank matrix (ill-conditioned eigenvalues).
 ##
 ## @end deftypefn
 ##
@@ -194,13 +194,13 @@
 ## @deftypefn  {Function File} {@var{u} =} gallery ("kahan", @var{n})
 ## @deftypefnx {Function File} {@var{u} =} gallery ("kahan", @var{n}, @var{theta})
 ## @deftypefnx {Function File} {@var{u} =} gallery ("kahan", @var{n}, @var{theta}, @var{pert})
-## Create a Kahan matrix (upper trapezoidal).
+## Create a @nospell{Kahan} matrix (upper trapezoidal).
 ##
 ## @end deftypefn
 ##
 ## @deftypefn  {Function File} {@var{a} =} gallery ("kms", @var{n})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("kms", @var{n}, @var{rho})
-## Create a Kac-Murdock-Szego Toeplitz matrix.
+## Create a @nospell{Kac-Murdock-Szego} Toeplitz matrix.
 ##
 ## @end deftypefn
 ##
@@ -213,12 +213,12 @@
 ##
 ## @deftypefn  {Function File} {@var{a} =} gallery ("lauchli", @var{n})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("lauchli", @var{n}, @var{mu})
-## Create a Lauchli matrix (rectangular).
+## Create a @nospell{Lauchli} matrix (rectangular).
 ##
 ## @end deftypefn
 ##
 ## @deftypefn {Function File} {@var{a} =} gallery ("lehmer", @var{n})
-## Create a Lehmer matrix (symmetric positive definite).
+## Create a @nospell{Lehmer} matrix (symmetric positive definite).
 ##
 ## @end deftypefn
 ##
@@ -228,7 +228,7 @@
 ## @end deftypefn
 ##
 ## @deftypefn {Function File} {@var{a} =} gallery ("lotkin", @var{n})
-## Create a Lotkin matrix.
+## Create a @nospell{Lotkin} matrix.
 ##
 ## @end deftypefn
 ##
@@ -239,7 +239,7 @@
 ##
 ## @deftypefn  {Function File} {@var{a} =} gallery ("moler", @var{n})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("moler", @var{n}, @var{alpha})
-## Create a Moler matrix (symmetric positive definite).
+## Create a @nospell{Moler} matrix (symmetric positive definite).
 ##
 ## @end deftypefn
 ##
@@ -274,7 +274,8 @@
 ## @end deftypefn
 ##
 ## @deftypefn {Function File} {@var{a} =} gallery ("parter", @var{n})
-## Create a Parter matrix (a Toeplitz matrix with singular values near pi).
+## Create a @nospell{Parter} matrix (a Toeplitz matrix with singular values
+## near pi).
 ##
 ## @end deftypefn
 ##
@@ -316,8 +317,8 @@
 ## @end deftypefn
 ##
 ## @deftypefn {Function File} {@var{a} =} gallery ("redheff", @var{n})
-## Create a zero and ones matrix of Redheffer associated with the Riemann
-## hypothesis.
+## Create a zero and ones matrix of @nospell{Redheffer} associated with the
+## Riemann hypothesis.
 ##
 ## @end deftypefn
 ##
@@ -365,7 +366,8 @@
 ## @deftypefn  {Function File} {@var{t} =} gallery ("triw", @var{n})
 ## @deftypefnx {Function File} {@var{t} =} gallery ("triw", @var{n}, @var{alpha})
 ## @deftypefnx {Function File} {@var{t} =} gallery ("triw", @var{n}, @var{alpha}, @var{k})
-## Create an upper triangular matrix discussed by Kahan, Golub and Wilkinson.
+## Create an upper triangular matrix discussed by
+## @nospell{Kahan, Golub, and Wilkinson}.
 ##
 ## @end deftypefn
 ##
@@ -390,7 +392,7 @@
 ##
 ## @deftypefn  {Function File} {@var{a} =} gallery ("wathen", @var{nx}, @var{ny})
 ## @deftypefnx {Function File} {@var{a} =} gallery ("wathen", @var{nx}, @var{ny}, @var{k})
-## Create the Wathen matrix.
+## Create the @nospell{Wathen} matrix.
 ##
 ## @end deftypefn
 ##
@@ -503,26 +505,26 @@
 
 function C = cauchy (x, y)
   ##CAUCHY  Cauchy matrix.
-  ##        C = CAUCHY(X, Y), where X, Y are N-vectors, is the N-by-N matrix
-  ##        with C(i,j) = 1/(X(i)+Y(j)).   By default, Y = X.
-  ##        Special case: if X is a scalar CAUCHY(X) is the same as CAUCHY(1:X).
-  ##        Explicit formulas are known for DET(C) (which is nonzero if X and Y
-  ##        both have distinct elements) and the elements of INV(C).
-  ##        C is totally positive if 0 < X(1) < ... < X(N) and
-  ##        0 < Y(1) < ... < Y(N).
+  ##  C = CAUCHY(X, Y), where X, Y are N-vectors, is the N-by-N matrix
+  ##  with C(i,j) = 1/(X(i)+Y(j)).   By default, Y = X.
+  ##  Special case: if X is a scalar CAUCHY(X) is the same as CAUCHY(1:X).
+  ##  Explicit formulas are known for DET(C) (which is nonzero if X and Y
+  ##  both have distinct elements) and the elements of INV(C).
+  ##  C is totally positive if 0 < X(1) < ... < X(N) and
+  ##  0 < Y(1) < ... < Y(N).
   ##
-  ##        References:
-  ##        N.J. Higham, Accuracy and Stability of Numerical Algorithms,
-  ##          Society for Industrial and Applied Mathematics, Philadelphia, PA,
-  ##          USA, 1996; sec. 26.1.
-  ##        D.E. Knuth, The Art of Computer Programming, Volume 1,
-  ##          Fundamental Algorithms, second edition, Addison-Wesley, Reading,
-  ##          Massachusetts, 1973, p. 36.
-  ##        E.E. Tyrtyshnikov, Cauchy-Toeplitz matrices and some applications,
-  ##          Linear Algebra and Appl., 149 (1991), pp. 1-18.
-  ##          O. Taussky and M. Marcus, Eigenvalues of finite matrices, in
-  ##          Survey of Numerical Analysis, J. Todd, ed., McGraw-Hill, New York,
-  ##          pp. 279-313, 1962. (States the totally positive property on p. 295.)
+  ##  References:
+  ##  N.J. Higham, Accuracy and Stability of Numerical Algorithms,
+  ##    Society for Industrial and Applied Mathematics, Philadelphia, PA,
+  ##    USA, 1996; sec. 26.1.
+  ##  D.E. Knuth, The Art of Computer Programming, Volume 1,
+  ##    Fundamental Algorithms, second edition, Addison-Wesley, Reading,
+  ##    Massachusetts, 1973, p. 36.
+  ##  E.E. Tyrtyshnikov, Cauchy-Toeplitz matrices and some applications,
+  ##    Linear Algebra and Appl., 149 (1991), pp. 1-18.
+  ##    O. Taussky and M. Marcus, Eigenvalues of finite matrices, in
+  ##    Survey of Numerical Analysis, J. Todd, ed., McGraw-Hill, New York,
+  ##    pp. 279-313, 1962. (States the totally positive property on p. 295.)
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for cauchy matrix.");
@@ -559,23 +561,23 @@
 
 function C = chebspec (n, k = 0)
   ## CHEBSPEC  Chebyshev spectral differentiation matrix.
-  ##           C = CHEBSPEC(N, K) is a Chebyshev spectral differentiation
-  ##           matrix of order N.  K = 0 (the default) or 1.
-  ##           For K = 0 (`no boundary conditions'), C is nilpotent, with
-  ##               C^N = 0 and it has the null vector ONES(N,1).
-  ##               C is similar to a Jordan block of size N with eigenvalue zero.
-  ##           For K = 1, C is nonsingular and well-conditioned, and its eigenvalues
-  ##               have negative real parts.
-  ##           For both K, the computed eigenvector matrix X from EIG is
-  ##               ill-conditioned (MESH(REAL(X)) is interesting).
+  ##   C = CHEBSPEC(N, K) is a Chebyshev spectral differentiation
+  ##   matrix of order N.  K = 0 (the default) or 1.
+  ##   For K = 0 (`no boundary conditions'), C is nilpotent, with
+  ##       C^N = 0 and it has the null vector ONES(N,1).
+  ##       C is similar to a Jordan block of size N with eigenvalue zero.
+  ##   For K = 1, C is nonsingular and well-conditioned, and its eigenvalues
+  ##       have negative real parts.
+  ##   For both K, the computed eigenvector matrix X from EIG is
+  ##       ill-conditioned (MESH(REAL(X)) is interesting).
   ##
-  ##           References:
-  ##           C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zang, Spectral
-  ##              Methods in Fluid Dynamics, Springer-Verlag, Berlin, 1988; p. 69.
-  ##           L.N. Trefethen and M.R. Trummer, An instability phenomenon in
-  ##              spectral methods, SIAM J. Numer. Anal., 24 (1987), pp. 1008-1023.
-  ##           D. Funaro, Computing the inverse of the Chebyshev collocation
-  ##              derivative, SIAM J. Sci. Stat. Comput., 9 (1988), pp. 1050-1057.
+  ##   References:
+  ##   C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zang, Spectral
+  ##      Methods in Fluid Dynamics, Springer-Verlag, Berlin, 1988; p. 69.
+  ##   L.N. Trefethen and M.R. Trummer, An instability phenomenon in
+  ##      spectral methods, SIAM J. Numer. Anal., 24 (1987), pp. 1008-1023.
+  ##   D. Funaro, Computing the inverse of the Chebyshev collocation
+  ##      derivative, SIAM J. Sci. Stat. Comput., 9 (1988), pp. 1050-1057.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for chebspec matrix.");
@@ -626,18 +628,18 @@
 
 function C = chebvand (m, p)
   ## CHEBVAND Vandermonde-like matrix for the Chebyshev polynomials.
-  ##          C = CHEBVAND(P), where P is a vector, produces the (primal)
-  ##          Chebyshev Vandermonde matrix based on the points P,
-  ##          i.e., C(i,j) = T_{i-1}(P(j)), where T_{i-1} is the Chebyshev
-  ##          polynomial of degree i-1.
-  ##          CHEBVAND(M,P) is a rectangular version of CHEBVAND(P) with M rows.
-  ##          Special case: If P is a scalar then P equally spaced points on
-  ##                        [0,1] are used.
+  ##   C = CHEBVAND(P), where P is a vector, produces the (primal)
+  ##   Chebyshev Vandermonde matrix based on the points P,
+  ##   i.e., C(i,j) = T_{i-1}(P(j)), where T_{i-1} is the Chebyshev
+  ##   polynomial of degree i-1.
+  ##   CHEBVAND(M,P) is a rectangular version of CHEBVAND(P) with M rows.
+  ##   Special case: If P is a scalar then P equally spaced points on
+  ##                 [0,1] are used.
   ##
-  ##          Reference:
-  ##          N.J. Higham, Stability analysis of algorithms for solving confluent
-  ##            Vandermonde-like systems, SIAM J. Matrix Anal. Appl., 11 (1990),
-  ##            pp. 23-41.
+  ##   Reference:
+  ##   N.J. Higham, Stability analysis of algorithms for solving confluent
+  ##     Vandermonde-like systems, SIAM J. Matrix Anal. Appl., 11 (1990),
+  ##     pp. 23-41.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for chebvand matrix.");
@@ -678,17 +680,17 @@
 
 function A = chow (n, alpha = 1, delta = 0)
   ## CHOW    Chow matrix - a singular Toeplitz lower Hessenberg matrix.
-  ##         A = CHOW(N, ALPHA, DELTA) is a Toeplitz lower Hessenberg matrix
-  ##         A = H(ALPHA) + DELTA*EYE, where H(i,j) = ALPHA^(i-j+1).
-  ##         H(ALPHA) has p = FLOOR(N/2) zero eigenvalues, the rest being
-  ##         4*ALPHA*COS( k*PI/(N+2) )^2, k=1:N-p.
-  ##         Defaults: ALPHA = 1, DELTA = 0.
+  ##   A = CHOW(N, ALPHA, DELTA) is a Toeplitz lower Hessenberg matrix
+  ##   A = H(ALPHA) + DELTA*EYE, where H(i,j) = ALPHA^(i-j+1).
+  ##   H(ALPHA) has p = FLOOR(N/2) zero eigenvalues, the rest being
+  ##   4*ALPHA*COS( k*PI/(N+2) )^2, k=1:N-p.
+  ##   Defaults: ALPHA = 1, DELTA = 0.
   ##
-  ##         References:
-  ##         T.S. Chow, A class of Hessenberg matrices with known
-  ##            eigenvalues and inverses, SIAM Review, 11 (1969), pp. 391-395.
-  ##         G. Fairweather, On the eigenvalues and eigenvectors of a class of
-  ##            Hessenberg matrices, SIAM Review, 13 (1971), pp. 220-221.
+  ##   References:
+  ##   T.S. Chow, A class of Hessenberg matrices with known
+  ##      eigenvalues and inverses, SIAM Review, 11 (1969), pp. 391-395.
+  ##   G. Fairweather, On the eigenvalues and eigenvectors of a class of
+  ##      Hessenberg matrices, SIAM Review, 13 (1971), pp. 220-221.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for chow matrix.");
@@ -705,18 +707,18 @@
 
 function C = circul (v)
   ## CIRCUL  Circulant matrix.
-  ##         C = CIRCUL(V) is the circulant matrix whose first row is V.
-  ##         (A circulant matrix has the property that each row is obtained
-  ##         from the previous one by cyclically permuting the entries one step
-  ##         forward; it is a special Toeplitz matrix in which the diagonals
-  ##         `wrap round'.)
-  ##         Special case: if V is a scalar then C = CIRCUL(1:V).
-  ##         The eigensystem of C (N-by-N) is known explicitly.   If t is an Nth
-  ##         root of unity, then the inner product of V with W = [1 t t^2 ... t^N]
-  ##         is an eigenvalue of C, and W(N:-1:1) is an eigenvector of C.
+  ##   C = CIRCUL(V) is the circulant matrix whose first row is V.
+  ##   (A circulant matrix has the property that each row is obtained
+  ##   from the previous one by cyclically permuting the entries one step
+  ##   forward; it is a special Toeplitz matrix in which the diagonals
+  ##   `wrap round'.)
+  ##   Special case: if V is a scalar then C = CIRCUL(1:V).
+  ##   The eigensystem of C (N-by-N) is known explicitly.   If t is an Nth
+  ##   root of unity, then the inner product of V with W = [1 t t^2 ... t^N]
+  ##   is an eigenvalue of C, and W(N:-1:1) is an eigenvector of C.
   ##
-  ##         Reference:
-  ##         P.J. Davis, Circulant Matrices, John Wiley, 1977.
+  ##   Reference:
+  ##   P.J. Davis, Circulant Matrices, John Wiley, 1977.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for circul matrix.");
@@ -740,28 +742,28 @@
 
 function A = clement (n, k = 0)
   ## CLEMENT   Clement matrix - tridiagonal with zero diagonal entries.
-  ##           CLEMENT(N, K) is a tridiagonal matrix with zero diagonal entries
-  ##           and known eigenvalues.  It is singular if N is odd.  About 64
-  ##           percent of the entries of the inverse are zero.  The eigenvalues
-  ##           are plus and minus the numbers N-1, N-3, N-5, ..., (1 or 0).
-  ##           For K = 0 (the default) the matrix is unsymmetric, while for
-  ##           K = 1 it is symmetric.
-  ##           CLEMENT(N, 1) is diagonally similar to CLEMENT(N).
+  ##   CLEMENT(N, K) is a tridiagonal matrix with zero diagonal entries
+  ##   and known eigenvalues.  It is singular if N is odd.  About 64
+  ##   percent of the entries of the inverse are zero.  The eigenvalues
+  ##   are plus and minus the numbers N-1, N-3, N-5, ..., (1 or 0).
+  ##   For K = 0 (the default) the matrix is unsymmetric, while for
+  ##   K = 1 it is symmetric.
+  ##   CLEMENT(N, 1) is diagonally similar to CLEMENT(N).
   ##
-  ##           Similar properties hold for TRIDIAG(X,Y,Z) where Y = ZEROS(N,1).
-  ##           The eigenvalues still come in plus/minus pairs but they are not
-  ##           known explicitly.
+  ##   Similar properties hold for TRIDIAG(X,Y,Z) where Y = ZEROS(N,1).
+  ##   The eigenvalues still come in plus/minus pairs but they are not
+  ##   known explicitly.
   ##
-  ##           References:
-  ##           P.A. Clement, A class of triple-diagonal matrices for test
-  ##              purposes, SIAM Review, 1 (1959), pp. 50-52.
-  ##           A. Edelman and E. Kostlan, The road from Kac's matrix to Kac's
-  ##              random polynomials. In John~G. Lewis, editor, Proceedings of
-  ##              the Fifth SIAM Conference on Applied Linear Algebra Society
-  ##              for Industrial and Applied Mathematics, Philadelphia, 1994,
-  ##              pp. 503-507.
-  ##           O. Taussky and J. Todd, Another look at a matrix of Mark Kac,
-  ##              Linear Algebra and Appl., 150 (1991), pp. 341-360.
+  ##   References:
+  ##   P.A. Clement, A class of triple-diagonal matrices for test
+  ##      purposes, SIAM Review, 1 (1959), pp. 50-52.
+  ##   A. Edelman and E. Kostlan, The road from Kac's matrix to Kac's
+  ##      random polynomials. In John~G. Lewis, editor, Proceedings of
+  ##      the Fifth SIAM Conference on Applied Linear Algebra Society
+  ##      for Industrial and Applied Mathematics, Philadelphia, 1994,
+  ##      pp. 503-507.
+  ##   O. Taussky and J. Todd, Another look at a matrix of Mark Kac,
+  ##      Linear Algebra and Appl., 150 (1991), pp. 341-360.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for clement matrix.");
@@ -787,17 +789,17 @@
 
 function C = compar (A, k = 0)
   ## COMP    Comparison matrices.
-  ##         COMP(A) is DIAG(B) - TRIL(B,-1) - TRIU(B,1), where B = ABS(A).
-  ##         COMP(A, 1) is A with each diagonal element replaced by its
-  ##         absolute value, and each off-diagonal element replaced by minus
-  ##         the absolute value of the largest element in absolute value in
-  ##         its row.  However, if A is triangular COMP(A, 1) is too.
-  ##         COMP(A, 0) is the same as COMP(A).
-  ##         COMP(A) is often denoted by M(A) in the literature.
+  ##   COMP(A) is DIAG(B) - TRIL(B,-1) - TRIU(B,1), where B = ABS(A).
+  ##   COMP(A, 1) is A with each diagonal element replaced by its
+  ##   absolute value, and each off-diagonal element replaced by minus
+  ##   the absolute value of the largest element in absolute value in
+  ##   its row.  However, if A is triangular COMP(A, 1) is too.
+  ##   COMP(A, 0) is the same as COMP(A).
+  ##   COMP(A) is often denoted by M(A) in the literature.
   ##
-  ##         Reference (e.g.):
-  ##         N.J. Higham, A survey of condition number estimation for
-  ##         triangular matrices, SIAM Review, 29 (1987), pp. 575-596.
+  ##   Reference (e.g.):
+  ##   N.J. Higham, A survey of condition number estimation for
+  ##   triangular matrices, SIAM Review, 29 (1987), pp. 575-596.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for compar matrix.");
@@ -839,26 +841,26 @@
 
 function A = condex (n, k = 4, theta = 100)
   ## CONDEX   `Counterexamples' to matrix condition number estimators.
-  ##          CONDEX(N, K, THETA) is a `counterexample' matrix to a condition
-  ##          estimator.  It has order N and scalar parameter THETA (default 100).
-  ##          If N is not equal to the `natural' size of the matrix then
-  ##          the matrix is padded out with an identity matrix to order N.
-  ##          The matrix, its natural size, and the estimator to which it applies
-  ##          are specified by K (default K = 4) as follows:
-  ##              K = 1:   4-by-4,     LINPACK (RCOND)
-  ##              K = 2:   3-by-3,     LINPACK (RCOND)
-  ##              K = 3:   arbitrary,  LINPACK (RCOND) (independent of THETA)
-  ##              K = 4:   N >= 4,     SONEST (Higham 1988)
-  ##          (Note that in practice the K = 4 matrix is not usually a
-  ##           counterexample because of the rounding errors in forming it.)
+  ##   CONDEX(N, K, THETA) is a `counterexample' matrix to a condition
+  ##   estimator.  It has order N and scalar parameter THETA (default 100).
+  ##   If N is not equal to the `natural' size of the matrix then
+  ##   the matrix is padded out with an identity matrix to order N.
+  ##   The matrix, its natural size, and the estimator to which it applies
+  ##   are specified by K (default K = 4) as follows:
+  ##       K = 1:   4-by-4,     LINPACK (RCOND)
+  ##       K = 2:   3-by-3,     LINPACK (RCOND)
+  ##       K = 3:   arbitrary,  LINPACK (RCOND) (independent of THETA)
+  ##       K = 4:   N >= 4,     SONEST (Higham 1988)
+  ##   (Note that in practice the K = 4 matrix is not usually a
+  ##    counterexample because of the rounding errors in forming it.)
   ##
-  ##          References:
-  ##          A.K. Cline and R.K. Rew, A set of counter-examples to three
-  ##             condition number estimators, SIAM J. Sci. Stat. Comput.,
-  ##             4 (1983), pp. 602-611.
-  ##          N.J. Higham, FORTRAN codes for estimating the one-norm of a real or
-  ##             complex matrix, with applications to condition estimation
-  ##             (Algorithm 674), ACM Trans. Math. Soft., 14 (1988), pp. 381-396.
+  ##   References:
+  ##   A.K. Cline and R.K. Rew, A set of counter-examples to three
+  ##      condition number estimators, SIAM J. Sci. Stat. Comput.,
+  ##      4 (1983), pp. 602-611.
+  ##   N.J. Higham, FORTRAN codes for estimating the one-norm of a real or
+  ##      complex matrix, with applications to condition estimation
+  ##      (Algorithm 674), ACM Trans. Math. Soft., 14 (1988), pp. 381-396.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for condex matrix.");
@@ -911,14 +913,14 @@
 
 function A = cycol (n, k)
   ## CYCOL   Matrix whose columns repeat cyclically.
-  ##         A = CYCOL([M N], K) is an M-by-N matrix of the form A = B(1:M,1:N)
-  ##         where B = [C C C...] and C = RANDN(M, K).  Thus A's columns repeat
-  ##         cyclically, and A has rank at most K.   K need not divide N.
-  ##         K defaults to ROUND(N/4).
-  ##         CYCOL(N, K), where N is a scalar, is the same as CYCOL([N N], K).
+  ##   A = CYCOL([M N], K) is an M-by-N matrix of the form A = B(1:M,1:N)
+  ##   where B = [C C C...] and C = RANDN(M, K).  Thus A's columns repeat
+  ##   cyclically, and A has rank at most K.   K need not divide N.
+  ##   K defaults to ROUND(N/4).
+  ##   CYCOL(N, K), where N is a scalar, is the same as CYCOL([N N], K).
   ##
-  ##         This type of matrix can lead to underflow problems for Gaussian
-  ##         elimination: see NA Digest Volume 89, Issue 3 (January 22, 1989).
+  ##   This type of matrix can lead to underflow problems for Gaussian
+  ##   elimination: see NA Digest Volume 89, Issue 3 (January 22, 1989).
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for cycol matrix.");
@@ -945,19 +947,19 @@
 
 function [c, d, e] = dorr (n, theta = 0.01)
   ## DORR  Dorr matrix - diagonally dominant, ill conditioned, tridiagonal.
-  ##       [C, D, E] = DORR(N, THETA) returns the vectors defining a row diagonally
-  ##       dominant, tridiagonal M-matrix that is ill conditioned for small
-  ##       values of the parameter THETA >= 0.
-  ##       If only one output parameter is supplied then
-  ##       C = FULL(TRIDIAG(C,D,E)), i.e., the matrix iself is returned.
-  ##       The columns of INV(C) vary greatly in norm.  THETA defaults to 0.01.
-  ##       The amount of diagonal dominance is given by (ignoring rounding errors):
-  ##             COMP(C)*ONES(N,1) = THETA*(N+1)^2 * [1 0 0 ... 0 1]'.
+  ##   [C, D, E] = DORR(N, THETA) returns the vectors defining a row diagonally
+  ##   dominant, tridiagonal M-matrix that is ill conditioned for small
+  ##   values of the parameter THETA >= 0.
+  ##   If only one output parameter is supplied then
+  ##   C = FULL(TRIDIAG(C,D,E)), i.e., the matrix iself is returned.
+  ##   The columns of INV(C) vary greatly in norm.  THETA defaults to 0.01.
+  ##   The amount of diagonal dominance is given by (ignoring rounding errors):
+  ##         COMP(C)*ONES(N,1) = THETA*(N+1)^2 * [1 0 0 ... 0 1]'.
   ##
-  ##       Reference:
-  ##       F.W. Dorr, An example of ill-conditioning in the numerical
-  ##       solution of singular perturbation problems, Math. Comp., 25 (1971),
-  ##       pp. 271-283.
+  ##   Reference:
+  ##   F.W. Dorr, An example of ill-conditioning in the numerical
+  ##   solution of singular perturbation problems, Math. Comp., 25 (1971),
+  ##   pp. 271-283.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 or 2 arguments are required for dorr matrix.");
@@ -996,27 +998,27 @@
 
 function A = dramadah (n, k = 1)
   ## DRAMADAH  A (0,1) matrix whose inverse has large integer entries.
-  ##           An anti-Hadamard matrix A is a matrix with elements 0 or 1 for
-  ##           which MU(A) := NORM(INV(A),'FRO') is maximal.
-  ##           A = DRAMADAH(N, K) is an N-by-N (0,1) matrix for which MU(A) is
-  ##           relatively large, although not necessarily maximal.
-  ##           Available types (the default is K = 1):
-  ##           K = 1: A is Toeplitz, with ABS(DET(A)) = 1, and MU(A) > c(1.75)^N,
-  ##                  where c is a constant.
-  ##           K = 2: A is upper triangular and Toeplitz.
-  ##           The inverses of both types have integer entries.
+  ##   An anti-Hadamard matrix A is a matrix with elements 0 or 1 for
+  ##   which MU(A) := NORM(INV(A),'FRO') is maximal.
+  ##   A = DRAMADAH(N, K) is an N-by-N (0,1) matrix for which MU(A) is
+  ##   relatively large, although not necessarily maximal.
+  ##   Available types (the default is K = 1):
+  ##   K = 1: A is Toeplitz, with ABS(DET(A)) = 1, and MU(A) > c(1.75)^N,
+  ##          where c is a constant.
+  ##   K = 2: A is upper triangular and Toeplitz.
+  ##   The inverses of both types have integer entries.
   ##
-  ##           Another interesting (0,1) matrix:
-  ##           K = 3: A has maximal determinant among (0,1) lower Hessenberg
-  ##           matrices: det(A) = the n'th Fibonacci number.  A is Toeplitz.
-  ##           The eigenvalues have an interesting distribution in the complex
-  ##           plane.
+  ##   Another interesting (0,1) matrix:
+  ##   K = 3: A has maximal determinant among (0,1) lower Hessenberg
+  ##   matrices: det(A) = the n'th Fibonacci number.  A is Toeplitz.
+  ##   The eigenvalues have an interesting distribution in the complex
+  ##   plane.
   ##
-  ##           References:
-  ##           R.L. Graham and N.J.A. Sloane, Anti-Hadamard matrices,
-  ##              Linear Algebra and Appl., 62 (1984), pp. 113-137.
-  ##           L. Ching, The maximum determinant of an nxn lower Hessenberg
-  ##              (0,1) matrix, Linear Algebra and Appl., 183 (1993), pp. 147-153.
+  ##   References:
+  ##   R.L. Graham and N.J.A. Sloane, Anti-Hadamard matrices,
+  ##      Linear Algebra and Appl., 62 (1984), pp. 113-137.
+  ##   L. Ching, The maximum determinant of an nxn lower Hessenberg
+  ##      (0,1) matrix, Linear Algebra and Appl., 183 (1993), pp. 147-153.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for dramadah matrix.");
@@ -1063,24 +1065,24 @@
 
 function A = fiedler (c)
   ## FIEDLER  Fiedler matrix - symmetric.
-  ##          A = FIEDLER(C), where C is an n-vector, is the n-by-n symmetric
-  ##          matrix with elements ABS(C(i)-C(j)).
-  ##          Special case: if C is a scalar, then A = FIEDLER(1:C)
-  ##                        (i.e. A(i,j) = ABS(i-j)).
-  ##          Properties:
-  ##            FIEDLER(N) has a dominant positive eigenvalue and all the other
-  ##                       eigenvalues are negative (Szego, 1936).
-  ##            Explicit formulas for INV(A) and DET(A) are given by Todd (1977)
-  ##            and attributed to Fiedler.  These indicate that INV(A) is
-  ##            tridiagonal except for nonzero (1,n) and (n,1) elements.
-  ##            [I think these formulas are valid only if the elements of
-  ##            C are in increasing or decreasing order---NJH.]
+  ##   FIEDLER(C), where C is an n-vector, is the n-by-n symmetric
+  ##   matrix with elements ABS(C(i)-C(j)).
+  ##   Special case: if C is a scalar, then A = FIEDLER(1:C)
+  ##               (i.e. A(i,j) = ABS(i-j)).
+  ##   Properties:
+  ##   FIEDLER(N) has a dominant positive eigenvalue and all the other
+  ##              eigenvalues are negative (Szego, 1936).
+  ##   Explicit formulas for INV(A) and DET(A) are given by Todd (1977)
+  ##   and attributed to Fiedler.  These indicate that INV(A) is
+  ##   tridiagonal except for nonzero (1,n) and (n,1) elements.
+  ##   [I think these formulas are valid only if the elements of
+  ##   C are in increasing or decreasing order---NJH.]
   ##
-  ##            References:
-  ##            G. Szego, Solution to problem 3705, Amer. Math. Monthly,
-  ##               43 (1936), pp. 246-259.
-  ##            J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
-  ##               Birkhauser, Basel, and Academic Press, New York, 1977, p. 159.
+  ##   References:
+  ##   G. Szego, Solution to problem 3705, Amer. Math. Monthly,
+  ##      43 (1936), pp. 246-259.
+  ##   J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
+  ##      Birkhauser, Basel, and Academic Press, New York, 1977, p. 159.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for fiedler matrix.");
@@ -1105,11 +1107,11 @@
 
 function A = forsythe (n, alpha = sqrt (eps), lambda = 0)
   ## FORSYTHE  Forsythe matrix - a perturbed Jordan block.
-  ##           FORSYTHE(N, ALPHA, LAMBDA) is the N-by-N matrix equal to
-  ##           JORDBLOC(N, LAMBDA) except it has an ALPHA in the (N,1) position.
-  ##           It has the characteristic polynomial
-  ##                   DET(A-t*EYE) = (LAMBDA-t)^N - (-1)^N ALPHA.
-  ##           ALPHA defaults to SQRT(EPS) and LAMBDA to 0.
+  ##   FORSYTHE(N, ALPHA, LAMBDA) is the N-by-N matrix equal to
+  ##   JORDBLOC(N, LAMBDA) except it has an ALPHA in the (N,1) position.
+  ##   It has the characteristic polynomial
+  ##           DET(A-t*EYE) = (LAMBDA-t)^N - (-1)^N ALPHA.
+  ##   ALPHA defaults to SQRT(EPS) and LAMBDA to 0.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for forsythe matrix.");
@@ -1127,41 +1129,41 @@
 
 function F = frank (n, k = 0)
   ## FRANK   Frank matrix---ill conditioned eigenvalues.
-  ##         F = FRANK(N, K) is the Frank matrix of order N.  It is upper
-  ##         Hessenberg with determinant 1.  K = 0 is the default; if K = 1 the
-  ##         elements are reflected about the anti-diagonal (1,N)--(N,1).
-  ##         F has all positive eigenvalues and they occur in reciprocal pairs
-  ##         (so that 1 is an eigenvalue if N is odd).
-  ##         The eigenvalues of F may be obtained in terms of the zeros of the
-  ##         Hermite polynomials.
-  ##         The FLOOR(N/2) smallest eigenvalues of F are ill conditioned,
-  ##         the more so for bigger N.
+  ##   F = FRANK(N, K) is the Frank matrix of order N.  It is upper
+  ##   Hessenberg with determinant 1.  K = 0 is the default; if K = 1 the
+  ##   elements are reflected about the anti-diagonal (1,N)--(N,1).
+  ##   F has all positive eigenvalues and they occur in reciprocal pairs
+  ##   (so that 1 is an eigenvalue if N is odd).
+  ##   The eigenvalues of F may be obtained in terms of the zeros of the
+  ##   Hermite polynomials.
+  ##   The FLOOR(N/2) smallest eigenvalues of F are ill conditioned,
+  ##   the more so for bigger N.
   ##
-  ##         DET(FRANK(N)') comes out far from 1 for large N---see Frank (1958)
-  ##         and Wilkinson (1960) for discussions.
+  ##   DET(FRANK(N)') comes out far from 1 for large N---see Frank (1958)
+  ##   and Wilkinson (1960) for discussions.
   ##
-  ##         This version incorporates improvements suggested by W. Kahan.
+  ##   This version incorporates improvements suggested by W. Kahan.
   ##
-  ##         References:
-  ##         W.L. Frank, Computing eigenvalues of complex matrices by determinant
-  ##            evaluation and by methods of Danilewski and Wielandt, J. Soc.
-  ##            Indust. Appl. Math., 6 (1958), pp. 378-392 (see pp. 385, 388).
-  ##         G.H. Golub and J.H. Wilkinson, Ill-conditioned eigensystems and the
-  ##            computation of the Jordan canonical form, SIAM Review, 18 (1976),
-  ##              pp. 578-619 (Section 13).
-  ##         H. Rutishauser, On test matrices, Programmation en Mathematiques
-  ##            Numeriques, Editions Centre Nat. Recherche Sci., Paris, 165,
-  ##            1966, pp. 349-365.  Section 9.
-  ##         J.H. Wilkinson, Error analysis of floating-point computation,
-  ##            Numer. Math., 2 (1960), pp. 319-340 (Section 8).
-  ##         J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
-  ##            Press, 1965 (pp. 92-93).
-  ##         The next two references give details of the eigensystem, as does
-  ##         Rutishauser (see above).
-  ##         P.J. Eberlein, A note on the matrices denoted by B_n, SIAM J. Appl.
-  ##            Math., 20 (1971), pp. 87-92.
-  ##         J.M. Varah, A generalization of the Frank matrix, SIAM J. Sci. Stat.
-  ##            Comput., 7 (1986), pp. 835-839.
+  ##   References:
+  ##   W.L. Frank, Computing eigenvalues of complex matrices by determinant
+  ##      evaluation and by methods of Danilewski and Wielandt, J. Soc.
+  ##      Indust. Appl. Math., 6 (1958), pp. 378-392 (see pp. 385, 388).
+  ##   G.H. Golub and J.H. Wilkinson, Ill-conditioned eigensystems and the
+  ##      computation of the Jordan canonical form, SIAM Review, 18 (1976),
+  ##        pp. 578-619 (Section 13).
+  ##   H. Rutishauser, On test matrices, Programmation en Mathematiques
+  ##      Numeriques, Editions Centre Nat. Recherche Sci., Paris, 165,
+  ##      1966, pp. 349-365.  Section 9.
+  ##   J.H. Wilkinson, Error analysis of floating-point computation,
+  ##      Numer. Math., 2 (1960), pp. 319-340 (Section 8).
+  ##   J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
+  ##      Press, 1965 (pp. 92-93).
+  ##   The next two references give details of the eigensystem, as does
+  ##   Rutishauser (see above).
+  ##   P.J. Eberlein, A note on the matrices denoted by B_n, SIAM J. Appl.
+  ##      Math., 20 (1971), pp. 87-92.
+  ##   J.M. Varah, A generalization of the Frank matrix, SIAM J. Sci. Stat.
+  ##      Comput., 7 (1986), pp. 835-839.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for frank matrix.");
@@ -1194,29 +1196,29 @@
 function A = gearmat (n, i = n, j = -n)
   ## NOTE: this function was named gearm in the original Test Matrix Toolbox
   ## GEARMAT   Gear matrix.
-  ##         A = GEARMAT(N,I,J) is the N-by-N matrix with ones on the sub- and
-  ##         super-diagonals, SIGN(I) in the (1,ABS(I)) position, SIGN(J)
-  ##         in the (N,N+1-ABS(J)) position, and zeros everywhere else.
-  ##         Defaults: I = N, j = -N.
-  ##         All eigenvalues are of the form 2*COS(a) and the eigenvectors
-  ##         are of the form [SIN(w+a), SIN(w+2a), ..., SIN(w+Na)].
-  ##         The values of a and w are given in the reference below.
-  ##         A can have double and triple eigenvalues and can be defective.
-  ##         GEARMAT(N) is singular.
+  ##   A = GEARMAT(N,I,J) is the N-by-N matrix with ones on the sub- and
+  ##   super-diagonals, SIGN(I) in the (1,ABS(I)) position, SIGN(J)
+  ##   in the (N,N+1-ABS(J)) position, and zeros everywhere else.
+  ##   Defaults: I = N, j = -N.
+  ##   All eigenvalues are of the form 2*COS(a) and the eigenvectors
+  ##   are of the form [SIN(w+a), SIN(w+2a), ..., SIN(w+Na)].
+  ##   The values of a and w are given in the reference below.
+  ##   A can have double and triple eigenvalues and can be defective.
+  ##   GEARMAT(N) is singular.
   ##
-  ##         (GEAR is a Simulink function, hence GEARMAT for Gear matrix.)
-  ##         Reference:
-  ##         C.W. Gear, A simple set of test matrices for eigenvalue programs,
-  ##         Math. Comp., 23 (1969), pp. 119-125.
+  ##   (GEAR is a Simulink function, hence GEARMAT for Gear matrix.)
+  ##   Reference:
+  ##   C.W. Gear, A simple set of test matrices for eigenvalue programs,
+  ##   Math. Comp., 23 (1969), pp. 119-125.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for gearmat matrix.");
   elseif (! isnumeric (n) || ! isscalar (n) || fix (n) != n)
     error ("gallery: N must be an integer for gearmat matrix.");
   elseif (! isnumeric (i) || ! isscalar (i) || i == 0 || abs (i) <= n)
-    error ("gallery: I must be a non-zero scalar, and abs (I) <= N for gearmat matrix.");
+    error ("gallery: I must be a nonzero scalar, and abs (I) <= N for gearmat matrix.");
   elseif (! isnumeric (j) || ! isscalar (j) || i == 0 || abs (j) <= n)
-    error ("gallery: J must be a non-zero scalar, and abs (J) <= N for gearmat matrix.");
+    error ("gallery: J must be a nonzero scalar, and abs (J) <= N for gearmat matrix.");
   endif
 
   A = diag (ones (n-1, 1), -1) + diag (ones (n-1, 1), 1);
@@ -1226,18 +1228,18 @@
 
 function G = grcar (n, k = 3)
   ## GRCAR     Grcar matrix - a Toeplitz matrix with sensitive eigenvalues.
-  ##           GRCAR(N, K) is an N-by-N matrix with -1s on the
-  ##           subdiagonal, 1s on the diagonal, and K superdiagonals of 1s.
-  ##           The default is K = 3.  The eigenvalues of this matrix form an
-  ##           interesting pattern in the complex plane (try PS(GRCAR(32))).
+  ##   GRCAR(N, K) is an N-by-N matrix with -1s on the
+  ##   subdiagonal, 1s on the diagonal, and K superdiagonals of 1s.
+  ##   The default is K = 3.  The eigenvalues of this matrix form an
+  ##   interesting pattern in the complex plane (try PS(GRCAR(32))).
   ##
-  ##           References:
-  ##           J.F. Grcar, Operator coefficient methods for linear equations,
-  ##                Report SAND89-8691, Sandia National Laboratories, Albuquerque,
-  ##                New Mexico, 1989 (Appendix 2).
-  ##           N.M. Nachtigal, L. Reichel and L.N. Trefethen, A hybrid GMRES
-  ##                algorithm for nonsymmetric linear systems, SIAM J. Matrix Anal.
-  ##                Appl., 13 (1992), pp. 796-825.
+  ##   References:
+  ##   J.F. Grcar, Operator coefficient methods for linear equations,
+  ##        Report SAND89-8691, Sandia National Laboratories, Albuquerque,
+  ##        New Mexico, 1989 (Appendix 2).
+  ##   N.M. Nachtigal, L. Reichel and L.N. Trefethen, A hybrid GMRES
+  ##        algorithm for nonsymmetric linear systems, SIAM J. Matrix Anal.
+  ##        Appl., 13 (1992), pp. 796-825.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for grcar matrix.");
@@ -1252,16 +1254,16 @@
 
 function A = hanowa (n, d = -1)
   ## HANOWA  A matrix whose eigenvalues lie on a vertical line in the complex plane.
-  ##         HANOWA(N, d) is the N-by-N block 2x2 matrix (thus N = 2M must be even)
-  ##                       [d*EYE(M)   -DIAG(1:M)
-  ##                        DIAG(1:M)   d*EYE(M)]
-  ##         It has complex eigenvalues lambda(k) = d +/- k*i  (1 <= k <= M).
-  ##         Parameter d defaults to -1.
+  ##   HANOWA(N, d) is the N-by-N block 2x2 matrix (thus N = 2M must be even)
+  ##                 [d*EYE(M)   -DIAG(1:M)
+  ##                  DIAG(1:M)   d*EYE(M)]
+  ##   It has complex eigenvalues lambda(k) = d +/- k*i  (1 <= k <= M).
+  ##   Parameter d defaults to -1.
   ##
-  ##         Reference:
-  ##         E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary
-  ##         Differential Equations I: Nonstiff Problems, Springer-Verlag,
-  ##         Berlin, 1987. (pp. 86-87)
+  ##   Reference:
+  ##   E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary
+  ##   Differential Equations I: Nonstiff Problems, Springer-Verlag,
+  ##   Berlin, 1987. (pp. 86-87)
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for hanowa matrix.");
@@ -1280,28 +1282,28 @@
 
 function [v, beta] = house (x)
   ## HOUSE   Householder matrix.
-  ##         If [v, beta] = HOUSE(x) then H = EYE - beta*v*v' is a Householder
-  ##         matrix such that Hx = -sign(x(1))*norm(x)*e_1.
-  ##         NB: If x = 0 then v = 0, beta = 1 is returned.
-  ##             x can be real or complex.
-  ##             sign(x) := exp(i*arg(x)) ( = x./abs(x) when x ~= 0).
+  ##   If [v, beta] = HOUSE(x) then H = EYE - beta*v*v' is a Householder
+  ##   matrix such that Hx = -sign(x(1))*norm(x)*e_1.
+  ##   NB: If x = 0 then v = 0, beta = 1 is returned.
+  ##       x can be real or complex.
+  ##       sign(x) := exp(i*arg(x)) ( = x./abs(x) when x ~= 0).
   ##
-  ##         Theory: (textbook references Golub & Van Loan 1989, 38-43;
-  ##                  Stewart 1973, 231-234, 262; Wilkinson 1965, 48-50).
-  ##         Hx = y: (I - beta*v*v')x = -s*e_1.
-  ##         Must have |s| = norm(x), v = x+s*e_1, and
-  ##         x'y = x'Hx =(x'Hx)' real => arg(s) = arg(x(1)).
-  ##         So take s = sign(x(1))*norm(x) (which avoids cancellation).
-  ##         v'v = (x(1)+s)^2 + x(2)^2 + ... + x(n)^2
-  ##             = 2*norm(x)*(norm(x) + |x(1)|).
+  ##   Theory: (textbook references Golub & Van Loan 1989, 38-43;
+  ##            Stewart 1973, 231-234, 262; Wilkinson 1965, 48-50).
+  ##   Hx = y: (I - beta*v*v')x = -s*e_1.
+  ##   Must have |s| = norm(x), v = x+s*e_1, and
+  ##   x'y = x'Hx =(x'Hx)' real => arg(s) = arg(x(1)).
+  ##   So take s = sign(x(1))*norm(x) (which avoids cancellation).
+  ##   v'v = (x(1)+s)^2 + x(2)^2 + ... + x(n)^2
+  ##       = 2*norm(x)*(norm(x) + |x(1)|).
   ##
-  ##         References:
-  ##         G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
-  ##            Johns Hopkins University Press, Baltimore, Maryland, 1989.
-  ##         G.W. Stewart, Introduction to Matrix Computations, Academic Press,
-  ##            New York, 1973,
-  ##         J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
-  ##            Press, 1965.
+  ##   References:
+  ##   G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
+  ##      Johns Hopkins University Press, Baltimore, Maryland, 1989.
+  ##   G.W. Stewart, Introduction to Matrix Computations, Academic Press,
+  ##      New York, 1973,
+  ##   J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
+  ##      Press, 1965.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for house matrix.");
@@ -1369,26 +1371,26 @@
 
 function A = invhess (x, y)
   ## INVHESS  Inverse of an upper Hessenberg matrix.
-  ##          INVHESS(X, Y), where X is an N-vector and Y an N-1 vector,
-  ##          is the matrix whose lower triangle agrees with that of
-  ##          ONES(N,1)*X' and whose strict upper triangle agrees with
-  ##          that of [1 Y]*ONES(1,N).
-  ##          The matrix is nonsingular if X(1) ~= 0 and X(i+1) ~= Y(i)
-  ##          for all i, and its inverse is an upper Hessenberg matrix.
-  ##          If Y is omitted it defaults to -X(1:N-1).
-  ##          Special case: if X is a scalar INVHESS(X) is the same as
-  ##          INVHESS(1:X).
+  ##   INVHESS(X, Y), where X is an N-vector and Y an N-1 vector,
+  ##   is the matrix whose lower triangle agrees with that of
+  ##   ONES(N,1)*X' and whose strict upper triangle agrees with
+  ##   that of [1 Y]*ONES(1,N).
+  ##   The matrix is nonsingular if X(1) ~= 0 and X(i+1) ~= Y(i)
+  ##   for all i, and its inverse is an upper Hessenberg matrix.
+  ##   If Y is omitted it defaults to -X(1:N-1).
+  ##   Special case: if X is a scalar INVHESS(X) is the same as
+  ##   INVHESS(1:X).
   ##
-  ##          References:
-  ##          F.N. Valvi and V.S. Geroyannis, Analytic inverses and
-  ##              determinants for a class of matrices, IMA Journal of Numerical
-  ##              Analysis, 7 (1987), pp. 123-128.
-  ##          W.-L. Cao and W.J. Stewart, A note on inverses of Hessenberg-like
-  ##              matrices, Linear Algebra and Appl., 76 (1986), pp. 233-240.
-  ##          Y. Ikebe, On inverses of Hessenberg matrices, Linear Algebra and
-  ##              Appl., 24 (1979), pp. 93-97.
-  ##          P. Rozsa, On the inverse of band matrices, Integral Equations and
-  ##              Operator Theory, 10 (1987), pp. 82-95.
+  ##   References:
+  ##   F.N. Valvi and V.S. Geroyannis, Analytic inverses and
+  ##       determinants for a class of matrices, IMA Journal of Numerical
+  ##       Analysis, 7 (1987), pp. 123-128.
+  ##   W.-L. Cao and W.J. Stewart, A note on inverses of Hessenberg-like
+  ##       matrices, Linear Algebra and Appl., 76 (1986), pp. 233-240.
+  ##   Y. Ikebe, On inverses of Hessenberg matrices, Linear Algebra and
+  ##       Appl., 24 (1979), pp. 93-97.
+  ##   P. Rozsa, On the inverse of band matrices, Integral Equations and
+  ##       Operator Theory, 10 (1987), pp. 82-95.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for invhess matrix.");
@@ -1423,15 +1425,15 @@
 
 function A = invol (n)
   ## INVOL   An involutory matrix.
-  ##         A = INVOL(N) is an N-by-N involutory (A*A = EYE(N)) and
-  ##         ill-conditioned matrix.
-  ##         It is a diagonally scaled version of HILB(N).
-  ##         NB: B = (EYE(N)-A)/2 and B = (EYE(N)+A)/2 are idempotent (B*B = B).
+  ##   A = INVOL(N) is an N-by-N involutory (A*A = EYE(N)) and
+  ##   ill-conditioned matrix.
+  ##   It is a diagonally scaled version of HILB(N).
+  ##   NB: B = (EYE(N)-A)/2 and B = (EYE(N)+A)/2 are idempotent (B*B = B).
   ##
-  ##         Reference:
-  ##         A.S. Householder and J.A. Carpenter, The singular values
-  ##         of involutory and of idempotent matrices, Numer. Math. 5 (1963),
-  ##         pp. 234-237.
+  ##   Reference:
+  ##   A.S. Householder and J.A. Carpenter, The singular values
+  ##   of involutory and of idempotent matrices, Numer. Math. 5 (1963),
+  ##   pp. 234-237.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for invol matrix.");
@@ -1452,19 +1454,19 @@
 
 function [A, detA] = ipjfact (n, k = 0)
   ## IPJFACT   A Hankel matrix with factorial elements.
-  ##           A = IPJFACT(N, K) is the matrix with
-  ##                     A(i,j) = (i+j)!    (K = 0, default)
-  ##                     A(i,j) = 1/(i+j)!  (K = 1)
-  ##           Both are Hankel matrices.
-  ##           The determinant and inverse are known explicitly.
-  ##           If a second output argument is present, d = DET(A) is returned:
-  ##           [A, d] = IPJFACT(N, K);
+  ##   A = IPJFACT(N, K) is the matrix with
+  ##             A(i,j) = (i+j)!    (K = 0, default)
+  ##             A(i,j) = 1/(i+j)!  (K = 1)
+  ##   Both are Hankel matrices.
+  ##   The determinant and inverse are known explicitly.
+  ##   If a second output argument is present, d = DET(A) is returned:
+  ##   [A, d] = IPJFACT(N, K);
   ##
-  ##           Suggested by P. R. Graves-Morris.
+  ##   Suggested by P. R. Graves-Morris.
   ##
-  ##           Reference:
-  ##           M.J.C. Gover, The explicit inverse of factorial Hankel matrices,
-  ##           Dept. of Mathematics, University of Bradford, 1993.
+  ##   Reference:
+  ##   M.J.C. Gover, The explicit inverse of factorial Hankel matrices,
+  ##   Dept. of Mathematics, University of Bradford, 1993.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for ipjfact matrix.");
@@ -1513,8 +1515,8 @@
 
 function J = jordbloc (n, lambda = 1)
   ## JORDBLOC  Jordan block.
-  ##           JORDBLOC(N, LAMBDA) is the N-by-N Jordan block with eigenvalue
-  ##           LAMBDA.  LAMBDA = 1 is the default.
+  ##   JORDBLOC(N, LAMBDA) is the N-by-N Jordan block with eigenvalue
+  ##   LAMBDA.  LAMBDA = 1 is the default.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for jordbloc matrix.");
@@ -1529,30 +1531,30 @@
 
 function U = kahan (n, theta = 1.2, pert = 25)
   ## KAHAN  Kahan matrix - upper trapezoidal.
-  ##        KAHAN(N, THETA) is an upper trapezoidal matrix
-  ##        that has some interesting properties regarding estimation of
-  ##        condition and rank.
-  ##        The matrix is N-by-N unless N is a 2-vector, in which case it
-  ##        is N(1)-by-N(2).
-  ##        The parameter THETA defaults to 1.2.
-  ##        The useful range of THETA is 0 < THETA < PI.
+  ##   KAHAN(N, THETA) is an upper trapezoidal matrix
+  ##   that has some interesting properties regarding estimation of
+  ##   condition and rank.
+  ##   The matrix is N-by-N unless N is a 2-vector, in which case it
+  ##   is N(1)-by-N(2).
+  ##   The parameter THETA defaults to 1.2.
+  ##   The useful range of THETA is 0 < THETA < PI.
   ##
-  ##        To ensure that the QR factorization with column pivoting does not
-  ##        interchange columns in the presence of rounding errors, the diagonal
-  ##        is perturbed by PERT*EPS*diag( [N:-1:1] ).
-  ##        The default is PERT = 25, which ensures no interchanges for KAHAN(N)
-  ##        up to at least N = 90 in IEEE arithmetic.
-  ##        KAHAN(N, THETA, PERT) uses the given value of PERT.
+  ##   To ensure that the QR factorization with column pivoting does not
+  ##   interchange columns in the presence of rounding errors, the diagonal
+  ##   is perturbed by PERT*EPS*diag( [N:-1:1] ).
+  ##   The default is PERT = 25, which ensures no interchanges for KAHAN(N)
+  ##   up to at least N = 90 in IEEE arithmetic.
+  ##   KAHAN(N, THETA, PERT) uses the given value of PERT.
   ##
-  ##        The inverse of KAHAN(N, THETA) is known explicitly: see
-  ##        Higham (1987, p. 588), for example.
-  ##        The diagonal perturbation was suggested by Christian Bischof.
+  ##   The inverse of KAHAN(N, THETA) is known explicitly: see
+  ##   Higham (1987, p. 588), for example.
+  ##   The diagonal perturbation was suggested by Christian Bischof.
   ##
-  ##        References:
-  ##        W. Kahan, Numerical linear algebra, Canadian Math. Bulletin,
-  ##           9 (1966), pp. 757-801.
-  ##        N.J. Higham, A survey of condition number estimation for
-  ##           triangular matrices, SIAM Review, 29 (1987), pp. 575-596.
+  ##   References:
+  ##   W. Kahan, Numerical linear algebra, Canadian Math. Bulletin,
+  ##      9 (1966), pp. 757-801.
+  ##   N.J. Higham, A survey of condition number estimation for
+  ##      triangular matrices, SIAM Review, 29 (1987), pp. 575-596.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for kahan matrix.");
@@ -1582,22 +1584,22 @@
 
 function A = kms (n, rho = 0.5)
   ## KMS   Kac-Murdock-Szego Toeplitz matrix.
-  ##       A = KMS(N, RHO) is the N-by-N Kac-Murdock-Szego Toeplitz matrix with
-  ##       A(i,j) = RHO^(ABS((i-j))) (for real RHO).
-  ##       If RHO is complex, then the same formula holds except that elements
-  ##       below the diagonal are conjugated.
-  ##       RHO defaults to 0.5.
-  ##       Properties:
-  ##          A has an LDL' factorization with
-  ##                   L = INV(TRIW(N,-RHO,1)'),
-  ##                   D(i,i) = (1-ABS(RHO)^2)*EYE(N) except D(1,1) = 1.
-  ##          A is positive definite if and only if 0 < ABS(RHO) < 1.
-  ##          INV(A) is tridiagonal.
+  ##   A = KMS(N, RHO) is the N-by-N Kac-Murdock-Szego Toeplitz matrix with
+  ##   A(i,j) = RHO^(ABS((i-j))) (for real RHO).
+  ##   If RHO is complex, then the same formula holds except that elements
+  ##   below the diagonal are conjugated.
+  ##   RHO defaults to 0.5.
+  ##   Properties:
+  ##      A has an LDL' factorization with
+  ##               L = INV(TRIW(N,-RHO,1)'),
+  ##               D(i,i) = (1-ABS(RHO)^2)*EYE(N) except D(1,1) = 1.
+  ##      A is positive definite if and only if 0 < ABS(RHO) < 1.
+  ##      INV(A) is tridiagonal.
   ##
-  ##        Reference:
-  ##        W.F. Trench, Numerical solution of the eigenvalue problem
-  ##        for Hermitian Toeplitz matrices, SIAM J. Matrix Analysis and Appl.,
-  ##        10 (1989), pp. 135-146 (and see the references therein).
+  ##    Reference:
+  ##    W.F. Trench, Numerical solution of the eigenvalue problem
+  ##    for Hermitian Toeplitz matrices, SIAM J. Matrix Analysis and Appl.,
+  ##    10 (1989), pp. 135-146 (and see the references therein).
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for lauchli matrix.");
@@ -1617,15 +1619,15 @@
 
 function B = krylov (A, x, j)
   ## KRYLOV    Krylov matrix.
-  ##           KRYLOV(A, x, j) is the Krylov matrix
-  ##                [x, Ax, A^2x, ..., A^(j-1)x],
-  ##           where A is an n-by-n matrix and x is an n-vector.
-  ##           Defaults: x = ONES(n,1), j = n.
-  ##           KRYLOV(n) is the same as KRYLOV(RANDN(n)).
+  ##   KRYLOV(A, x, j) is the Krylov matrix
+  ##        [x, Ax, A^2x, ..., A^(j-1)x],
+  ##   where A is an n-by-n matrix and x is an n-vector.
+  ##   Defaults: x = ONES(n,1), j = n.
+  ##   KRYLOV(n) is the same as KRYLOV(RANDN(n)).
   ##
-  ##           Reference:
-  ##           G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
-  ##           Johns Hopkins University Press, Baltimore, Maryland, 1989, p. 369.
+  ##   Reference:
+  ##   G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
+  ##   Johns Hopkins University Press, Baltimore, Maryland, 1989, p. 369.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for krylov matrix.");
@@ -1660,14 +1662,14 @@
 
 function A = lauchli (n, mu = sqrt (eps))
   ## LAUCHLI   Lauchli matrix - rectangular.
-  ##           LAUCHLI(N, MU) is the (N+1)-by-N matrix [ONES(1,N); MU*EYE(N))].
-  ##           It is a well-known example in least squares and other problems
-  ##           that indicates the dangers of forming A'*A.
-  ##           MU defaults to SQRT(EPS).
+  ##   LAUCHLI(N, MU) is the (N+1)-by-N matrix [ONES(1,N); MU*EYE(N))].
+  ##   It is a well-known example in least squares and other problems
+  ##   that indicates the dangers of forming A'*A.
+  ##   MU defaults to SQRT(EPS).
   ##
-  ##           Reference:
-  ##           P. Lauchli, Jordan-Elimination und Ausgleichung nach
-  ##           kleinsten Quadraten, Numer. Math, 3 (1961), pp. 226-240.
+  ##   Reference:
+  ##   P. Lauchli, Jordan-Elimination und Ausgleichung nach
+  ##   kleinsten Quadraten, Numer. Math, 3 (1961), pp. 226-240.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for lauchli matrix.");
@@ -1683,19 +1685,19 @@
 
 function A = lehmer (n)
   ## LEHMER  Lehmer matrix - symmetric positive definite.
-  ##         A = LEHMER(N) is the symmetric positive definite N-by-N matrix with
-  ##                          A(i,j) = i/j for j >= i.
-  ##         A is totally nonnegative.  INV(A) is tridiagonal, and explicit
-  ##         formulas are known for its entries.
-  ##         N <= COND(A) <= 4*N*N.
+  ##   A = LEHMER(N) is the symmetric positive definite N-by-N matrix with
+  ##                    A(i,j) = i/j for j >= i.
+  ##   A is totally nonnegative.  INV(A) is tridiagonal, and explicit
+  ##   formulas are known for its entries.
+  ##   N <= COND(A) <= 4*N*N.
   ##
-  ##         References:
-  ##         M. Newman and J. Todd, The evaluation of matrix inversion
-  ##            programs, J. Soc. Indust. Appl. Math., 6 (1958), pp. 466-476.
-  ##         Solutions to problem E710 (proposed by D.H. Lehmer): The inverse
-  ##            of a matrix, Amer. Math. Monthly, 53 (1946), pp. 534-535.
-  ##         J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
-  ##            Birkhauser, Basel, and Academic Press, New York, 1977, p. 154.
+  ##   References:
+  ##   M. Newman and J. Todd, The evaluation of matrix inversion
+  ##      programs, J. Soc. Indust. Appl. Math., 6 (1958), pp. 466-476.
+  ##   Solutions to problem E710 (proposed by D.H. Lehmer): The inverse
+  ##      of a matrix, Amer. Math. Monthly, 53 (1946), pp. 534-535.
+  ##   J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
+  ##      Birkhauser, Basel, and Academic Press, New York, 1977, p. 154.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for lehmer matrix.");
@@ -1710,23 +1712,23 @@
 
 function T = lesp (n)
   ## LESP   A tridiagonal matrix with real, sensitive eigenvalues.
-  ##        LESP(N) is an N-by-N matrix whose eigenvalues are real and smoothly
-  ##        distributed in the interval approximately [-2*N-3.5, -4.5].
-  ##        The sensitivities of the eigenvalues increase exponentially as
-  ##        the eigenvalues grow more negative.
-  ##        The matrix is similar to the symmetric tridiagonal matrix with
-  ##        the same diagonal entries and with off-diagonal entries 1,
-  ##        via a similarity transformation with D = diag(1!,2!,...,N!).
+  ##   LESP(N) is an N-by-N matrix whose eigenvalues are real and smoothly
+  ##   distributed in the interval approximately [-2*N-3.5, -4.5].
+  ##   The sensitivities of the eigenvalues increase exponentially as
+  ##   the eigenvalues grow more negative.
+  ##   The matrix is similar to the symmetric tridiagonal matrix with
+  ##   the same diagonal entries and with off-diagonal entries 1,
+  ##   via a similarity transformation with D = diag(1!,2!,...,N!).
   ##
-  ##        References:
-  ##        H.W.J. Lenferink and M.N. Spijker, On the use of stability regions in
-  ##             the numerical analysis of initial value problems,
-  ##             Math. Comp., 57 (1991), pp. 221-237.
-  ##        L.N. Trefethen, Pseudospectra of matrices, in Numerical Analysis 1991,
-  ##             Proceedings of the 14th Dundee Conference,
-  ##             D.F. Griffiths and G.A. Watson, eds, Pitman Research Notes in
-  ##             Mathematics, volume 260, Longman Scientific and Technical, Essex,
-  ##             UK, 1992, pp. 234-266.
+  ##   References:
+  ##   H.W.J. Lenferink and M.N. Spijker, On the use of stability regions in
+  ##        the numerical analysis of initial value problems,
+  ##        Math. Comp., 57 (1991), pp. 221-237.
+  ##   L.N. Trefethen, Pseudospectra of matrices, in Numerical Analysis 1991,
+  ##        Proceedings of the 14th Dundee Conference,
+  ##        D.F. Griffiths and G.A. Watson, eds, Pitman Research Notes in
+  ##        Mathematics, volume 260, Longman Scientific and Technical, Essex,
+  ##        UK, 1992, pp. 234-266.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for lesp matrix.");
@@ -1740,13 +1742,13 @@
 
 function A = lotkin (n)
   ## LOTKIN  Lotkin matrix.
-  ##         A = LOTKIN(N) is the Hilbert matrix with its first row altered to
-  ##         all ones.  A is unsymmetric, ill-conditioned, and has many negative
-  ##         eigenvalues of small magnitude.
-  ##         The inverse has integer entries and is known explicitly.
+  ##   A = LOTKIN(N) is the Hilbert matrix with its first row altered to
+  ##   all ones.  A is unsymmetric, ill-conditioned, and has many negative
+  ##   eigenvalues of small magnitude.
+  ##   The inverse has integer entries and is known explicitly.
   ##
-  ##         Reference:
-  ##         M. Lotkin, A set of test matrices, MTAC, 9 (1955), pp. 153-161.
+  ##   Reference:
+  ##   M. Lotkin, A set of test matrices, MTAC, 9 (1955), pp. 153-161.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for lotkin matrix.");
@@ -1760,21 +1762,21 @@
 
 function A = minij (n)
   ## MINIJ   Symmetric positive definite matrix MIN(i,j).
-  ##         A = MINIJ(N) is the N-by-N symmetric positive definite matrix with
-  ##         A(i,j) = MIN(i,j).
-  ##         Properties, variations:
-  ##         INV(A) is tridiagonal: it is minus the second difference matrix
-  ##                     except its (N,N) element is 1.
-  ##         2*A-ONES(N) (Givens' matrix) has tridiagonal inverse and
-  ##                     eigenvalues .5*sec^2([2r-1)PI/4N], r=1:N.
-  ##         (N+1)*ONES(N)-A also has a tridiagonal inverse.
+  ##   A = MINIJ(N) is the N-by-N symmetric positive definite matrix with
+  ##   A(i,j) = MIN(i,j).
+  ##   Properties, variations:
+  ##   INV(A) is tridiagonal: it is minus the second difference matrix
+  ##               except its (N,N) element is 1.
+  ##   2*A-ONES(N) (Givens' matrix) has tridiagonal inverse and
+  ##               eigenvalues .5*sec^2([2r-1)PI/4N], r=1:N.
+  ##   (N+1)*ONES(N)-A also has a tridiagonal inverse.
   ##
-  ##         References:
-  ##         J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
-  ##            Birkhauser, Basel, and Academic Press, New York, 1977, p. 158.
-  ##         D.E. Rutherford, Some continuant determinants arising in physics and
-  ##            chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241.
-  ##            (For the eigenvalues of Givens' matrix.)
+  ##   References:
+  ##   J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
+  ##      Birkhauser, Basel, and Academic Press, New York, 1977, p. 158.
+  ##   D.E. Rutherford, Some continuant determinants arising in physics and
+  ##      chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241.
+  ##      (For the eigenvalues of Givens' matrix.)
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for minij matrix.");
@@ -1782,22 +1784,22 @@
     error ("gallery: N must be an integer for minij matrix.");
   endif
 
-  A = min (ones (n, 1) * (1:n), (1:n)' * ones (1, n));
+  A = bsxfun (@min, 1:n, (1:n)');
 endfunction
 
 function A = moler (n, alpha = -1)
   ## MOLER   Moler matrix - symmetric positive definite.
-  ##         A = MOLER(N, ALPHA) is the symmetric positive definite N-by-N matrix
-  ##         U'*U where U = TRIW(N, ALPHA).
-  ##         For ALPHA = -1 (the default) A(i,j) = MIN(i,j)-2, A(i,i) = i.
-  ##         A has one small eigenvalue.
+  ##   A = MOLER(N, ALPHA) is the symmetric positive definite N-by-N matrix
+  ##   U'*U where U = TRIW(N, ALPHA).
+  ##   For ALPHA = -1 (the default) A(i,j) = MIN(i,j)-2, A(i,i) = i.
+  ##   A has one small eigenvalue.
   ##
-  ##         Nash (1990) attributes the ALPHA = -1 matrix to Moler.
+  ##   Nash (1990) attributes the ALPHA = -1 matrix to Moler.
   ##
-  ##         Reference:
-  ##         J.C. Nash, Compact Numerical Methods for Computers: Linear
-  ##         Algebra and Function Minimisation, second edition, Adam Hilger,
-  ##         Bristol, 1990 (Appendix 1).
+  ##   Reference:
+  ##   J.C. Nash, Compact Numerical Methods for Computers: Linear
+  ##   Algebra and Function Minimisation, second edition, Adam Hilger,
+  ##   Bristol, 1990 (Appendix 1).
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for moler matrix.");
@@ -1812,16 +1814,16 @@
 
 function [A, T] = neumann (n)
   ## NEUMANN  Singular matrix from the discrete Neumann problem (sparse).
-  ##          NEUMANN(N) is the singular, row diagonally dominant matrix resulting
-  ##          from discretizing the Neumann problem with the usual five point
-  ##          operator on a regular mesh.
-  ##          It has a one-dimensional null space with null vector ONES(N,1).
-  ##          The dimension N should be a perfect square, or else a 2-vector,
-  ##          in which case the dimension of the matrix is N(1)*N(2).
+  ##   NEUMANN(N) is the singular, row diagonally dominant matrix resulting
+  ##   from discretizing the Neumann problem with the usual five point
+  ##   operator on a regular mesh.
+  ##   It has a one-dimensional null space with null vector ONES(N,1).
+  ##   The dimension N should be a perfect square, or else a 2-vector,
+  ##   in which case the dimension of the matrix is N(1)*N(2).
   ##
-  ##          Reference:
-  ##          R.J. Plemmons, Regular splittings and the discrete Neumann
-  ##          problem, Numer. Math., 25 (1976), pp. 153-161.
+  ##   Reference:
+  ##   R.J. Plemmons, Regular splittings and the discrete Neumann
+  ##   problem, Numer. Math., 25 (1976), pp. 153-161.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for neumann matrix.");
@@ -1888,37 +1890,37 @@
 
 function Q = orthog (n, k = 1)
   ## ORTHOG Orthogonal and nearly orthogonal matrices.
-  ##        Q = ORTHOG(N, K) selects the K'th type of matrix of order N.
-  ##        K > 0 for exactly orthogonal matrices, K < 0 for diagonal scalings of
-  ##        orthogonal matrices.
-  ##        Available types: (K = 1 is the default)
-  ##        K = 1:  Q(i,j) = SQRT(2/(n+1)) * SIN( i*j*PI/(n+1) )
-  ##                Symmetric eigenvector matrix for second difference matrix.
-  ##        K = 2:  Q(i,j) = 2/SQRT(2*n+1)) * SIN( 2*i*j*PI/(2*n+1) )
-  ##                Symmetric.
-  ##        K = 3:  Q(r,s) = EXP(2*PI*i*(r-1)*(s-1)/n) / SQRT(n)  (i=SQRT(-1))
-  ##                Unitary, the Fourier matrix.  Q^4 is the identity.
-  ##                This is essentially the same matrix as FFT(EYE(N))/SQRT(N)!
-  ##        K = 4:  Helmert matrix: a permutation of a lower Hessenberg matrix,
-  ##                whose first row is ONES(1:N)/SQRT(N).
-  ##        K = 5:  Q(i,j) = SIN( 2*PI*(i-1)*(j-1)/n ) + COS( 2*PI*(i-1)*(j-1)/n ).
-  ##                Symmetric matrix arising in the Hartley transform.
-  ##        K = -1: Q(i,j) = COS( (i-1)*(j-1)*PI/(n-1) )
-  ##                Chebyshev Vandermonde-like matrix, based on extrema of T(n-1).
-  ##        K = -2: Q(i,j) = COS( (i-1)*(j-1/2)*PI/n) )
-  ##                Chebyshev Vandermonde-like matrix, based on zeros of T(n).
+  ##   Q = ORTHOG(N, K) selects the K'th type of matrix of order N.
+  ##   K > 0 for exactly orthogonal matrices, K < 0 for diagonal scalings of
+  ##   orthogonal matrices.
+  ##   Available types: (K = 1 is the default)
+  ##   K = 1:  Q(i,j) = SQRT(2/(n+1)) * SIN( i*j*PI/(n+1) )
+  ##           Symmetric eigenvector matrix for second difference matrix.
+  ##   K = 2:  Q(i,j) = 2/SQRT(2*n+1)) * SIN( 2*i*j*PI/(2*n+1) )
+  ##           Symmetric.
+  ##   K = 3:  Q(r,s) = EXP(2*PI*i*(r-1)*(s-1)/n) / SQRT(n)  (i=SQRT(-1))
+  ##           Unitary, the Fourier matrix.  Q^4 is the identity.
+  ##           This is essentially the same matrix as FFT(EYE(N))/SQRT(N)!
+  ##   K = 4:  Helmert matrix: a permutation of a lower Hessenberg matrix,
+  ##           whose first row is ONES(1:N)/SQRT(N).
+  ##   K = 5:  Q(i,j) = SIN( 2*PI*(i-1)*(j-1)/n ) + COS( 2*PI*(i-1)*(j-1)/n ).
+  ##           Symmetric matrix arising in the Hartley transform.
+  ##   K = -1: Q(i,j) = COS( (i-1)*(j-1)*PI/(n-1) )
+  ##           Chebyshev Vandermonde-like matrix, based on extrema of T(n-1).
+  ##   K = -2: Q(i,j) = COS( (i-1)*(j-1/2)*PI/n) )
+  ##           Chebyshev Vandermonde-like matrix, based on zeros of T(n).
   ##
-  ##        References:
-  ##        N.J. Higham and D.J. Higham, Large growth factors in Gaussian
-  ##             elimination with pivoting, SIAM J. Matrix Analysis and  Appl.,
-  ##             10 (1989), pp. 155-164.
-  ##        P. Morton, On the eigenvectors of Schur's matrix, J. Number Theory,
-  ##             12 (1980), pp. 122-127. (Re. ORTHOG(N, 3))
-  ##        H.O. Lancaster, The Helmert Matrices, Amer. Math. Monthly, 72 (1965),
-  ##             pp. 4-12.
-  ##        D. Bini and P. Favati, On a matrix algebra related to the discrete
-  ##             Hartley transform, SIAM J. Matrix Anal. Appl., 14 (1993),
-  ##             pp. 500-507.
+  ##   References:
+  ##   N.J. Higham and D.J. Higham, Large growth factors in Gaussian
+  ##        elimination with pivoting, SIAM J. Matrix Analysis and  Appl.,
+  ##        10 (1989), pp. 155-164.
+  ##   P. Morton, On the eigenvectors of Schur's matrix, J. Number Theory,
+  ##        12 (1980), pp. 122-127. (Re. ORTHOG(N, 3))
+  ##   H.O. Lancaster, The Helmert Matrices, Amer. Math. Monthly, 72 (1965),
+  ##        pp. 4-12.
+  ##   D. Bini and P. Favati, On a matrix algebra related to the discrete
+  ##        Hartley transform, SIAM J. Matrix Anal. Appl., 14 (1993),
+  ##        pp. 500-507.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for orthog matrix.");
@@ -1974,20 +1976,20 @@
 
 function A = parter (n)
   ## PARTER    Parter matrix - a Toeplitz matrix with singular values near PI.
-  ##           PARTER(N) is the matrix with (i,j) element 1/(i-j+0.5).
-  ##           It is a Cauchy matrix and a Toeplitz matrix.
+  ##   PARTER(N) is the matrix with (i,j) element 1/(i-j+0.5).
+  ##   It is a Cauchy matrix and a Toeplitz matrix.
   ##
-  ##           At the Second SIAM Conference on Linear Algebra, Raleigh, N.C.,
-  ##           1985, Cleve Moler noted that most of the singular values of
-  ##           PARTER(N) are very close to PI.  An explanation of the phenomenon
-  ##           was given by Parter; see also the paper by Tyrtyshnikov.
+  ##   At the Second SIAM Conference on Linear Algebra, Raleigh, N.C.,
+  ##   1985, Cleve Moler noted that most of the singular values of
+  ##   PARTER(N) are very close to PI.  An explanation of the phenomenon
+  ##   was given by Parter; see also the paper by Tyrtyshnikov.
   ##
-  ##           References:
-  ##           The MathWorks Newsletter, Volume 1, Issue 1, March 1986, page 2.
-  ##           S.V. Parter, On the distribution of the singular values of Toeplitz
-  ##                matrices, Linear Algebra and Appl., 80 (1986), pp. 115-130.
-  ##           E.E. Tyrtyshnikov, Cauchy-Toeplitz matrices and some applications,
-  ##                Linear Algebra and Appl., 149 (1991), pp. 1-18.
+  ##   References:
+  ##   The MathWorks Newsletter, Volume 1, Issue 1, March 1986, page 2.
+  ##   S.V. Parter, On the distribution of the singular values of Toeplitz
+  ##        matrices, Linear Algebra and Appl., 80 (1986), pp. 115-130.
+  ##   E.E. Tyrtyshnikov, Cauchy-Toeplitz matrices and some applications,
+  ##        Linear Algebra and Appl., 149 (1991), pp. 1-18.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for parter matrix.");
@@ -2000,14 +2002,14 @@
 
 function P = pei (n, alpha = 1)
   ## PEI    Pei matrix.
-  ##        PEI(N, ALPHA), where ALPHA is a scalar, is the symmetric matrix
-  ##        ALPHA*EYE(N) + ONES(N).
-  ##        If ALPHA is omitted then ALPHA = 1 is used.
-  ##        The matrix is singular for ALPHA = 0, -N.
+  ##   PEI(N, ALPHA), where ALPHA is a scalar, is the symmetric matrix
+  ##   ALPHA*EYE(N) + ONES(N).
+  ##   If ALPHA is omitted then ALPHA = 1 is used.
+  ##   The matrix is singular for ALPHA = 0, -N.
   ##
-  ##        Reference:
-  ##        M.L. Pei, A test matrix for inversion procedures,
-  ##        Comm. ACM, 5 (1962), p. 508.
+  ##   Reference:
+  ##   M.L. Pei, A test matrix for inversion procedures,
+  ##   Comm. ACM, 5 (1962), p. 508.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for pei matrix.");
@@ -2022,14 +2024,14 @@
 
 function A = poisson (n)
   ## POISSON   Block tridiagonal matrix from Poisson's equation (sparse).
-  ##           POISSON(N) is the block tridiagonal matrix of order N^2
-  ##           resulting from discretizing Poisson's equation with the
-  ##           5-point operator on an N-by-N mesh.
+  ##   POISSON(N) is the block tridiagonal matrix of order N^2
+  ##   resulting from discretizing Poisson's equation with the
+  ##   5-point operator on an N-by-N mesh.
   ##
-  ##           Reference:
-  ##           G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
-  ##           Johns Hopkins University Press, Baltimore, Maryland, 1989
-  ##           (Section 4.5.4).
+  ##   Reference:
+  ##   G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
+  ##   Johns Hopkins University Press, Baltimore, Maryland, 1989
+  ##   (Section 4.5.4).
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for poisson matrix.");
@@ -2044,17 +2046,17 @@
 
 function A = prolate (n, w = 0.25)
   ## PROLATE   Prolate matrix - symmetric, ill-conditioned Toeplitz matrix.
-  ##           A = PROLATE(N, W) is the N-by-N prolate matrix with parameter W.
-  ##           It is a symmetric Toeplitz matrix.
-  ##           If 0 < W < 0.5 then
-  ##              - A is positive definite
-  ##              - the eigenvalues of A are distinct, lie in (0, 1), and
-  ##                tend to cluster around 0 and 1.
-  ##           W defaults to 0.25.
+  ##   A = PROLATE(N, W) is the N-by-N prolate matrix with parameter W.
+  ##   It is a symmetric Toeplitz matrix.
+  ##   If 0 < W < 0.5 then
+  ##      - A is positive definite
+  ##      - the eigenvalues of A are distinct, lie in (0, 1), and
+  ##        tend to cluster around 0 and 1.
+  ##   W defaults to 0.25.
   ##
-  ##           Reference:
-  ##           J.M. Varah. The Prolate matrix. Linear Algebra and Appl.,
-  ##           187:269--278, 1993.
+  ##   Reference:
+  ##   J.M. Varah. The Prolate matrix. Linear Algebra and Appl.,
+  ##   187:269--278, 1993.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for prolate matrix.");
@@ -2074,23 +2076,23 @@
 function H = randhess (x)
   ## NOTE: this function was named ohess in the original Test Matrix Toolbox
   ## RANDHESS  Random, orthogonal upper Hessenberg matrix.
-  ##        H = RANDHESS(N) is an N-by-N real, random, orthogonal
-  ##        upper Hessenberg matrix.
-  ##        Alternatively, H = RANDHESS(X), where X is an arbitrary real
-  ##        N-vector (N > 1) constructs H non-randomly using the elements
-  ##        of X as parameters.
-  ##        In both cases H is constructed via a product of N-1 Givens rotations.
+  ##   H = RANDHESS(N) is an N-by-N real, random, orthogonal
+  ##   upper Hessenberg matrix.
+  ##   Alternatively, H = RANDHESS(X), where X is an arbitrary real
+  ##   N-vector (N > 1) constructs H non-randomly using the elements
+  ##   of X as parameters.
+  ##   In both cases H is constructed via a product of N-1 Givens rotations.
   ##
-  ##        Note: See Gragg (1986) for how to represent an N-by-N (complex)
-  ##        unitary Hessenberg matrix with positive subdiagonal elements in terms
-  ##        of 2N-1 real parameters (the Schur parametrization).
-  ##        This M-file handles the real case only and is intended simply as a
-  ##        convenient way to generate random or non-random orthogonal Hessenberg
-  ##        matrices.
+  ##   Note: See Gragg (1986) for how to represent an N-by-N (complex)
+  ##   unitary Hessenberg matrix with positive subdiagonal elements in terms
+  ##   of 2N-1 real parameters (the Schur parametrization).
+  ##   This M-file handles the real case only and is intended simply as a
+  ##   convenient way to generate random or non-random orthogonal Hessenberg
+  ##   matrices.
   ##
-  ##        Reference:
-  ##        W.B. Gragg, The QR algorithm for unitary Hessenberg matrices,
-  ##        J. Comp. Appl. Math., 16 (1986), pp. 1-8.
+  ##   Reference:
+  ##   W.B. Gragg, The QR algorithm for unitary Hessenberg matrices,
+  ##   J. Comp. Appl. Math., 16 (1986), pp. 1-8.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for randhess matrix.");
@@ -2123,12 +2125,12 @@
 
 function A = rando (n, k = 1)
   ## RANDO   Random matrix with elements -1, 0 or 1.
-  ##         A = RANDO(N, K) is a random N-by-N matrix with elements from
-  ##         one of the following discrete distributions (default K = 1):
-  ##           K = 1:  A(i,j) =  0 or 1    with equal probability,
-  ##           K = 2:  A(i,j) = -1 or 1    with equal probability,
-  ##           K = 3:  A(i,j) = -1, 0 or 1 with equal probability.
-  ##         N may be a 2-vector, in which case the matrix is N(1)-by-N(2).
+  ##   A = RANDO(N, K) is a random N-by-N matrix with elements from
+  ##   one of the following discrete distributions (default K = 1):
+  ##     K = 1:  A(i,j) =  0 or 1    with equal probability,
+  ##     K = 2:  A(i,j) = -1 or 1    with equal probability,
+  ##     K = 3:  A(i,j) = -1, 0 or 1 with equal probability.
+  ##   N may be a 2-vector, in which case the matrix is N(1)-by-N(2).
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for rando matrix.");
@@ -2154,37 +2156,37 @@
 
 function A = randsvd (n, kappa = sqrt (1/eps), mode = 3, kl = n-1, ku = kl)
   ## RANDSVD  Random matrix with pre-assigned singular values.
-  ##       RANDSVD(N, KAPPA, MODE, KL, KU) is a (banded) random matrix of order N
-  ##       with COND(A) = KAPPA and singular values from the distribution MODE.
-  ##       N may be a 2-vector, in which case the matrix is N(1)-by-N(2).
-  ##       Available types:
-  ##              MODE = 1:   one large singular value,
-  ##              MODE = 2:   one small singular value,
-  ##              MODE = 3:   geometrically distributed singular values,
-  ##              MODE = 4:   arithmetically distributed singular values,
-  ##              MODE = 5:   random singular values with unif. dist. logarithm.
-  ##       If omitted, MODE defaults to 3, and KAPPA defaults to SQRT(1/EPS).
-  ##       If MODE < 0 then the effect is as for ABS(MODE) except that in the
-  ##       original matrix of singular values the order of the diagonal entries
-  ##       is reversed: small to large instead of large to small.
-  ##       KL and KU are the lower and upper bandwidths respectively; if they
-  ##       are omitted a full matrix is produced.
-  ##       If only KL is present, KU defaults to KL.
-  ##       Special case: if KAPPA < 0 then a random full symmetric positive
-  ##                     definite matrix is produced with COND(A) = -KAPPA and
-  ##                     eigenvalues distributed according to MODE.
-  ##                     KL and KU, if present, are ignored.
+  ##   RANDSVD(N, KAPPA, MODE, KL, KU) is a (banded) random matrix of order N
+  ##   with COND(A) = KAPPA and singular values from the distribution MODE.
+  ##   N may be a 2-vector, in which case the matrix is N(1)-by-N(2).
+  ##   Available types:
+  ##          MODE = 1:   one large singular value,
+  ##          MODE = 2:   one small singular value,
+  ##          MODE = 3:   geometrically distributed singular values,
+  ##          MODE = 4:   arithmetically distributed singular values,
+  ##          MODE = 5:   random singular values with unif. dist. logarithm.
+  ##   If omitted, MODE defaults to 3, and KAPPA defaults to SQRT(1/EPS).
+  ##   If MODE < 0 then the effect is as for ABS(MODE) except that in the
+  ##   original matrix of singular values the order of the diagonal entries
+  ##   is reversed: small to large instead of large to small.
+  ##   KL and KU are the lower and upper bandwidths respectively; if they
+  ##   are omitted a full matrix is produced.
+  ##   If only KL is present, KU defaults to KL.
+  ##   Special case: if KAPPA < 0 then a random full symmetric positive
+  ##                 definite matrix is produced with COND(A) = -KAPPA and
+  ##                 eigenvalues distributed according to MODE.
+  ##                 KL and KU, if present, are ignored.
   ##
-  ##       Reference:
-  ##       N.J. Higham, Accuracy and Stability of Numerical Algorithms,
-  ##          Society for Industrial and Applied Mathematics, Philadelphia, PA,
-  ##          USA, 1996; sec. 26.3.
+  ##   Reference:
+  ##   N.J. Higham, Accuracy and Stability of Numerical Algorithms,
+  ##      Society for Industrial and Applied Mathematics, Philadelphia, PA,
+  ##      USA, 1996; sec. 26.3.
   ##
-  ##       This routine is similar to the more comprehensive Fortran routine xLATMS
-  ##       in the following reference:
-  ##       J.W. Demmel and A. McKenney, A test matrix generation suite,
-  ##       LAPACK Working Note #9, Courant Institute of Mathematical Sciences,
-  ##       New York, 1989.
+  ##   This routine is similar to the more comprehensive Fortran routine xLATMS
+  ##   in the following reference:
+  ##   J.W. Demmel and A. McKenney, A test matrix generation suite,
+  ##   LAPACK Working Note #9, Courant Institute of Mathematical Sciences,
+  ##   New York, 1989.
 
   if (nargin < 1 || nargin > 5)
     error ("gallery: 1 to 5 arguments are required for randsvd matrix.");
@@ -2243,7 +2245,7 @@
 
   ##  Convert to diagonal matrix of singular values.
   if (mode < 0)
-    sigma = sigma (p:-1:1);
+    sigma = sigma(p:-1:1);
   endif
   sigma = diag (sigma);
 
@@ -2278,28 +2280,28 @@
 
 function A = redheff (n)
   ## REDHEFF    A (0,1) matrix of Redheffer associated with the Riemann hypothesis.
-  ##            A = REDHEFF(N) is an N-by-N matrix of 0s and 1s defined by
-  ##                A(i,j) = 1 if j = 1 or if i divides j,
-  ##                A(i,j) = 0 otherwise.
-  ##            It has N - FLOOR(LOG2(N)) - 1 eigenvalues equal to 1,
-  ##            a real eigenvalue (the spectral radius) approximately SQRT(N),
-  ##            a negative eigenvalue approximately -SQRT(N),
-  ##            and the remaining eigenvalues are provably ``small''.
-  ##            Barrett and Jarvis (1992) conjecture that
-  ##              ``the small eigenvalues all lie inside the unit circle
-  ##                ABS(Z) = 1'',
-  ##            and a proof of this conjecture, together with a proof that some
-  ##            eigenvalue tends to zero as N tends to infinity, would yield
-  ##            a new proof of the prime number theorem.
-  ##            The Riemann hypothesis is true if and only if
-  ##            DET(A) = O( N^(1/2+epsilon) ) for every epsilon > 0
-  ##                                              (`!' denotes factorial).
-  ##            See also RIEMANN.
+  ##   A = REDHEFF(N) is an N-by-N matrix of 0s and 1s defined by
+  ##       A(i,j) = 1 if j = 1 or if i divides j,
+  ##       A(i,j) = 0 otherwise.
+  ##   It has N - FLOOR(LOG2(N)) - 1 eigenvalues equal to 1,
+  ##   a real eigenvalue (the spectral radius) approximately SQRT(N),
+  ##   a negative eigenvalue approximately -SQRT(N),
+  ##   and the remaining eigenvalues are provably ``small''.
+  ##   Barrett and Jarvis (1992) conjecture that
+  ##     ``the small eigenvalues all lie inside the unit circle
+  ##       ABS(Z) = 1'',
+  ##   and a proof of this conjecture, together with a proof that some
+  ##   eigenvalue tends to zero as N tends to infinity, would yield
+  ##   a new proof of the prime number theorem.
+  ##   The Riemann hypothesis is true if and only if
+  ##   DET(A) = O( N^(1/2+epsilon) ) for every epsilon > 0
+  ##                                     (`!' denotes factorial).
+  ##   See also RIEMANN.
   ##
-  ##            Reference:
-  ##            W.W. Barrett and T.J. Jarvis,
-  ##            Spectral Properties of a Matrix of Redheffer,
-  ##            Linear Algebra and Appl., 162 (1992), pp. 673-683.
+  ##   Reference:
+  ##   W.W. Barrett and T.J. Jarvis,
+  ##   Spectral Properties of a Matrix of Redheffer,
+  ##   Linear Algebra and Appl., 162 (1992), pp. 673-683.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for redheff matrix.");
@@ -2314,22 +2316,22 @@
 
 function A = riemann (n)
   ## RIEMANN    A matrix associated with the Riemann hypothesis.
-  ##            A = RIEMANN(N) is an N-by-N matrix for which the
-  ##            Riemann hypothesis is true if and only if
-  ##            DET(A) = O( N! N^(-1/2+epsilon) ) for every epsilon > 0
-  ##                                              (`!' denotes factorial).
-  ##            A = B(2:N+1, 2:N+1), where
-  ##            B(i,j) = i-1 if i divides j and -1 otherwise.
-  ##            Properties include, with M = N+1:
-  ##               Each eigenvalue E(i) satisfies ABS(E(i)) <= M - 1/M.
-  ##               i <= E(i) <= i+1 with at most M-SQRT(M) exceptions.
-  ##               All integers in the interval (M/3, M/2] are eigenvalues.
+  ##   A = RIEMANN(N) is an N-by-N matrix for which the
+  ##   Riemann hypothesis is true if and only if
+  ##   DET(A) = O( N! N^(-1/2+epsilon) ) for every epsilon > 0
+  ##                                     (`!' denotes factorial).
+  ##   A = B(2:N+1, 2:N+1), where
+  ##   B(i,j) = i-1 if i divides j and -1 otherwise.
+  ##   Properties include, with M = N+1:
+  ##      Each eigenvalue E(i) satisfies ABS(E(i)) <= M - 1/M.
+  ##      i <= E(i) <= i+1 with at most M-SQRT(M) exceptions.
+  ##      All integers in the interval (M/3, M/2] are eigenvalues.
   ##
-  ##            See also REDHEFF.
+  ##   See also REDHEFF.
   ##
-  ##            Reference:
-  ##            F. Roesler, Riemann's hypothesis as an eigenvalue problem,
-  ##            Linear Algebra and Appl., 81 (1986), pp. 153-198.
+  ##   Reference:
+  ##   F. Roesler, Riemann's hypothesis as an eigenvalue problem,
+  ##   Linear Algebra and Appl., 81 (1986), pp. 153-198.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for riemann matrix.");
@@ -2346,16 +2348,16 @@
 function A = ris (n)
   ## NOTE: this function was named dingdong in the original Test Matrix Toolbox
   ## RIS       Dingdong matrix - a symmetric Hankel matrix.
-  ##           A = RIS(N) is the symmetric N-by-N Hankel matrix with
-  ##                          A(i,j) = 0.5/(N-i-j+1.5).
-  ##           The eigenvalues of A cluster around PI/2 and -PI/2.
+  ##   A = RIS(N) is the symmetric N-by-N Hankel matrix with
+  ##                  A(i,j) = 0.5/(N-i-j+1.5).
+  ##   The eigenvalues of A cluster around PI/2 and -PI/2.
   ##
-  ##           Invented by F.N. Ris.
+  ##   Invented by F.N. Ris.
   ##
-  ##           Reference:
-  ##           J.C. Nash, Compact Numerical Methods for Computers: Linear
-  ##           Algebra and Function Minimisation, second edition, Adam Hilger,
-  ##           Bristol, 1990 (Appendix 1).
+  ##   Reference:
+  ##   J.C. Nash, Compact Numerical Methods for Computers: Linear
+  ##   Algebra and Function Minimisation, second edition, Adam Hilger,
+  ##   Bristol, 1990 (Appendix 1).
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for ris matrix.");
@@ -2369,20 +2371,20 @@
 
 function A = smoke (n, k = 0)
   ## SMOKE     Smoke matrix - complex, with a `smoke ring' pseudospectrum.
-  ##           SMOKE(N) is an N-by-N matrix with 1s on the
-  ##           superdiagonal, 1 in the (N,1) position, and powers of
-  ##           roots of unity along the diagonal.
-  ##           SMOKE(N, 1) is the same except for a zero (N,1) element.
-  ##           The eigenvalues of SMOKE(N, 1) are the N'th roots of unity;
-  ##           those of SMOKE(N) are the N'th roots of unity times 2^(1/N).
+  ##   SMOKE(N) is an N-by-N matrix with 1s on the
+  ##   superdiagonal, 1 in the (N,1) position, and powers of
+  ##   roots of unity along the diagonal.
+  ##   SMOKE(N, 1) is the same except for a zero (N,1) element.
+  ##   The eigenvalues of SMOKE(N, 1) are the N'th roots of unity;
+  ##   those of SMOKE(N) are the N'th roots of unity times 2^(1/N).
   ##
-  ##           Try PS(SMOKE(32)).  For SMOKE(N, 1) the pseudospectrum looks
-  ##           like a sausage folded back on itself.
-  ##           GERSH(SMOKE(N, 1)) is interesting.
+  ##   Try PS(SMOKE(32)).  For SMOKE(N, 1) the pseudospectrum looks
+  ##   like a sausage folded back on itself.
+  ##   GERSH(SMOKE(N, 1)) is interesting.
   ##
-  ##           Reference:
-  ##           L. Reichel and L.N. Trefethen, Eigenvalues and pseudo-eigenvalues of
-  ##           Toeplitz matrices, Linear Algebra and Appl., 162-164:153-185, 1992.
+  ##   Reference:
+  ##   L. Reichel and L.N. Trefethen, Eigenvalues and pseudo-eigenvalues of
+  ##   Toeplitz matrices, Linear Algebra and Appl., 162-164:153-185, 1992.
 
   if (nargin < 1 || nargin > 2)
     error ("gallery: 1 to 2 arguments are required for smoke matrix.");
@@ -2406,18 +2408,18 @@
 function T = toeppd (n, m = n, w = rand (m,1), theta = rand (m,1))
   ## NOTE: this function was named pdtoep in the original Test Matrix Toolbox
   ## TOEPPD   Symmetric positive definite Toeplitz matrix.
-  ##          TOEPPD(N, M, W, THETA) is an N-by-N symmetric positive (semi-)
-  ##          definite (SPD) Toeplitz matrix, comprised of the sum of M rank 2
-  ##          (or, for certain THETA, rank 1) SPD Toeplitz matrices.
-  ##          Specifically,
-  ##                  T = W(1)*T(THETA(1)) + ... + W(M)*T(THETA(M)),
-  ##          where T(THETA(k)) has (i,j) element COS(2*PI*THETA(k)*(i-j)).
-  ##          Defaults: M = N, W = RAND(M,1), THETA = RAND(M,1).
+  ##   TOEPPD(N, M, W, THETA) is an N-by-N symmetric positive (semi-)
+  ##   definite (SPD) Toeplitz matrix, comprised of the sum of M rank 2
+  ##   (or, for certain THETA, rank 1) SPD Toeplitz matrices.
+  ##   Specifically,
+  ##           T = W(1)*T(THETA(1)) + ... + W(M)*T(THETA(M)),
+  ##   where T(THETA(k)) has (i,j) element COS(2*PI*THETA(k)*(i-j)).
+  ##   Defaults: M = N, W = RAND(M,1), THETA = RAND(M,1).
   ##
-  ##          Reference:
-  ##          G. Cybenko and C.F. Van Loan, Computing the minimum eigenvalue of
-  ##          a symmetric positive definite Toeplitz matrix, SIAM J. Sci. Stat.
-  ##          Comput., 7 (1986), pp. 123-131.
+  ##   Reference:
+  ##   G. Cybenko and C.F. Van Loan, Computing the minimum eigenvalue of
+  ##   a symmetric positive definite Toeplitz matrix, SIAM J. Sci. Stat.
+  ##   Comput., 7 (1986), pp. 123-131.
 
   if (nargin < 1 || nargin > 4)
     error ("gallery: 1 to 4 arguments are required for toeppd matrix.");
@@ -2440,25 +2442,25 @@
 function P = toeppen (n, a = 1, b = -10, c = 0, d = 10, e = 1)
   ## NOTE: this function was named pentoep in the original Test Matrix Toolbox
   ## TOEPPEN   Pentadiagonal Toeplitz matrix (sparse).
-  ##           P = TOEPPEN(N, A, B, C, D, E) is the N-by-N pentadiagonal
-  ##           Toeplitz matrix with diagonals composed of the numbers
-  ##           A =: P(3,1), B =: P(2,1), C =: P(1,1), D =: P(1,2), E =: P(1,3).
-  ##           Default: (A,B,C,D,E) = (1,-10,0,10,1) (a matrix of Rutishauser).
-  ##                     This matrix has eigenvalues lying approximately on
-  ##                     the line segment 2*cos(2*t) + 20*i*sin(t).
+  ##   P = TOEPPEN(N, A, B, C, D, E) is the N-by-N pentadiagonal
+  ##   Toeplitz matrix with diagonals composed of the numbers
+  ##   A =: P(3,1), B =: P(2,1), C =: P(1,1), D =: P(1,2), E =: P(1,3).
+  ##   Default: (A,B,C,D,E) = (1,-10,0,10,1) (a matrix of Rutishauser).
+  ##             This matrix has eigenvalues lying approximately on
+  ##             the line segment 2*cos(2*t) + 20*i*sin(t).
   ##
-  ##           Interesting plots are
-  ##           PS(FULL(TOEPPEN(32,0,1,0,0,1/4)))  - `triangle'
-  ##           PS(FULL(TOEPPEN(32,0,1/2,0,0,1)))  - `propeller'
-  ##           PS(FULL(TOEPPEN(32,0,1/2,1,1,1)))  - `fish'
+  ##   Interesting plots are
+  ##   PS(FULL(TOEPPEN(32,0,1,0,0,1/4)))  - `triangle'
+  ##   PS(FULL(TOEPPEN(32,0,1/2,0,0,1)))  - `propeller'
+  ##   PS(FULL(TOEPPEN(32,0,1/2,1,1,1)))  - `fish'
   ##
-  ##           References:
-  ##           R.M. Beam and R.F. Warming, The asymptotic spectra of
-  ##              banded Toeplitz and quasi-Toeplitz matrices, SIAM J. Sci.
-  ##              Comput. 14 (4), 1993, pp. 971-1006.
-  ##           H. Rutishauser, On test matrices, Programmation en Mathematiques
-  ##              Numeriques, Editions Centre Nat. Recherche Sci., Paris, 165,
-  ##              1966, pp. 349-365.
+  ##   References:
+  ##   R.M. Beam and R.F. Warming, The asymptotic spectra of
+  ##      banded Toeplitz and quasi-Toeplitz matrices, SIAM J. Sci.
+  ##      Comput. 14 (4), 1993, pp. 971-1006.
+  ##   H. Rutishauser, On test matrices, Programmation en Mathematiques
+  ##      Numeriques, Editions Centre Nat. Recherche Sci., Paris, 165,
+  ##      1966, pp. 349-365.
 
   if (nargin < 1 || nargin > 6)
     error ("gallery: 1 to 6 arguments are required for toeppen matrix.");
@@ -2474,23 +2476,23 @@
 
 function T = tridiag (n, x = -1, y = 2, z = -1)
   ## TRIDIAG  Tridiagonal matrix (sparse).
-  ##          TRIDIAG(X, Y, Z) is the tridiagonal matrix with subdiagonal X,
-  ##          diagonal Y, and superdiagonal Z.
-  ##          X and Z must be vectors of dimension one less than Y.
-  ##          Alternatively TRIDIAG(N, C, D, E), where C, D, and E are all
-  ##          scalars, yields the Toeplitz tridiagonal matrix of order N
-  ##          with subdiagonal elements C, diagonal elements D, and superdiagonal
-  ##          elements E.   This matrix has eigenvalues (Todd 1977)
-  ##                   D + 2*SQRT(C*E)*COS(k*PI/(N+1)), k=1:N.
-  ##          TRIDIAG(N) is the same as TRIDIAG(N,-1,2,-1), which is
-  ##          a symmetric positive definite M-matrix (the negative of the
-  ##          second difference matrix).
+  ##   TRIDIAG(X, Y, Z) is the tridiagonal matrix with subdiagonal X,
+  ##   diagonal Y, and superdiagonal Z.
+  ##   X and Z must be vectors of dimension one less than Y.
+  ##   Alternatively TRIDIAG(N, C, D, E), where C, D, and E are all
+  ##   scalars, yields the Toeplitz tridiagonal matrix of order N
+  ##   with subdiagonal elements C, diagonal elements D, and superdiagonal
+  ##   elements E.   This matrix has eigenvalues (Todd 1977)
+  ##            D + 2*SQRT(C*E)*COS(k*PI/(N+1)), k=1:N.
+  ##   TRIDIAG(N) is the same as TRIDIAG(N,-1,2,-1), which is
+  ##   a symmetric positive definite M-matrix (the negative of the
+  ##   second difference matrix).
   ##
-  ##          References:
-  ##          J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
-  ##            Birkhauser, Basel, and Academic Press, New York, 1977, p. 155.
-  ##          D.E. Rutherford, Some continuant determinants arising in physics and
-  ##            chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241.
+  ##   References:
+  ##   J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
+  ##     Birkhauser, Basel, and Academic Press, New York, 1977, p. 155.
+  ##   D.E. Rutherford, Some continuant determinants arising in physics and
+  ##     chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241.
 
   if (nargin != 1 && nargin != 3 && nargin != 4)
     error ("gallery: 1, 3, or 4 arguments are required for tridiag matrix.");
@@ -2520,35 +2522,35 @@
   T = spdiags ([[x;0] y [0;z]], -1:1, n, n);
 endfunction
 
-function t = triw (n, alpha = -1, k = -1)
+function t = triw (n, alpha = -1, k = n(end) - 1)
   ## TRIW   Upper triangular matrix discussed by Wilkinson and others.
-  ##        TRIW(N, ALPHA, K) is the upper triangular matrix with ones on
-  ##        the diagonal and ALPHAs on the first K >= 0 superdiagonals.
-  ##        N may be a 2-vector, in which case the matrix is N(1)-by-N(2) and
-  ##        upper trapezoidal.
-  ##        Defaults: ALPHA = -1,
-  ##                  K = N - 1     (full upper triangle).
-  ##        TRIW(N) is a matrix discussed by Kahan, Golub and Wilkinson.
+  ##   TRIW(N, ALPHA, K) is the upper triangular matrix with ones on
+  ##   the diagonal and ALPHAs on the first K >= 0 superdiagonals.
+  ##   N may be a 2-vector, in which case the matrix is N(1)-by-N(2) and
+  ##   upper trapezoidal.
+  ##   Defaults: ALPHA = -1,
+  ##             K = N - 1     (full upper triangle).
+  ##   TRIW(N) is a matrix discussed by Kahan, Golub and Wilkinson.
   ##
-  ##        Ostrowski (1954) shows that
-  ##          COND(TRIW(N,2)) = COT(PI/(4*N))^2,
-  ##        and for large ABS(ALPHA),
-  ##          COND(TRIW(N,ALPHA)) is approximately ABS(ALPHA)^N*SIN(PI/(4*N-2)).
+  ##   Ostrowski (1954) shows that
+  ##     COND(TRIW(N,2)) = COT(PI/(4*N))^2,
+  ##   and for large ABS(ALPHA),
+  ##     COND(TRIW(N,ALPHA)) is approximately ABS(ALPHA)^N*SIN(PI/(4*N-2)).
   ##
-  ##        Adding -2^(2-N) to the (N,1) element makes TRIW(N) singular,
-  ##        as does adding -2^(1-N) to all elements in the first column.
+  ##   Adding -2^(2-N) to the (N,1) element makes TRIW(N) singular,
+  ##   as does adding -2^(1-N) to all elements in the first column.
   ##
-  ##        References:
-  ##        G.H. Golub and J.H. Wilkinson, Ill-conditioned eigensystems and the
-  ##           computation of the Jordan canonical form, SIAM Review,
-  ##           18(4), 1976, pp. 578-619.
-  ##        W. Kahan, Numerical linear algebra, Canadian Math. Bulletin,
-  ##           9 (1966), pp. 757-801.
-  ##        A.M. Ostrowski, On the spectrum of a one-parametric family of
-  ##           matrices, J. Reine Angew. Math., 193 (3/4), 1954, pp. 143-160.
-  ##        J.H. Wilkinson, Singular-value decomposition---basic aspects,
-  ##           in D.A.H. Jacobs, ed., Numerical Software---Needs and Availability,
-  ##           Academic Press, London, 1978, pp. 109-135.
+  ##   References:
+  ##   G.H. Golub and J.H. Wilkinson, Ill-conditioned eigensystems and the
+  ##      computation of the Jordan canonical form, SIAM Review,
+  ##      18(4), 1976, pp. 578-619.
+  ##   W. Kahan, Numerical linear algebra, Canadian Math. Bulletin,
+  ##      9 (1966), pp. 757-801.
+  ##   A.M. Ostrowski, On the spectrum of a one-parametric family of
+  ##      matrices, J. Reine Angew. Math., 193 (3/4), 1954, pp. 143-160.
+  ##   J.H. Wilkinson, Singular-value decomposition---basic aspects,
+  ##      in D.A.H. Jacobs, ed., Numerical Software---Needs and Availability,
+  ##      Academic Press, London, 1978, pp. 109-135.
 
   if (nargin < 1 || nargin > 3)
     error ("gallery: 1 to 3 arguments are required for triw matrix.");
@@ -2556,8 +2558,8 @@
     error ("gallery: N must be a 1 or 2 elements vector for triw matrix.");
   elseif (! isscalar (alpha))
     error ("gallery: ALPHA must be a scalar for triw matrix.");
-  elseif (! isscalar (k) || ! isnumeric (k) || fix (k) != k)
-    error ("gallery: K must be a numeric integer for triw matrix.");
+  elseif (! isscalar (k) || ! isnumeric (k) || fix (k) != k || k < 0)
+    error ("gallery: K must be a numeric integer >= 0 for triw matrix.");
   endif
 
   m = n(1);              # Parameter n specifies dimension: m-by-n.
@@ -2608,79 +2610,79 @@
 endfunction
 
 function A = wathen (nx, ny, k = 0)
-  ## # WATHEN returns the Wathen matrix.
+  ## WATHEN returns the Wathen matrix.
   ##
-  ##   Discussion:
+  ## Discussion:
   ##
-  ##     The Wathen matrix is a finite element matrix which is sparse.
+  ##   The Wathen matrix is a finite element matrix which is sparse.
   ##
-  ##     The entries of the matrix depend in part on a physical quantity
-  ##     related to density.  That density is here assigned random values between
-  ##     0 and 100.
+  ##   The entries of the matrix depend in part on a physical quantity
+  ##   related to density.  That density is here assigned random values between
+  ##   0 and 100.
   ##
-  ##     A = WATHEN ( NX, NY ) is a sparse random N-by-N finite element matrix
-  ##     where N = 3*NX*NY + 2*NX + 2*NY + 1.
+  ##   A = WATHEN ( NX, NY ) is a sparse random N-by-N finite element matrix
+  ##   where N = 3*NX*NY + 2*NX + 2*NY + 1.
   ##
-  ##     A is the consistent mass matrix for a regular NX-by-NY
-  ##     grid of 8-node (serendipity) elements in 2 space dimensions.
+  ##   A is the consistent mass matrix for a regular NX-by-NY
+  ##   grid of 8-node (serendipity) elements in 2 space dimensions.
   ##
-  ##     Here is an illustration for NX = 3, NX = 2:
+  ##   Here is an illustration for NX = 3, NX = 2:
   ##
-  ##      23-24-25-26-27-28-29
-  ##       |     |     |     |
-  ##      19    20    21    22
-  ##       |     |     |     |
-  ##      12-13-14-15-16-17-18
-  ##       |     |     |     |
-  ##       8     9    10    11
-  ##       |     |     |     |
-  ##       1--2--3--4--5--6--7
+  ##    23-24-25-26-27-28-29
+  ##     |     |     |     |
+  ##    19    20    21    22
+  ##     |     |     |     |
+  ##    12-13-14-15-16-17-18
+  ##     |     |     |     |
+  ##     8     9    10    11
+  ##     |     |     |     |
+  ##     1--2--3--4--5--6--7
   ##
-  ##     For this example, the total number of nodes is, as expected,
+  ##   For this example, the total number of nodes is, as expected,
   ##
-  ##       N = 3 * 3 * 2 + 2 * 2 + 2 * 3 + 1 = 29.
+  ##     N = 3 * 3 * 2 + 2 * 2 + 2 * 3 + 1 = 29.
   ##
-  ##     A is symmetric positive definite for any (positive) values of
-  ##     the density, RHO(NX,NY), which is chosen randomly in this routine.
+  ##   A is symmetric positive definite for any (positive) values of
+  ##   the density, RHO(NX,NY), which is chosen randomly in this routine.
   ##
-  ##     In particular, if D = DIAG(DIAG(A)), then
-  ##       0.25 <= EIG(INV(D)*A) <= 4.5
-  ##     for any positive integers NX and NY and any densities RHO(NX,NY).
+  ##   In particular, if D = DIAG(DIAG(A)), then
+  ##     0.25 <= EIG(INV(D)*A) <= 4.5
+  ##   for any positive integers NX and NY and any densities RHO(NX,NY).
   ##
-  ##     A = WATHEN ( NX, NY, 1 ) returns the diagonally scaled matrix.
+  ##   A = WATHEN ( NX, NY, 1 ) returns the diagonally scaled matrix.
   ##
-  ##   Modified:
+  ## Modified:
   ##
-  ##     17 September 2007
+  ##   17 September 2007
   ##
-  ##   Author:
+  ## Author:
   ##
-  ##     Nicholas Higham
+  ##   Nicholas Higham
   ##
-  ##   Reference:
+  ## Reference:
   ##
-  ##     Nicholas Higham,
-  ##     Algorithm 694: A Collection of Test Matrices in MATLAB,
-  ##     ACM Transactions on Mathematical Software,
-  ##     Volume 17, Number 3, September 1991, pages 289-305.
+  ##   Nicholas Higham,
+  ##   Algorithm 694: A Collection of Test Matrices in MATLAB,
+  ##   ACM Transactions on Mathematical Software,
+  ##   Volume 17, Number 3, September 1991, pages 289-305.
   ##
-  ##     Andrew Wathen,
-  ##     Realistic eigenvalue bounds for the Galerkin mass matrix,
-  ##     IMA Journal of Numerical Analysis,
-  ##     Volume 7, 1987, pages 449-457.
+  ##   Andrew Wathen,
+  ##   Realistic eigenvalue bounds for the Galerkin mass matrix,
+  ##   IMA Journal of Numerical Analysis,
+  ##   Volume 7, 1987, pages 449-457.
   ##
-  ##   Parameters:
+  ## Parameters:
   ##
-  ##     Input, integer NX, NY, the number of elements in the X and Y directions
-  ##     of the finite element grid.  NX and NY must each be at least 1.
+  ##   Input, integer NX, NY, the number of elements in the X and Y directions
+  ##   of the finite element grid.  NX and NY must each be at least 1.
   ##
-  ##     Optional input, integer K, is used to request that the diagonally scaled
-  ##     version of the matrix be returned.  This happens if K is specified with
-  ##     the value 1.
+  ##   Optional input, integer K, is used to request that the diagonally scaled
+  ##   version of the matrix be returned.  This happens if K is specified with
+  ##   the value 1.
   ##
-  ##     Output, sparse real A(N,N), the matrix.  The dimension N is determined by
-  ##     NX and NY, as described above.  A is stored in the MATLAB sparse matrix
-  ##     format.
+  ##   Output, sparse real A(N,N), the matrix.  The dimension N is determined by
+  ##   NX and NY, as described above.  A is stored in the MATLAB sparse matrix
+  ##   format.
 
   if (nargin < 2 || nargin > 3)
     error ("gallery: 2 or 3 arguments are required for wathen matrix.");
@@ -2744,19 +2746,19 @@
 
 function [A, b] = wilk (n)
   ## WILK   Various specific matrices devised/discussed by Wilkinson.
-  ##        [A, b] = WILK(N) is the matrix or system of order N.
-  ##        N = 3: upper triangular system Ux=b illustrating inaccurate solution.
-  ##        N = 4: lower triangular system Lx=b, ill-conditioned.
-  ##        N = 5: HILB(6)(1:5,2:6)*1.8144.  Symmetric positive definite.
-  ##        N = 21: W21+, tridiagonal.   Eigenvalue problem.
+  ##   [A, b] = WILK(N) is the matrix or system of order N.
+  ##   N = 3: upper triangular system Ux=b illustrating inaccurate solution.
+  ##   N = 4: lower triangular system Lx=b, ill-conditioned.
+  ##   N = 5: HILB(6)(1:5,2:6)*1.8144.  Symmetric positive definite.
+  ##   N = 21: W21+, tridiagonal.   Eigenvalue problem.
   ##
-  ##        References:
-  ##        J.H. Wilkinson, Error analysis of direct methods of matrix inversion,
-  ##           J. Assoc. Comput. Mach., 8 (1961),  pp. 281-330.
-  ##        J.H. Wilkinson, Rounding Errors in Algebraic Processes, Notes on Applied
-  ##           Science No. 32, Her Majesty's Stationery Office, London, 1963.
-  ##        J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
-  ##           Press, 1965.
+  ##   References:
+  ##   J.H. Wilkinson, Error analysis of direct methods of matrix inversion,
+  ##      J. Assoc. Comput. Mach., 8 (1961),  pp. 281-330.
+  ##   J.H. Wilkinson, Rounding Errors in Algebraic Processes, Notes on Applied
+  ##      Science No. 32, Her Majesty's Stationery Office, London, 1963.
+  ##   J.H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University
+  ##      Press, 1965.
 
   if (nargin != 1)
     error ("gallery: 1 argument is required for wilk matrix.");
@@ -2805,21 +2807,21 @@
 ## NOTE: bandred is part of the Test Matrix Toolbox and is used by randsvd()
 function A = bandred (A, kl, ku)
   ## BANDRED  Band reduction by two-sided unitary transformations.
-  ##          B = BANDRED(A, KL, KU) is a matrix unitarily equivalent to A
-  ##          with lower bandwidth KL and upper bandwidth KU
-  ##          (i.e. B(i,j) = 0 if i > j+KL or j > i+KU).
-  ##          The reduction is performed using Householder transformations.
-  ##          If KU is omitted it defaults to KL.
+  ##   B = BANDRED(A, KL, KU) is a matrix unitarily equivalent to A
+  ##   with lower bandwidth KL and upper bandwidth KU
+  ##   (i.e. B(i,j) = 0 if i > j+KL or j > i+KU).
+  ##   The reduction is performed using Householder transformations.
+  ##   If KU is omitted it defaults to KL.
   ##
-  ##          Called by RANDSVD.
-  ##          This is a `standard' reduction.  Cf. reduction to bidiagonal form
-  ##          prior to computing the SVD.  This code is a little wasteful in that
-  ##          it computes certain elements which are immediately set to zero!
+  ##   Called by RANDSVD.
+  ##   This is a `standard' reduction.  Cf. reduction to bidiagonal form
+  ##   prior to computing the SVD.  This code is a little wasteful in that
+  ##   it computes certain elements which are immediately set to zero!
   ##
-  ##          Reference:
-  ##          G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
-  ##          Johns Hopkins University Press, Baltimore, Maryland, 1989.
-  ##          Section 5.4.3.
+  ##   Reference:
+  ##   G.H. Golub and C.F. Van Loan, Matrix Computations, second edition,
+  ##   Johns Hopkins University Press, Baltimore, Maryland, 1989.
+  ##   Section 5.4.3.
 
   ##  Check for special case where order of left/right transformations matters.
   ##  Easiest approach is to work on the transpose, flipping back at the end.
@@ -2853,3 +2855,19 @@
   endif
 endfunction
 
+
+## BIST testing for just a few functions to verify that the main gallery
+## dispatch function works.
+%assert (gallery ("clement", 3), [0 1 0; 2 0 2; 0 1 0])
+%assert (gallery ("invhess", 2), [1 -1; 1 2])
+
+## Test input validation of main dispatch function only
+%!error gallery ()
+%!error <NAME must be a string> gallery (123)
+%!error <matrix binomial not implemented> gallery ("binomial")
+%!error <unknown matrix with NAME foobar> gallery ("foobar")
+
+%!assert (gallery ("minij", 4), [1 1 1 1; 1 2 2 2; 1 2 3 3; 1 2 3 4])
+%!assert (gallery ("minij", 1), 1)
+%!assert (gallery ("minij", 0), [])
+%!assert (gallery ("minij", -1), [])
--- a/scripts/special-matrix/hadamard.m
+++ b/scripts/special-matrix/hadamard.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 Paul Kienzle
+## Copyright (C) 1993-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/special-matrix/hankel.m
+++ b/scripts/special-matrix/hankel.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/special-matrix/hilb.m
+++ b/scripts/special-matrix/hilb.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/special-matrix/invhilb.m
+++ b/scripts/special-matrix/invhilb.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 Dirk Laurie
+## Copyright (C) 1993-2015 Dirk Laurie
 ##
 ## This file is part of Octave.
 ##
@@ -63,7 +63,7 @@
 ## The validity of this formula can easily be checked by expanding
 ## the binomial coefficients in both formulas as factorials.  It can
 ## be derived more directly via the theory of Cauchy matrices.
-## See J. W. Demmel, @cite{Applied Numerical Linear Algebra}, p. 92.
+## See @nospell{J. W. Demmel}, @cite{Applied Numerical Linear Algebra}, p. 92.
 ##
 ## Compare this with the numerical calculation of @code{inverse (hilb (n))},
 ## which suffers from the ill-conditioning of the Hilbert matrix, and the
--- a/scripts/special-matrix/magic.m
+++ b/scripts/special-matrix/magic.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Paul Kienzle
+## Copyright (C) 1999-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -88,7 +88,7 @@
 %!assert (isempty (magic (0)))
 %!assert (magic (1), 1)
 
-%% Test input validation
+## Test input validation
 %!error magic ()
 %!error magic (1, 2)
 %!error <N must be a positive integer not equal to 2> magic (1.5)
--- a/scripts/special-matrix/pascal.m
+++ b/scripts/special-matrix/pascal.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Peter Ekberg
+## Copyright (C) 1999-2015 Peter Ekberg
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -80,7 +80,7 @@
 %!assert (pascal (3,2), [1,1,1;-2,-1,0;1,0,0])
 %!assert (pascal (0,2), [])
 
-%% Test input validation
+## Test input validation
 %!error pascal ()
 %!error pascal (1,2,3)
 %!error <N and T must be scalars> pascal ([1 2])
--- a/scripts/special-matrix/rosser.m
+++ b/scripts/special-matrix/rosser.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Peter Ekberg
+## Copyright (C) 1999-2015 Peter Ekberg
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/special-matrix/toeplitz.m
+++ b/scripts/special-matrix/toeplitz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -125,7 +125,7 @@
 %!assert (toeplitz ([1, 2, 3], [1; -3; -5]), [1, -3, -5; 2, 1, -3; 3, 2, 1])
 %!assert (toeplitz ([1, 2, 3], [1; -3i; -5i]), [1, -3i, -5i; 2, 1, -3i; 3, 2, 1])
 
-%% Test input validation
+## Test input validation
 %!error toeplitz ()
 %!error toeplitz (1, 2, 3)
 %!error <C must be a vector> toeplitz ([1, 2; 3, 4])
--- a/scripts/special-matrix/vander.m
+++ b/scripts/special-matrix/vander.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1993-2013 John W. Eaton
+## Copyright (C) 1993-2015 John W. Eaton
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
--- a/scripts/special-matrix/wilkinson.m
+++ b/scripts/special-matrix/wilkinson.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2013 Peter Ekberg
+## Copyright (C) 1999-2015 Peter Ekberg
 ##
 ## This file is part of Octave.
 ##
@@ -52,7 +52,7 @@
 %!assert (wilkinson (3), [1,1,0;1,0,1;0,1,1])
 %!assert (wilkinson (4), [1.5,1,0,0;1,0.5,1,0;0,1,0.5,1;0,0,1,1.5])
 
-%% Test input validation
+## Test input validation
 %!error wilkinson ()
 %!error wilkinson (1,2)
 %!error <N must be a non-negative integer> wilkinson (ones (2))
--- a/scripts/startup/__finish__.m
+++ b/scripts/startup/__finish__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott
+## Copyright (C) 2008-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/startup/inputrc
+++ b/scripts/startup/inputrc
@@ -24,3 +24,8 @@
 ## \C-q should still be available for quoted insert.
 
 "\C-v": ""
+
+## In windows, disable audiable bell which is enabled by default
+$if term=cygwin
+   set bell-style none
+$endif
--- a/scripts/statistics/base/center.m
+++ b/scripts/statistics/base/center.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -75,7 +75,7 @@
 %!assert (center (magic (3)), [3,-4,1;-2,0,2;-1,4,-3])
 %!assert (center ([1 2 3; 6 5 4], 2), [-1 0 1; 1 0 -1])
 
-%% Test input validation
+## Test input validation
 %!error center ()
 %!error center (1, 2, 3)
 %!error center (1, ones (2,2))
--- a/scripts/statistics/base/cloglog.m
+++ b/scripts/statistics/base/cloglog.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -51,7 +51,7 @@
 %!assert (cloglog (1), Inf)
 %!assert (cloglog (1/e), 0)
 
-%% Test input validation
+## Test input validation
 %!error cloglog ()
 %!error cloglog (1, 2)
 
--- a/scripts/statistics/base/corr.m
+++ b/scripts/statistics/base/corr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -103,7 +103,7 @@
 %!assert (corr (5), 1)
 %!assert (corr (single (5)), single (1))
 
-%% Test input validation
+## Test input validation
 %!error corr ()
 %!error corr (1, 2, 3)
 %!error corr ([1; 2], ["A", "B"])
--- a/scripts/statistics/base/cov.m
+++ b/scripts/statistics/base/cov.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -161,7 +161,7 @@
 %! c = cov (x, 1);
 %! assert (c, 2);
 
-%% Test input validation
+## Test input validation
 %!error cov ()
 %!error cov (1, 2, 3, 4)
 %!error cov ([1; 2], ["A", "B"])
--- a/scripts/statistics/base/gls.m
+++ b/scripts/statistics/base/gls.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -82,7 +82,7 @@
   if (rx != ry)
     error ("gls: number of rows of X and Y must be equal");
   endif
-  if (!issquare (o) || ro != ry*cy)
+  if (! issquare (o) || ro != ry*cy)
     error ("gls: matrix O must be square matrix with rows = rows (Y) * cols (Y)");
   endif
 
@@ -129,7 +129,7 @@
 %! o = diag (ones (5,1));
 %! assert (gls (y,x,o), [3; 2], 50*eps);
 
-%% Test input validation
+## Test input validation
 %!error gls ()
 %!error gls (1)
 %!error gls (1, 2)
--- a/scripts/statistics/base/histc.m
+++ b/scripts/statistics/base/histc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Søren Hauberg
+## Copyright (C) 2009-2015 Søren Hauberg
 ## Copyright (C) 2009 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -48,7 +48,7 @@
     print_usage ();
   endif
 
-  if (!isreal (x))
+  if (! isreal (x))
     error ("histc: X argument must be real-valued, not complex");
   endif
 
@@ -57,12 +57,12 @@
     error ("histc: EDGES must not be empty");
   endif
 
-  if (!isreal (edges))
+  if (! isreal (edges))
     error ("histc: EDGES must be real-valued, not complex");
   else
     ## Make sure 'edges' is sorted
     edges = edges(:);
-    if (!issorted (edges) || edges(1) > edges(end))
+    if (! issorted (edges) || edges(1) > edges(end))
       warning ("histc: edge values not sorted on input");
       edges = sort (edges);
     endif
@@ -109,13 +109,13 @@
 
     ## Compute the histograms
     for k = 1:num_edges-1
-      b = (edges (k) <= x & x < edges (k+1));
+      b = (edges(k) <= x & x < edges(k+1));
       n(idx1{:}, k, idx2{:}) = sum (b, dim);
       if (nargout > 1)
         idx(b) = k;
       endif
     endfor
-    b = (x == edges (end));
+    b = (x == edges(end));
     n(idx1{:}, num_edges, idx2{:}) = sum (b, dim);
     if (nargout > 1)
       idx(b) = num_edges;
--- a/scripts/statistics/base/iqr.m
+++ b/scripts/statistics/base/iqr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -85,10 +85,11 @@
 %!assert (iqr (1:101), 50)
 %!assert (iqr (single (1:101)), single (50))
 
-%%!test
-%%! x = [1:100];
-%%! n = iqr (x, 0:10);
-%%! assert (n, [repmat(100, 1, 10), 1]);
+## FIXME: iqr throws horrible error when running across a dimension that is 1.
+%!test
+%! x = [1:100]';
+%! assert (iqr (x, 1), 50);
+%! assert (iqr (x', 2), 50);
 
 %!error iqr ()
 %!error iqr (1, 2, 3)
--- a/scripts/statistics/base/kendall.m
+++ b/scripts/statistics/base/kendall.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -124,7 +124,7 @@
 %!assert (kendall (logical (1)), 1)
 %!assert (kendall (single (1)), single (1))
 
-%% Test input validation
+## Test input validation
 %!error kendall ()
 %!error kendall (1, 2, 3)
 %!error kendall (['A'; 'B'])
--- a/scripts/statistics/base/kurtosis.m
+++ b/scripts/statistics/base/kurtosis.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Julien Bect
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 2013-2015 Julien Bect
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -92,7 +92,7 @@
   if (nargin < 2 || isempty (flag))
     flag = 1;  # default: do not use the "bias corrected" version
   else
-    if ((! isscalar (flag)) || (flag != 0 && flag != 1))
+    if (! isscalar (flag) || (flag != 0 && flag != 1))
       error ("kurtosis: FLAG must be 0 or 1");
     endif
   endif
@@ -159,7 +159,7 @@
 %!   warning (wstate, "Octave:divide-by-zero");
 %! end_unwind_protect
 
-%% Test input validation
+## Test input validation
 %!error kurtosis ()
 %!error kurtosis (1, 2, 3)
 %!error <X must be a numeric vector or matrix> kurtosis (['A'; 'B'])
--- a/scripts/statistics/base/logit.m
+++ b/scripts/statistics/base/logit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -54,7 +54,7 @@
 
 %!assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN])
 
-%% Test input validation
+## Test input validation
 %!error logit ()
 %!error logit (1, 2)
 
new file mode 100644
--- /dev/null
+++ b/scripts/statistics/base/lscov.m
@@ -0,0 +1,189 @@
+## Copyright (C) 2014-2015 Nir Krakauer
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; If not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {@var{x} =} lscov (@var{A}, @var{b})
+## @deftypefnx {Function File} {@var{x} =} lscov (@var{A}, @var{b}, @var{V})
+## @deftypefnx {Function File} {@var{x} =} lscov (@var{A}, @var{b}, @var{V}, @var{alg})
+## @deftypefnx {Function File} {[@var{x}, @var{stdx}, @var{mse}, @var{S}] =} lscov (@dots{})
+##
+## Compute a generalized linear least squares fit.
+## Estimate @var{x} under the model @var{b} = @var{A}@var{x} + @var{w},
+## where the noise @var{w} is assumed to follow a normal distribution
+## with covariance matrix @math{{\sigma^2} V}.
+##
+## If the size of the coefficient matrix @var{A} is n-by-p, the
+## size of the vector/array of constant terms @var{b} must be n-by-k.
+##
+## The optional input argument @var{V} may be a n-by-1 vector of positive
+## weights (inverse variances), or a n-by-n symmetric positive
+## semidefinite matrix representing the covariance of @var{b}.  If
+## @var{V} is not supplied, the ordinary least squares solution is
+## returned.
+##
+## The @var{alg} input argument, a guidance on solution method to use,
+## is currently ignored.
+##
+## Besides the least-squares estimate matrix @var{x} (p-by-k), the
+## function also returns @var{stdx} (p-by-k), the error standard
+## deviation of estimated @var{x}; @var{mse} (k-by-1), the estimated
+## data error covariance scale factors (@math{\sigma^2}); and @var{S}
+## (p-by-p, or p-by-p-by-k if k > 1), the error covariance of @var{x}.
+##
+## Reference: @nospell{Golub and Van Loan} (1996),
+## Matrix Computations (3rd Ed.), Johns Hopkins, Section 5.6.3
+##
+## @end deftypefn
+## @seealso{ols, gls, lsqnonneg}
+
+## Author: Nir Krakauer
+
+function [x, stdx, mse, S] = lscov (A, b, V = [], alg)
+
+  if (nargin < 2 || (rows (A) != rows (b)))
+    print_usage ();
+  endif
+
+  n = rows (A);
+  p = columns (A);
+  k = columns (b);
+
+  if (! isempty (V))
+    if (rows (V) != n || ! any (columns (V) == [1 n]))
+      error ("lscov: V should be a square matrix or a vector with the same number of rows as A");
+    endif
+
+    if (isvector (V))
+      ## n-by-1 vector of inverse variances
+      v = diag (sqrt (V));
+      A = v * A;
+      b = v * b;
+    else
+      ## n-by-n covariance matrix
+      try
+        ## ordinarily V will be positive definite
+        B = chol (V)';
+      catch
+        ## if V is only positive semidefinite, use its
+        ## eigendecomposition to find a factor B such that V = B*B'
+        [B, lambda] = eig (V);
+        image_dims = (diag (lambda) > 0);
+        B = B(:, image_dims) * sqrt (lambda(image_dims, image_dims));
+      end_try_catch
+      A = B \ A;
+      b = B \ b;
+    endif
+  endif
+
+  pinv_A = pinv (A); #pseudoinverse
+
+  x = pinv_A * b;
+
+  if (isargout (3))
+    dof = n - p; #degrees of freedom remaining after fit
+    SSE = sumsq (b - A * x);
+    mse = SSE / dof;
+  endif
+
+  s = pinv_A * pinv_A';
+
+  stdx = sqrt (diag (s) * mse);
+
+  if (isargout (4))
+    if (k == 1)
+      S = mse * s;
+    else
+      S = nan (p, p, k);
+      for i = 1:k
+        S(:, :, i) = mse(i) * s;
+      endfor
+    endif
+  endif
+endfunction
+
+
+%!test
+%! ## Longley data from the NIST Statistical Reference Dataset
+%! Z = [  60323    83.0   234289   2356     1590    107608  1947
+%!        61122    88.5   259426   2325     1456    108632  1948
+%!        60171    88.2   258054   3682     1616    109773  1949
+%!        61187    89.5   284599   3351     1650    110929  1950
+%!        63221    96.2   328975   2099     3099    112075  1951
+%!        63639    98.1   346999   1932     3594    113270  1952
+%!        64989    99.0   365385   1870     3547    115094  1953
+%!        63761   100.0   363112   3578     3350    116219  1954
+%!        66019   101.2   397469   2904     3048    117388  1955
+%!        67857   104.6   419180   2822     2857    118734  1956
+%!        68169   108.4   442769   2936     2798    120445  1957
+%!        66513   110.8   444546   4681     2637    121950  1958
+%!        68655   112.6   482704   3813     2552    123366  1959
+%!        69564   114.2   502601   3931     2514    125368  1960
+%!        69331   115.7   518173   4806     2572    127852  1961
+%!        70551   116.9   554894   4007     2827    130081  1962 ];
+%! ## Results certified by NIST using 500 digit arithmetic
+%! ## b and standard error in b
+%! V = [  -3482258.63459582         890420.383607373
+%!         15.0618722713733         84.9149257747669
+%!        -0.358191792925910E-01    0.334910077722432E-01
+%!        -2.02022980381683         0.488399681651699
+%!        -1.03322686717359         0.214274163161675
+%!        -0.511041056535807E-01    0.226073200069370
+%!         1829.15146461355         455.478499142212 ];
+%! rsd =  304.854073561965;
+%! y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)];
+%! alpha = 0.05;
+%! [b, stdb, mse] = lscov (X, y);
+%! assert(b, V(:,1), 3e-6);
+%! assert(stdb, V(:,2), -1.e-5);
+%! assert(sqrt (mse), rsd, -1E-6);
+
+%!test
+%! ## Adapted from example in Matlab documentation
+%! x1 = [.2 .5 .6 .8 1.0 1.1]';
+%! x2 = [.1 .3 .4 .9 1.1 1.4]';
+%! X = [ones(size(x1)) x1 x2];
+%! y = [.17 .26 .28 .23 .27 .34]';
+%! [b, se_b, mse, S] = lscov(X, y);
+%! assert(b, [0.1203 0.3284 -0.1312]', 1E-4);
+%! assert(se_b, [0.0643 0.2267 0.1488]', 1E-4);
+%! assert(mse, 0.0015, 1E-4);
+%! assert(S, [0.0041 -0.0130 0.0075; -0.0130 0.0514 -0.0328; 0.0075 -0.0328 0.0221], 1E-4);
+%! w = [1 1 1 1 1 .1]';
+%! [bw, sew_b, msew] = lscov (X, y, w);
+%! assert(bw, [0.1046 0.4614 -0.2621]', 1E-4);
+%! assert(sew_b, [0.0309 0.1152 0.0814]', 1E-4);
+%! assert(msew, 3.4741e-004, -1E-4);
+%! V = .2*ones(length(x1)) + .8*diag(ones(size(x1)));
+%! [bg, sew_b, mseg] = lscov (X, y, V);
+%! assert(bg, [0.1203 0.3284 -0.1312]', 1E-4);
+%! assert(sew_b, [0.0672 0.2267 0.1488]', 1E-4);
+%! assert(mseg, 0.0019, 1E-4);
+%! y2 = [y 2*y];
+%! [b2, se_b2, mse2, S2] = lscov (X, y2);
+%! assert(b2, [b 2*b], eps)
+%! assert(se_b2, [se_b 2*se_b], eps)
+%! assert(mse2, [mse 4*mse], eps)
+%! assert(S2(:, :, 1), S, eps)
+%! assert(S2(:, :, 2), 4*S, eps)
+
+%!test
+%! ## Artificial example with positive semidefinite weight matrix
+%! x = (0:0.2:2)';
+%! y = round(100*sin(x) + 200*cos(x));
+%! X = [ones(size(x)) sin(x) cos(x)];
+%! V = eye(numel(x));
+%! V(end, end-1) = V(end-1, end) = 1;
+%! [b, seb, mseb, S] = lscov (X, y, V);
+%! assert(b, [0 100 200]', 0.2);
--- a/scripts/statistics/base/mahalanobis.m
+++ b/scripts/statistics/base/mahalanobis.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -70,7 +70,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error mahalanobis ()
 %!error mahalanobis (1, 2, 3)
 %!error mahalanobis ('A', 'B')
--- a/scripts/statistics/base/mean.m
+++ b/scripts/statistics/base/mean.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -145,7 +145,7 @@
 %!assert (mean (logical ([1 0 1 1])), 0.75)
 %!assert (mean (single ([1 0 1 1])), single (0.75))
 
-%% Test input validation
+## Test input validation
 %!error mean ()
 %!error mean (1, 2, 3, 4)
 %!error mean ({1:5})
--- a/scripts/statistics/base/meansq.m
+++ b/scripts/statistics/base/meansq.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -78,7 +78,7 @@
 %!assert (meansq (magic (4)), [94.5, 92.5, 92.5, 94.5])
 %!assert (meansq (magic (4), 2), [109.5; 77.5; 77.5; 109.5])
 
-%% Test input validation
+## Test input validation
 %!error meansq ()
 %!error meansq (1, 2, 3)
 %!error meansq (['A'; 'B'])
--- a/scripts/statistics/base/median.m
+++ b/scripts/statistics/base/median.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ## Copyright (C) 2009-2010 VZLU Prague
 ##
 ## This file is part of Octave.
@@ -102,7 +102,7 @@
 %!assert (median (single ([1,2,3])), single (2))
 %!assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN])
 
-%% Test multidimensional arrays (bug #35679)
+## Test multidimensional arrays (bug #35679)
 %!shared a, b, x, y
 %! rand ("seed", 2);
 %! a = rand (2,3,4,5);
@@ -112,7 +112,7 @@
 %!assert (median (a, 4), x(:, :, :, 3));
 %!assert (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2);
 
-%% Test input validation
+## Test input validation
 %!error median ()
 %!error median (1, 2, 3)
 %!error median ({1:5})
--- a/scripts/statistics/base/mode.m
+++ b/scripts/statistics/base/mode.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -155,7 +155,7 @@
 %! assert (c{2}, [1; 2; 3]);
 %! assert (c{3}, [1; 2; 3]);
 
-%% Test input validation
+## Test input validation
 %!error mode ()
 %!error mode (1, 2, 3)
 %!error mode ({1 2 3})
--- a/scripts/statistics/base/module.mk
+++ b/scripts/statistics/base/module.mk
@@ -11,6 +11,7 @@
   statistics/base/kendall.m \
   statistics/base/kurtosis.m \
   statistics/base/logit.m \
+  statistics/base/lscov.m \
   statistics/base/mahalanobis.m \
   statistics/base/mean.m \
   statistics/base/meansq.m \
--- a/scripts/statistics/base/moment.m
+++ b/scripts/statistics/base/moment.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -103,6 +103,7 @@
 ##
 ## @end ifnottex
 ## @end table
+##
 ## If the optional argument @var{dim} is given, operate along this dimension.
 ##
 ## If both @var{type} and @var{dim} are given they may appear in any order.
@@ -160,8 +161,7 @@
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
   else
-    if (!(isscalar (dim) && dim == fix (dim)) ||
-        !(1 <= dim && dim <= nd))
+    if (! (isscalar (dim) && dim == fix (dim)) || ! (1 <= dim && dim <= nd))
       error ("moment: DIM must be an integer and a valid dimension");
     endif
   endif
@@ -191,7 +191,7 @@
 
 %!assert (moment (single ([1 2 3]), 1, "r"), single (2))
 
-%% Test input validation
+## Test input validation
 %!error moment ()
 %!error moment (1)
 %!error moment (1, 2, 3, 4, 5)
--- a/scripts/statistics/base/ols.m
+++ b/scripts/statistics/base/ols.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -162,7 +162,7 @@
 %! b = ols (x, y);
 %! assert (b, [1.4, 2], 2*eps);
 
-%% Test input validation
+## Test input validation
 %!error ols ()
 %!error ols (1)
 %!error ols (1, 2, 3)
--- a/scripts/statistics/base/ppplot.m
+++ b/scripts/statistics/base/ppplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -78,7 +78,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error ppplot ()
 %!error ppplot (ones (2,2))
 
--- a/scripts/statistics/base/prctile.m
+++ b/scripts/statistics/base/prctile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott
+## Copyright (C) 2008-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -30,10 +30,8 @@
 ##
 ## If @var{p} is unspecified, return the quantiles for @code{[0 25 50 75 100]}.
 ## The optional argument @var{dim} determines the dimension along which
-## the percentiles are calculated.  If @var{dim} is omitted, and @var{x} is
-## a vector or matrix, it defaults to 1 (column-wise quantiles).  When
-## @var{x} is an N-D array, @var{dim} defaults to the first non-singleton
-## dimension.
+## the percentiles are calculated.  If @var{dim} is omitted it defaults to the
+## the first non-singleton dimension.
 ## @seealso{quantile}
 ## @end deftypefn
 
@@ -59,14 +57,10 @@
   endif
 
   nd = ndims (x);
+  sz = size (x);
   if (nargin < 3)
-    if (nd == 2)
-      ## If a matrix or vector, always use 1st dimension.
-      dim = 1;
-    else
-      ## If an N-d array, find the first non-singleton dimension.
-      (dim = find (sz > 1, 1)) || (dim = 1);
-    endif
+    ## Find the first non-singleton dimension.
+    (dim = find (sz > 1, 1)) || (dim = 1);
   else
     if (!(isscalar (dim) && dim == fix (dim))
         || !(1 <= dim && dim <= nd))
@@ -84,11 +78,26 @@
 
 %!test
 %! pct = 50;
+%! q = prctile (1:4, pct);
+%! qa = 2.5;
+%! assert (q, qa);
 %! q = prctile (1:4, pct, 1);
 %! qa = [1, 2, 3, 4];
 %! assert (q, qa);
 %! q = prctile (1:4, pct, 2);
-%! qa = 2.5000;
+%! qa = 2.5;
+%! assert (q, qa);
+
+%!test
+%! pct = [50 75];
+%! q = prctile (1:4, pct);
+%! qa = [2.5 3.5];
+%! assert (q, qa);
+%! q = prctile (1:4, pct, 1);
+%! qa = [1, 2, 3, 4; 1, 2, 3, 4];
+%! assert (q, qa);
+%! q = prctile (1:4, pct, 2);
+%! qa = [2.5 3.5];
 %! assert (q, qa);
 
 %!test
@@ -164,7 +173,7 @@
 %! qa = [0.1270; 0.2041; 0.6437; 0.6477; 0.9322];
 %! assert (q, qa, tol);
 
-%% Test input validation
+## Test input validation
 %!error prctile ()
 %!error prctile (1, 2, 3, 4)
 %!error prctile (['A'; 'B'], 10)
--- a/scripts/statistics/base/probit.m
+++ b/scripts/statistics/base/probit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -39,7 +39,7 @@
 
 %!assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN])
 
-%% Test input validation
+## Test input validation
 %!error probit ()
 %!error probit (1, 2)
 
--- a/scripts/statistics/base/qqplot.m
+++ b/scripts/statistics/base/qqplot.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -62,7 +62,7 @@
     print_usage ();
   endif
 
-  if (!(isnumeric (x) && isvector (x)))
+  if (! (isnumeric (x) && isvector (x)))
     error ("qqplot: X must be a numeric vector");
   endif
 
@@ -97,7 +97,7 @@
   endif
 
   if (nargout == 0)
-    plot (q, s);
+    plot (q, s, "-x");
     q_label = strrep (q_label, '_inv', '\_inv');
     if (q_label(1) == '@')
       q_label = q_label(6:end);  # Strip "@(y) " from anon. function
@@ -111,4 +111,3 @@
 
 endfunction
 
-
--- a/scripts/statistics/base/quantile.m
+++ b/scripts/statistics/base/quantile.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Ben Abbott and Jaroslav Hajek
+## Copyright (C) 2008-2015 Ben Abbott and Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -32,10 +32,8 @@
 ## If @var{p} is unspecified, return the quantiles for
 ## @code{[0.00 0.25 0.50 0.75 1.00]}.
 ## The optional argument @var{dim} determines the dimension along which
-## the quantiles are calculated.  If @var{dim} is omitted, and @var{x} is
-## a vector or matrix, it defaults to 1 (column-wise quantiles).  If
-## @var{x} is an N-D array, @var{dim} defaults to the first non-singleton
-## dimension.
+## the quantiles are calculated.  If @var{dim} is omitted it defaults to
+## the first non-singleton dimension.
 ##
 ## The methods available to calculate sample quantiles are the nine methods
 ## used by R (@url{http://www.r-project.org/}).  The default value is
@@ -75,17 +73,17 @@
 ## @var{x} is normally distributed.
 ## @end enumerate
 ##
-## Hyndman and Fan (1996) recommend method 8.  Maxima, S, and R
+## @nospell{Hyndman and Fan} (1996) recommend method 8.  Maxima, S, and R
 ## (versions prior to 2.0.0) use 7 as their default.  Minitab and SPSS
 ## use method 6.  @sc{matlab} uses method 5.
 ##
 ## References:
 ##
 ## @itemize @bullet
-## @item Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New
-## S Language.  Wadsworth & Brooks/Cole.
+## @item @nospell{Becker, R. A., Chambers, J. M. and Wilks, A. R.} (1988)
+## The New S Language.  Wadsworth & Brooks/Cole.
 ##
-## @item Hyndman, R. J. and Fan, Y. (1996) Sample quantiles in
+## @item @nospell{Hyndman, R. J. and Fan, Y.} (1996) Sample quantiles in
 ## statistical packages, American Statistician, 50, 361--365.
 ##
 ## @item R: A Language and Environment for Statistical Computing;
@@ -106,9 +104,10 @@
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
-## Description: Matlab style quantile function of a discrete/continuous distribution
+## Description: Matlab style quantile function of a discrete/continuous
+##              distribution.
 
-function q = quantile (x, p = [], dim = 1, method = 5)
+function q = quantile (x, p = [], dim, method = 5)
 
   if (nargin < 1 || nargin > 4)
     print_usage ();
@@ -126,9 +125,14 @@
     error ("quantile: P must be a numeric vector");
   endif
 
-  if (!(isscalar (dim) && dim == fix (dim))
-      || !(1 <= dim && dim <= ndims (x)))
-    error ("quantile: DIM must be an integer and a valid dimension");
+  if (nargin < 3)
+    ## Find the first non-singleton dimension.
+    (dim = find (size (x) > 1, 1)) || (dim = 1);
+  else
+    if (!(isscalar (dim) && dim == fix (dim))
+        || !(1 <= dim && dim <= ndims (x)))
+      error ("quantile: DIM must be an integer and a valid dimension");
+    endif
   endif
 
   ## Set the permutation vector.
@@ -158,6 +162,30 @@
 
 
 %!test
+%! p = 0.50;
+%! q = quantile (1:4, p);
+%! qa = 2.5;
+%! assert (q, qa);
+%! q = quantile (1:4, p, 1);
+%! qa = [1, 2, 3, 4];
+%! assert (q, qa);
+%! q = quantile (1:4, p, 2);
+%! qa = 2.5;
+%! assert (q, qa);
+
+%!test
+%! p = [0.50 0.75];
+%! q = quantile (1:4, p);
+%! qa = [2.5 3.5];
+%! assert (q, qa);
+%! q = quantile (1:4, p, 1);
+%! qa = [1, 2, 3, 4; 1, 2, 3, 4];
+%! assert (q, qa);
+%! q = quantile (1:4, p, 2);
+%! qa = [2.5 3.5];
+%! assert (q, qa);
+
+%!test
 %! p = 0.5;
 %! x = sort (rand (11));
 %! q = quantile (x, p);
@@ -293,7 +321,7 @@
 %! yexp = median (x, dim);
 %! assert (yobs, yexp);
 
-%% Test input validation
+## Test input validation
 %!error quantile ()
 %!error quantile (1, 2, 3, 4, 5)
 %!error quantile (['A'; 'B'], 10)
--- a/scripts/statistics/base/range.m
+++ b/scripts/statistics/base/range.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -56,7 +56,7 @@
 %!assert (range (magic (3), 2), [7; 4; 7])
 %!assert (range (2), 0)
 
-%% Test input validation
+## Test input validation
 %!error range ()
 %!error range (1, 2, 3)
 
--- a/scripts/statistics/base/ranks.m
+++ b/scripts/statistics/base/ranks.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -93,7 +93,7 @@
 %!assert (ranks (1e6*ones (1, 5)), 3*ones (1, 5))
 %!assert (ranks (rand (1, 5), 1), ones (1, 5))
 
-%% Test input validation
+## Test input validation
 %!error ranks ()
 %!error ranks (1, 2, 3)
 %!error ranks ({1, 2})
--- a/scripts/statistics/base/run_count.m
+++ b/scripts/statistics/base/run_count.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -98,7 +98,7 @@
 %!assert (run_count (5:-1:1, 5), [5, 0, 0, 0, 0])
 %!assert (run_count (ones (3), 4), [0,0,0;0,0,0;1,1,1;0,0,0])
 
-%% Test input validation
+## Test input validation
 %!error run_count ()
 %!error run_count (1)
 %!error run_count (1, 2, 3, 4)
--- a/scripts/statistics/base/runlength.m
+++ b/scripts/statistics/base/runlength.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Paul Kienzle
+## Copyright (C) 2005-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!(isnumeric (x) || islogical (x)) || !isvector (x))
+  if (! (isnumeric (x) || islogical (x)) || ! isvector (x))
     error ("runlength: X must be a numeric vector");
   endif
 
@@ -59,7 +59,7 @@
 %! assert (c, [2 1 3 1 4]);
 %! assert (v, [2 0 4 0 1]);
 
-%% Test input validation
+## Test input validation
 %!error runlength ()
 %!error runlength (1, 2)
 %!error runlength (['A'; 'B'])
--- a/scripts/statistics/base/skewness.m
+++ b/scripts/statistics/base/skewness.m
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Julien Bect
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 2013-2015 Julien Bect
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -91,7 +91,7 @@
   if (nargin < 2 || isempty (flag))
     flag = 1;  # default: do not use the "bias corrected" version
   else
-    if ((! isscalar (flag)) || (flag != 0 && flag != 1))
+    if (! isscalar (flag) || (flag != 0 && flag != 1))
       error ("skewness: FLAG must be 0 or 1");
     endif
   endif
--- a/scripts/statistics/base/spearman.m
+++ b/scripts/statistics/base/spearman.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -84,7 +84,7 @@
 
 %!assert (spearman ([1 2 3], [-1 1 -2]), -0.5, 5*eps)
 
-%% Test input validation
+## Test input validation
 %!error spearman ()
 %!error spearman (1, 2, 3)
 %!error spearman (['A'; 'B'])
--- a/scripts/statistics/base/statistics.m
+++ b/scripts/statistics/base/statistics.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -87,7 +87,7 @@
 %! assert (skewness (x, [], 2), s(:,8), eps);
 %! assert (kurtosis (x, [], 2), s(:,9), eps);
 
-%% Test input validation
+## Test input validation
 %!error statistics ()
 %!error statistics (1, 2, 3)
 %!error statistics (['A'; 'B'])
--- a/scripts/statistics/base/std.m
+++ b/scripts/statistics/base/std.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -119,7 +119,7 @@
 %!assert (std ([]), []);
 %!assert (std (ones (1,3,0,2)), ones (1,3,0,2));
 
-%% Test input validation
+## Test input validation
 %!error std ()
 %!error std (1, 2, 3, 4)
 %!error std (['A'; 'B'])
--- a/scripts/statistics/base/table.m
+++ b/scripts/statistics/base/table.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
   endif
 
   if (nargin == 1)
-    if (!isnumeric (x) || !isvector (x))
+    if (! isnumeric (x) || ! isvector (x))
       error ("table: X must be a numeric vector");
     endif
     v = unique (x);
@@ -61,7 +61,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error table ()
 %!error table (1, 2, 3)
 %!error table (ones (2))
--- a/scripts/statistics/base/var.m
+++ b/scripts/statistics/base/var.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -112,7 +112,7 @@
 %!assert (var ([1,2,3], 1), 2/3, eps)
 %!assert (var ([1,2,3], [], 1), [0,0,0])
 
-%% Test input validation
+## Test input validation
 %!error var ()
 %!error var (1,2,3,4)
 %!error var (['A'; 'B'])
--- a/scripts/statistics/base/zscore.m
+++ b/scripts/statistics/base/zscore.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -95,7 +95,7 @@
 %!assert (zscore (ones (3,2,2,2)), zeros (3,2,2,2))
 %!assert (zscore ([2,0,-2;0,2,0;-2,-2,2]), [1,0,-1;0,1,0;-1,-1,1])
 
-%% Test input validation
+## Test input validation
 %!error zscore ()
 %!error zscore (1, 2, 3)
 %!error zscore (['A'; 'B'])
--- a/scripts/statistics/distributions/betacdf.m
+++ b/scripts/statistics/distributions/betacdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("betacdf: X, A, and B must be of common size or scalars");
@@ -76,13 +76,13 @@
 %!assert (betacdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1])
 %!assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (betacdf ([x, NaN], 1, 2), [y, NaN])
 %!assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
 %!assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN]))
 %!assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error betacdf ()
 %!error betacdf (1)
 %!error betacdf (1,2)
--- a/scripts/statistics/distributions/betainv.m
+++ b/scripts/statistics/distributions/betainv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("betainv: X, A, and B must be of common size or scalars");
@@ -58,7 +58,7 @@
 
   k = find ((x > 0) & (x < 1) & (a > 0) & (b > 0));
   if (any (k))
-    if (!isscalar (a) || !isscalar (b))
+    if (! isscalar (a) || ! isscalar (b))
       a = a(k);
       b = b(k);
       y = a ./ (a + b);
@@ -88,11 +88,11 @@
       y_new = y_old - h;
       ind   = find (y_new <= myeps);
       if (any (ind))
-        y_new (ind) = y_old (ind) / 10;
+        y_new(ind) = y_old(ind) / 10;
       endif
       ind = find (y_new >= 1 - myeps);
       if (any (ind))
-        y_new (ind) = 1 - (1 - y_old (ind)) / 10;
+        y_new(ind) = 1 - (1 - y_old(ind)) / 10;
       endif
       h = y_old - y_new;
       if (max (abs (h)) < sqrt (myeps))
@@ -116,13 +116,13 @@
 %!assert (betainv (x, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN])
 %!assert (betainv ([x(1:2) NaN x(4:5)], 1, 2), [NaN 0 NaN 1 NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (betainv ([x, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN])
 %!assert (betainv (single ([x, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN]))
 %!assert (betainv ([x, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]))
 %!assert (betainv ([x, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error betainv ()
 %!error betainv (1)
 %!error betainv (1,2)
--- a/scripts/statistics/distributions/betapdf.m
+++ b/scripts/statistics/distributions/betapdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ## Copyright (C) 2010 Christos Dimitrakakis
 ##
 ## This file is part of Octave.
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("betapdf: X, A, and B must be of common size or scalars");
@@ -57,26 +57,26 @@
   if (isscalar (a) && isscalar (b))
     pdf(k) = exp ((a - 1) * log (x(k))
                   + (b - 1) * log (1 - x(k))
-                  + lgamma (a + b) - lgamma (a) - lgamma (b));
+                  + gammaln (a + b) - gammaln (a) - gammaln (b));
   else
     pdf(k) = exp ((a(k) - 1) .* log (x(k))
                   + (b(k) - 1) .* log (1 - x(k))
-                  + lgamma (a(k) + b(k)) - lgamma (a(k)) - lgamma (b(k)));
+                  + gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
   endif
 
   ## Most important special cases when the density is finite.
   k = (x == 0) & (a == 1) & (b > 0) & (b != 1);
   if (isscalar (a) && isscalar (b))
-    pdf(k) = exp (lgamma (a + b) - lgamma (a) - lgamma (b));
+    pdf(k) = exp (gammaln (a + b) - gammaln (a) - gammaln (b));
   else
-    pdf(k) = exp (lgamma (a(k) + b(k)) - lgamma (a(k)) - lgamma (b(k)));
+    pdf(k) = exp (gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
   endif
 
   k = (x == 1) & (b == 1) & (a > 0) & (a != 1);
   if (isscalar (a) && isscalar (b))
-    pdf(k) = exp (lgamma (a + b) - lgamma (a) - lgamma (b));
+    pdf(k) = exp (gammaln (a + b) - gammaln (a) - gammaln (b));
   else
-    pdf(k) = exp (lgamma (a(k) + b(k)) - lgamma (a(k)) - lgamma (b(k)));
+    pdf(k) = exp (gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
   endif
 
   k = (x >= 0) & (x <= 1) & (a == 1) & (b == 1);
@@ -102,21 +102,21 @@
 %!assert (betapdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)])
 %!assert (betapdf ([x, NaN], 1, 2), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
 %!assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN]))
 %!assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN]))
 
-%% Beta (1/2,1/2) == arcsine distribution
+## Beta (1/2,1/2) == arcsine distribution
 %!test
 %! x = rand (10,1);
 %! y = 1./(pi * sqrt (x.*(1-x)));
 %! assert (betapdf (x, 1/2, 1/2), y, 50*eps);
 
-%% Test large input values to betapdf
+## Test large input values to betapdf
 %!assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3)
 
-%% Test input validation
+## Test input validation
 %!error betapdf ()
 %!error betapdf (1)
 %!error betapdf (1,2)
--- a/scripts/statistics/distributions/betarnd.m
+++ b/scripts/statistics/distributions/betarnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, a, b] = common_size (a, b);
     if (retval > 0)
       error ("betarnd: A and B must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("betarnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("betarnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (a) && !isequal (size (a), sz))
+  if (! isscalar (a) && ! isequal (size (a), sz))
     error ("betarnd: A and B must be scalar or of size SZ");
   endif
 
@@ -109,14 +109,14 @@
 %!assert (size (betarnd (1, 2, [4 1])), [4, 1])
 %!assert (size (betarnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (betarnd (1, 2)), "double")
 %!assert (class (betarnd (single (1), 2)), "single")
 %!assert (class (betarnd (single ([1 1]), 2)), "single")
 %!assert (class (betarnd (1, single (2))), "single")
 %!assert (class (betarnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error betarnd ()
 %!error betarnd (1)
 %!error betarnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/binocdf.m
+++ b/scripts/statistics/distributions/binocdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, x, n, p] = common_size (x, n, p);
     if (retval > 0)
       error ("binocdf: X, N, and P must be of common size or scalars");
@@ -78,13 +78,13 @@
 %!assert (binocdf (x, 2, 0.5*[0 -1 NaN 3 1]), [0 NaN NaN NaN 1])
 %!assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (binocdf ([x, NaN], 2, 0.5), [y, NaN])
 %!assert (binocdf (single ([x, NaN]), 2, 0.5), single ([y, NaN]))
 %!assert (binocdf ([x, NaN], single (2), 0.5), single ([y, NaN]))
 %!assert (binocdf ([x, NaN], 2, single (0.5)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error binocdf ()
 %!error binocdf (1)
 %!error binocdf (1,2)
--- a/scripts/statistics/distributions/binoinv.m
+++ b/scripts/statistics/distributions/binoinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, x, n, p] = common_size (x, n, p);
     if (retval > 0)
       error ("binoinv: X, N, and P must be of common size or scalars");
@@ -95,13 +95,13 @@
 %!assert (binoinv (x, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN])
 %!assert (binoinv ([x(1:2) NaN x(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (binoinv ([x, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN])
 %!assert (binoinv (single ([x, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN]))
 %!assert (binoinv ([x, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN]))
 %!assert (binoinv ([x, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error binoinv ()
 %!error binoinv (1)
 %!error binoinv (1,2)
--- a/scripts/statistics/distributions/binopdf.m
+++ b/scripts/statistics/distributions/binopdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -93,12 +93,12 @@
 %!assert (binopdf (2, 2, 1), 1);
 %!assert (binopdf (1, 2, 1), 0);
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN]))
 %!assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN]))
 %!assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error binopdf ()
 %!error binopdf (1)
 %!error binopdf (1,2)
--- a/scripts/statistics/distributions/binornd.m
+++ b/scripts/statistics/distributions/binornd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -45,7 +45,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, n, p] = common_size (n, p);
     if (retval > 0)
       error ("binornd: N and P must be of common size or scalars");
@@ -67,13 +67,13 @@
       error ("binornd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("binornd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (n) && !isequal (size (n), sz))
+  if (! isscalar (n) && ! isequal (size (n), sz))
     error ("binornd: N and P must be scalar or of size SZ");
   endif
 
@@ -129,14 +129,14 @@
 %!assert (size (binornd (2, 1/2, [4 1])), [4, 1])
 %!assert (size (binornd (2, 1/2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (binornd (2, 0.5)), "double")
 %!assert (class (binornd (single (2), 0.5)), "single")
 %!assert (class (binornd (single ([2 2]), 0.5)), "single")
 %!assert (class (binornd (2, single (0.5))), "single")
 %!assert (class (binornd (2, single ([0.5 0.5]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error binornd ()
 %!error binornd (1)
 %!error binornd (ones (3), ones (2))
--- a/scripts/statistics/distributions/cauchy_cdf.m
+++ b/scripts/statistics/distributions/cauchy_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (location) || !isscalar (scale))
+  if (! isscalar (location) || ! isscalar (scale))
     [retval, x, location, scale] = common_size (x, location, scale);
     if (retval > 0)
       error ("cauchy_cdf: X, LOCATION, and SCALE must be of common size or scalars");
@@ -52,7 +52,7 @@
     cdf = NaN (size (x));
   endif
 
-  k = !isinf (location) & (scale > 0) & (scale < Inf);
+  k = ! isinf (location) & (scale > 0) & (scale < Inf);
   if (isscalar (location) && isscalar (scale))
     cdf = 0.5 + atan ((x - location) / scale) / pi;
   else
@@ -72,13 +72,13 @@
 %!assert (cauchy_cdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN])
 %!assert (cauchy_cdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (cauchy_cdf ([x, NaN], 1, 2), [y, NaN])
 %!assert (cauchy_cdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single"))
 %!assert (cauchy_cdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single"))
 %!assert (cauchy_cdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error cauchy_cdf ()
 %!error cauchy_cdf (1,2)
 %!error cauchy_cdf (1,2,3,4)
--- a/scripts/statistics/distributions/cauchy_inv.m
+++ b/scripts/statistics/distributions/cauchy_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (location) || !isscalar (scale))
+  if (! isscalar (location) || ! isscalar (scale))
     [retval, x, location, scale] = common_size (x, location, scale);
     if (retval > 0)
       error ("cauchy_inv: X, LOCATION, and SCALE must be of common size or scalars");
@@ -52,7 +52,7 @@
     inv = NaN (size (x));
   endif
 
-  ok = !isinf (location) & (scale > 0) & (scale < Inf);
+  ok = ! isinf (location) & (scale > 0) & (scale < Inf);
 
   k = (x == 0) & ok;
   inv(k) = -Inf;
@@ -79,13 +79,13 @@
 %!assert (cauchy_inv (x, 1, 2*[1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (cauchy_inv ([x(1:2) NaN x(4:5)], 1, 2), [NaN -Inf NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (cauchy_inv ([x, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps)
 %!assert (cauchy_inv (single ([x, NaN]), 1, 2), single ([NaN -Inf 1 Inf NaN NaN]), eps ("single"))
 %!assert (cauchy_inv ([x, NaN], single (1), 2), single ([NaN -Inf 1 Inf NaN NaN]), eps ("single"))
 %!assert (cauchy_inv ([x, NaN], 1, single (2)), single ([NaN -Inf 1 Inf NaN NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error cauchy_inv ()
 %!error cauchy_inv (1,2)
 %!error cauchy_inv (1,2,3,4)
--- a/scripts/statistics/distributions/cauchy_pdf.m
+++ b/scripts/statistics/distributions/cauchy_pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (location) || !isscalar (scale))
+  if (! isscalar (location) || ! isscalar (scale))
     [retval, x, location, scale] = common_size (x, location, scale);
     if (retval > 0)
       error ("cauchy_pdf: X, LOCATION, and SCALE must be of common size or scalars");
@@ -52,7 +52,7 @@
     pdf = NaN (size (x));
   endif
 
-  k = !isinf (location) & (scale > 0) & (scale < Inf);
+  k = ! isinf (location) & (scale > 0) & (scale < Inf);
   if (isscalar (location) && isscalar (scale))
     pdf = ((1 ./ (1 + ((x - location) / scale) .^ 2))
               / pi / scale);
@@ -74,17 +74,17 @@
 %!assert (cauchy_pdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN])
 %!assert (cauchy_pdf ([x, NaN], 1, 2), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (cauchy_pdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single"))
 %!assert (cauchy_pdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single"))
 %!assert (cauchy_pdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single"))
 
-%% Cauchy (0,1) == Student's T distribution with 1 DOF
+## Cauchy (0,1) == Student's T distribution with 1 DOF
 %!test
 %! x = rand (10, 1);
 %! assert (cauchy_pdf (x, 0, 1), tpdf (x, 1), eps);
 
-%% Test input validation
+## Test input validation
 %!error cauchy_pdf ()
 %!error cauchy_pdf (1,2)
 %!error cauchy_pdf (1,2,3,4)
--- a/scripts/statistics/distributions/cauchy_rnd.m
+++ b/scripts/statistics/distributions/cauchy_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (location) || !isscalar (scale))
+  if (! isscalar (location) || ! isscalar (scale))
     [retval, location, scale] = common_size (location, scale);
     if (retval > 0)
       error ("cauchy_rnd: LOCATION and SCALE must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("cauchy_rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("cauchy_rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (location) && !isequal (size (location), sz))
+  if (! isscalar (location) && ! isequal (size (location), sz))
     error ("cauchy_rnd: LOCATION and SCALE must be scalar or of size SZ");
   endif
 
@@ -83,7 +83,7 @@
   endif
 
   if (isscalar (location) && isscalar (scale))
-    if (!isinf (location) && (scale > 0) && (scale < Inf))
+    if (! isinf (location) && (scale > 0) && (scale < Inf))
       rnd = location - cot (pi * rand (sz, cls)) * scale;
     else
       rnd = NaN (sz, cls);
@@ -91,8 +91,9 @@
   else
     rnd = NaN (sz, cls);
 
-    k = !isinf (location) & (scale > 0) & (scale < Inf);
-    rnd(k) = location(k)(:) - cot (pi * rand (sum (k(:)), 1, cls)) .* scale(k)(:);
+    k = ! isinf (location) & (scale > 0) & (scale < Inf);
+    rnd(k) = location(k)(:) ...
+             - cot (pi * rand (sum (k(:)), 1, cls)) .* scale(k)(:);
   endif
 
 endfunction
@@ -107,14 +108,14 @@
 %!assert (size (cauchy_rnd (1, 2, [4 1])), [4, 1])
 %!assert (size (cauchy_rnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (cauchy_rnd (1, 2)), "double")
 %!assert (class (cauchy_rnd (single (1), 2)), "single")
 %!assert (class (cauchy_rnd (single ([1 1]), 2)), "single")
 %!assert (class (cauchy_rnd (1, single (2))), "single")
 %!assert (class (cauchy_rnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error cauchy_rnd ()
 %!error cauchy_rnd (1)
 %!error cauchy_rnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/chi2cdf.m
+++ b/scripts/statistics/distributions/chi2cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("chi2cdf: X and N must be of common size or scalars");
@@ -57,12 +57,12 @@
 %!assert (chi2cdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps)
 %!assert (chi2cdf ([x(1:2) NaN x(4:5)], 2), [y(1:2) NaN y(4:5)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (chi2cdf ([x, NaN], 2), [y, NaN], eps)
 %!assert (chi2cdf (single ([x, NaN]), 2), single ([y, NaN]), eps ("single"))
 %!assert (chi2cdf ([x, NaN], single (2)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error chi2cdf ()
 %!error chi2cdf (1)
 %!error chi2cdf (1,2,3)
--- a/scripts/statistics/distributions/chi2inv.m
+++ b/scripts/statistics/distributions/chi2inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("chi2inv: X and N must be of common size or scalars");
@@ -56,12 +56,12 @@
 %!assert (chi2inv (x, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps)
 %!assert (chi2inv ([x(1:2) NaN x(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (chi2inv ([x, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps)
 %!assert (chi2inv (single ([x, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single"))
 %!assert (chi2inv ([x, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error chi2inv ()
 %!error chi2inv (1)
 %!error chi2inv (1,2,3)
--- a/scripts/statistics/distributions/chi2pdf.m
+++ b/scripts/statistics/distributions/chi2pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("chi2pdf: X and N must be of common size or scalars");
@@ -57,11 +57,11 @@
 %!assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)])
 %!assert (chi2pdf ([x, NaN], 2), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN]))
 %!assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error chi2pdf ()
 %!error chi2pdf (1)
 %!error chi2pdf (1,2,3)
--- a/scripts/statistics/distributions/chi2rnd.m
+++ b/scripts/statistics/distributions/chi2rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -55,13 +55,13 @@
       error ("chi2rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("chi2rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (n) && !isequal (size (n), sz))
+  if (! isscalar (n) && ! isequal (size (n), sz))
     error ("chi2rnd: N must be scalar or of size SZ");
   endif
 
@@ -98,12 +98,12 @@
 %!assert (size (chi2rnd (1, [4 1])), [4, 1])
 %!assert (size (chi2rnd (1, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (chi2rnd (2)), "double")
 %!assert (class (chi2rnd (single (2))), "single")
 %!assert (class (chi2rnd (single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error chi2rnd ()
 %!error chi2rnd (ones (3), ones (2))
 %!error chi2rnd (ones (2), ones (3))
--- a/scripts/statistics/distributions/discrete_cdf.m
+++ b/scripts/statistics/distributions/discrete_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 2010-2013 David Bateman
+## Copyright (C) 2010-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -48,7 +48,7 @@
     cdf = NaN (size (x));
   endif
 
-  k = !isnan (x);
+  k = ! isnan (x);
   [vs, vi] = sort (v);
   cdf(k) = [0 ; cumsum(p(vi))](lookup (vs, x(k)) + 1);
 
@@ -62,12 +62,12 @@
 %! y = [0 0.1 0.6 1 1];
 %!assert (discrete_cdf ([x, NaN], v, p), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (discrete_cdf (single ([x, NaN]), v, p), single ([y, NaN]), 2*eps ("single"))
 %!assert (discrete_cdf ([x, NaN], single (v), p), single ([y, NaN]), 2*eps ("single"))
 %!assert (discrete_cdf ([x, NaN], v, single (p)), single ([y, NaN]), 2*eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error discrete_cdf ()
 %!error discrete_cdf (1)
 %!error discrete_cdf (1,2)
--- a/scripts/statistics/distributions/discrete_inv.m
+++ b/scripts/statistics/distributions/discrete_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -77,12 +77,12 @@
 %! y = [NaN v(1) v(1) v(end/2) v(end) NaN];
 %!assert (discrete_inv ([x, NaN], v, p), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (discrete_inv (single ([x, NaN]), v, p), single ([y, NaN]), eps ("single"))
 %!assert (discrete_inv ([x, NaN], single (v), p), single ([y, NaN]), eps ("single"))
 %!assert (discrete_inv ([x, NaN], v, single (p)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error discrete_inv ()
 %!error discrete_inv (1)
 %!error discrete_inv (1,2)
--- a/scripts/statistics/distributions/discrete_pdf.m
+++ b/scripts/statistics/distributions/discrete_pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -52,7 +52,7 @@
     pdf = NaN (size (x));
   endif
 
-  k = !isnan (x);
+  k = ! isnan (x);
   [vs, vi] = sort (v(:));
   pdf(k) = p([0 ; vi](lookup (vs, x(k), 'm') + 1) + 1);
 
@@ -66,12 +66,12 @@
 %! y = [0 0.1 0.1 0.1 0];
 %!assert (discrete_pdf ([x, NaN], v, p), [y, NaN], 5*eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (discrete_pdf (single ([x, NaN]), v, p), single ([y, NaN]), 5*eps ("single"))
 %!assert (discrete_pdf ([x, NaN], single (v), p), single ([y, NaN]), 5*eps ("single"))
 %!assert (discrete_pdf ([x, NaN], v, single (p)), single ([y, NaN]), 5*eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error discrete_pdf ()
 %!error discrete_pdf (1)
 %!error discrete_pdf (1,2)
--- a/scripts/statistics/distributions/discrete_rnd.m
+++ b/scripts/statistics/distributions/discrete_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -65,7 +65,7 @@
       error ("discrete_rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("discrete_rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
@@ -81,13 +81,13 @@
 %!assert (size (discrete_rnd (1:2, 1:2, [4 1])), [4, 1])
 %!assert (size (discrete_rnd (1:2, 1:2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (discrete_rnd (1:2, 1:2)), "double")
 %!assert (class (discrete_rnd (single (1:2), 1:2)), "single")
 ## FIXME: Maybe this should work, maybe it shouldn't.
 #%!assert(class (discrete_rnd (1:2, single(1:2))), "single");
 
-%% Test input validation
+## Test input validation
 %!error discrete_rnd ()
 %!error discrete_rnd (1)
 %!error discrete_rnd (1:2,1:2, -1)
@@ -95,7 +95,7 @@
 %!error discrete_rnd (1:2,1:2, [2 -1 2])
 %!error discrete_rnd (1:2,1:2, 1, ones (2))
 %!error discrete_rnd (1:2,1:2, 1, -1)
-%% test v,p verification
+## test v,p verification
 %!error discrete_rnd (1, ones (2), ones (2,1))
 %!error discrete_rnd (1, ones (2,1), ones (1,1))
 %!error discrete_rnd (1, ones (2,1), [1 -1])
--- a/scripts/statistics/distributions/empirical_cdf.m
+++ b/scripts/statistics/distributions/empirical_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -49,12 +49,12 @@
 %!assert (empirical_cdf (x, v), y, eps)
 %!assert (empirical_cdf ([x(1) NaN x(3:5)], v), [0 NaN 0.6 1 1], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (empirical_cdf ([x, NaN], v), [y, NaN], eps)
 %!assert (empirical_cdf (single ([x, NaN]), v), single ([y, NaN]), eps)
 %!assert (empirical_cdf ([x, NaN], single (v)), single ([y, NaN]), eps)
 
-%% Test input validation
+## Test input validation
 %!error empirical_cdf ()
 %!error empirical_cdf (1)
 %!error empirical_cdf (1,2,3)
--- a/scripts/statistics/distributions/empirical_inv.m
+++ b/scripts/statistics/distributions/empirical_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -48,12 +48,12 @@
 %! y = [NaN v(1) v(1) v(end/2) v(end) NaN];
 %!assert (empirical_inv (x, v), y, eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (empirical_inv ([x, NaN], v), [y, NaN], eps)
 %!assert (empirical_inv (single ([x, NaN]), v), single ([y, NaN]), eps)
 %!assert (empirical_inv ([x, NaN], single (v)), single ([y, NaN]), eps)
 
-%% Test input validation
+## Test input validation
 %!error empirical_inv ()
 %!error empirical_inv (1)
 %!error empirical_inv (1,2,3)
--- a/scripts/statistics/distributions/empirical_pdf.m
+++ b/scripts/statistics/distributions/empirical_pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -37,7 +37,16 @@
     error ("empirical_pdf: DATA must be a vector");
   endif
 
-  pdf = discrete_pdf (x, data, ones (size (data)));
+  uniq_vals = unique (data);
+  if (numel (data) != numel (uniq_vals))
+    ## Handle ties, multiple elements with same value
+    p = histc (data, uniq_vals);
+    data = uniq_vals;
+  else
+    p = ones (size (data));
+  endif
+
+  pdf = discrete_pdf (x, data, p);
 
 endfunction
 
@@ -48,11 +57,14 @@
 %! y = [0 0.1 0.1 0.1 0];
 %!assert (empirical_pdf (x, v), y)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (empirical_pdf (single (x), v), single (y))
 %!assert (empirical_pdf (x, single (v)), single (y))
 
-%% Test input validation
+## Test distribution with ties
+%!assert (empirical_pdf (2, [1 2 3 2]), 0.5)
+
+## Test input validation
 %!error empirical_pdf ()
 %!error empirical_pdf (1)
 %!error empirical_pdf (1,2,3)
--- a/scripts/statistics/distributions/empirical_rnd.m
+++ b/scripts/statistics/distributions/empirical_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -57,13 +57,12 @@
 %!assert (size (empirical_rnd (1:2, [4 1])), [4, 1])
 %!assert (size (empirical_rnd (1:2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (empirical_rnd (1:2, 1)), "double")
 %!assert (class (empirical_rnd (single (1:2), 1)), "single")
 
-%% Test input validation
+## Test input validation
 %!error empirical_rnd ()
 %!error empirical_rnd (ones (2), 1)
-%% test data verification
 %!error empirical_rnd (ones (2), 1, 1)
 
--- a/scripts/statistics/distributions/expcdf.m
+++ b/scripts/statistics/distributions/expcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("expcdf: X and LAMBDA must be of common size or scalars");
@@ -75,12 +75,12 @@
 %!assert (expcdf (x, 2), y)
 %!assert (expcdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (expcdf ([x, NaN], 2), [y, NaN])
 %!assert (expcdf (single ([x, NaN]), 2), single ([y, NaN]))
 %!assert (expcdf ([x, NaN], single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error expcdf ()
 %!error expcdf (1)
 %!error expcdf (1,2,3)
--- a/scripts/statistics/distributions/expinv.m
+++ b/scripts/statistics/distributions/expinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("expinv: X and LAMBDA must be of common size or scalars");
@@ -43,7 +43,7 @@
     error ("expinv: X and LAMBDA must not be complex");
   endif
 
-  if (!isscalar (x))
+  if (! isscalar (x))
     sz = size (x);
   else
     sz = size (lambda);
@@ -79,12 +79,12 @@
 %!assert (expinv (x, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps)
 %!assert (expinv ([x(1:2) NaN x(4:5)], 2), [NaN 0 NaN Inf NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (expinv ([x, NaN], 2), [NaN 0 1 Inf NaN NaN], eps)
 %!assert (expinv (single ([x, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps)
 %!assert (expinv ([x, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps)
 
-%% Test input validation
+## Test input validation
 %!error expinv ()
 %!error expinv (1)
 %!error expinv (1,2,3)
--- a/scripts/statistics/distributions/exppdf.m
+++ b/scripts/statistics/distributions/exppdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("exppdf: X and LAMBDA must be of common size or scalars");
@@ -69,11 +69,11 @@
 %!assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)])
 %!assert (exppdf ([x, NaN], 2), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (exppdf (single ([x, NaN]), 2), single ([y, NaN]))
 %!assert (exppdf ([x, NaN], single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error exppdf ()
 %!error exppdf (1)
 %!error exppdf (1,2,3)
--- a/scripts/statistics/distributions/exprnd.m
+++ b/scripts/statistics/distributions/exprnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -55,13 +55,13 @@
       error ("exprnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("exprnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (lambda) && !isequal (size (lambda), sz))
+  if (! isscalar (lambda) && ! isequal (size (lambda), sz))
     error ("exprnd: LAMBDA must be scalar or of size SZ");
   endif
 
@@ -98,12 +98,12 @@
 %!assert (size (exprnd (1, [4 1])), [4, 1])
 %!assert (size (exprnd (1, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (exprnd (1)), "double")
 %!assert (class (exprnd (single (1))), "single")
 %!assert (class (exprnd (single ([1 1]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error exprnd ()
 %!error exprnd (1, -1)
 %!error exprnd (1, ones (2))
--- a/scripts/statistics/distributions/fcdf.m
+++ b/scripts/statistics/distributions/fcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (m) || !isscalar (n))
+  if (! isscalar (m) || ! isscalar (n))
     [retval, x, m, n] = common_size (x, m, n);
     if (retval > 0)
       error ("fcdf: X, M, and N must be of common size or scalars");
@@ -76,13 +76,13 @@
 %!assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN NaN y(4:6)], eps)
 %!assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps)
 %!assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single"))
 %!assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single"))
 %!assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error fcdf ()
 %!error fcdf (1)
 %!error fcdf (1,2)
--- a/scripts/statistics/distributions/finv.m
+++ b/scripts/statistics/distributions/finv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (m) || !isscalar (n))
+  if (! isscalar (m) || ! isscalar (n))
     [retval, x, m, n] = common_size (x, m, n);
     if (retval > 0)
       error ("finv: X, M, and N must be of common size or scalars");
@@ -73,13 +73,13 @@
 %!assert (finv (x, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN])
 %!assert (finv ([x(1:2) NaN x(4:5)], 2, 2), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (finv ([x, NaN], 2, 2), [NaN 0 1 Inf NaN NaN])
 %!assert (finv (single ([x, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (finv ([x, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (finv ([x, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error finv ()
 %!error finv (1)
 %!error finv (1,2)
--- a/scripts/statistics/distributions/fpdf.m
+++ b/scripts/statistics/distributions/fpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (m) || !isscalar (n))
+  if (! isscalar (m) || ! isscalar (n))
     [retval, x, m, n] = common_size (x, m, n);
     if (retval > 0)
       error ("fpdf: X, M, and N must be of common size or scalars");
@@ -69,7 +69,7 @@
 endfunction
 
 
-%% F (x, 1, m) == T distribution (sqrt (x), m) / sqrt (x)
+## F (x, 1, m) == T distribution (sqrt (x), m) / sqrt (x)
 %!test
 %! x = rand (10,1);
 %! x = x(x > 0.1 & x < 0.9);
@@ -86,12 +86,12 @@
 %!assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps)
 %!assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single"))
 %!assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single"))
 %!assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error fpdf ()
 %!error fpdf (1)
 %!error fpdf (1,2)
--- a/scripts/statistics/distributions/frnd.m
+++ b/scripts/statistics/distributions/frnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (m) || !isscalar (n))
+  if (! isscalar (m) || ! isscalar (n))
     [retval, m, n] = common_size (m, n);
     if (retval > 0)
       error ("frnd: M and N must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("frnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("frnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (m) && !isequal (size (m), sz))
+  if (! isscalar (m) && ! isequal (size (m), sz))
     error ("frnd: M and N must be scalar or of size SZ");
   endif
 
@@ -107,14 +107,14 @@
 %!assert (size (frnd (1, 2, [4 1])), [4, 1])
 %!assert (size (frnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (frnd (1, 2)), "double")
 %!assert (class (frnd (single (1), 2)), "single")
 %!assert (class (frnd (single ([1 1]), 2)), "single")
 %!assert (class (frnd (1, single (2))), "single")
 %!assert (class (frnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error frnd ()
 %!error frnd (1)
 %!error frnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/gamcdf.m
+++ b/scripts/statistics/distributions/gamcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("gamcdf: X, A, and B must be of common size or scalars");
@@ -73,11 +73,11 @@
 %!assert (gamcdf (x, 1, [0 -Inf NaN Inf 1 1]), [NaN NaN NaN NaN y(5:6)])
 %!assert (gamcdf ([x(1:2) NaN x(4:6)], 1, 1), [y(1:2) NaN y(4:6)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (gamcdf ([x, NaN], 1, 1), [y, NaN])
 %!assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error gamcdf ()
 %!error gamcdf (1)
 %!error gamcdf (1,2)
--- a/scripts/statistics/distributions/gaminv.m
+++ b/scripts/statistics/distributions/gaminv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("gaminv: X, A, and B must be of common size or scalars");
@@ -59,7 +59,7 @@
 
   k = find ((x > 0) & (x < 1) & (a > 0) & (a < Inf) & (b > 0) & (b < Inf));
   if (any (k))
-    if (!isscalar (a) || !isscalar (b))
+    if (! isscalar (a) || ! isscalar (b))
       a = a(k);
       b = b(k);
       y = a .* b;
@@ -85,7 +85,7 @@
       y_new = y_old - h;
       ind   = find (y_new <= myeps);
       if (any (ind))
-        y_new (ind) = y_old (ind) / 10;
+        y_new(ind) = y_old(ind) / 10;
         h = y_old - y_new;
       endif
       if (max (abs (h)) < sqrt (myeps))
@@ -109,13 +109,13 @@
 %!assert (gaminv (x, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (gaminv ([x(1:2) NaN x(4:5)], 1, 1), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (gaminv ([x, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps)
 %!assert (gaminv (single ([x, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 %!assert (gaminv ([x, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 %!assert (gaminv ([x, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error gaminv ()
 %!error gaminv (1)
 %!error gaminv (1,2)
--- a/scripts/statistics/distributions/gampdf.m
+++ b/scripts/statistics/distributions/gampdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("gampdf: X, A, and B must be of common size or scalars");
@@ -84,12 +84,12 @@
 %!assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)])
 %!assert (gampdf ([x, NaN], 1, 1), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN]))
 %!assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN]))
 %!assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error gampdf ()
 %!error gampdf (1)
 %!error gampdf (1,2)
--- a/scripts/statistics/distributions/gamrnd.m
+++ b/scripts/statistics/distributions/gamrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, a, b] = common_size (a, b);
     if (retval > 0)
       error ("gamrnd: A and B must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("gamrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("gamrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (a) && !isequal (size (a), sz))
+  if (! isscalar (a) && ! isequal (size (a), sz))
     error ("gamrnd: A and B must be scalar or of size SZ");
   endif
 
@@ -107,14 +107,14 @@
 %!assert (size (gamrnd (1, 2, [4 1])), [4, 1])
 %!assert (size (gamrnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (gamrnd (1, 2)), "double")
 %!assert (class (gamrnd (single (1), 2)), "single")
 %!assert (class (gamrnd (single ([1 1]), 2)), "single")
 %!assert (class (gamrnd (1, single (2))), "single")
 %!assert (class (gamrnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error gamrnd ()
 %!error gamrnd (1)
 %!error gamrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/geocdf.m
+++ b/scripts/statistics/distributions/geocdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (p))
+  if (! isscalar (p))
     [retval, x, p] = common_size (x, p);
     if (retval > 0)
       error ("geocdf: X and P must be of common size or scalars");
@@ -76,12 +76,12 @@
 %!assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)])
 %!assert (geocdf ([x(1:2) NaN x(4)], 0.5), [y(1:2) NaN y(4)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (geocdf ([x, NaN], 0.5), [y, NaN])
 %!assert (geocdf (single ([x, NaN]), 0.5), single ([y, NaN]))
 %!assert (geocdf ([x, NaN], single (0.5)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error geocdf ()
 %!error geocdf (1)
 %!error geocdf (1,2,3)
--- a/scripts/statistics/distributions/geoinv.m
+++ b/scripts/statistics/distributions/geoinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (p))
+  if (! isscalar (p))
     [retval, x, p] = common_size (x, p);
     if (retval > 0)
       error ("geoinv: X and P must be of common size or scalars");
@@ -72,12 +72,12 @@
 %!assert (geoinv (x, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN])
 %!assert (geoinv ([x(1:2) NaN x(4:5)], 0.5), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (geoinv ([x, NaN], 0.5), [NaN 0 1 Inf NaN NaN])
 %!assert (geoinv (single ([x, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (geoinv ([x, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error geoinv ()
 %!error geoinv (1)
 %!error geoinv (1,2,3)
--- a/scripts/statistics/distributions/geopdf.m
+++ b/scripts/statistics/distributions/geopdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (p))
+  if (! isscalar (p))
     [retval, x, p] = common_size (x, p);
     if (retval > 0)
       error ("geopdf: X and P must be of common size or scalars");
@@ -73,11 +73,11 @@
 %!assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)])
 %!assert (geopdf ([x, NaN], 0.5), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single"))
 %!assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error geopdf ()
 %!error geopdf (1)
 %!error geopdf (1,2,3)
--- a/scripts/statistics/distributions/geornd.m
+++ b/scripts/statistics/distributions/geornd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -58,13 +58,13 @@
       error ("geornd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("geornd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (p) && !isequal (size (p), sz))
+  if (! isscalar (p) && ! isequal (size (p), sz))
     error ("geornd: P must be scalar or of size SZ");
   endif
 
@@ -108,14 +108,14 @@
 %!assert (size (geornd (0.5, [4 1])), [4, 1])
 %!assert (size (geornd (0.5, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (geornd (0.5)), "double")
 %!assert (class (geornd (single (0.5))), "single")
 %!assert (class (geornd (single ([0.5 0.5]))), "single")
 %!assert (class (geornd (single (0))), "single")
 %!assert (class (geornd (single (1))), "single")
 
-%% Test input validation
+## Test input validation
 %!error geornd ()
 %!error geornd (ones (3), ones (2))
 %!error geornd (ones (2), ones (3))
--- a/scripts/statistics/distributions/hygecdf.m
+++ b/scripts/statistics/distributions/hygecdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1997-2013 Kurt Hornik
+## Copyright (C) 1997-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -39,7 +39,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (t) || !isscalar (m) || !isscalar (n))
+  if (! isscalar (t) || ! isscalar (m) || ! isscalar (n))
     [retval, x, t, m, n] = common_size (x, t, m, n);
     if (retval > 0)
       error ("hygecdf: X, T, M, and N must be of common size or scalars");
@@ -50,7 +50,8 @@
     error ("hygecdf: X, T, M, and N must not be complex");
   endif
 
-  if (isa (x, "single") || isa (t, "single") || isa (m, "single") || isa (n, "single"))
+  if (isa (x, "single") || isa (t, "single")
+      || isa (m, "single") || isa (n, "single"))
     cdf = NaN (size (x), "single");
   else
     cdf = NaN (size (x));
@@ -86,14 +87,14 @@
 %!assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN])
 %!assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], eps)
 %!assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single"))
 %!assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single"))
 %!assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single"))
 %!assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error hygecdf ()
 %!error hygecdf (1)
 %!error hygecdf (1,2)
--- a/scripts/statistics/distributions/hygeinv.m
+++ b/scripts/statistics/distributions/hygeinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1997-2013 Kurt Hornik
+## Copyright (C) 1997-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -39,7 +39,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (t) || !isscalar (m) || !isscalar (n))
+  if (! isscalar (t) || ! isscalar (m) || ! isscalar (n))
     [retval, x, t, m, n] = common_size (x, t, m, n);
     if (retval > 0)
       error ("hygeinv: X, T, M, and N must be of common size or scalars");
@@ -50,7 +50,8 @@
     error ("hygeinv: X, T, M, and N must not be complex");
   endif
 
-  if (isa (x, "single") || isa (t, "single") || isa (m, "single") || isa (n, "single"))
+  if (isa (x, "single") || isa (t, "single")
+      || isa (m, "single") || isa (n, "single"))
     inv = NaN (size (x), "single");
   else
     inv = NaN (size (x));
@@ -91,14 +92,14 @@
 %!assert (hygeinv (x, 4, 2, 5), [NaN NaN NaN NaN NaN])
 %!assert (hygeinv ([x(1:2) NaN x(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (hygeinv ([x, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN])
 %!assert (hygeinv (single ([x, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN]))
 %!assert (hygeinv ([x, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN]))
 %!assert (hygeinv ([x, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN]))
 %!assert (hygeinv ([x, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error hygeinv ()
 %!error hygeinv (1)
 %!error hygeinv (1,2)
--- a/scripts/statistics/distributions/hygepdf.m
+++ b/scripts/statistics/distributions/hygepdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (t) || !isscalar (m) || !isscalar (n))
+  if (! isscalar (t) || ! isscalar (m) || ! isscalar (n))
     [retval, x, t, m, n] = common_size (x, t, m, n);
     if (retval > 0)
       error ("hygepdf: X, T, M, and N must be of common size or scalars");
@@ -49,7 +49,8 @@
     error ("hygepdf: X, T, M, and N must not be complex");
   endif
 
-  if (isa (x, "single") || isa (t, "single") || isa (m, "single") || isa (n, "single"))
+  if (isa (x, "single") || isa (t, "single")
+      || isa (m, "single") || isa (n, "single"))
     pdf = zeros (size (x), "single");
   else
     pdf = zeros (size (x));
@@ -90,13 +91,13 @@
 %!assert (hygepdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN])
 %!assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]))
 %!assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]))
 %!assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]))
 %!assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error hygepdf ()
 %!error hygepdf (1)
 %!error hygepdf (1,2)
--- a/scripts/statistics/distributions/hygernd.m
+++ b/scripts/statistics/distributions/hygernd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1997-2013 Kurt Hornik
+## Copyright (C) 1997-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -66,13 +66,13 @@
       error ("hygernd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 4)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("hygernd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (t) && !isequal (size (t), sz))
+  if (! isscalar (t) && ! isequal (size (t), sz))
     error ("hygernd: T, M, and N must be scalar or of size SZ");
   endif
 
@@ -129,7 +129,7 @@
 %!assert (class (hygernd (4,2,single (2))), "single")
 %!assert (class (hygernd (4,2,single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error hygernd ()
 %!error hygernd (1)
 %!error hygernd (1,2)
--- a/scripts/statistics/distributions/kolmogorov_smirnov_cdf.m
+++ b/scripts/statistics/distributions/kolmogorov_smirnov_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -87,7 +87,7 @@
 endfunction
 
 
-%% Test input validation
+## Test input validation
 %!error kolmogorov_smirnov_cdf ()
 %!error kolmogorov_smirnov_cdf (1,2,3)
 %!error kolmogorov_smirnov_cdf (1, ones (2))
--- a/scripts/statistics/distributions/laplace_cdf.m
+++ b/scripts/statistics/distributions/laplace_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,10 +46,10 @@
 %! y = [0, 1/4, 1/2, 3/4, 1];
 %!assert (laplace_cdf ([x, NaN]), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (laplace_cdf (single ([x, NaN])), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error laplace_cdf ()
 %!error laplace_cdf (1,2)
 %!error laplace_cdf (i)
--- a/scripts/statistics/distributions/laplace_inv.m
+++ b/scripts/statistics/distributions/laplace_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -53,11 +53,11 @@
 %! x = [-1 0 0.5 1 2];
 %!assert (laplace_inv (x), [NaN -Inf 0 Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (laplace_inv ([x, NaN]), [NaN -Inf 0 Inf NaN NaN])
 %!assert (laplace_inv (single ([x, NaN])), single ([NaN -Inf 0 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error laplace_inv ()
 %!error laplace_inv (1,2)
 %!error laplace_inv (i)
--- a/scripts/statistics/distributions/laplace_pdf.m
+++ b/scripts/statistics/distributions/laplace_pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,10 +46,10 @@
 %! y = [0, 1/4, 1/2, 1/4, 0];
 %!assert (laplace_pdf ([x, NaN]), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (laplace_pdf (single ([x, NaN])), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error laplace_pdf ()
 %!error laplace_pdf (1,2)
 %!error laplace_pdf (i)
--- a/scripts/statistics/distributions/laplace_rnd.m
+++ b/scripts/statistics/distributions/laplace_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -48,7 +48,7 @@
       error ("laplace_rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 1)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("laplace_rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
@@ -64,7 +64,7 @@
 %!assert (size (laplace_rnd ([4 1])), [4, 1])
 %!assert (size (laplace_rnd (4,1)), [4, 1])
 
-%% Test input validation
+## Test input validation
 %!error laplace_rnd ()
 %!error laplace_rnd (-1)
 %!error laplace_rnd (ones (2))
--- a/scripts/statistics/distributions/logistic_cdf.m
+++ b/scripts/statistics/distributions/logistic_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,10 +46,10 @@
 %! y = [0, 1/4, 1/2, 3/4, 1];
 %!assert (logistic_cdf ([x, NaN]), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (logistic_cdf (single ([x, NaN])), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error logistic_cdf ()
 %!error logistic_cdf (1,2)
 %!error logistic_cdf (i)
--- a/scripts/statistics/distributions/logistic_inv.m
+++ b/scripts/statistics/distributions/logistic_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -58,11 +58,11 @@
 %! x = [-1 0 0.5 1 2];
 %!assert (logistic_inv (x), [NaN -Inf 0 Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (logistic_inv ([x, NaN]), [NaN -Inf 0 Inf NaN NaN])
 %!assert (logistic_inv (single ([x, NaN])), single ([NaN -Inf 0 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error logistic_inv ()
 %!error logistic_inv (1,2)
 %!error logistic_inv (i)
--- a/scripts/statistics/distributions/logistic_pdf.m
+++ b/scripts/statistics/distributions/logistic_pdf.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,10 +46,10 @@
 %! y = [0, 0.16, 1/4, 0.16, 0];
 %!assert (logistic_pdf ([x, NaN]), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (logistic_pdf (single ([x, NaN])), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error logistic_pdf ()
 %!error logistic_pdf (1,2)
 %!error logistic_pdf (i)
--- a/scripts/statistics/distributions/logistic_rnd.m
+++ b/scripts/statistics/distributions/logistic_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -48,7 +48,7 @@
       error ("logistic_rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 1)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("logistic_rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
@@ -63,7 +63,7 @@
 %!assert (size (logistic_rnd ([4 1])), [4, 1])
 %!assert (size (logistic_rnd (4,1)), [4, 1])
 
-%% Test input validation
+## Test input validation
 %!error logistic_rnd ()
 %!error logistic_rnd (-1)
 %!error logistic_rnd (ones (2))
--- a/scripts/statistics/distributions/logncdf.m
+++ b/scripts/statistics/distributions/logncdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("logncdf: X, MU, and SIGMA must be of common size or scalars");
@@ -81,13 +81,13 @@
 %!assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)], eps)
 %!assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps)
 %!assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single"))
 %!assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single"))
 %!assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error logncdf ()
 %!error logncdf (1,2)
 %!error logncdf (1,2,3,4)
--- a/scripts/statistics/distributions/logninv.m
+++ b/scripts/statistics/distributions/logninv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("logninv: X, MU, and SIGMA must be of common size or scalars");
@@ -80,13 +80,13 @@
 %!assert (logninv (x, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (logninv ([x(1:2) NaN x(4:5)], 1, 2), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (logninv ([x, NaN], 1, 1), [NaN 0 e Inf NaN NaN])
 %!assert (logninv (single ([x, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN]))
 %!assert (logninv ([x, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN]))
 %!assert (logninv ([x, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error logninv ()
 %!error logninv (1,2)
 %!error logninv (1,2,3,4)
--- a/scripts/statistics/distributions/lognpdf.m
+++ b/scripts/statistics/distributions/lognpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("lognpdf: X, MU, and SIGMA must be of common size or scalars");
@@ -78,12 +78,12 @@
 %!assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps)
 %!assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single"))
 %!assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single"))
 %!assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error lognpdf ()
 %!error lognpdf (1,2)
 %!error lognpdf (1,2,3,4)
--- a/scripts/statistics/distributions/lognrnd.m
+++ b/scripts/statistics/distributions/lognrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, mu, sigma] = common_size (mu, sigma);
     if (retval > 0)
       error ("lognrnd: MU and SIGMA must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("lognrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("lognrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (mu) && !isequal (size (mu), sz))
+  if (! isscalar (mu) && ! isequal (size (mu), sz))
     error ("lognrnd: MU and SIGMA must be scalar or of size SZ");
   endif
 
@@ -107,14 +107,14 @@
 %!assert (size (lognrnd (1, 2, [4 1])), [4, 1])
 %!assert (size (lognrnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (lognrnd (1, 2)), "double")
 %!assert (class (lognrnd (single (1), 2)), "single")
 %!assert (class (lognrnd (single ([1 1]), 2)), "single")
 %!assert (class (lognrnd (1, single (2))), "single")
 %!assert (class (lognrnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error lognrnd ()
 %!error lognrnd (1)
 %!error lognrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/nbincdf.m
+++ b/scripts/statistics/distributions/nbincdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -40,7 +40,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, x, n, p] = common_size (x, n, p);
     if (retval > 0)
       error ("nbincdf: X, N, and P must be of common size or scalars");
@@ -85,13 +85,13 @@
 %!assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)])
 %!assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN])
 %!assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN]))
 %!assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN]))
 %!assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error nbincdf ()
 %!error nbincdf (1)
 %!error nbincdf (1,2)
--- a/scripts/statistics/distributions/nbininv.m
+++ b/scripts/statistics/distributions/nbininv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -40,7 +40,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, x, n, p] = common_size (x, n, p);
     if (retval > 0)
       error ("nbininv: X, N, and P must be of common size or scalars");
@@ -108,13 +108,13 @@
 %!assert (nbininv (x, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (nbininv ([x(1:2) NaN x(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (nbininv ([x, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN])
 %!assert (nbininv (single ([x, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (nbininv ([x, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (nbininv ([x, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error nbininv ()
 %!error nbininv (1)
 %!error nbininv (1,2)
--- a/scripts/statistics/distributions/nbinpdf.m
+++ b/scripts/statistics/distributions/nbinpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -40,7 +40,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, x, n, p] = common_size (x, n, p);
     if (retval > 0)
       error ("nbinpdf: X, N, and P must be of common size or scalars");
@@ -83,12 +83,12 @@
 %!assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)])
 %!assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN]))
 %!assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN]))
 %!assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error nbinpdf ()
 %!error nbinpdf (1)
 %!error nbinpdf (1,2)
--- a/scripts/statistics/distributions/nbinrnd.m
+++ b/scripts/statistics/distributions/nbinrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n) || !isscalar (p))
+  if (! isscalar (n) || ! isscalar (p))
     [retval, n, p] = common_size (n, p);
     if (retval > 0)
       error ("nbinrnd: N and P must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("nbinrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("nbinrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (n) && !isequal (size (n), sz))
+  if (! isscalar (n) && ! isequal (size (n), sz))
     error ("nbinrnd: N and P must be scalar or of size SZ");
   endif
 
@@ -112,14 +112,14 @@
 %!assert (size (nbinrnd (2, 1/2, [4 1])), [4, 1])
 %!assert (size (nbinrnd (2, 1/2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (nbinrnd (2, 1/2)), "double")
 %!assert (class (nbinrnd (single (2), 1/2)), "single")
 %!assert (class (nbinrnd (single ([2 2]), 1/2)), "single")
 %!assert (class (nbinrnd (2, single (1/2))), "single")
 %!assert (class (nbinrnd (2, single ([1/2 1/2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error nbinrnd ()
 %!error nbinrnd (1)
 %!error nbinrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/normcdf.m
+++ b/scripts/statistics/distributions/normcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("normcdf: X, MU, and SIGMA must be of common size or scalars");
@@ -80,13 +80,13 @@
 %!assert (normcdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN])
 %!assert (normcdf ([x(1:2) NaN x(4)], 1, 1), [y(1:2) NaN y(4)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (normcdf ([x, NaN], 1, 1), [y, NaN])
 %!assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single"))
 %!assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single"))
 %!assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error normcdf ()
 %!error normcdf (1,2)
 %!error normcdf (1,2,3,4)
--- a/scripts/statistics/distributions/norminv.m
+++ b/scripts/statistics/distributions/norminv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("norminv: X, MU, and SIGMA must be of common size or scalars");
@@ -55,7 +55,7 @@
 
   if (isscalar (mu) && isscalar (sigma))
     if (isfinite (mu) && (sigma > 0) && (sigma < Inf))
-      inv =  mu + sigma * stdnormal_inv (x);
+      inv = mu + sigma * stdnormal_inv (x);
     endif
   else
     k = isfinite (mu) & (sigma > 0) & (sigma < Inf);
@@ -74,13 +74,13 @@
 %!assert (norminv (x, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (norminv ([x(1:2) NaN x(4:5)], 1, 1), [NaN -Inf NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (norminv ([x, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN])
 %!assert (norminv (single ([x, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN]))
 %!assert (norminv ([x, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN]))
 %!assert (norminv ([x, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error norminv ()
 %!error norminv (1,2)
 %!error norminv (1,2,3,4)
--- a/scripts/statistics/distributions/normpdf.m
+++ b/scripts/statistics/distributions/normpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, x, mu, sigma] = common_size (x, mu, sigma);
     if (retval > 0)
       error ("normpdf: X, MU, and SIGMA must be of common size or scalars");
@@ -63,7 +63,7 @@
     k = isinf (mu) | !(sigma > 0) | !(sigma < Inf);
     pdf(k) = NaN;
 
-    k = !isinf (mu) & (sigma > 0) & (sigma < Inf);
+    k = ! isinf (mu) & (sigma > 0) & (sigma < Inf);
     pdf(k) = stdnormal_pdf ((x(k) - mu(k)) ./ sigma(k)) ./ sigma(k);
   endif
 
@@ -80,12 +80,12 @@
 %!assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN])
 %!assert (normpdf ([x, NaN], 1, 1), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single"))
 %!assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single"))
 %!assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error normpdf ()
 %!error normpdf (1,2)
 %!error normpdf (1,2,3,4)
--- a/scripts/statistics/distributions/normrnd.m
+++ b/scripts/statistics/distributions/normrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (mu) || !isscalar (sigma))
+  if (! isscalar (mu) || ! isscalar (sigma))
     [retval, mu, sigma] = common_size (mu, sigma);
     if (retval > 0)
       error ("normrnd: mu and sigma must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("normrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("normrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (mu) && !isequal (size (mu), sz))
+  if (! isscalar (mu) && ! isequal (size (mu), sz))
     error ("normrnd: mu and sigma must be scalar or of size SZ");
   endif
 
@@ -83,8 +83,8 @@
   endif
 
   if (isscalar (mu) && isscalar (sigma))
-    if (isfinite (mu) && (sigma > 0) && (sigma < Inf))
-      rnd =  mu + sigma * randn (sz, cls);
+    if (isfinite (mu) && (sigma >= 0) && (sigma < Inf))
+      rnd = mu + sigma * randn (sz, cls);
     else
       rnd = NaN (sz, cls);
     endif
@@ -106,14 +106,14 @@
 %!assert (size (normrnd (1, 2, [4 1])), [4, 1])
 %!assert (size (normrnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (normrnd (1, 2)), "double")
 %!assert (class (normrnd (single (1), 2)), "single")
 %!assert (class (normrnd (single ([1 1]), 2)), "single")
 %!assert (class (normrnd (1, single (2))), "single")
 %!assert (class (normrnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error normrnd ()
 %!error normrnd (1)
 %!error normrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/poisscdf.m
+++ b/scripts/statistics/distributions/poisscdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("poisscdf: X and LAMBDA must be of common size or scalars");
@@ -74,12 +74,12 @@
 %!assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)])
 %!assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (poisscdf ([x, NaN], 1), [y, NaN])
 %!assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single"))
 %!assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error poisscdf ()
 %!error poisscdf (1)
 %!error poisscdf (1,2,3)
--- a/scripts/statistics/distributions/poissinv.m
+++ b/scripts/statistics/distributions/poissinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("poissinv: X and LAMBDA must be of common size or scalars");
@@ -87,12 +87,12 @@
 %!assert (poissinv (x, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN])
 %!assert (poissinv ([x(1:2) NaN x(4:5)], 1), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (poissinv ([x, NaN], 1), [NaN 0 1 Inf NaN NaN])
 %!assert (poissinv (single ([x, NaN]), 1), single ([NaN 0 1 Inf NaN NaN]))
 %!assert (poissinv ([x, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error poissinv ()
 %!error poissinv (1)
 %!error poissinv (1,2,3)
--- a/scripts/statistics/distributions/poisspdf.m
+++ b/scripts/statistics/distributions/poisspdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -32,7 +32,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (lambda))
+  if (! isscalar (lambda))
     [retval, x, lambda] = common_size (x, lambda);
     if (retval > 0)
       error ("poisspdf: X and LAMBDA must be of common size or scalars");
@@ -70,11 +70,11 @@
 %!assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps)
 %!assert (poisspdf ([x, NaN], 1), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single"))
 %!assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error poisspdf ()
 %!error poisspdf (1)
 %!error poisspdf (1,2,3)
--- a/scripts/statistics/distributions/poissrnd.m
+++ b/scripts/statistics/distributions/poissrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -55,13 +55,13 @@
       error ("poissrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("poissrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (lambda) && !isequal (size (lambda), sz))
+  if (! isscalar (lambda) && ! isequal (size (lambda), sz))
     error ("poissrnd: LAMBDA must be scalar or of size SZ");
   endif
 
@@ -98,12 +98,12 @@
 %!assert (size (poissrnd (1, [4 1])), [4, 1])
 %!assert (size (poissrnd (1, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (poissrnd (2)), "double")
 %!assert (class (poissrnd (single (2))), "single")
 %!assert (class (poissrnd (single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error poissrnd ()
 %!error poissrnd (1, -1)
 %!error poissrnd (1, ones (2))
--- a/scripts/statistics/distributions/stdnormal_cdf.m
+++ b/scripts/statistics/distributions/stdnormal_cdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -47,10 +47,10 @@
 %! y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1];
 %!assert (stdnormal_cdf ([x, NaN]), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (stdnormal_cdf (single ([x, NaN])), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error stdnormal_cdf ()
 %!error stdnormal_cdf (1,2)
 %!error stdnormal_cdf (i)
--- a/scripts/statistics/distributions/stdnormal_inv.m
+++ b/scripts/statistics/distributions/stdnormal_inv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,11 +46,11 @@
 %! x = [-1 0 0.5 1 2];
 %!assert (stdnormal_inv (x), [NaN -Inf 0 Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (stdnormal_inv ([x, NaN]), [NaN -Inf 0 Inf NaN NaN])
 %!assert (stdnormal_inv (single ([x, NaN])), single ([NaN -Inf 0 Inf NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error stdnormal_inv ()
 %!error stdnormal_inv (1,2)
 %!error stdnormal_inv (i)
--- a/scripts/statistics/distributions/stdnormal_pdf.m
+++ b/scripts/statistics/distributions/stdnormal_pdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -47,10 +47,10 @@
 %! y = 1/sqrt(2*pi)*exp (-x.^2/2);
 %!assert (stdnormal_pdf ([x, NaN]), [y, NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (stdnormal_pdf (single ([x, NaN])), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error stdnormal_pdf ()
 %!error stdnormal_pdf (1,2)
 %!error stdnormal_pdf (i)
--- a/scripts/statistics/distributions/stdnormal_rnd.m
+++ b/scripts/statistics/distributions/stdnormal_rnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -49,7 +49,7 @@
       error ("stdnormal_rnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 1)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("stdnormal_rnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
@@ -64,7 +64,7 @@
 %!assert (size (stdnormal_rnd ([4 1])), [4, 1])
 %!assert (size (stdnormal_rnd (4,1)), [4, 1])
 
-%% Test input validation
+## Test input validation
 %!error stdnormal_rnd ()
 %!error stdnormal_rnd (-1)
 %!error stdnormal_rnd (ones (2))
--- a/scripts/statistics/distributions/tcdf.m
+++ b/scripts/statistics/distributions/tcdf.m
@@ -1,6 +1,6 @@
-## Copyright (C) 2013 Julien Bect
+## Copyright (C) 2013-2015 Julien Bect
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -34,7 +34,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("tcdf: X and N must be of common size or scalars");
@@ -51,7 +51,7 @@
     cdf = zeros (size (x));
   endif
 
-  k = !isinf (x) & (n > 0);
+  k = ! isinf (x) & (n > 0);
 
   xx = x .^ 2;
   x_big_abs = (xx > n);
@@ -94,12 +94,12 @@
 %!assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps)
 %!assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (tcdf ([x, NaN], 1), [y, NaN], eps)
 %!assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single"))
 %!assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error tcdf ()
 %!error tcdf (1)
 %!error tcdf (1,2,3)
--- a/scripts/statistics/distributions/tinv.m
+++ b/scripts/statistics/distributions/tinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -38,7 +38,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("tinv: X and N must be of common size or scalars");
@@ -92,12 +92,12 @@
 %!assert (tinv (x, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps)
 %!assert (tinv ([x(1:2) NaN x(4:5)], 1), [NaN -Inf NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (tinv ([x, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps)
 %!assert (tinv (single ([x, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single"))
 %!assert (tinv ([x, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error tinv ()
 %!error tinv (1)
 %!error tinv (1,2,3)
--- a/scripts/statistics/distributions/tpdf.m
+++ b/scripts/statistics/distributions/tpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -33,7 +33,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (n))
+  if (! isscalar (n))
     [retval, x, n] = common_size (x, n);
     if (retval > 0)
       error ("tpdf: X and N must be of common size or scalars");
@@ -77,12 +77,12 @@
 %!assert (tpdf (x, 1), y, eps)
 %!assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (tpdf ([x, NaN], 1), [y, NaN], eps)
 %!assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single"))
 %!assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error tpdf ()
 %!error tpdf (1)
 %!error tpdf (1,2,3)
--- a/scripts/statistics/distributions/trnd.m
+++ b/scripts/statistics/distributions/trnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -55,13 +55,13 @@
       error ("trnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("trnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (n) && !isequal (size (n), sz))
+  if (! isscalar (n) && ! isequal (size (n), sz))
     error ("trnd: N must be scalar or of size SZ");
   endif
 
@@ -85,7 +85,8 @@
     rnd = NaN (sz, cls);
 
     k = (n > 0) & (n < Inf);
-    rnd(k) = randn (sum (k(:)), 1, cls) ./ sqrt (2*randg (n(k)/2, cls) ./ n(k))(:);
+    rnd(k) = randn (sum (k(:)), 1, cls) ...
+             ./ sqrt (2*randg (n(k)/2, cls) ./ n(k))(:);
   endif
 
 endfunction
@@ -98,12 +99,12 @@
 %!assert (size (trnd (1, [4 1])), [4, 1])
 %!assert (size (trnd (1, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (trnd (1)), "double")
 %!assert (class (trnd (single (1))), "single")
 %!assert (class (trnd (single ([1 1]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error trnd ()
 %!error trnd (1, -1)
 %!error trnd (1, ones (2))
--- a/scripts/statistics/distributions/unidcdf.m
+++ b/scripts/statistics/distributions/unidcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -73,12 +73,12 @@
 %!assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)])
 %!assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unidcdf ([x, NaN], 10), [y, NaN])
 %!assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN]))
 %!assert (unidcdf ([x, NaN], single (10)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error unidcdf ()
 %!error unidcdf (1)
 %!error unidcdf (1,2,3)
--- a/scripts/statistics/distributions/unidinv.m
+++ b/scripts/statistics/distributions/unidinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -65,12 +65,12 @@
 %!assert (unidinv (x, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps)
 %!assert (unidinv ([x(1:2) NaN x(4:5)], 10), [NaN NaN NaN 10 NaN], eps)
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unidinv ([x, NaN], 10), [NaN NaN 5 10 NaN NaN], eps)
 %!assert (unidinv (single ([x, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps)
 %!assert (unidinv ([x, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps)
 
-%% Test input validation
+## Test input validation
 %!error unidinv ()
 %!error unidinv (1)
 %!error unidinv (1,2,3)
--- a/scripts/statistics/distributions/unidpdf.m
+++ b/scripts/statistics/distributions/unidpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 2007-2013 David Bateman
+## Copyright (C) 2007-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -72,11 +72,11 @@
 %!assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)])
 %!assert (unidpdf ([x, NaN], 10), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN]))
 %!assert (unidpdf ([x, NaN], single (10)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error unidpdf ()
 %!error unidpdf (1)
 %!error unidpdf (1,2,3)
--- a/scripts/statistics/distributions/unidrnd.m
+++ b/scripts/statistics/distributions/unidrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 2005-2013 John W. Eaton
+## Copyright (C) 2005-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -55,13 +55,13 @@
       error ("unidrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 2)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("unidrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (n) && !isequal (size (n), sz))
+  if (! isscalar (n) && ! isequal (size (n), sz))
     error ("unidrnd: N must be scalar or of size SZ");
   endif
 
@@ -97,12 +97,12 @@
 %!assert (size (unidrnd (10, [4 1])), [4, 1])
 %!assert (size (unidrnd (10, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (unidrnd (2)), "double")
 %!assert (class (unidrnd (single (2))), "single")
 %!assert (class (unidrnd (single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error unidrnd ()
 %!error unidrnd (10, [1;2;3])
 %!error unidrnd (10, 2, ones (2))
--- a/scripts/statistics/distributions/unifcdf.m
+++ b/scripts/statistics/distributions/unifcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("unifcdf: X, A, and B must be of common size or scalars");
@@ -79,13 +79,13 @@
 %!assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1])
 %!assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unifcdf ([x, NaN], 1, 2), [y, NaN])
 %!assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
 %!assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN]))
 %!assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error unifcdf ()
 %!error unifcdf (1,2)
 %!error unifcdf (1,2,3,4)
--- a/scripts/statistics/distributions/unifinv.m
+++ b/scripts/statistics/distributions/unifinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -36,7 +36,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("unifinv: X, A, and B must be of common size or scalars");
@@ -72,13 +72,13 @@
 %!assert (unifinv (x, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN])
 %!assert (unifinv ([x(1:2) NaN x(4:5)], 1, 2), [NaN 1 NaN 2 NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unifinv ([x, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN])
 %!assert (unifinv (single ([x, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN]))
 %!assert (unifinv ([x, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN]))
 %!assert (unifinv ([x, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN]))
 
-%% Test input validation
+## Test input validation
 %!error unifinv ()
 %!error unifinv (1,2)
 %!error unifinv (1,2,3,4)
--- a/scripts/statistics/distributions/unifpdf.m
+++ b/scripts/statistics/distributions/unifpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -35,7 +35,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, x, a, b] = common_size (x, a, b);
     if (retval > 0)
       error ("unifpdf: X, A, and B must be of common size or scalars");
@@ -75,12 +75,12 @@
 %!assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)])
 %!assert (unifpdf ([x, NaN], 1, 2), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
 %!assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN]))
 %!assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error unifpdf ()
 %!error unifpdf (1,2)
 %!error unifpdf (1,2,3,4)
--- a/scripts/statistics/distributions/unifrnd.m
+++ b/scripts/statistics/distributions/unifrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (a) || !isscalar (b))
+  if (! isscalar (a) || ! isscalar (b))
     [retval, a, b] = common_size (a, b);
     if (retval > 0)
       error ("unifrnd: A and B must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("unifrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("unifrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (a) && !isequal (size (a), sz))
+  if (! isscalar (a) && ! isequal (size (a), sz))
     error ("unifrnd: A and B must be scalar or of size SZ");
   endif
 
@@ -84,12 +84,12 @@
 
   if (isscalar (a) && isscalar (b))
     if ((-Inf < a) && (a < b) && (b < Inf))
-      rnd =  a + (b - a) * rand (sz, cls);
+      rnd = a + (b - a) * rand (sz, cls);
     else
       rnd = NaN (sz, cls);
     endif
   else
-    rnd =  a + (b - a) .* rand (sz, cls);
+    rnd = a + (b - a) .* rand (sz, cls);
 
     k = !(-Inf < a) | !(a < b) | !(b < Inf);
     rnd(k) = NaN;
@@ -107,14 +107,14 @@
 %!assert (size (unifrnd (1, 2, [4 1])), [4, 1])
 %!assert (size (unifrnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (unifrnd (1, 2)), "double")
 %!assert (class (unifrnd (single (1), 2)), "single")
 %!assert (class (unifrnd (single ([1 1]), 2)), "single")
 %!assert (class (unifrnd (1, single (2))), "single")
 %!assert (class (unifrnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error unifrnd ()
 %!error unifrnd (1)
 %!error unifrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/wblcdf.m
+++ b/scripts/statistics/distributions/wblcdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -50,7 +50,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (shape) || !isscalar (scale))
+  if (! isscalar (shape) || ! isscalar (scale))
     [retval, x, shape, scale] = common_size (x, shape, scale);
     if (retval > 0)
       error ("wblcdf: X, SCALE, and SHAPE must be of common size or scalars");
@@ -95,13 +95,13 @@
 %!assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN NaN 1])
 %!assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (wblcdf ([x, NaN], 1, 1), [y, NaN])
 %!assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN]))
 %!assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN]))
 %!assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error wblcdf ()
 %!error wblcdf (1,2,3,4)
 %!error wblcdf (ones (3), ones (2), ones (2))
--- a/scripts/statistics/distributions/wblinv.m
+++ b/scripts/statistics/distributions/wblinv.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -37,7 +37,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (scale) || !isscalar (shape))
+  if (! isscalar (scale) || ! isscalar (shape))
     [retval, x, scale, shape] = common_size (x, scale, shape);
     if (retval > 0)
       error ("wblinv: X, SCALE, and SHAPE must be of common size or scalars");
@@ -81,13 +81,13 @@
 %!assert (wblinv (x, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN])
 %!assert (wblinv ([x(1:2) NaN x(4:5)], 1, 1), [NaN 0 NaN Inf NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (wblinv ([x, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps)
 %!assert (wblinv (single ([x, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 %!assert (wblinv ([x, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 %!assert (wblinv ([x, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single"))
 
-%% Test input validation
+## Test input validation
 %!error wblinv ()
 %!error wblinv (1,2,3,4)
 %!error wblinv (ones (3), ones (2), ones (2))
--- a/scripts/statistics/distributions/wblpdf.m
+++ b/scripts/statistics/distributions/wblpdf.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -49,7 +49,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (scale) || !isscalar (shape))
+  if (! isscalar (scale) || ! isscalar (shape))
     [retval, x, scale, shape] = common_size (x, scale, shape);
     if (retval > 0)
       error ("wblpdf: X, SCALE, and SHAPE must be of common size or scalars");
@@ -95,12 +95,12 @@
 %!assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)])
 %!assert (wblpdf ([x, NaN], 1, 1), [y, NaN])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN]))
 %!assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN]))
 %!assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN]))
 
-%% Test input validation
+## Test input validation
 %!error wblpdf ()
 %!error wblpdf (1,2,3,4)
 %!error wblpdf (ones (3), ones (2), ones (2))
--- a/scripts/statistics/distributions/wblrnd.m
+++ b/scripts/statistics/distributions/wblrnd.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2012 Rik Wehbring
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (scale) || !isscalar (shape))
+  if (! isscalar (scale) || ! isscalar (shape))
     [retval, scale, shape] = common_size (scale, shape);
     if (retval > 0)
       error ("wblrnd: SCALE and SHAPE must be of common size or scalars");
@@ -66,13 +66,13 @@
       error ("wblrnd: dimension vector must be row vector of non-negative integers");
     endif
   elseif (nargin > 3)
-    if (any (cellfun (@(x) (!isscalar (x) || x < 0), varargin)))
+    if (any (cellfun (@(x) (! isscalar (x) || x < 0), varargin)))
       error ("wblrnd: dimensions must be non-negative integers");
     endif
     sz = [varargin{:}];
   endif
 
-  if (!isscalar (scale) && !isequal (size (scale), sz))
+  if (! isscalar (scale) && ! isequal (size (scale), sz))
     error ("wblrnd: SCALE and SHAPE must be scalar or of size SZ");
   endif
 
@@ -107,14 +107,14 @@
 %!assert (size (wblrnd (1, 2, [4 1])), [4, 1])
 %!assert (size (wblrnd (1, 2, 4, 1)), [4, 1])
 
-%% Test class of input preserved
+## Test class of input preserved
 %!assert (class (wblrnd (1, 2)), "double")
 %!assert (class (wblrnd (single (1), 2)), "single")
 %!assert (class (wblrnd (single ([1 1]), 2)), "single")
 %!assert (class (wblrnd (1, single (2))), "single")
 %!assert (class (wblrnd (1, single ([2 2]))), "single")
 
-%% Test input validation
+## Test input validation
 %!error wblrnd ()
 %!error wblrnd (1)
 %!error wblrnd (ones (3), ones (2))
--- a/scripts/statistics/distributions/wienrnd.m
+++ b/scripts/statistics/distributions/wienrnd.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
@@ -42,7 +42,7 @@
     print_usage ();
   endif
 
-  if (!isscalar (t) || !isscalar (d) || !isscalar (n))
+  if (! isscalar (t) || ! isscalar (d) || ! isscalar (n))
     error ("wienrnd: T, D and N must all be positive integers");
   endif
 
--- a/scripts/statistics/models/logistic_regression.m
+++ b/scripts/statistics/models/logistic_regression.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -104,7 +104,7 @@
   z  = (y * ones (1, yrange)) == ((y * 0 + 1) * (ymin : (ymax - 1)));
   z1 = (y * ones (1, yrange)) == ((y * 0 + 1) * ((ymin + 1) : ymax));
   z  = z(:, any (z));
-  z1 = z1 (:, any(z1));
+  z1 = z1(:, any(z1));
   [mz, nz] = size (z);
 
   ## starting values
@@ -157,8 +157,8 @@
 
   ## tidy up output
 
-  theta = tb (1 : nz, 1);
-  beta  = tb ((nz + 1) : (nz + nx), 1);
+  theta = tb(1 : nz, 1);
+  beta  = tb((nz + 1) : (nz + nx), 1);
 
   if (print >= 1)
     printf ("\n");
--- a/scripts/statistics/models/private/logistic_regression_derivatives.m
+++ b/scripts/statistics/models/private/logistic_regression_derivatives.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/models/private/logistic_regression_likelihood.m
+++ b/scripts/statistics/models/private/logistic_regression_likelihood.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/anova.m
+++ b/scripts/statistics/tests/anova.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -46,7 +46,7 @@
 
 function [pval, f, df_b, df_w] = anova (y, g)
 
-  if ((nargin < 1) || (nargin > 2))
+  if (nargin < 1 || nargin > 2)
     print_usage ();
   elseif (nargin == 1)
     if (isvector (y))
--- a/scripts/statistics/tests/bartlett_test.m
+++ b/scripts/statistics/tests/bartlett_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/chisquare_test_homogeneity.m
+++ b/scripts/statistics/tests/chisquare_test_homogeneity.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/chisquare_test_independence.m
+++ b/scripts/statistics/tests/chisquare_test_independence.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
   y = sum (x')' * sum (x) / n;
   x = (x - y) .^2 ./ y;
   chisq = sum (sum (x));
-  pval  = 1 - chi2cdf (chisq, df);
+  pval = 1 - chi2cdf (chisq, df);
 
   if (nargout == 0)
     printf ("  pval: %g\n", pval);
--- a/scripts/statistics/tests/cor_test.m
+++ b/scripts/statistics/tests/cor_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -22,7 +22,7 @@
 ## populations.
 ##
 ## The optional argument string @var{alt} describes the alternative
-## hypothesis, and can be @qcode{"!="} or @qcode{"<>"} (non-zero),
+## hypothesis, and can be @qcode{"!="} or @qcode{"<>"} (nonzero),
 ## @qcode{">"} (greater than 0), or @qcode{"<"} (less than 0).  The
 ## default is the two-sided case.
 ##
@@ -67,11 +67,11 @@
 
 function t = cor_test (x, y, alt, method)
 
-  if ((nargin < 2) || (nargin > 4))
+  if (nargin < 2 || nargin > 4)
     print_usage ();
   endif
 
-  if (!isvector (x) || !isvector (y) || length (x) != length (y))
+  if (! isvector (x) || ! isvector (y) || length (x) != length (y))
     error ("cor_test: X and Y must be vectors of the same length");
   endif
 
@@ -88,7 +88,7 @@
   endif
 
   n = length (x);
-  m = method (1);
+  m = method(1);
 
   if (m == "p")
     r = corr (x, y);
@@ -97,7 +97,7 @@
     t.params = df;
     t.stat = sqrt (df) .* r / sqrt (1 - r.^2);
     t.dist = "t";
-    cdf  = tcdf (t.stat, df);
+    cdf = tcdf (t.stat, df);
   elseif (m == "k")
     tau = kendall (x, y);
     t.method = "Kendall's rank correlation tau";
--- a/scripts/statistics/tests/f_test_regression.m
+++ b/scripts/statistics/tests/f_test_regression.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -68,7 +68,7 @@
   [b, v] = ols (y, x);
   diff   = rr * b - r;
   f      = diff' * inv (rr * inv (x' * x) * rr') * diff / (q * v);
-  pval  = 1 - fcdf (f, df_num, df_den);
+  pval   = 1 - fcdf (f, df_num, df_den);
 
   if (nargout == 0)
     printf ("  pval: %g\n", pval);
--- a/scripts/statistics/tests/hotelling_test.m
+++ b/scripts/statistics/tests/hotelling_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/hotelling_test_2.m
+++ b/scripts/statistics/tests/hotelling_test_2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -26,7 +26,7 @@
 ## Hotelling's two-sample @math{T^2} is returned in @var{tsq}.  Under the null,
 ## @tex
 ## $$
-## {n_x+n_y-p-1) T^2 \over p(n_x+n_y-2)}
+## {(n_x+n_y-p-1) T^2 \over p(n_x+n_y-2)}
 ## $$
 ## @end tex
 ## @ifnottex
--- a/scripts/statistics/tests/kolmogorov_smirnov_test.m
+++ b/scripts/statistics/tests/kolmogorov_smirnov_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -76,7 +76,7 @@
     end_try_catch
   end_try_catch
 
-  alt  = "!=";
+  alt = "!=";
 
   args{1} = s;
   nvargs = numel (varargin);
--- a/scripts/statistics/tests/kolmogorov_smirnov_test_2.m
+++ b/scripts/statistics/tests/kolmogorov_smirnov_test_2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/kruskal_wallis_test.m
+++ b/scripts/statistics/tests/kruskal_wallis_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{pval}, @var{k}, @var{df}] =} kruskal_wallis_test (@var{x1}, @dots{})
-## Perform a Kruskal-Wallis one-factor analysis of variance.
+## Perform a @nospell{Kruskal-Wallis} one-factor analysis of variance.
 ##
 ## Suppose a variable is observed for @var{k} > 1 different groups, and
 ## let @var{x1}, @dots{}, @var{xk} be the corresponding data vectors.
@@ -36,7 +36,7 @@
 ## where @var{sum_ties} is the sum of @var{t}^2 - @var{t} over each group
 ## of ties where @var{t} is the number of ties in the group and @var{n}
 ## is the total number of values in the input data.  For more info on
-## this adjustment see William H. Kruskal and W. Allen Wallis,
+## this adjustment see @nospell{William H. Kruskal and W. Allen Wallis},
 ## @cite{Use of Ranks in One-Criterion Variance Analysis},
 ## Journal of the American Statistical Association, Vol. 47,
 ## No. 260 (Dec 1952).
--- a/scripts/statistics/tests/manova.m
+++ b/scripts/statistics/tests/manova.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -28,7 +28,7 @@
 ## and columns are variables.  The vector @var{g} specifies the
 ## corresponding group labels (e.g., numbers from 1 to @var{k}).
 ##
-## The LR test statistic (Wilks' Lambda) and approximate p-values are
+## The LR test statistic (@nospell{Wilks' Lambda}) and approximate p-values are
 ## computed and displayed.
 ## @end deftypefn
 
@@ -53,7 +53,7 @@
 
   [n, p] = size (x);
 
-  if (!isvector (g) || (length (g) != n))
+  if (! isvector (g) || (length (g) != n))
     error ("manova: G must be a vector of length rows (X)");
   endif
 
@@ -85,9 +85,9 @@
   l = real (eig (SSB / SSW));
 
   if (isa (l, "single"))
-    l (l < eps ("single")) = 0;
+    l(l < eps ("single")) = 0;
   else
-    l (l < eps) = 0;
+    l(l < eps) = 0;
   endif
 
   ## Wilks' Lambda
--- a/scripts/statistics/tests/mcnemar_test.m
+++ b/scripts/statistics/tests/mcnemar_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -19,8 +19,8 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{pval}, @var{chisq}, @var{df}] =} mcnemar_test (@var{x})
 ## For a square contingency table @var{x} of data cross-classified on
-## the row and column variables, McNemar's test can be used for testing
-## the null hypothesis of symmetry of the classification probabilities.
+## the row and column variables, @nospell{McNemar's} test can be used for
+## testing the null hypothesis of symmetry of the classification probabilities.
 ##
 ## Under the null, @var{chisq} is approximately distributed as chisquare
 ## with @var{df} degrees of freedom.
@@ -42,7 +42,7 @@
 
   if (! (min (size (x)) > 1) && issquare (x))
     error ("mcnemar_test: X must be a square matrix of size > 1");
-  elseif (! (all (all (x >= 0)) && all (all (x == fix (x)))))
+  elseif (! (all ((x(:) >= 0)) && all (x(:) == fix (x(:)))))
     error ("mcnemar_test: all entries of X must be non-negative integers");
   endif
 
--- a/scripts/statistics/tests/prop_test_2.m
+++ b/scripts/statistics/tests/prop_test_2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -42,22 +42,22 @@
 
 function [pval, z] = prop_test_2 (x1, n1, x2, n2, alt)
 
-  if ((nargin < 4) || (nargin > 5))
-        print_usage ();
+  if (nargin < 4 || nargin > 5)
+    print_usage ();
   endif
 
   ## Could do sanity checking on x1, n1, x2, n2 here
 
-  p1  = x1 / n1;
-  p2  = x2 / n2;
-  pc  = (x1 + x2) / (n1 + n2);
+  p1 = x1 / n1;
+  p2 = x2 / n2;
+  pc = (x1 + x2) / (n1 + n2);
 
-  z   = (p1 - p2) / sqrt (pc * (1 - pc) * (1/n1 + 1/n2));
+  z  = (p1 - p2) / sqrt (pc * (1 - pc) * (1/n1 + 1/n2));
 
   cdf = stdnormal_cdf (z);
 
   if (nargin == 4)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
--- a/scripts/statistics/tests/run_test.m
+++ b/scripts/statistics/tests/run_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Friedrich Leisch
+## Copyright (C) 1995-2015 Friedrich Leisch
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/sign_test.m
+++ b/scripts/statistics/tests/sign_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -44,7 +44,7 @@
 
 function [pval, b, n] = sign_test (x, y, alt)
 
-  if ((nargin < 2) || (nargin > 3))
+  if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
@@ -60,7 +60,7 @@
   cdf = binocdf (b, n, 1/2);
 
   if (nargin == 2)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
--- a/scripts/statistics/tests/t_test.m
+++ b/scripts/statistics/tests/t_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 
 function [pval, t, df] = t_test (x, m, alt)
 
-  if ((nargin < 2) || (nargin > 3))
+  if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
@@ -60,7 +60,7 @@
   cdf = tcdf (t, df);
 
   if (nargin == 2)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
@@ -82,3 +82,34 @@
 
 endfunction
 
+
+%!test
+%! ## Two-sided (also the default option)
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5; # true mean
+%! xbar = mean (x);
+%! pval = t_test (x, u0, "!=");
+%! if (xbar >= u0)
+%!   tval = abs (tinv (0.5*pval, n-1));
+%! else
+%!   tval = -abs (tinv (0.5*pval, n-1));
+%! endif
+%! unew = tval * std(x)/sqrt(n) + u0;
+%! assert (xbar, unew, 100*eps);
+
+%!test
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5;
+%! pval = t_test (x, u0, ">");
+%! tval = tinv (1-pval, n-1);
+%! unew = tval * std(x)/sqrt(n) + u0;
+%! assert (mean (x), unew, 100*eps);
+
+%!test
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5;
+%! pval = t_test (x, u0, "<");
+%! tval = tinv (pval, n-1);
+%! unew = tval * std(x)/sqrt(n) + u0;
+%! assert (mean (x), unew, 100*eps);
+
--- a/scripts/statistics/tests/t_test_2.m
+++ b/scripts/statistics/tests/t_test_2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -43,8 +43,8 @@
 
 function [pval, t, df] = t_test_2 (x, y, alt)
 
-  if ((nargin < 2) || (nargin > 3))
-        print_usage ();
+  if (nargin < 2 || nargin > 3)
+    print_usage ();
   endif
 
   if (! (isvector (x) && isvector (y)))
--- a/scripts/statistics/tests/t_test_regression.m
+++ b/scripts/statistics/tests/t_test_regression.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -70,7 +70,7 @@
   if (! (isvector (y) && (length (y) == T)))
     error ("t_test_regression: Y must be a vector of length rows (X)");
   endif
-  s      = size (rr);
+  s = size (rr);
   if (! ((max (s) == k) && (min (s) == 1)))
     error ("t_test_regression: RR must be a vector of length columns (X)");
   endif
--- a/scripts/statistics/tests/u_test.m
+++ b/scripts/statistics/tests/u_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -45,7 +45,7 @@
 
 function [pval, z] = u_test (x, y, alt)
 
-  if ((nargin < 2) || (nargin > 3))
+  if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
@@ -53,16 +53,16 @@
     error ("u_test: both X and Y must be vectors");
   endif
 
-  n_x  = length (x);
-  n_y  = length (y);
-  r    = ranks ([(reshape (x, 1, n_x)), (reshape (y, 1, n_y))]);
-  z    = (sum (r(1 : n_x)) - n_x * (n_x + n_y + 1) / 2) ...
-           / sqrt (n_x * n_y * (n_x + n_y + 1) / 12);
+  n_x = length (x);
+  n_y = length (y);
+  r   = ranks ([(reshape (x, 1, n_x)), (reshape (y, 1, n_y))]);
+  z   = (sum (r(1 : n_x)) - n_x * (n_x + n_y + 1) / 2) ...
+          / sqrt (n_x * n_y * (n_x + n_y + 1) / 12);
 
-  cdf  = stdnormal_cdf (z);
+  cdf = stdnormal_cdf (z);
 
   if (nargin == 2)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
--- a/scripts/statistics/tests/var_test.m
+++ b/scripts/statistics/tests/var_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 
 function [pval, f, df_num, df_den] = var_test (x, y, alt)
 
-  if ((nargin < 2) || (nargin > 3))
+  if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
@@ -57,7 +57,7 @@
   cdf    = fcdf (f, df_num, df_den);
 
   if (nargin == 2)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
--- a/scripts/statistics/tests/welch_test.m
+++ b/scripts/statistics/tests/welch_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -42,7 +42,7 @@
 
 function [pval, t, df] = welch_test (x, y, alt)
 
-  if ((nargin < 2) || (nargin > 3))
+  if (nargin < 2 || nargin > 3)
     print_usage ();
   endif
 
@@ -62,7 +62,7 @@
   cdf  = tcdf (t, df);
 
   if (nargin == 2)
-    alt  = "!=";
+    alt = "!=";
   endif
 
   if (! ischar (alt))
--- a/scripts/statistics/tests/wilcoxon_test.m
+++ b/scripts/statistics/tests/wilcoxon_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/statistics/tests/z_test.m
+++ b/scripts/statistics/tests/z_test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 
 function [pval, z] = z_test (x, m, v, alt)
 
-  if ((nargin < 3) || (nargin > 4))
+  if (nargin < 3 || nargin > 4)
     print_usage ();
   endif
 
@@ -86,3 +86,33 @@
 
 endfunction
 
+
+%!test
+%! ## Two-sided (also the default option)
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5; v = 1/12; # true mean, var
+%! pval = z_test (x, u0, v, "!=");
+%! if (mean (x) >= u0)
+%!   zval = abs (norminv (0.5*pval));
+%! else
+%!   zval = -abs (norminv (0.5*pval));
+%! endif
+%! unew = zval * sqrt (v/n) + u0;
+%! assert (mean (x), unew, 100*eps);
+
+%!test
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5; v = 1/12;
+%! pval = z_test (x, u0, v, ">");
+%! zval = norminv (1-pval);
+%! unew = zval * sqrt (v/n) + u0;
+%! assert (mean (x), unew, 100*eps);
+
+%!test
+%! x = rand (10,1); n = length (x);
+%! u0 = 0.5; v = 1/12;
+%! pval = z_test (x, u0, v, "<");
+%! zval = norminv (pval);
+%! unew = zval * sqrt (v/n) + u0;
+%! assert (mean (x), unew, 100*eps);
+
--- a/scripts/statistics/tests/z_test_2.m
+++ b/scripts/statistics/tests/z_test_2.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 Kurt Hornik
+## Copyright (C) 1995-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -43,7 +43,7 @@
 
 function [pval, z] = z_test_2 (x, y, v_x, v_y, alt)
 
-  if ((nargin < 4) || (nargin > 5))
+  if (nargin < 4 || nargin > 5)
     print_usage ();
   endif
 
--- a/scripts/strings/base2dec.m
+++ b/scripts/strings/base2dec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Daniel Calvelo
+## Copyright (C) 2000-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -122,10 +122,10 @@
 %!assert (base2dec ("-1", 2), NaN)
 %!assert (base2dec ({"A1", "1A"}, 16), [161; 26])
 
-%% Bug #35621
+## Bug #35621
 %!assert (base2dec (["0"; "1"], 2), [0; 1])
 
-%%Test input validation
+## Test input validation
 %!error base2dec ()
 %!error base2dec ("11120")
 %!error base2dec ("11120", 3, 4)
--- a/scripts/strings/bin2dec.m
+++ b/scripts/strings/bin2dec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Daniel Calvelo
+## Copyright (C) 1996-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -67,7 +67,7 @@
 %!assert (bin2dec ("1 0 1"), 5)
 %!assert (bin2dec (char ("1 0 1", "   1111")), [5; 15])
 
-%%Test input validation
+## Test input validation
 %!error bin2dec ()
 %!error bin2dec (1)
 %!error bin2dec ("1", 2)
--- a/scripts/strings/blanks.m
+++ b/scripts/strings/blanks.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -56,7 +56,7 @@
 %!assert (blanks (5), "     ")
 %!assert (blanks (10), "          ")
 
-%% Test input validation
+## Test input validation
 %!error blanks ()
 %!error blanks (1, 2)
 %!error blanks (ones (2))
--- a/scripts/strings/cstrcat.m
+++ b/scripts/strings/cstrcat.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -63,7 +63,7 @@
 %!assert (cstrcat ("foo", "bar"), "foobar")
 %!assert (cstrcat (["a"; "bb"], ["foo"; "bar"]), ["a foo"; "bbbar"])
 
-%% Test input validation
+## Test input validation
 %!error cstrcat ()
 %!error cstrcat (1, 2)
 
--- a/scripts/strings/deblank.m
+++ b/scripts/strings/deblank.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/strings/dec2base.m
+++ b/scripts/strings/dec2base.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Daniel Calvelo
+## Copyright (C) 2000-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -158,7 +158,7 @@
 %! a = 0:3;
 %! assert (dec2base (!a, 2, 1), ["1"; "0"; "0"; "0"])
 
-%%Test input validation
+## Test input validation
 %!error dec2base ()
 %!error dec2base (1)
 %!error dec2base (1, 2, 3, 4)
--- a/scripts/strings/dec2bin.m
+++ b/scripts/strings/dec2bin.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Daniel Calvelo
+## Copyright (C) 1996-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -57,7 +57,7 @@
 %!assert (dec2bin (14, 6), "001110")
 %!assert (dec2bin ({1, 2; 3, 4}), ["001"; "011"; "010"; "100"])
 
-%%Test input validation
+## Test input validation
 %!error dec2bin ()
 %!error dec2bin (1, 2, 3)
 
--- a/scripts/strings/dec2hex.m
+++ b/scripts/strings/dec2hex.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Daniel Calvelo
+## Copyright (C) 1996-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -57,7 +57,7 @@
 %!assert (dec2hex (2748, 5), "00ABC")
 %!assert (dec2hex ({2748, 2746}), ["ABC"; "ABA"])
 
-%% Test input validation
+## Test input validation
 %!error dec2hex ()
 %!error dec2hex (1, 2, 3)
 
--- a/scripts/strings/findstr.m
+++ b/scripts/strings/findstr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -78,9 +78,9 @@
     ## length three or more: match the first three by find then go through
     ## the much smaller list to determine which of them are real matches
     limit = l_s - l_t + 1;
-    v = find (s(1:limit) == t(1)
+    v = find (  s(1:limit)   == t(1)
               & s(2:limit+1) == t(2)
-              & s (3:limit+2) == t(3));
+              & s(3:limit+2) == t(3));
   endif
 
   ## Need to search the index vector if our find was too short
@@ -136,7 +136,7 @@
 %!assert (findstr ("abababa", "aba"), [1, 3, 5])
 %!assert (findstr ("aba", "abababa", 0), [1, 5])
 
-%% Test input validation
+## Test input validation
 %!error findstr ()
 %!error findstr ("foo", "bar", 3, 4)
 %!error <must have only one non-singleton dimension> findstr (["AB" ; "CD"], "C")
--- a/scripts/strings/hex2dec.m
+++ b/scripts/strings/hex2dec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Daniel Calvelo
+## Copyright (C) 1996-2015 Daniel Calvelo
 ##
 ## This file is part of Octave.
 ##
@@ -58,7 +58,7 @@
 %!assert (hex2dec (["12b"; "12B"]), [299; 299])
 %!assert (hex2dec ({"A1", "1A"}), [161; 26])
 
-%%Test input validation
+## Test input validation
 %!error hex2dec ()
 %!error hex2dec (1)
 %!error hex2dec ("1", 2)
--- a/scripts/strings/index.m
+++ b/scripts/strings/index.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -108,7 +108,7 @@
 %! assert (index (str, "o"), [5; 2; 2; 2]);
 %! assert (index (str, "o", "last"), [5; 2; 3; 2]);
 
-%% Test input validation
+## Test input validation
 %!error index ()
 %!error index ("a")
 %!error index ("a", "b", "first", "d")
--- a/scripts/strings/isletter.m
+++ b/scripts/strings/isletter.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1998-2013 John W. Eaton
+## Copyright (C) 1998-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/strings/isstrprop.m
+++ b/scripts/strings/isstrprop.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 John W. Eaton
+## Copyright (C) 2008-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -127,7 +127,7 @@
 %!assert (isstrprop (char ("AbC", "123"), "upper"), logical ([1 0 1; 0 0 0]))
 %!assert (isstrprop ({"AbC", "123"}, "lower"), {logical([0 1 0]), logical([0 0 0])})
 
-%%Input Validation
+## Test input validation
 %!error isstrprop ()
 %!error isstrprop ("abc123")
 %!error isstrprop ("abc123", "alpha", "alpha")
--- a/scripts/strings/mat2str.m
+++ b/scripts/strings/mat2str.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2002-2013 Rolf Fabian
+## Copyright (C) 2002-2015 Rolf Fabian
 ##
 ## This file is part of Octave.
 ##
@@ -70,6 +70,10 @@
     n = 15;
   elseif (isempty (n))
     n = 15;   # Default precision
+  elseif (numel (n) > 2)
+    error ("mat2str: N must have only 1 or 2 elements");
+  else
+    n = fix (n);
   endif
 
   x_islogical = islogical (x);
@@ -139,9 +143,10 @@
 %!assert (mat2str (false), "false")
 %!assert (mat2str (logical (eye (2))), "[true false;false true]")
 
-%% Test input validation
+## Test input validation
 %!error mat2str ()
 %!error mat2str (1,2,3,4)
 %!error mat2str (["Hello"])
 %!error <X must be two dimensional> mat2str (ones (3,3,2))
+%!error <N must have only 1 or 2 elements> mat2str (ones (3,3), [1 2 3])
 
--- a/scripts/strings/ostrsplit.m
+++ b/scripts/strings/ostrsplit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Jaroslav Hajek
+## Copyright (C) 2009-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -108,7 +108,7 @@
 %!assert (ostrsplit (["a,bc";",de"], ",", true), {"a", "bc", "de "})
 %!assert (ostrsplit (["a,bc";",de"], ", ", true), {"a", "bc", "de"})
 
-%% Test input validation
+## Test input validation
 %!error ostrsplit ()
 %!error ostrsplit ("abc")
 %!error ostrsplit ("abc", "b", true, 4)
--- a/scripts/strings/regexptranslate.m
+++ b/scripts/strings/regexptranslate.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -78,7 +78,7 @@
 %!assert (regexptranslate ("wildcard", "/a*b?c."), "/a.*b.c\\.")
 %!assert (regexptranslate ("escape", '$.?[abc]'), '\$\.\?\[abc\]')
 
-%% Test input validation
+## Test input validation
 %!error <Invalid call to regexptranslate> regexptranslate ()
 %!error <Invalid call to regexptranslate> regexptranslate ("wildcard")
 %!error <Invalid call to regexptranslate> regexptranslate ("a", "b", "c")
--- a/scripts/strings/rindex.m
+++ b/scripts/strings/rindex.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -61,7 +61,7 @@
 %! str = cellstr (str);
 %! assert (rindex (str, "o"), [5; 2; 3; 2]);
 
-%% Test input validation
+## Test input validation
 %!error rindex ()
 %!error rindex ("foo")
 %!error rindex ("foo", "bar", "last")
--- a/scripts/strings/str2num.m
+++ b/scripts/strings/str2num.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -77,7 +77,7 @@
 %! [x, state] = str2num ("Hello World");
 %! assert (! state);
 
-%% Test input validation
+## Test input validation
 %!error str2num ()
 %!error str2num ("string", 1)
 %!error <S must be a string> str2num ({"string"})
--- a/scripts/strings/strcat.m
+++ b/scripts/strings/strcat.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1994-2013 John W. Eaton
+## Copyright (C) 1994-2015 John W. Eaton
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
--- a/scripts/strings/strchr.m
+++ b/scripts/strings/strchr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek
+## Copyright (C) 2008-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -72,7 +72,7 @@
 %!assert (strchr ("Octave is the best software", "best"), [3, 6, 9, 11, 13, 15, 16, 17, 18, 20, 23, 27])
 %!assert (strchr ("Octave is the best software", "software"), [3, 4, 6, 9, 11, 13, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27])
 
-%% Test input validation
+## Test input validation
 %!error strchr ()
 %!error strchr (1)
 %!error <STR argument must be a string> strchr (1, "aeiou")
--- a/scripts/strings/strjoin.m
+++ b/scripts/strings/strjoin.m
@@ -1,5 +1,5 @@
 ## Copyright (C) 2007 Muthiah Annamalai
-## Copyright (C) 2013 Ben Abbott
+## Copyright (C) 2013-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
@@ -40,7 +40,7 @@
 ##       @result{} 'Octave*Scilab*Lush*Yorick'
 ## @end group
 ## @end example
-## @seealso {strsplit}
+## @seealso{strsplit}
 ## @end deftypefn
 
 ## Author: Muthiah Annamalai <muthiah.annamalai@uta.edu>
--- a/scripts/strings/strjust.m
+++ b/scripts/strings/strjust.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ## Copyright (C) 2009 Jaroslav Hajek
 ##
 ## This file is part of Octave.
@@ -104,7 +104,7 @@
 %!        [" a  "; " ab"; "abc "; "abcd"])
 %!assert (strjust (["";""]), "")
 
-%% Test input validation
+## Test input validation
 %!error <Invalid call to strjust> strjust ()
 %!error <Invalid call to strjust> strjust (["a";"ab"], "center", 1)
 %!error <S must be a string> strjust (ones (3,3))
--- a/scripts/strings/strsplit.m
+++ b/scripts/strings/strsplit.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 Jaroslav Hajek
+## Copyright (C) 2009-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -17,21 +17,35 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{cstr}] =} strsplit (@var{s})
-## @deftypefnx {Function File} {[@var{cstr}] =} strsplit (@var{s}, @var{del})
+## @deftypefn  {Function File} {[@var{cstr}] =} strsplit (@var{str})
+## @deftypefnx {Function File} {[@var{cstr}] =} strsplit (@var{str}, @var{del})
 ## @deftypefnx {Function File} {[@var{cstr}] =} strsplit (@dots{}, @var{name}, @var{value})
 ## @deftypefnx {Function File} {[@var{cstr}, @var{matches}] =} strsplit (@dots{})
-## Split the string @var{s} using the delimiters specified by @var{del}
-## and return a cell string array of substrings.  If a delimiter is not
-## specified the string, @var{s}, is split at whitespace.  The delimiter,
-## @var{del} may be a string, a scalar cell string, or cell string array.
-## By default, consecutive delimiters in the input string @var{s} are
-## collapsed into one.
+## Split the string @var{str} using the delimiters specified by @var{del}
+## and return a cell string array of substrings.
+##
+## If a delimiter is not specified the string is split at whitespace
+## @code{@{" ", "\f", "\n", "\r", "\t", "\v"@}}.  Otherwise, the delimiter,
+## @var{del} must be a string or cell array of strings.  By default,
+## consecutive delimiters in the input string @var{s} are collapsed into one
+## resulting in a single split.
+##
+## Supported @var{name}/@var{value} pair arguments are:
 ##
-## The second output, @var{matches}, returns the delimiters which were matched
-## in the original string.
+## @itemize
+## @item @var{collapsedelimiters} which may take the value of @code{true}
+## (default) or @code{false}.
 ##
-## Example:
+## @item @var{delimitertype} which may take the value of @qcode{"simple"}
+## (default) or @nospell{@qcode{"regularexpression"}}.  A simple delimiter
+## matches the text exactly as written.  Otherwise, the syntax for regular
+## expressions outlined in @code{regexp} is used.
+## @end itemize
+##
+## The optional second output, @var{matches}, returns the delimiters which were
+## matched in the original string.
+##
+## Examples with simple delimiters:
 ##
 ## @example
 ## strsplit ("a b c")
@@ -50,7 +64,7 @@
 ##             [1,3] = c
 ##           @}
 ##
-## strsplit ("a foo b,bar c", @{"\s", "foo", "bar"@})
+## strsplit ("a foo b,bar c", @{" ", ",", "foo", "bar"@})
 ##       @result{}
 ##           @{
 ##             [1,1] = a
@@ -58,7 +72,7 @@
 ##             [1,3] = c
 ##           @}
 ##
-## strsplit ("a,,b, c", @{",", " "@}, false)
+## strsplit ("a,,b, c", @{",", " "@}, "collapsedelimiters", false)
 ##       @result{}
 ##           @{
 ##             [1,1] = a
@@ -70,21 +84,10 @@
 ##
 ## @end example
 ##
-## Supported @var{name}/@var{value} pair arguments are;
-##
-## @itemize
-## @item @var{collapsedelimiters} may take the value of @var{true} or
-## @var{false} with the default being @var{false}.
+## Examples with @nospell{regularexpression} delimiters:
 ##
-## @item @var{delimitertype} may take the value of @code{simple} or
-## @code{regularexpression}.  The default is @var{delimitertype} is
-## @code{simple}.
-## @end itemize
-##
-## Example:
-##
-## @example
-## strsplit ("a foo b,bar c", ",|\\s|foo|bar", "delimitertype", "regularexpression")
+## @smallexample
+## strsplit ("a foo b,bar c", ',|\s|foo|bar', "delimitertype", "regularexpression")
 ##       @result{}
 ##           @{
 ##             [1,1] = a
@@ -92,7 +95,7 @@
 ##             [1,3] = c
 ##           @}
 ##
-## strsplit ("a,,b, c", "[, ]", false, "delimitertype", "regularexpression")
+## strsplit ("a,,b, c", '[, ]', "collapsedelimiters", false, "delimitertype", "regularexpression")
 ##       @result{}
 ##           @{
 ##             [1,1] = a
@@ -120,15 +123,15 @@
 ##             [1,5] =
 ##             [1,6] = c
 ##           @}
-## @end example
+## @end smallexample
 ##
 ## @seealso{ostrsplit, strjoin, strtok, regexp}
 ## @end deftypefn
 
-function [result, matches] = strsplit (str, del, varargin)
+function [cstr, matches] = strsplit (str, del, varargin)
 
   args.collapsedelimiters = true;
-  args.delimitertype = "default";
+  args.delimitertype = "simple";
 
   [reg, params] = parseparams (varargin);
 
@@ -137,16 +140,17 @@
   elseif (numel (reg) > 1)
     print_usage ();
   elseif (numel (reg) == 1)
-    if (islogical (reg{1}) || isnumeric (reg{1}))
+    ## This is undocumented behavior to accept a logical 3rd arg.
+    if (islogical (reg{1}))
       args.collapsedelimiters = reg{1};
     else
       print_usage ();
     endif
   endif
   fields = fieldnames (args);
-  for n = 1:2:numel(params)
+  for n = 1:2:numel (params)
     if (any (strcmpi (params{n}, fields)))
-      args.(lower(params{n})) = params{n+1};
+      args.(tolower (params{n})) = params{n+1};
     elseif (ischar (varargin{n}))
       error ("strsplit:invalid_parameter_name",
              "strsplit: invalid parameter name, '%s'", varargin{n});
@@ -155,23 +159,19 @@
     endif
   endfor
 
-  if (strcmpi (args.delimitertype, "default"))
-    args.delimitertype = "simple";
-  endif
-
   ## Save the length of the "delimitertype" parameter
   length_deltype = length (args.delimitertype);
 
-  if (nargin == 1 || (nargin > 1 && (islogical (del) || isnumeric (del))))
+  if (nargin == 1 || (nargin > 1 && islogical (del)))
     if (nargin > 1)
       ## Second input is the "collapsedelimiters" parameter
       args.collapsedelimiters = del;
     endif
     ## Set proper default for the delimiter type
-    if (strncmpi (args.delimitertype, "simple", length (args.delimitertype)))
-      del = {" ","\f","\n","\r","\t","\v"};
+    if (strncmpi (args.delimitertype, "simple", length_deltype))
+      del = {" ", "\f", "\n", "\r", "\t", "\v"};
     else
-      del = "\\s";
+      del = '\s';
     endif
   endif
 
@@ -182,58 +182,69 @@
   endif
 
   if (strncmpi (args.delimitertype, "simple", length_deltype))
+    is_simple = true; 
+  elseif (strncmpi (args.delimitertype, "regularexpression", length_deltype))
+    is_simple = false; 
+  else
+    error ("strsplit:invalid_delimitertype", "strsplit: Invalid DELIMITERTYPE");
+  endif
+
+  if (is_simple)
     if (iscellstr (del))
       del = cellfun (@do_string_escapes, del, "uniformoutput", false);
     else
       del = do_string_escapes (del);
     endif
-    ## This is clumsy, but needed for multi-row strings
-    del = regexprep (del, '([^\w])', '\\$1');
+    ## Escape characters which have a special meaning in regexp.
+    del = regexprep (del, '([{}()[\]^$.*?|\\])', '\\$1');
   endif
 
   if (isempty (str))
-    result = {str};
-  elseif (strncmpi (args.delimitertype, "regularexpression", length_deltype)
-          || strncmpi (args.delimitertype, "simple", length_deltype))
+    cstr = {str};
+  else
     if (iscellstr (del))
-      del = sprintf ('%s|', del{:});
+      del = sprintf ("%s|", del{:});
       del(end) = [];
     endif
     if (args.collapsedelimiters)
-      del = ["(", del, ")+"];
+      del = [ "(" del ")+" ];
     endif
-    [result, ~, ~, ~, matches] = regexp (str, del, "split");
-  else
-    error ("strsplit:invalid_delimitertype",
-           "strsplit: Invalid DELIMITERTYPE");
+    [cstr, matches] = regexp (str, del, "split", "match");
   endif
+
 endfunction
 
 
 %!shared str
 %! str = "The rain in Spain stays mainly in the plain.";
-% Split on all whitespace.
+
+## Split on all whitespace.
 %!assert (strsplit (str), {"The", "rain", "in", "Spain", "stays", ...
-%! "mainly", "in", "the", "plain."})
-% Split on "ain".
+%!                         "mainly", "in", "the", "plain."})
+## Split on "ain".
 %!assert (strsplit (str, "ain"), {"The r", " in Sp", " stays m", ...
-%!  "ly in the pl", "."})
-% Split on " " and "ain" (treating multiple delimiters as one).
+%!                                "ly in the pl", "."})
+## Split on " " and "ain" (treating multiple delimiters as one).
+%!test
+%! s = strsplit (str, '\s|ain', true, "delimitertype", "r");
+%! assert (s, {"The", "r", "in", "Sp", "stays", ...
+%!             "m", "ly", "in", "the", "pl", "."});
 %!test
 %! s = strsplit (str, '\s|ain', true, "delimitertype", "r");
-%! assert (s, {"The", "r", "in", "Sp", "stays", "m", "ly", "in", "the", "pl", "."})
-%!test
-%! s = strsplit (str, "\\s|ain", true, "delimitertype", "r");
-%! assert (s, {"The", "r", "in", "Sp", "stays", "m", "ly", "in", "the", "pl", "."})
+%! assert (s, {"The", "r", "in", "Sp", "stays", ...
+%!             "m", "ly", "in", "the", "pl", "."});
 %!test
-%! [s, m] = strsplit (str, {"\\s", "ain"}, true, "delimitertype", "r");
-%! assert (s, {"The", "r", "in", "Sp", "stays", "m", "ly", "in", "the", "pl", "."})
-%! assert (m, {" ", "ain ", " ", "ain ", " ", "ain", " ", " ", " ", "ain"})
-% Split on " " and "ain", and treat multiple delimiters separately.
+%! [s, m] = strsplit (str, {'\s', 'ain'}, true, "delimitertype", "r");
+%! assert (s, {"The", "r", "in", "Sp", "stays", ...
+%!             "m", "ly", "in", "the", "pl", "."});
+%! assert (m, {" ", "ain ", " ", "ain ", " ", "ain", " ", " ", " ", "ain"});
+## Split on " " and "ain", and treat multiple delimiters separately.
 %!test
 %! [s, m] = strsplit (str, {" ", "ain"}, "collapsedelimiters", false);
-%! assert (s, {"The", "r", "", "in", "Sp", "", "stays", "m", "ly", "in", "the", "pl", "."})
-%! assert (m, {" ", "ain", " ", " ", "ain", " ", " ", "ain", " ", " ", " ", "ain"})
+%! assert (s, {"The", "r", "", "in", "Sp", "", "stays", ...
+%!             "m", "ly", "in", "the", "pl", "."});
+%! assert (m, {" ", "ain", " ", " ", "ain", " ", " ", "ain", ...
+%!             " ", " ", " ", "ain"});
 
 %!assert (strsplit ("road to hell"), {"road", "to", "hell"})
 %!assert (strsplit ("road to hell", " "), {"road", "to", "hell"})
@@ -252,19 +263,19 @@
 %!assert (strsplit (["a,bc,,de"], ",", false, "delimitertype", "r"), {"a", "bc", "", "de"})
 %!assert (strsplit (["a,bc,de"], ",", true, "delimitertype", "r"), {"a", "bc", "de"})
 %!assert (strsplit (["a,bc,de"], "[, ]", true, "delimitertype", "r"), {"a", "bc", "de"})
-%!assert (strsplit ("hello \t world", 1, "delimitertype", "r"), {"hello", "world"});
+%!assert (strsplit ("hello \t world", true, "delimitertype", "r"), {"hello", "world"});
 
 %!assert (strsplit ("foo\tbar", '\t', "delimitertype", "r"), {"foo", "bar"})
 %!assert (strsplit ("foo\tbar", '\t', "delimitertype", "s"), {"foo", "bar"})
 
 ## Test "match" for consecutive delmiters
 %!test
-%! [a, m] = strsplit ("a\t \nb", '\s', 'delimitertype', 'regularexpression',
-%!   'collapsedelimiters', false);
+%! [a, m] = strsplit ("a\t \nb", '\s', "delimitertype", "regularexpression",
+%!   "collapsedelimiters", false);
 %! assert (a, {"a", "", "", "b"})
 %! assert (m, {"\t", " ", "\n"})
 %!test
-%! [a, m] = strsplit ("a\t \nb", '\s', false, 'delimitertype', 'regularexpression');
+%! [a, m] = strsplit ("a\t \nb", '\s', false, "delimitertype", "regularexpression");
 %! assert (a, {"a", "", "", "b"})
 %! assert (m, {"\t", " ", "\n"})
 %!test
@@ -276,19 +287,25 @@
 %! assert (a, {"a", "b"})
 %! assert (m, {"\t \n"})
 %!test
-%! [s, m] = strsplit ("hello \t world", 1);
+%! [s, m] = strsplit ("hello \t world", true);
 %! assert (s, {"hello", "world"});
 %! assert (m, {" \t "});
 
-%% Compatibility
+## Compatibility
 %! assert (strsplit ("", "a"), {""})
 %! assert (strsplit ("a", "a"), {"", ""})
 %! assert (strsplit ("aa", "a"), {"", ""})
 %! assert (strsplit ("aaa", "a"), {"", ""})
 
-%% Test input validation
+## Bug #44641
+%!assert (strsplit ("xxx<yyy", "<"), {"xxx", "yyy"}) 
+%!assert (strsplit ('xxx\yyy', '\'), {"xxx", "yyy"}) 
+
+## Test input validation
 %!error strsplit ()
 %!error strsplit ("abc", "b", true, 4)
+%!error <invalid parameter name, 'foo'> strsplit ("abc", "b", "foo", "true")
 %!error <S and DEL must be string values> strsplit (123, "b")
-%!error <COLLAPSEDELIMITERS must be a scalar value> strsplit ("abc", "def", ones (3,3))
+%!error <COLLAPSEDELIMITERS must be a scalar value> strsplit ("abc", "def", "collapsedelimiters", ones (3,3))
+%!error <Invalid DELIMITERTYPE> strsplit ("abc", "b", "delimitertype", "foobar")
 
--- a/scripts/strings/strtok.m
+++ b/scripts/strings/strtok.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -152,7 +152,7 @@
 %! % a variety of delimiters.  Tokens and delimiters are
 %! % printed one after another in angle brackets.
 
-%% Test the tokens for all cases
+## Test the tokens for all cases
 %!assert (strtok (""), "");             # no string
 %!assert (strtok ("this"), "this");     # no delimiter in string
 %!assert (strtok ("this "), "this");    # delimiter at end
@@ -161,7 +161,7 @@
 %!assert (strtok (" this "), "this");   # delimiter at start and end
 %!assert (strtok (" "), ""(1:0));       # delimiter only
 
-%% Test the remainder for all cases
+## Test the remainder for all cases
 %!test [t,r] = strtok (""); assert (r, "");
 %!test [t,r] = strtok ("this"); assert (r, "");
 %!test [t,r] = strtok ("this "); assert (r, " ");
@@ -170,7 +170,7 @@
 %!test [t,r] = strtok (" this "); assert (r, " ");
 %!test [t,r] = strtok (" "); assert (r, "");
 
-%% Test all tokens and remainders with cell array input
+## Test all tokens and remainders with cell array input
 %!test
 %! str = {"", "this", "this ", "this is", " this", " this ", " "};
 %! [t, r] = strtok (str);
@@ -189,12 +189,12 @@
 %! assert (t{7}, "");
 %! assert (r{7}, "");
 
-%% Simple check for 2, 3, and 4 delimeters
+## Simple check for 2, 3, and 4 delimeters
 %!assert (strtok ("this is", "i "), "th")
 %!assert (strtok ("this is", "ij "), "th")
 %!assert (strtok ("this is", "ijk "), "th")
 
-%% Test all cases for 8 delimiters since a different
+## Test all cases for 8 delimiters since a different
 %!# algorithm is used when more than 7 delimiters
 %!assert (strtok ("","jklmnop "), "")
 %!assert (strtok ("this","jklmnop "), "this")
@@ -204,11 +204,11 @@
 %!assert (strtok (" this ","jklmnop "), "this")
 %!assert (strtok (" ","jklmnop "), ""(1:0))
 
-%% Test 'bad' string orientations
+## Test 'bad' string orientations
 %!assert (strtok (" this ".'), "this".');   # delimiter at start and end
 %!assert (strtok (" this ".',"jkl "), "this".');
 
-%% Test with TAB, LF, VT, FF, and CR
+## Test with TAB, LF, VT, FF, and CR
 %!test
 %! for ch = "\t\n\v\f\r"
 %!   [t, r] = strtok (["beg", ch, "end"]);
@@ -216,7 +216,7 @@
 %!   assert (r, [ch, "end"]);
 %! endfor
 
-%% Test input validation
+## Test input validation
 %!error strtok ()
 %!error strtok ("a", "b", "c")
 %!error <STR must be a string> strtok (1, "b")
--- a/scripts/strings/strtrim.m
+++ b/scripts/strings/strtrim.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/strings/strtrunc.m
+++ b/scripts/strings/strtrunc.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 William Poetra Yoga Hadisoeseno
+## Copyright (C) 2006-2015 William Poetra Yoga Hadisoeseno
 ##
 ## This file is part of Octave.
 ##
@@ -68,7 +68,7 @@
 %! assert (size (y{2}), [2, 4]);
 %! assert (y{2}, repmat ("line", 2, 1));
 
-%% Test input validation
+## Test input validation
 %!error strtrunc ()
 %!error strtrunc ("abcd")
 %!error strtrunc ("abcd", 4, 5)
--- a/scripts/strings/substr.m
+++ b/scripts/strings/substr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 Kurt Hornik
+## Copyright (C) 1996-2015 Kurt Hornik
 ##
 ## This file is part of Octave.
 ##
@@ -99,7 +99,7 @@
 %!assert (substr ("This is a test string", 1, -7), "This is a test")
 %!assert (isempty (substr ("This is a test string", 1, 0)))
 
-%% Test input validation
+## Test input validation
 %!error substr ()
 %!error substr ("foo", 2, 3, 4)
 %!error substr (ones (5, 1), 1, 1)
--- a/scripts/strings/untabify.m
+++ b/scripts/strings/untabify.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 Ben Abbott
+## Copyright (C) 2010-2015 Ben Abbott
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/strings/validatestring.m
+++ b/scripts/strings/validatestring.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -53,7 +53,7 @@
 ## @end group
 ## @end smallexample
 ##
-## @seealso{strcmp, strcmpi}
+## @seealso{strcmp, strcmpi, validateattributes, inputParser}
 ## @end deftypefn
 
 ## Author: Bill Denney <bill@denney.ws>
@@ -67,7 +67,7 @@
   position = 0;
   ## Process input arguments
   if (! isempty (varargin) && isnumeric (varargin{end}))
-    position = varargin{end};
+    position = fix (varargin{end});
     varargin(end) = [];
   endif
 
@@ -100,22 +100,21 @@
   ## Make static part of error string that uses funcname, varname, and position
   errstr = "";
   if (! isempty (funcname))
-    errstr = sprintf ("Function: %s ", funcname);
+    errstr = [funcname ": "];
   endif
   if (! isempty (varname))
-    errstr = sprintf ("%sVariable: %s ", errstr, varname);
+    errstr = [errstr varname " "];
+  else
+    errstr = sprintf ("%s'%s' ", errstr, str);
   endif
   if (position > 0)
-    errstr = sprintf ("%sArgument position %d ", errstr, position);
-  endif
-  if (! isempty (errstr))
-    errstr(end:end+1) = ":\n";
+    errstr = sprintf ("%s(argument #%i) ", errstr, position);
   endif
 
   matches = strncmpi (str, strarray(:), length (str));
   nmatches = sum (matches);
   if (nmatches == 0)
-    error ("validatestring: %s'%s' does not match any of\n%s", errstr, str,
+    error ("%sdoes not match any of\n%s", errstr,
            sprintf ("%s, ", strarray{:})(1:end-2));
   elseif (nmatches == 1)
     str = strarray{matches};
@@ -130,8 +129,8 @@
     if (all (submatch))
       str = short_str;
     else
-      error ("validatestring: %smultiple unique matches were found for '%s':\n%s",
-             errstr, str, sprintf ("%s, ", strarray{match_idx})(1:end-2));
+      error ("%sallows multiple unique matches:\n%s",
+             errstr, sprintf ("%s, ", strarray{match_idx})(1:end-2));
     endif
   endif
 
@@ -147,12 +146,12 @@
 %!assert (validatestring ("d", strarray), "def")
 
 %!error <'xyz' does not match any> validatestring ("xyz", strarray)
-%!error <Function: DUMMY_TEST> validatestring ("xyz", strarray, "DUMMY_TEST")
-%!error <Function: DUMMY_TEST Variable: DUMMY_VAR:> validatestring ("xyz", strarray, "DUMMY_TEST", "DUMMY_VAR")
-%!error <Function: DUMMY_TEST Variable: DUMMY_VAR Argument position 5> validatestring ("xyz", strarray, "DUMMY_TEST", "DUMMY_VAR", 5)
-%!error <multiple unique matches were found for 'abc'> validatestring ("abc", strarray)
+%!error <DUMMY_TEST: 'xyz' does not> validatestring ("xyz", strarray, "DUMMY_TEST")
+%!error <DUMMY_TEST: DUMMY_VAR does> validatestring ("xyz", strarray, "DUMMY_TEST", "DUMMY_VAR")
+%!error <DUMMY_TEST: DUMMY_VAR \(argument #5\) does> validatestring ("xyz", strarray, "DUMMY_TEST", "DUMMY_VAR", 5)
+%!error <'abc' allows multiple unique matches> validatestring ("abc", strarray)
 
-%% Test input validation
+## Test input validation
 %!error validatestring ("xyz")
 %!error validatestring ("xyz", {"xyz"}, "3", "4", 5, 6)
 %!error <invalid number of character inputs> validatestring ("xyz", {"xyz"}, "3", "4", "5")
--- a/scripts/testfun/__have_feature__.m
+++ b/scripts/testfun/__have_feature__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2013 John W. Eaton
+## Copyright (C) 2013-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -33,3 +33,7 @@
   endif
 endfunction
 
+
+## No test coverage for internal function.  It is tested through calling fcn.
+%!assert (1)
+
--- a/scripts/testfun/__printf_assert__.m
+++ b/scripts/testfun/__printf_assert__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 David Bateman
+## Copyright (C) 2005-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -22,7 +22,11 @@
 ## @end deftypefn
 
 function __printf_assert__ (varargin)
-  global _assert_printf;
+  global _assert_printf = "";
   _assert_printf = cat (2, _assert_printf, sprintf (varargin{:}));
 endfunction
 
+
+## No test coverage for internal function.  It is tested through calling fcn.
+%!assert (1)
+
--- a/scripts/testfun/__prog_output_assert__.m
+++ b/scripts/testfun/__prog_output_assert__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 David Bateman
+## Copyright (C) 2005-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -22,7 +22,7 @@
 ## @end deftypefn
 
 function ret = __prog_output_assert__ (str)
-  global _assert_printf;
+  global _assert_printf = "";
   if (isempty (_assert_printf))
     ret = isempty (str);
   elseif (_assert_printf(end) == "\n")
@@ -33,3 +33,7 @@
   _assert_printf = "";
 endfunction
 
+
+## No test coverage for internal function.  It is tested through calling fcn.
+%!assert (1)
+
--- a/scripts/testfun/__run_test_suite__.m
+++ b/scripts/testfun/__run_test_suite__.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 David Bateman
+## Copyright (C) 2005-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
@@ -40,95 +40,102 @@
   global topsrcdir = fcnfiledir;
   global topbuilddir = testsdir;
   pso = page_screen_output ();
-  warn_state = warning ("query", "quiet");
-  warning ("on", "quiet");
+  orig_wstate = warning ();
   logfile = make_absolute_filename ("fntests.log");
-  try
+  unwind_protect
     page_screen_output (false);
+    warning ("on", "quiet");
     warning ("off", "Octave:deprecated-function");
-    fid = fopen (logfile, "wt");
-    if (fid < 0)
-      error ("could not open %s for writing", logfile);
-    endif
-    test ("", "explain", fid);
-    dp = dn = dxf = dsk = 0;
-    puts ("\nIntegrated test scripts:\n\n");
-    for i = 1:length (fcndirs)
-      [p, n, xf, sk] = run_test_script (fid, fcndirs{i});
-      dp += p;
-      dn += n;
-      dxf += xf;
-      dsk += sk;
-    endfor
-    puts ("\nFixed test scripts:\n\n");
-    for i = 1:length (fixedtestdirs)
-      [p, n, xf, sk] = run_test_dir (fid, fixedtestdirs{i});
-      dp += p;
-      dn += n;
-      dxf += xf;
-      dsk += sk;
-    endfor
-    puts ("\nSummary:\n\n");
-    nfail = dn - dp;
-    printf ("  PASS    %6d\n", dp);
-    printf ("  FAIL    %6d\n", nfail);
-    if (dxf > 0)
-      printf ("  XFAIL   %6d\n", dxf);
-    endif
-    if (dsk > 0)
-      printf ("  SKIPPED %6d\n", dsk);
-    endif
-    puts ("\n");
-    printf ("See the file %s for additional details.\n", logfile);
-    if (dxf > 0)
+    try
+      fid = fopen (logfile, "wt");
+      if (fid < 0)
+        error ("could not open %s for writing", logfile);
+      endif
+      test ("", "explain", fid);
+      dp = dn = dxf = dsk = 0;
+      puts ("\nIntegrated test scripts:\n\n");
+      for i = 1:length (fcndirs)
+        [p, n, xf, sk] = run_test_script (fid, fcndirs{i});
+        dp += p;
+        dn += n;
+        dxf += xf;
+        dsk += sk;
+      endfor
+      puts ("\nFixed test scripts:\n\n");
+      for i = 1:length (fixedtestdirs)
+        [p, n, xf, sk] = run_test_dir (fid, fixedtestdirs{i});
+        dp += p;
+        dn += n;
+        dxf += xf;
+        dsk += sk;
+      endfor
+      puts ("\nSummary:\n\n");
+      nfail = dn - dp - dxf;
+      printf ("  PASS    %6d\n", dp);
+      printf ("  FAIL    %6d\n", nfail);
+      if (dxf > 0)
+        printf ("  XFAIL   %6d\n", dxf);
+      endif
+      if (dsk > 0)
+        printf ("  SKIPPED %6d\n", dsk);
+      endif
       puts ("\n");
-      puts ("Expected failures (listed as XFAIL above) are known bugs.\n");
-      puts ("Please help improve Octave by contributing fixes for them.\n");
-    endif
-    if (dsk > 0)
-      puts ("\n");
-      puts ("Tests are most often skipped because the features they require\n");
-      puts ("have been disabled.  Features are most often disabled because\n");
-      puts ("they require dependencies that were not present when Octave\n");
-      puts ("was built.  The configure script should have printed a summary\n");
-      puts ("at the end of its run indicating which dependencies were not found.\n");
-    endif
+      printf ("See the file %s for additional details.\n", logfile);
+      if (dxf > 0)
+        puts ("\n");
+        puts ("Expected failures (listed as XFAIL above) are known bugs.\n");
+        puts ("Please help improve Octave by contributing fixes for them.\n");
+      endif
+      if (dsk > 0)
+        puts ("\n");
+        puts ("Tests are most often skipped because the features they require\n");
+        puts ("have been disabled.  Features are most often disabled because\n");
+        puts ("they require dependencies that were not present when Octave\n");
+        puts ("was built.  The configure script should have printed a summary\n");
+        puts ("at the end of its run indicating which dependencies were not found.\n");
+      endif
 
-    ## Weed out deprecated and private functions
-    weed_idx = cellfun (@isempty, regexp (files_with_tests, '\<deprecated\>|\<private\>', 'once'));
-    files_with_tests = files_with_tests(weed_idx);
-    weed_idx = cellfun (@isempty, regexp (files_with_no_tests, '\<deprecated\>|\<private\>', 'once'));
-    files_with_no_tests = files_with_no_tests(weed_idx);
+      ## Weed out deprecated and private functions
+      weed_idx = cellfun (@isempty, regexp (files_with_tests, '\<deprecated\>|\<private\>', 'once'));
+      files_with_tests = files_with_tests(weed_idx);
+      weed_idx = cellfun (@isempty, regexp (files_with_no_tests, '\<deprecated\>|\<private\>', 'once'));
+      files_with_no_tests = files_with_no_tests(weed_idx);
 
-    report_files_with_no_tests (files_with_tests, files_with_no_tests, ".m");
+      report_files_with_no_tests (files_with_tests, files_with_no_tests, ".m");
 
-    puts ("\nPlease help improve Octave by contributing tests for these files\n");
-    printf ("(see the list in the file %s).\n\n", logfile);
+      puts ("\nPlease help improve Octave by contributing tests for these files\n");
+      printf ("(see the list in the file %s).\n\n", logfile);
 
-    fprintf (fid, "\nFiles with no tests:\n\n%s",
-                  list_in_columns (files_with_no_tests, 80));
-    fclose (fid);
-
+      fprintf (fid, "\nFiles with no tests:\n\n%s",
+                    list_in_columns (files_with_no_tests, 80));
+      fclose (fid);
+    catch
+      disp (lasterr ());
+    end_try_catch
+  unwind_protect_cleanup
+    warning ("off", "all");
+    warning (orig_wstate);
     page_screen_output (pso);
-    warning (warn_state.state, "quiet");
-  catch
-    page_screen_output (pso);
-    warning (warn_state.state, "quiet");
-    disp (lasterr ());
-  end_try_catch
+  end_unwind_protect
 endfunction
 
 function print_test_file_name (nm)
-  filler = repmat (".", 1, 55-length (nm));
+  filler = repmat (".", 1, 60-length (nm));
   printf ("  %s %s", nm, filler);
 endfunction
 
-function print_pass_fail (n, p)
-  if (n > 0)
-    printf (" PASS %4d/%-4d", p, n);
-    nfail = n - p;
+function print_pass_fail (p, n, xf, sk)
+  if ((n + sk) > 0)
+    printf (" PASS   %4d/%-4d", p, n);
+    nfail = n - p - xf;
     if (nfail > 0)
-      printf (" FAIL %d", nfail);
+      printf ("\n%71s %3d", "FAIL ", nfail);
+    endif
+    if (sk > 0)
+      printf ("\n%71s %3d", "SKIP ", sk);
+    endif
+    if (xf > 0)
+      printf ("\n%71s %3d", "XFAIL", xf);
     endif
   endif
   puts ("\n");
@@ -184,7 +191,7 @@
   endfor
   saved_dir = pwd ();
   unwind_protect
-    chdir (d);
+    cd (d);
     for i = 1:length (lst)
       nm = lst(i).name;
       if (length (nm) > 4 && strcmpi (nm((end-3):end), ".tst"))
@@ -193,7 +200,7 @@
         if (has_tests (ffnm))
           print_test_file_name (nm);
           [p, n, xf, sk] = test (nm, "quiet", fid);
-          print_pass_fail (n, p);
+          print_pass_fail (p, n, xf, sk);
           files_with_tests(end+1) = ffnm;
         else
           files_with_no_tests(end+1) = ffnm;
@@ -205,7 +212,7 @@
       endif
     endfor
   unwind_protect_cleanup
-    chdir (saved_dir);
+    cd (saved_dir);
   end_unwind_protect
 endfunction
 
@@ -244,7 +251,7 @@
         tmp = strrep (tmp, [topbuilddir, filesep], "");
         print_test_file_name (tmp);
         [p, n, xf, sk] = test (f, "quiet", fid);
-        print_pass_fail (n, p);
+        print_pass_fail (p, n, xf, sk);
         dp += p;
         dn += n;
         dxf += xf;
@@ -272,3 +279,7 @@
   printf ("\n%d (of %d) %s files have no tests.\n", n_without, n_tot, typ);
 endfunction
 
+
+## No test coverage for internal function.  It is tested through calling fcn.
+%!assert (1)
+
--- a/scripts/testfun/assert.m
+++ b/scripts/testfun/assert.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -18,21 +18,24 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} assert (@var{cond})
+## @deftypefnx {Function File} {} assert (@var{cond}, @var{errmsg})
 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{errmsg}, @dots{})
 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{msg_id}, @var{errmsg}, @dots{})
 ## @deftypefnx {Function File} {} assert (@var{observed}, @var{expected})
 ## @deftypefnx {Function File} {} assert (@var{observed}, @var{expected}, @var{tol})
 ##
-## Produce an error if the specified condition is not met.  @code{assert} can
-## be called in three different ways.
+## Produce an error if the specified condition is not met.
+##
+## @code{assert} can be called in three different ways.
 ##
 ## @table @code
 ## @item  assert (@var{cond})
+## @itemx assert (@var{cond}, @var{errmsg})
 ## @itemx assert (@var{cond}, @var{errmsg}, @dots{})
 ## @itemx assert (@var{cond}, @var{msg_id}, @var{errmsg}, @dots{})
 ## Called with a single argument @var{cond}, @code{assert} produces an
-## error if @var{cond} is zero.  When called with more than one argument the
-## additional arguments are passed to the @code{error} function.
+## error if @var{cond} is false (numeric zero).  Any additional arguments are
+## passed to the @code{error} function for processing.
 ##
 ## @item assert (@var{observed}, @var{expected})
 ## Produce an error if observed is not the same as expected.  Note that
@@ -46,12 +49,13 @@
 ## an error if @code{abs (@var{observed} - @var{expected}) > abs (@var{tol})}.
 ## If @var{tol} is negative then it is a relative tolerance which will produce
 ## an error if @code{abs (@var{observed} - @var{expected}) >
-## abs (@var{tol} * @var{expected})}.  If @var{expected} is zero @var{tol} will
-## always be interpreted as an absolute tolerance.  If @var{tol} is not scalar
-## its dimensions must agree with those of @var{observed} and @var{expected}
-## and tests are performed on an element-wise basis.
+## abs (@var{tol} * @var{expected})}.
+## If @var{expected} is zero @var{tol} will always be interpreted as an
+## absolute tolerance.  If @var{tol} is not scalar its dimensions must agree
+## with those of @var{observed} and @var{expected} and tests are performed on
+## an element-by-element basis.
 ## @end table
-## @seealso{test, fail, error}
+## @seealso{fail, test, error, isequal}
 ## @end deftypefn
 
 function assert (cond, varargin)
@@ -72,7 +76,8 @@
     endif
 
     if (nargin == 1 || (nargin > 1 && islogical (cond) && ischar (varargin{1})))
-      if ((! isnumeric (cond) && ! islogical (cond)) || ! all (cond(:)))
+      if ((! isnumeric (cond) && ! islogical (cond))
+          || isempty (cond) || ! all (cond(:)))
         if (nargin == 1)
           ## Perhaps, say which elements failed?
           argin = ["(" strjoin(cellstr (argn), ",") ")"];
@@ -162,7 +167,7 @@
           err.reason{end+1} = ["Expected struct, but observed " class(cond)];
         elseif (ndims (cond) != ndims (expected)
                 || any (size (cond) != size (expected))
-                || rows (fieldnames (cond)) != rows (fieldnames (expected)))
+                || numfields (cond) != numfields (expected))
 
           err.index{end+1} = ".";
           err.observed{end+1} = ["O(" sprintf("%dx", size(cond))(1:end-1) ")"];
@@ -292,12 +297,14 @@
           ## Replace exceptional values already checked above by zero.
           A_null_real = real (A);
           B_null_real = real (B);
-          exclude = errseen | ! isfinite (A_null_real) & ! isfinite (B_null_real);
+          exclude = errseen ...
+                    | ! isfinite (A_null_real) & ! isfinite (B_null_real);
           A_null_real(exclude) = 0;
           B_null_real(exclude) = 0;
           A_null_imag = imag (A);
           B_null_imag = imag (B);
-          exclude = errseen | ! isfinite (A_null_imag) & ! isfinite (B_null_imag);
+          exclude = errseen ...
+                    | ! isfinite (A_null_imag) & ! isfinite (B_null_imag);
           A_null_imag(exclude) = 0;
           B_null_imag(exclude) = 0;
           A_null = complex (A_null_real, A_null_imag);
@@ -398,7 +405,10 @@
 
 
 ## empty input
-%!assert ([])
+%!error assert ([])
+%!error assert ("")
+%!error assert ({})
+%!error assert (struct ([]))
 %!assert (zeros (3,0), zeros (3,0))
 %!error <O\(3x0\)\s+E\(0x2\)> assert (zeros (3,0), zeros (0,2))
 %!error <Dimensions don't match> assert (zeros (3,0), [])
@@ -621,10 +631,10 @@
 %!   if (sum (errmsg () == "\n") != 6)
 %!     error ("Incorrect number of errors reported");
 %!   endif
-%!   assert (!isempty (regexp (errmsg, '\(1,2\).*Abs err 3 exceeds tol 0\>')));
-%!   assert (!isempty (regexp (errmsg, '\(2,2\).*Abs err 2 exceeds tol 0.3')));
-%!   assert (!isempty (regexp (errmsg, '\(1,1\).*Abs err 1 exceeds tol 0.1')));
-%!   assert (!isempty (regexp (errmsg, '\(2,1\).*Rel err 2 exceeds tol 0.2')));
+%!   assert (! isempty (regexp (errmsg, '\(1,2\).*Abs err 3 exceeds tol 0\>')));
+%!   assert (! isempty (regexp (errmsg, '\(2,2\).*Abs err 2 exceeds tol 0.3')));
+%!   assert (! isempty (regexp (errmsg, '\(1,1\).*Abs err 1 exceeds tol 0.1')));
+%!   assert (! isempty (regexp (errmsg, '\(2,1\).*Rel err 2 exceeds tol 0.2')));
 %! end_try_catch
 
 ## test input validation
@@ -637,7 +647,7 @@
 
   cout = cell (numel (erridx), 1);
   tmp = cell (1, numel (matsize));
-  [tmp{:}] = ind2sub (matsize, erridx (:));
+  [tmp{:}] = ind2sub (matsize, erridx(:));
   subs = [tmp{:}];
   if (numel (matsize) == 2)
     subs = subs(:, matsize != 1);
--- a/scripts/testfun/demo.m
+++ b/scripts/testfun/demo.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -25,12 +25,14 @@
 ## Run example code block @var{n} associated with the function @var{name}.
 ## If @var{n} is not specified, all examples are run.
 ##
-## Examples are stored in the script file, or in a file with the same
-## name but no extension located on Octave's load path.  To keep examples
-## separate from regular script code, all lines are prefixed by @code{%!}.  Each
-## example must also be introduced by the keyword @qcode{"demo"} flush left
-## to the prefix with no intervening spaces.  The remainder of the example
-## can contain arbitrary Octave code.  For example:
+## The preferred location for example code blocks is embedded within the script
+## m-file immediately following the code that it exercises.  Alternatively,
+## the examples may be stored in a file with the same name but no extension
+## located on Octave's load path.  To separate examples from regular script
+## code all lines are prefixed by @code{%!}.  Each example must also be
+## introduced by the keyword @qcode{"demo"} flush left to the prefix with no
+## intervening spaces.  The remainder of the example can contain arbitrary
+## Octave code.  For example:
 ##
 ## @example
 ## @group
@@ -38,78 +40,84 @@
 ## %! t = 0:0.01:2*pi;
 ## %! x = sin (t);
 ## %! plot (t, x);
-## %! %-------------------------------------------------
-## %! % the figure window shows one cycle of a sine wave
+## %! title ("one cycle of a sine wave");
+## %! #-------------------------------------------------
+## %! # the figure window shows one cycle of a sine wave
 ## @end group
 ## @end example
 ##
-## Note that the code is displayed before it is executed, so a simple
-## comment at the end suffices for labeling what is being shown.  It is
-## generally not necessary to use @code{disp} or @code{printf} within the demo.
+## Note that the code is displayed before it is executed so that a simple
+## comment at the end suffices for labeling what is being shown.  For plots,
+## labeling can also be done with @code{title} or @code{text}.  It is generally
+## @strong{not} necessary to use @code{disp} or @code{printf} within the demo.
 ##
-## Demos are run in a function environment with no access to external
-## variables.  This means that every demo must have separate initialization
-## code.  Alternatively, all demos can be combined into a single large demo
-## with the code
+## Demos are run in a stand-alone function environment with no access to
+## external variables.  This means that every demo must have separate
+## initialization code.  Alternatively, all demos can be combined into a single
+## large demo with the code
 ##
 ## @example
-## %! input("Press <enter> to continue: ","s");
+## %! input ("Press <enter> to continue: ", "s");
 ## @end example
 ##
 ## @noindent
-## between the sections, but this is discouraged.  Other techniques
+## between the sections, but this usage is discouraged.  Other techniques
 ## to avoid multiple initialization blocks include using multiple plots
 ## with a new @code{figure} command between each plot, or using @code{subplot}
 ## to put multiple plots in the same window.
 ##
-## Also, because demo evaluates within a function context, you cannot
-## define new functions inside a demo.  If you must have function blocks,
-## rather than just anonymous functions or inline functions, you will have to
-## use @code{eval (example ("function",n))} to see them.  Because eval only
-## evaluates one line, or one statement if the statement crosses
-## multiple lines, you must wrap your demo in @qcode{"if 1 <demo stuff> endif"}
-## with the @qcode{"if"} on the same line as @qcode{"demo"}.  For example:
+## Finally, because @code{demo} evaluates within a function context it is
+## not possible to define new functions within the code.  Anonymous functions
+## make a good substitute in most instances.  If function blocks
+## @strong{must} be used then the code @code{eval (example ("function", n))}
+## will allow Octave to see them.  This has its own problems, however, as
+## @code{eval} only evaluates one line or statement at a time.  In this case
+## the function declaration must be wrapped with
+## @qcode{"if 1 <demo stuff> endif"} where @qcode{"if"} is on the same line
+## as @qcode{"demo"}.  For example:
 ##
 ## @example
 ## @group
 ## %!demo if 1
-## %!  function y=f(x)
-## %!    y=x;
+## %!  function y = f(x)
+## %!    y = x;
 ## %!  endfunction
 ## %!  f(3)
 ## %! endif
 ## @end group
 ## @end example
 ##
-## @seealso{test, example}
+## @seealso{rundemos, example, test}
 ## @end deftypefn
 
 ## FIXME: modify subplot so that gnuplot_has_multiplot == 0 causes it to
 ## use the current figure window but pause if not plotting in the
 ## first subplot.
 
-function demo (name, n)
+function demo (name, n = 0)
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
-  if (nargin < 2)
-    n = 0;
-  elseif (ischar (n))
+  if (ischar (n))
     n = str2double (n);
   endif
 
+  if (! (isreal (n) && isscalar (n) && n == fix (n)))
+    error ("demo: N must be a scalar integer");
+  endif
+
   [code, idx] = test (name, "grabdemo");
 
   if (idx == -1)
-    warning ("no function %s found", name);
+    warning ("demo: no function %s found", name);
     return;
   elseif (isempty (idx))
-    warning ("no demo available for %s", name);
+    warning ("demo: no demo available for %s", name);
     return;
   elseif (n >= length (idx))
-    warning ("only %d demos available for %s", length (idx) - 1, name);
+    warning ("demo: only %d demos available for %s", length (idx) - 1, name);
     return;
   endif
 
@@ -128,7 +136,7 @@
     try
       block = code(idx(doidx(i)):idx(doidx(i)+1)-1);
       ## Use an environment without variables
-      eval (["function __demo__()\n" block "\nendfunction"]);
+      eval (["function __demo__ ()\n" block "\nendfunction"]);
       ## Display the code that will be executed before executing it
       printf ("%s example %d:%s\n\n", name, doidx(i), block);
       __demo__;
@@ -146,9 +154,15 @@
 %! t = 0:0.01:2*pi;
 %! x = sin (t);
 %! plot (t, x);
-%! %-------------------------------------------------
-%! % the figure window shows one cycle of a sine wave
+%! title ("one cycle of a sine wave");
+%! #-------------------------------------------------
+%! # the figure window shows one cycle of a sine wave
 
 %!error demo ()
 %!error demo (1, 2, 3)
+%!error <N must be a scalar integer> demo ("demo", {1})
+%!error <N must be a scalar integer> demo ("demo", ones (2,2))
+%!error <N must be a scalar integer> demo ("demo", 1.5)
+%!warning <no function .* found> demo ("_%NOT_A_FUNCTION%_");
+%!warning <only 1 demos available for demo> demo ("demo", 10);
 
--- a/scripts/testfun/example.m
+++ b/scripts/testfun/example.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -35,31 +35,46 @@
 ## @seealso{demo, test}
 ## @end deftypefn
 
-function [code_r, idx_r] = example (name, n)
+function [ex_code, ex_idx] = example (name, n = 0)
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
 
-  if (nargin < 2)
-    n = 0;
-  elseif (ischar (n))
+  if (ischar (n))
     n = str2double (n);
   endif
 
+  if (! (isreal (n) && isscalar (n) && n == fix (n)))
+    error ("example: N must be a scalar integer");
+  endif
+
   [code, idx] = test (name, "grabdemo");
+
+  if (idx == -1)
+    warning ("example: no function %s found", name);
+    return;
+  elseif (isempty (idx))
+    warning ("example: no example available for %s", name);
+    return;
+  elseif (n >= length (idx))
+    warning ("example: only %d examples available for %s",
+             length (idx) - 1, name);
+    return;
+  endif
+
   if (nargout > 0)
     if (n > 0)
       if (n <= length (idx))
-        code_r = code(idx(n):idx(n+1)-1);
-        idx_r = [1, length(code_r)+1];
+        ex_code = code(idx(n):idx(n+1)-1);
+        ex_idx = [1, length(ex_code)+1];
       else
-        code_r = "";
-        idx_r = [];
+        ex_code = "";
+        ex_idx = [];
       endif
     else
-      code_r = code;
-      idx_r = idx;
+      ex_code = code;
+      ex_idx = idx;
     endif
   else
     if (n > 0)
@@ -67,13 +82,6 @@
     else
       doidx = 1:length (idx) - 1;
     endif
-    if (isempty (idx))
-      warning ("no example available for %s", name);
-      return;
-    elseif (n >= length (idx))
-      warning ("only %d examples available for %s", length (idx) - 1, name);
-      return;
-    endif
 
     for i = 1:length (doidx)
       block = code(idx(doidx(i)):idx(doidx(i)+1)-1);
@@ -90,17 +98,24 @@
 
 %!demo
 %! clf;
-%! t = 0:0.01:2*pi;  x = sin (t);
+%! t = 0:0.01:2*pi;
+%! x = sin (t);
 %! plot (t,x)
 
-%!assert (example ("example",1), "\n example (\"example\");");
+%!assert (example ("example", 1), "\n example (\"example\");");
+
 %!test
 %! [code, idx] = example ("example");
 %! assert (code, ...
-%!         "\n example (\"example\");\n clf;\n t = 0:0.01:2*pi;  x = sin (t);\n plot (t,x)")
+%!         "\n example (\"example\");\n clf;\n t = 0:0.01:2*pi;\n x = sin (t);\n plot (t,x)");
 %! assert (idx, [1, 23, 73]);
 
-%% Test input validation
-%!error example
+## Test input validation
+%!error example ()
 %!error example ("example", 3, 5)
+%!error <N must be a scalar integer> example ("example", {1})
+%!error <N must be a scalar integer> example ("example", ones (2,2))
+%!error <N must be a scalar integer> example ("example", 1.5)
+%!warning <no function .* found> example ("_%NOT_A_FUNCTION%_");
+%!warning <only 2 examples available for example> example ("example", 10);
 
--- a/scripts/testfun/fail.m
+++ b/scripts/testfun/fail.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Paul Kienzle
+## Copyright (C) 2005-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -22,51 +22,51 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} fail (@var{code})
 ## @deftypefnx {Function File} {} fail (@var{code}, @var{pattern})
+## @deftypefnx {Function File} {} fail (@var{code}, "warning")
 ## @deftypefnx {Function File} {} fail (@var{code}, "warning", @var{pattern})
 ##
 ## Return true if @var{code} fails with an error message matching
-## @var{pattern}, otherwise produce an error.  Note that @var{code}
-## is a string and if @var{code} runs successfully, the error produced is:
+## @var{pattern}, otherwise produce an error.
+##
+## @var{code} must be in the form of a string that is passed to the Octave
+## interpreter via the @code{evalin} function, i.e., a (quoted) string constant
+## or a string variable.
+##
+## Note that if @var{code} runs successfully, rather than failing, the error
+## printed is:
 ##
 ## @example
 ##           expected error <.> but got none
 ## @end example
 ##
-##
-## Code must be in the form of a string that may be passed by
-## @code{fail} to the Octave interpreter via the @code{evalin} function,
-## that is, a (quoted) string constant or a string variable.
-##
-## If called with two arguments, the behavior is similar to
-## @code{fail (@var{code})}, except the return value will only be true if
-## code fails with an error message containing pattern (case sensitive).
-## If the code fails with a different error to that given in pattern,
-## the message produced is:
+## If called with two arguments, the return value will be true only if
+## @var{code} fails with an error message containing @var{pattern}
+## (case sensitive).  If the code fails with a different error than the one
+## specified in @var{pattern} then the message produced is:
 ##
 ## @example
 ## @group
-##           expected <pattern>
+##           expected <@var{pattern}>
 ##           but got <text of actual error>
 ## @end group
 ## @end example
 ##
 ## The angle brackets are not part of the output.
 ##
-## Called with three arguments, the behavior is similar to
-## @code{fail (@var{code}, @var{pattern})}, but produces an error if no
-## warning is given during code execution or if the code fails.
-## @seealso{assert}
+## When called with the @qcode{"warning"} option @code{fail} will produce
+## an error if executing the code produces no warning.
+## @seealso{assert, error}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
 
-function ret = fail (code, pattern, warning_pattern)
+function retval = fail (code, pattern, warning_pattern)
 
   if (nargin < 1 || nargin > 3)
     print_usage ();
   endif
 
-  ## sort out arguments
+  ## Parse input arguments
   test_warning = (nargin > 1 && strcmp (pattern, "warning"));
   if (nargin == 3)
     pattern = warning_pattern;
@@ -74,52 +74,50 @@
     pattern = "";
   endif
 
-  ## match any nonempty message
+  ## Match any nonempty message
   if (isempty (pattern))
     pattern = ".";
   endif
 
-  ## allow assert (fail ())
+  ## Allow assert (fail ())
   if (nargout)
-    ret = 1;
+    retval = true;
   endif
 
   if (test_warning)
     ## Perform the warning test.
     ## Clear old warnings.
-    lastwarn ();
+    lastwarn ("");
     ## Make sure warnings are turned on.
     state = warning ("query", "quiet");
     warning ("on", "quiet");
     try
-      ## printf ("lastwarn before %s: %s\n",code,lastwarn);
-      evalin ("caller", sprintf ("%s;", code));
-      ## printf ("lastwarn after %s: %s\n",code,lastwarn);
+      evalin ("caller", [code ";"]);
       ## Retrieve new warnings.
-      err = lastwarn ();
+      warn = lastwarn ();
       warning (state.state, "quiet");
-      if (isempty (err))
+      if (isempty (warn))
         msg = sprintf ("expected warning <%s> but got none", pattern);
       else
         ## Transform "warning: ...\n" to "...".
-        err([1:9, end]) = [];
-        if (! isempty (regexp (err, pattern, "once")))
+        warn([1:9, end]) = [];
+        if (! isempty (regexp (warn, pattern, "once")))
           return;
         endif
-        msg = sprintf ("expected warning <%s>\nbut got <%s>", pattern, err);
+        msg = sprintf ("expected warning <%s>\nbut got <%s>", pattern, warn);
       endif
     catch
       warning (state.state, "quiet");
       err = lasterr;
       ## Transform "error: ...\n", to "...".
-      err([1:7, end]) = [];
-      msg = sprintf ("expected warning <%s> but got error <%s>", pattern, err);
+      err([1:6, end]) = [];
+      msg = sprintf ("expected warning <%s>\nbut got error <%s>", pattern, err);
     end_try_catch
 
   else
     ## Perform the error test.
     try
-      evalin ("caller", sprintf ("%s;", code));
+      evalin ("caller", [code ";"]);
       msg = sprintf ("expected error <%s> but got none", pattern);
     catch
       err = lasterr ();
@@ -144,11 +142,15 @@
 %!fail ("fail ('[1,2]*[2,3]', 'usage:')", "expected error <usage:>\nbut got.*nonconformant")
 %!fail ("warning ('test warning')", "warning", "test warning");
 
-##% !fail ("warning ('next test')",'warning','next test');  ## only allowed one warning test?!?
+#%!fail ("warning ('next test')",'warning','next test');  # only allowed one warning test?!?
 
-%% Test that fail() itself will generate an error
-%!error fail ("1")
-%!error <undefined> fail ("a*[2;3]", "nonconformant")
-%!error <expected error>  fail ("a*[2,3]", "usage:")
+## Test that fail() itself will generate an error
+%!error <expected error> fail ("1")
+%!error <'__a__' undefined> fail ("__a__*[2;3]", "nonconformant")
+%!error <expected error .usage:>  fail ("__a__*[2,3]", "usage:")
 %!error <warning failure> fail ("warning ('warning failure')", "warning", "success")
 
+## Test input validation
+%!error fail ()
+%!error fail (1,2,3,4)
+
new file mode 100644
--- /dev/null
+++ b/scripts/testfun/private/compare_plot_demos.m
@@ -0,0 +1,120 @@
+## Copyright (C) 2012 Ben Abbott  <bpabbott@mac.com>
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} compare_plot_demos ()
+## @deftypefnx {Function File} {} compare_plot_demos ("toolkits", @{@var{toolkit1}, @var{toolkit2}, @dots{}@})
+##
+## Uses @code{dump_demos} and @code{html_compare_plot_demos} to produce an
+## html comparison of the plot demos for each of Octave's graphics toolkits.
+##
+## An m-file named @file{dump_plots.m} will be created in the current working
+## directory.  This function will be used to render and save the plot demo
+## images.
+##
+## If they do not already exist, directories for each available graphics
+## toolkit are created.  Each toolkit's directory will be populated with images
+## of each plot demo in the png format.
+##
+## Finally, an html document named @file{compare_plot_demos.html} is produced.
+## This page places each toolkit's images side by side for a convenient
+## comparison of the results.
+##
+## If the property @qcode{"toolkits"} is given then compare only the listed
+## toolkits in the cell string.  The list may also include the toolkit
+## @qcode{"matlab"}.
+##
+## @end deftypefn
+
+## Author: Ben Abbott  <bpabbott@mac.com>
+
+function compare_plot_demos (varargin)
+
+  arg.toolkits = available_graphics_toolkits ();
+  arg.directories = {"plot/appearance", "plot/draw", "plot/util", "image"};
+  arg.fmt = "png";
+  arg.fcn_file = "dump_plot_demos.m";
+  arg.replace_images = false;
+
+  for n = 1:2:numel(varargin)
+    if (! ischar (varargin{n}))
+      print_usage ();
+    else
+      arg.(varargin{n}) = varargin{n+1};
+    endif
+  endfor
+
+  if (ischar (arg.toolkits))
+    arg.toolkits = {arg.toolkits};
+  elseif (! iscellstr (arg.toolkits))
+    error ('compare_plot_demos: Invalid value for "toolkits"')
+  endif
+
+  if (ischar (arg.directories))
+    arg.directories = {arg.directories};
+  elseif (! iscellstr (arg.directories))
+    error ('compare_plot_demos: Invalid value for "directory"')
+  endif
+
+  if (! ischar (arg.fmt))
+    error ('compare_plot_demos: Invalid value for "fmt"')
+  endif
+
+  ## Generate arg.fcn_file for rendering/saving the plot demo images
+  dump_demos (arg.directories, arg.fcn_file, arg.fmt);
+
+  [~, fcn_name] = fileparts (arg.fcn_file);
+
+  ## Generate the plot demo images for each toolkit
+  cwd = pwd ();
+  unwind_protect
+    addpath (pwd);
+    for n = 1:numel (arg.toolkits)
+      if (! isdir (fullfile (cwd, arg.toolkits{n})))
+        mkdir (arg.toolkits{n});
+      endif
+      cd (arg.toolkits{n});
+      if (arg.replace_images && ! isempty (dir (["*." arg.fmt])))
+        delete (["*." arg.fmt]);
+      endif
+      if (! strcmp (arg.toolkits{n}, "matlab"))
+        close all;
+        graphics_toolkit (arg.toolkits{n});
+        try
+          eval (fcn_name);
+        catch
+          printf ("Error running plot demos for ""%s"" toolkit\n",
+                  arg.toolkits{n});
+          disp (lasterror);
+        end_try_catch
+      endif
+      cd (cwd);
+    endfor
+  unwind_protect_cleanup
+    rmpath (cwd);
+  end_unwind_protect
+  if (! strcmp (arg.toolkits, "matlab"))
+    ## Generate the html comparison of the images
+    html_compare_plot_demos (arg.toolkits);
+  else
+    ## We need to run matlab manually before the html page can be created
+    printf ('\nNow run %s in Matlab.\nAfter this run html_compare_plot_demos,\n', arg.fcn_file);
+    printf ('for example html_compare_plot_demos ({"fltk", "gnuplot", "matlab"}), to create the html page.\n');
+  endif
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/testfun/private/dump_demos.m
@@ -0,0 +1,187 @@
+## Copyright (C) 2010 Søren Hauberg
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} dump_demos ()
+## @deftypefnx {Function File} {} dump_demos (@var{dirs})
+## @deftypefnx {Function File} {} dump_demos (@var{dirs}, @var{mfile})
+## @deftypefnx {Function File} {} dump_demos (@var{dirs}, @var{mfile}, @var{fmt})
+## Produce a script, with the name specified by @var{mfile}, containing
+## the demos in the directories, @var{dirs}.  The demos are assumed to produce
+## graphical output, whose renderings are saved with the specified format,
+## @var{fmt}.
+##
+## The defaults for each input are;
+##
+## @table @var
+##   @item @var{dirs}
+##   @code{@{"plot/appearance", "plot/draw", "plot/util", "image"@}}
+##
+##   @item @var{mfile}
+##   @qcode{"dump.m"}
+##
+##   @item @var{fmt}
+##   @qcode{"png"}
+## @end table
+##
+## For example, to produce PNG output for all demos of the functions
+## in the plot directory;
+##
+## @example
+## dump_demos plot dump.m png
+## @end example
+## @seealso{fntests, test, demo}
+## @end deftypefn
+
+## Author: Søren Hauberg  <soren@hauberg.org>
+
+function dump_demos (dirs={"plot/appearance", "plot/draw", "plot/util", "image"}, output="dump_plot_demos.m", fmt="png")
+
+  if (nargin > 3)
+    print_usage ();
+  endif
+
+  if (ischar (dirs))
+    dirs = {dirs};
+  elseif (! iscellstr (dirs))
+    error ("dump_demos: DIRS must be a cell array of strings with directory names");
+  endif
+
+  [~, funcname, ext] = fileparts (output);
+  if (isempty (ext))
+    output = [output ".m"];
+  endif
+
+  ## Create script beginning (close figures, etc.)
+  fid = fopen (output, "w");
+  fprintf (fid, "%% DO NOT EDIT!  Generated automatically by dump_demos.m\n");
+  fprintf (fid, "function %s ()\n", funcname);
+  fprintf (fid, "close all\n");
+  fprintf (fid, "more off\n");
+  fprintf (fid, "diary diary.log\n");
+
+  ## Run and print the demos in each directory
+  for i = 1:numel (dirs)
+    d = dirs{i};
+    if (! is_absolute_filename (d))
+      d = dir_in_loadpath (d);
+    endif
+    if (! exist (d, "dir"))
+      error ("dump_demos: directory %s does not exist", d);
+    endif
+    dump_all_demos (d, fid, fmt);
+  endfor
+
+  ## Stop and flush diary
+  fprintf (fid, "diary off\n");
+
+  ## Create script ending
+  fprintf (fid, "end\n\n")
+
+  ## Close script
+  fclose (fid);
+endfunction
+
+function dump_all_demos (directory, fid, fmt)
+  dirinfo = dir (fullfile (directory, "*.m"));
+  flist = {dirinfo.name};
+  ## Remove uigetdir, uigetfile, uiputfile, etc.
+  flist = flist(! strncmp (flist, "ui", 2));
+  ## Remove linkaxes, linkprops
+  flist = flist(! strncmp (flist, "link", 4));
+  ## Remove colormap
+  flist = flist(! strncmp (flist, "colormap", 8));
+  for i = 1:numel (flist)
+    fcn = flist{i};
+    fcn(end-1:end) = [];  # remove .m
+    demos = get_demos (fcn);
+    for d = 1:numel (demos)
+      idx = sprintf ("%02d", d);
+      base_fn = sprintf ("%s_%s", fcn, idx);
+      fn = sprintf ('%s.%s', base_fn, fmt);
+      fprintf (fid, "\ntry\n");
+      ## First check if the file already exists, skip demo if found
+      fprintf (fid, " if (! exist ('%s', 'file'))\n", fn);
+      ## Invoke the ancient, deprecated random seed generators, but there is an
+      ## initialization mismatch with the more modern generators reported
+      ## here (https://savannah.gnu.org/bugs/?42557).
+      fprintf (fid, "  rand ('seed', 1);\n");
+      fprintf (fid, "  tic ();\n");
+      fprintf (fid, "  %s\n\n", demos{d});
+      fprintf (fid, "  t_plot = toc ();\n");
+      fprintf (fid, "  fig = (get (0, 'currentfigure'));\n");
+      fprintf (fid, "  if (~ isempty (fig))\n");
+      fprintf (fid, "    figure (fig);\n");
+      fprintf (fid, "      fprintf ('Printing ""%s"" ... ');\n", fn);
+      fprintf (fid, "      tic ();\n");
+      fprintf (fid, "      print ('-d%s', '%s');\n", fmt, fn);
+      fprintf (fid, "      t_print = toc ();\n");
+      fprintf (fid, "      fprintf ('[%%f %%f] done\\n',t_plot, t_print);\n");
+      fprintf (fid, "  end\n");
+      ## Temporary fix for cruft accumulating in figure window.
+      fprintf (fid, "  close ('all');\n");
+      fprintf (fid, " else\n");
+      fprintf (fid, "   fprintf ('File ""%s"" already exists.\\n');\n", fn);
+      fprintf (fid, " end\n");
+      fprintf (fid, "catch\n");
+      fprintf (fid, "  fprintf ('ERROR in %s: %%s\\n', lasterr ());\n", base_fn);
+      fprintf (fid, "  err_fid = fopen ('%s.err', 'w');\n", base_fn);
+      fprintf (fid, "  fprintf (err_fid, '%%s', lasterr ());\n");
+      fprintf (fid, "  fclose (err_fid);\n");
+      fprintf (fid, "end\n\n");
+    endfor
+  endfor
+  fprintf (fid, "close all\n");
+endfunction
+
+function retval = get_demos (fcn)
+  [code, idx] = test (fcn, "grabdemo");
+  num_demos = length (idx) - 1;
+  retval = cell (1, num_demos);
+  ## Now split the demos into a cell array
+  for k = 1:num_demos
+    retval{k} = oct2mat (code(idx(k):idx(k+1)-1));
+  endfor
+endfunction
+
+function code = oct2mat (code)
+  ## Simple hacks to make things Matlab compatible
+  code = strrep (code, "%!", "%%");
+  code = strrep (code, "!", "~");
+  ## Simply replacing double quotes with single quotes
+  ## causes problems with strings like 'hello "world"'
+  ## More complicated regexprep targets only full double quoted strings
+  code = regexprep (code, "^([^']*)\"(.*)\"", "$1'$2'",
+                          "lineanchors", "dotexceptnewline");
+  code = strrep (code, "#", "%");
+  ## Fix the format specs for the errorbar demos changed by the line above
+  code = strrep (code, "%r", "#r");
+  code = strrep (code, "%~", "#~");
+  endkeywords = {"endfor", "endfunction", "endif", "endwhile", "end_try_catch"};
+  for k = 1:numel (endkeywords)
+    code = strrep (code, endkeywords{k}, "end");
+  endfor
+  commentkeywords = {"unwind_protect", "end_unwind_protect"};
+  for k = 1:numel (commentkeywords)
+    code = strrep (code, commentkeywords{k}, ["%" commentkeywords{k}]);
+  endfor
+
+  ## Fix up sombrero which now has default argument in Octave
+  code = strrep (code, "sombrero ()", "sombrero (41)");
+endfunction
+
new file mode 100644
--- /dev/null
+++ b/scripts/testfun/private/html_compare_plot_demos.m
@@ -0,0 +1,135 @@
+## Copyright (C) 2010 Ben Abbott
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} {} html_compare (@var{toolkits})
+## @deftypefnx {Function File} {} html_compare (@var{toolkits}, @var{name}, @var{value}, @dots{})
+##
+## Produces an html document to compare the plot demos produced by
+## @var{toolkits}.
+##
+## Valid property names, and their defaults, are:
+##
+## @table @samp
+##   @item fmt
+##   @code{"png"}
+##
+##   @item output
+##   @code{"compare_plot_demos.html"}
+##
+##   @item template
+##   @code{"html_plot_demos_template.html"}
+##
+##   @item column_width
+##   @code{600}
+## @end table
+##
+## The template parameter refers to a specially formatted html file
+## which accompanies this m-file script.
+##
+## Additional toolkit description can be added to the column header
+## with a parameter named equal to the toolkit.  For example:
+##
+## @smallexample
+## @code{html_compare_plot_demos ({"gnuplot", "fltk"}, "gnuplot", " 4.6 patchlevel 5")}
+## @end smallexample
+##
+## @seealso{compare_plot_demos, dump_demos, demo}
+## @end deftypefn
+
+## Author: Ben Abbott  <bpabbott@mac.com>
+
+function html_compare_plot_demos (toolkits, varargin)
+
+  ## Set defaults
+  in.fmt = "png";
+  in.figfiles = {};
+  in.output= "compare_plot_demos.html";
+  in.template = "html_plot_demos_template.html";
+  in.column_width = 600;
+
+  ## Parse inputs
+  for n = 1:2:numel(varargin)
+    in.(lower(varargin{n})) = varargin{n+1};
+  endfor
+
+  ## Compile a list of all files for all toolkits
+  for t = 1:numel(toolkits)
+    filter = sprintf ("%s/*.%s", toolkits{t}, in.fmt);
+    in.figfiles = union (in.figfiles, {dir(filter).name});
+  endfor
+
+  fid = fopen (which (in.template), "r");
+  template = char (fread (fid)) .';
+  fclose (fid);
+
+  anchor = "<!-- ##ADD TABLE HERE## -->";
+  n = findstr (template, anchor);
+  header = template(1:n-1);
+  trailer = template(n+numel(anchor):end);
+
+  fid = fopen (in.output, "w");
+  unwind_protect
+    fputs (fid, header);
+    fprintf (fid, "<p><b>\nGenerated on %s by %s with GNU Octave %s</p>",
+             datestr (now (), 0), mfilename, version);
+
+    ## Create table header
+    fprintf (fid, "<table border='1'><tr>\n");
+    for t = 1:numel(toolkits)
+      ## set default
+      column_header = upper (toolkits{t});
+      if (isfield (in, toolkits{t}))
+        column_header = strcat (column_header, in.(toolkits{t}));
+      endif
+      fprintf (fid, '<th>%s <a href="%s/diary.log">diary</a></th>\n', ...
+                    column_header, toolkits{t});
+    endfor
+    fprintf (fid, "</tr>\n");
+
+    for m = 1:numel(in.figfiles)
+      [~, file] = fileparts (in.figfiles{m});
+      fn = strcat (file, ".", in.fmt);
+      fprintf (fid, "<tr>\n");
+      for k = toolkits
+        ffn = fullfile (k{:}, fn);
+        fprintf (fid, "  <td>%s<br>", ffn);
+        if (exist (ffn, "file"))
+          fprintf (fid, "<img src='%s' style='width: %dpx;'>", ...
+                        ffn, in.column_width);
+        else
+          err_fn = regexprep(ffn, ".png", ".err");
+          if (! exist (err_fn, "file"))
+            warning("File %s doesn't exist...", err_fn);
+          else
+            err_fid = fopen (err_fn);
+            msg = char (fread (err_fid))';
+            fclose (err_fid);
+            fprintf (fid, "%s", strrep (msg, "\n", "<br>"));
+          endif
+        endif
+        fprintf (fid, "</td>\n");
+      endfor
+      fprintf (fid, "</tr>\n");
+    endfor
+    fputs (fid, trailer);
+  unwind_protect_cleanup
+    fclose (fid);
+  end_unwind_protect
+
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/testfun/private/html_plot_demos_template.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+  <meta name="date" content="##DATE##"/>
+  <meta name="author" content="The Octave-Forge Community" />
+  <meta name="description" content="Octave-Forge is a collection of packages providing extra functionality for GNU Octave." />
+  <meta name="keywords" lang="en" content="Octave-Forge, Octave, extra packages" />
+  <title>Comparision of plots</title>
+
+  <link rel="stylesheet" type="text/css" href="../octave-forge.css" />
+  <script src="../fixed.js" type="text/javascript"></script>
+   <script src="../javascript.js" type="text/javascript"></script>
+  <link rel="shortcut icon" href="../favicon.ico" />
+  </head>
+  <body onload="javascript:fix_top_menu(); javascript:show_left_menu ();">
+  <div id="top-menu" class="menu">
+   <table class="menu">
+
+      <tr>
+        <td style="width: 90px;" class="menu" rowspan="2">
+          <a name="top">
+          <img src="../oct.png" alt="Octave logo" />
+          </a>
+        </td>
+        <td class="menu" style="padding-top: 0.9em;">
+          <big class="menu">Octave-Forge</big><small class="menu"> - Extra packages for GNU Octave</small>
+
+        </td>
+      </tr>
+      <tr>
+        <td class="menu">
+
+ <a href="../index.html" class="menu">Home</a> &middot;
+ <a href="../packages.php" class="menu">Packages</a> &middot;
+ <a href="../developers.html" class="menu">Developers</a> &middot;
+ <a href="../docs.html" class="menu">Documentation</a> &middot;
+ <a href="../FAQ.html" class="menu">FAQ</a> &middot;
+ <a href="../bugs.html" class="menu">Bugs</a> &middot;
+ <a href="../archive.html" class="menu">Mailing Lists</a> &middot;
+ <a href="../links.html" class="menu">Links</a> &middot;
+ <a href="http://sourceforge.net/svn/?group_id=2888" class="menu">SVN</a>
+
+        </td>
+      </tr>
+    </table>
+  </div>
+
+<div id="content">
+<!-- ##ADD TABLE HERE## -->
+</tr>
+</table>
+
+<div id="sf_logo">
+  <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=2888&amp;type=1"
+     width="88" height="31" style="border: 0;" alt="SourceForge.net Logo"/></a>
+</div>
+</div>
+</body>
+</html>
+
--- a/scripts/testfun/rundemos.m
+++ b/scripts/testfun/rundemos.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 John W. Eaton
+## Copyright (C) 2008-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,13 +19,14 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} rundemos ()
 ## @deftypefnx {Function File} {} rundemos (@var{directory})
-## Execute built-in demos for all function files in the specified directory.
-## Also executes demos in any C++ source files found in the directory, for
-## use with dynamically linked functions.
+## Execute built-in demos for all m-files in the specified @var{directory}.
+##
+## Demo blocks in any C++ source files (@file{*.cc}) will also be executed
+## for use with dynamically linked oct-file functions.
 ##
 ## If no directory is specified, operate on all directories in Octave's
 ## search path for functions.
-## @seealso{runtests, path}
+## @seealso{demo, runtests, path}
 ## @end deftypefn
 
 ## Author: jwe
@@ -36,20 +37,17 @@
     dirs = ostrsplit (path (), pathsep ());
     do_class_dirs = true;
   elseif (nargin == 1)
-    if (is_absolute_filename (directory))
-      dirs = {directory};
-    elseif (is_rooted_relative_filename (directory))
-      dirs = {canonicalize_file_name(directory)};
-    else
-      if (directory(end) == filesep ())
-        directory = directory(1:end-1);
+    dirs = {canonicalize_file_name(directory)};
+    if (isempty (dirs{1}))
+      ## Search for directory name in path
+      if (directory(end) == '/' || directory(end) == '\')
+        directory(end) = [];
       endif
-      fullname = find_dir_in_path (directory);
-      if (! isempty (fullname))
-        dirs = {fullname};
-      else
+      fullname = dir_in_loadpath (directory);
+      if (isempty (fullname))
         error ("rundemos: DIRECTORY argument must be a valid pathname");
       endif
+      dirs = {fullname};
     endif
     do_class_dirs = false;
   else
@@ -68,14 +66,14 @@
   dirs = {};
   for i = 1:numel (flist)
     f = flist{i};
-    if ((length (f) > 2 && strcmpi (f((end-1):end), ".m")) ||
-        (length (f) > 3 && strcmpi (f((end-2):end), ".cc")))
+    if ((length (f) > 2 && strcmpi (f((end-1):end), ".m"))
+        || (length (f) > 3 && strcmpi (f((end-2):end), ".cc")))
       f = fullfile (directory, f);
       if (has_demos (f))
         try
           demo (f);
         catch
-          printf ("error: %s\n\n", lasterror().message);
+          printf ("error: %s\n\n", lasterror ().message);
         end_try_catch
         if (i != numel (flist))
           input ("Press <enter> to continue: ", "s");
--- a/scripts/testfun/runtests.m
+++ b/scripts/testfun/runtests.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 John W. Eaton
+## Copyright (C) 2010-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,13 +19,14 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} runtests ()
 ## @deftypefnx {Function File} {} runtests (@var{directory})
-## Execute built-in tests for all function files in the specified directory.
-## Also executes tests in any C++ source files found in the directory, for
-## use with dynamically linked functions.
+## Execute built-in tests for all m-files in the specified @var{directory}.
+##
+## Test blocks in any C++ source files (@file{*.cc}) will also be executed
+## for use with dynamically linked oct-file functions.
 ##
 ## If no directory is specified, operate on all directories in Octave's
 ## search path for functions.
-## @seealso{rundemos, path}
+## @seealso{rundemos, test, path}
 ## @end deftypefn
 
 ## Author: jwe
@@ -36,20 +37,17 @@
     dirs = ostrsplit (path (), pathsep ());
     do_class_dirs = true;
   elseif (nargin == 1)
-    if (is_absolute_filename (directory))
-      dirs = {directory};
-    elseif (is_rooted_relative_filename (directory))
-      dirs = {canonicalize_file_name(directory)};
-    else
-      if (directory(end) == filesep ())
-        directory = directory(1:end-1);
+    dirs = {canonicalize_file_name(directory)};
+    if (isempty (dirs{1}))
+      ## Search for directory name in path
+      if (directory(end) == '/' || directory(end) == '\')
+        directory(end) = [];
       endif
-      fullname = find_dir_in_path (directory);
-      if (! isempty (fullname))
-        dirs = {fullname};
-      else
+      fullname = dir_in_loadpath (directory);
+      if (isempty (fullname))
         error ("runtests: DIRECTORY argument must be a valid pathname");
       endif
+      dirs = {fullname};
     endif
     do_class_dirs = false;
   else
@@ -71,8 +69,8 @@
   fflush (stdout);
   for i = 1:numel (flist)
     f = flist{i};
-    if ((length (f) > 2 && strcmpi (f((end-1):end), ".m")) ||
-        (length (f) > 3 && strcmpi (f((end-2):end), ".cc")))
+    if ((length (f) > 2 && strcmpi (f((end-1):end), ".m"))
+        || (length (f) > 3 && strcmpi (f((end-2):end), ".cc")))
       ff = fullfile (directory, f);
       if (has_tests (ff))
         print_test_file_name (f);
--- a/scripts/testfun/speed.m
+++ b/scripts/testfun/speed.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -348,11 +348,11 @@
 endfunction
 
 
-%% FIXME: Demos with declared functions do not work.  See bug #31815.
-%%        A workaround has been hacked by not declaring the functions
-%%        but using eval to create them in the proper context.
-%%        Unfortunately, we can't remove them from the user's workspace
-%%        because of another bug (#34497).
+## FIXME: Demos with declared functions do not work.  See bug #31815.
+##        A workaround has been hacked by not declaring the functions
+##        but using eval to create them in the proper context.
+##        Unfortunately, we can't remove them from the user's workspace
+##        because of another bug (#34497).
 %!demo
 %! fstr_build_orig = cstrcat (
 %!   "function x = build_orig (n)\n",
@@ -440,7 +440,7 @@
 %! assert (isnumeric (T_f2));
 %! assert (length (T_f2) > 10);
 
-%% Test input validation
+## Test input validation
 %!error speed ()
 %!error speed (1, 2, 3, 4, 5, 6, 7)
 
--- a/scripts/testfun/test.m
+++ b/scripts/testfun/test.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 Paul Kienzle
+## Copyright (C) 2005-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -20,125 +20,174 @@
 ## @deftypefn  {Command} {} test @var{name}
 ## @deftypefnx {Command} {} test @var{name} quiet|normal|verbose
 ## @deftypefnx {Function File} {} test ("@var{name}", "quiet|normal|verbose", @var{fid})
-## @deftypefnx {Function File} {} test ([], "explain", @var{fid})
+## @deftypefnx {Function File} {} test ("@var{name}", "quiet|normal|verbose", @var{fname})
 ## @deftypefnx {Function File} {@var{success} =} test (@dots{})
-## @deftypefnx {Function File} {[@var{n}, @var{max}] =} test (@dots{})
+## @deftypefnx {Function File} {[@var{n}, @var{nmax}, @var{nxfail}, @var{nskip}] =} test (@dots{})
 ## @deftypefnx {Function File} {[@var{code}, @var{idx}] =} test ("@var{name}", "grabdemo")
+## @deftypefnx {Function File} {} test ([], "explain", @var{fid})
+## @deftypefnx {Function File} {} test ([], "explain", @var{fname})
+##
+## Perform built-in self-tests from the first file in the loadpath matching
+## @var{name}.
+##
+## @code{test} can be called in either command or functional form.  The exact
+## operation of test is determined by a combination of mode (interactive or
+## batch), reporting level (@qcode{"quiet"}, @qcode{"normal"},
+## @qcode{"verbose"}), and whether a logfile or summary output variable is
+## used.
 ##
-## Perform tests from the first file in the loadpath matching @var{name}.
-## @code{test} can be called as a command or as a function.  Called with
-## a single argument @var{name}, the tests are run interactively and stop
-## after the first error is encountered.
+## The default mode when @code{test} is called from the command line is
+## interactive.  In this mode, tests will be run until the first error is
+## encountered, or all tests complete successfully.  In batch mode, all tests
+## are run regardless of any failures, and the results are collected for
+## reporting.  Tests which require user interaction, i.e., demo blocks,
+## are never run in batch mode.
 ##
-## With a second argument the tests which are performed and the amount of
-## output is selected.
+## Batch mode is enabled by either 1) specifying a logfile using the third
+## argument @var{fname} or @var{fid}, or 2) requesting an output argument
+## such as @var{success}, @var{n}, etc.
+##
+## The optional second argument determines the amount of output to generate and
+## which types of tests to run.  The default value is @qcode{"normal"}.
+## Requesting an output argument will suppress printing the final summary
+## message and any intermediate warnings, unless verbose reporting is
+## enabled.
 ##
 ## @table @asis
 ## @item @qcode{"quiet"}
-##  Don't report all the tests as they happen, just the errors.
+## Print a summary message when all tests pass, or print an error with the
+## results of the first bad test when a failure occurs.  Don't run tests which
+## require user interaction.
 ##
 ## @item @qcode{"normal"}
-## Report all tests as they happen, but don't do tests which require
-## user interaction.
+## Display warning messages about skipped tests or failing xtests during test
+## execution.
+## Print a summary message when all tests pass, or print an error with the
+## results of the first bad test when a failure occurs.  Don't run tests which
+## require user interaction.
 ##
 ## @item @qcode{"verbose"}
-## Do tests which require user interaction.
+## Display tests before execution.  Print all warning messages.  In interactive
+## mode, run all tests including those which require user interaction.
 ## @end table
 ##
-## The argument @var{fid} can be used to allow batch processing.  Errors
-## can be written to the already open file defined by @var{fid}, and
-## hopefully when Octave crashes this file will tell you what was happening
-## when it did.  You can use @code{stdout} if you want to see the results as
-## they happen.  You can also give a file name rather than an @var{fid}, in
-## which case the contents of the file will be replaced with the log from
-## the current test.
+## The optional third input argument specifies a logfile where results of the
+## tests should be written.  The logfile may be a character string
+## (@var{fname}) or an open file descriptor ID (@var{fid}).  To enable batch
+## processing, but still print the results to the screen, use @code{stdout} for
+## @var{fid}.
+##
+## When called with just a single output argument @var{success}, @code{test}
+## returns true if all of the tests were successful.  If called with more
+## than one output argument then the number of successful tests (@var{n}),
+## the total number of tests in the file (@var{nmax}), the number of xtest
+## failures (@var{nxfail}), and the number of skipped tests (@var{nskip} are
+## returned.
+##
+## Example
 ##
-## Called with a single output argument @var{success}, @code{test} returns
-## true if all of the tests were successful.  Called with two output arguments
-## @var{n} and @var{max}, the number of successful tests and the total number
-## of tests in the file @var{name} are returned.
+## @example
+## @group
+## test sind
+## @result{}
+## PASSES 5 out of 5 tests
+##
+## [n, nmax] = test ("sind")
+## @result{}
+## n =  5
+## nmax =  5
+## @end group
+## @end example
+##
+## Additional Calling Syntaxes
 ##
 ## If the second argument is the string @qcode{"grabdemo"}, the contents of
-## the demo blocks are extracted but not executed.  Code for all code blocks
-## is concatenated and returned as @var{code} with @var{idx} being a vector
-## of positions of the ends of the demo blocks.
+## any built-in demo blocks are extracted but not executed.  The text for all
+## code blocks is concatenated and returned as @var{code} with @var{idx} being
+## a vector of positions of the ends of each demo block.  For an easier way to
+## extract demo blocks from files, @xref{XREFexample,,example}.
 ##
-## If the second argument is @qcode{"explain"}, then @var{name} is ignored
-## and an explanation of the line markers used is written to the file
-## @var{fid}.
-## @seealso{assert, fail, error, demo, example}
+## If the second argument is @qcode{"explain"} then @var{name} is ignored and
+## an explanation of the line markers used in @code{test} output reports is
+## written to the file specified by @var{fname} or @var{fid}.
+##
+## @seealso{assert, fail, demo, example, error}
 ## @end deftypefn
 
-## FIXME: * Consider using keyword fail rather then error?  This allows us
-## to make a functional form of error blocks, which means we
-## can include them in test sections which means that we can use
-## octave flow control for both kinds of tests.
+## Programming Note: All variables for test() must use the internal prefix "__".
+## Shared variables are eval'ed into the current workspace and therefore might
+## collide with the names used in the test.m function itself.
 
-function [__ret1, __ret2, __ret3, __ret4] = test (__name, __flag, __fid)
-  ## Information from test will be introduced by "key".
-  persistent __signal_fail =  "!!!!! ";
+function [__n, __nmax, __nxfail, __nskip] = test (__name, __flag = "normal", __fid = [])
+
+  ## Output from test is prefixed by a "key" to quickly understand the issue.
+  persistent __signal_fail  = "!!!!! ";
   persistent __signal_empty = "????? ";
-  persistent __signal_block = "  ***** ";
-  persistent __signal_file =  ">>>>> ";
-  persistent __signal_skip = "----- ";
-
-  __xfail = 0;
-  __xskip = 0;
+  persistent __signal_block = "***** ";
+  persistent __signal_file  = ">>>>> ";
+  persistent __signal_skip  = "----- ";
 
-  if (nargin < 2 || isempty (__flag))
-    __flag = "quiet";
-  endif
-  if (nargin < 3)
-    __fid = [];
-  endif
-  if (nargin < 1 || nargin > 3
-      || (! ischar (__name) && ! isempty (__name)) || ! ischar (__flag))
+  if (nargin < 1 || nargin > 3)
+    print_usage ();
+  elseif (! isempty (__name) && ! ischar (__name))
+    error ("test: NAME must be a string");
+  elseif (! ischar (__flag))
+    error ("test: second argument must be a string");
+  elseif (isempty (__name) && (nargin != 3 || ! strcmp (__flag, "explain")))
     print_usage ();
   endif
-  if (isempty (__name) && (nargin != 3 || ! strcmp (__flag, "explain")))
-    print_usage ();
-  endif
-  __batch = (! isempty (__fid));
 
   ## Decide if error messages should be collected.
-  __close_fid = 0;
-  if (__batch)
+  __logfile = ! isempty (__fid);
+  __batch = __logfile || nargout > 0;
+  __close_fid = false;
+  if (__logfile)
     if (ischar (__fid))
-      __fid = fopen (__fid, "wt");
+      __fname = __fid;
+      __fid = fopen (__fname, "wt");
       if (__fid < 0)
-        error ("test: could not open log file");
+        error ("test: could not open log file %s", __fname);
       endif
-      __close_fid = 1;
+      __close_fid = true;
     endif
-    fprintf (__fid, "%sprocessing %s\n", __signal_file, __name);
-    fflush (__fid);
+    if (! strcmp (__flag, "explain"))
+      fprintf (__fid, "%sprocessing %s\n", __signal_file, __name);
+      fflush (__fid);
+    endif
   else
     __fid = stdout;
   endif
 
   if (strcmp (__flag, "normal"))
-    __grabdemo = 0;
-    __rundemo = 0;
-    __verbose = __batch;
+    __grabdemo = false;
+    __rundemo  = false;
+    if (__logfile)
+      __verbose = 1;
+    elseif (__batch)
+      __verbose = -1;
+    else
+      __verbose = 0;
+    endif
   elseif (strcmp (__flag, "quiet"))
-    __grabdemo = 0;
-    __rundemo = 0;
-    __verbose = 0;
+    __grabdemo = false;
+    __rundemo  = false;
+    __verbose  = -1;
   elseif (strcmp (__flag, "verbose"))
-    __grabdemo = 0;
-    __rundemo = 1;
-    __verbose = 1;
+    __grabdemo = false;
+    __rundemo  = ! __batch;
+    __verbose  = 1;
   elseif (strcmp (__flag, "grabdemo"))
-    __grabdemo = 1;
-    __rundemo = 0;
-    __verbose = 0;
+    __grabdemo = true;
+    __rundemo  = false;
+    __verbose  = -1;
     __demo_code = "";
     __demo_idx = [];
   elseif (strcmp (__flag, "explain"))
     fprintf (__fid, "# %s new test file\n", __signal_file);
     fprintf (__fid, "# %s no tests in file\n", __signal_empty);
     fprintf (__fid, "# %s test had an unexpected result\n", __signal_fail);
-    fprintf (__fid, "# %s code for the test\n", __signal_block);
+    fprintf (__fid, "# %s test was skipped\n", __signal_skip);
+    fprintf (__fid, "# %s code for the test\n\n", __signal_block);
     fprintf (__fid, "# Search for the unexpected results in the file\n");
     fprintf (__fid, "# then page back to find the file name which caused it.\n");
     fprintf (__fid, "# The result may be an unexpected failure (in which\n");
@@ -162,17 +211,16 @@
     __file = file_in_loadpath ([__name ".cc"], "all");
   endif
   if (iscell (__file))
-      ## If repeats, return first in path.
     if (isempty (__file))
       __file = "";
     else
-      __file = __file{1};
+      __file = __file{1};  # If repeats, return first in path.
     endif
   endif
   if (isempty (__file))
     if (__grabdemo)
-      __ret1 = "";
-      __ret2 = -1;
+      __n = "";
+      __nmax = -1;
     else
       ftype = exist (__name);
       if (ftype == 3)
@@ -188,7 +236,11 @@
       endif
       fflush (__fid);
       if (nargout > 0)
-        __ret1 = __ret2 = 0;
+        if (nargout == 1)
+          __n = false;
+        else
+          __n = __nmax = 0;
+        endif
       endif
     endif
     if (__close_fid)
@@ -202,13 +254,17 @@
 
   if (isempty (__body))
     if (__grabdemo)
-      __ret1 = "";
-      __ret2 = [];
+      __n = "";
+      __nmax = [];
     else
       fprintf (__fid, "%s%s has no tests available\n", __signal_empty, __file);
       fflush (__fid);
       if (nargout > 0)
-        __ret1 = __ret2 = 0;
+        if (nargout == 1)
+          __n = false;
+        else
+          __n = __nmax = 0;
+        endif
       endif
     endif
     if (__close_fid)
@@ -217,10 +273,10 @@
     return;
   else
     ## Add a dummy comment block to the end for ease of indexing.
-    if (__body (length (__body)) == "\n")
-      __body = sprintf ("\n%s#", __body);
+    if (__body(end) == "\n")
+      __body = ["\n" __body "#"];
     else
-      __body = sprintf ("\n%s\n#", __body);
+      __body = ["\n" __body "\n#"];
     endif
   endif
 
@@ -228,354 +284,368 @@
   __lineidx = find (__body == "\n");
   __blockidx = __lineidx(find (! isspace (__body(__lineidx+1))))+1;
 
-  ## Ready to start tests ... if in batch mode, tell us what is happening.
-  if (__verbose)
+  ## Ready to start tests.
+  ## If in batch mode, with a logfile, report what is happening.
+  if (__verbose > 0)
     disp ([__signal_file, __file]);
   endif
 
   ## Assume all tests will pass.
-  __all_success = 1;
+  __all_success = true;
 
   ## Process each block separately, initially with no shared variables.
   __tests = __successes = 0;
+  __xfail = __xskip = 0;
   __shared = " ";
   __shared_r = " ";
-  __clear = "";
-  for __i = 1:length (__blockidx)-1
-
-    ## Extract the block.
-    __block = __body(__blockidx(__i):__blockidx(__i+1)-2);
+  __clearfcn = "";
+  for __i = 1:numel (__blockidx)-1
 
-    ## Let the user/logfile know what is happening.
-    if (__verbose)
-      fprintf (__fid, "%s%s\n", __signal_block, __block);
-      fflush (__fid);
-    endif
+    ## FIXME: Should other global settings be similarly saved and restored?
+    orig_wstate = warning ();
+    unwind_protect
+
+      ## Extract the block.
+      __block = __body(__blockidx(__i):__blockidx(__i+1)-2);
 
-    ## Split __block into __type and __code.
-    __idx = find (! isletter (__block));
-    if (isempty (__idx))
-      __type = __block;
-      __code = "";
-    else
-      __type = __block(1:__idx(1)-1);
-      __code = __block(__idx(1):length (__block));
-    endif
+      ## Print the code block before execution if in verbose mode.
+      if (__verbose > 0)
+        fprintf (__fid, "%s%s\n", __signal_block, __block);
+        fflush (__fid);
+      endif
 
-    ## Assume the block will succeed.
-    __success = 1;
-    __msg = [];
+      ## Split __block into __type and __code.
+      __idx = find (! isletter (__block));
+      if (isempty (__idx))
+        __type = __block;
+        __code = "";
+      else
+        __type = __block(1:__idx(1)-1);
+        __code = __block(__idx(1):length (__block));
+      endif
+
+      ## Assume the block will succeed.
+      __success = true;
+      __msg = [];
+      __isxtest = false;
 
 ### DEMO
 
-    ## If in __grabdemo mode, then don't process any other block type.
-    ## So that the other block types don't have to worry about
-    ## this __grabdemo mode, the demo block processor grabs all block
-    ## types and skips those which aren't demo blocks.
+      ## If in __grabdemo mode, then don't process any other block type.
+      ## So that the other block types don't have to worry about
+      ## this __grabdemo mode, the demo block processor grabs all block
+      ## types and skips those which aren't demo blocks.
+
+      __isdemo = strcmp (__type, "demo");
+      if (__grabdemo || __isdemo)
+        __istest = false;
 
-    __isdemo = strcmp (__type, "demo");
-    if (__grabdemo || __isdemo)
-      __istest = 0;
+        if (__grabdemo && __isdemo)
+          if (isempty (__demo_code))
+            __demo_code = __code;
+            __demo_idx = [1, length(__demo_code)+1];
+          else
+            __demo_code = [__demo_code, __code];
+            __demo_idx = [__demo_idx, length(__demo_code)+1];
+          endif
 
-      if (__grabdemo && __isdemo)
-        if (isempty (__demo_code))
-          __demo_code = __code;
-          __demo_idx = [1, length(__demo_code)+1];
-        else
-          __demo_code = [__demo_code, __code];
-          __demo_idx = [__demo_idx, length(__demo_code)+1];
+        elseif (__rundemo && __isdemo)
+          try
+            ## process the code in an environment without variables
+            eval (sprintf ("function __test__ ()\n%s\nendfunction", __code));
+            __test__;
+            input ("Press <enter> to continue: ", "s");
+          catch
+            __success = false;
+            __msg = [__signal_fail "demo failed\n" lasterr()];
+          end_try_catch
+          clear __test__;
+
         endif
-
-      elseif (__rundemo && __isdemo)
-        try
-          ## process the code in an environment without variables
-          eval (sprintf ("function __test__ ()\n%s\nendfunction", __code));
-          __test__;
-          input ("Press <enter> to continue: ", "s");
-        catch
-          __success = 0;
-          __msg = sprintf ("%sdemo failed\n%s",  __signal_fail, lasterr ());
-        end_try_catch
-        clear __test__;
-
-      endif
-      ## Code already processed.
-      __code = "";
+        ## Code already processed.
+        __code = "";
 
 ### SHARED
 
-    elseif (strcmp (__type, "shared"))
-      __istest = 0;
+      elseif (strcmp (__type, "shared"))
+        __istest = false;
 
-      ## Separate initialization code from variables.
-      __idx = find (__code == "\n");
-      if (isempty (__idx))
-        __vars = __code;
-        __code = "";
-      else
-        __vars = __code (1:__idx(1)-1);
-        __code = __code (__idx(1):length (__code));
-      endif
+        ## Separate initialization code from variables.
+        __idx = find (__code == "\n");
+        if (isempty (__idx))
+          __vars = __code;
+          __code = "";
+        else
+          __vars = __code (1:__idx(1)-1);
+          __code = __code (__idx(1):length (__code));
+        endif
 
-      ## Strip comments off the variables.
-      __idx = find (__vars == "%" | __vars == "#");
-      if (! isempty (__idx))
-        __vars = __vars(1:__idx(1)-1);
-      endif
+        ## Strip comments off the variables.
+        __idx = find (__vars == "%" | __vars == "#");
+        if (! isempty (__idx))
+          __vars = __vars(1:__idx(1)-1);
+        endif
 
-      ## Assign default values to variables.
-      try
-        __vars = deblank (__vars);
-        if (! isempty (__vars))
-          eval ([strrep(__vars, ",", "=[];"), "=[];"]);
-          __shared = __vars;
-          __shared_r = ["[ ", __vars, "] = "];
-        else
-          __shared = " ";
-          __shared_r = " ";
-        endif
-      catch
-        ## Couldn't declare, so don't initialize.
-        __code = "";
-        __success = 0;
-        __msg = sprintf ("%sshared variable initialization failed\n",
-                         __signal_fail);
-      end_try_catch
+        ## Assign default values to variables.
+        try
+          __vars = deblank (__vars);
+          if (! isempty (__vars))
+            eval ([strrep(__vars, ",", "=[];"), "=[];"]);
+            __shared = __vars;
+            __shared_r = ["[ " __vars "] = "];
+          else
+            __shared = " ";
+            __shared_r = " ";
+          endif
+        catch
+          ## Couldn't declare, so don't initialize.
+          __code = "";
+          __success = false;
+          __msg = [__signal_fail "shared variable initialization failed\n"];
+        end_try_catch
 
-      ## Initialization code will be evaluated below.
+        ## Initialization code will be evaluated below.
 
 ### FUNCTION
 
-    elseif (strcmp (__type, "function"))
-      __istest = 0;
-      persistent __fn = 0;
-      __name_position = function_name (__block);
-      if (isempty (__name_position))
-        __success = 0;
-        __msg = sprintf ("%stest failed: missing function name\n",
-                         __signal_fail);
-      else
-        __name = __block(__name_position(1):__name_position(2));
-        __code = __block;
-        try
-          eval (__code);  # Define the function
-          __clear = sprintf ("%sclear %s;\n", __clear, __name);
-        catch
-          __success = 0;
-          __msg = sprintf ("%stest failed: syntax error\n%s",
-                           __signal_fail, lasterr ());
-        end_try_catch
-      endif
-      __code = "";
+      elseif (strcmp (__type, "function"))
+        __istest = false;
+        persistent __fn = 0;
+        __name_position = function_name (__block);
+        if (isempty (__name_position))
+          __success = false;
+          __msg = [__signal_fail "test failed: missing function name\n"];
+        else
+          __name = __block(__name_position(1):__name_position(2));
+          __code = __block;
+          try
+            eval (__code);  # Define the function
+            __clearfcn = sprintf ("%sclear %s;\n", __clearfcn, __name);
+          catch
+            __success = false;
+            __msg = [__signal_fail "test failed: syntax error\n" lasterr()];
+          end_try_catch
+        endif
+        __code = "";
 
 ### ENDFUNCTION
 
-    elseif (strcmp (__type, "endfunction"))
-      ## endfunction simply declares the end of a previous function block.
-      ## There is no processing to be done here, just skip to next block.
-      __istest = 0;
-      __code = "";
+      elseif (strcmp (__type, "endfunction"))
+        ## endfunction simply declares the end of a previous function block.
+        ## There is no processing to be done here, just skip to next block.
+        __istest = false;
+        __code = "";
 
 ### ASSERT/FAIL
 
-    elseif (strcmp (__type, "assert") || strcmp (__type, "fail"))
-      __istest = 1;
-      ## Put the keyword back on the code.
-      __code = __block;
-      ## The code will be evaluated below as a test block.
+      elseif (strcmp (__type, "assert") || strcmp (__type, "fail"))
+        __istest = true;
+        ## Put the keyword back on the code.
+        __code = __block;
+        ## The code will be evaluated below as a test block.
 
 ### ERROR/WARNING
 
-    elseif (strcmp (__type, "error") || strcmp (__type, "warning"))
-      __istest = 1;
-      __warning = strcmp (__type, "warning");
-      [__pattern, __id, __code] = getpattern (__code);
-      if (__id)
-        __patstr = ["id=",__id];
-      else
-        if (! strcmp (__pattern, '.'))
-          __patstr = ["<",__pattern,">"];
+      elseif (strcmp (__type, "error") || strcmp (__type, "warning"))
+        __istest = true;
+        __iswarning = strcmp (__type, "warning");
+        [__pattern, __id, __code] = getpattern (__code);
+        if (__id)
+          __patstr = ["id=" __id];
         else
-          __patstr = ifelse (__warning, "a warning", "an error");
+          if (! strcmp (__pattern, '.'))
+            __patstr = ["<" __pattern ">"];
+          else
+            __patstr = ifelse (__iswarning, "a warning", "an error");
+          endif
         endif
-      endif
-      try
-        eval (sprintf ("function __test__(%s)\n%s\nendfunction",
-                       __shared, __code));
-      catch
-        __success = 0;
-        __msg = sprintf ("%stest failed: syntax error\n%s",
-                         __signal_fail, lasterr ());
-      end_try_catch
+        try
+          eval (sprintf ("function __test__(%s)\n%s\nendfunction",
+                         __shared, __code));
+        catch
+          __success = false;
+          __msg = [__signal_fail "test failed: syntax error\n" lasterr()];
+        end_try_catch
 
-      if (__success)
-        __success = 0;
-        __warnstate = warning ("query", "quiet");
-        warning ("on", "quiet");
-        ## Clear error and warning strings before starting
-        lasterr ("");
-        lastwarn ("");
-        try
-          ## FIXME: lastwarn () must be called once from *WITHIN* the try block
-          ##        or subsequent warning/lastwarn statements may fail.
-          ##        Likely this is something to do with the specialness of
-          ##        the try block which is disabling normal errors.
-          lastwarn ();
-          eval (sprintf ("__test__(%s);", __shared));
-          if (! __warning)
-            __msg = sprintf ("%serror failed.\nExpected %s but got no error\n",
-                             __signal_fail, __patstr);
-          else
+        if (__success)
+          __success = false;
+          __warnstate = warning ("query", "quiet");
+          warning ("on", "quiet");
+          ## Clear error and warning strings before starting
+          lasterr ("");
+          lastwarn ("");
+          try
+            eval (sprintf ("__test__(%s);", __shared));
+            if (! __iswarning)
+              __msg = [__signal_fail "error failed.\n" ...
+                                     "Expected " __patstr ", but got no error\n"];
+            else
+              if (! isempty (__id))
+                [~, __err] = lastwarn ();
+                __mismatch = ! strcmp (__err, __id);
+              else
+                __err = trimerr (lastwarn (), "warning");
+                __mismatch = isempty (regexp (__err, __pattern, "once"));
+              endif
+              warning (__warnstate.state, "quiet");
+              if (isempty (__err))
+                __msg = [__signal_fail "warning failed.\n" ...
+                                       "Expected " __patstr ", but got no warning\n"];
+              elseif (__mismatch)
+                __msg = [__signal_fail "warning failed.\n" ...
+                                       "Expected " __patstr ", but got <" __err ">\n"];
+              else
+                __success = true;
+              endif
+            endif
+
+          catch
             if (! isempty (__id))
-              [~, __err] = lastwarn ();
+              [~, __err] = lasterr ();
               __mismatch = ! strcmp (__err, __id);
             else
-              __err = trimerr (lastwarn (), "warning");
+              __err = trimerr (lasterr (), "error");
               __mismatch = isempty (regexp (__err, __pattern, "once"));
             endif
             warning (__warnstate.state, "quiet");
-            if (isempty (__err))
-              __msg = sprintf (["%swarning failed.\n" ...
-                                "Expected %s but got no warning\n"],
-                               __signal_fail, __patstr);
+            if (__iswarning)
+              __msg = [__signal_fail "warning failed.\n" ...
+                                     "Expected warning " __patstr ...
+                                     ", but got error <" __err ">\n"];
             elseif (__mismatch)
-              __msg = sprintf ("%swarning failed.\nExpected %s but got <%s>\n",
-                               __signal_fail, __patstr, __err);
+              __msg = [__signal_fail "error failed.\n" ...
+                                     "Expected " __patstr ", but got <" __err ">\n"];
             else
-              __success = 1;
+              __success = true;
             endif
+          end_try_catch
+          clear __test__;
+        endif
+        ## Code already processed.
+        __code = "";
+
+### TESTIF
+
+      elseif (strcmp (__type, "testif"))
+        __e = regexp (__code, '.$', 'lineanchors', 'once');
+        ## Strip any comment from testif line before looking for features
+        __feat_line = strtok (__code(1:__e), '#%');
+        __feat = regexp (__feat_line, '\w+', 'match');
+        __feat = strrep (__feat, "HAVE_", "");
+        __have_feat = __have_feature__ (__feat);
+        if (__have_feat)
+          __istest = true;
+          __code = __code(__e + 1 : end);
+        else
+          __xskip++;
+          __istest = false;
+          __code = ""; # Skip the code.
+          __msg = [__signal_skip "skipped test\n"];
+        endif
+
+### TEST
+
+      elseif (strcmp (__type, "test"))
+        __istest = true;
+        ## Code will be evaluated below.
+
+### XTEST
+
+      elseif (strcmp (__type, "xtest"))
+        __istest = false;
+        __isxtest = true;
+        ## Code will be evaluated below.
+
+### Comment block.
+
+      elseif (strcmp (__block(1:1), "#"))
+        __istest = false;
+        __code = ""; # skip the code
+
+### Unknown block.
+
+      else
+        __istest = true;
+        __success = false;
+        __msg = [__signal_fail "unknown test type!\n"];
+        __code = ""; # skip the code
+      endif
+
+      ## evaluate code for test, shared, and assert.
+      if (! isempty(__code))
+        try
+          ## FIXME: Must check for embedded test functions, which cause
+          ## segfaults, until issues with subfunctions in functions are fixed.
+          embed_func = regexp (__code, '^\s*function ', 'once', 'lineanchors');
+          if (isempty (embed_func))
+            eval (sprintf ("function %s__test__(%s)\n%s\nendfunction",
+                           __shared_r, __shared, __code));
+            eval (sprintf ("%s__test__(%s);", __shared_r, __shared));
+          else
+            error (["Functions embedded in %!test blocks are not allowed.\n", ...
+                    "Use the %!function/%!endfunction syntax instead to define shared functions for testing.\n"]);
           endif
-
         catch
-          if (! isempty (__id))
-            [~, __err] = lasterr ();
-            __mismatch = ! strcmp (__err, __id);
+          if (strcmp (__type, "xtest"))
+            __msg = [__signal_fail "known failure\n" lasterr()];
+            __xfail++;
+            __success = false;
           else
-            __err = trimerr (lasterr (), "error");
-            __mismatch = isempty (regexp (__err, __pattern, "once"));
+            __msg = [__signal_fail "test failed\n" lasterr()];
+            __success = false;
           endif
-          warning (__warnstate.state, "quiet");
-          if (__warning)
-            __msg = sprintf (["%swarning failed.\n" ...
-                              "Expected warning %s but got error <%s>\n"],
-                             __signal_fail, __patstr, __err);
-          elseif (__mismatch)
-            __msg = sprintf ("%serror failed.\nExpected %s but got <%s>\n",
-                             __signal_fail, __patstr, __err);
-          else
-            __success = 1;
+          if (isempty (lasterr ()))
+            error ("empty error text, probably Ctrl-C --- aborting");
           endif
         end_try_catch
         clear __test__;
       endif
-      ## Code already processed.
-      __code = "";
-
-### TESTIF
-
-    elseif (strcmp (__type, "testif"))
-      __e = regexp (__code, '.$', 'lineanchors', 'once');
-      ## Strip comment any comment from testif line before looking for features
-      __feat_line = strtok (__code(1:__e), '#%');
-      __feat = regexp (__feat_line, '\w+', 'match');
-      __feat = strrep (__feat, "HAVE_", "");
-      __have_feat = __have_feature__ (__feat);
-      if (__have_feat)
-        __istest = 1;
-        __code = __code(__e + 1 : end);
-      else
-        __xskip++;
-        __istest = 0;
-        __code = ""; # Skip the code.
-        __msg = sprintf ("%sskipped test\n", __signal_skip);
-      endif
-
-### TEST
-
-    elseif (strcmp (__type, "test") || strcmp (__type, "xtest"))
-      __istest = 1;
-      ## Code will be evaluated below.
-
-### Comment block.
-
-    elseif (strcmp (__block(1:1), "#"))
-      __istest = 0;
-      __code = ""; # skip the code
-
-### Unknown block.
-
-    else
-      __istest = 1;
-      __success = 0;
-      __msg = sprintf ("%sunknown test type!\n", __signal_fail);
-      __code = ""; # skip the code
-    endif
 
-    ## evaluate code for test, shared, and assert.
-    if (! isempty(__code))
-      try
-        ## FIXME: need to check for embedded test functions, which cause
-        ## segfaults, until issues with subfunctions in functions are resolved.
-        embed_func = regexp (__code, '^\s*function ', 'once', 'lineanchors');
-        if (isempty (embed_func))
-          eval (sprintf ("function %s__test__(%s)\n%s\nendfunction",
-                         __shared_r,__shared, __code));
-          eval (sprintf ("%s__test__(%s);", __shared_r, __shared));
-        else
-          error (["Functions embedded in %!test blocks are not allowed.\n", ...
-                  "Use the %!function/%!endfunction syntax instead to define shared functions for testing.\n"]);
+      ## All done.  Remember if we were successful and print any messages.
+      if (! isempty (__msg) && (__verbose >= 0 || __logfile))
+        ## Make sure the user knows what caused the error.
+        if (__verbose < 1)
+          fprintf (__fid, "%s%s\n", __signal_block, __block);
+          fflush (__fid);
+        endif
+        fprintf (__fid, "%s\n", __msg);
+        fflush (__fid);
+        ## Show the variable context.
+        if (! strcmp (__type, "error") && ! strcmp (__type, "testif")
+            && ! all (__shared == " "))
+          fputs (__fid, "shared variables ");
+          eval (sprintf ("fdisp(__fid,var2struct(%s));", __shared));
+          fflush (__fid);
         endif
-      catch
-        if (strcmp (__type, "xtest"))
-           __msg = sprintf ("%sknown failure\n%s", __signal_fail, lasterr ());
-           __xfail++;
-        else
-           __msg = sprintf ("%stest failed\n%s", __signal_fail, lasterr ());
-           __success = 0;
+      endif
+      if (! __success && ! __isxtest)
+        __all_success = false;
+        ## Stop after 1 error if not in batch mode or only pass/fail requested.
+        if (! __batch || nargout == 1)
+          if (nargout > 0)
+            if (nargout == 1)
+              __n = false;
+            else
+              __n = __nmax = 0;
+            endif
+          endif
+          if (__close_fid)
+            fclose (__fid);
+          endif
+          return;
         endif
-        if (isempty (lasterr ()))
-          error ("empty error text, probably Ctrl-C --- aborting");
-        endif
-      end_try_catch
-      clear __test__;
-    endif
+      endif
+      __tests += (__istest || __isxtest);
+      __successes += __success && (__istest || __isxtest);
 
-    ## All done.  Remember if we were successful and print any messages.
-    if (! isempty (__msg))
-      ## Make sure the user knows what caused the error.
-      if (! __verbose)
-        fprintf (__fid, "%s%s\n", __signal_block, __block);
-        fflush (__fid);
-      endif
-      fputs (__fid, __msg);
-      fputs (__fid, "\n");
-      fflush (__fid);
-      ## Show the variable context.
-      if (! strcmp (__type, "error") && ! strcmp (__type, "testif")
-          && ! all (__shared == " "))
-        fputs (__fid, "shared variables ");
-        eval (sprintf ("fdisp(__fid,bundle(%s));", __shared));
-        fflush (__fid);
-      endif
-    endif
-    if (__success == 0)
-      __all_success = 0;
-      ## Stop after one error if not in batch mode.
-      if (! __batch)
-        if (nargout > 0)
-          __ret1 = __ret2 = 0;
-        endif
-        if (__close_fid)
-          fclose (__fid);
-        endif
-        return;
-      endif
-    endif
-    __tests += __istest;
-    __successes += __success * __istest;
+    unwind_protect_cleanup
+      warning ("off", "all");
+      warning (orig_wstate);
+    end_unwind_protect
   endfor
-  ## Clear any test functions created
-  eval (__clear, "");
+
+  ## Clear any functions created during test run
+  eval (__clearfcn, "");
 
   if (nargout == 0)
     if (__tests || __xfail || __xskip)
@@ -595,20 +665,22 @@
       printf ("%s%s has no tests available\n", __signal_empty, __file);
     endif
   elseif (__grabdemo)
-    __ret1 = __demo_code;
-    __ret2 = __demo_idx;
+    __n    = __demo_code;
+    __nmax = __demo_idx;
   elseif (nargout == 1)
-    __ret1 = __all_success;
+    __n = __all_success;
   else
-    __ret1 = __successes;
-    __ret2 = __tests;
-    __ret3 = __xfail;
-    __ret4 = __xskip;
+    __n      = __successes;
+    __nmax   = __tests;
+    __nxfail = __xfail;
+    __nskip  = __xskip;
   endif
+
 endfunction
 
+
 ## Create structure with fieldnames the name of the input variables.
-function s = varstruct (varargin)
+function s = var2struct (varargin)
   for i = 1:nargin
     s.(deblank (argn(i,:))) = varargin{i};
   endfor
@@ -670,25 +742,13 @@
   str = str(idx:end);
 endfunction
 
-## Make a structure out of the named variables
-## (based on Etienne Grossmann's tar function).
-function s = bundle (varargin)
-  for i = 1:nargin
-    s.(deblank (argn(i,:))) = varargin{i};
-  endfor
-endfunction
-
 function body = __extract_test_code (nm)
   fid = fopen (nm, "rt");
-  body = [];
+  body = "";
   if (fid >= 0)
-    while (! feof (fid))
-      ln = fgetl (fid);
-      if (length (ln) >= 2 && strcmp (ln(1:2), "%!"))
-        body = [body, "\n"];
-        if (length (ln) > 2)
-          body = [body, ln(3:end)];
-        endif
+    while (ischar (ln = fgets (fid)))
+      if (strncmp (ln, "%!", 2))
+        body = [body, ln(3:end)];
       endif
     endwhile
     fclose (fid);
@@ -696,23 +756,24 @@
 endfunction
 
 
-### example from toeplitz
+## example from toeplitz
 %!shared msg1,msg2
-%! msg1="C must be a vector";
-%! msg2="C and R must be vectors";
-%!fail ('toeplitz ([])', msg1);
-%!fail ('toeplitz ([1,2;3,4])', msg1);
-%!fail ('toeplitz ([1,2],[])', msg2);
-%!fail ('toeplitz ([1,2],[1,2;3,4])', msg2);
-%!fail ('toeplitz ([1,2;3,4],[1,2])', msg2);
-% !fail ('toeplitz','usage: toeplitz'); # usage doesn't generate an error
-% !fail ('toeplitz (1, 2, 3)', 'usage: toeplitz');
-%!test  assert (toeplitz ([1,2,3], [1,4]), [1,4; 2,1; 3,2]);
-%!demo  toeplitz ([1,2,3,4],[1,5,6])
+%! msg1 = "C must be a vector";
+%! msg2 = "C and R must be vectors";
+%!fail ("toeplitz ([])", msg1)
+%!fail ("toeplitz ([1,2;3,4])", msg1)
+%!fail ("toeplitz ([1,2],[])", msg2)
+%!fail ("toeplitz ([1,2],[1,2;3,4])", msg2)
+%!fail ("toeplitz ([1,2;3,4],[1,2])", msg2)
+%!test fail ("toeplitz", "Invalid call to toeplitz")
+%!fail ("toeplitz (1, 2, 3)", "Invalid call to toeplitz")
+%!test assert (toeplitz ([1,2,3], [1,4]), [1,4; 2,1; 3,2])
+%!assert (toeplitz ([1,2,3], [1,4]), [1,4; 2,1; 3,2])
+%!demo toeplitz ([1,2,3,4],[1,5,6])
 
-### example from kron
-%!#error kron  # FIXME suppress these until we can handle output
-%!#error kron(1,2,3)
+## example from kron
+%!error <Invalid call to kron> kron ()
+%!error <Invalid call to kron> kron (1)
 %!test assert (isempty (kron ([], rand (3, 4))))
 %!test assert (isempty (kron (rand (3, 4), [])))
 %!test assert (isempty (kron ([], [])))
@@ -732,101 +793,110 @@
 %!assert (kron ([1, 2; 3, 4], A), [ A, 2*A; 3*A, 4*A ])
 %!test
 %! res = [1,-1,2,-2,3,-3; 2,-2,4,-4,6,-6; 4,-4,5,-5,6,-6; 8,-8,10,-10,12,-12];
-%! assert (kron (A, B), res)
+%! assert (kron (A, B), res);
+%!shared  # clear out shared variables
+
+## Now verify test() itself
 
-### an extended demo from specgram
-%!#demo
-%! ## Speech spectrogram
-%! [x, Fs] = auload (file_in_loadpath ("sample.wav")); # audio file
-%! step = fix (5*Fs/1000);     # one spectral slice every 5 ms
-%! window = fix (40*Fs/1000);  # 40 ms data window
-%! fftn = 2^nextpow2 (window); # next highest power of 2
-%! [S, f, t] = specgram (x, fftn, Fs, window, window-step);
-%! S = abs (S (2:fftn*4000/Fs,:)); # magnitude in range 0<f<=4000 Hz.
-%! S = S/max(max(S));          # normalize magnitude so that max is 0 dB.
-%! S = max (S, 10^(-40/10));   # clip below -40 dB.
-%! S = min (S, 10^(-3/10));    # clip above -3 dB.
-%! imagesc (flipud (20*log10 (S)), 1);
-%! % you should now see a spectrogram in the image window
-
-
-## now test 'test' itself
-
-## usage and error testing
-% !fail ('test','usage.*test')           # no args, generates usage()
-% !fail ('test (1,2,3,4)','usage.*test') # too many args, generates usage()
-%!fail ('test ("test", "bogus")','unknown flag')  # incorrect args
+## Test 'fail' keyword
+%!fail ("test", "Invalid call to test")  # no args, generates usage()
+%!fail ("test (1,2,3,4)", "usage.*test") # too many args, generates usage()
+%!fail ('test ("test", "bogus")', "unknown flag")  # incorrect args
 %!fail ('garbage','garbage.*undefined')  # usage on nonexistent function should be
 
-%!error test                     # no args, generates usage()
-%!error test (1,2,3,4)           # too many args, generates usage()
-%!error <unknown flag> test ("test", 'bogus'); # incorrect args, generates error()
-%!error <garbage' undefined> garbage           # usage on nonexistent function should be
-
-%!error test ("test", 'bogus');  # test without pattern
+## Test 'error' keyword
+%!error test              # no args, generates usage()
+%!error test (1,2,3,4)    # too many args, generates usage()
+%!error <unknown flag> test ("test", "bogus"); # incorrect args
+%!error test ("test", "bogus");  # test without pattern
+%!error <'garbage' undefined> garbage; # usage on nonexistent function is error
 
-%!test
-%! lastwarn();            # clear last warning just in case
-
-%!warning <warning message> warning ('warning message');
+## Test 'warning' keyword
+%!warning warning ("warning message");   # no pattern
+%!warning <warning message> warning ("warning message");   # with pattern
 
-## test of shared variables
+## Test 'shared' keyword
 %!shared a                # create a shared variable
-%!test   a=3;             # assign to a shared variable
-%!test   assert (a,3)     # variable should equal 3
+%!test a = 3;             # assign to a shared variable
+%!test assert (a, 3)      # variable should equal 3
 %!shared b,c              # replace shared variables
-%!test assert (!exist ("a", "var"));  # a no longer exists
+%!test assert (! exist ("a", "var"));  # a no longer exists
 %!test assert (isempty (b));   # variables start off empty
 %!shared a,b,c            # recreate a shared variable
 %!test assert (isempty (a));   # value is empty even if it had a previous value
 %!test a=1; b=2; c=3;   # give values to all variables
-%!test assert ([a,b,c],[1,2,3]); # test all of them together
-%!test c=6;             # update a value
-%!test assert ([a, b, c],[1, 2, 6]); # show that the update sticks
-%!shared                     # clear all shared variables
-%!test assert (!exist ("a", "var")) # show that they are cleared
-%!shared a,b,c               # support for initializer shorthand
+%!test assert ([a,b,c], [1,2,3]); # test all of them together
+%!test c=6;               # update a value
+%!test assert ([a,b,c], [1,2,6]); # show that the update sticks
+%!shared                  # clear all shared variables
+%!test assert (! exist ("a", "var")) # show that they are cleared
+%!shared a,b,c            # support for initializer shorthand
 %! a=1; b=2; c=4;
+%!shared                  # clear all shared variables for remainder of tests
 
+## Test 'function' keyword
 %!function x = __test_a (y)
 %! x = 2*y;
 %!endfunction
-%!assert (__test_a (2),4);       # Test a test function
+%!assert (__test_a (2), 4)  # Test a test function
 
 %!function __test_a (y)
 %! x = 2*y;
 %!endfunction
 %!test
-%! __test_a (2);                # Test a test function with no return value
+%! __test_a (2);            # Test a test function with no return value
 
 %!function [x,z] = __test_a (y)
 %! x = 2*y;
 %! z = 3*y;
 %!endfunction
-%!test                   # Test a test function with multiple returns
-%! [x,z] = __test_a (3);
+%!test
+%! [x,z] = __test_a (3);    # Test a test function with multiple returns
 %! assert (x,6);
 %! assert (z,9);
 
-## test of assert block
-%!assert (isempty ([]))      # support for test assert shorthand
+## Test 'assert' keyword
+%!assert (isempty ([]))     # support for test assert shorthand
+%!assert (size (ones (1,2,3)), [1 2 3])
 
-## demo blocks
-%!demo                   # multiline demo block
+## Test 'demo' keyword
+%!demo                      # multiline demo block
 %! t = [0:0.01:2*pi]; x = sin (t);
 %! plot (t,x);
 %! % you should now see a sine wave in your figure window
-%!demo a=3               # single line demo blocks work too
+
+%!demo a=3                  # single line demo blocks work too
+
+%!test
+%! [code, idx] = test ("test", "grabdemo");
+%! assert (numel (idx), 4);
+%! assert (code(idx(3):end),
+%!         " a=3                  # single line demo blocks work too");
 
-## this is a comment block. it can contain anything.
+## Test 'testif' keyword
+%!testif HAVE_BOGUS_FEATURE
+%! error ("testif executed code despite not having feature");
+
+## Test 'xtest' keyword
+%!xtest
+%! assert (1, 1);      # Test passes
+%!xtest
+%! assert (0, 1);      # Test fails
+
+## Test comment block. it can contain anything.
 %!##
 %! it is the "#" as the block type that makes it a comment
 %! and it stays as a comment even through continuation lines
 %! which means that it works well with commenting out whole tests
 
-% !# failure tests.  All the following should fail. These tests should
-% !# be disabled unless you are developing test() since users don't
-% !# like to be presented with expected failures.  I use % ! to disable.
+## Test test() input validation
+%!error <NAME must be a string> test (1)
+%!error <second argument must be a string> test ("ls", 1)
+%!error test ([], "normal")
+
+## All of the following tests should fail.  These tests should
+## be disabled unless you are developing test() since users don't
+## like to be presented with expected failures.  I use '% !' to disable.
 % !test   error("---------Failure tests.  Use test('test','verbose',1)");
 % !test   assert([a,b,c],[1,3,6]);   # variables have wrong values
 % !bogus                     # unknown block type
@@ -839,10 +909,10 @@
 % !demo   with syntax error  # syntax errors in demo fail properly
 % !shared a,b,c
 % !demo                      # shared variables not available in demo
-% ! assert(exist("a", "var"))
+% ! assert (exist ("a", "var"))
 % !error
-% ! test('/etc/passwd');
-% ! test("nonexistent file");
+% ! test ('/etc/passwd');
+% ! test ("nonexistent file");
 % ! ## These don't signal an error, so the test for an error fails. Note
 % ! ## that the call doesn't reference the current fid (it is unavailable),
 % ! ## so of course the informational message is not printed in the log.
--- a/scripts/time/addtodate.m
+++ b/scripts/time/addtodate.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Bill Denney
+## Copyright (C) 2008-2015 Bill Denney
 ##
 ## This file is part of Octave.
 ##
@@ -115,7 +115,7 @@
 %!assert (addtodate ([d;d+1], 1, "month"), [d+31;d+1+31])
 %!assert (addtodate ([d d+1], 1, "month"), [d+31 d+1+31])
 
-%% Test input validation
+## Test input validation
 %!error addtodate ()
 %!error addtodate (1)
 %!error addtodate (1,2)
--- a/scripts/time/asctime.m
+++ b/scripts/time/asctime.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/calendar.m
+++ b/scripts/time/calendar.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -99,6 +99,6 @@
 %!assert ((calendar(2000,2))'(2:31), [0:29])
 %!assert ((calendar(1957,10))'(2:33), [0:31])
 
-%% Test input validation
+## Test input validation
 %!error calendar (1,2,3)
 
--- a/scripts/time/clock.m
+++ b/scripts/time/clock.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/ctime.m
+++ b/scripts/time/ctime.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/date.m
+++ b/scripts/time/date.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1995-2013 John W. Eaton
+## Copyright (C) 1995-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/datenum.m
+++ b/scripts/time/datenum.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 Paul Kienzle
+## Copyright (C) 2006-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -96,8 +96,8 @@
   persistent monthstart = [306; 337; 0; 31; 61; 92; 122; 153; 184; 214; 245; 275];
   persistent monthlength = [31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31];
 
-  if (nargin == 0 || nargin > 6 ||
-     (nargin > 2 && (ischar (year) || iscellstr (year))))
+  if (nargin == 0 || nargin > 6
+      || (nargin > 2 && (ischar (year) || iscellstr (year))))
     print_usage ();
   endif
 
@@ -118,19 +118,20 @@
     endif
   endif
 
-  if (! (isa (year, "double") && isa (month, "double") && isa (day, "double") &&
-         isa (hour, "double") && isa (minute, "double") && isa (second, "double")))
+  if (! (isa (year, "double") && isa (month, "double")
+         && isa (day, "double") && isa (hour, "double")
+         && isa (minute, "double") && isa (second, "double")))
     error ("datenum: all inputs must be of class double");
   endif
 
-  month(month<1) = 1;  # For compatibility.  Otherwise allow negative months.
+  month(month < 1) = 1;  # For compatibility.  Otherwise allow negative months.
 
   ## Treat fractional months, by converting the fraction to days
   if (floor (month) != month)
     fracmonth = month - floor (month);
     month = floor (month);
-    if ((mod (month-1,12) + 1) == 2 &&
-        (floor (year/4) - floor (year/100) + floor (year/400)) != 0)
+    if ((mod (month-1,12) + 1) == 2
+        && (floor (year/4) - floor (year/100) + floor (year/400)) != 0)
       ## leap year
       day += fracmonth * 29;
     else
@@ -208,7 +209,7 @@
 ## Test string input with format string
 %!assert (datenum ("5-19, 2001", "mm-dd, yyyy"), 730990)
 
-%% Test input validation
+## Test input validation
 %!error datenum ()
 %!error datenum (1,2,3,4,5,6,7)
 %!error <expected date vector containing> datenum ([1, 2])
--- a/scripts/time/datestr.m
+++ b/scripts/time/datestr.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -37,16 +37,16 @@
 ##
 ## @multitable @columnfractions 0.1 0.45 0.35
 ## @headitem Code @tab Format @tab Example
-## @item 0 @tab dd-mmm-yyyy HH:MM:SS   @tab 07-Sep-2000 15:38:09
-## @item 1 @tab dd-mmm-yyyy            @tab 07-Sep-2000
-## @item 2 @tab mm/dd/yy               @tab 09/07/00
-## @item 3 @tab mmm                    @tab Sep
-## @item 4 @tab m                      @tab S
-## @item 5 @tab mm                     @tab 09
-## @item 6 @tab mm/dd                  @tab 09/07
-## @item 7 @tab dd                     @tab 07
-## @item 8 @tab ddd                    @tab Thu
-## @item 9 @tab d                      @tab T
+## @item 0 @tab dd-mmm-yyyy HH:MM:SS    @tab 07-Sep-2000 15:38:09
+## @item 1 @tab dd-mmm-yyyy             @tab 07-Sep-2000
+## @item 2 @tab mm/dd/yy                @tab 09/07/00
+## @item 3 @tab mmm                     @tab Sep
+## @item 4 @tab m                       @tab S
+## @item 5 @tab mm                      @tab 09
+## @item 6 @tab mm/dd                   @tab 09/07
+## @item 7 @tab dd                      @tab 07
+## @item 8 @tab ddd                     @tab Thu
+## @item 9 @tab d                       @tab T
 ## @item 10 @tab yyyy                   @tab 2000
 ## @item 11 @tab yy                     @tab 00
 ## @item 12 @tab mmmyy                  @tab Sep00
@@ -183,8 +183,8 @@
     if (columns (date) == 6)
       ## Make sure that the input really is a datevec.
       maxdatevec = [Inf, 12, 31, 23, 59, 60];
-      if (any (max (date, 1) > maxdatevec) ||
-          any (date(:,1:5) != floor (date(:,1:5))))
+      if (any (max (date, 1) > maxdatevec)
+          || any (date(:,1:5) != floor (date(:,1:5))))
         v = datevec (date, p);
       endif
     endif
@@ -193,7 +193,7 @@
     endif
   endif
 
-  retval = [];
+  retval = "";
   for i = 1 : rows (v)
 
     if (isempty (f))
@@ -213,8 +213,8 @@
     endif
 
     df_orig = df;
-    df = strrep (df, 'AM', "%p");
-    df = strrep (df, 'PM', "%p");
+    df = strrep (df, "AM", "%p");
+    df = strrep (df, "PM", "%p");
     if (strcmp (df, df_orig))
       ## PM not set.
       df = strrep (df, "HH", "%H");
@@ -222,20 +222,20 @@
       df = strrep (df, "HH", sprintf ("%2d", v(i,4)));
     endif
 
-    df = regexprep (df, '[Yy][Yy][Yy][Yy]', "%Y");
+    df = regexprep (df, "[Yy][Yy][Yy][Yy]", "%Y");
 
-    df = regexprep (df, '[Yy][Yy]', "%y");
+    df = regexprep (df, "[Yy][Yy]", "%y");
 
-    df = regexprep (df, '[Dd][Dd][Dd][Dd]', "%A");
+    df = regexprep (df, "[Dd][Dd][Dd][Dd]", "%A");
 
-    df = regexprep (df, '[Dd][Dd][Dd]', "%a");
+    df = regexprep (df, "[Dd][Dd][Dd]", "%a");
 
-    df = regexprep (df, '[Dd][Dd]', "%d");
+    df = regexprep (df, "[Dd][Dd]", "%d");
 
     wday = weekday (datenum (v(i,1), v(i,2), v(i,3)));
     tmp = names_d{wday};
-    df = regexprep (df, '([^%])[Dd]', sprintf ("$1%s", tmp));
-    df = regexprep (df, '^[Dd]', sprintf ("%s", tmp));
+    df = regexprep (df, "([^%])[Dd]", sprintf ("$1%s", tmp));
+    df = regexprep (df, "^[Dd]", sprintf ("%s", tmp));
 
     df = strrep (df, "mmmm", "%B");
 
@@ -244,17 +244,18 @@
     df = strrep (df, "mm", "%m");
 
     tmp = names_m{v(i,2)};
-    pos = regexp (df, '[^%]m') + 1;
+    pos = regexp (df, "[^%]m") + 1;
     df(pos) = tmp;
-    df = regexprep (df, '^m', tmp);
+    df = regexprep (df, "^m", tmp);
 
     df = strrep (df, "MM", "%M");
 
-    df = regexprep (df, '[Ss][Ss]', "%S");
+    df = regexprep (df, "[Ss][Ss]", "%S");
 
-    df = strrep (df, "FFF", sprintf ("%03d", 1000 * (v(i,6) - fix (v(i,6)))));
+    df = strrep (df, "FFF", sprintf ("%03d",
+                                     round (1000 * (v(i,6) - fix (v(i,6))))));
 
-    df = strrep (df, 'QQ', sprintf ("Q%d", fix ((v(i,2) + 2) / 3)));
+    df = strrep (df, "QQ", sprintf ("Q%d", fix ((v(i,2) + 2) / 3)));
 
     vi = v(i,:);
     tm.year = vi(1) - 1900;
@@ -266,7 +267,7 @@
     tm.sec = fix (sec);
     tm.usec = fix ((sec - tm.sec) * 1e6);
     tm.wday = wday - 1;
-    ## FIXME -- Do we need YDAY and DST?  How should they be computed?
+    ## FIXME: Do we need YDAY and DST?  How should they be computed?
     ## We don't want to use "localtime (mktime (tm))" because that
     ## doesn't correctly handle dates before 1970-01-01 on some systems.
     ## tm.yday = ?;
@@ -339,7 +340,7 @@
 ## Test fractional millisecond time extension
 %!assert (datestr (testtime, "HH:MM:SS:FFF"), "02:33:17:382")
 
-%% Test input validation
+## Test input validation
 %!error datestr ()
 %!error datestr (1, 2, 3, 4)
 
--- a/scripts/time/datevec.m
+++ b/scripts/time/datevec.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -113,6 +113,8 @@
     p = (localtime (time ())).year + 1900 - 50;
   endif
 
+  do_resize = false;
+
   if (iscell (date))
 
     nd = numel (date);
@@ -123,8 +125,10 @@
       for k = 1:nd
         found = false;
         for l = 1:nfmt
-          [f, rY, ry, fy, fm, fd, fh, fmi, fs] = __date_vfmt2sfmt__ (std_formats{l});
-          [found y(k) m(k) d(k) h(k) mi(k) s(k)] = __date_str2vec__ (date{k}, p, f, rY, ry, fy, fm, fd, fh, fmi, fs);
+          [f, rY, ry, fy, fm, fd, fh, fmi, fs] = ...
+            __date_vfmt2sfmt__ (std_formats{l});
+          [found y(k) m(k) d(k) h(k) mi(k) s(k)] = ...
+            __date_str2vec__ (date{k}, p, f, rY, ry, fy, fm, fd, fh, fmi, fs);
           if (found)
             break;
           endif
@@ -137,7 +141,8 @@
       ## Decipher the format string just once for speed.
       [f, rY, ry, fy, fm, fd, fh, fmi, fs] = __date_vfmt2sfmt__ (f);
       for k = 1:nd
-        [found y(k) m(k) d(k) h(k) mi(k) s(k)] = __date_str2vec__ (date{k}, p, f, rY, ry, fy, fm, fd, fh, fmi, fs);
+        [found y(k) m(k) d(k) h(k) mi(k) s(k)] = ...
+          __date_str2vec__ (date{k}, p, f, rY, ry, fy, fm, fd, fh, fmi, fs);
         if (! found)
           error ("datevec: DATE not parsed correctly with given format");
         endif
@@ -146,6 +151,10 @@
 
   else   # datenum input
 
+    if (! iscolumn (date))
+      date_sz = size (date);
+      do_resize = true;
+    endif
     date = date(:);
 
     ## Move day 0 from midnight -0001-12-31 to midnight 0000-3-1
@@ -182,6 +191,13 @@
 
   if (nargout <= 1)
     y = [y, m, d, h, mi, s];
+  elseif (do_resize)
+    y = reshape (y, date_sz);
+    m = reshape (m, date_sz);
+    d = reshape (d, date_sz);
+    h = reshape (h, date_sz);
+    mi = reshape (mi, date_sz);
+    s = reshape (s, date_sz);
   endif
 
 endfunction
@@ -306,10 +322,15 @@
 %!assert (datevec ("03:38 PM"), [yr,1,1,15,38,0])
 %!assert (datevec ("03/13/1962"), [1962,3,13,0,0,0])
 
-%% Test millisecond format FFF
+## Test millisecond format FFF
 %!assert (datevec ("15:38:21.25", "HH:MM:SS.FFF"), [yr,1,1,15,38,21.025])
 
-# Other tests
+## Test structure of return value (bug #42334)
+%!test
+%! [~, ~, d] = datevec ([1 2; 3 4]);
+%! assert (d, [1 2; 3 4]);
+
+## Other tests
 %!assert (datenum (datevec ([-1e4:1e4])), [-1e4:1e4]');
 %!test
 %! t = linspace (-2e5, 2e5, 10993);
@@ -317,3 +338,9 @@
 %!assert (double (datevec (int64 (datenum ([2014 6 1])))), datevec (datenum ([2014 6 1])))
 %!assert (double (datevec (int64 (datenum ([2014 6 18])))), datevec (datenum ([2014 6 18])))
 
+## Test input validation
+%!error datevec ()
+%!error datevec (1,2,3,4)
+%!error <none of the standard formats match> datevec ("foobar")
+%!error <DATE not parsed correctly with given format> datevec ("foobar", "%d")
+
--- a/scripts/time/eomday.m
+++ b/scripts/time/eomday.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2004-2013 Paul Kienzle
+## Copyright (C) 2004-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -45,7 +45,6 @@
 %! e = eomday (y, repmat (2, [1, 100]));
 %! y(find (e == 29))
 
-# tests
 %!assert (eomday ([-4:4],2), [29,28,28,28,29,28,28,28,29])
 %!assert (eomday ([-901,901],2), [28,28])
 %!assert (eomday ([-100,100],2), [28,28])
@@ -58,7 +57,7 @@
 %!assert ([1900:1999](find(eomday(1900:1999,2*ones(1,100))==29)), [1904,1908,1912,1916,1920,1924,1928,1932,1936,1940,1944,1948,1952,1956,1960,1964,1968,1972,1976,1980,1984,1988,1992,1996])
 %!assert (eomday ([2004;2005], [2;2]), [29;28])
 
-%% Test input validation
+## Test input validation
 %!error eomday ()
 %!error eomday (1)
 %!error eomday (1,2,3)
--- a/scripts/time/etime.m
+++ b/scripts/time/etime.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -72,7 +72,7 @@
 %! assert (etime (t4, t1), 60);
 %! assert (etime (t5, t1), 13);
 
-%% Test input validation
+## Test input validation
 %!error etime ();
 %!error etime (1);
 %!error etime (1, 2, 3);
--- a/scripts/time/is_leap_year.m
+++ b/scripts/time/is_leap_year.m
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2013 John W. Eaton
+## Copyright (C) 1996-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/now.m
+++ b/scripts/time/now.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
--- a/scripts/time/weekday.m
+++ b/scripts/time/weekday.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2000-2013 Paul Kienzle
+## Copyright (C) 2000-2015 Paul Kienzle
 ##
 ## This file is part of Octave.
 ##
@@ -93,7 +93,6 @@
 %! ## Weekday of new millennium from datestr input
 %! [n, s] = weekday ("1-Jan-2000")
 
-# tests
 %!assert (weekday (728647), 2)
 ## Test vector inputs for both directions
 %!assert (weekday ([728647 728648]), [2 3])
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's src directory
 #
-# Copyright (C) 1993-2013 John W. Eaton
+# Copyright (C) 1993-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -52,12 +52,15 @@
   octave-config
 
 noinst_HEADERS = \
+  display-available.h	\
   shared-fcns.h
 
 OCTAVE_VERSION_LINKS = octave-cli-$(version)$(EXEEXT)
 
+archlib_PROGRAMS =
+
 if AMCOND_BUILD_GUI
-  archlib_PROGRAMS = octave-gui
+  archlib_PROGRAMS += octave-gui
   OCTAVE_VERSION_LINKS += octave-gui-$(version)$(EXEEXT)
 endif
 
@@ -68,6 +71,7 @@
 include ../libgui/link-deps.mk
 
 nodist_octave_SOURCES = main.cc
+octave_SOURCES = display-available.c
 
 octave_LDADD = \
   $(top_builddir)/libgnu/libgnu.la \
@@ -127,19 +131,40 @@
   $(top_builddir)/libgnu/libgnu.la \
   $(LIBS)
 
-all-local: $(OCTAVE_VERSION_LINKS)
+OCTAVE_CROSS_TOOLS=
+if AMCOND_CROSS_TOOLS
+# building cross mkoctfile
+OCTAVE_CROSS_TOOLS += $(host_triplet)-mkoctfile$(BUILD_EXEEXT)
+$(host_triplet)-mkoctfile$(BUILD_EXEEXT): $(host_triplet)-mkoctfile.cc
+	$(BUILD_CXX) -o $(host_triplet)-mkoctfile$(BUILD_EXEEXT) -Dgnulib='' -Doctave_idx_type=int $(DEFAULT_INCLUDES) $(BUILD_CXXFLAGS) $(BUILD_LDFLAGS) $(host_triplet)-mkoctfile.cc
+$(host_triplet)-mkoctfile.cc: mkoctfile.in.cc Makefile
+	$(AM_V_GEN)$(do_subst_cross_config_vals)
+
+# building cross octave-config
+OCTAVE_CROSS_TOOLS += $(host_triplet)-octave-config$(BUILD_EXEEXT)
+$(host_triplet)-octave-config$(BUILD_EXEEXT): $(host_triplet)-octave-config.cc
+	$(BUILD_CXX) -o $(host_triplet)-octave-config$(BUILD_EXEEXT) -Dgnulib='' -Doctave_idx_type=int $(DEFAULT_INCLUDES) $(BUILD_CXXFLAGS) $(BUILD_LDFLAGS) $(host_triplet)-octave-config.cc
+$(host_triplet)-octave-config.cc: octave-config.in.cc Makefile
+	$(AM_V_GEN)$(do_subst_default_vals)
+
+mostlyclean-local:
+	-rm -f $(OCTAVE_CROSS_TOOLS)
+
+endif
+
+all-local: $(OCTAVE_VERSION_LINKS) $(OCTAVE_CROSS_TOOLS)
 
 octave-config.cc: octave-config.in.cc Makefile
-	@$(do_subst_default_vals)
+	$(AM_V_GEN)$(do_subst_default_vals)
 
 mkoctfile.cc: mkoctfile.in.cc Makefile
-	@$(do_subst_config_vals)
+	$(AM_V_GEN)$(do_subst_config_vals)
 
 ## main.cc must depend on Makefile.  Calling configure may change
 ## default/config values.  However, calling configure will also
 ## regenerate the Makefiles from Makefile.am and trigger the rules below.
 main.cc: main.in.cc Makefile
-	@$(do_subst_default_vals)
+	$(AM_V_GEN)$(do_subst_default_vals)
 
 install-exec-hook: make-version-links
 
@@ -163,11 +188,11 @@
 ## program (main.cc) will try to invoke the versioned binaries.
 
 octave-cli-$(version)$(EXEEXT): octave-cli$(EXEEXT)
-	rm -f $@
+	$(AM_V_GEN)rm -f $@ && \
 	$(LN_S) $< $@
 
 octave-gui-$(version)$(EXEEXT): octave-gui$(EXEEXT)
-	rm -f $@
+	$(AM_V_GEN)rm -f $@ && \
 	$(LN_S) $< $@
 
 CLEANFILES = \
new file mode 100644
--- /dev/null
+++ b/src/display-available.c
@@ -0,0 +1,96 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#if defined (OCTAVE_USE_WINDOWS_API)
+#include <windows.h>
+#elif defined (HAVE_FRAMEWORK_CARBON)
+#include <Carbon/Carbon.h>
+#elif defined (HAVE_X_WINDOWS)
+#include <X11/Xlib.h>
+#endif
+
+#include "display-available.h"
+
+const char *
+display_available (int *dpy_avail)
+{
+  *dpy_avail = 0;
+
+  const char *err_msg = "";
+
+#if defined (OCTAVE_USE_WINDOWS_API)
+
+  HDC hdc = GetDC (0);
+
+  if (hdc)
+    *dpy_avail = 1;
+  else
+    err_msg = "no graphical display found";
+
+#elif defined (HAVE_FRAMEWORK_CARBON)
+
+  CGDirectDisplayID display = CGMainDisplayID ();
+
+  if (display)
+    *dpy_avail = 1;
+  else
+    err_msg = "no graphical display found";
+
+#elif defined (HAVE_X_WINDOWS)
+
+  const char *display_name = getenv ("DISPLAY");
+
+  if (display_name && *display_name)
+    {
+      Display *display = XOpenDisplay (display_name);
+
+      if (display)
+        {
+          Screen *screen = DefaultScreenOfDisplay (display);
+
+          if (! screen)
+            err_msg = "X11 display has no default screen";
+
+          XCloseDisplay (display);
+
+          *dpy_avail = 1;
+        }
+      else
+        err_msg = "unable to open X11 DISPLAY";
+    }
+  else
+    err_msg = "X11 DISPLAY environment variable not set";
+
+#else
+
+  err_msg = "no graphical display found";
+
+#endif
+
+  return err_msg;
+}
new file mode 100644
--- /dev/null
+++ b/src/display-available.h
@@ -0,0 +1,32 @@
+/*
+
+Copyright (C) 2012-2015 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#ifdef __cplusplus
+#include <new>
+extern "C" {
+#endif
+
+extern const char *display_available (int *dpy_avail);
+
+#ifdef __cplusplus
+}
+#endif
--- a/src/main-cli.cc
+++ b/src/main-cli.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/src/main-gui.cc
+++ b/src/main-gui.cc
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
--- a/src/main.in.cc
+++ b/src/main.in.cc
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 2012-2013 John W. Eaton
+Copyright (C) 2012-2015 John W. Eaton
 
 This file is part of Octave.
 
@@ -58,77 +58,11 @@
 #define OCTAVE_PREFIX %OCTAVE_PREFIX%
 #endif
 
+#include "display-available.h"
 #include "shared-fcns.h"
 
 #include <cstdlib>
 
-#if defined (OCTAVE_USE_WINDOWS_API)
-#include <windows.h>
-#elif defined (HAVE_FRAMEWORK_CARBON)
-#include <Carbon/Carbon.h>
-#elif defined (HAVE_X_WINDOWS)
-#include <X11/Xlib.h>
-#endif
-
-bool
-display_available (std::string& err_msg)
-{
-  bool dpy_avail = false;
-
-  err_msg = "";
-
-#if defined (OCTAVE_USE_WINDOWS_API)
-
-  HDC hdc = GetDC (0);
-
-  if (hdc)
-    dpy_avail = true;
-  else
-    err_msg = "no graphical display found";
-
-#elif defined (HAVE_FRAMEWORK_CARBON)
-
-  CGDirectDisplayID display = CGMainDisplayID ();
-
-  if (display)
-    dpy_avail = true;
-  else
-    err_msg = "no graphical display found";
-
-#elif defined (HAVE_X_WINDOWS)
-
-  const char *display_name = getenv ("DISPLAY");
-
-  if (display_name && *display_name)
-    {
-      Display *display = XOpenDisplay (display_name);
-
-      if (display)
-        {
-          Screen *screen = DefaultScreenOfDisplay (display);
-
-          if (! screen)
-            err_msg = "X11 display has no default screen";
-
-          XCloseDisplay (display);
-
-          dpy_avail = true;
-        }
-      else
-        err_msg = "unable to open X11 DISPLAY";
-    }
-  else
-    err_msg = "X11 DISPLAY environment variable not set";
-
-#else
-
-  err_msg = "no graphical display found";
-
-#endif
-
-  return dpy_avail;
-}
-
 #if (defined (HAVE_OCTAVE_GUI) \
      && ! defined (__WIN32__) || defined (__CYGWIN__))
 
@@ -339,8 +273,8 @@
 
   std::string dir = octave_getenv ("OCTAVE_ARCHLIBDIR");
 
-  return dir.empty ()
-    ? subst_octave_home (std::string (OCTAVE_ARCHLIBDIR)) : dir;
+  return dir.empty () ? subst_octave_home (std::string (OCTAVE_ARCHLIBDIR))
+                      : dir;
 }
 
 // Adapted from libtool wrapper.
@@ -493,14 +427,22 @@
 {
   int retval = 0;
 
-  bool start_gui = false;
-  bool gui_libs = false;
+  bool start_gui = true;
+  bool gui_libs = true;
 
   std::string octave_bindir = get_octave_bindir ();
   std::string octave_archlibdir = get_octave_archlibdir ();
 
+#if defined (HAVE_OCTAVE_GUI)
+  // The Octave version number is already embedded in the
+  // octave_archlibdir directory name so we don't need to append it to
+  // the octave-gui file name.
+
+  std::string file = octave_archlibdir + dir_sep_char + "octave-gui";
+#else
   std::string file
-    = octave_bindir + dir_sep_char + "octave-cli-" OCTAVE_VERSION;;
+    = octave_bindir + dir_sep_char + "octave-cli-" OCTAVE_VERSION;
+#endif
 
   char **new_argv = new char * [argc + 1];
 
@@ -510,22 +452,7 @@
 
   for (int i = 1; i < argc; i++)
     {
-      if (! strcmp (argv[i], "--force-gui"))
-        {
-          start_gui = true;
-          gui_libs = true;
-#if defined (HAVE_OCTAVE_GUI)
-          // The Octave version number is already embedded in the
-          // octave_archlibdir directory name so we don't need to
-          // append it to the octave-gui file name.
-
-          file = octave_archlibdir + dir_sep_char + "octave-gui";
-#else
-          file = octave_bindir + dir_sep_char + "octave-cli-" OCTAVE_VERSION;
-#endif
-          new_argv[k++] = argv[i];
-        }
-      else if (! strcmp (argv[i], "--no-gui-libs"))
+      if (! strcmp (argv[i], "--no-gui-libs"))
         {
           // Run the version of Octave that is not linked with any GUI
           // libraries.  It may not be possible to do plotting or any
@@ -533,7 +460,9 @@
           // require less memory.  Don't pass the --no-gui-libs option
           // on as that option is not recognized by Octave.
 
-          // This is the default for 3.8 release.
+          start_gui = false;
+          gui_libs = false;
+          file = octave_bindir + dir_sep_char + "octave-cli";
         }
       else if (! strcmp (argv[i], "--no-gui"))
         {
@@ -543,10 +472,11 @@
           // even if the --no-gui option is given, we may be asked to do
           // some plotting or ui* calls.
 
-          // This option calls the cli executable for the 3.8 release.
+          start_gui = false;
+          new_argv[k++] = argv[i];
         }
-      else if (! strcmp (argv[i], "--silent") || ! strcmp (argv[i], "-q")
-               || ! strcmp (argv[i], "--quiet"))
+      else if (! strcmp (argv[i], "--silent") || ! strcmp (argv[i], "--quiet")
+               || ! strcmp (argv[i], "-q"))
         {
           warn_display = false;
           new_argv[k++] = argv[i];
@@ -559,9 +489,11 @@
 
   if (gui_libs || start_gui)
     {
-      std::string display_check_err_msg;
+      int dpy_avail;
 
-      if (! display_available (display_check_err_msg))
+      const char *display_check_err_msg = display_available (&dpy_avail);
+
+      if (! dpy_avail)
         {
           start_gui = false;
           gui_libs = false;
@@ -570,6 +502,9 @@
 
           if (warn_display)
             {
+              if (! display_check_err_msg)
+                display_check_err_msg = "graphical display unavailable";
+
               std::cerr << "octave: " << display_check_err_msg << std::endl;
               std::cerr << "octave: disabling GUI features" << std::endl;
             }
@@ -607,8 +542,8 @@
 
               retval = 1;
             }
-
-          retval = octave_exec (file, new_argv);
+          else
+            retval = octave_exec (file, new_argv);
         }
       else
         {
--- a/src/mkoctfile.in.cc
+++ b/src/mkoctfile.in.cc
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -167,7 +167,7 @@
   vars["DEPEND_FLAGS"] = get_variable ("DEPEND_FLAGS",
                                        %OCTAVE_CONF_DEPEND_FLAGS%);
   vars["DEPEND_EXTRA_SED_PATTERN"] = get_variable ("DEPEND_EXTRA_SED_PATTERN",
-                                       %OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%);
+                                                   %OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%);
 
   vars["DL_LD"] = get_variable ("DL_LD", %OCTAVE_CONF_MKOCTFILE_DL_LD%);
   vars["DL_LDFLAGS"] = get_variable ("DL_LDFLAGS",
@@ -550,9 +550,14 @@
         {
           pass_on_options += (" " + arg);
         }
+      else if (starts_with (arg, "-"))
+        {
+          // Pass through any unrecognized options
+          pass_on_options += (" " + arg);
+        }
       else
         {
-          std::cerr << "mkoctfile: unrecognized argument " << arg;
+          std::cerr << "mkoctfile: unrecognized argument " << arg << std::endl;
           return 1;
         }
 
@@ -588,9 +593,11 @@
           std::string f = *it, dfile = basename (f, true) + ".d", line;
 
           gnulib::unlink (dfile.c_str ());
-          std::string cmd = vars["CC"] + " " + vars["DEPEND_FLAGS"] + " "
-            + vars["CPPFLAGS"] + " " + vars["ALL_CFLAGS"] + " "
-            + incflags  + " " + defs + " " + quote_path (f);
+          std::string cmd = vars["CC"] + " "
+                            + vars["DEPEND_FLAGS"] + " "
+                            + vars["CPPFLAGS"] + " "
+                            + vars["ALL_CFLAGS"] + " "
+                            + incflags  + " " + defs + " " + quote_path (f);
 
           FILE *fd = popen (cmd.c_str (), "r");
           std::ofstream fo (dfile.c_str ());
@@ -602,8 +609,9 @@
                 {
                   size_t spos = line.rfind ('/', pos);
                   std::string ofile =
-                    (spos == std::string::npos ? line.substr (0, pos+2)
-                                          : line.substr (spos+1, pos-spos+1));
+                    (spos == std::string::npos
+                      ? line.substr (0, pos+2)
+                      : line.substr (spos+1, pos-spos+1));
                   fo << "pic/" << ofile << " " << ofile << " "
                      << dfile << line.substr (pos) << std::endl;
                 }
@@ -619,9 +627,11 @@
           std::string f = *it, dfile = basename (f, true) + ".d", line;
 
           gnulib::unlink (dfile.c_str ());
-          std::string cmd = vars["CC"] + " " + vars["DEPEND_FLAGS"] + " "
-            + vars["CPPFLAGS"] + " " + vars["ALL_CXXFLAGS"] + " "
-            + incflags  + " " + defs + " " + quote_path (f);
+          std::string cmd = vars["CC"] + " "
+                            + vars["DEPEND_FLAGS"] + " "
+                            + vars["CPPFLAGS"] + " "
+                            + vars["ALL_CXXFLAGS"] + " "
+                            + incflags  + " " + defs + " " + quote_path (f);
 
           FILE *fd = popen (cmd.c_str (), "r");
           std::ofstream fo (dfile.c_str ());
@@ -633,8 +643,9 @@
                 {
                   size_t spos = line.rfind ('/', pos);
                   std::string ofile =
-                    (spos == std::string::npos ? line.substr (0, pos+2)
-                                          : line.substr (spos+1, pos-spos+1));
+                    (spos == std::string::npos
+                      ? line.substr (0, pos+2)
+                      : line.substr (spos+1, pos-spos+1));
                   fo << "pic/" << ofile << " " << ofile << " "
                      << dfile << line.substr (pos+2) << std::endl;
                 }
@@ -664,15 +675,17 @@
           else
             o = b + ".o";
           objfiles += (" " + o);
-          std::string cmd = vars["F77"] + " -c " + vars["FPICFLAG"] + " "
-            + vars["ALL_FFLAGS"] + " " + incflags + " " + defs + " "
-            + pass_on_options + " " + f + " -o " + o;
+          std::string cmd = vars["F77"] + " -c "
+                            + vars["FPICFLAG"] + " "
+                            + vars["ALL_FFLAGS"] + " "
+                            + incflags + " " + defs + " " + pass_on_options
+                            + " " + f + " -o " + o;
           result = run_command (cmd);
         }
       else
         {
-          std::cerr << "mkoctfile: no way to compile Fortran file "
-                    << f << std::endl;
+          std::cerr << "mkoctfile: no way to compile Fortran file " << f
+                    << std::endl;
           return 1;
         }
     }
@@ -693,10 +706,12 @@
           else
             o = b + ".o";
           objfiles += (" " + o);
-          std::string cmd = vars["CC"] + " -c " + vars["CPPFLAGS"] + " "
-            + vars["CPICFLAG"] + " " + vars["ALL_CFLAGS"] + " "
-            + pass_on_options + " " + incflags + " " + defs + " "
-            + quote_path (f) + " -o " + quote_path (o);
+          std::string cmd = vars["CC"] + " -c "
+                            + vars["CPPFLAGS"] + " "
+                            + vars["CPICFLAG"] + " " + vars["ALL_CFLAGS"] + " "
+                            + pass_on_options + " "
+                            + incflags + " " + defs + " "
+                            + quote_path (f) + " -o " + quote_path (o);
           result = run_command (cmd);
         }
       else
@@ -723,10 +738,13 @@
           else
             o = b + ".o";
           objfiles += (" " + o);
-          std::string cmd = vars["CXX"] + " -c " + vars["CPPFLAGS"] + " "
-            + vars["CXXPICFLAG"] + " " + vars["ALL_CXXFLAGS"] + " "
-            + pass_on_options + " " + incflags + " " + defs + " "
-            + quote_path (f) + " -o " + quote_path (o);
+          std::string cmd = vars["CXX"] + " -c "
+                            + vars["CPPFLAGS"] + " "
+                            + vars["CXXPICFLAG"] + " "
+                            + vars["ALL_CXXFLAGS"] + " "
+                            + pass_on_options + " "
+                            + incflags + " " + defs + " "
+                            + quote_path (f) + " -o " + quote_path (o);
           result = run_command (cmd);
         }
       else
@@ -743,15 +761,17 @@
         {
           if (!vars["LD_CXX"].empty ())
             {
-              std::string cmd = vars["LD_CXX"] + " " + vars["CPPFLAGS"] + " "
-                + vars["ALL_CXXFLAGS"] + " " + vars["RDYNAMIC_FLAG"]
-                + " " + vars["ALL_LDFLAGS"] + " "
-                + pass_on_options + " " + output_option + " "
-                + objfiles + " " + libfiles + " "
-                + ldflags + " " + vars["LFLAGS"]
-                + " -loctinterp -loctave "
-                + " " + vars["OCTAVE_LINK_OPTS"]
-                + " " + vars["OCTAVE_LINK_DEPS"];
+              std::string cmd = vars["LD_CXX"] + " "
+                                + vars["CPPFLAGS"] + " "
+                                + vars["ALL_CXXFLAGS"] + " "
+                                + vars["RDYNAMIC_FLAG"] + " "
+                                + vars["ALL_LDFLAGS"] + " "
+                                + pass_on_options + " " + output_option + " "
+                                + objfiles + " " + libfiles + " "
+                                + ldflags + " " + vars["LFLAGS"]
+                                + " -loctinterp -loctave "
+                                + " " + vars["OCTAVE_LINK_OPTS"]
+                                + " " + vars["OCTAVE_LINK_DEPS"];
               result = run_command (cmd);
             }
           else
@@ -764,11 +784,15 @@
         }
       else
         {
-          std::string cmd = vars["DL_LD"] + " " + vars["DL_LDFLAGS"] + " "
-            + pass_on_options + " -o " + octfile + " "
-            + objfiles + " " + libfiles + " " + ldflags + " "
-            + vars["LFLAGS"] + " -loctinterp -loctave "
-            + vars["OCT_LINK_OPTS"] + " " + vars["OCT_LINK_DEPS"];
+          std::string cmd = vars["DL_LD"] + " "
+                            + vars["DL_LDFLAGS"] + " "
+                            + pass_on_options
+                            + " -o " + octfile + " "
+                            + objfiles + " " + libfiles + " "
+                            + ldflags + " "
+                            + vars["LFLAGS"] + " -loctinterp -loctave "
+                            + vars["OCT_LINK_OPTS"] + " "
+                            + vars["OCT_LINK_DEPS"];
           result = run_command (cmd);
         }
 
--- a/src/octave-config.in.cc
+++ b/src/octave-config.in.cc
@@ -1,7 +1,7 @@
 // %NO_EDIT_WARNING%
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
@@ -56,23 +56,25 @@
 "  -p VAR, --print VAR   Print the value of the given configuration\n"
 "                        variable VAR.  Recognized variables are:\n"
 "\n"
-"                          API_VERSION            LOCALAPIOCTFILEDIR\n"
-"                          ARCHLIBDIR             LOCALARCHLIBDIR\n"
-"                          BINDIR                 LOCALFCNFILEDIR\n"
-"                          CANONICAL_HOST_TYPE    LOCALOCTFILEDIR\n"
-"                          DATADIR                LOCALSTARTUPFILEDIR\n"
-"                          DATAROOTDIR            LOCALVERARCHLIBDIR\n"
-"                          DEFAULT_PAGER          LOCALVERFCNFILEDIR\n"
-"                          EXEC_PREFIX            LOCALVEROCTFILEDIR\n"
-"                          FCNFILEDIR             MAN1DIR\n"
-"                          IMAGEDIR               MAN1EXT\n"
-"                          INCLUDEDIR             MANDIR\n"
-"                          INFODIR                OCTFILEDIR\n"
-"                          INFOFILE               OCTINCLUDEDIR\n"
-"                          LIBDIR                 OCTLIBDIR\n"
-"                          LIBEXECDIR             PREFIX\n"
+"                          API_VERSION            LOCALARCHLIBDIR\n"
+"                          ARCHLIBDIR             LOCALFCNFILEDIR\n"
+"                          BINDIR                 LOCALOCTFILEDIR\n"
+"                          CANONICAL_HOST_TYPE    LOCALSTARTUPFILEDIR\n"
+"                          DATADIR                LOCALVERARCHLIBDIR\n"
+"                          DATAROOTDIR            LOCALVERFCNFILEDIR\n"
+"                          DEFAULT_PAGER          LOCALVEROCTFILEDIR\n"
+"                          EXEC_PREFIX            MAN1DIR\n"
+"                          EXEEXT                 MAN1EXT\n"
+"                          FCNFILEDIR             MANDIR\n"
+"                          IMAGEDIR               OCTDATADIR\n"
+"                          INCLUDEDIR             OCTFILEDIR\n"
+"                          INFODIR                OCTINCLUDEDIR\n"
+"                          INFOFILE               OCTLIBDIR\n"
+"                          LIBDIR                 PREFIX\n"
+"                          LIBEXECDIR             SHLEXT\n"
 "                          LOCALAPIARCHLIBDIR     STARTUPFILEDIR\n"
 "                          LOCALAPIFCNFILEDIR     VERSION\n"
+"                          LOCALAPIOCTFILEDIR\n"
 "\n"
 "  -v, --version         Print the Octave version number.\n"
 "\n";
@@ -94,6 +96,7 @@
   vars["DATADIR"] = subst_octave_home (%OCTAVE_DATADIR%);
   vars["DATAROOTDIR"] = subst_octave_home (%OCTAVE_DATAROOTDIR%);
   vars["EXEC_PREFIX"] = subst_octave_home (%OCTAVE_EXEC_PREFIX%);
+  vars["EXEEXT"] = subst_octave_home (%OCTAVE_EXEEXT%);
   vars["FCNFILEDIR"] = subst_octave_home (%OCTAVE_FCNFILEDIR%);
   vars["IMAGEDIR"] = subst_octave_home (%OCTAVE_IMAGEDIR%);
   vars["INCLUDEDIR"] = subst_octave_home (%OCTAVE_INCLUDEDIR%);
@@ -113,9 +116,11 @@
   vars["LOCALVEROCTFILEDIR"] = subst_octave_home (%OCTAVE_LOCALVEROCTFILEDIR%);
   vars["MAN1DIR"] = subst_octave_home (%OCTAVE_MAN1DIR%);
   vars["MANDIR"] = subst_octave_home (%OCTAVE_MANDIR%);
+  vars["OCTDATADIR"] = subst_octave_home (%OCTAVE_OCTDATADIR%);
   vars["OCTFILEDIR"] = subst_octave_home (%OCTAVE_OCTFILEDIR%);
   vars["OCTINCLUDEDIR"] = subst_octave_home (%OCTAVE_OCTINCLUDEDIR%);
   vars["OCTLIBDIR"] = subst_octave_home (%OCTAVE_OCTLIBDIR%);
+  vars["SHLEXT"] = subst_octave_home (%OCTAVE_SHLEXT%);
   vars["STARTUPFILEDIR"] = subst_octave_home (%OCTAVE_STARTUPFILEDIR%);
 }
 
--- a/src/shared-fcns.h
+++ b/src/shared-fcns.h
@@ -1,6 +1,6 @@
 /*
 
-Copyright (C) 2008-2013 Michael Goffioul
+Copyright (C) 2008-2015 Michael Goffioul
 
 This file is part of Octave.
 
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for Octave's test directory
 #
-# Copyright (C) 1994-2013 John W. Eaton
+# Copyright (C) 1994-2015 John W. Eaton
 #
 # This file is part of Octave.
 #
@@ -25,6 +25,8 @@
   args.tst \
   bug-31371.tst \
   bug-38576.tst \
+  colormaps.tst \
+  complex.tst \
   diag-perm.tst \
   error.tst \
   eval-catch.tst \
@@ -56,6 +58,7 @@
 include bug-36025/module.mk
 include bug-38236/module.mk
 include bug-38691/module.mk
+include classdef/module.mk
 include classes/module.mk
 include class-concat/module.mk
 include ctor-vs-method/module.mk
@@ -70,8 +73,13 @@
 check: sparse.tst bc-overload-tests.stamp
 	$(top_builddir)/run-octave $(RUN_OCTAVE_OPTIONS) --norc --silent --no-history $(srcdir)/fntests.m $(srcdir)
 
+if AMCOND_HAVE_LLVM
+check-jit: sparse.tst bc-overload-tests.stamp
+	$(top_builddir)/run-octave $(RUN_OCTAVE_OPTIONS) --jit-compiler --norc --silent --no-history $(srcdir)/fntests.m $(srcdir)
+endif
+
 sparse.tst: build-sparse-tests.sh
-	$(srcdir)/build-sparse-tests.sh
+	$(AM_V_GEN)$(srcdir)/build-sparse-tests.sh
 
 GENERATED_BC_OVERLOADS_DIRS := \
   $(shell $(srcdir)/build-bc-overload-tests.sh --list-dirs)
--- a/test/args.tst
+++ b/test/args.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/build-bc-overload-tests.sh
+++ b/test/build-bc-overload-tests.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Copyright (C) 2010-2013 VZLU Prague
+# Copyright (C) 2010-2015 VZLU Prague
 #
 # This file is part of Octave.
 #
--- a/test/build-sparse-tests.sh
+++ b/test/build-sparse-tests.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2006-2013 David Bateman
+# Copyright (C) 2006-2015 David Bateman
 #
 # This file is part of Octave.
 #
@@ -464,7 +464,7 @@
 print_mapper_test cos
 print_mapper_test cosh
 print_mapper_test exp
-print_mapper_test finite
+print_mapper_test isfinite
 print_mapper_test fix
 print_mapper_test floor
 print_mapper_test imag
@@ -508,19 +508,18 @@
 print_real_mapper_test isspace 0
 print_real_mapper_test isupper 0
 print_real_mapper_test isxdigit 0
-#print_real_mapper_test lgamma 1
+#print_real_mapper_test gammaln 1
 
 # Specific tests for certain mapper functions
     cat >>$TESTS <<EOF
 
-%% These mapper functions always return a full matrix
 %!test
 %! wn2s = warning ("query", "Octave:num-to-str");
 %! warning ("off", "Octave:num-to-str");
 %! if (isreal (af))
 %!   assert (toascii (as), toascii (af));
-%!   assert (tolower (as), tolower (af));
-%!   assert (toupper (as), toupper (af));
+%!   assert (tolower (as), as);
+%!   assert (toupper (as), as);
 %! endif
 %! warning (wn2s.state, "Octave:num-to-str");
 
@@ -856,7 +855,7 @@
 %!assert (as(idx'), sparse (af(idx')));
 %!assert (as(flipud (idx(:))), sparse (af(flipud (idx(:)))))
 %!assert (as([idx,idx]), sparse (af([idx,idx])))
-%!error (as(reshape ([idx;idx], [1,length(idx),2])))
+%!assert (as(reshape ([idx;idx], [1,length(idx),2])), sparse(af(reshape ([idx;idx], [1,length(idx),2]))))
 
 %% Slice tests
 %!assert (as(ridx,cidx), sparse (af(ridx,cidx)))
@@ -915,7 +914,7 @@
 gen_save_tests() {
     cat >>$TESTS <<EOF
 %!test # save ascii
-%! savefile = tmpnam ();
+%! savefile = tempname ();
 %! as_save = as;
 %! save ("-text", savefile, "bf", "as_save", "af");
 %! clear as_save;
@@ -923,7 +922,7 @@
 %! unlink (savefile);
 %! assert (as_save, sparse (af));
 %!test # save binary
-%! savefile = tmpnam ();
+%! savefile = tempname ();
 %! as_save = as;
 %! save ("-binary", savefile, "bf", "as_save", "af");
 %! clear as_save;
@@ -931,7 +930,7 @@
 %! unlink (savefile);
 %! assert (as_save, sparse (af));
 %!testif HAVE_HDF5   # save hdf5
-%! savefile = tmpnam ();
+%! savefile = tempname ();
 %! as_save = as;
 %! save ("-hdf5", savefile, "bf", "as_save", "af");
 %! clear as_save;
@@ -942,7 +941,7 @@
 ## saving sparse matrices to MAT files when using 64-bit indexing since
 ## that is not implemented yet.
 %!test # save matlab
-%! savefile = tmpnam ();
+%! savefile = tempname ();
 %! as_save = as;
 %! save ("-mat", savefile, "bf", "as_save", "af");
 %! clear as_save;
new file mode 100644
--- /dev/null
+++ b/test/classdef/classdef.tst
@@ -0,0 +1,73 @@
+## Copyright (C) 2013-2015 Ben Abbott
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+%%  Test script for classdef OOP.
+%%  Requires the path to contain the test classes.
+%%
+%%  Note: This script and all classes are also intended to run
+%%        in MATLAB to test compatibility.  Don't break that!
+%%
+%%  To Do:  This script tests to ensure that things done correctly work
+%%          corrrectly.  It should also check that things done incorrectly
+%%          error properly.
+%%
+%%  The classes used for the tests reside in the test/classdef with others
+%%  in the test directory.
+%%
+%%  The classes provide the ability to test most of the major features
+%%  of the classdef OOP facilities.  There are a number of classes, mostly
+%%  kind of the same, that create a hierarchy.
+
+%%  Basic classdef tests for value class
+%!shared p, q, i, amt
+%! q = foo_value_class ();
+%! p = foo_value_class (4, 4*12, 50e3);
+%! i = p.rate / (12 * 100);
+%! amt = (p.principle * i) / (1 - (1 + i)^(-p.term));
+%!assert (isempty (q.rate));
+%!assert (isempty (q.principle));
+%!assert (isempty (q.term));
+%!assert (class (p), "foo_value_class");
+%!assert (p.term, 48);
+%!assert (p.rate, 4.0);
+%!assert (p.principle, 50e3);
+%!assert (p.amount, amt, eps ())
+%!assert (amount (p), amt, eps ())
+%!xtest
+%! assert (properties (p), {'rate'; 'term'; 'principle'})
+%!xtest
+%! assert (methods (p), {'amount'; 'foo_value_class'})
+%!assert (isempty (foo_value_class().rate))
+%!error <property `rate' is not constant> foo_value_class.rate
+
+%%  Static method and Constant Property
+%!assert (foo_static_method_constant_property.radians_per_cycle, 2*pi);
+%!assert (foo_static_method_constant_property().radians_per_cycle, 2*pi);
+%!assert (foo_static_method_constant_property().pie, pi);
+%!error <property `frequency' is not constant> foo_static_method_constant_property.frequency
+%!error <method `cosine' is not static> foo_static_method_constant_property.cosine
+%!test
+%! obj = foo_static_method_constant_property;
+%! obj.frequency = 10;
+%! assert (obj.cosine (0.1), cos (2 * pi * 10 * 0.1), eps ())
+%! assert (obj.sine (0.1), sin (2 * pi * 10 * 0.1), eps ())
+
+%!test
+%! obj = foo_method_changes_property_size (3);
+%! obj = obj.move_element_to_end (2);
+%! assert (obj.element, [1 3 2])
new file mode 100644
--- /dev/null
+++ b/test/classdef/foo_method_changes_property_size.m
@@ -0,0 +1,14 @@
+classdef foo_method_changes_property_size
+  properties
+    element;
+  end
+  methods
+    function obj = foo_method_changes_property_size (n)
+      obj.element = 1:n;
+    end
+    function obj = move_element_to_end (obj, n)
+      obj.element(end+1) = obj.element(n);
+      obj.element(n) = [];
+    end
+  end
+end
new file mode 100644
--- /dev/null
+++ b/test/classdef/foo_static_method_constant_property.m
@@ -0,0 +1,30 @@
+classdef foo_static_method_constant_property
+  properties
+    frequency;
+  end
+  properties (Constant = true)
+    pie = pi;
+  end
+  methods
+    function obj = foo_static_method_constant_property (f)
+      if (nargin == 1)
+        obj.frequency = f;
+      elseif (nargin ~= 0)
+        error ('foo_static_method_constant_property:SyntaxError', ...
+               'foo_static_method_constant_property: Invalid syntax')
+      end
+    end
+    function res = cosine (obj, t)
+      res = cos (obj.radians_per_cycle () * obj.frequency * t);
+    end
+    function res = sine (obj, t)
+      res = sin (obj.radians_per_cycle () * obj.frequency * t);
+    end
+  end
+  methods (Static)
+    function res = radians_per_cycle ()
+      res = 2 * foo_static_method_constant_property.pie;
+    end
+  end
+end
+
new file mode 100644
--- /dev/null
+++ b/test/classdef/foo_value_class.m
@@ -0,0 +1,28 @@
+classdef foo_value_class
+  properties
+    rate;
+    term;
+    principle;
+  end
+  methods
+    function obj = foo_value_class (r, t, p)
+      if (nargin == 3)
+        obj.rate = r;
+        obj.term = t;
+        obj.principle = p;
+      elseif (nargin ~= 0)
+        error ('foo_value_class:SyntaxError', ...
+               'foo_value_class: Invalid syntax')
+      end
+    end
+    function amt = amount (obj)
+      i = obj.rate / (12 * 100);
+      if (i == 0 && obj.term == 0)
+        amt = obj.principle;
+      else
+        amt = (obj.principle * i) / (1 - (1 + i)^(-obj.term));
+      end
+    end
+  end
+end
+
new file mode 100644
--- /dev/null
+++ b/test/classdef/module.mk
@@ -0,0 +1,7 @@
+classdef_FCN_FILES = \
+  classdef/foo_method_changes_property_size.m \
+  classdef/foo_static_method_constant_property.m \
+  classdef/foo_value_class.m \
+  classdef/classdef.tst
+
+FCN_FILES += $(classdef_FCN_FILES)
--- a/test/classes/classes.tst
+++ b/test/classes/classes.tst
@@ -1,5 +1,5 @@
-## Copyright (C) 2013 Julien Bect
-## Copyright (C) 2009-2013 Robert T. Short
+## Copyright (C) 2013-2015 Julien Bect
+## Copyright (C) 2009-2015 Robert T. Short
 ##
 ## This file is part of Octave.
 ##
new file mode 100644
--- /dev/null
+++ b/test/colormaps.tst
@@ -0,0 +1,42 @@
+## Copyright (C) 2015 Carnë Draug
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   all_colormaps = colormap ("list");
+%!
+%!   assert (numel (all_colormaps) > 0)
+%!
+%!   for i = 1:numel (all_colormaps)
+%!     f = str2func (all_colormaps{i});
+%!
+%!     assert (iscolormap (f (1)))
+%!     assert (iscolormap (f (12)))
+%!     assert (iscolormap (f (200)))
+%!
+%!     ## bug #44070
+%!     assert (class (f (uint8 (12))), "double")
+%!     assert (iscolormap (f (uint8 (12))))
+%!
+%!     assert (f (0), zeros (0, 3))
+%!   endfor
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
new file mode 100644
--- /dev/null
+++ b/test/command.tst
@@ -0,0 +1,154 @@
+## Don't alter the spacing in the command_test lines.  These are
+## specifically testing for possible differences in things like
+##   A(X) or A( X ) or A (X) or A ( X )
+
+%!function command_test (varargin)
+%!  assignin ('caller', 'cmd_out', ['|', sprintf('%s|', varargin{:})]);
+%!endfunction
+
+%!function gobble_command (varargin)
+%!endfunction
+
+## 0, 1, 2, 3 simple arguments
+%!test
+%! command_test
+%! assert (cmd_out, '|')
+%!test
+%! command_test a
+%! assert (cmd_out, '|a|')
+%!test
+%! command_test aa     b
+%! assert (cmd_out, '|aa|b|')
+%!test
+%! command_test aaa  bb    c
+%! assert (cmd_out, '|aaa|bb|c|')
+
+## continuation
+%!test
+%! command_test a...
+%!  bb ccc
+%! assert (cmd_out, '|a|bb|ccc|')
+%!test
+%! command_test a ...
+%!  bb ccc
+%! assert (cmd_out, '|a|bb|ccc|')
+%!test
+%! command_test aa(...
+%!  bb cc
+%! assert (cmd_out, '|aa(|bb|cc|')
+%!test
+%! command_test aa(   ...
+%!  bb cc
+%! assert (cmd_out, '|aa(   |bb|cc|')
+
+## comments
+%!test
+%! command_test aa bb cc%comment
+%! assert (cmd_out, '|aa|bb|cc|')
+%!test
+%! command_test aa bb cc#comment
+%! assert (cmd_out, '|aa|bb|cc|')
+%!test
+%! command_test aa bb cc   %comment
+%! assert (cmd_out, '|aa|bb|cc|')
+%!test
+%! command_test aa bb cc   #comment
+%! assert (cmd_out, '|aa|bb|cc|')
+%!test
+%! command_test aa bb cc(  %comment
+%! assert (cmd_out, '|aa|bb|cc(  |')
+%!test
+%! command_test aa bb cc(  #comment
+%! assert (cmd_out, '|aa|bb|cc(  |')
+
+## semicolons and commas; multiple commands
+%!test
+%! command_test aa bb, gobble_command cc
+%! assert (cmd_out, '|aa|bb|')
+%!test
+%! command_test aa bb ; gobble_command cc
+%! assert (cmd_out, '|aa|bb|')
+%!test
+%! command_test aa bb ; command_test cc dd
+%! assert (cmd_out, '|cc|dd|')
+%!test
+%! command_test aa bb
+%!test
+%! command_test cc dd
+%! assert (cmd_out, '|cc|dd|')
+
+## parenthesis matching
+%!test
+%! command_test aa(bb,cc,dd) ee(ff,gg) hh
+%! assert (cmd_out, '|aa(bb,cc,dd)|ee(ff,gg)|hh|')
+%!test
+%! command_test aa([bb,cc)]
+%! assert (cmd_out, '|aa([bb,cc)]|')
+%!test
+%! command_test aa(,@!$@"bb"'cc'
+%! assert (cmd_out, '|aa(,@!$@"bb"''cc''|')
+%!test
+%! command_test aa(bb,cc,dd)
+%! assert (cmd_out, '|aa(bb,cc,dd)|')
+%!test
+%! command_test aa( bb,cc,dd )
+%! assert (cmd_out, '|aa( bb,cc,dd )|')
+%!test
+%! command_test aa (bb,cc,dd)
+%! assert (cmd_out, '|aa|(bb,cc,dd)|')
+%!test
+%! command_test aa ( bb,cc,dd )
+%! assert (cmd_out, '|aa|( bb,cc,dd )|')
+%!test
+%! command_test aa(bb, cc, dd)
+%! assert (cmd_out, '|aa(bb, cc, dd)|')
+%!test
+%! command_test aa( bb, cc, dd )
+%! assert (cmd_out, '|aa( bb, cc, dd )|')
+%!test
+%! command_test aa (bb, cc, dd)
+%! assert (cmd_out, '|aa|(bb, cc, dd)|')
+%!test
+%! command_test aa ( bb, cc, dd )
+%! assert (cmd_out, '|aa|( bb, cc, dd )|')
+
+## single and double quotes
+%!test
+%! command_test "aa" 'bb' cc
+%! assert (cmd_out, '|aa|bb|cc|')
+%!test
+%! command_test "aa"'bb'cc
+%! assert (cmd_out, '|aabbcc|')
+%!test
+%! command_test aa'bb'"cc"
+%! assert (cmd_out, '|aabbcc|')
+%!test
+%! command_test "aa"bb'cc'
+%! assert (cmd_out, '|aabbcc|')
+
+## CVX-inspired
+%!test
+%! command_test Z(n,n) hermitian toeplitz
+%! assert (cmd_out, '|Z(n,n)|hermitian|toeplitz|')
+%!test
+%! command_test X( n, n ) symmetric
+%! assert (cmd_out, '|X( n, n )|symmetric|')
+%!test
+%! command_test xw( nm-1, nv );
+%! assert (cmd_out, '|xw( nm-1, nv )|')
+%!test
+%! command_test x( sx ) y( sx ) z( sx )
+%! assert (cmd_out, '|x( sx )|y( sx )|z( sx )|')
+%!test
+%! command_test coeffs(deg+1) complex;
+%! assert (cmd_out, '|coeffs(deg+1)|complex|')
+%!test
+%! command_test w( 1, npairs * nv ) v( 1, npairs * nv )
+%! assert (cmd_out, '|w( 1, npairs * nv )|v( 1, npairs * nv )|')
+%!test
+%! command_test w(m,1)   % edge weights
+%! assert (cmd_out, '|w(m,1)|')
+%!test
+%! command_test x2( size( x ) )
+%! assert (cmd_out, '|x2( size( x ) )|')
+
new file mode 100644
--- /dev/null
+++ b/test/complex.tst
@@ -0,0 +1,64 @@
+## Copyright (C) 2015 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## Test ordering of complex values by magnitude and then by phase
+%!test
+%! x = [0 i 1+i 2 3i 3+4i];
+%! assert (sort (x, "descend"), fliplr (x));
+%! assert (sort (single (x), "descend"), fliplr (single (x)));
+
+%!test
+%! x = [1, -1, i, -i];
+%! xs = [-i, 1, i, -1];
+%! assert (sort (x), xs);
+%! assert (sort (x, "descend"), fliplr (xs));
+%! assert (sort (single (x)), single (xs));
+%! assert (sort (single (x), "descend"), fliplr (single (xs)));
+
+## bug #44071, issorted incorrect because it uses different sort routine.
+%!assert (issorted ([1, -1, i, -i]), false)
+%!assert (issorted (single ([1, -1, i, -i])), false)
+
+## bug #43313, -1 is both '>' and '==' to (-1 - 0i)
+%!test
+%! assert (complex(-1,0) == complex(-1,-0), true);
+%! assert (complex(-1,0) > complex(-1,-0), false);
+%! assert (complex(-1,0) < complex(-1,-0), false);
+
+## Test that sort and issorted both agree on boundary case
+%!test
+%! x = [complex(-1,0), complex(-1,-0), i, -i, 1];
+%! xs = sort (x);
+%! xf = single (x);
+%! xfs = sort (xf);
+%! assert (issorted (xs));
+%! assert (issorted (xfs));
+%! assert (double (xfs), xs);
+
+## Finally, test that sort and issorted agree on NaNs
+%!test
+%! x = [complex(NaN,-1), complex(NaN,NaN), ...
+%!      complex(-1,0), complex(-1,-0), i, -i, 1, ...
+%!      complex(1,NaN)];
+%! xs = sort (x);
+%! xf = single (x);
+%! xfs = sort (xf);
+%! assert (issorted (xs));
+%! assert (issorted (xfs));
+%! assert (double (xfs), xs);
+
--- a/test/ctor-vs-method/ctor-vs-method.tst
+++ b/test/ctor-vs-method/ctor-vs-method.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/diag-perm.tst
+++ b/test/diag-perm.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2009-2013 E. Jason Riedy
+## Copyright (C) 2009-2015 E. Jason Riedy
 ##
 ## This file is part of Octave.
 ##
--- a/test/error.tst
+++ b/test/error.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -59,6 +59,36 @@
 %! assert (warning ("query", "backtrace"), st);
 %! warning (ws.state, "backtrace");
 
+%!shared t1_opts, t2_opts, t1_id, t1_state, saved_opts, saved_id, saved_state
+%! saved_opts = warning ();
+%! saved_id = {saved_opts.identifier};
+%! saved_state = {saved_opts.state};
+%! warning ("off", "all");
+%! assert (warning (), struct ("identifier", {"all"}, "state", {"off"}));
+%! warning ("off", "all");
+%! warning (saved_opts);
+%! t1_opts = struct ("identifier", {"foo:bar"}, "state", {"off"});
+%! t1_id = {t1_opts.identifier};
+%! t1_state = {t1_opts.state};
+%! warning (t1_opts);
+%! t2_opts = struct ("identifier", [saved_id, t1_id], "state", [saved_state, t1_state]);
+%! assert (warning (), t2_opts);
+%! warning ("off", "all");
+%! warning (saved_opts);
+
+## Bug 36393
+
+%!test
+%! w0 = warning;
+%! warnoffId = "MATLAB:singularMatrix";
+%! warnstat = warning ("query", warnoffId);
+%! warnoff = warnstat;
+%! warnoff.state = "off";
+%! warning (warnoff); %update warning status
+%! warning (warnstat); %reset warning status
+%! w = warning;
+%! assert (w, w0);
+
 ## Test usage() function
 
 %!function g ()
--- a/test/eval-catch.tst
+++ b/test/eval-catch.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
rename from test/fcn-handle-derived-resolution/@derived/derived.m
rename to test/fcn-handle-derived-resolution/@fhdr_derived/fhdr_derived.m
--- a/test/fcn-handle-derived-resolution/@derived/derived.m
+++ b/test/fcn-handle-derived-resolution/@fhdr_derived/fhdr_derived.m
@@ -1,5 +1,5 @@
-function r = derived (n)
+function r = fhdr_derived (n)
   s.a = n;
-  p = parent (n);
-  r = class (s, 'derived', p);
+  p = fhdr_parent (n);
+  r = class (s, 'fhdr_derived', p);
 end
rename from test/fcn-handle-derived-resolution/@other/other.m
rename to test/fcn-handle-derived-resolution/@fhdr_other/fhdr_other.m
--- a/test/fcn-handle-derived-resolution/@other/other.m
+++ b/test/fcn-handle-derived-resolution/@fhdr_other/fhdr_other.m
@@ -1,4 +1,4 @@
-function r = other (n)
-  s.d = derived (n);
-  r = class (s, 'other');
+function r = fhdr_other (n)
+  s.d = fhdr_derived (n);
+  r = class (s, 'fhdr_other');
 end
rename from test/fcn-handle-derived-resolution/@other/getsize_arrayfun.m
rename to test/fcn-handle-derived-resolution/@fhdr_other/getsize_arrayfun.m
rename from test/fcn-handle-derived-resolution/@other/getsize_cellfun.m
rename to test/fcn-handle-derived-resolution/@fhdr_other/getsize_cellfun.m
rename from test/fcn-handle-derived-resolution/@other/getsize_loop.m
rename to test/fcn-handle-derived-resolution/@fhdr_other/getsize_loop.m
rename from test/fcn-handle-derived-resolution/@parent/parent.m
rename to test/fcn-handle-derived-resolution/@fhdr_parent/fhdr_parent.m
--- a/test/fcn-handle-derived-resolution/@parent/parent.m
+++ b/test/fcn-handle-derived-resolution/@fhdr_parent/fhdr_parent.m
@@ -1,4 +1,4 @@
-function r = parent (n)
+function r = fhdr_parent (n)
   s.a = rand (n, 1);
-  r = class (s, 'parent');
+  r = class (s, 'fhdr_parent');
 end
rename from test/fcn-handle-derived-resolution/@parent/numel.m
rename to test/fcn-handle-derived-resolution/@fhdr_parent/numel.m
--- a/test/fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst
+++ b/test/fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 John W. Eaton
+## Copyright (C) 2012-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -22,38 +22,46 @@
 %%  Note: This script and all classes are also intended to run
 %%        in Matlab to test compatibility.  Don't break that!
 
-%!shared
-%! clear -classes
+%% FIXME: Can't use 'clear -classes' because it also clears all functions in the
+%% namespace of test.m (bug #35881).  This is a problem only if Octave would
+%% re-use a class definition that was defined somewhere else.  Unfortunately,
+%% that is exactly the case when running 'make check' since the ctor-vs-method
+%% test also uses an @parent, @derived, and @other class.
+%% Until the bug is fixed, it suffices to make the class names unique so that
+%% there is no re-use.  Using the prefix fhdr (fcn-handle-derived-resolution)
+%% for this directory.
+%%!shared
+%%! #clear -classes
 
 %!test
-%! p = parent (7);
+%! p = fhdr_parent (7);
 %! assert (numel (p), 7)
 
 %!test
-%! d = derived (13);
+%! d = fhdr_derived (13);
 %! assert (numel (d), 13)
 
 %!test
-%! p = parent (11);
+%! p = fhdr_parent (11);
 %! f = @numel;
 %! assert (f (p), 11)
 
 %!test
-%! d = parent (21);
+%! d = fhdr_parent (21);
 %! f = @numel;
 %! assert (f (d), 21)
 
 %!test
-%! o(1) = other (13);
-%! o(2) = other (42);
+%! o(1) = fhdr_other (13);
+%! o(2) = fhdr_other (42);
 %! assert (getsize_loop (o), [13, 42])
 
 %!test
-%! o(1) = other (13);
-%! o(2) = other (42);
+%! o(1) = fhdr_other (13);
+%! o(2) = fhdr_other (42);
 %! assert (getsize_cellfun (o), [13, 42])
 
 %!test
-%! o(1) = other (13);
-%! o(2) = other (42);
+%! o(1) = fhdr_other (13);
+%! o(2) = fhdr_other (42);
 %! assert (getsize_arrayfun (o), [13, 42])
--- a/test/fcn-handle-derived-resolution/module.mk
+++ b/test/fcn-handle-derived-resolution/module.mk
@@ -1,11 +1,11 @@
 fcn_handle_derived_resolution_FCN_FILES = \
-  fcn-handle-derived-resolution/@derived/derived.m \
-  fcn-handle-derived-resolution/@other/getsize_arrayfun.m \
-  fcn-handle-derived-resolution/@other/getsize_cellfun.m \
-  fcn-handle-derived-resolution/@other/getsize_loop.m \
-  fcn-handle-derived-resolution/@other/other.m \
-  fcn-handle-derived-resolution/@parent/numel.m \
-  fcn-handle-derived-resolution/@parent/parent.m \
+  fcn-handle-derived-resolution/@fhdr_derived/fhdr_derived.m \
+  fcn-handle-derived-resolution/@fhdr_other/getsize_arrayfun.m \
+  fcn-handle-derived-resolution/@fhdr_other/getsize_cellfun.m \
+  fcn-handle-derived-resolution/@fhdr_other/getsize_loop.m \
+  fcn-handle-derived-resolution/@fhdr_other/fhdr_other.m \
+  fcn-handle-derived-resolution/@fhdr_parent/numel.m \
+  fcn-handle-derived-resolution/@fhdr_parent/fhdr_parent.m \
   fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst
 
 FCN_FILES += $(fcn_handle_derived_resolution_FCN_FILES)
--- a/test/fntests.m
+++ b/test/fntests.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2013 David Bateman
+## Copyright (C) 2005-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/test/for.tst
+++ b/test/for.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/func.tst
+++ b/test/func.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 David Bateman
+## Copyright (C) 2008-2015 David Bateman
 ##
 ## This file is part of Octave.
 ##
--- a/test/global.tst
+++ b/test/global.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/if.tst
+++ b/test/if.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/index.tst
+++ b/test/index.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/io.tst
+++ b/test/io.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -74,7 +74,9 @@
 %!
 %!  ret = 0;
 %!
-%!  files = {"text.mat", "binary.mat", "mat5.mat", "mat7.mat"};
+%!  files = cellfun (@fullfile, {P_tmpdir},
+%!                   {"text.mat", "binary.mat", "mat5.mat", "mat7.mat"},
+%!                   "UniformOutput", false);
 %!  opts = {"-z -text", "-z -binary", "-z -mat", "-v7"};
 %!  tols = {2*eps, 0, 0, 0};
 %!
@@ -197,8 +199,9 @@
 %! STR.struct_fld.x = 0;
 %! STR.struct_fld.y = 1;
 %!
-%! save struct.dat -struct STR;
-%! STR = load ("struct.dat");
+%! struct_dat = fullfile (P_tmpdir, "struct.dat");
+%! save (struct_dat, "-struct", "STR");
+%! STR = load (struct_dat);
 %!
 %! assert (STR.scalar_fld == 1 && ...
 %!         STR.matrix_fld == [1.1,2;3,4] && ...
@@ -207,8 +210,9 @@
 %!         STR.struct_fld.y == 1 );
 %!
 %!
-%! save -binary struct.dat -struct STR matrix_fld str*_fld;
-%! STR = load ("struct.dat");
+%! save ("-binary", struct_dat,
+%!       "-struct", "STR", "matrix_fld", "str*_fld");
+%! STR =  load (struct_dat);
 %!
 %! assert (!isfield (STR,"scalar_fld") && ...
 %!         STR.matrix_fld == [1.1,2;3,4] && ...
@@ -216,15 +220,16 @@
 %!         STR.struct_fld.x == 0 && ...
 %!         STR.struct_fld.y == 1);
 %!
-%! delete struct.dat;
+%! delete (struct_dat);
 
 %!test
 %! matrix1 = rand (100, 2);
-%! save -ascii matrix.ascii matrix1
-%! matrix2 = load ("matrix.ascii");
+%! matrix_ascii = fullfile (P_tmpdir, "matrix.ascii");
+%! save ("-ascii", matrix_ascii, "matrix1")
+%! matrix2 = load (matrix_ascii);
 %! assert (matrix1, matrix2, 1e-9);
 %!
-%! delete matrix.ascii;
+%! delete (matrix_ascii);
 
 %!error <unable to find file> load ("")
 
@@ -290,7 +295,7 @@
 
 %% Note use fprintf so output not sent to stdout
 %!test
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! fid1 = fopen (nm,"w");
 %! x = fprintf (fid1, "%s: %d\n", "test", 1);
 %! fclose (fid1);
@@ -335,7 +340,7 @@
 %!     elseif (j == 4)
 %!       mode_list = {"W+"; "R+"; "A+"};
 %!     endif
-%!     nm = tmpnam ();
+%!     nm = tempname ();
 %!     for k = 1:3
 %!       mode = mode_list{k};
 %!       [id, err] = fopen (nm, mode, arch);
@@ -392,12 +397,12 @@
 %!error fclose (0)
 %!error <Invalid call to fclose> fclose (1, 2)
 
-%!assert (ischar (tmpnam ()))
+%!assert (ischar (tempname ()))
 
-%!warning tmpnam (1);
-%!warning tmpnam ("foo", 1);
+%!error <DIR must be a string> tempname (1);
+%!error <PREFIX must be a string> tempname ("foo", 1);
 
-%!error <Invalid call to tmpnam> tmpnam (1, 2, 3)
+%!error <Invalid call to tempname> tempname (1, 2, 3)
 
 %!test
 %! type_list = ["char"; "char*1"; "integer*1"; "int8";
@@ -408,7 +413,7 @@
 %! "real*8"; "int16"; "integer*2"; "int32"; "integer*4"];
 %!
 %! n = rows (type_list);
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! id = fopen (nm, "wb");
 %! if (id > 0)
 %!   for i = 1:n
@@ -435,7 +440,7 @@
 
 %!test
 %! x = char (128:255)';
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! id = fopen (nm, "wb");
 %! fwrite (id, x);
 %! fclose (id);
@@ -446,7 +451,7 @@
 %! assert (x, y);
 
 %!test
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! id = fopen (nm, "wb");
 %! if (id > 0)
 %!   fprintf (id, "%d\n", 1:100);
@@ -613,3 +618,24 @@
 %! assert (data, [97, 99; 98, 100]);
 %! assert (count, 4);
 %! fclose (id);
+
+%!assert (sprintf ("%1s", "foo"), "foo");
+%!assert (sprintf ("%.s", "foo"), char (zeros (1, 0)));
+%!assert (sprintf ("%1.s", "foo"), " ");
+%!assert (sprintf ("%.1s", "foo"), "f");
+%!assert (sprintf ("%1.1s", "foo"), "f");
+%!assert (sprintf ("|%4s|", "foo"), "| foo|");
+%!assert (sprintf ("|%-4s|", "foo"), "|foo |");
+%!assert (sprintf ("|%4.1s|", "foo"), "|   f|");
+%!assert (sprintf ("|%-4.1s|", "foo"), "|f   |");
+
+%!assert (sprintf ("%c ", "foo"), "f o o ");
+%!assert (sprintf ("%s ", "foo"), "foo ");
+
+%!assert (sprintf ("|%d|", "foo"), "|102||111||111|");
+%!assert (sprintf ("|%s|", [102, 111, 111]), "|foo|");
+
+%!assert (sprintf ("%s %d ", [102, 1e5, 111, 1e5, 111]), "f 100000 o 100000 o ");
+
+%!assert (sprintf ("%c,%c,%c,%c", "abcd"), "a,b,c,d");
+%!assert (sprintf ("%s,%s,%s,%s", "abcd"), "abcd,");
--- a/test/jit.tst
+++ b/test/jit.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2012-2013 Max Brister
+## Copyright (C) 2012-2015 Max Brister
 ##
 ## This file is part of Octave.
 ##
@@ -26,8 +26,8 @@
 %! __old_jit_startcnt__ = jit_startcnt (1000);
 
 ## Test some simple cases that compile.
-
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! for i=1:1e6
 %!   if (i < 5)
 %!     break;
@@ -36,8 +36,10 @@
 %!   endif
 %! endfor
 %! assert (i, 1);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! while (1)
 %!   if (1)
 %!     break;
@@ -45,33 +47,133 @@
 %!     break;
 %!   endif
 %! endwhile
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   break;
+%! until (0)
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   if (1)
+%!     break;
+%!   end;
+%! until (0)
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! i=1;
+%! do
+%!   continue;
+%!   i=i+1;
+%! until (1)
+%! assert (i, 1);
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! for i=1:1e6
 %!   if (i == 100)
 %!     break;
 %!   endif
 %! endfor
 %! assert (i, 100);
+%! assert (jit_failcnt, 0);
 
 ## Also test parfor keyword
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! parfor i=1:1e6
 %!   if (i == 100)
 %!     break;
 %!   endif
 %! endparfor
 %! assert (i, 100);
+%! assert (jit_failcnt, 0);
+## Test some switch statements
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   switch (1)
+%!   end;
+%! until(1)
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   switch (1)
+%!   case 1
+%!     break;
+%!   end;
+%! until(1)
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   switch (1)
+%!   otherwise
+%!     break;
+%!   end;
+%! until(1)
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! do
+%!   switch (1)
+%!   case 1
+%!     break;
+%!   otherwise
+%!     break;
+%!   end;
+%! until(1)
+%! assert (jit_failcnt, 0);
+
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
+%! i=0;
+%! a=0;
+%! b=0;
+%! do
+%!   i=i+1;
+%!   switch (i)
+%!   case 1
+%!     continue;
+%!   case 2
+%!     b=1;
+%!     continue;
+%!   case 4
+%!     break;
+%!   otherwise
+%!     a=a+5;
+%!   end;
+%!   a=a+1;
+%! until(0);
+%! assert (i, 4);
+%! assert (a, 6);
+%! assert (b, 1);
+%! assert (jit_failcnt, 0);
+
+## Some more complex calculations
+%!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! inc = 1e-5;
 %! result = 0;
 %! for ii = 0:inc:1
 %!   result = result + inc * (1/3 * ii * ii);
 %! endfor
 %! assert (abs (result - 1/9) < 1e-5);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! inc = 1e-5;
 %! result = 0;
 %! for ii = 0:inc:1
@@ -79,8 +181,10 @@
 %!   result = result + inc * (1/3 * ii ^ 2);
 %! endfor
 %! assert (abs (result - 1/9) < 1e-5);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! temp = 1+1i;
 %! nan = NaN;
 %! while (1)
@@ -89,8 +193,10 @@
 %!   break;
 %! endwhile
 %! assert (imag (temp), 0);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! temp = 1+1i;
 %! nan = NaN+1i;
 %! while (1)
@@ -100,24 +206,30 @@
 %!   break;
 %! endwhile
 %! assert (imag (temp), 0);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! temp = 1+1i;
 %! while (1)
 %!   temp = temp * 5;
 %!   break;
 %! endwhile
 %! assert (temp, 5+5i);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! nr = 1001;
 %! mat = zeros (1, nr);
 %! for i = 1:nr
 %!   mat(i) = i;
 %! endfor
 %! assert (mat == 1:nr);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! nr = 1001;
 %! mat = 1:nr;
 %! mat(end) = 0; # force mat to a matrix
@@ -126,8 +238,10 @@
 %!   total = mat(i) + total;
 %! endfor
 %! assert (sum (mat) == total);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! nr = 1001;
 %! mat = [3 1 5];
 %! try
@@ -141,6 +255,7 @@
 %! catch
 %! end_try_catch
 %! assert (result == 500);
+%! assert (jit_failcnt, 0);
 
 %!function result = gen_test (n)
 %!  result = double (rand (1, n) > .01);
@@ -176,18 +291,23 @@
 %!endfunction
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! test_set = gen_test (10000);
 %! assert (all (vectorized (test_set, 3) == loopy (test_set, 3)));
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! niter = 1001;
 %! i = 0;
 %! while (i < niter)
 %!   i = i + 1;
 %! endwhile
 %! assert (i == niter);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! niter = 1001;
 %! result = 0;
 %! m = [5 10];
@@ -195,8 +315,10 @@
 %!   result = result + m(end);
 %! endfor
 %! assert (result == m(end) * niter);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! ndim = 100;
 %! result = 0;
 %! m = zeros (ndim);
@@ -209,8 +331,10 @@
 %!   i = i + 1;
 %! endwhile
 %! assert (result == sum (sum (m)));
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! ndim = 100;
 %! m = zeros (ndim);
 %! i = 1;
@@ -223,8 +347,10 @@
 %! m2 = zeros (ndim);
 %! m2(:) = 1:(ndim^2);
 %! assert (all (m == m2));
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! ndim = 2;
 %! m = zeros (ndim, ndim, ndim, ndim);
 %! result = 0;
@@ -244,6 +370,7 @@
 %! expected = ones (ndim, ndim, ndim, ndim);
 %! assert (all (m == expected));
 %! assert (result == sum (expected (:)));
+%! assert (jit_failcnt, 0);
 
 %!function test_divide ()
 %! state = warning ("query", "Octave:divide-by-zero").state;
@@ -259,21 +386,26 @@
 %!endfunction
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! lasterr ("");
 %! try
 %!   test_divide ();
 %! end_try_catch
 %! assert (strcmp (lasterr (), "division by zero"));
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! while (1)
 %!   a = 0;
 %!   result = a / 1;
 %!   break;
 %! endwhile
 %! assert (result, 0);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! m = zeros (2, 1001);
 %! for i=1:1001
 %!   m(end, i) = i;
@@ -283,38 +415,49 @@
 %! m2(1, :) = fliplr (1:1001);
 %! m2(2, :) = 1:1001;
 %! assert (m, m2);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! m = [1 2 3];
 %! for i=1:1001
 %!   m = sin (m);
 %!   break;
 %! endfor
 %! assert (m == sin ([1  2 3]));
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! i = 0;
 %! while i < 10
 %!   i += 1;
 %! endwhile
 %! assert (i == 10);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! i = 0;
 %! while i < 10
 %!   a = ++i;
 %! endwhile
 %! assert (i == 10);
 %! assert (a == 10);
+%! assert (jit_failcnt, 0);
+
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! i = 0;
 %! while i < 10
 %!   a = i++;
 %! endwhile
 %! assert (i == 10);
 %! assert (a == 9);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! num = 2;
 %! a = zeros (1, num);
 %! i = 1;
@@ -323,6 +466,7 @@
 %!   ++i;
 %! endwhile
 %! assert (a, ones (1, num));
+%! assert (jit_failcnt, 0);
 
 %!function test_compute_idom ()
 %! while (li <= length (l1) && si <= length (s1))
@@ -337,11 +481,13 @@
 %! endwhile
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! lasterr ("");
 %! try
 %!   test_compute_idom ();
 %! end_try_catch
 %! assert (! isempty (lasterr ()));
+%! assert (jit_failcnt, 1);
 
 %!function x = test_overload (a)
 %!  while (1)
@@ -351,8 +497,10 @@
 %!endfunction
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! assert (test_overload (1), 1);
 %! assert (test_overload ([1 2]), [1 2]);
+%! assert (jit_failcnt, 0);
 
 %!function a = bubble (a = [3 2 1])
 %!  swapped = 1;
@@ -371,9 +519,12 @@
 %!endfunction
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! assert (bubble (), [1 2 3]);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! a = 0;
 %! b = 1;
 %! for i=1:1e3
@@ -383,8 +534,12 @@
 %! endfor
 %! assert (a, 2000);
 %! assert (b, 1);
+%! assert (jit_failcnt, 0);
 
-%!testif HAVE_LLVM
+%!xtest
+%! ## FIXME: No support for functions with complex input prototypes
+%! ## testif HAVE_LLVM
+%! jit_failcnt (0)
 %! a = [1+1i 1+2i];
 %! b = 0;
 %! while (1)
@@ -392,6 +547,7 @@
 %!   break;
 %! endwhile
 %! assert (b, a(1));
+%! assert (jit_failcnt, 0);
 
 %!function test_undef ()
 %!  for i=1:1e7
@@ -400,26 +556,34 @@
 %!endfunction
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! lasterr ("");
 %! try
 %!   test_undef ();
 %! end_try_catch
 %! assert (strncmp (lasterr (), "'XXX' undefined near", 20));
+%! assert (jit_failcnt, 1);
 
 %!shared id
 %! id = @(x) x;
 
-%!testif HAVE_LLVM
+%!xtest
+%! ## FIXME: No support for functions with complex input prototypes
+%! ## testif HAVE_LLVM
+%! jit_failcnt (0)
 %! assert (id (1), 1);
 %! assert (id (1+1i), 1+1i);
 %! assert (id (1, 2), 1);
+%! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
+%! jit_failcnt (0)
 %! lasterr ("");
 %! try
 %!   id ();
 %! end_try_catch
 %! assert (strncmp (lasterr (), "'x' undefined near", 18));
+%! assert (jit_failcnt, 0);
 
 ## Restore JIT settings
 %!testif HAVE_LLVM
--- a/test/line-continue.tst
+++ b/test/line-continue.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/logical-index.tst
+++ b/test/logical-index.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/nest/nest.tst
+++ b/test/nest/nest.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/null-assign.tst
+++ b/test/null-assign.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2013 Jaroslav Hajek
+## Copyright (C) 2008-2015 Jaroslav Hajek
 ##
 ## This file is part of Octave.
 ##
@@ -61,3 +61,49 @@
 %!test
 %! a = ones (3); b = []; fail ("subsasgn (a, substruct ('()', {':',1:2}), b)", ".")
 
+%!test
+%! classes = {@int8, @int16, @int32, @int64, ...
+%!   @uint8, @uint16, @uint32, @uint64, ...
+%!   @single, @double, @logical};
+%! for i = 1:numel (classes)
+%!   cls = classes{i};
+%!   x = cls ([1, 2, 3]);
+%!   cls_nm = class (x);
+%!   x(2) = [];
+%!   assert (x, cls ([1, 3]));
+%!   assert (class (x), cls_nm);
+%!   x(2) = [];
+%!   assert (x, cls (1));
+%!   assert (class (x), cls_nm);
+%!   x(1) = [];
+%!   assert (x, cls (zeros (1, 0)));
+%!   assert (class (x), cls_nm);
+%! endfor
+%! for i = 1:numel (classes)
+%!   cls = classes{i};
+%!   x = cls ([1, 2, 3]);
+%!   cls_nm = class (x);
+%!   x(2) = '';
+%!   assert (x, cls ([1, 3]));
+%!   assert (class (x), cls_nm);
+%!   x(2) = '';
+%!   assert (x, cls (1));
+%!   assert (class (x), cls_nm);
+%!   x(1) = '';
+%!   assert (x, cls (zeros (1, 0)));
+%!   assert (class (x), cls_nm);
+%! endfor
+%! for i = 1:numel (classes)
+%!   cls = classes{i};
+%!   x = cls ([1, 2, 3]);
+%!   cls_nm = class (x);
+%!   x(2) = "";
+%!   assert (x, cls ([1, 3]));
+%!   assert (class (x), cls_nm);
+%!   x(2) = "";
+%!   assert (x, cls (1));
+%!   assert (class (x), cls_nm);
+%!   x(1) = "";
+%!   assert (x, cls (zeros (1, 0)));
+%!   assert (class (x), cls_nm);
+%! endfor
--- a/test/parser.tst
+++ b/test/parser.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2010-2013 John W. Eaton
+## Copyright (C) 2010-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -19,6 +19,7 @@
 ## Tests for parser problems belong in this file.
 ## We need many more tests here!
 
+## Test cell construction operator {}
 %!assert ({1 2 {3 4}}, {1,2,{3,4}})
 %!assert ({1, 2 {3 4}}, {1,2,{3,4}})
 %!assert ({1 2, {3 4}}, {1,2,{3,4}})
@@ -28,6 +29,14 @@
 %!assert ({1 2,{3,4}}, {1,2,{3,4}})
 %!assert ({1,2,{3 4}}, {1,2,{3,4}})
 
+## bug #43113 using null comma-separated list in constructor
+%!test
+%! z = cell (1,2,3,0,5);
+%! assert ({1, z{:}, 2}, {1, 2});
+%! assert ({1; z{:}; 2}, {1; 2});
+%! assert ({1 2; z{:}; 3 4}, {1, 2; 3 4});
+%! assert ({1 2; 5 z{:} 6; 3 4}, {1, 2; 5 6; 3 4});
+
 ## Tests for operator precedence as documented in section 8.8 of manual
 ## There are 13 levels of precedence from "parentheses and indexing" (highest)
 ## down to "statement operators" (lowest).
@@ -284,6 +293,7 @@
 %! assert (xyz, 1);
 
 %!test
+%! warning ("off", "Octave:num-to-str", "local");
 %! a = [97 ... % comment
 %!      'b'];
 %! assert (a, 'ab');
--- a/test/prefer.tst
+++ b/test/prefer.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -66,16 +66,16 @@
 %! warning (wsn.state, "Octave:str-to-num");
 
 %!test
-%! wir = warning ("query", "Ocave:imag-to-real");
-%! warning ("off", "Ocave:imag-to-real");
+%! wir = warning ("query", "Octave:imag-to-real");
+%! warning ("off", "Octave:imag-to-real");
 %! assert (eye (1+i), 1);
-%! warning (wir.state, "Ocave:imag-to-real");
+%! warning (wir.state, "Octave:imag-to-real");
 
 %!test
-%! wir = warning ("query", "Ocave:imag-to-real");
-%! warning ("on", "Ocave:imag-to-real");
+%! wir = warning ("query", "Octave:imag-to-real");
+%! warning ("on", "Octave:imag-to-real");
 %! fail ("eye (1+i)", "warning");
-%! warning (wir.state, "Ocave:imag-to-real");
+%! warning (wir.state, "Octave:imag-to-real");
 
 %!test
 %! wrre = warning ("query", "Octave:resize-on-range-error");
@@ -115,7 +115,7 @@
 %! sp = save_precision ();
 %! save_precision (1);
 %! x = pi;
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! save ("-text", nm, "x");
 %! clear x;
 %! load (nm);
@@ -127,7 +127,7 @@
 %! sp = save_precision ();
 %! save_precision (5);
 %! x = pi;
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! save ("-text", nm, "x");
 %! clear x;
 %! load (nm);
@@ -160,7 +160,7 @@
 %!test
 %! wndz = warning ("query", "Octave:neg-dim-as-zero");
 %! warning ("on", "Octave:neg-dim-as-zero");
-%! fail ("eye (-1) == []", "warning");
+%! fail ("eye (-1) == []", "warning", "converting negative dimension");
 %! warning (wndz.state, "Octave:neg-dim-as-zero");
 
 %!test
@@ -171,14 +171,8 @@
 
 %!test
 %! watv = warning ("query", "Octave:assign-as-truth-value");
-%! warning ("off", "Octave:assign-as-truth-value");
-%! if (x = 1) 1; endif
-%! warning (watv.state, "Octave:assign-as-truth-value");
-
-%!test
-%! watv = warning ("query", "Octave:assign-as-truth-value");
 %! warning ("on", "Octave:assign-as-truth-value");
-%! fail ("if (x = 1) 1; endif", "warning");
+%! fail ("if (x = 1) 1; endif", "warning", "assignment used as truth value");
 %! warning (watv.state, "Octave:assign-as-truth-value");
 
 %!test
@@ -192,6 +186,6 @@
 %! warning ("on", "Octave:divide-by-zero");
 %! a = 1;
 %! b = 0;
-%! fail ("isinf (a/b);", "warning")
+%! fail ("isinf (a/b);", "warning", "division by zero");
 %! warning (wdbz.state, "Octave:divide-by-zero");
 
--- a/test/range.tst
+++ b/test/range.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/recursion.tst
+++ b/test/recursion.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/return.tst
+++ b/test/return.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/slice.tst
+++ b/test/slice.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2007-2013 John W. Eaton
+## Copyright (C) 2007-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/struct.tst
+++ b/test/struct.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/switch.tst
+++ b/test/switch.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/system.tst
+++ b/test/system.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
@@ -58,8 +58,8 @@
 %!error <Invalid call to usleep> usleep (1, 2)
 
 %!test
-%! from = tmpnam ();
-%! to = tmpnam ();
+%! from = tempname ();
+%! to = tempname ();
 %! id = fopen (from, "wb");
 %! if (id > 0 && fclose (id) == 0)
 %!   [s, e] = stat (from);
@@ -79,7 +79,7 @@
 %!error <Invalid call to rename> rename ("foo", "bar", 1)
 
 %!test
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! if ((id = fopen (nm, "wb")) > 0)
 %!   [s, err] = stat (nm);
 %!   if (! err && fclose (id) == 0 && unlink (nm) == 0)
@@ -90,6 +90,7 @@
 
 %!error <Invalid call to unlink> unlink ()
 %!error <Invalid call to unlink> unlink ("foo", 1)
+%!error <FILE must be a string> unlink ({})
 
 %!test
 %! [files, status, msg] = readdir (filesep);
@@ -99,7 +100,7 @@
 %!error <Invalid call to readdir> readdir ("foo", 1)
 
 %!test
-%! nm = tmpnam ();
+%! nm = tempname ();
 %! e1 = mkdir (nm);
 %! [s2, e2] = stat (nm);
 %! e3 = rmdir (nm);
@@ -120,14 +121,14 @@
 %! ## Test makes no sense on Windows systems
 %! if (isunix () || ismac ())
 %!   orig_umask = umask (0);
-%!   nm = tmpnam ();
+%!   nm = tempname ();
 %!   id = fopen (nm, "wb");
 %!   s1 = stat (nm);
 %!   fclose (id);
 %!   unlink (nm);
 %!
 %!   umask (777);
-%!   nm = tmpnam ();
+%!   nm = tempname ();
 %!   id = fopen (nm, "wb");
 %!   s2 = stat (nm);
 %!   fclose (id);
@@ -180,22 +181,48 @@
 %!error <Invalid call to lstat> lstat ()
 %!error <Invalid call to lstat> lstat ("foo", 1)
 
+%!test
+%! if (isunix ())
+%!   assert (S_ISCHR (stat ("/dev/null").mode));
+%!   if (exist ("/dev/initctl"))
+%!     assert (S_ISFIFO (stat ("/dev/initctl").mode));
+%!   endif
+%!   assert (S_ISLNK (lstat ("/dev/core").mode));
+%! endif
+%! nm = tempname ();
+%! fid = fopen (nm, "wb");
+%! fclose (fid);
+%! r = [ S_ISREG(stat(nm).mode)
+%!       S_ISDIR(stat(nm).mode)
+%!       S_ISCHR(stat(nm).mode)
+%!       S_ISBLK(stat(nm).mode)
+%!       S_ISFIFO(stat(nm).mode)
+%!       S_ISLNK(lstat(nm).mode)
+%!       S_ISSOCK(stat(nm).mode) ];
+%! unlink (nm);
+%! assert (r(:), [true; false; false; false; false; false; false]);
+
+%!error <octave_base_value::double_value> S_ISREG ({})
+%!error <octave_base_value::double_value> S_ISDIR ({})
+%!error <octave_base_value::double_value> S_ISCHR ({})
+%!error <octave_base_value::double_value> S_ISBLK ({})
+%!error <octave_base_value::double_value> S_ISFIFO ({})
+%!error <octave_base_value::double_value> S_ISLNK ({})
+%!error <octave_base_value::double_value> S_ISSOCK ({})
+
+%!error <Invalid call to S_ISREG> S_ISREG ()
+%!error <Invalid call to S_ISDIR> S_ISDIR ()
+%!error <Invalid call to S_ISCHR> S_ISCHR ()
+%!error <Invalid call to S_ISBLK> S_ISBLK ()
+%!error <Invalid call to S_ISFIFO> S_ISFIFO ()
+%!error <Invalid call to S_ISLNK> S_ISLNK ()
+%!error <Invalid call to S_ISSOCK> S_ISSOCK ()
+
 %!assert (iscell (glob ([filesep "*"])))
 
 %!error <Invalid call to glob> glob ()
 %!error <Invalid call to glob> glob ("foo", 1)
 
-%!test
-%! string_fill_char = char (0);
-%! assert ((fnmatch ("a*a", {"aba"; "xxxba"; "aa"}) == [1; 0; 1]
-%! && fnmatch ({"a*a"; "b*b"}, "bob")
-%! && fnmatch ("x[0-5]*", {"x1"; "x6"}) == [1; 0]
-%! && fnmatch ("x[0-5]*", {"x1"; "x6"; "x001"}) == [1; 0; 1]
-%! && fnmatch ("x???y", {"xabcy"; "xy"}) == [1; 0]));
-
-%!error <Invalid call to fnmatch> fnmatch ()
-%!error <Invalid call to fnmatch> fnmatch ("foo", "bar", 3)
-
 %!assert (ischar (file_in_path (path (), "date.m")))
 
 %!error <invalid option> file_in_path ("foo", "bar", 1)
@@ -241,7 +268,7 @@
 
 %!error <... getgid> getgid (1)
 
-%!assert (getenv ("HOME"), tilde_expand ("~"))
+%!assert (get_home_directory (), tilde_expand ("~"))
 
 %!error <Invalid call to getenv> getenv ()
 %!error <Invalid call to getenv> getenv ("foo", 1)
@@ -253,17 +280,13 @@
 %! warning (wns.state, "Octave:num-to-str");
 
 %!test
-%! putenv ("foobar", "baz");
+%! setenv ("foobar", "baz");
 %! assert (getenv ("foobar"), "baz");
 
-%!error <Invalid call to putenv> putenv ()
-%!error <Invalid call to putenv> putenv ("foo", "bar", 1)
+%!error <Invalid call to setenv> setenv ()
+%!error <Invalid call to setenv> setenv ("foo", "bar", 1)
 
-%!test
-%! wns = warning ("query", "Octave:num-to-str");
-%! warning ("on", "Octave:num-to-str");
-%! fail ("putenv (1, 2)","warning");
-%! warning (wns.state, "Octave:num-to-str");
+%!error <VAR must be a string> setenv (1, 2)
 
 %!test
 %! xdir = pwd ();
@@ -370,4 +393,3 @@
 %!assert (isstruct (octave_config_info ()))
 
 %!assert (isstruct (getrusage ()))
-
--- a/test/transpose.tst
+++ b/test/transpose.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/try.tst
+++ b/test/try.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/unwind.tst
+++ b/test/unwind.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##
--- a/test/while.tst
+++ b/test/while.tst
@@ -1,4 +1,4 @@
-## Copyright (C) 2006-2013 John W. Eaton
+## Copyright (C) 2006-2015 John W. Eaton
 ##
 ## This file is part of Octave.
 ##